From a7881476f2a90337ece56c26fb0a012a5a16d1b0 Mon Sep 17 00:00:00 2001 From: eranif Date: Wed, 16 Jan 2008 06:30:13 +0000 Subject: [PATCH] modified the directory structure to fit to standard SVN structure (tags, branches, trunk) git-svn-id: https://codelite.svn.sourceforge.net/svnroot/codelite/trunk@937 9da81c78-c036-0410-9e1f-a2b0375e4b5a --- AutoRevision/AutoRevision.workspace | 16 + AutoRevision/autorev/autorev.project | 47 + AutoRevision/autorev/main.cpp | 64 + BuildInfo.txt | 56 + CC_TODO.TXT | 15 + CodeFormatter/ASBeautifier.cpp | 1964 + CodeFormatter/ASEnhancer.cpp | 485 + CodeFormatter/ASFormatter.cpp | 2199 + CodeFormatter/ASResource.cpp | 387 + CodeFormatter/CodeFormatter.project | 150 + CodeFormatter/CodeFormatter.vcproj | 186 + CodeFormatter/astyle.h | 494 + CodeFormatter/astyle_main.cpp | 1134 + CodeFormatter/codeforammaterbasedlg.cpp | 195 + CodeFormatter/codeforammaterbasedlg.h | 78 + CodeFormatter/codeformatter.cpp | 160 + CodeFormatter/codeformatter.h | 29 + CodeFormatter/codeformatterdlg.cpp | 206 + CodeFormatter/codeformatterdlg.h | 39 + CodeFormatter/codeformatterdll.def | 3 + CodeFormatter/formatoptions.cpp | 114 + CodeFormatter/formatoptions.h | 57 + CodeFormatter/makefile | 85 + CodeLite.sln | 195 + CodeLite/CodeLite.cbp | 297 + CodeLite/CodeLite.project | 178 + CodeLite/CodeLite.vcproj | 424 + CodeLite/DoxySMain.page | 12 + CodeLite/FlexLexer.h | 198 + CodeLite/archive.cpp | 300 + CodeLite/archive.h | 76 + CodeLite/calltip.cpp | 91 + CodeLite/calltip.h | 93 + CodeLite/cl_process.cpp | 132 + CodeLite/cl_process.h | 91 + CodeLite/comment.cpp | 111 + CodeLite/comment.h | 108 + CodeLite/comment_creator.h | 25 + CodeLite/cpp5.l | 419 + CodeLite/cpp_comment_creator.cpp | 74 + CodeLite/cpp_comment_creator.h | 21 + CodeLite/cpp_expr_lexer.cpp | 2608 + CodeLite/cpp_expr_parser.cpp | 878 + CodeLite/cpp_func_parser.cpp | 913 + CodeLite/cpp_lexer.cpp | 2711 + CodeLite/cpp_lexer.h | 89 + CodeLite/cpp_scanner.cpp | 65 + CodeLite/cpp_scanner.h | 47 + CodeLite/ctags_manager.cpp | 1724 + CodeLite/ctags_manager.h | 574 + CodeLite/db_record.h | 78 + CodeLite/dirsaver.h | 28 + CodeLite/dirtraverser.cpp | 52 + CodeLite/dirtraverser.h | 74 + CodeLite/docs/DoxySfile | 185 + CodeLite/docs/build-docs.bat | 9 + CodeLite/entry.cpp | 477 + CodeLite/entry.h | 271 + CodeLite/expression_result.cpp | 44 + CodeLite/expression_result.h | 25 + CodeLite/extdbdata.h | 13 + CodeLite/fileutils.cpp | 53 + CodeLite/fileutils.h | 17 + CodeLite/function.cpp | 31 + CodeLite/function.h | 30 + CodeLite/language.cpp | 1068 + CodeLite/language.h | 216 + CodeLite/lex.yy.cpp | 2543 + CodeLite/parse_thread.cpp | 154 + CodeLite/parse_thread.h | 154 + CodeLite/precompiled_header.h | 75 + CodeLite/procutils.cpp | 362 + CodeLite/procutils.h | 43 + CodeLite/progress_dialog.cpp | 14 + CodeLite/progress_dialog.h | 32 + CodeLite/readtags.cpp | 961 + CodeLite/readtags.h | 245 + CodeLite/scope_parser.cpp | 1187 + CodeLite/serialized_object.h | 32 + CodeLite/setters_getters_data.cpp | 22 + CodeLite/setters_getters_data.h | 28 + CodeLite/singleton.h | 62 + CodeLite/smart_ptr.h | 222 + CodeLite/symbol_tree.cpp | 411 + CodeLite/symbol_tree.h | 194 + CodeLite/tag_tree.cpp | 68 + CodeLite/tag_tree.h | 56 + CodeLite/tags_database.cpp | 580 + CodeLite/tags_database.h | 249 + CodeLite/tags_options_data.cpp | 69 + CodeLite/tags_options_data.h | 58 + CodeLite/tokenizer.cpp | 189 + CodeLite/tokenizer.h | 164 + CodeLite/tree.h | 218 + CodeLite/tree_node.h | 340 + CodeLite/unistd.h | 16 + CodeLite/var_parser.cpp | 793 + CodeLite/variable.cpp | 52 + CodeLite/variable.h | 38 + CodeLite/variable_entry.cpp | 116 + CodeLite/variable_entry.h | 109 + CodeLite/worker_thread.cpp | 82 + CodeLite/worker_thread.h | 103 + CodeLite/y.tab.h | 90 + CxxParser/CxxParser.workspace | 19 + CxxParser/Debug/test.h | 6 + CxxParser/Parser.project | 81 + CxxParser/Release/test.h | 13 + CxxParser/TODO.TXT | 9 + CxxParser/cpp.l | 406 + CxxParser/cpp5_grammar.y.full | 2321 + CxxParser/cpp_expr_lexer.cpp | 2608 + CxxParser/cpp_expr_parser.cpp | 878 + CxxParser/cpp_func_parser.cpp | 913 + CxxParser/cpp_func_parser.y | 378 + CxxParser/cpp_lexer.cpp | 2711 + CxxParser/cpp_lexer.h | 89 + CxxParser/cpp_scope_grammar.y | 539 + CxxParser/cpp_variables_grammar.y | 303 + CxxParser/expr_grammar.y | 343 + CxxParser/expr_lexer.l | 316 + CxxParser/expression_result.cpp | 44 + CxxParser/expression_result.h | 25 + CxxParser/function.cpp | 31 + CxxParser/function.h | 30 + CxxParser/main.cpp | 130 + CxxParser/scope_parser.cpp | 1187 + CxxParser/var_parser.cpp | 793 + CxxParser/variable.cpp | 52 + CxxParser/variable.h | 38 + Debugger/Debugger.vcproj | 200 + Debugger/DebuggerGDB.project | 131 + Debugger/dbgcmd.cpp | 488 + Debugger/dbgcmd.h | 129 + Debugger/debuggerdll.def | 4 + Debugger/debuggergdb.cpp | 756 + Debugger/debuggergdb.h | 82 + Debugger/dirkeeper.h | 19 + Debugger/gdb_lexer.cpp | 1796 + Debugger/gdbinfolexer.cpp | 90 + Debugger/gdbinfolexer.h | 26 + Debugger/gdblexer.h | 22 + Debugger/makefile | 84 + Gizmos/Gizmos.project | 162 + Gizmos/gizmos.cpp | 512 + Gizmos/gizmos.h | 40 + Gizmos/makefile | 85 + Gizmos/new_class.png | Bin 0 -> 7960 bytes Gizmos/newclassbasedlg.cpp | 127 + Gizmos/newclassbasedlg.h | 70 + Gizmos/newclassdlg.cpp | 144 + Gizmos/newclassdlg.h | 56 + Gizmos/newinheritancebasedlg.cpp | 71 + Gizmos/newinheritancebasedlg.h | 55 + Gizmos/newinheritancedlg.cpp | 24 + Gizmos/newinheritancedlg.h | 27 + Gizmos/newwxprojectbasedlg.cpp | 133 + Gizmos/newwxprojectbasedlg.h | 75 + Gizmos/newwxprojectdlg.cpp | 81 + Gizmos/newwxprojectdlg.h | 28 + Gizmos/newwxprojectinfo.cpp | 15 + Gizmos/newwxprojectinfo.h | 42 + Gizmos/plugindata.cpp | 9 + Gizmos/plugindata.h | 28 + Gizmos/pluginwizard.cpp | 46 + Gizmos/pluginwizard.h | 17 + Gizmos/pluginwizard_pag2.cpp | 41 + Gizmos/pluginwizard_pag2.h | 47 + Gizmos/pluginwizard_page1.cpp | 67 + Gizmos/pluginwizard_page1.h | 50 + InnoSetup/box_software.ico | Bin 0 -> 26694 bytes InnoSetup/license.txt | 339 + InnoSetup/lite_editor.iss | 93 + Interfaces/Interfaces.project | 35 + Interfaces/Interfaces.vcproj | 157 + Interfaces/debugger.h | 144 + Interfaces/debuggerobserver.h | 59 + Interfaces/iconfigtool.h | 19 + Interfaces/ieditor.h | 26 + Interfaces/imanager.h | 55 + Interfaces/plugin.h | 105 + LiteEditor.workspace | 84 + LiteEditor/LiteEditor.cbp | 224 + LiteEditor/LiteEditor.project | 389 + LiteEditor/LiteEditor.vcproj | 807 + LiteEditor/add_option_dialog.cpp | 76 + LiteEditor/add_option_dialog.h | 37 + LiteEditor/addincludefiledlg.cpp | 141 + LiteEditor/addincludefiledlg.h | 35 + LiteEditor/addincludefiledlgbase.cpp | 128 + LiteEditor/addincludefiledlgbase.h | 66 + LiteEditor/advanced_settings.cpp | 159 + LiteEditor/advanced_settings.h | 52 + LiteEditor/app.cpp | 270 + LiteEditor/app.h | 30 + LiteEditor/attachdbgprocbasedlg.cpp | 65 + LiteEditor/attachdbgprocbasedlg.h | 56 + LiteEditor/attachdbgprocdlg.cpp | 113 + LiteEditor/attachdbgprocdlg.h | 33 + LiteEditor/autorev.exe | Bin 0 -> 215705 bytes LiteEditor/breakpoint_dlg_base.cpp | 52 + LiteEditor/breakpoint_dlg_base.h | 37 + LiteEditor/breakpointdlg.cpp | 71 + LiteEditor/breakpointdlg.h | 25 + LiteEditor/browse_record.h | 31 + LiteEditor/build_page.cpp | 125 + LiteEditor/build_page.h | 52 + LiteEditor/checkdirtreectrl.cpp | 158 + LiteEditor/checkdirtreectrl.h | 39 + LiteEditor/checktreectrl.cpp | 202 + LiteEditor/checktreectrl.h | 72 + LiteEditor/close_all_dlg.cpp | 85 + LiteEditor/close_all_dlg.h | 46 + LiteEditor/code_parser.rc | 49 + LiteEditor/compiler_page.cpp | 297 + LiteEditor/compiler_page.h | 72 + LiteEditor/configuration_manager_base_dlg.cpp | 88 + LiteEditor/configuration_manager_base_dlg.h | 43 + LiteEditor/configuration_manager_dlg.cpp | 307 + LiteEditor/configuration_manager_dlg.h | 52 + LiteEditor/context_base.cpp | 39 + LiteEditor/context_base.h | 76 + LiteEditor/context_cpp.cpp | 1707 + LiteEditor/context_cpp.h | 126 + LiteEditor/context_manager.cpp | 39 + LiteEditor/context_manager.h | 29 + LiteEditor/context_text.cpp | 97 + LiteEditor/context_text.h | 53 + LiteEditor/cpp_symbol_tree.cpp | 185 + LiteEditor/cpp_symbol_tree.h | 44 + LiteEditor/dbgcommandbasedlg.cpp | 61 + LiteEditor/dbgcommandbasedlg.h | 49 + LiteEditor/dbgcommanddlg.cpp | 6 + LiteEditor/dbgcommanddlg.h | 25 + LiteEditor/debuggerpane.cpp | 88 + LiteEditor/debuggerpane.h | 54 + LiteEditor/debuggersettingsbasedlg.cpp | 105 + LiteEditor/debuggersettingsbasedlg.h | 64 + LiteEditor/debuggersettingsdlg.cpp | 273 + LiteEditor/debuggersettingsdlg.h | 58 + LiteEditor/debuggertip.cpp | 66 + LiteEditor/debuggertip.h | 28 + LiteEditor/depend_dlg_page.cpp | 177 + LiteEditor/depend_dlg_page.h | 46 + LiteEditor/depends_dlg.cpp | 91 + LiteEditor/depends_dlg.h | 43 + LiteEditor/edit_configuration.cpp | 171 + LiteEditor/edit_configuration.h | 47 + LiteEditor/edit_workspace_conf_dlg.cpp | 148 + LiteEditor/edit_workspace_conf_dlg.h | 45 + LiteEditor/editor.cpp | 1685 + LiteEditor/editor.h | 315 + LiteEditor/editor_creator.cpp | 35 + LiteEditor/editor_creator.h | 32 + LiteEditor/envvar_dlg.cpp | 73 + LiteEditor/envvar_dlg.h | 43 + LiteEditor/envvar_table.cpp | 168 + LiteEditor/envvar_table.h | 50 + LiteEditor/exports.h | 18 + LiteEditor/ext_db_page1.cpp | 77 + LiteEditor/ext_db_page1.h | 43 + LiteEditor/ext_db_page2.cpp | 70 + LiteEditor/ext_db_page2.h | 40 + LiteEditor/ext_db_page3.cpp | 97 + LiteEditor/ext_db_page3.h | 42 + LiteEditor/extdbwizard.cpp | 43 + LiteEditor/extdbwizard.h | 27 + LiteEditor/file.xpm | 36 + LiteEditor/filedroptarget.cpp | 22 + LiteEditor/filedroptarget.h | 11 + LiteEditor/fileexplorer.cpp | 104 + LiteEditor/fileexplorer.h | 40 + LiteEditor/fileexplorertree.cpp | 214 + LiteEditor/fileexplorertree.h | 37 + LiteEditor/filehistory.cpp | 17 + LiteEditor/filehistory.h | 14 + LiteEditor/fileview.cpp | 1078 + LiteEditor/fileview.h | 152 + LiteEditor/findinfilesdlg.cpp | 274 + LiteEditor/findinfilesdlg.h | 79 + LiteEditor/findreplacedlg.cpp | 327 + LiteEditor/findreplacedlg.h | 215 + LiteEditor/frame.cpp | 2266 + LiteEditor/frame.h | 319 + LiteEditor/free_text_dialog.cpp | 51 + LiteEditor/free_text_dialog.h | 38 + LiteEditor/generalinfo.cpp | 26 + LiteEditor/generalinfo.h | 41 + LiteEditor/generic_context.cpp | 97 + LiteEditor/generic_context.h | 55 + LiteEditor/iconsextra.cpp | 349 + LiteEditor/keyvaluetabledlg.cpp | 159 + LiteEditor/keyvaluetabledlg.h | 49 + LiteEditor/lexer_page.cpp | 236 + LiteEditor/lexer_page.h | 61 + LiteEditor/listctrlpanel.cpp | 72 + LiteEditor/listctrlpanel.h | 28 + LiteEditor/listctrlpanelbase.cpp | 25 + LiteEditor/listctrlpanelbase.h | 42 + LiteEditor/localvarstree.cpp | 134 + LiteEditor/localvarstree.h | 35 + LiteEditor/mainbook.cpp | 156 + LiteEditor/mainbook.h | 28 + LiteEditor/manager.cpp | 2302 + LiteEditor/manager.h | 658 + LiteEditor/menu_event_handlers.cpp | 302 + LiteEditor/menu_event_handlers.h | 161 + LiteEditor/menumanager.cpp | 37 + LiteEditor/menumanager.h | 37 + LiteEditor/movefuncimplbasedlg.cpp | 95 + LiteEditor/movefuncimplbasedlg.h | 56 + LiteEditor/movefuncimpldlg.cpp | 47 + LiteEditor/movefuncimpldlg.h | 28 + LiteEditor/navigationmanager.cpp | 62 + LiteEditor/navigationmanager.h | 60 + LiteEditor/new_configuration_dlg.cpp | 121 + LiteEditor/new_configuration_dlg.h | 45 + LiteEditor/new_item_dlg.cpp | 235 + LiteEditor/new_item_dlg.h | 71 + LiteEditor/newdlg.cpp | 266 + LiteEditor/newdlg.h | 103 + LiteEditor/open_resouce_dlg.cpp | 243 + LiteEditor/open_resouce_dlg.h | 59 + LiteEditor/openwindowspanel.cpp | 104 + LiteEditor/openwindowspanel.h | 31 + LiteEditor/openwindowspanelbase.cpp | 29 + LiteEditor/openwindowspanelbase.h | 46 + LiteEditor/options_base_dlg.cpp | 261 + LiteEditor/options_base_dlg.h | 82 + LiteEditor/output_pane.cpp | 393 + LiteEditor/output_pane.h | 112 + LiteEditor/outputpanewindow.cpp | 157 + LiteEditor/outputpanewindow.h | 34 + LiteEditor/pluginmanager.cpp | 196 + LiteEditor/pluginmanager.h | 54 + LiteEditor/project_settings_base_dlg.cpp | 534 + LiteEditor/project_settings_base_dlg.h | 135 + LiteEditor/project_settings_dlg.cpp | 594 + LiteEditor/project_settings_dlg.h | 91 + LiteEditor/quickoutlinedlg.cpp | 90 + LiteEditor/quickoutlinedlg.h | 40 + LiteEditor/quickwatchbasedlg.cpp | 51 + LiteEditor/quickwatchbasedlg.h | 50 + LiteEditor/quickwatchdlg.cpp | 34 + LiteEditor/quickwatchdlg.h | 27 + LiteEditor/res/Checkbox_off.gif | Bin 0 -> 890 bytes LiteEditor/res/Checkbox_on.gif | Bin 0 -> 890 bytes LiteEditor/res/accept.png | Bin 0 -> 781 bytes LiteEditor/res/arrow_left_green.png | Bin 0 -> 570 bytes LiteEditor/res/arrow_right_green.png | Bin 0 -> 589 bytes LiteEditor/res/bookmark.png | Bin 0 -> 1155 bytes LiteEditor/res/bookmark_delete.png | Bin 0 -> 788 bytes LiteEditor/res/bookmark_down.png | Bin 0 -> 791 bytes LiteEditor/res/bookmark_up.png | Bin 0 -> 821 bytes LiteEditor/res/breakpoint.png | Bin 0 -> 745 bytes LiteEditor/res/bug.png | Bin 0 -> 3692 bytes LiteEditor/res/but_green_s.png | Bin 0 -> 568 bytes LiteEditor/res/chart_organisation.png | Bin 0 -> 444 bytes LiteEditor/res/class.png | Bin 0 -> 537 bytes LiteEditor/res/class24.png | Bin 0 -> 1600 bytes LiteEditor/res/class_new.png | Bin 0 -> 1566 bytes LiteEditor/res/clean.png | Bin 0 -> 792 bytes LiteEditor/res/cog.png | Bin 0 -> 512 bytes LiteEditor/res/copy.png | Bin 0 -> 784 bytes LiteEditor/res/cross.png | Bin 0 -> 655 bytes LiteEditor/res/cube_green.png | Bin 0 -> 688 bytes LiteEditor/res/cube_yellow.png | Bin 0 -> 722 bytes LiteEditor/res/cubes.ico | Bin 0 -> 26694 bytes LiteEditor/res/cubes.png | Bin 0 -> 809 bytes LiteEditor/res/cubes_blue.png | Bin 0 -> 801 bytes LiteEditor/res/cut.png | Bin 0 -> 876 bytes LiteEditor/res/debug_windows.png | Bin 0 -> 3424 bytes LiteEditor/res/debugger_next.png | Bin 0 -> 1568 bytes LiteEditor/res/debugger_pause.png | Bin 0 -> 1528 bytes LiteEditor/res/debugger_start.png | Bin 0 -> 1510 bytes LiteEditor/res/debugger_stepin.png | Bin 0 -> 3136 bytes LiteEditor/res/debugger_stepout.png | Bin 0 -> 3145 bytes LiteEditor/res/debugger_stop.png | Bin 0 -> 1316 bytes LiteEditor/res/document_delete.png | Bin 0 -> 684 bytes LiteEditor/res/drive.png | Bin 0 -> 3479 bytes LiteEditor/res/enum.png | Bin 0 -> 518 bytes LiteEditor/res/enum.xpm | 26 + LiteEditor/res/enumee.xpm | 56 + LiteEditor/res/error.png | Bin 0 -> 674 bytes LiteEditor/res/exclamation.png | Bin 0 -> 701 bytes LiteEditor/res/execute.png | Bin 0 -> 634 bytes LiteEditor/res/file_explorer.png | Bin 0 -> 612 bytes LiteEditor/res/fileclose.png | Bin 0 -> 1667 bytes LiteEditor/res/filenew.png | Bin 0 -> 347 bytes LiteEditor/res/find.png | Bin 0 -> 1136 bytes LiteEditor/res/folder.png | Bin 0 -> 626 bytes LiteEditor/res/folder24.png | Bin 0 -> 1021 bytes LiteEditor/res/folder_find.png | Bin 0 -> 795 bytes LiteEditor/res/folder_green.png | Bin 0 -> 643 bytes LiteEditor/res/folder_red.png | Bin 0 -> 628 bytes LiteEditor/res/folder_table.png | Bin 0 -> 675 bytes LiteEditor/res/form_blue.png | Bin 0 -> 637 bytes LiteEditor/res/frames.png | Bin 0 -> 524 bytes LiteEditor/res/func_private.png | Bin 0 -> 525 bytes LiteEditor/res/func_protected.png | Bin 0 -> 528 bytes LiteEditor/res/func_public.png | Bin 0 -> 505 bytes LiteEditor/res/garbage.png | Bin 0 -> 1051 bytes LiteEditor/res/gear_run.png | Bin 0 -> 1618 bytes LiteEditor/res/gear_stop.png | Bin 0 -> 1600 bytes LiteEditor/res/hammer.png | Bin 0 -> 1229 bytes LiteEditor/res/help.png | Bin 0 -> 894 bytes LiteEditor/res/locals_view.png | Bin 0 -> 887 bytes LiteEditor/res/magic-wand.png | Bin 0 -> 742 bytes LiteEditor/res/magic-wand2.png | Bin 0 -> 1345 bytes LiteEditor/res/media_stop.png | Bin 0 -> 705 bytes LiteEditor/res/member_private.png | Bin 0 -> 618 bytes LiteEditor/res/member_protected.png | Bin 0 -> 623 bytes LiteEditor/res/member_public.png | Bin 0 -> 582 bytes LiteEditor/res/namespace.png | Bin 0 -> 514 bytes LiteEditor/res/new_class.png | Bin 0 -> 7960 bytes LiteEditor/res/next.png | Bin 0 -> 1046 bytes LiteEditor/res/open_resource.png | Bin 0 -> 1060 bytes LiteEditor/res/open_type.png | Bin 0 -> 1304 bytes LiteEditor/res/output_win.png | Bin 0 -> 3265 bytes LiteEditor/res/page_close.png | Bin 0 -> 2975 bytes LiteEditor/res/page_error.png | Bin 0 -> 475 bytes LiteEditor/res/page_find.png | Bin 0 -> 3562 bytes LiteEditor/res/page_green.png | Bin 0 -> 639 bytes LiteEditor/res/page_new.png | Bin 0 -> 682 bytes LiteEditor/res/page_open.png | Bin 0 -> 537 bytes LiteEditor/res/page_red.png | Bin 0 -> 554 bytes LiteEditor/res/page_save.png | Bin 0 -> 970 bytes LiteEditor/res/page_white_c.png | Bin 0 -> 587 bytes LiteEditor/res/page_white_cplusplus.png | Bin 0 -> 621 bytes LiteEditor/res/page_white_h.png | Bin 0 -> 603 bytes LiteEditor/res/page_white_text.png | Bin 0 -> 342 bytes LiteEditor/res/paste.png | Bin 0 -> 1073 bytes LiteEditor/res/pictures.png | Bin 0 -> 704 bytes LiteEditor/res/plugin24.png | Bin 0 -> 1597 bytes LiteEditor/res/plugin_add.png | Bin 0 -> 691 bytes LiteEditor/res/previous.png | Bin 0 -> 1055 bytes LiteEditor/res/puzzle.jpg | Bin 0 -> 13835 bytes LiteEditor/res/puzzle.png | Bin 0 -> 62919 bytes LiteEditor/res/question_and_answer.png | Bin 0 -> 3129 bytes LiteEditor/res/redo.png | Bin 0 -> 1363 bytes LiteEditor/res/refresh.png | Bin 0 -> 1387 bytes LiteEditor/res/replace.png | Bin 0 -> 789 bytes LiteEditor/res/revert.png | Bin 0 -> 1351 bytes LiteEditor/res/save_all.png | Bin 0 -> 1428 bytes LiteEditor/res/save_as.png | Bin 0 -> 1264 bytes LiteEditor/res/search.png | Bin 0 -> 1042 bytes LiteEditor/res/signature.png | Bin 0 -> 962 bytes LiteEditor/res/stop.png | Bin 0 -> 1581 bytes LiteEditor/res/svn_repo.png | Bin 0 -> 3553 bytes LiteEditor/res/sym_wiz_bmp.png | Bin 0 -> 88800 bytes LiteEditor/res/text_tree.png | Bin 0 -> 650 bytes LiteEditor/res/threads.png | Bin 0 -> 683 bytes LiteEditor/res/typedef.xpm | 28 + LiteEditor/res/undo.png | Bin 0 -> 1395 bytes LiteEditor/res/watches.png | Bin 0 -> 681 bytes LiteEditor/res/wrap_arrow.png | Bin 0 -> 631 bytes LiteEditor/res/wx.png | Bin 0 -> 1241 bytes LiteEditor/res/wx24.png | Bin 0 -> 1455 bytes LiteEditor/res/wxproject.png | Bin 0 -> 6936 bytes LiteEditor/resource.h | 14 + LiteEditor/resources.cpp | 14038 ++++ LiteEditor/resources.xrc | 116 + LiteEditor/setters_getters_base_dlg.cpp | 132 + LiteEditor/setters_getters_base_dlg.h | 65 + LiteEditor/setters_getters_dlg.cpp | 229 + LiteEditor/setters_getters_dlg.h | 43 + LiteEditor/shell_window.cpp | 153 + LiteEditor/shell_window.h | 45 + LiteEditor/simpletable.cpp | 268 + LiteEditor/simpletable.h | 54 + LiteEditor/simpletablebase.cpp | 45 + LiteEditor/simpletablebase.h | 61 + LiteEditor/stack_walker.cpp | 26 + LiteEditor/stack_walker.h | 20 + LiteEditor/stdwx.h | 27 + LiteEditor/symbols_dialog.cpp | 118 + LiteEditor/symbols_dialog.h | 61 + LiteEditor/symbols_dialog_base.cpp | 54 + LiteEditor/symbols_dialog_base.h | 62 + LiteEditor/tags_options_dlg.cpp | 233 + LiteEditor/tags_options_dlg.h | 73 + LiteEditor/threadlistbasepanel.cpp | 25 + LiteEditor/threadlistbasepanel.h | 42 + LiteEditor/threadlistpanel.cpp | 63 + LiteEditor/threadlistpanel.h | 27 + LiteEditor/tiptree.cpp | 88 + LiteEditor/tiptree.h | 28 + LiteEditor/tree_symbol_page.cpp | 10 + LiteEditor/tree_symbol_page.h | 18 + LiteEditor/windowstack.cpp | 100 + LiteEditor/windowstack.h | 26 + LiteEditor/workspace_pane.cpp | 140 + LiteEditor/workspace_pane.h | 67 + MakefileParser/Makefile | 39 + MakefileParser/MakefileParser.workspace | 19 + MakefileParser/Parser.project | 46 + MakefileParser/input | 45 + MakefileParser/main.cpp | 85 + MakefileParser/variable.l | 68 + MakefileParser/variable.tab.h | 63 + MakefileParser/variable.y | 170 + Plugin/LineTypes.h | 37 + Plugin/MakefileParser.cpp | 93 + Plugin/MakefileParser.h | 36 + Plugin/Plugin.vcproj | 499 + Plugin/Target.cpp | 76 + Plugin/Target.h | 39 + Plugin/TargetLexer.cpp | 133 + Plugin/TargetLexer.h | 36 + Plugin/VariableLexer.cpp | 46 + Plugin/VariableLexer.h | 35 + Plugin/async_executable_cmd.cpp | 167 + Plugin/async_executable_cmd.h | 66 + Plugin/attribute_style.h | 83 + Plugin/build_config.cpp | 353 + Plugin/build_config.h | 161 + Plugin/build_settings_config.cpp | 151 + Plugin/build_settings_config.h | 97 + Plugin/build_system.cpp | 24 + Plugin/build_system.h | 38 + Plugin/builder.cpp | 63 + Plugin/builder.h | 116 + Plugin/builder_gnumake.cpp | 821 + Plugin/builder_gnumake.h | 56 + Plugin/buildmanager.cpp | 63 + Plugin/buildmanager.h | 60 + Plugin/clean_request.cpp | 60 + Plugin/clean_request.h | 42 + Plugin/compile_request.cpp | 88 + Plugin/compile_request.h | 38 + Plugin/compiler.cpp | 128 + Plugin/compiler.h | 82 + Plugin/compiler_action.cpp | 125 + Plugin/compiler_action.h | 73 + Plugin/configtool.cpp | 76 + Plugin/configtool.h | 28 + Plugin/configuration_mapping.cpp | 171 + Plugin/configuration_mapping.h | 84 + Plugin/configuration_object.h | 29 + Plugin/consolefinder.cp | 0 Plugin/consolefinder.cpp | 158 + Plugin/consolefinder.h | 36 + Plugin/debuggerconfigtool.cpp | 15 + Plugin/debuggerconfigtool.h | 13 + Plugin/debuggermanager.cpp | 275 + Plugin/debuggermanager.h | 116 + Plugin/debuggersettings.cpp | 60 + Plugin/debuggersettings.h | 49 + Plugin/dirpicker.cpp | 113 + Plugin/dirpicker.h | 69 + Plugin/dynamiclibrary.cpp | 72 + Plugin/dynamiclibrary.h | 24 + Plugin/editor_config.cpp | 419 + Plugin/editor_config.h | 221 + Plugin/envvar.cpp | 78 + Plugin/envvar.h | 88 + Plugin/exelocator.cpp | 27 + Plugin/exelocator.h | 17 + Plugin/file.xpm | 36 + Plugin/filepicker.cpp | 60 + Plugin/filepicker.h | 64 + Plugin/folder.xpm | 36 + Plugin/globals.cpp | 110 + Plugin/globals.h | 16 + Plugin/interactiveprocess.cpp | 83 + Plugin/interactiveprocess.h | 66 + Plugin/lexer_configuration.cpp | 126 + Plugin/lexer_configuration.h | 86 + Plugin/macros.h | 81 + Plugin/makefile | 81 + Plugin/open_type_dlg.cpp | 203 + Plugin/open_type_dlg.h | 50 + Plugin/optionsconfig.cpp | 56 + Plugin/optionsconfig.h | 77 + Plugin/pipedprocess.cpp | 125 + Plugin/pipedprocess.h | 52 + Plugin/plugin_sdk.project | 229 + Plugin/project.cpp | 392 + Plugin/project.h | 279 + Plugin/project_settings.cpp | 94 + Plugin/project_settings.h | 120 + Plugin/regex_processor.cpp | 25 + Plugin/regex_processor.h | 26 + Plugin/root.xpm | 36 + Plugin/search_thread.cpp | 347 + Plugin/search_thread.h | 325 + Plugin/sessionmanager.cpp | 111 + Plugin/sessionmanager.h | 59 + Plugin/splashscreen.cpp | 248 + Plugin/splashscreen.h | 87 + Plugin/sync_queue.cpp | 0 Plugin/sync_queue.h | 88 + Plugin/threebuttonbasedlg.cpp | 64 + Plugin/threebuttonbasedlg.h | 58 + Plugin/threebuttondlg.cpp | 25 + Plugin/threebuttondlg.h | 26 + Plugin/variable.tab.c | 1779 + Plugin/variable.tab.cpp | 1786 + Plugin/variable.tab.h | 63 + Plugin/variable.yy.c | 1798 + Plugin/variable.yy.cpp | 1798 + Plugin/vcimporter.cpp | 297 + Plugin/vcimporter.h | 45 + Plugin/virtualdirtreectrl.cpp | 704 + Plugin/virtualdirtreectrl.h | 493 + Plugin/volumelocatorthread.cpp | 38 + Plugin/volumelocatorthread.h | 27 + Plugin/winprocess.cpp | 238 + Plugin/winprocess.h | 45 + Plugin/workspace.cpp | 566 + Plugin/workspace.h | 247 + Plugin/xmlutils.cpp | 140 + Plugin/xmlutils.h | 82 + Runtime/Info.plist | 24 + Runtime/astyle.sample | 26 + Runtime/bin/ctags-le.exe | Bin 0 -> 163840 bytes Runtime/config/build_settings.xml | 40 + Runtime/config/debuggers.xml | 29 + Runtime/config/liteeditor.xml | 52 + Runtime/config/liteeditor.xml.sample | 37 + Runtime/ctags-pre-processor.txt | 12 + Runtime/icon.icns | Bin 0 -> 51121 bytes Runtime/images/help_earth.png | Bin 0 -> 861 bytes Runtime/images/splashscreen.png | Bin 0 -> 290293 bytes Runtime/index.html | 57 + Runtime/le_dos2unix.sh | 28 + Runtime/le_killproc.sh | 7 + Runtime/lexers/lexer_cpp.xml | 26 + Runtime/lexers/lexer_default.xml | 10 + Runtime/lexers/lexer_diff.xml | 16 + Runtime/lexers/lexer_java.xml | 26 + Runtime/lexers/lexer_lua.xml | 20 + Runtime/lexers/lexer_makefile.xml | 16 + Runtime/lexers/lexer_perl.xml | 41 + Runtime/lexers/lexer_xml.xml | 36 + Runtime/make_mac_bundle.sh | 29 + Runtime/rc/menu.xrc | 683 + Runtime/templates/app.cpp.wizard | 45 + Runtime/templates/app.h.wizard | 18 + .../dynamic-library-wx-enabled.project | 65 + Runtime/templates/dynamic-library.project | 37 + Runtime/templates/executable.project | 38 + Runtime/templates/liteeditor-plugin.project | 130 + .../liteeditor-plugin.project.wizard | 156 + Runtime/templates/main.cpp.wizard | 13 + Runtime/templates/mainframe.cpp.wizard | 64 + Runtime/templates/mainframe.h.wizard | 27 + Runtime/templates/plugin.cpp.wizard | 84 + Runtime/templates/plugin.h.wizard | 23 + .../static-library-wx-enabled.project | 65 + Runtime/templates/static-library.project | 37 + Runtime/templates/wxmain.project.wizard | 49 + Runtime/templates/wxproject.project.wizard | 54 + Subversion/Subversion.project | 160 + Subversion/Subversion.vcproj | 233 + Subversion/logindlg.cpp | 7 + Subversion/logindlg.h | 21 + Subversion/logindlgbase.cpp | 57 + Subversion/logindlgbase.h | 47 + Subversion/makefile | 86 + Subversion/subversion.cpp | 824 + Subversion/subversion.def | 3 + Subversion/subversion.h | 97 + Subversion/svnadditemsbasedlg.cpp | 59 + Subversion/svnadditemsbasedlg.h | 54 + Subversion/svnadditemsdlg.cpp | 101 + Subversion/svnadditemsdlg.h | 48 + Subversion/svnbasedlg.cpp | 35 + Subversion/svnbasedlg.h | 36 + Subversion/svndlg.cpp | 8 + Subversion/svndlg.h | 21 + Subversion/svndriver.cpp | 655 + Subversion/svndriver.h | 71 + Subversion/svnhandler.cpp | 155 + Subversion/svnhandler.h | 75 + Subversion/svnlogbasedlg.cpp | 67 + Subversion/svnlogbasedlg.h | 51 + Subversion/svnlogdlg.cpp | 8 + Subversion/svnlogdlg.h | 25 + Subversion/svnoptions.cpp | 27 + Subversion/svnoptions.h | 32 + Subversion/svnoptionsbasedlg.cpp | 86 + Subversion/svnoptionsbasedlg.h | 60 + Subversion/svnoptionsdlg.cpp | 43 + Subversion/svnoptionsdlg.h | 27 + Subversion/svnxmlparser.cpp | 58 + Subversion/svnxmlparser.h | 30 + change_log.txt | 44 + fakeroot/DEBIAN/control | 11 + formbuilder/AddIncludeFile.fbp | 809 + formbuilder/AttachDbgProcBaseDlg.fbp | 485 + formbuilder/BuildPage.fbp | 119 + formbuilder/DbgCommandBaseDlg.fbp | 528 + formbuilder/DebuggerSettings.fbp | 705 + formbuilder/NewIneritance.fbp | 570 + formbuilder/NewShortCutBaseDlg.fbp | 528 + formbuilder/NewWxProjectBaseDlg.fbp | 1062 + formbuilder/OpenTypeDlg.fbp | 270 + formbuilder/OpenWindowsPanelBase.fbp | 124 + formbuilder/PluginWizard_P1.fbp | 384 + formbuilder/PluginWizard_P2.fbp | 408 + formbuilder/QuickOutline.fbp | 186 + formbuilder/SvnOptionsBaseDlg.fbp | 649 + formbuilder/ThreadListBasePanel.fbp | 141 + formbuilder/ThreeButtonBaseDlg.fbp | 504 + formbuilder/add_dialog.fbp | 199 + formbuilder/advance_settings.fbp | 376 + formbuilder/breakpoint_dlg.fbp | 253 + formbuilder/close_all_dialog.fbp | 226 + formbuilder/codeformatterdlg.fbp | 1659 + formbuilder/compiler_page.fbp | 948 + formbuilder/configuration_manager.fbp | 374 + formbuilder/ctags.fbp | 157 + formbuilder/ctags_advance_page.fbp | 291 + formbuilder/debuggerpanel.fbp | 310 + formbuilder/depend_dlg_page.fbp | 186 + formbuilder/depends_dlg.fbp | 195 + formbuilder/edit_configuration.fbp | 264 + formbuilder/eidt_workspace_conf_dlg.fbp | 198 + formbuilder/envvar_dlg.fbp | 319 + formbuilder/envvar_table_dlg.fbp | 240 + formbuilder/eran1.txt | 0 formbuilder/ext_db_page1.fbp | 220 + formbuilder/ext_db_page2.fbp | 263 + formbuilder/ext_db_page3.fbp | 224 + formbuilder/fnb_customize_dlg.fbp | 157 + formbuilder/free_text)dialog.fbp | 199 + formbuilder/key_value_dlg.fbp | 214 + formbuilder/lexer_page.fbp | 141 + formbuilder/listctrlpanel.fbp | 141 + formbuilder/logindlg.fbp | 476 + formbuilder/move_func_impl.fbp | 430 + formbuilder/new_configuration.fbp | 307 + formbuilder/new_item_dlg.fbp | 329 + formbuilder/newclasswizard.fbp | 679 + formbuilder/newplugin.fbp | 92 + formbuilder/open_resource_dlg.fbp | 282 + formbuilder/options_dlg.fbp | 661 + formbuilder/progress_dialog.fbp | 186 + formbuilder/project_settings.fbp | 5205 ++ formbuilder/quickwatchdlg.fbp | 320 + formbuilder/results_dialog.fbp | 176 + formbuilder/setters_getters.fbp | 765 + formbuilder/simpletable.fbp | 236 + formbuilder/style_panel.fbp | 467 + formbuilder/svnadditemsbasedlg.fbp | 468 + formbuilder/svndlg.fbp | 182 + formbuilder/svnlogdlg.fbp | 590 + formbuilder/tags_options_base_dlg.fbp | 772 + gdbparser/Debug/test.h | 1 + gdbparser/gdb.l | 137 + gdbparser/gdb_lexer.cpp | 1796 + gdbparser/gdblexer.h | 22 + gdbparser/gdbparser.project | 58 + gdbparser/gdbparser.workspace | 13 + gdbparser/main.cpp | 59 + le_makerevision.sh | 12 + make_deb.sh | 42 + makefile | 323 + makefile.mac | 320 + sdk/astyle/bin/AStyle.exe | Bin 0 -> 106496 bytes sdk/astyle/build/AStyle.sln | 33 + sdk/astyle/build/AStyle.suo | Bin 0 -> 9720 bytes sdk/astyle/build/AStyle.vcproj | 369 + sdk/astyle/doc/astyle.html | 945 + sdk/astyle/doc/astyleX.html | 67 + sdk/astyle/doc/astyle_news.html | 229 + sdk/astyle/doc/astyle_notes.html | 875 + sdk/astyle/doc/index.html | 190 + sdk/astyle/doc/install.html | 252 + sdk/astyle/doc/license.html | 439 + sdk/astyle/src/ASBeautifier.cpp | 1933 + sdk/astyle/src/ASEnhancer.cpp | 483 + sdk/astyle/src/ASFormatter.cpp | 2197 + sdk/astyle/src/ASResource.cpp | 389 + sdk/astyle/src/astyle.h | 495 + sdk/astyle/src/astyle_main.cpp | 1138 + sdk/ctags/.mk_mvc.mak.swp | Bin 0 -> 12288 bytes sdk/ctags/COPYING | 340 + sdk/ctags/EXTENDING.html | 386 + sdk/ctags/FAQ | 371 + sdk/ctags/INSTALL.oth | 84 + sdk/ctags/Makefile.in | 221 + sdk/ctags/NEWS | 796 + sdk/ctags/README | 73 + sdk/ctags/argproc.c | 505 + sdk/ctags/args.c | 273 + sdk/ctags/args.h | 63 + sdk/ctags/asm.c | 388 + sdk/ctags/asp.c | 211 + sdk/ctags/awk.c | 81 + sdk/ctags/beta.c | 320 + sdk/ctags/build/ctags.cbp | 319 + sdk/ctags/c.c | 2850 + sdk/ctags/cobol.c | 50 + sdk/ctags/config.h.in | 274 + sdk/ctags/configure | 7413 ++ sdk/ctags/configure.in | 423 + sdk/ctags/ctags.1 | 1186 + sdk/ctags/ctags.h | 27 + sdk/ctags/ctags.html | 1354 + sdk/ctags/ctags.lsm | 19 + sdk/ctags/ctags.sln | 35 + sdk/ctags/ctags.vcproj | 331 + sdk/ctags/debug.c | 120 + sdk/ctags/debug.h | 71 + sdk/ctags/e_amiga.h | 24 + sdk/ctags/e_djgpp.h | 47 + sdk/ctags/e_mac.h | 143 + sdk/ctags/e_msoft.h | 75 + sdk/ctags/e_os2.h | 37 + sdk/ctags/e_qdos.h | 34 + sdk/ctags/e_riscos.h | 58 + sdk/ctags/e_vms.h | 31 + sdk/ctags/eiffel.c | 1319 + sdk/ctags/entry.c | 869 + sdk/ctags/entry.h | 105 + sdk/ctags/erlang.c | 189 + sdk/ctags/fortran.c | 2220 + sdk/ctags/general.h | 127 + sdk/ctags/get.c | 656 + sdk/ctags/get.h | 49 + sdk/ctags/html.c | 49 + sdk/ctags/jscript.c | 40 + sdk/ctags/keyword.c | 249 + sdk/ctags/keyword.h | 33 + sdk/ctags/lisp.c | 139 + sdk/ctags/lregex.c | 696 + sdk/ctags/lua.c | 133 + sdk/ctags/mac.c | 273 + sdk/ctags/main.c | 582 + sdk/ctags/main.h | 32 + sdk/ctags/make.c | 211 + sdk/ctags/mk_bc3.mak | 46 + sdk/ctags/mk_bc5.mak | 76 + sdk/ctags/mk_djg.mak | 18 + sdk/ctags/mk_manx.mak | 65 + sdk/ctags/mk_ming.mak | 26 + sdk/ctags/mk_mpw.mak | 130 + sdk/ctags/mk_mvc.mak | 61 + sdk/ctags/mk_os2.mak | 104 + sdk/ctags/mk_qdos.mak | 100 + sdk/ctags/mk_sas.mak | 63 + sdk/ctags/options.c | 1782 + sdk/ctags/options.h | 154 + sdk/ctags/parse.c | 678 + sdk/ctags/parse.h | 129 + sdk/ctags/parsers.h | 55 + sdk/ctags/pascal.c | 266 + sdk/ctags/perl.c | 213 + sdk/ctags/php.c | 171 + sdk/ctags/python.c | 223 + sdk/ctags/qdos.c | 106 + sdk/ctags/read.c | 581 + sdk/ctags/read.h | 115 + sdk/ctags/readtags.c | 958 + sdk/ctags/readtags.h | 252 + sdk/ctags/rexx.c | 39 + sdk/ctags/routines.c | 881 + sdk/ctags/routines.h | 132 + sdk/ctags/ruby.c | 398 + sdk/ctags/scheme.c | 111 + sdk/ctags/sh.c | 115 + sdk/ctags/slang.c | 41 + sdk/ctags/sml.c | 211 + sdk/ctags/sort.c | 234 + sdk/ctags/sort.h | 32 + sdk/ctags/source.mak | 103 + sdk/ctags/sql.c | 687 + sdk/ctags/strlist.c | 281 + sdk/ctags/strlist.h | 54 + sdk/ctags/tcl.c | 116 + sdk/ctags/verilog.c | 335 + sdk/ctags/vim.c | 178 + sdk/ctags/vstring.c | 232 + sdk/ctags/vstring.h | 84 + sdk/ctags/yacc.c | 40 + sdk/src/which/which-2.16-4-src.zip | Bin 0 -> 209019 bytes sdk/wxconfig/INSTALL.txt | 31 + sdk/wxconfig/README.txt | 77 + sdk/wxconfig/wx-config-win.cbp | 63 + sdk/wxconfig/wx-config-win.cpp | 2608 + sdk/wxconfig/wx-config.exe | Bin 0 -> 319488 bytes sdk/wxflatnotebook/README | 168 + .../build/wxFlatNotebook/Makefile.win | 31 + .../build/wxFlatNotebook/genFlatLib.bat | 1 + .../build/wxFlatNotebook/genFlatTst.bat | 1 + .../wxFlatNotebook/libwxFlatNotebook.dev | 69 + .../wxFlatNotebook/libwxFlatNotebook.layout | 12 + .../build/wxFlatNotebook/makefile | 94 + .../build/wxFlatNotebook/makefile.bcc | 260 + .../build/wxFlatNotebook/makefile.vc | 319 + .../build/wxFlatNotebook/wxFlatNotebook.bkl | 33 + .../build/wxFlatNotebook/wxFlatNotebook.sln | 53 + .../wxFlatNotebook/wxFlatNotebook.vcproj | 228 + .../docs/wxFlatNotebook/Doxyfile | 258 + .../wx/wxFlatNotebook/fnb_customize_dlg.h | 50 + .../include/wx/wxFlatNotebook/fnb_resources.h | 41 + .../include/wx/wxFlatNotebook/fnb_singleton.h | 68 + .../include/wx/wxFlatNotebook/fnb_smart_ptr.h | 215 + .../include/wx/wxFlatNotebook/popup_dlg.h | 58 + .../include/wx/wxFlatNotebook/renderer.h | 221 + .../wx/wxFlatNotebook/wxFNBDropTarget.h | 161 + .../wx/wxFlatNotebook/wxFlatNotebook.h | 959 + .../include/wx/wxFlatNotebook/xh_fnb.h | 41 + .../samples/wxFlatNotebook/App.cpp | 57 + .../samples/wxFlatNotebook/App.h | 13 + .../samples/wxFlatNotebook/Frame.cpp | 789 + .../samples/wxFlatNotebook/Frame.h | 81 + .../samples/wxFlatNotebook/Makefile.win | 36 + .../samples/wxFlatNotebook/book_blue.png | Bin 0 -> 833 bytes .../samples/wxFlatNotebook/book_green.png | Bin 0 -> 840 bytes .../samples/wxFlatNotebook/book_red.png | Bin 0 -> 847 bytes .../samples/wxFlatNotebook/icons/app.xpm | 279 + .../samples/wxFlatNotebook/icons/help.xpm | 279 + .../samples/wxFlatNotebook/icons/icon.bmp | Bin 0 -> 822 bytes .../samples/wxFlatNotebook/makefile.gcc | 36 + .../samples/wxFlatNotebook/resources.cpp | 236 + .../wxFlatNotebook/wxFlatNotebookTest.dev | 99 + .../wxFlatNotebook/wxFlatNotebookTest.layout | 38 + .../wxFlatNotebook/wxFlatNotebookTest.vcproj | 765 + .../src/wxFlatNotebook/fnb_customize_dlg.cpp | 359 + .../src/wxFlatNotebook/fnb_resources.cpp | 924 + .../src/wxFlatNotebook/popup_dlg.cpp | 226 + .../src/wxFlatNotebook/renderer.cpp | 1691 + .../src/wxFlatNotebook/wxFlatNotebook.cpp | 1788 + .../src/wxFlatNotebook/xh_fnb.cpp | 132 + sdk/wxflatnotebook/wxflatnotebook.project | 109 + sdk/wxscintilla/Readme | 13 + sdk/wxscintilla/build/BuildInfo.txt | 61 + sdk/wxscintilla/build/Makefile | 170 + sdk/wxscintilla/build/wxscintilla.cbp | 702 + sdk/wxscintilla/build/wxscintilla.dsp | 710 + sdk/wxscintilla/build/wxscintilla.dsw | 15 + sdk/wxscintilla/build/wxscintilla.vcproj | 5431 ++ sdk/wxscintilla/include/wx/wxscintilla.h | 3698 + sdk/wxscintilla/src/PlatWX.cpp | 1540 + sdk/wxscintilla/src/PlatWX.h | 14 + sdk/wxscintilla/src/ScintillaWX.cpp | 1179 + sdk/wxscintilla/src/ScintillaWX.h | 211 + sdk/wxscintilla/src/gtkstring.h | 39 + sdk/wxscintilla/src/scintilla/License.txt | 20 + sdk/wxscintilla/src/scintilla/README.txt | 5 + .../src/scintilla/include/Accessor.h | 79 + sdk/wxscintilla/src/scintilla/include/Face.py | 107 + .../src/scintilla/include/HFacer.py | 76 + .../src/scintilla/include/KeyWords.h | 90 + .../src/scintilla/include/Platform.h | 554 + .../src/scintilla/include/PropSet.h | 121 + .../src/scintilla/include/SString.h | 289 + .../src/scintilla/include/SciLexer.h | 1165 + .../src/scintilla/include/Scintilla.h | 834 + .../src/scintilla/include/Scintilla.iface | 3234 + .../src/scintilla/include/ScintillaWidget.h | 59 + .../src/scintilla/include/WindowAccessor.h | 66 + .../src/scintilla/src/AutoComplete.cxx | 178 + .../src/scintilla/src/AutoComplete.h | 78 + sdk/wxscintilla/src/scintilla/src/CallTip.cxx | 329 + sdk/wxscintilla/src/scintilla/src/CallTip.h | 87 + .../src/scintilla/src/CellBuffer.cxx | 918 + .../src/scintilla/src/CellBuffer.h | 239 + .../src/scintilla/src/CharClassify.cxx | 43 + .../src/scintilla/src/CharClassify.h | 25 + .../src/scintilla/src/CharacterSet.h | 58 + .../src/scintilla/src/ContractionState.cxx | 293 + .../src/scintilla/src/ContractionState.h | 73 + .../src/scintilla/src/Decoration.cxx | 188 + .../src/scintilla/src/Decoration.h | 64 + .../src/scintilla/src/Document.cxx | 1580 + sdk/wxscintilla/src/scintilla/src/Document.h | 316 + .../src/scintilla/src/DocumentAccessor.cxx | 200 + .../src/scintilla/src/DocumentAccessor.h | 76 + sdk/wxscintilla/src/scintilla/src/Editor.cxx | 7412 ++ sdk/wxscintilla/src/scintilla/src/Editor.h | 511 + .../src/scintilla/src/ExternalLexer.cxx | 263 + .../src/scintilla/src/ExternalLexer.h | 103 + .../src/scintilla/src/Indicator.cxx | 81 + sdk/wxscintilla/src/scintilla/src/Indicator.h | 31 + sdk/wxscintilla/src/scintilla/src/KeyMap.cxx | 152 + sdk/wxscintilla/src/scintilla/src/KeyMap.h | 51 + .../src/scintilla/src/KeyWords.cxx | 230 + sdk/wxscintilla/src/scintilla/src/LexAPDL.cxx | 139 + sdk/wxscintilla/src/scintilla/src/LexAU3.cxx | 898 + sdk/wxscintilla/src/scintilla/src/LexAVE.cxx | 228 + sdk/wxscintilla/src/scintilla/src/LexAda.cxx | 524 + sdk/wxscintilla/src/scintilla/src/LexAsm.cxx | 180 + sdk/wxscintilla/src/scintilla/src/LexAsn1.cxx | 185 + sdk/wxscintilla/src/scintilla/src/LexBaan.cxx | 193 + sdk/wxscintilla/src/scintilla/src/LexBash.cxx | 668 + .../src/scintilla/src/LexBasic.cxx | 373 + .../src/scintilla/src/LexBullant.cxx | 228 + sdk/wxscintilla/src/scintilla/src/LexCLW.cxx | 679 + sdk/wxscintilla/src/scintilla/src/LexCPP.cxx | 450 + sdk/wxscintilla/src/scintilla/src/LexCSS.cxx | 307 + sdk/wxscintilla/src/scintilla/src/LexCaml.cxx | 403 + .../src/scintilla/src/LexCmake.cxx | 456 + sdk/wxscintilla/src/scintilla/src/LexConf.cxx | 188 + .../src/scintilla/src/LexCrontab.cxx | 222 + .../src/scintilla/src/LexCsound.cxx | 210 + sdk/wxscintilla/src/scintilla/src/LexD.cxx | 358 + .../src/scintilla/src/LexEScript.cxx | 273 + .../src/scintilla/src/LexEiffel.cxx | 238 + .../src/scintilla/src/LexErlang.cxx | 526 + .../src/scintilla/src/LexFlagship.cxx | 230 + .../src/scintilla/src/LexForth.cxx | 352 + .../src/scintilla/src/LexFortran.cxx | 457 + sdk/wxscintilla/src/scintilla/src/LexGAP.cxx | 263 + sdk/wxscintilla/src/scintilla/src/LexGen.py | 244 + .../src/scintilla/src/LexGui4Cli.cxx | 313 + sdk/wxscintilla/src/scintilla/src/LexHTML.cxx | 2068 + .../src/scintilla/src/LexHaskell.cxx | 267 + sdk/wxscintilla/src/scintilla/src/LexInno.cxx | 294 + sdk/wxscintilla/src/scintilla/src/LexKix.cxx | 126 + sdk/wxscintilla/src/scintilla/src/LexLisp.cxx | 279 + sdk/wxscintilla/src/scintilla/src/LexLout.cxx | 212 + sdk/wxscintilla/src/scintilla/src/LexLua.cxx | 362 + .../src/scintilla/src/LexMMIXAL.cxx | 186 + sdk/wxscintilla/src/scintilla/src/LexMPT.cxx | 186 + .../src/scintilla/src/LexMSSQL.cxx | 363 + .../src/scintilla/src/LexMatlab.cxx | 236 + .../src/scintilla/src/LexMetapost.cxx | 324 + sdk/wxscintilla/src/scintilla/src/LexNsis.cxx | 654 + sdk/wxscintilla/src/scintilla/src/LexOpal.cxx | 522 + .../src/scintilla/src/LexOthers.cxx | 1162 + sdk/wxscintilla/src/scintilla/src/LexPB.cxx | 362 + sdk/wxscintilla/src/scintilla/src/LexPLM.cxx | 198 + sdk/wxscintilla/src/scintilla/src/LexPOV.cxx | 316 + sdk/wxscintilla/src/scintilla/src/LexPS.cxx | 347 + .../src/scintilla/src/LexPascal.cxx | 373 + sdk/wxscintilla/src/scintilla/src/LexPerl.cxx | 1260 + .../src/scintilla/src/LexProgress.cxx | 271 + .../src/scintilla/src/LexPython.cxx | 463 + .../src/scintilla/src/LexRebol.cxx | 322 + sdk/wxscintilla/src/scintilla/src/LexRuby.cxx | 1714 + sdk/wxscintilla/src/scintilla/src/LexSQL.cxx | 346 + .../src/scintilla/src/LexScriptol.cxx | 408 + .../src/scintilla/src/LexSmalltalk.cxx | 321 + .../src/scintilla/src/LexSpecman.cxx | 289 + .../src/scintilla/src/LexSpice.cxx | 225 + .../src/scintilla/src/LexTADS3.cxx | 904 + sdk/wxscintilla/src/scintilla/src/LexTCL.cxx | 366 + sdk/wxscintilla/src/scintilla/src/LexTeX.cxx | 292 + sdk/wxscintilla/src/scintilla/src/LexVB.cxx | 282 + sdk/wxscintilla/src/scintilla/src/LexVHDL.cxx | 477 + .../src/scintilla/src/LexVerilog.cxx | 303 + sdk/wxscintilla/src/scintilla/src/LexYAML.cxx | 309 + .../src/scintilla/src/LineMarker.cxx | 305 + .../src/scintilla/src/LineMarker.h | 62 + .../src/scintilla/src/Partitioning.h | 184 + .../src/scintilla/src/PositionCache.cxx | 590 + .../src/scintilla/src/PositionCache.h | 162 + sdk/wxscintilla/src/scintilla/src/PropSet.cxx | 1177 + .../src/scintilla/src/RESearch.cxx | 980 + sdk/wxscintilla/src/scintilla/src/RESearch.h | 75 + .../src/scintilla/src/RunStyles.cxx | 211 + sdk/wxscintilla/src/scintilla/src/RunStyles.h | 40 + sdk/wxscintilla/src/scintilla/src/SVector.h | 135 + .../src/scintilla/src/SciTE.properties | 6 + .../src/scintilla/src/ScintillaBase.cxx | 736 + .../src/scintilla/src/ScintillaBase.h | 107 + .../src/scintilla/src/SplitVector.h | 235 + sdk/wxscintilla/src/scintilla/src/Style.cxx | 158 + sdk/wxscintilla/src/scintilla/src/Style.h | 64 + .../src/scintilla/src/StyleContext.cxx | 55 + .../src/scintilla/src/StyleContext.h | 179 + .../src/scintilla/src/UniConversion.cxx | 173 + .../src/scintilla/src/UniConversion.h | 16 + .../src/scintilla/src/ViewStyle.cxx | 326 + sdk/wxscintilla/src/scintilla/src/ViewStyle.h | 119 + .../src/scintilla/src/WindowAccessor.cxx | 191 + sdk/wxscintilla/src/scintilla/src/XPM.cxx | 326 + sdk/wxscintilla/src/scintilla/src/XPM.h | 80 + sdk/wxscintilla/src/wxscintilla.cpp | 3351 + sdk/wxscintilla/wxscintilla.project | 250 + sdk/wxsqlite3/Makefile.in | 321 + sdk/wxsqlite3/Readme.txt | 206 + sdk/wxsqlite3/build/Bakefiles.bkgen | 25 + sdk/wxsqlite3/build/aclocal.m4 | 1816 + sdk/wxsqlite3/build/acregen.sh | 47 + sdk/wxsqlite3/build/autoconf_inc.m4 | 224 + sdk/wxsqlite3/build/config.guess | 1497 + sdk/wxsqlite3/build/config.sub | 1608 + sdk/wxsqlite3/build/configure.ac | 123 + sdk/wxsqlite3/build/install.sh | 2 + sdk/wxsqlite3/build/makefile.bcc | 413 + sdk/wxsqlite3/build/makefile.gcc | 406 + sdk/wxsqlite3/build/makefile.vc | 405 + sdk/wxsqlite3/build/makefile.wat | 459 + sdk/wxsqlite3/build/wxsqlite3.bkl | 141 + sdk/wxsqlite3/build/wxsqlite3.dsw | 31 + sdk/wxsqlite3/build/wxsqlite3_minimal.dsp | 447 + sdk/wxsqlite3/build/wxsqlite3_wxsqlite3.cbp | 77 + sdk/wxsqlite3/build/wxsqlite3_wxsqlite3.dsp | 517 + .../build/wxsqlite3_wxsqlite3.vcproj | 1143 + sdk/wxsqlite3/configure | 8050 ++ sdk/wxsqlite3/docs/Doxyfile | 262 + sdk/wxsqlite3/include/wx/wxsqlite3.h | 1673 + sdk/wxsqlite3/include/wx/wxsqlite3def.h | 178 + sdk/wxsqlite3/include/wx/wxsqlite3dyn.h | 139 + sdk/wxsqlite3/include/wx/wxsqlite3opt.h | 44 + sdk/wxsqlite3/samples/minimal.cpp | 430 + sdk/wxsqlite3/samples/minimal.rc | 3 + sdk/wxsqlite3/samples/sample.ico | Bin 0 -> 1078 bytes sdk/wxsqlite3/sqlite3/Readme.txt | 2 + sdk/wxsqlite3/sqlite3/include/sqlite3.h | 1872 + sdk/wxsqlite3/sqlite3/lib/sqlite3.def | 121 + sdk/wxsqlite3/sqlite3/lib/sqlite3.dll | Bin 0 -> 386464 bytes sdk/wxsqlite3/sqlite3/lib/sqlite3.exp | Bin 0 -> 16742 bytes sdk/wxsqlite3/sqlite3/lib/sqlite3.lib | Bin 0 -> 29172 bytes sdk/wxsqlite3/sqlite3/meta/sqlite3.def | 128 + sdk/wxsqlite3/sqlite3/meta/sqlite3.dll | Bin 0 -> 266240 bytes sdk/wxsqlite3/sqlite3/meta/sqlite3.exp | Bin 0 -> 20539 bytes sdk/wxsqlite3/sqlite3/meta/sqlite3.lib | Bin 0 -> 31050 bytes sdk/wxsqlite3/sqlite3/secure/sqlite3.def | 130 + sdk/wxsqlite3/sqlite3/secure/sqlite3.dll | Bin 0 -> 286720 bytes sdk/wxsqlite3/sqlite3/secure/sqlite3.exp | Bin 0 -> 20791 bytes sdk/wxsqlite3/sqlite3/secure/sqlite3.lib | Bin 0 -> 31432 bytes .../sqlite3/secure/src/codec/codec.cpp | 591 + .../sqlite3/secure/src/codec/codec.h | 94 + .../sqlite3/secure/src/codec/codecext.cpp | 255 + .../sqlite3/secure/src/codec/rijndael.cpp | 1616 + .../sqlite3/secure/src/codec/rijndael.h | 171 + .../sqlite3/secure/src/pager/pager-3.3.1.c | 3850 + .../secure/src/pager/pager-3.3.10-12.c | 3940 + .../sqlite3/secure/src/pager/pager-3.3.2.c | 3823 + .../sqlite3/secure/src/pager/pager-3.3.3.c | 3821 + .../sqlite3/secure/src/pager/pager-3.3.4.c | 3823 + .../sqlite3/secure/src/pager/pager-3.3.5.c | 3810 + .../sqlite3/secure/src/pager/pager-3.3.6.c | 3870 + .../sqlite3/secure/src/pager/pager-3.3.7.c | 3950 + .../sqlite3/secure/src/pager/pager-3.3.8.c | 3956 + .../sqlite3/secure/src/pager/pager-3.3.9.c | 3940 + sdk/wxsqlite3/src/wxsqlite3.cpp | 2381 + sdk/wxsqlite3/wxsqlite3.project | 105 + site/docs.html | 32 + site/docs/CodeLite_Overview.html | 222 + .../dpj54wd_36fjr83zvj.png | Bin 0 -> 55643 bytes .../dpj54wd_27f63kxfg5.png | Bin 0 -> 25220 bytes .../dpj54wd_28gvgzg2fn.png | Bin 0 -> 13198 bytes .../dpj54wd_29dd7trrt3.png | Bin 0 -> 11686 bytes .../dpj54wd_30dsw5qdhh.png | Bin 0 -> 24397 bytes .../dpj54wd_31hfs429c2.png | Bin 0 -> 10305 bytes .../dpj54wd_32ph2pq9hd.png | Bin 0 -> 21075 bytes .../dpj54wd_33cq5mxfp2.png | Bin 0 -> 13283 bytes .../dpj54wd_346qds5rgx.png | Bin 0 -> 20952 bytes site/docs/quick_overview.html | 320 + site/download.html | 66 + site/faq.html | 231 + site/images/arrow.png | Bin 0 -> 395 bytes site/images/auto_comp_one.png | Bin 0 -> 90609 bytes site/images/build_dialog.png | Bin 0 -> 23392 bytes site/images/check.png | Bin 0 -> 922 bytes site/images/doxy_menu.png | Bin 0 -> 7636 bytes site/images/editor_general.png | Bin 0 -> 128824 bytes site/images/find_symbol_dialog.png | Bin 0 -> 19396 bytes site/images/function_tip_with_comment.png | Bin 0 -> 77226 bytes site/images/open_resource_dlg.png | Bin 0 -> 9316 bytes site/images/open_type_dlg.png | Bin 0 -> 7572 bytes site/images/options.png | Bin 0 -> 27982 bytes site/images/outline_view.png | Bin 0 -> 38082 bytes site/images/setters_getters_dlg.png | Bin 0 -> 32383 bytes site/images/site_bg.png | Bin 0 -> 153212 bytes site/images/thumbs/auto_comp_one.png | Bin 0 -> 24278 bytes site/images/thumbs/build_dialog.png | Bin 0 -> 11615 bytes site/images/thumbs/doxy_menu.png | Bin 0 -> 17562 bytes site/images/thumbs/editor_general.png | Bin 0 -> 24417 bytes site/images/thumbs/find_symbol_dialog.png | Bin 0 -> 16950 bytes .../thumbs/function_tip_with_comment.png | Bin 0 -> 23804 bytes site/images/thumbs/open_resource_dlg.png | Bin 0 -> 6290 bytes site/images/thumbs/open_type_dlg.png | Bin 0 -> 8045 bytes site/images/thumbs/options.png | Bin 0 -> 11660 bytes site/images/thumbs/outline_view.png | Bin 0 -> 30156 bytes site/images/thumbs/setters_getters_dlg.png | Bin 0 -> 12280 bytes site/index.html | 75 + site/main_style.css | 151 + site/screenshots.html | 104 + sqlite3/sqlite3.c | 67480 ++++++++++++++++ sqlite3/sqlite3.h | 2679 + sqlite3/sqlite3.project | 30 + 1179 files changed, 426610 insertions(+) create mode 100644 AutoRevision/AutoRevision.workspace create mode 100644 AutoRevision/autorev/autorev.project create mode 100644 AutoRevision/autorev/main.cpp create mode 100644 BuildInfo.txt create mode 100644 CC_TODO.TXT create mode 100644 CodeFormatter/ASBeautifier.cpp create mode 100644 CodeFormatter/ASEnhancer.cpp create mode 100644 CodeFormatter/ASFormatter.cpp create mode 100644 CodeFormatter/ASResource.cpp create mode 100644 CodeFormatter/CodeFormatter.project create mode 100644 CodeFormatter/CodeFormatter.vcproj create mode 100644 CodeFormatter/astyle.h create mode 100644 CodeFormatter/astyle_main.cpp create mode 100644 CodeFormatter/codeforammaterbasedlg.cpp create mode 100644 CodeFormatter/codeforammaterbasedlg.h create mode 100644 CodeFormatter/codeformatter.cpp create mode 100644 CodeFormatter/codeformatter.h create mode 100644 CodeFormatter/codeformatterdlg.cpp create mode 100644 CodeFormatter/codeformatterdlg.h create mode 100644 CodeFormatter/codeformatterdll.def create mode 100644 CodeFormatter/formatoptions.cpp create mode 100644 CodeFormatter/formatoptions.h create mode 100644 CodeFormatter/makefile create mode 100644 CodeLite.sln create mode 100644 CodeLite/CodeLite.cbp create mode 100644 CodeLite/CodeLite.project create mode 100644 CodeLite/CodeLite.vcproj create mode 100644 CodeLite/DoxySMain.page create mode 100644 CodeLite/FlexLexer.h create mode 100644 CodeLite/archive.cpp create mode 100644 CodeLite/archive.h create mode 100644 CodeLite/calltip.cpp create mode 100644 CodeLite/calltip.h create mode 100644 CodeLite/cl_process.cpp create mode 100644 CodeLite/cl_process.h create mode 100644 CodeLite/comment.cpp create mode 100644 CodeLite/comment.h create mode 100644 CodeLite/comment_creator.h create mode 100644 CodeLite/cpp5.l create mode 100644 CodeLite/cpp_comment_creator.cpp create mode 100644 CodeLite/cpp_comment_creator.h create mode 100644 CodeLite/cpp_expr_lexer.cpp create mode 100644 CodeLite/cpp_expr_parser.cpp create mode 100644 CodeLite/cpp_func_parser.cpp create mode 100644 CodeLite/cpp_lexer.cpp create mode 100644 CodeLite/cpp_lexer.h create mode 100644 CodeLite/cpp_scanner.cpp create mode 100644 CodeLite/cpp_scanner.h create mode 100644 CodeLite/ctags_manager.cpp create mode 100644 CodeLite/ctags_manager.h create mode 100644 CodeLite/db_record.h create mode 100644 CodeLite/dirsaver.h create mode 100644 CodeLite/dirtraverser.cpp create mode 100644 CodeLite/dirtraverser.h create mode 100644 CodeLite/docs/DoxySfile create mode 100644 CodeLite/docs/build-docs.bat create mode 100644 CodeLite/entry.cpp create mode 100644 CodeLite/entry.h create mode 100644 CodeLite/expression_result.cpp create mode 100644 CodeLite/expression_result.h create mode 100644 CodeLite/extdbdata.h create mode 100644 CodeLite/fileutils.cpp create mode 100644 CodeLite/fileutils.h create mode 100644 CodeLite/function.cpp create mode 100644 CodeLite/function.h create mode 100644 CodeLite/language.cpp create mode 100644 CodeLite/language.h create mode 100644 CodeLite/lex.yy.cpp create mode 100644 CodeLite/parse_thread.cpp create mode 100644 CodeLite/parse_thread.h create mode 100644 CodeLite/precompiled_header.h create mode 100644 CodeLite/procutils.cpp create mode 100644 CodeLite/procutils.h create mode 100644 CodeLite/progress_dialog.cpp create mode 100644 CodeLite/progress_dialog.h create mode 100644 CodeLite/readtags.cpp create mode 100644 CodeLite/readtags.h create mode 100644 CodeLite/scope_parser.cpp create mode 100644 CodeLite/serialized_object.h create mode 100644 CodeLite/setters_getters_data.cpp create mode 100644 CodeLite/setters_getters_data.h create mode 100644 CodeLite/singleton.h create mode 100644 CodeLite/smart_ptr.h create mode 100644 CodeLite/symbol_tree.cpp create mode 100644 CodeLite/symbol_tree.h create mode 100644 CodeLite/tag_tree.cpp create mode 100644 CodeLite/tag_tree.h create mode 100644 CodeLite/tags_database.cpp create mode 100644 CodeLite/tags_database.h create mode 100644 CodeLite/tags_options_data.cpp create mode 100644 CodeLite/tags_options_data.h create mode 100644 CodeLite/tokenizer.cpp create mode 100644 CodeLite/tokenizer.h create mode 100644 CodeLite/tree.h create mode 100644 CodeLite/tree_node.h create mode 100644 CodeLite/unistd.h create mode 100644 CodeLite/var_parser.cpp create mode 100644 CodeLite/variable.cpp create mode 100644 CodeLite/variable.h create mode 100644 CodeLite/variable_entry.cpp create mode 100644 CodeLite/variable_entry.h create mode 100644 CodeLite/worker_thread.cpp create mode 100644 CodeLite/worker_thread.h create mode 100644 CodeLite/y.tab.h create mode 100644 CxxParser/CxxParser.workspace create mode 100644 CxxParser/Debug/test.h create mode 100644 CxxParser/Parser.project create mode 100644 CxxParser/Release/test.h create mode 100644 CxxParser/TODO.TXT create mode 100644 CxxParser/cpp.l create mode 100644 CxxParser/cpp5_grammar.y.full create mode 100644 CxxParser/cpp_expr_lexer.cpp create mode 100644 CxxParser/cpp_expr_parser.cpp create mode 100644 CxxParser/cpp_func_parser.cpp create mode 100644 CxxParser/cpp_func_parser.y create mode 100644 CxxParser/cpp_lexer.cpp create mode 100644 CxxParser/cpp_lexer.h create mode 100644 CxxParser/cpp_scope_grammar.y create mode 100644 CxxParser/cpp_variables_grammar.y create mode 100644 CxxParser/expr_grammar.y create mode 100644 CxxParser/expr_lexer.l create mode 100644 CxxParser/expression_result.cpp create mode 100644 CxxParser/expression_result.h create mode 100644 CxxParser/function.cpp create mode 100644 CxxParser/function.h create mode 100644 CxxParser/main.cpp create mode 100644 CxxParser/scope_parser.cpp create mode 100644 CxxParser/var_parser.cpp create mode 100644 CxxParser/variable.cpp create mode 100644 CxxParser/variable.h create mode 100644 Debugger/Debugger.vcproj create mode 100644 Debugger/DebuggerGDB.project create mode 100644 Debugger/dbgcmd.cpp create mode 100644 Debugger/dbgcmd.h create mode 100644 Debugger/debuggerdll.def create mode 100644 Debugger/debuggergdb.cpp create mode 100644 Debugger/debuggergdb.h create mode 100644 Debugger/dirkeeper.h create mode 100644 Debugger/gdb_lexer.cpp create mode 100644 Debugger/gdbinfolexer.cpp create mode 100644 Debugger/gdbinfolexer.h create mode 100644 Debugger/gdblexer.h create mode 100644 Debugger/makefile create mode 100644 Gizmos/Gizmos.project create mode 100644 Gizmos/gizmos.cpp create mode 100644 Gizmos/gizmos.h create mode 100644 Gizmos/makefile create mode 100644 Gizmos/new_class.png create mode 100644 Gizmos/newclassbasedlg.cpp create mode 100644 Gizmos/newclassbasedlg.h create mode 100644 Gizmos/newclassdlg.cpp create mode 100644 Gizmos/newclassdlg.h create mode 100644 Gizmos/newinheritancebasedlg.cpp create mode 100644 Gizmos/newinheritancebasedlg.h create mode 100644 Gizmos/newinheritancedlg.cpp create mode 100644 Gizmos/newinheritancedlg.h create mode 100644 Gizmos/newwxprojectbasedlg.cpp create mode 100644 Gizmos/newwxprojectbasedlg.h create mode 100644 Gizmos/newwxprojectdlg.cpp create mode 100644 Gizmos/newwxprojectdlg.h create mode 100644 Gizmos/newwxprojectinfo.cpp create mode 100644 Gizmos/newwxprojectinfo.h create mode 100644 Gizmos/plugindata.cpp create mode 100644 Gizmos/plugindata.h create mode 100644 Gizmos/pluginwizard.cpp create mode 100644 Gizmos/pluginwizard.h create mode 100644 Gizmos/pluginwizard_pag2.cpp create mode 100644 Gizmos/pluginwizard_pag2.h create mode 100644 Gizmos/pluginwizard_page1.cpp create mode 100644 Gizmos/pluginwizard_page1.h create mode 100644 InnoSetup/box_software.ico create mode 100644 InnoSetup/license.txt create mode 100644 InnoSetup/lite_editor.iss create mode 100644 Interfaces/Interfaces.project create mode 100644 Interfaces/Interfaces.vcproj create mode 100644 Interfaces/debugger.h create mode 100644 Interfaces/debuggerobserver.h create mode 100644 Interfaces/iconfigtool.h create mode 100644 Interfaces/ieditor.h create mode 100644 Interfaces/imanager.h create mode 100644 Interfaces/plugin.h create mode 100644 LiteEditor.workspace create mode 100644 LiteEditor/LiteEditor.cbp create mode 100644 LiteEditor/LiteEditor.project create mode 100644 LiteEditor/LiteEditor.vcproj create mode 100644 LiteEditor/add_option_dialog.cpp create mode 100644 LiteEditor/add_option_dialog.h create mode 100644 LiteEditor/addincludefiledlg.cpp create mode 100644 LiteEditor/addincludefiledlg.h create mode 100644 LiteEditor/addincludefiledlgbase.cpp create mode 100644 LiteEditor/addincludefiledlgbase.h create mode 100644 LiteEditor/advanced_settings.cpp create mode 100644 LiteEditor/advanced_settings.h create mode 100644 LiteEditor/app.cpp create mode 100644 LiteEditor/app.h create mode 100644 LiteEditor/attachdbgprocbasedlg.cpp create mode 100644 LiteEditor/attachdbgprocbasedlg.h create mode 100644 LiteEditor/attachdbgprocdlg.cpp create mode 100644 LiteEditor/attachdbgprocdlg.h create mode 100644 LiteEditor/autorev.exe create mode 100644 LiteEditor/breakpoint_dlg_base.cpp create mode 100644 LiteEditor/breakpoint_dlg_base.h create mode 100644 LiteEditor/breakpointdlg.cpp create mode 100644 LiteEditor/breakpointdlg.h create mode 100644 LiteEditor/browse_record.h create mode 100644 LiteEditor/build_page.cpp create mode 100644 LiteEditor/build_page.h create mode 100644 LiteEditor/checkdirtreectrl.cpp create mode 100644 LiteEditor/checkdirtreectrl.h create mode 100644 LiteEditor/checktreectrl.cpp create mode 100644 LiteEditor/checktreectrl.h create mode 100644 LiteEditor/close_all_dlg.cpp create mode 100644 LiteEditor/close_all_dlg.h create mode 100644 LiteEditor/code_parser.rc create mode 100644 LiteEditor/compiler_page.cpp create mode 100644 LiteEditor/compiler_page.h create mode 100644 LiteEditor/configuration_manager_base_dlg.cpp create mode 100644 LiteEditor/configuration_manager_base_dlg.h create mode 100644 LiteEditor/configuration_manager_dlg.cpp create mode 100644 LiteEditor/configuration_manager_dlg.h create mode 100644 LiteEditor/context_base.cpp create mode 100644 LiteEditor/context_base.h create mode 100644 LiteEditor/context_cpp.cpp create mode 100644 LiteEditor/context_cpp.h create mode 100644 LiteEditor/context_manager.cpp create mode 100644 LiteEditor/context_manager.h create mode 100644 LiteEditor/context_text.cpp create mode 100644 LiteEditor/context_text.h create mode 100644 LiteEditor/cpp_symbol_tree.cpp create mode 100644 LiteEditor/cpp_symbol_tree.h create mode 100644 LiteEditor/dbgcommandbasedlg.cpp create mode 100644 LiteEditor/dbgcommandbasedlg.h create mode 100644 LiteEditor/dbgcommanddlg.cpp create mode 100644 LiteEditor/dbgcommanddlg.h create mode 100644 LiteEditor/debuggerpane.cpp create mode 100644 LiteEditor/debuggerpane.h create mode 100644 LiteEditor/debuggersettingsbasedlg.cpp create mode 100644 LiteEditor/debuggersettingsbasedlg.h create mode 100644 LiteEditor/debuggersettingsdlg.cpp create mode 100644 LiteEditor/debuggersettingsdlg.h create mode 100644 LiteEditor/debuggertip.cpp create mode 100644 LiteEditor/debuggertip.h create mode 100644 LiteEditor/depend_dlg_page.cpp create mode 100644 LiteEditor/depend_dlg_page.h create mode 100644 LiteEditor/depends_dlg.cpp create mode 100644 LiteEditor/depends_dlg.h create mode 100644 LiteEditor/edit_configuration.cpp create mode 100644 LiteEditor/edit_configuration.h create mode 100644 LiteEditor/edit_workspace_conf_dlg.cpp create mode 100644 LiteEditor/edit_workspace_conf_dlg.h create mode 100644 LiteEditor/editor.cpp create mode 100644 LiteEditor/editor.h create mode 100644 LiteEditor/editor_creator.cpp create mode 100644 LiteEditor/editor_creator.h create mode 100644 LiteEditor/envvar_dlg.cpp create mode 100644 LiteEditor/envvar_dlg.h create mode 100644 LiteEditor/envvar_table.cpp create mode 100644 LiteEditor/envvar_table.h create mode 100644 LiteEditor/exports.h create mode 100644 LiteEditor/ext_db_page1.cpp create mode 100644 LiteEditor/ext_db_page1.h create mode 100644 LiteEditor/ext_db_page2.cpp create mode 100644 LiteEditor/ext_db_page2.h create mode 100644 LiteEditor/ext_db_page3.cpp create mode 100644 LiteEditor/ext_db_page3.h create mode 100644 LiteEditor/extdbwizard.cpp create mode 100644 LiteEditor/extdbwizard.h create mode 100644 LiteEditor/file.xpm create mode 100644 LiteEditor/filedroptarget.cpp create mode 100644 LiteEditor/filedroptarget.h create mode 100644 LiteEditor/fileexplorer.cpp create mode 100644 LiteEditor/fileexplorer.h create mode 100644 LiteEditor/fileexplorertree.cpp create mode 100644 LiteEditor/fileexplorertree.h create mode 100644 LiteEditor/filehistory.cpp create mode 100644 LiteEditor/filehistory.h create mode 100644 LiteEditor/fileview.cpp create mode 100644 LiteEditor/fileview.h create mode 100644 LiteEditor/findinfilesdlg.cpp create mode 100644 LiteEditor/findinfilesdlg.h create mode 100644 LiteEditor/findreplacedlg.cpp create mode 100644 LiteEditor/findreplacedlg.h create mode 100644 LiteEditor/frame.cpp create mode 100644 LiteEditor/frame.h create mode 100644 LiteEditor/free_text_dialog.cpp create mode 100644 LiteEditor/free_text_dialog.h create mode 100644 LiteEditor/generalinfo.cpp create mode 100644 LiteEditor/generalinfo.h create mode 100644 LiteEditor/generic_context.cpp create mode 100644 LiteEditor/generic_context.h create mode 100644 LiteEditor/iconsextra.cpp create mode 100644 LiteEditor/keyvaluetabledlg.cpp create mode 100644 LiteEditor/keyvaluetabledlg.h create mode 100644 LiteEditor/lexer_page.cpp create mode 100644 LiteEditor/lexer_page.h create mode 100644 LiteEditor/listctrlpanel.cpp create mode 100644 LiteEditor/listctrlpanel.h create mode 100644 LiteEditor/listctrlpanelbase.cpp create mode 100644 LiteEditor/listctrlpanelbase.h create mode 100644 LiteEditor/localvarstree.cpp create mode 100644 LiteEditor/localvarstree.h create mode 100644 LiteEditor/mainbook.cpp create mode 100644 LiteEditor/mainbook.h create mode 100644 LiteEditor/manager.cpp create mode 100644 LiteEditor/manager.h create mode 100644 LiteEditor/menu_event_handlers.cpp create mode 100644 LiteEditor/menu_event_handlers.h create mode 100644 LiteEditor/menumanager.cpp create mode 100644 LiteEditor/menumanager.h create mode 100644 LiteEditor/movefuncimplbasedlg.cpp create mode 100644 LiteEditor/movefuncimplbasedlg.h create mode 100644 LiteEditor/movefuncimpldlg.cpp create mode 100644 LiteEditor/movefuncimpldlg.h create mode 100644 LiteEditor/navigationmanager.cpp create mode 100644 LiteEditor/navigationmanager.h create mode 100644 LiteEditor/new_configuration_dlg.cpp create mode 100644 LiteEditor/new_configuration_dlg.h create mode 100644 LiteEditor/new_item_dlg.cpp create mode 100644 LiteEditor/new_item_dlg.h create mode 100644 LiteEditor/newdlg.cpp create mode 100644 LiteEditor/newdlg.h create mode 100644 LiteEditor/open_resouce_dlg.cpp create mode 100644 LiteEditor/open_resouce_dlg.h create mode 100644 LiteEditor/openwindowspanel.cpp create mode 100644 LiteEditor/openwindowspanel.h create mode 100644 LiteEditor/openwindowspanelbase.cpp create mode 100644 LiteEditor/openwindowspanelbase.h create mode 100644 LiteEditor/options_base_dlg.cpp create mode 100644 LiteEditor/options_base_dlg.h create mode 100644 LiteEditor/output_pane.cpp create mode 100644 LiteEditor/output_pane.h create mode 100644 LiteEditor/outputpanewindow.cpp create mode 100644 LiteEditor/outputpanewindow.h create mode 100644 LiteEditor/pluginmanager.cpp create mode 100644 LiteEditor/pluginmanager.h create mode 100644 LiteEditor/project_settings_base_dlg.cpp create mode 100644 LiteEditor/project_settings_base_dlg.h create mode 100644 LiteEditor/project_settings_dlg.cpp create mode 100644 LiteEditor/project_settings_dlg.h create mode 100644 LiteEditor/quickoutlinedlg.cpp create mode 100644 LiteEditor/quickoutlinedlg.h create mode 100644 LiteEditor/quickwatchbasedlg.cpp create mode 100644 LiteEditor/quickwatchbasedlg.h create mode 100644 LiteEditor/quickwatchdlg.cpp create mode 100644 LiteEditor/quickwatchdlg.h create mode 100644 LiteEditor/res/Checkbox_off.gif create mode 100644 LiteEditor/res/Checkbox_on.gif create mode 100644 LiteEditor/res/accept.png create mode 100644 LiteEditor/res/arrow_left_green.png create mode 100644 LiteEditor/res/arrow_right_green.png create mode 100644 LiteEditor/res/bookmark.png create mode 100644 LiteEditor/res/bookmark_delete.png create mode 100644 LiteEditor/res/bookmark_down.png create mode 100644 LiteEditor/res/bookmark_up.png create mode 100644 LiteEditor/res/breakpoint.png create mode 100644 LiteEditor/res/bug.png create mode 100644 LiteEditor/res/but_green_s.png create mode 100644 LiteEditor/res/chart_organisation.png create mode 100644 LiteEditor/res/class.png create mode 100644 LiteEditor/res/class24.png create mode 100644 LiteEditor/res/class_new.png create mode 100644 LiteEditor/res/clean.png create mode 100644 LiteEditor/res/cog.png create mode 100644 LiteEditor/res/copy.png create mode 100644 LiteEditor/res/cross.png create mode 100644 LiteEditor/res/cube_green.png create mode 100644 LiteEditor/res/cube_yellow.png create mode 100644 LiteEditor/res/cubes.ico create mode 100644 LiteEditor/res/cubes.png create mode 100644 LiteEditor/res/cubes_blue.png create mode 100644 LiteEditor/res/cut.png create mode 100644 LiteEditor/res/debug_windows.png create mode 100644 LiteEditor/res/debugger_next.png create mode 100644 LiteEditor/res/debugger_pause.png create mode 100644 LiteEditor/res/debugger_start.png create mode 100644 LiteEditor/res/debugger_stepin.png create mode 100644 LiteEditor/res/debugger_stepout.png create mode 100644 LiteEditor/res/debugger_stop.png create mode 100644 LiteEditor/res/document_delete.png create mode 100644 LiteEditor/res/drive.png create mode 100644 LiteEditor/res/enum.png create mode 100644 LiteEditor/res/enum.xpm create mode 100644 LiteEditor/res/enumee.xpm create mode 100644 LiteEditor/res/error.png create mode 100644 LiteEditor/res/exclamation.png create mode 100644 LiteEditor/res/execute.png create mode 100644 LiteEditor/res/file_explorer.png create mode 100644 LiteEditor/res/fileclose.png create mode 100644 LiteEditor/res/filenew.png create mode 100644 LiteEditor/res/find.png create mode 100644 LiteEditor/res/folder.png create mode 100644 LiteEditor/res/folder24.png create mode 100644 LiteEditor/res/folder_find.png create mode 100644 LiteEditor/res/folder_green.png create mode 100644 LiteEditor/res/folder_red.png create mode 100644 LiteEditor/res/folder_table.png create mode 100644 LiteEditor/res/form_blue.png create mode 100644 LiteEditor/res/frames.png create mode 100644 LiteEditor/res/func_private.png create mode 100644 LiteEditor/res/func_protected.png create mode 100644 LiteEditor/res/func_public.png create mode 100644 LiteEditor/res/garbage.png create mode 100644 LiteEditor/res/gear_run.png create mode 100644 LiteEditor/res/gear_stop.png create mode 100644 LiteEditor/res/hammer.png create mode 100644 LiteEditor/res/help.png create mode 100644 LiteEditor/res/locals_view.png create mode 100644 LiteEditor/res/magic-wand.png create mode 100644 LiteEditor/res/magic-wand2.png create mode 100644 LiteEditor/res/media_stop.png create mode 100644 LiteEditor/res/member_private.png create mode 100644 LiteEditor/res/member_protected.png create mode 100644 LiteEditor/res/member_public.png create mode 100644 LiteEditor/res/namespace.png create mode 100644 LiteEditor/res/new_class.png create mode 100644 LiteEditor/res/next.png create mode 100644 LiteEditor/res/open_resource.png create mode 100644 LiteEditor/res/open_type.png create mode 100644 LiteEditor/res/output_win.png create mode 100644 LiteEditor/res/page_close.png create mode 100644 LiteEditor/res/page_error.png create mode 100644 LiteEditor/res/page_find.png create mode 100644 LiteEditor/res/page_green.png create mode 100644 LiteEditor/res/page_new.png create mode 100644 LiteEditor/res/page_open.png create mode 100644 LiteEditor/res/page_red.png create mode 100644 LiteEditor/res/page_save.png create mode 100644 LiteEditor/res/page_white_c.png create mode 100644 LiteEditor/res/page_white_cplusplus.png create mode 100644 LiteEditor/res/page_white_h.png create mode 100644 LiteEditor/res/page_white_text.png create mode 100644 LiteEditor/res/paste.png create mode 100644 LiteEditor/res/pictures.png create mode 100644 LiteEditor/res/plugin24.png create mode 100644 LiteEditor/res/plugin_add.png create mode 100644 LiteEditor/res/previous.png create mode 100644 LiteEditor/res/puzzle.jpg create mode 100644 LiteEditor/res/puzzle.png create mode 100644 LiteEditor/res/question_and_answer.png create mode 100644 LiteEditor/res/redo.png create mode 100644 LiteEditor/res/refresh.png create mode 100644 LiteEditor/res/replace.png create mode 100644 LiteEditor/res/revert.png create mode 100644 LiteEditor/res/save_all.png create mode 100644 LiteEditor/res/save_as.png create mode 100644 LiteEditor/res/search.png create mode 100644 LiteEditor/res/signature.png create mode 100644 LiteEditor/res/stop.png create mode 100644 LiteEditor/res/svn_repo.png create mode 100644 LiteEditor/res/sym_wiz_bmp.png create mode 100644 LiteEditor/res/text_tree.png create mode 100644 LiteEditor/res/threads.png create mode 100644 LiteEditor/res/typedef.xpm create mode 100644 LiteEditor/res/undo.png create mode 100644 LiteEditor/res/watches.png create mode 100644 LiteEditor/res/wrap_arrow.png create mode 100644 LiteEditor/res/wx.png create mode 100644 LiteEditor/res/wx24.png create mode 100644 LiteEditor/res/wxproject.png create mode 100644 LiteEditor/resource.h create mode 100644 LiteEditor/resources.cpp create mode 100644 LiteEditor/resources.xrc create mode 100644 LiteEditor/setters_getters_base_dlg.cpp create mode 100644 LiteEditor/setters_getters_base_dlg.h create mode 100644 LiteEditor/setters_getters_dlg.cpp create mode 100644 LiteEditor/setters_getters_dlg.h create mode 100644 LiteEditor/shell_window.cpp create mode 100644 LiteEditor/shell_window.h create mode 100644 LiteEditor/simpletable.cpp create mode 100644 LiteEditor/simpletable.h create mode 100644 LiteEditor/simpletablebase.cpp create mode 100644 LiteEditor/simpletablebase.h create mode 100644 LiteEditor/stack_walker.cpp create mode 100644 LiteEditor/stack_walker.h create mode 100644 LiteEditor/stdwx.h create mode 100644 LiteEditor/symbols_dialog.cpp create mode 100644 LiteEditor/symbols_dialog.h create mode 100644 LiteEditor/symbols_dialog_base.cpp create mode 100644 LiteEditor/symbols_dialog_base.h create mode 100644 LiteEditor/tags_options_dlg.cpp create mode 100644 LiteEditor/tags_options_dlg.h create mode 100644 LiteEditor/threadlistbasepanel.cpp create mode 100644 LiteEditor/threadlistbasepanel.h create mode 100644 LiteEditor/threadlistpanel.cpp create mode 100644 LiteEditor/threadlistpanel.h create mode 100644 LiteEditor/tiptree.cpp create mode 100644 LiteEditor/tiptree.h create mode 100644 LiteEditor/tree_symbol_page.cpp create mode 100644 LiteEditor/tree_symbol_page.h create mode 100644 LiteEditor/windowstack.cpp create mode 100644 LiteEditor/windowstack.h create mode 100644 LiteEditor/workspace_pane.cpp create mode 100644 LiteEditor/workspace_pane.h create mode 100644 MakefileParser/Makefile create mode 100644 MakefileParser/MakefileParser.workspace create mode 100644 MakefileParser/Parser.project create mode 100644 MakefileParser/input create mode 100644 MakefileParser/main.cpp create mode 100644 MakefileParser/variable.l create mode 100644 MakefileParser/variable.tab.h create mode 100644 MakefileParser/variable.y create mode 100644 Plugin/LineTypes.h create mode 100644 Plugin/MakefileParser.cpp create mode 100644 Plugin/MakefileParser.h create mode 100644 Plugin/Plugin.vcproj create mode 100644 Plugin/Target.cpp create mode 100644 Plugin/Target.h create mode 100644 Plugin/TargetLexer.cpp create mode 100644 Plugin/TargetLexer.h create mode 100644 Plugin/VariableLexer.cpp create mode 100644 Plugin/VariableLexer.h create mode 100644 Plugin/async_executable_cmd.cpp create mode 100644 Plugin/async_executable_cmd.h create mode 100644 Plugin/attribute_style.h create mode 100644 Plugin/build_config.cpp create mode 100644 Plugin/build_config.h create mode 100644 Plugin/build_settings_config.cpp create mode 100644 Plugin/build_settings_config.h create mode 100644 Plugin/build_system.cpp create mode 100644 Plugin/build_system.h create mode 100644 Plugin/builder.cpp create mode 100644 Plugin/builder.h create mode 100644 Plugin/builder_gnumake.cpp create mode 100644 Plugin/builder_gnumake.h create mode 100644 Plugin/buildmanager.cpp create mode 100644 Plugin/buildmanager.h create mode 100644 Plugin/clean_request.cpp create mode 100644 Plugin/clean_request.h create mode 100644 Plugin/compile_request.cpp create mode 100644 Plugin/compile_request.h create mode 100644 Plugin/compiler.cpp create mode 100644 Plugin/compiler.h create mode 100644 Plugin/compiler_action.cpp create mode 100644 Plugin/compiler_action.h create mode 100644 Plugin/configtool.cpp create mode 100644 Plugin/configtool.h create mode 100644 Plugin/configuration_mapping.cpp create mode 100644 Plugin/configuration_mapping.h create mode 100644 Plugin/configuration_object.h create mode 100644 Plugin/consolefinder.cp create mode 100644 Plugin/consolefinder.cpp create mode 100644 Plugin/consolefinder.h create mode 100644 Plugin/debuggerconfigtool.cpp create mode 100644 Plugin/debuggerconfigtool.h create mode 100644 Plugin/debuggermanager.cpp create mode 100644 Plugin/debuggermanager.h create mode 100644 Plugin/debuggersettings.cpp create mode 100644 Plugin/debuggersettings.h create mode 100644 Plugin/dirpicker.cpp create mode 100644 Plugin/dirpicker.h create mode 100644 Plugin/dynamiclibrary.cpp create mode 100644 Plugin/dynamiclibrary.h create mode 100644 Plugin/editor_config.cpp create mode 100644 Plugin/editor_config.h create mode 100644 Plugin/envvar.cpp create mode 100644 Plugin/envvar.h create mode 100644 Plugin/exelocator.cpp create mode 100644 Plugin/exelocator.h create mode 100644 Plugin/file.xpm create mode 100644 Plugin/filepicker.cpp create mode 100644 Plugin/filepicker.h create mode 100644 Plugin/folder.xpm create mode 100644 Plugin/globals.cpp create mode 100644 Plugin/globals.h create mode 100644 Plugin/interactiveprocess.cpp create mode 100644 Plugin/interactiveprocess.h create mode 100644 Plugin/lexer_configuration.cpp create mode 100644 Plugin/lexer_configuration.h create mode 100644 Plugin/macros.h create mode 100644 Plugin/makefile create mode 100644 Plugin/open_type_dlg.cpp create mode 100644 Plugin/open_type_dlg.h create mode 100644 Plugin/optionsconfig.cpp create mode 100644 Plugin/optionsconfig.h create mode 100644 Plugin/pipedprocess.cpp create mode 100644 Plugin/pipedprocess.h create mode 100644 Plugin/plugin_sdk.project create mode 100644 Plugin/project.cpp create mode 100644 Plugin/project.h create mode 100644 Plugin/project_settings.cpp create mode 100644 Plugin/project_settings.h create mode 100644 Plugin/regex_processor.cpp create mode 100644 Plugin/regex_processor.h create mode 100644 Plugin/root.xpm create mode 100644 Plugin/search_thread.cpp create mode 100644 Plugin/search_thread.h create mode 100644 Plugin/sessionmanager.cpp create mode 100644 Plugin/sessionmanager.h create mode 100644 Plugin/splashscreen.cpp create mode 100644 Plugin/splashscreen.h create mode 100644 Plugin/sync_queue.cpp create mode 100644 Plugin/sync_queue.h create mode 100644 Plugin/threebuttonbasedlg.cpp create mode 100644 Plugin/threebuttonbasedlg.h create mode 100644 Plugin/threebuttondlg.cpp create mode 100644 Plugin/threebuttondlg.h create mode 100644 Plugin/variable.tab.c create mode 100644 Plugin/variable.tab.cpp create mode 100644 Plugin/variable.tab.h create mode 100644 Plugin/variable.yy.c create mode 100644 Plugin/variable.yy.cpp create mode 100644 Plugin/vcimporter.cpp create mode 100644 Plugin/vcimporter.h create mode 100644 Plugin/virtualdirtreectrl.cpp create mode 100644 Plugin/virtualdirtreectrl.h create mode 100644 Plugin/volumelocatorthread.cpp create mode 100644 Plugin/volumelocatorthread.h create mode 100644 Plugin/winprocess.cpp create mode 100644 Plugin/winprocess.h create mode 100644 Plugin/workspace.cpp create mode 100644 Plugin/workspace.h create mode 100644 Plugin/xmlutils.cpp create mode 100644 Plugin/xmlutils.h create mode 100644 Runtime/Info.plist create mode 100644 Runtime/astyle.sample create mode 100644 Runtime/bin/ctags-le.exe create mode 100644 Runtime/config/build_settings.xml create mode 100644 Runtime/config/debuggers.xml create mode 100644 Runtime/config/liteeditor.xml create mode 100644 Runtime/config/liteeditor.xml.sample create mode 100644 Runtime/ctags-pre-processor.txt create mode 100644 Runtime/icon.icns create mode 100644 Runtime/images/help_earth.png create mode 100644 Runtime/images/splashscreen.png create mode 100644 Runtime/index.html create mode 100644 Runtime/le_dos2unix.sh create mode 100755 Runtime/le_killproc.sh create mode 100644 Runtime/lexers/lexer_cpp.xml create mode 100644 Runtime/lexers/lexer_default.xml create mode 100644 Runtime/lexers/lexer_diff.xml create mode 100644 Runtime/lexers/lexer_java.xml create mode 100644 Runtime/lexers/lexer_lua.xml create mode 100644 Runtime/lexers/lexer_makefile.xml create mode 100644 Runtime/lexers/lexer_perl.xml create mode 100644 Runtime/lexers/lexer_xml.xml create mode 100755 Runtime/make_mac_bundle.sh create mode 100644 Runtime/rc/menu.xrc create mode 100644 Runtime/templates/app.cpp.wizard create mode 100644 Runtime/templates/app.h.wizard create mode 100644 Runtime/templates/dynamic-library-wx-enabled.project create mode 100644 Runtime/templates/dynamic-library.project create mode 100644 Runtime/templates/executable.project create mode 100644 Runtime/templates/liteeditor-plugin.project create mode 100644 Runtime/templates/liteeditor-plugin.project.wizard create mode 100644 Runtime/templates/main.cpp.wizard create mode 100644 Runtime/templates/mainframe.cpp.wizard create mode 100644 Runtime/templates/mainframe.h.wizard create mode 100644 Runtime/templates/plugin.cpp.wizard create mode 100644 Runtime/templates/plugin.h.wizard create mode 100644 Runtime/templates/static-library-wx-enabled.project create mode 100644 Runtime/templates/static-library.project create mode 100644 Runtime/templates/wxmain.project.wizard create mode 100644 Runtime/templates/wxproject.project.wizard create mode 100644 Subversion/Subversion.project create mode 100644 Subversion/Subversion.vcproj create mode 100644 Subversion/logindlg.cpp create mode 100644 Subversion/logindlg.h create mode 100644 Subversion/logindlgbase.cpp create mode 100644 Subversion/logindlgbase.h create mode 100644 Subversion/makefile create mode 100644 Subversion/subversion.cpp create mode 100644 Subversion/subversion.def create mode 100644 Subversion/subversion.h create mode 100644 Subversion/svnadditemsbasedlg.cpp create mode 100644 Subversion/svnadditemsbasedlg.h create mode 100644 Subversion/svnadditemsdlg.cpp create mode 100644 Subversion/svnadditemsdlg.h create mode 100644 Subversion/svnbasedlg.cpp create mode 100644 Subversion/svnbasedlg.h create mode 100644 Subversion/svndlg.cpp create mode 100644 Subversion/svndlg.h create mode 100644 Subversion/svndriver.cpp create mode 100644 Subversion/svndriver.h create mode 100644 Subversion/svnhandler.cpp create mode 100644 Subversion/svnhandler.h create mode 100644 Subversion/svnlogbasedlg.cpp create mode 100644 Subversion/svnlogbasedlg.h create mode 100644 Subversion/svnlogdlg.cpp create mode 100644 Subversion/svnlogdlg.h create mode 100644 Subversion/svnoptions.cpp create mode 100644 Subversion/svnoptions.h create mode 100644 Subversion/svnoptionsbasedlg.cpp create mode 100644 Subversion/svnoptionsbasedlg.h create mode 100644 Subversion/svnoptionsdlg.cpp create mode 100644 Subversion/svnoptionsdlg.h create mode 100644 Subversion/svnxmlparser.cpp create mode 100644 Subversion/svnxmlparser.h create mode 100644 change_log.txt create mode 100644 fakeroot/DEBIAN/control create mode 100644 formbuilder/AddIncludeFile.fbp create mode 100644 formbuilder/AttachDbgProcBaseDlg.fbp create mode 100644 formbuilder/BuildPage.fbp create mode 100644 formbuilder/DbgCommandBaseDlg.fbp create mode 100644 formbuilder/DebuggerSettings.fbp create mode 100644 formbuilder/NewIneritance.fbp create mode 100644 formbuilder/NewShortCutBaseDlg.fbp create mode 100644 formbuilder/NewWxProjectBaseDlg.fbp create mode 100644 formbuilder/OpenTypeDlg.fbp create mode 100644 formbuilder/OpenWindowsPanelBase.fbp create mode 100644 formbuilder/PluginWizard_P1.fbp create mode 100644 formbuilder/PluginWizard_P2.fbp create mode 100644 formbuilder/QuickOutline.fbp create mode 100644 formbuilder/SvnOptionsBaseDlg.fbp create mode 100644 formbuilder/ThreadListBasePanel.fbp create mode 100644 formbuilder/ThreeButtonBaseDlg.fbp create mode 100644 formbuilder/add_dialog.fbp create mode 100644 formbuilder/advance_settings.fbp create mode 100644 formbuilder/breakpoint_dlg.fbp create mode 100644 formbuilder/close_all_dialog.fbp create mode 100644 formbuilder/codeformatterdlg.fbp create mode 100644 formbuilder/compiler_page.fbp create mode 100644 formbuilder/configuration_manager.fbp create mode 100644 formbuilder/ctags.fbp create mode 100644 formbuilder/ctags_advance_page.fbp create mode 100644 formbuilder/debuggerpanel.fbp create mode 100644 formbuilder/depend_dlg_page.fbp create mode 100644 formbuilder/depends_dlg.fbp create mode 100644 formbuilder/edit_configuration.fbp create mode 100644 formbuilder/eidt_workspace_conf_dlg.fbp create mode 100644 formbuilder/envvar_dlg.fbp create mode 100644 formbuilder/envvar_table_dlg.fbp create mode 100644 formbuilder/eran1.txt create mode 100644 formbuilder/ext_db_page1.fbp create mode 100644 formbuilder/ext_db_page2.fbp create mode 100644 formbuilder/ext_db_page3.fbp create mode 100644 formbuilder/fnb_customize_dlg.fbp create mode 100644 formbuilder/free_text)dialog.fbp create mode 100644 formbuilder/key_value_dlg.fbp create mode 100644 formbuilder/lexer_page.fbp create mode 100644 formbuilder/listctrlpanel.fbp create mode 100644 formbuilder/logindlg.fbp create mode 100644 formbuilder/move_func_impl.fbp create mode 100644 formbuilder/new_configuration.fbp create mode 100644 formbuilder/new_item_dlg.fbp create mode 100644 formbuilder/newclasswizard.fbp create mode 100644 formbuilder/newplugin.fbp create mode 100644 formbuilder/open_resource_dlg.fbp create mode 100644 formbuilder/options_dlg.fbp create mode 100644 formbuilder/progress_dialog.fbp create mode 100644 formbuilder/project_settings.fbp create mode 100644 formbuilder/quickwatchdlg.fbp create mode 100644 formbuilder/results_dialog.fbp create mode 100644 formbuilder/setters_getters.fbp create mode 100644 formbuilder/simpletable.fbp create mode 100644 formbuilder/style_panel.fbp create mode 100644 formbuilder/svnadditemsbasedlg.fbp create mode 100644 formbuilder/svndlg.fbp create mode 100644 formbuilder/svnlogdlg.fbp create mode 100644 formbuilder/tags_options_base_dlg.fbp create mode 100644 gdbparser/Debug/test.h create mode 100644 gdbparser/gdb.l create mode 100644 gdbparser/gdb_lexer.cpp create mode 100644 gdbparser/gdblexer.h create mode 100644 gdbparser/gdbparser.project create mode 100644 gdbparser/gdbparser.workspace create mode 100644 gdbparser/main.cpp create mode 100755 le_makerevision.sh create mode 100755 make_deb.sh create mode 100644 makefile create mode 100644 makefile.mac create mode 100644 sdk/astyle/bin/AStyle.exe create mode 100644 sdk/astyle/build/AStyle.sln create mode 100644 sdk/astyle/build/AStyle.suo create mode 100644 sdk/astyle/build/AStyle.vcproj create mode 100644 sdk/astyle/doc/astyle.html create mode 100644 sdk/astyle/doc/astyleX.html create mode 100644 sdk/astyle/doc/astyle_news.html create mode 100644 sdk/astyle/doc/astyle_notes.html create mode 100644 sdk/astyle/doc/index.html create mode 100644 sdk/astyle/doc/install.html create mode 100644 sdk/astyle/doc/license.html create mode 100644 sdk/astyle/src/ASBeautifier.cpp create mode 100644 sdk/astyle/src/ASEnhancer.cpp create mode 100644 sdk/astyle/src/ASFormatter.cpp create mode 100644 sdk/astyle/src/ASResource.cpp create mode 100644 sdk/astyle/src/astyle.h create mode 100644 sdk/astyle/src/astyle_main.cpp create mode 100644 sdk/ctags/.mk_mvc.mak.swp create mode 100644 sdk/ctags/COPYING create mode 100644 sdk/ctags/EXTENDING.html create mode 100644 sdk/ctags/FAQ create mode 100644 sdk/ctags/INSTALL.oth create mode 100644 sdk/ctags/Makefile.in create mode 100644 sdk/ctags/NEWS create mode 100644 sdk/ctags/README create mode 100644 sdk/ctags/argproc.c create mode 100644 sdk/ctags/args.c create mode 100644 sdk/ctags/args.h create mode 100644 sdk/ctags/asm.c create mode 100644 sdk/ctags/asp.c create mode 100644 sdk/ctags/awk.c create mode 100644 sdk/ctags/beta.c create mode 100644 sdk/ctags/build/ctags.cbp create mode 100644 sdk/ctags/c.c create mode 100644 sdk/ctags/cobol.c create mode 100644 sdk/ctags/config.h.in create mode 100644 sdk/ctags/configure create mode 100644 sdk/ctags/configure.in create mode 100644 sdk/ctags/ctags.1 create mode 100644 sdk/ctags/ctags.h create mode 100644 sdk/ctags/ctags.html create mode 100644 sdk/ctags/ctags.lsm create mode 100644 sdk/ctags/ctags.sln create mode 100644 sdk/ctags/ctags.vcproj create mode 100644 sdk/ctags/debug.c create mode 100644 sdk/ctags/debug.h create mode 100644 sdk/ctags/e_amiga.h create mode 100644 sdk/ctags/e_djgpp.h create mode 100644 sdk/ctags/e_mac.h create mode 100644 sdk/ctags/e_msoft.h create mode 100644 sdk/ctags/e_os2.h create mode 100644 sdk/ctags/e_qdos.h create mode 100644 sdk/ctags/e_riscos.h create mode 100644 sdk/ctags/e_vms.h create mode 100644 sdk/ctags/eiffel.c create mode 100644 sdk/ctags/entry.c create mode 100644 sdk/ctags/entry.h create mode 100644 sdk/ctags/erlang.c create mode 100644 sdk/ctags/fortran.c create mode 100644 sdk/ctags/general.h create mode 100644 sdk/ctags/get.c create mode 100644 sdk/ctags/get.h create mode 100644 sdk/ctags/html.c create mode 100644 sdk/ctags/jscript.c create mode 100644 sdk/ctags/keyword.c create mode 100644 sdk/ctags/keyword.h create mode 100644 sdk/ctags/lisp.c create mode 100644 sdk/ctags/lregex.c create mode 100644 sdk/ctags/lua.c create mode 100644 sdk/ctags/mac.c create mode 100644 sdk/ctags/main.c create mode 100644 sdk/ctags/main.h create mode 100644 sdk/ctags/make.c create mode 100644 sdk/ctags/mk_bc3.mak create mode 100644 sdk/ctags/mk_bc5.mak create mode 100644 sdk/ctags/mk_djg.mak create mode 100644 sdk/ctags/mk_manx.mak create mode 100644 sdk/ctags/mk_ming.mak create mode 100644 sdk/ctags/mk_mpw.mak create mode 100644 sdk/ctags/mk_mvc.mak create mode 100644 sdk/ctags/mk_os2.mak create mode 100644 sdk/ctags/mk_qdos.mak create mode 100644 sdk/ctags/mk_sas.mak create mode 100644 sdk/ctags/options.c create mode 100644 sdk/ctags/options.h create mode 100644 sdk/ctags/parse.c create mode 100644 sdk/ctags/parse.h create mode 100644 sdk/ctags/parsers.h create mode 100644 sdk/ctags/pascal.c create mode 100644 sdk/ctags/perl.c create mode 100644 sdk/ctags/php.c create mode 100644 sdk/ctags/python.c create mode 100644 sdk/ctags/qdos.c create mode 100644 sdk/ctags/read.c create mode 100644 sdk/ctags/read.h create mode 100644 sdk/ctags/readtags.c create mode 100644 sdk/ctags/readtags.h create mode 100644 sdk/ctags/rexx.c create mode 100644 sdk/ctags/routines.c create mode 100644 sdk/ctags/routines.h create mode 100644 sdk/ctags/ruby.c create mode 100644 sdk/ctags/scheme.c create mode 100644 sdk/ctags/sh.c create mode 100644 sdk/ctags/slang.c create mode 100644 sdk/ctags/sml.c create mode 100644 sdk/ctags/sort.c create mode 100644 sdk/ctags/sort.h create mode 100644 sdk/ctags/source.mak create mode 100644 sdk/ctags/sql.c create mode 100644 sdk/ctags/strlist.c create mode 100644 sdk/ctags/strlist.h create mode 100644 sdk/ctags/tcl.c create mode 100644 sdk/ctags/verilog.c create mode 100644 sdk/ctags/vim.c create mode 100644 sdk/ctags/vstring.c create mode 100644 sdk/ctags/vstring.h create mode 100644 sdk/ctags/yacc.c create mode 100644 sdk/src/which/which-2.16-4-src.zip create mode 100644 sdk/wxconfig/INSTALL.txt create mode 100644 sdk/wxconfig/README.txt create mode 100644 sdk/wxconfig/wx-config-win.cbp create mode 100644 sdk/wxconfig/wx-config-win.cpp create mode 100644 sdk/wxconfig/wx-config.exe create mode 100644 sdk/wxflatnotebook/README create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/Makefile.win create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/genFlatLib.bat create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/genFlatTst.bat create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.dev create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.layout create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/makefile create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/makefile.bcc create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/makefile.vc create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.bkl create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.sln create mode 100644 sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.vcproj create mode 100644 sdk/wxflatnotebook/docs/wxFlatNotebook/Doxyfile create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_customize_dlg.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_resources.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_singleton.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_smart_ptr.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/popup_dlg.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/renderer.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFNBDropTarget.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFlatNotebook.h create mode 100644 sdk/wxflatnotebook/include/wx/wxFlatNotebook/xh_fnb.h create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/App.cpp create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/App.h create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.cpp create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.h create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/Makefile.win create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/book_blue.png create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/book_green.png create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/book_red.png create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/icons/app.xpm create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/icons/help.xpm create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/icons/icon.bmp create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/makefile.gcc create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/resources.cpp create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.dev create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.layout create mode 100644 sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.vcproj create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/fnb_customize_dlg.cpp create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/fnb_resources.cpp create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/popup_dlg.cpp create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/renderer.cpp create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/wxFlatNotebook.cpp create mode 100644 sdk/wxflatnotebook/src/wxFlatNotebook/xh_fnb.cpp create mode 100644 sdk/wxflatnotebook/wxflatnotebook.project create mode 100644 sdk/wxscintilla/Readme create mode 100644 sdk/wxscintilla/build/BuildInfo.txt create mode 100644 sdk/wxscintilla/build/Makefile create mode 100644 sdk/wxscintilla/build/wxscintilla.cbp create mode 100644 sdk/wxscintilla/build/wxscintilla.dsp create mode 100644 sdk/wxscintilla/build/wxscintilla.dsw create mode 100644 sdk/wxscintilla/build/wxscintilla.vcproj create mode 100644 sdk/wxscintilla/include/wx/wxscintilla.h create mode 100644 sdk/wxscintilla/src/PlatWX.cpp create mode 100644 sdk/wxscintilla/src/PlatWX.h create mode 100644 sdk/wxscintilla/src/ScintillaWX.cpp create mode 100644 sdk/wxscintilla/src/ScintillaWX.h create mode 100644 sdk/wxscintilla/src/gtkstring.h create mode 100644 sdk/wxscintilla/src/scintilla/License.txt create mode 100644 sdk/wxscintilla/src/scintilla/README.txt create mode 100644 sdk/wxscintilla/src/scintilla/include/Accessor.h create mode 100644 sdk/wxscintilla/src/scintilla/include/Face.py create mode 100644 sdk/wxscintilla/src/scintilla/include/HFacer.py create mode 100644 sdk/wxscintilla/src/scintilla/include/KeyWords.h create mode 100644 sdk/wxscintilla/src/scintilla/include/Platform.h create mode 100644 sdk/wxscintilla/src/scintilla/include/PropSet.h create mode 100644 sdk/wxscintilla/src/scintilla/include/SString.h create mode 100644 sdk/wxscintilla/src/scintilla/include/SciLexer.h create mode 100644 sdk/wxscintilla/src/scintilla/include/Scintilla.h create mode 100644 sdk/wxscintilla/src/scintilla/include/Scintilla.iface create mode 100644 sdk/wxscintilla/src/scintilla/include/ScintillaWidget.h create mode 100644 sdk/wxscintilla/src/scintilla/include/WindowAccessor.h create mode 100644 sdk/wxscintilla/src/scintilla/src/AutoComplete.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/AutoComplete.h create mode 100644 sdk/wxscintilla/src/scintilla/src/CallTip.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/CallTip.h create mode 100644 sdk/wxscintilla/src/scintilla/src/CellBuffer.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/CellBuffer.h create mode 100644 sdk/wxscintilla/src/scintilla/src/CharClassify.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/CharClassify.h create mode 100644 sdk/wxscintilla/src/scintilla/src/CharacterSet.h create mode 100644 sdk/wxscintilla/src/scintilla/src/ContractionState.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/ContractionState.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Decoration.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/Decoration.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Document.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/Document.h create mode 100644 sdk/wxscintilla/src/scintilla/src/DocumentAccessor.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/DocumentAccessor.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Editor.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/Editor.h create mode 100644 sdk/wxscintilla/src/scintilla/src/ExternalLexer.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/ExternalLexer.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Indicator.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/Indicator.h create mode 100644 sdk/wxscintilla/src/scintilla/src/KeyMap.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/KeyMap.h create mode 100644 sdk/wxscintilla/src/scintilla/src/KeyWords.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAPDL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAU3.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAVE.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAda.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAsm.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexAsn1.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexBaan.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexBash.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexBasic.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexBullant.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCLW.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCPP.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCSS.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCaml.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCmake.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexConf.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCrontab.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexCsound.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexD.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexEScript.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexEiffel.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexErlang.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexFlagship.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexForth.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexFortran.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexGAP.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexGen.py create mode 100644 sdk/wxscintilla/src/scintilla/src/LexGui4Cli.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexHTML.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexHaskell.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexInno.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexKix.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexLisp.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexLout.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexLua.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexMMIXAL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexMPT.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexMSSQL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexMatlab.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexMetapost.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexNsis.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexOpal.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexOthers.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPB.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPLM.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPOV.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPS.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPascal.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPerl.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexProgress.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexPython.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexRebol.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexRuby.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexSQL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexScriptol.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexSmalltalk.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexSpecman.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexSpice.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexTADS3.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexTCL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexTeX.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexVB.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexVHDL.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexVerilog.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LexYAML.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LineMarker.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/LineMarker.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Partitioning.h create mode 100644 sdk/wxscintilla/src/scintilla/src/PositionCache.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/PositionCache.h create mode 100644 sdk/wxscintilla/src/scintilla/src/PropSet.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/RESearch.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/RESearch.h create mode 100644 sdk/wxscintilla/src/scintilla/src/RunStyles.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/RunStyles.h create mode 100644 sdk/wxscintilla/src/scintilla/src/SVector.h create mode 100644 sdk/wxscintilla/src/scintilla/src/SciTE.properties create mode 100644 sdk/wxscintilla/src/scintilla/src/ScintillaBase.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/ScintillaBase.h create mode 100644 sdk/wxscintilla/src/scintilla/src/SplitVector.h create mode 100644 sdk/wxscintilla/src/scintilla/src/Style.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/Style.h create mode 100644 sdk/wxscintilla/src/scintilla/src/StyleContext.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/StyleContext.h create mode 100644 sdk/wxscintilla/src/scintilla/src/UniConversion.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/UniConversion.h create mode 100644 sdk/wxscintilla/src/scintilla/src/ViewStyle.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/ViewStyle.h create mode 100644 sdk/wxscintilla/src/scintilla/src/WindowAccessor.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/XPM.cxx create mode 100644 sdk/wxscintilla/src/scintilla/src/XPM.h create mode 100644 sdk/wxscintilla/src/wxscintilla.cpp create mode 100644 sdk/wxscintilla/wxscintilla.project create mode 100644 sdk/wxsqlite3/Makefile.in create mode 100644 sdk/wxsqlite3/Readme.txt create mode 100644 sdk/wxsqlite3/build/Bakefiles.bkgen create mode 100644 sdk/wxsqlite3/build/aclocal.m4 create mode 100644 sdk/wxsqlite3/build/acregen.sh create mode 100644 sdk/wxsqlite3/build/autoconf_inc.m4 create mode 100644 sdk/wxsqlite3/build/config.guess create mode 100644 sdk/wxsqlite3/build/config.sub create mode 100644 sdk/wxsqlite3/build/configure.ac create mode 100644 sdk/wxsqlite3/build/install.sh create mode 100644 sdk/wxsqlite3/build/makefile.bcc create mode 100644 sdk/wxsqlite3/build/makefile.gcc create mode 100644 sdk/wxsqlite3/build/makefile.vc create mode 100644 sdk/wxsqlite3/build/makefile.wat create mode 100644 sdk/wxsqlite3/build/wxsqlite3.bkl create mode 100644 sdk/wxsqlite3/build/wxsqlite3.dsw create mode 100644 sdk/wxsqlite3/build/wxsqlite3_minimal.dsp create mode 100644 sdk/wxsqlite3/build/wxsqlite3_wxsqlite3.cbp create mode 100644 sdk/wxsqlite3/build/wxsqlite3_wxsqlite3.dsp create mode 100644 sdk/wxsqlite3/build/wxsqlite3_wxsqlite3.vcproj create mode 100644 sdk/wxsqlite3/configure create mode 100644 sdk/wxsqlite3/docs/Doxyfile create mode 100644 sdk/wxsqlite3/include/wx/wxsqlite3.h create mode 100644 sdk/wxsqlite3/include/wx/wxsqlite3def.h create mode 100644 sdk/wxsqlite3/include/wx/wxsqlite3dyn.h create mode 100644 sdk/wxsqlite3/include/wx/wxsqlite3opt.h create mode 100644 sdk/wxsqlite3/samples/minimal.cpp create mode 100644 sdk/wxsqlite3/samples/minimal.rc create mode 100644 sdk/wxsqlite3/samples/sample.ico create mode 100644 sdk/wxsqlite3/sqlite3/Readme.txt create mode 100644 sdk/wxsqlite3/sqlite3/include/sqlite3.h create mode 100644 sdk/wxsqlite3/sqlite3/lib/sqlite3.def create mode 100644 sdk/wxsqlite3/sqlite3/lib/sqlite3.dll create mode 100644 sdk/wxsqlite3/sqlite3/lib/sqlite3.exp create mode 100644 sdk/wxsqlite3/sqlite3/lib/sqlite3.lib create mode 100644 sdk/wxsqlite3/sqlite3/meta/sqlite3.def create mode 100644 sdk/wxsqlite3/sqlite3/meta/sqlite3.dll create mode 100644 sdk/wxsqlite3/sqlite3/meta/sqlite3.exp create mode 100644 sdk/wxsqlite3/sqlite3/meta/sqlite3.lib create mode 100644 sdk/wxsqlite3/sqlite3/secure/sqlite3.def create mode 100644 sdk/wxsqlite3/sqlite3/secure/sqlite3.dll create mode 100644 sdk/wxsqlite3/sqlite3/secure/sqlite3.exp create mode 100644 sdk/wxsqlite3/sqlite3/secure/sqlite3.lib create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/codec/codec.cpp create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/codec/codec.h create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/codec/codecext.cpp create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/codec/rijndael.cpp create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/codec/rijndael.h create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.1.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.10-12.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.2.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.3.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.4.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.5.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.6.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.7.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.8.c create mode 100644 sdk/wxsqlite3/sqlite3/secure/src/pager/pager-3.3.9.c create mode 100644 sdk/wxsqlite3/src/wxsqlite3.cpp create mode 100644 sdk/wxsqlite3/wxsqlite3.project create mode 100644 site/docs.html create mode 100644 site/docs/CodeLite_Overview.html create mode 100644 site/docs/CodeLite_Overview_images/dpj54wd_36fjr83zvj.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_27f63kxfg5.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_28gvgzg2fn.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_29dd7trrt3.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_30dsw5qdhh.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_31hfs429c2.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_32ph2pq9hd.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_33cq5mxfp2.png create mode 100644 site/docs/LiteEditor - Overview & Quick Start_images/dpj54wd_346qds5rgx.png create mode 100644 site/docs/quick_overview.html create mode 100644 site/download.html create mode 100644 site/faq.html create mode 100644 site/images/arrow.png create mode 100644 site/images/auto_comp_one.png create mode 100644 site/images/build_dialog.png create mode 100644 site/images/check.png create mode 100644 site/images/doxy_menu.png create mode 100644 site/images/editor_general.png create mode 100644 site/images/find_symbol_dialog.png create mode 100644 site/images/function_tip_with_comment.png create mode 100644 site/images/open_resource_dlg.png create mode 100644 site/images/open_type_dlg.png create mode 100644 site/images/options.png create mode 100644 site/images/outline_view.png create mode 100644 site/images/setters_getters_dlg.png create mode 100644 site/images/site_bg.png create mode 100644 site/images/thumbs/auto_comp_one.png create mode 100644 site/images/thumbs/build_dialog.png create mode 100644 site/images/thumbs/doxy_menu.png create mode 100644 site/images/thumbs/editor_general.png create mode 100644 site/images/thumbs/find_symbol_dialog.png create mode 100644 site/images/thumbs/function_tip_with_comment.png create mode 100644 site/images/thumbs/open_resource_dlg.png create mode 100644 site/images/thumbs/open_type_dlg.png create mode 100644 site/images/thumbs/options.png create mode 100644 site/images/thumbs/outline_view.png create mode 100644 site/images/thumbs/setters_getters_dlg.png create mode 100644 site/index.html create mode 100644 site/main_style.css create mode 100644 site/screenshots.html create mode 100644 sqlite3/sqlite3.c create mode 100644 sqlite3/sqlite3.h create mode 100644 sqlite3/sqlite3.project diff --git a/AutoRevision/AutoRevision.workspace b/AutoRevision/AutoRevision.workspace new file mode 100644 index 0000000000..018e536fb5 --- /dev/null +++ b/AutoRevision/AutoRevision.workspace @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/AutoRevision/autorev/autorev.project b/AutoRevision/autorev/autorev.project new file mode 100644 index 0000000000..1c073f00f3 --- /dev/null +++ b/AutoRevision/autorev/autorev.project @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutoRevision/autorev/main.cpp b/AutoRevision/autorev/main.cpp new file mode 100644 index 0000000000..61ec2e2c86 --- /dev/null +++ b/AutoRevision/autorev/main.cpp @@ -0,0 +1,64 @@ +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#ifdef _WIN32 +#include "io.h" +#endif +#include + + +int main(int argc, char **argv){ + + if(argc < 2){ + printf("usage: autorev \n"); + return -1; + } + + //execute the svn executable + chdir(argv[1]); + FILE *fp = popen("svn info", "r"); + if(!fp){ + printf("failed to execute svn\n"); + } + + char line[256]; + bool found(false); + while(fgets(line, sizeof(line), fp)){ + if(strstr(line, "Revision: ")){ + found = true; + break; + } + memset(line, 0, sizeof(line)); + } + + //create the output file + FILE *of = fopen("svninfo.cpp", "w+"); + if(!of){ + perror("failed to create output file"); + return -1; + } + + fprintf(of, "#define SvnRevision \""); + if(found){ + //we got the revision number + int counter(0); + char *tok = strtok(line, ":"); + while(tok){ + if(counter == 1){ + std::string token = tok; + static std::string trimString(" \r\n\t\v"); + token.erase(0, token.find_first_not_of(trimString)); + token.erase(token.find_last_not_of(trimString)+1); + fprintf(of, "%s", token.c_str()); + break; + }else{ + tok = strtok(NULL, ":"); + } + counter++; + } + } + fprintf(of, "\"\n"); + pclose(fp); + fclose(of); + return 0; +} diff --git a/BuildInfo.txt b/BuildInfo.txt new file mode 100644 index 0000000000..f4c18fc9a3 --- /dev/null +++ b/BuildInfo.txt @@ -0,0 +1,56 @@ +//-------------------------------------------- +// g++ on Linux +//-------------------------------------------- +The Linux build uses the makefile named: makefile.linux. + +To build CodeLite with the g++ on Linux, follow the following steps: +0. make sure you have downloaded and installed wxWidgets +(http://www.wxwidgets.org) +1. make sure you have 'make' utility somewhere in your path +2. make sure you have wx-config somewhere in your path, if not build it +from sdk, + it is required for the makefile + +debug: + make -f makefile.linux type=debug [clean] + +debug unicode: + make -f makefile.linux type=debug_unicode [clean] + +release: + make -f makefile.linux type=release [clean] + +release unicode: + make -f makefile.linux type=release_unicode [clean] + +//-------------------------------------------- +// g++ / MinGW / wxWidgets static library (Windows) +//-------------------------------------------- + +Before you build it using LE, make sure you have the following: +1. Define a build system in LE Build->Advance Settings (set to your make.exe and set flag to '-f') +2. Define two compilers: gnu g++ & gnu gcc (use the default compiler settings when pressing the 'New' Button, excpet for gcc rename + the compiler name from g++ to gcc + +To build with mingw, I suggest downloading one of the nightly build of LiteEditor, +open trunk/LiteEditor.workspace - and hit 'Ctrl+B' + + +//---------------------------------------------- +// VC71 +//---------------------------------------------- + +1. Open the provided workspace (CodeLite.sln) +2. Select the requested configuration +3. Hit F7 :) + +-------------------------------------------------------------------------- +Notes: +-------------------------------------------------------------------------- + - When building with VC71, will need sqlite3.dll, so set the working directory to 'Runtime' dir + other builds methods uses sqlite3 as static library + +Enjoy, +Eran + + diff --git a/CC_TODO.TXT b/CC_TODO.TXT new file mode 100644 index 0000000000..ee833517c8 --- /dev/null +++ b/CC_TODO.TXT @@ -0,0 +1,15 @@ +- Add new option: Ctrl Is Down + mouse left click will display the current word as link and will jump to implementation + Ctrl Is Down + mouse right clickwill display the current word as link and will jump to declaration +- Add: add unimplemented methods +- Import File from directory - add new filtering dialog +- cscope plugin: + find symbol in workspace + find functions calling symbol + find functions called by symbol +- add SVN options to workspace tree +- Colour errors with different colour +- Add new 'Build General Page' to the build dialog which includes: + - colour to mark errors + - colour to mark warnings + - F4 should skip warnings (yes/no) +- rename the 'Advance' dialog to be 'Build Settings' diff --git a/CodeFormatter/ASBeautifier.cpp b/CodeFormatter/ASBeautifier.cpp new file mode 100644 index 0000000000..a3d3fcff0b --- /dev/null +++ b/CodeFormatter/ASBeautifier.cpp @@ -0,0 +1,1964 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASBeautifier.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include + +#define INIT_CONTAINER(container, value) {if ( (container) != NULL ) delete (container); (container) = (value); } +#define DELETE_CONTAINER(container) {if ( (container) != NULL ) delete (container); } + + +namespace astyle +{ +vector ASBeautifier::headers; +vector ASBeautifier::nonParenHeaders; +vector ASBeautifier::preBlockStatements; +vector ASBeautifier::assignmentOperators; +vector ASBeautifier::nonAssignmentOperators; + + +/* + * initialize the static vars + */ +void ASBeautifier::initStatic() +{ + static int beautifierFileType = 9; // initialized with an invalid type + + if (fileType == beautifierFileType) // don't build unless necessary + return; + + beautifierFileType = fileType; + + headers.clear(); + nonParenHeaders.clear(); + assignmentOperators.clear(); + nonAssignmentOperators.clear(); + preBlockStatements.clear(); + + ASResource::buildHeaders(headers, fileType, true); + ASResource::buildNonParenHeaders(nonParenHeaders, fileType, true); + ASResource::buildAssignmentOperators(assignmentOperators); + ASResource::buildNonAssignmentOperators(nonAssignmentOperators); + ASResource::buildPreBlockStatements(preBlockStatements); + +// cout << "beaut" << endl; +} + +/** + * ASBeautifier's constructor + */ +ASBeautifier::ASBeautifier() +{ + waitingBeautifierStack = NULL; + activeBeautifierStack = NULL; + waitingBeautifierStackLengthStack = NULL; + activeBeautifierStackLengthStack = NULL; + + headerStack = NULL; + tempStacks = NULL; + blockParenDepthStack = NULL; + blockStatementStack = NULL; + parenStatementStack = NULL; + bracketBlockStateStack = NULL; + inStatementIndentStack = NULL; + inStatementIndentStackSizeStack = NULL; + parenIndentStack = NULL; + sourceIterator = NULL; + + isMinimalConditinalIndentSet = false; + shouldForceTabIndentation = false; + + setSpaceIndentation(4); + setMaxInStatementIndentLength(40); + setClassIndent(false); + setSwitchIndent(false); + setCaseIndent(false); + setBlockIndent(false); + setBracketIndent(false); + setNamespaceIndent(false); + setLabelIndent(false); + setEmptyLineFill(false); + fileType = C_TYPE; + setCStyle(); + setPreprocessorIndent(false); +} + +/** + * ASBeautifier's copy constructor + */ +ASBeautifier::ASBeautifier(const ASBeautifier &other) +{ + waitingBeautifierStack = NULL; + activeBeautifierStack = NULL; + waitingBeautifierStackLengthStack = NULL; + activeBeautifierStackLengthStack = NULL; + + headerStack = new vector; + *headerStack = *other.headerStack; + + tempStacks = new vector*>; + vector*>::iterator iter; + for (iter = other.tempStacks->begin(); + iter != other.tempStacks->end(); + ++iter) + { + vector *newVec = new vector; + *newVec = **iter; + tempStacks->push_back(newVec); + } + blockParenDepthStack = new vector; + *blockParenDepthStack = *other.blockParenDepthStack; + + blockStatementStack = new vector; + *blockStatementStack = *other.blockStatementStack; + + parenStatementStack = new vector; + *parenStatementStack = *other.parenStatementStack; + + bracketBlockStateStack = new vector; + *bracketBlockStateStack = *other.bracketBlockStateStack; + + inStatementIndentStack = new vector; + *inStatementIndentStack = *other.inStatementIndentStack; + + inStatementIndentStackSizeStack = new vector; + *inStatementIndentStackSizeStack = *other.inStatementIndentStackSizeStack; + + parenIndentStack = new vector; + *parenIndentStack = *other.parenIndentStack; + + sourceIterator = other.sourceIterator; + + // protected variables + fileType = other.fileType; + isCStyle = other.isCStyle; + isJavaStyle = other.isJavaStyle; + isSharpStyle = other.isSharpStyle; + + // variables set by ASFormatter + // must also be updated in preprocessor + inLineNumber = other.inLineNumber; + outLineNumber = other.outLineNumber; + lineCommentNoBeautify = other.lineCommentNoBeautify; + isNonInStatementArray = other.isNonInStatementArray; + + // private variables + indentString = other.indentString; + currentHeader = other.currentHeader; + previousLastLineHeader = other.previousLastLineHeader; + immediatelyPreviousAssignmentOp = other.immediatelyPreviousAssignmentOp; + probationHeader = other.probationHeader; + isInQuote = other.isInQuote; + isInComment = other.isInComment; + isInCase = other.isInCase; + isInQuestion = other.isInQuestion; + isInStatement = other.isInStatement; + isInHeader = other.isInHeader; + isInOperator = other.isInOperator; + isInTemplate = other.isInTemplate; + isInDefine = other.isInDefine; + isInDefineDefinition = other.isInDefineDefinition; + classIndent = other.classIndent; + isInClassHeader = other.isInClassHeader; + isInClassHeaderTab = other.isInClassHeaderTab; + switchIndent = other.switchIndent; + caseIndent = other.caseIndent; + namespaceIndent = other.namespaceIndent; + bracketIndent = other.bracketIndent; + blockIndent = other.blockIndent; + labelIndent = other.labelIndent; + preprocessorIndent = other.preprocessorIndent; + isInConditional = other.isInConditional; + isMinimalConditinalIndentSet = other.isMinimalConditinalIndentSet; + shouldForceTabIndentation = other.shouldForceTabIndentation; + emptyLineFill = other.emptyLineFill; + backslashEndsPrevLine = other.backslashEndsPrevLine; + blockCommentNoIndent = other.blockCommentNoIndent; + blockCommentNoBeautify = other.blockCommentNoBeautify; + previousLineProbationTab = other.previousLineProbationTab; + minConditionalIndent = other.minConditionalIndent; + parenDepth = other.parenDepth; + indentLength = other.indentLength; + blockTabCount = other.blockTabCount; + leadingWhiteSpaces = other.leadingWhiteSpaces; + maxInStatementIndent = other.maxInStatementIndent; + templateDepth = other.templateDepth; + prevFinalLineSpaceTabCount = other.prevFinalLineSpaceTabCount; + prevFinalLineTabCount = other.prevFinalLineTabCount; + defineTabCount = other.defineTabCount; + quoteChar = other.quoteChar; + prevNonSpaceCh = other.prevNonSpaceCh; + currentNonSpaceCh = other.currentNonSpaceCh; + currentNonLegalCh = other.currentNonLegalCh; + prevNonLegalCh = other.prevNonLegalCh; +} + +/** + * ASBeautifier's destructor + */ +ASBeautifier::~ASBeautifier() +{ + DELETE_CONTAINER(headerStack); + DELETE_CONTAINER(blockParenDepthStack); + DELETE_CONTAINER(blockStatementStack); + DELETE_CONTAINER(parenStatementStack); + DELETE_CONTAINER(bracketBlockStateStack); + DELETE_CONTAINER(inStatementIndentStack); + DELETE_CONTAINER(inStatementIndentStackSizeStack); + DELETE_CONTAINER(parenIndentStack); + DELETE_CONTAINER(waitingBeautifierStackLengthStack); + DELETE_CONTAINER(activeBeautifierStackLengthStack); + + if(tempStacks){ + vector< vector* >::iterator iter = tempStacks->begin(); + for(; iter != tempStacks->end(); iter++){ + delete *iter; + } + tempStacks->clear(); + delete tempStacks; + tempStacks = NULL; + } + + if(waitingBeautifierStack){ + vector::iterator iter = waitingBeautifierStack->begin(); + for(; iter != waitingBeautifierStack->end(); iter++){ + delete *iter; + } + waitingBeautifierStack->clear(); + delete waitingBeautifierStack; + waitingBeautifierStack = NULL; + } + + if(activeBeautifierStack){ + vector::iterator iter = activeBeautifierStack->begin(); + for(; iter != activeBeautifierStack->end(); iter++){ + delete *iter; + } + activeBeautifierStack->clear(); + delete activeBeautifierStack; + activeBeautifierStack = NULL; + } +} + +/** + * initialize the ASBeautifier. + * + * init() should be called every time a ABeautifier object is to start + * beautifying a NEW source file. + * init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object + * that will be used to iterate through the source code. This object will be + * deleted during the ASBeautifier's destruction, and thus should not be + * deleted elsewhere. + * + * @param iter a pointer to the DYNAMICALLY CREATED ASSourceIterator object. + */ +void ASBeautifier::init(ASSourceIterator *iter) +{ + sourceIterator = iter; + init(); +} + +/** + * initialize the ASBeautifier. + */ +void ASBeautifier::init() +{ + initStatic(); + + INIT_CONTAINER(waitingBeautifierStack, new vector); + INIT_CONTAINER(activeBeautifierStack, new vector); + + INIT_CONTAINER(waitingBeautifierStackLengthStack, new vector); + INIT_CONTAINER(activeBeautifierStackLengthStack, new vector); + + INIT_CONTAINER(headerStack, new vector); + INIT_CONTAINER(tempStacks, new vector*>); + tempStacks->push_back(new vector); + + INIT_CONTAINER(blockParenDepthStack, new vector); + INIT_CONTAINER(blockStatementStack, new vector); + INIT_CONTAINER(parenStatementStack, new vector); + + INIT_CONTAINER(bracketBlockStateStack, new vector); + bracketBlockStateStack->push_back(true); + + INIT_CONTAINER(inStatementIndentStack, new vector); + INIT_CONTAINER(inStatementIndentStackSizeStack, new vector); + inStatementIndentStackSizeStack->push_back(0); + INIT_CONTAINER(parenIndentStack, new vector); + + immediatelyPreviousAssignmentOp = NULL; + previousLastLineHeader = NULL; + currentHeader = NULL; + + isInQuote = false; + isInComment = false; + isInStatement = false; + isInCase = false; + isInQuestion = false; + isInClassHeader = false; + isInClassHeaderTab = false; + isInHeader = false; + isInOperator = false; + isInTemplate = false; + isInConditional = false; + templateDepth = 0; + parenDepth = 0; + blockTabCount = 0; + leadingWhiteSpaces = 0; + prevNonSpaceCh = '{'; + currentNonSpaceCh = '{'; + prevNonLegalCh = '{'; + currentNonLegalCh = '{'; + quoteChar = ' '; + prevFinalLineSpaceTabCount = 0; + prevFinalLineTabCount = 0; + probationHeader = NULL; + backslashEndsPrevLine = false; + isInDefine = false; + isInDefineDefinition = false; + defineTabCount = 0; + lineCommentNoBeautify = false; + blockCommentNoIndent = false; + blockCommentNoBeautify = false; + previousLineProbationTab = false; + isNonInStatementArray = false; + inLineNumber = -1; // for debugging + outLineNumber = 0; // for debugging +} + +/** + * set indentation style to C/C++. + */ +void ASBeautifier::setCStyle() +{ + fileType = C_TYPE; + isCStyle = true; + isJavaStyle = false; + isSharpStyle = false; +} + +/** + * set indentation style to Java. + */ +void ASBeautifier::setJavaStyle() +{ + fileType = JAVA_TYPE; + isJavaStyle = true; + isCStyle = false; + isSharpStyle = false; +} + +/** + * set indentation style to C#. + */ +void ASBeautifier::setSharpStyle() +{ + fileType = SHARP_TYPE; + isSharpStyle = true; + isCStyle = false; + isJavaStyle = false; +} + +/** + * indent using one tab per indentation + */ +void ASBeautifier::setTabIndentation(int length, bool forceTabs) +{ + indentString = "\t"; + indentLength = length; + shouldForceTabIndentation = forceTabs; + + if (!isMinimalConditinalIndentSet) + minConditionalIndent = indentLength * 2; +} + +/** + * indent using a number of spaces per indentation. + * + * @param length number of spaces per indent. + */ +void ASBeautifier::setSpaceIndentation(int length) +{ + indentString = string(length, ' '); + indentLength = length; + + if (!isMinimalConditinalIndentSet) + minConditionalIndent = indentLength * 2; +} + +/** + * set the maximum indentation between two lines in a multi-line statement. + * + * @param max maximum indentation length. + */ +void ASBeautifier::setMaxInStatementIndentLength(int max) +{ + maxInStatementIndent = max; +} + +/** + * set the minimum indentation between two lines in a multi-line condition. + * + * @param min minimal indentation length. + */ +void ASBeautifier::setMinConditionalIndentLength(int min) +{ + minConditionalIndent = min; + isMinimalConditinalIndentSet = true; +} + +/** + * set the state of the bracket indentation option. If true, brackets will + * be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setBracketIndent(bool state) +{ + bracketIndent = state; +} + +/** + * set the state of the block indentation option. If true, entire blocks + * will be indented one additional indent, similar to the GNU indent style. + * + * @param state state of option. + */ +void ASBeautifier::setBlockIndent(bool state) +{ + if (state) + setBracketIndent(false); // so that we don't have both bracket and block indent + blockIndent = state; +} + +/** + * set the state of the class indentation option. If true, C++ class + * definitions will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setClassIndent(bool state) +{ + classIndent = state; +} + +/** + * set the state of the switch indentation option. If true, blocks of 'switch' + * statements will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setSwitchIndent(bool state) +{ + switchIndent = state; +} + +/** + * set the state of the case indentation option. If true, lines of 'case' + * statements will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setCaseIndent(bool state) +{ + caseIndent = state; +} + +/** + * set the state of the namespace indentation option. + * If true, blocks of 'namespace' statements will be indented one + * additional indent. Otherwise, NO indentation will be added. + * + * @param state state of option. + */ +void ASBeautifier::setNamespaceIndent(bool state) +{ + namespaceIndent = state; +} + +/** + * set the state of the label indentation option. + * If true, labels will be indented one indent LESS than the + * current indentation level. + * If false, labels will be flushed to the left with NO + * indent at all. + * + * @param state state of option. + */ +void ASBeautifier::setLabelIndent(bool state) +{ + labelIndent = state; +} + +/** + * set the state of the preprocessor indentation option. + * If true, multiline #define statements will be indented. + * + * @param state state of option. + */ +void ASBeautifier::setPreprocessorIndent(bool state) +{ + preprocessorIndent = state; +} + +/** + * set the state of the empty line fill option. + * If true, empty lines will be filled with the whitespace. + * of their previous lines. + * If false, these lines will remain empty. + * + * @param state state of option. + */ +void ASBeautifier::setEmptyLineFill(bool state) +{ + emptyLineFill = state; +} + +/** + * get the number of spaces per indent + * + * @return value of indentLength option. +*/ +int ASBeautifier::getIndentLength(void) +{ + return indentLength; +} + +/** + * get the char used for indentation, space or tab + * + * @return the char used for indentation. + */ +string ASBeautifier::getIndentString(void) +{ + return indentString; +} + +/** + * get the state of the case indentation option. If true, lines of 'case' + * statements will be indented one additional indent. + * + * @return state of caseIndent option. + */ +bool ASBeautifier::getCaseIndent(void) +{ + return caseIndent; +} + +/** + * get C style identifier. + * If true, a C source is being indented. + * + * @return state of isCStyle option. + */ +bool ASBeautifier::getCStyle(void) +{ + return isCStyle; +} + +/** + * get Java style identifier. + * If true, a Java source is being indented. + * + * @return state of isJavaStyle option. + */ +bool ASBeautifier::getJavaStyle(void) +{ + return isJavaStyle; +} + +/** + * get C# style identifier. + * If true, a C# source is being indented. + * + * @return state of isSharpStyle option. + */ +bool ASBeautifier::getSharpStyle(void) +{ + return isSharpStyle; +} + +/** + * get the state of the empty line fill option. + * If true, empty lines will be filled with the whitespace. + * of their previous lines. + * If false, these lines will remain empty. + * + * @return state of emptyLineFill option. + */ +bool ASBeautifier::getEmptyLineFill(void) +{ + return emptyLineFill; +} + +/** + * check if there are any indented lines ready to be read by nextLine() + * + * @return are there any indented lines ready? + */ +bool ASBeautifier::hasMoreLines() const +{ + return sourceIterator->hasMoreLines(); +} + +/** + * get the next indented line. + * + * @return indented line. + */ +string ASBeautifier::nextLine() +{ + return beautify(sourceIterator->nextLine()); +} + +/** + * beautify a line of source code. + * every line of source code in a source code file should be sent + * one after the other to the beautify method. + * + * @return the indented line. + * @param originalLine the original unindented line. + */ +string ASBeautifier::beautify(const string &originalLine) +{ + string line; + bool isInLineComment = false; + bool lineStartsInComment = false; + bool isInClass = false; + bool isInSwitch = false; + bool isImmediatelyAfterConst = false; + bool isSpecialChar = false; + char ch = ' '; + char prevCh; + string outBuffer; // the newly idented line is bufferd here + int tabCount = 0; + const string *lastLineHeader = NULL; + bool closingBracketReached = false; + int spaceTabCount = 0; + char tempCh; + size_t headerStackSize = headerStack->size(); + bool shouldIndentBrackettedLine = true; + int lineOpeningBlocksNum = 0; + int lineClosingBlocksNum = 0; + bool previousLineProbation = (probationHeader != NULL); + int i; + + currentHeader = NULL; + lineStartsInComment = isInComment; + blockCommentNoBeautify = blockCommentNoIndent; + previousLineProbationTab = false; + outLineNumber++; + + // handle and remove white spaces around the line: + // If not in comment, first find out size of white space before line, + // so that possible comments starting in the line continue in + // relation to the preliminary white-space. + if (!isInComment) + { + int strlen = originalLine.length(); + leadingWhiteSpaces = 0; + + for (int j = 0; j < strlen && isWhiteSpace(originalLine[j]); j++) + { + if (originalLine[j] == '\t') + leadingWhiteSpaces += indentLength; + else + leadingWhiteSpaces++; + } + line = trim(originalLine); + } + else + { + // convert leading tabs to spaces + string spaceTabs(indentLength, ' '); + string newLine = originalLine; + int strlen = newLine.length(); + + for (int j=0; j < leadingWhiteSpaces && j < strlen; j++) + { + if (newLine[j] == '\t') + { + newLine.replace(j, 1, spaceTabs); + strlen = newLine.length(); + } + } + + // trim the comment leaving the new leading whitespace + int trimSize = 0; + strlen = newLine.length(); + + while (trimSize < strlen + && trimSize < leadingWhiteSpaces + && isWhiteSpace(newLine[trimSize])) + trimSize++; + + + while (trimSize < strlen && isWhiteSpace(newLine[strlen-1])) + strlen--; + + line = newLine.substr(trimSize, strlen); + size_t trimEnd = line.find_last_not_of(" \t"); + if (trimEnd != string::npos) + { + int spacesToDelete = line.length() - 1 - trimEnd; + if (spacesToDelete > 0) + line.erase(trimEnd + 1, spacesToDelete); + } + } + + + if (line.length() == 0) + { + if (backslashEndsPrevLine) // must continue to clear variables + line = ' '; + else if (emptyLineFill) + return preLineWS(prevFinalLineSpaceTabCount, prevFinalLineTabCount); + else + return line; + } + + // handle preprocessor commands + + if (isCStyle && !isInComment && (line[0] == '#' || backslashEndsPrevLine)) + { + if (line[0] == '#') + { + string preproc = trim(string(line.c_str() + 1)); + + // When finding a multi-lined #define statement, the original beautifier + // 1. sets its isInDefineDefinition flag + // 2. clones a new beautifier that will be used for the actual indentation + // of the #define. This clone is put into the activeBeautifierStack in order + // to be called for the actual indentation. + // The original beautifier will have isInDefineDefinition = true, isInDefine = false + // The cloned beautifier will have isInDefineDefinition = true, isInDefine = true + if (preprocessorIndent && preproc.compare(0, 6, "define") == 0 && line[line.length() - 1] == '\\') + { + if (!isInDefineDefinition) + { + ASBeautifier *defineBeautifier; + + // this is the original beautifier + isInDefineDefinition = true; + + // push a new beautifier into the active stack + // this beautifier will be used for the indentation of this define + defineBeautifier = new ASBeautifier(*this); + activeBeautifierStack->push_back(defineBeautifier); + } + else + { + // the is the cloned beautifier that is in charge of indenting the #define. + isInDefine = true; + } + } + else if (preproc.compare(0, 2, "if") == 0) + { + // push a new beautifier into the stack + waitingBeautifierStackLengthStack->push_back(waitingBeautifierStack->size()); + activeBeautifierStackLengthStack->push_back(activeBeautifierStack->size()); + waitingBeautifierStack->push_back(new ASBeautifier(*this)); + } + else if (preproc.compare(0, 4/*2*/, "else") == 0) + { + if (waitingBeautifierStack && !waitingBeautifierStack->empty()) + { + // MOVE current waiting beautifier to active stack. + activeBeautifierStack->push_back(waitingBeautifierStack->back()); + waitingBeautifierStack->pop_back(); + } + } + else if (preproc.compare(0, 4, "elif") == 0) + { + if (waitingBeautifierStack && !waitingBeautifierStack->empty()) + { + // append a COPY current waiting beautifier to active stack, WITHOUT deleting the original. + activeBeautifierStack->push_back(new ASBeautifier(*(waitingBeautifierStack->back()))); + } + } + else if (preproc.compare(0, 5, "endif") == 0) + { + int stackLength; + ASBeautifier *beautifier; + + if (waitingBeautifierStackLengthStack && !waitingBeautifierStackLengthStack->empty()) + { + stackLength = waitingBeautifierStackLengthStack->back(); + waitingBeautifierStackLengthStack->pop_back(); + while ((int) waitingBeautifierStack->size() > stackLength) + { + beautifier = waitingBeautifierStack->back(); + waitingBeautifierStack->pop_back(); + delete beautifier; + } + } + + if (!activeBeautifierStackLengthStack->empty()) + { + stackLength = activeBeautifierStackLengthStack->back(); + activeBeautifierStackLengthStack->pop_back(); + while ((int) activeBeautifierStack->size() > stackLength) + { + beautifier = activeBeautifierStack->back(); + activeBeautifierStack->pop_back(); + delete beautifier; + } + } + } + } + + // check if the last char is a backslash + if (line.length() > 0) + backslashEndsPrevLine = (line[line.length() - 1] == '\\'); + else + backslashEndsPrevLine = false; + + // check if this line ends a multi-line #define + // if so, use the #define's cloned beautifier for the line's indentation + // and then remove it from the active beautifier stack and delete it. + if (!backslashEndsPrevLine && isInDefineDefinition && !isInDefine) + { + string beautifiedLine; + ASBeautifier *defineBeautifier; + + isInDefineDefinition = false; + defineBeautifier = activeBeautifierStack->back(); + activeBeautifierStack->pop_back(); + + beautifiedLine = defineBeautifier->beautify(line); + delete defineBeautifier; + return beautifiedLine; + } + + // unless this is a multi-line #define, return this precompiler line as is. + if (!isInDefine && !isInDefineDefinition) + return originalLine; + } + + // if there exists any worker beautifier in the activeBeautifierStack, + // then use it instead of me to indent the current line. + // variables set by ASFormatter must be updated. + if (!isInDefine && activeBeautifierStack != NULL && !activeBeautifierStack->empty()) + { + activeBeautifierStack->back()->inLineNumber = inLineNumber; + activeBeautifierStack->back()->outLineNumber = outLineNumber; + activeBeautifierStack->back()->lineCommentNoBeautify = lineCommentNoBeautify; + activeBeautifierStack->back()->isNonInStatementArray = isNonInStatementArray; + return activeBeautifierStack->back()->beautify(line); + } + + // calculate preliminary indentation based on data from past lines + if (!inStatementIndentStack->empty()) + spaceTabCount = inStatementIndentStack->back(); + + + for (i = 0; i < (int) headerStackSize; i++) + { + isInClass = false; + + if (blockIndent || (!(i > 0 && (*headerStack)[i-1] != &AS_OPEN_BRACKET + && (*headerStack)[i] == &AS_OPEN_BRACKET))) + ++tabCount; + + if (!isJavaStyle && !namespaceIndent && i >= 1 + && (*headerStack)[i-1] == &AS_NAMESPACE + && (*headerStack)[i] == &AS_OPEN_BRACKET) + --tabCount; + + if (isCStyle && i >= 1 + && (*headerStack)[i-1] == &AS_CLASS + && (*headerStack)[i] == &AS_OPEN_BRACKET) + { + if (classIndent) + ++tabCount; + isInClass = true; + } + + // is the switchIndent option is on, indent switch statements an additional indent. + else if (switchIndent && i > 1 && + (*headerStack)[i-1] == &AS_SWITCH && + (*headerStack)[i] == &AS_OPEN_BRACKET + ) + { + ++tabCount; + isInSwitch = true; + } + + } + + if (!lineStartsInComment + && isCStyle + && isInClass + && classIndent + && headerStackSize >= 2 + && (*headerStack)[headerStackSize-2] == &AS_CLASS + && (*headerStack)[headerStackSize-1] == &AS_OPEN_BRACKET + && line[0] == '}') + --tabCount; + + else if (!lineStartsInComment + && isInSwitch + && switchIndent + && headerStackSize >= 2 + && (*headerStack)[headerStackSize-2] == &AS_SWITCH + && (*headerStack)[headerStackSize-1] == &AS_OPEN_BRACKET + && line[0] == '}') + --tabCount; + + if (isInClassHeader) + { + isInClassHeaderTab = true; + tabCount += 2; + } + + if (isInConditional) + { + --tabCount; + } + + + // parse characters in the current line. + + for (i = 0; i < (int) line.length(); i++) + { + tempCh = line[i]; + + prevCh = ch; + ch = tempCh; + + outBuffer.append(1, ch); + + if (isWhiteSpace(ch)) + continue; + + // check for utf8 characters + // isalnum() will display an assert message in debug if not bypassed here + if (ch < 0) + continue; + + // handle special characters (i.e. backslash+character such as \n, \t, ...) + if (isSpecialChar) + { + isSpecialChar = false; + continue; + } + if (!(isInComment || isInLineComment) && line.compare(i, 2, "\\\\") == 0) + { + outBuffer.append(1, '\\'); + i++; + continue; + } + if (!(isInComment || isInLineComment) && ch == '\\') + { + isSpecialChar = true; + continue; + } + + // handle quotes (such as 'x' and "Hello Dolly") + if (!(isInComment || isInLineComment) && (ch == '"' || ch == '\'')) + if (!isInQuote) + { + quoteChar = ch; + isInQuote = true; + } + else if (quoteChar == ch) + { + isInQuote = false; + isInStatement = true; + continue; + } + if (isInQuote) + continue; + + // handle comments + + if (!(isInComment || isInLineComment) && line.compare(i, 2, "//") == 0) + { + isInLineComment = true; + outBuffer.append(1, '/'); + i++; + continue; + } + else if (!(isInComment || isInLineComment) && line.compare(i, 2, "/*") == 0) + { + isInComment = true; + outBuffer.append(1, '*'); + i++; + size_t j = line.find_first_not_of(" \t"); + if (!line.compare(j, 2, "/*") == 0) // does line start with comment? + blockCommentNoIndent = true; // if no, cannot indent continuation lines + continue; + } + else if ((isInComment || isInLineComment) && line.compare(i, 2, "*/") == 0) + { + isInComment = false; + outBuffer.append(1, '/'); + i++; + blockCommentNoIndent = false; // ok to indent next comment + continue; + } + + if (isInComment || isInLineComment) + continue; + + // if we have reached this far then we are NOT in a comment or string of special character... + + if (probationHeader != NULL) + { + if (((probationHeader == &AS_STATIC || probationHeader == &AS_CONST) && ch == '{') + || (probationHeader == &AS_SYNCHRONIZED && ch == '(')) + { + // insert the probation header as a new header + isInHeader = true; + headerStack->push_back(probationHeader); + + // handle the specific probation header + isInConditional = (probationHeader == &AS_SYNCHRONIZED); + if (probationHeader == &AS_CONST) + isImmediatelyAfterConst = true; + + isInStatement = false; + // if the probation comes from the previous line, then indent by 1 tab count. + if (previousLineProbation && ch == '{') + { + tabCount++; + previousLineProbationTab = true; + } + previousLineProbation = false; + } + + // dismiss the probation header + probationHeader = NULL; + } + + prevNonSpaceCh = currentNonSpaceCh; + currentNonSpaceCh = ch; + if (!isLegalNameChar(ch) && ch != ',' && ch != ';') + { + prevNonLegalCh = currentNonLegalCh; + currentNonLegalCh = ch; + } + + if (isInHeader) + { + isInHeader = false; + currentHeader = headerStack->back(); + } + else + currentHeader = NULL; + + if (isCStyle && isInTemplate + && (ch == '<' || ch == '>') + && findHeader(line, i, nonAssignmentOperators) == NULL) + { + if (ch == '<') + { + ++templateDepth; + } + else if (ch == '>') + { + if (--templateDepth <= 0) + { + if (isInTemplate) + ch = ';'; + else + ch = 't'; + isInTemplate = false; + templateDepth = 0; + } + } + } + + // handle parenthesies + if (ch == '(' || ch == '[' || ch == ')' || ch == ']') + { + if (ch == '(' || ch == '[') + { + if (parenDepth == 0) + { + parenStatementStack->push_back(isInStatement); + isInStatement = true; + } + parenDepth++; + + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + + if (currentHeader != NULL) + registerInStatementIndent(line, i, spaceTabCount, minConditionalIndent/*indentLength*2*/, true); + else + registerInStatementIndent(line, i, spaceTabCount, 0, true); + } + else if (ch == ')' || ch == ']') + { + parenDepth--; + if (parenDepth == 0) + { + isInStatement = parenStatementStack->back(); + parenStatementStack->pop_back(); + ch = ' '; + + isInConditional = false; + } + + if (!inStatementIndentStackSizeStack->empty()) + { + int previousIndentStackSize = inStatementIndentStackSizeStack->back(); + inStatementIndentStackSizeStack->pop_back(); + while (previousIndentStackSize < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + + if (!parenIndentStack->empty()) + { + int poppedIndent = parenIndentStack->back(); + parenIndentStack->pop_back(); + + if (i == 0) + spaceTabCount = poppedIndent; + } + } + } + + continue; + } + + + if (ch == '{') + { + bool isBlockOpener; + // first, check if '{' is a block-opener or an static-array opener + isBlockOpener = ((prevNonSpaceCh == '{' && bracketBlockStateStack->back()) + || prevNonSpaceCh == '}' + || prevNonSpaceCh == ')' + || prevNonSpaceCh == ';' + || peekNextChar(line, i) == '{' + || isNonInStatementArray + || isInClassHeader +// || isBlockOpener + || isImmediatelyAfterConst + || (isInDefine && + (prevNonSpaceCh == '(' + || prevNonSpaceCh == '_' + || isalnum(prevNonSpaceCh)))); + + isInClassHeader = false; + if (!isBlockOpener && currentHeader != NULL) + { + for (size_t n = 0; n < nonParenHeaders.size(); n++) + if (currentHeader == nonParenHeaders[n]) + { + isBlockOpener = true; + break; + } + } + bracketBlockStateStack->push_back(isBlockOpener); + if (!isBlockOpener) + { + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + registerInStatementIndent(line, i, spaceTabCount, 0, true); + parenDepth++; + if (i == 0) + shouldIndentBrackettedLine = false; + + continue; + } + + // this bracket is a block opener... + + ++lineOpeningBlocksNum; +// if (isInClassHeader) +// isInClassHeader = false; + + if (isInClassHeaderTab) + { + isInClassHeaderTab = false; + // decrease tab count if bracket is broken + size_t firstChar = line.find_first_not_of(" \t"); + if (firstChar != string::npos) + if (line[firstChar] == '{' && (int) firstChar == i) + tabCount -= 2; + } + + // do not allow inStatementIndent - should occur for Java files only + if (inStatementIndentStack->size() > 0) + { + spaceTabCount = 0; + inStatementIndentStack->back() = 0; + } + + blockParenDepthStack->push_back(parenDepth); + blockStatementStack->push_back(isInStatement); + + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + if (inStatementIndentStack->size() > 0) + inStatementIndentStack->back() = 0; + + blockTabCount += isInStatement ? 1 : 0; + parenDepth = 0; + isInStatement = false; + + tempStacks->push_back(new vector); + headerStack->push_back(&AS_OPEN_BRACKET); + lastLineHeader = &AS_OPEN_BRACKET; + + continue; + } + + //check if a header has been reached + if (isWhiteSpace(prevCh)) + { + bool isIndentableHeader = true; + const string *newHeader = findHeader(line, i, headers); + if (newHeader != NULL) + { + // if we reached here, then this is a header... + isInHeader = true; + + vector *lastTempStack; + if (tempStacks->empty()) + lastTempStack = NULL; + else + lastTempStack = tempStacks->back(); + + // if a new block is opened, push a new stack into tempStacks to hold the + // future list of headers in the new block. + + // take care of the special case: 'else if (...)' + if (newHeader == &AS_IF && lastLineHeader == &AS_ELSE) + { + headerStack->pop_back(); + } + + // take care of 'else' + else if (newHeader == &AS_ELSE) + { + if (lastTempStack != NULL) + { + int indexOfIf = indexOf(*lastTempStack, &AS_IF); + if (indexOfIf != -1) + { + // recreate the header list in headerStack up to the previous 'if' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfIf - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + if (!closingBracketReached) + tabCount += restackSize; + } + /* + * If the above if is not true, i.e. no 'if' before the 'else', + * then nothing beautiful will come out of this... + * I should think about inserting an Exception here to notify the caller of this... + */ + } + } + + // check if 'while' closes a previous 'do' + else if (newHeader == &AS_WHILE) + { + if (lastTempStack != NULL) + { + int indexOfDo = indexOf(*lastTempStack, &AS_DO); + if (indexOfDo != -1) + { + // recreate the header list in headerStack up to the previous 'do' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfDo - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + if (!closingBracketReached) + tabCount += restackSize; + } + } + } + // check if 'catch' closes a previous 'try' or 'catch' + else if (newHeader == &AS_CATCH || newHeader == &AS_FINALLY) + { + if (lastTempStack != NULL) + { + int indexOfTry = indexOf(*lastTempStack, &AS_TRY); + if (indexOfTry == -1) + indexOfTry = indexOf(*lastTempStack, &AS_CATCH); + if (indexOfTry != -1) + { + // recreate the header list in headerStack up to the previous 'try' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfTry - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + + if (!closingBracketReached) + tabCount += restackSize; + } + } + } + else if (newHeader == &AS_CASE) + { + isInCase = true; + --tabCount; + } + else if (newHeader == &AS_DEFAULT) + { + isInCase = true; + --tabCount; + } + else if (newHeader == &AS_STATIC + || newHeader == &AS_SYNCHRONIZED + || (newHeader == &AS_CONST && isCStyle)) + { + if (!headerStack->empty() && + (headerStack->back() == &AS_STATIC + || headerStack->back() == &AS_SYNCHRONIZED + || headerStack->back() == &AS_CONST)) + { + isIndentableHeader = false; + } + else + { + isIndentableHeader = false; + probationHeader = newHeader; + } + } + else if (newHeader == &AS_CONST) + { + isIndentableHeader = false; + } + else if (newHeader == &AS_TEMPLATE) + { + if (isCStyle) + isInTemplate = true; + isIndentableHeader = false; + } + + + if (isIndentableHeader) + { + headerStack->push_back(newHeader); + isInStatement = false; + if (indexOf(nonParenHeaders, newHeader) == -1) + { + isInConditional = true; + } + lastLineHeader = newHeader; + } + else + isInHeader = false; + + outBuffer.append(newHeader->substr(1)); + i += newHeader->length() - 1; + + continue; + } + } + + if (isCStyle && !isalpha(prevCh) + && line.compare(i, 8, "operator") == 0 && !isalnum(line[i+8])) + { + isInOperator = true; + outBuffer.append(AS_OPERATOR.substr(1)); + i += 7; + continue; + } + + // "new" operator is a pointer, not a calculation + if (!isalpha(prevCh) + && line.compare(i, 3, "new") == 0 && !isalnum(line[i+3])) + { + if (prevNonSpaceCh == '=' && isInStatement && !inStatementIndentStack->empty()) + inStatementIndentStack->back() = 0; + } + + if (ch == '?') + isInQuestion = true; + + + // special handling of 'case' statements + if (ch == ':') + { + if ((int) line.length() > i + 1 && line[i+1] == ':') // look for :: + { + ++i; + outBuffer.append(1, ':'); + ch = ' '; + continue; + } + + else if (isInQuestion) + { + isInQuestion = false; + } + + else if (isCStyle && isInClass && prevNonSpaceCh != ')') + { + --tabCount; + // found a 'private:' or 'public:' inside a class definition + // so do nothing special + } + + else if (!isJavaStyle && isInClassHeader) + { + // found a 'class A : public B' definition + // so do nothing special + } + + else if (isJavaStyle && lastLineHeader == &AS_FOR) + { + // found a java for-each statement + // so do nothing special + } + + else if (isCStyle && prevNonSpaceCh == ')') + { + isInClassHeader = true; + if (i == 0) + tabCount += 2; + } + else + { + currentNonSpaceCh = ';'; // so that brackets after the ':' will appear as block-openers + if (isInCase) + { + isInCase = false; + ch = ';'; // from here on, treat char as ';' + } + + + else // is in a label (e.g. 'label1:') + { + if (labelIndent) + --tabCount; // unindent label by one indent + else + tabCount = 0; // completely flush indent to left + } + + + + } + } + + if ((ch == ';' || (parenDepth > 0 && ch == ',')) && !inStatementIndentStackSizeStack->empty()) + while ((int) inStatementIndentStackSizeStack->back() + (parenDepth > 0 ? 1 : 0) + < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + + + // handle ends of statements + if ((ch == ';' && parenDepth == 0) || ch == '}'/* || (ch == ',' && parenDepth == 0)*/) + { + if (ch == '}') + { + // first check if this '}' closes a previous block, or a static array... + if (!bracketBlockStateStack->empty()) + { + bool bracketBlockState = bracketBlockStateStack->back(); + bracketBlockStateStack->pop_back(); + if (!bracketBlockState) + { + if (!inStatementIndentStackSizeStack->empty()) + { + // this bracket is a static array + + int previousIndentStackSize = inStatementIndentStackSizeStack->back(); + inStatementIndentStackSizeStack->pop_back(); + while (previousIndentStackSize < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + parenDepth--; + if (i == 0) + shouldIndentBrackettedLine = false; + + if (!parenIndentStack->empty()) + { + int poppedIndent = parenIndentStack->back(); + parenIndentStack->pop_back(); + if (i == 0) + spaceTabCount = poppedIndent; + } + } + continue; + } + } + + // this bracket is block closer... + + ++lineClosingBlocksNum; + + if (!inStatementIndentStackSizeStack->empty()) + inStatementIndentStackSizeStack->pop_back(); + + if (!blockParenDepthStack->empty()) + { + parenDepth = blockParenDepthStack->back(); + blockParenDepthStack->pop_back(); + isInStatement = blockStatementStack->back(); + blockStatementStack->pop_back(); + + if (isInStatement) + blockTabCount--; + } + + closingBracketReached = true; + int headerPlace = indexOf(*headerStack, &AS_OPEN_BRACKET); + if (headerPlace != -1) + { + const string *popped = headerStack->back(); + while (popped != &AS_OPEN_BRACKET) + { + headerStack->pop_back(); + popped = headerStack->back(); + } + headerStack->pop_back(); + + if (!tempStacks->empty()) + { + vector *temp = tempStacks->back(); + tempStacks->pop_back(); + delete temp; + } + } + + + ch = ' '; // needed due to cases such as '}else{', so that headers ('else' tn tih case) will be identified... + } + + /* + * Create a temporary snapshot of the current block's header-list in the + * uppermost inner stack in tempStacks, and clear the headerStack up to + * the begining of the block. + * Thus, the next future statement will think it comes one indent past + * the block's '{' unless it specifically checks for a companion-header + * (such as a previous 'if' for an 'else' header) within the tempStacks, + * and recreates the temporary snapshot by manipulating the tempStacks. + */ + if (!tempStacks->back()->empty()) + while (!tempStacks->back()->empty()) + tempStacks->back()->pop_back(); + + while (!headerStack->empty() && headerStack->back() != &AS_OPEN_BRACKET) + { + tempStacks->back()->push_back(headerStack->back()); + headerStack->pop_back(); + } + + if (parenDepth == 0 && ch == ';') + isInStatement = false; + + previousLastLineHeader = NULL; + isInClassHeader = false; + isInQuestion = false; + + continue; + } + + + // check for preBlockStatements ONLY if not within parenthesies + // (otherwise 'struct XXX' statements would be wrongly interpreted...) + if (isWhiteSpace(prevCh) && !isInTemplate && parenDepth == 0) + { + const string *newHeader = findHeader(line, i, preBlockStatements); + if (newHeader != NULL) + { + isInClassHeader = true; + outBuffer.append(newHeader->substr(1)); + i += newHeader->length() - 1; + headerStack->push_back(newHeader); + } + } + + // Handle operators + + immediatelyPreviousAssignmentOp = NULL; + + // Check if an operator has been reached. + const string *foundAssignmentOp = findHeader(line, i, assignmentOperators, false); + if (foundAssignmentOp == &AS_RETURN) + foundAssignmentOp = findHeader(line, i, assignmentOperators, true); + const string *foundNonAssignmentOp = findHeader(line, i, nonAssignmentOperators, false); + + // Since findHeader's boundry checking was not used above, it is possible + // that both an assignment op and a non-assignment op where found, + // e.g. '>>' and '>>='. If this is the case, treat the LONGER one as the + // found operator. + if (foundAssignmentOp != NULL && foundNonAssignmentOp != NULL) + if (foundAssignmentOp->length() < foundNonAssignmentOp->length()) + foundAssignmentOp = NULL; + else + foundNonAssignmentOp = NULL; + + if (foundNonAssignmentOp != NULL) + { + if (foundNonAssignmentOp->length() > 1) + { + outBuffer.append(foundNonAssignmentOp->substr(1)); + i += foundNonAssignmentOp->length() - 1; + } + } + + else if (foundAssignmentOp != NULL) + { + if (foundAssignmentOp->length() > 1) + { + outBuffer.append(foundAssignmentOp->substr(1)); + i += foundAssignmentOp->length() - 1; + } + + if (!isInOperator && !isInTemplate && !isNonInStatementArray) + { + registerInStatementIndent(line, i, spaceTabCount, 0, false); + immediatelyPreviousAssignmentOp = foundAssignmentOp; + isInStatement = true; + } + } + + if (isInOperator) + isInOperator = false; + } + + // handle special cases of unindentation: + + /* + * if '{' doesn't follow an immediately previous '{' in the headerStack + * (but rather another header such as "for" or "if", then unindent it + * by one indentation relative to its block. + */ + + if (!lineStartsInComment + && !blockIndent + && outBuffer.length() > 0 + && outBuffer[0] == '{' + && !(lineOpeningBlocksNum > 0 && lineOpeningBlocksNum == lineClosingBlocksNum) + && !(headerStack->size() > 1 && (*headerStack)[headerStack->size()-2] == &AS_OPEN_BRACKET) + && shouldIndentBrackettedLine) + --tabCount; + + else if (!lineStartsInComment + && outBuffer.length() > 0 + && outBuffer[0] == '}' + && shouldIndentBrackettedLine) + --tabCount; + + // correctly indent one-line-blocks... + else if (!lineStartsInComment + && outBuffer.length() > 0 + && lineOpeningBlocksNum > 0 + && lineOpeningBlocksNum == lineClosingBlocksNum + && previousLineProbationTab) + --tabCount; //lineOpeningBlocksNum - (blockIndent ? 1 : 0); + + if (tabCount < 0) + tabCount = 0; + + // take care of extra bracket indentatation option... + if (bracketIndent && outBuffer.length() > 0 && shouldIndentBrackettedLine) + if (outBuffer[0] == '{' || outBuffer[0] == '}') + tabCount++; + + + if (isInDefine) + { + if (outBuffer[0] == '#') + { + string preproc = trim(string(outBuffer.c_str() + 1)); + if (preproc.compare(0, 6, "define") == 0) + { + if (!inStatementIndentStack->empty() + && inStatementIndentStack->back() > 0) + { + defineTabCount = tabCount; + } + else + { + defineTabCount = tabCount - 1; + tabCount--; + } + } + } + + tabCount -= defineTabCount; + } + + if (tabCount < 0) + tabCount = 0; + if (lineCommentNoBeautify || blockCommentNoBeautify) + tabCount = spaceTabCount = 0; + + // finally, insert indentations into begining of line + + prevFinalLineSpaceTabCount = spaceTabCount; + prevFinalLineTabCount = tabCount; + + if (shouldForceTabIndentation) + { + tabCount += spaceTabCount / indentLength; + spaceTabCount = spaceTabCount % indentLength; + } + + outBuffer = preLineWS(spaceTabCount, tabCount) + outBuffer; + + if (lastLineHeader != NULL) + previousLastLineHeader = lastLineHeader; + + return outBuffer; +} + + +string ASBeautifier::preLineWS(int spaceTabCount, int tabCount) +{ + string ws; + + for (int i = 0; i < tabCount; i++) + ws += indentString; + + while ((spaceTabCount--) > 0) + ws += string(" "); + + return ws; + +} + +/** + * register an in-statement indent. + */ +void ASBeautifier::registerInStatementIndent(const string &line, int i, int spaceTabCount, + int minIndent, bool updateParenStack) +{ + int inStatementIndent; + int remainingCharNum = line.length() - i; + int nextNonWSChar = getNextProgramCharDistance(line, i); + + // if indent is around the last char in the line, indent instead 2 spaces from the previous indent + if (nextNonWSChar == remainingCharNum) + { + int previousIndent = spaceTabCount; + if (!inStatementIndentStack->empty()) + previousIndent = inStatementIndentStack->back(); + + inStatementIndentStack->push_back(/*2*/ indentLength + previousIndent); + if (updateParenStack) + parenIndentStack->push_back(previousIndent); + return; + } + + if (updateParenStack) + parenIndentStack->push_back(i + spaceTabCount); + + inStatementIndent = i + nextNonWSChar + spaceTabCount; + + if (i + nextNonWSChar < minIndent) + inStatementIndent = minIndent + spaceTabCount; + + if (i + nextNonWSChar > maxInStatementIndent) + inStatementIndent = indentLength * 2 + spaceTabCount; + + if (!inStatementIndentStack->empty() && + inStatementIndent < inStatementIndentStack->back()) + inStatementIndent = inStatementIndentStack->back(); + + if (isNonInStatementArray) + inStatementIndent = 0; + + inStatementIndentStack->push_back(inStatementIndent); +} + +/** + * get distance to the next non-white sspace, non-comment character in the line. + * if no such character exists, return the length remaining to the end of the line. + */ +int ASBeautifier::getNextProgramCharDistance(const string &line, int i) +{ + bool inComment = false; + int remainingCharNum = line.length() - i; + int charDistance; + char ch; + + for (charDistance = 1; charDistance < remainingCharNum; charDistance++) + { + ch = line[i + charDistance]; + if (inComment) + { + if (line.compare(i + charDistance, 2, "*/") == 0) + { + charDistance++; + inComment = false; + } + continue; + } + else if (isWhiteSpace(ch)) + continue; + else if (ch == '/') + { + if (line.compare(i + charDistance, 2, "//") == 0) + return remainingCharNum; + else if (line.compare(i + charDistance, 2, "/*") == 0) + { + charDistance++; + inComment = true; + } + } + else + return charDistance; + } + + return charDistance; +} + + +/** + * check if a specific line position contains a header, out of several possible headers. + * + * @return a pointer to the found header. if no header was found then return NULL. + */ +const string *ASBeautifier::findHeader(const string &line, int i, const vector &possibleHeaders, bool checkBoundry) +{ + int maxHeaders = possibleHeaders.size(); + // const string *header = NULL; + int p; + + for (p = 0; p < maxHeaders; p++) + { + const string *header = possibleHeaders[p]; + + if (line.compare(i, header->length(), header->c_str()) == 0) + { + // check that this is a header and not a part of a longer word + // (e.g. not at its begining, not at its middle...) + + int lineLength = line.length(); + int headerEnd = i + header->length(); + char startCh = (*header)[0]; // first char of header + char endCh = 0; // char just after header + char prevCh = 0; // char just before header + + if (headerEnd < lineLength) + { + endCh = line[headerEnd]; + } + if (i > 0) + { + prevCh = line[i-1]; + } + + if (!checkBoundry) + { + return header; + } + else if (prevCh != 0 + && isLegalNameChar(startCh) + && isLegalNameChar(prevCh)) + { + return NULL; + } + else if (headerEnd >= lineLength + || !isLegalNameChar(startCh) + || !isLegalNameChar(endCh)) + { + return header; + } + else + { + return NULL; + } + } + } + + return NULL; +} + +/** + * find the index number of a string element in a container of strings + * + * @return the index number of element in the ocntainer. -1 if element not found. + * @param container a vector of strings. + * @param element the element to find . + */ +int ASBeautifier::indexOf(vector &container, const string *element) +{ + vector::const_iterator where; + + where = find(container.begin(), container.end(), element); + if (where == container.end()) + return -1; + else + return (int) (where - container.begin()); +} + +/** + * trim removes the white space surrounding a line. + * + * @return the trimmed line. + * @param str the line to trim. + */ +string ASBeautifier::trim(const string &str) +{ + + int start = 0; + int end = str.length() - 1; + + while (start < end && isWhiteSpace(str[start])) + start++; + + while (start <= end && isWhiteSpace(str[end])) + end--; + + string returnStr(str, start, end + 1 - start); + return returnStr; +} + +/** +* peek at the next unread character. +* +* @return the next unread character. +* @param line the line to check. +* @param i the current char position on the line. +*/ +char ASBeautifier::peekNextChar(string &line, int i) +{ + char ch = ' '; + size_t peekNum = line.find_first_not_of(" \t", i + 1); + + if (peekNum == string::npos) + return ch; + + ch = line[peekNum]; + + return ch; +} + + +} // end namespace astyle + diff --git a/CodeFormatter/ASEnhancer.cpp b/CodeFormatter/ASEnhancer.cpp new file mode 100644 index 0000000000..40292fe6f1 --- /dev/null +++ b/CodeFormatter/ASEnhancer.cpp @@ -0,0 +1,485 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASEnhancer.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +// can trace only if NDEBUG is not defined +#ifndef NDEBUG +// #define TRACEswitch +// #define TRACEcase +// #define TRACEmisc +#endif + +#include "astyle.h" + +//#define new DEBUG_NEW + +#include +#include +#include + +#ifdef TRACEswitch +#define TRswitch(a,b) *traceOut << lineNumber << a << b << endl; +#else +#define TRswitch(a,b) ((void)0) +#endif // TRACEswitch +#ifdef TRACEcase +#define TRcase(a,b) *traceOut << lineNumber << a << b << endl; +#else +#define TRcase(a,b) ((void)0) +#endif // TRACEcase +#ifdef TRACEmisc +#define TRmisc(a) *traceOut << lineNumber << a << endl; +#else +#define TRmisc(a) ((void)0) +#endif // TRACEmisc + + +namespace astyle +{ + +// ---------------------------- functions for ASEnhancer Class ------------------------------------- + +/** + * ASEnhancer constructor + */ +ASEnhancer::ASEnhancer() +{ + // variables are initialized by init() + traceOut = new stringstream; +} + +/** + * Destructor of ASEnhancer + * Display the TRACE entries. + */ +ASEnhancer::~ASEnhancer() +{ +#if defined(TRACEswitch) || defined(TRACEcase) || defined(TRACEmisc) + string line; + string msg = "TRACE Entries\n\n"; + char countLine[50]; + int count = 0; + + while (getline(*traceOut, line)) + { + msg += line + '\n'; + count++; + } + sprintf(countLine, "\n%d Entries", count); + msg += countLine; + // write a text file to "My Documents" (Windows) + char filename [_MAX_PATH + _MAX_FNAME + _MAX_EXT + 1]; // full path and filename + strcpy(filename, getenv("USERPROFILE")); + strcat(filename, "\\My Documents\\tracee.txt"); + ofstream outfile(filename); + outfile << msg; + outfile.close(); +#endif + delete traceOut; +} + +/** + * initialize the ASEnhancer. + * + * init() is called each time an ASFormatter object is initialized. + */ +void ASEnhancer::init(int _indentLength, + string _indentString, + bool _isCStyle, + bool _isJavaStyle, + bool _isSharpStyle, + bool _caseIndent, + bool _emptyLineFill) +{ + // formatting variables from ASFormatter and ASBeautifier + indentLength = _indentLength; + if (_indentString.compare(0, 1, "\t") == 0) + useTabs = true; + else + useTabs = false; + isCStyle = _isCStyle; + isJavaStyle = _isJavaStyle; + isSharpStyle = _isSharpStyle; + caseIndent = _caseIndent; + emptyLineFill = _emptyLineFill; + + // unindent variables + lineNumber = 0; + bracketCount = 0; + isInComment = false; + isInQuote = false; + switchDepth = 0; + lookingForCaseBracket = false; + unindentNextLine = false; + +#if defined(TRACEswitch) || defined(TRACEcase) || defined(TRACEmisc) + *traceOut << "New file -------------" << endl; +#endif +} + +/** + * additional formatting for line of source code. + * every line of source code in a source code file should be sent + * one after the other to this function. + * indents event tables + * unindents the case blocks + * + * @param line the original formatted line will be updated if necessary. + */ +void ASEnhancer::enhance(string &line) +{ + static vector swVector; // stack vector of switch variables + static switchVariables sw; // switch variables struct + + static bool nextLineIsEventTable; // begin event table is reached + static bool isInEventTable; // need to indent an event table + + bool isSpecialChar = false; + size_t lineLength; // length of the line being parsed + + lineNumber++; + lineLength = line.length(); + + // check for beginning of event table + if (nextLineIsEventTable) + { + isInEventTable = true; + nextLineIsEventTable = false; + } + + if (lineLength == 0 + && ! isInEventTable + && ! emptyLineFill) + return; + + // test for unindent on attached brackets + if (unindentNextLine) + { + sw.unindentDepth++; + sw.unindentCase = true; + unindentNextLine = false; + TRcase(" unindent case ", sw.unindentDepth); + } + + // parse characters in the current line. + + for (size_t i = 0; i < lineLength; i++) + { + char ch = line[i]; + + // bypass whitespace + if (isWhiteSpaceX(ch)) + continue; + + // handle special characters (i.e. backslash+character such as \n, \t, ...) + if (isSpecialChar) + { + isSpecialChar = false; + continue; + } + if (!(isInComment) && line.compare(i, 2, "\\\\") == 0) + { + i++; + continue; + } + if (!(isInComment) && ch == '\\') + { + isSpecialChar = true; + continue; + } + + // handle quotes (such as 'x' and "Hello Dolly") + if (!(isInComment) && (ch == '"' || ch == '\'')) + if (!isInQuote) + { + quoteChar = ch; + isInQuote = true; + } + else if (quoteChar == ch) + { + isInQuote = false; + continue; + } + + if (isInQuote) + continue; + + // handle comments + + if (!(isInComment) && line.compare(i, 2, "//") == 0) + { + // check for windows line markers + if (line.compare(i + 2, 1, "\xf0") > 0) + lineNumber--; + break; // finished with the line + } + else if (!(isInComment) && line.compare(i, 2, "/*") == 0) + { + isInComment = true; + i++; + continue; + } + else if ((isInComment) && line.compare(i, 2, "*/") == 0) + { + isInComment = false; + i++; + continue; + } + + if (isInComment) + continue; + + // if we have reached this far then we are NOT in a comment or string of special characters + + if (line[i] == '{') // if open bracket + bracketCount++; + + if (line[i] == '}') // if close bracket + bracketCount--; + + // ---------------- process event tables -------------------------------------- + + // check for event table begin + if (findKeyword(line, i, "BEGIN_EVENT_TABLE") + || findKeyword(line, i, "BEGIN_MESSAGE_MAP")) + nextLineIsEventTable = true; + + // check for event table end + if (findKeyword(line, i, "END_EVENT_TABLE") + || findKeyword(line, i, "END_MESSAGE_MAP")) + isInEventTable = false; + + // ---------------- process switch statements --------------------------------- + + if (findKeyword(line, i, "switch")) // if switch statement + { + switchDepth++; // bump switch depth + TRswitch(" switch ", switchDepth); + swVector.push_back(sw); // save current variables + sw.switchBracketCount = 0; + sw.unindentCase = false; // don't clear case until end of switch + i += 5; // bypass switch statement + continue; + } + + // just want switch statements from this point + + if (caseIndent || switchDepth == 0) // from here just want switch statements + continue; // get next char + + if (line[i] == '{') // if open bracket + { + sw.switchBracketCount++; + if (lookingForCaseBracket) // if 1st after case statement + { + sw.unindentCase = true; // unindenting this case + sw.unindentDepth++; // bump depth + lookingForCaseBracket = false; // not looking now + TRcase(" unindent case ", sw.unindentDepth); + } + continue; + } + + lookingForCaseBracket = false; // no opening bracket, don't indent + + if (line[i] == '}') // if close bracket + { + sw.switchBracketCount--; + if (sw.switchBracketCount == 0) // if end of switch statement + { + TRswitch(" endsw ", switchDepth); + switchDepth--; // one less switch + sw = swVector.back(); // restore sw struct + swVector.pop_back(); // remove last entry from stack + } + continue; + } + + // look for case or default header + + if (findKeyword(line, i, "case") || findKeyword(line, i, "default")) + { + if (sw.unindentCase) // if unindented last case + { + sw.unindentCase = false; // stop unindenting previous case + sw.unindentDepth--; // reduce depth + } + for (; i < lineLength; i++) // bypass colon + { + if (line[i] == ':') + if ((i + 1 < lineLength) && (line[i + 1] == ':')) + i++; // bypass scope resolution operator + else + break; + } + i++; + for (; i < lineLength; i++) // bypass whitespace + { + if (!(isWhiteSpaceX(line[i]))) + break; + } + if (i < lineLength) // check for bracket + { + if (line[i] == '{') // if bracket found + { + sw.switchBracketCount++; + unindentNextLine = true; // start unindenting on next line + continue; + } + } + lookingForCaseBracket = true; // bracket must be on next line + i--; // need to check for comments + continue; + } + } // end of for loop + + if (isInEventTable) // if need to indent + indentLine(line, 1); // do it + + if (sw.unindentDepth > 0) // if need to unindent + unindentLine(line, sw.unindentDepth); // do it +} + +/** + * indent a line by a given number of tabsets + * by inserting leading whitespace to the line argument. + * + * @param line a pointer to the line to indent. + * @param unindent the number of tabsets to insert. + * @return the number of characters inserted. + */ +int ASEnhancer::indentLine(string &line, const int indent) const +{ + if (line.length() == 0 + && ! emptyLineFill) + return 0; + + size_t charsToInsert; // number of chars to insert + + if (useTabs) // if formatted with tabs + { + charsToInsert = indent; // tabs to insert + line.insert((size_t) 0, charsToInsert, '\t'); // insert the tabs + } + else + { + charsToInsert = indent * indentLength; // compute chars to insert + line.insert((size_t)0, charsToInsert, ' '); // insert the spaces + } + + return charsToInsert; +} + +/** + * unindent a line by a given number of tabsets + * by erasing the leading whitespace from the line argument. + * + * @param line a pointer to the line to unindent. + * @param unindent the number of tabsets to erase. + * @return the number of characters erased. + */ +int ASEnhancer::unindentLine(string &line, const int unindent) const +{ + size_t whitespace = line.find_first_not_of(" \t"); + + if (whitespace == string::npos) // if line is blank + whitespace = line.length(); // must remove padding, if any + + if (whitespace == 0) + return 0; + + size_t charsToErase; // number of chars to erase + + if (useTabs) // if formatted with tabs + { + charsToErase = unindent; // tabs to erase + if (charsToErase <= whitespace) // if there is enough whitespace + line.erase(0, charsToErase); // erase the tabs + else + charsToErase = 0; + } + else + { + charsToErase = unindent * indentLength; // compute chars to erase + if (charsToErase <= whitespace) // if there is enough whitespace + line.erase(0, charsToErase); // erase the spaces + else + charsToErase = 0; + } + + return charsToErase; +} + +/** + * check if a specific line position contains a keyword. + * + * @return true if the word was found. false if the word was not found. + */ +bool ASEnhancer::findKeyword(const string &line, int i, const char *keyword) const +{ + if (line.compare(i, strlen(keyword), keyword) == 0) + { + // check that this is a header and not a part of a longer word + // (e.g. not at its begining, not at its middle...) + + int lineLength = line.length(); + int wordEnd = i + strlen(keyword); + char startCh = keyword[0]; // first char of header + char endCh = 0; // char just after header + char prevCh = 0; // char just before header + + if (wordEnd < lineLength) + { + endCh = line[wordEnd]; + } + if (i > 0) + { + prevCh = line[i-1]; + } + + if (prevCh != 0 + && isLegalNameCharX(startCh) + && isLegalNameCharX(prevCh)) + { + return false; + } + else if (wordEnd >= lineLength + || !isLegalNameCharX(startCh) + || !isLegalNameCharX(endCh)) + { + return true; + } + else + { + return false; + } + } + + return false; +} + +} // end namespace astyle diff --git a/CodeFormatter/ASFormatter.cpp b/CodeFormatter/ASFormatter.cpp new file mode 100644 index 0000000000..f52b2edda8 --- /dev/null +++ b/CodeFormatter/ASFormatter.cpp @@ -0,0 +1,2199 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASFormatter.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include +#include +#ifdef __VMS +#include +#else +#include +#endif + +// can trace only if NDEBUG is not defined +#ifndef NDEBUG +// #define TRACEunpad +// #define TRACEcomment +// #define TRACEheader +// #define TRACEbracket +// #define TRACEarray +#if defined(TRACEunpad) || defined(TRACEcomment) || defined(TRACEheader) \ +|| defined(TRACEbracket) || defined(TRACEarray) +ofstream *traceOutF; +#define TRACEF +#endif +#endif + +#ifdef TRACEunpad +#define TRunpad(a,b,c) if(b > 0 || c > 0) *traceOutF << outLineNumber << " " << b << a << c << endl +#else +#define TRunpad(a,b,c) ((void)0) +#endif + +#ifdef TRACEcomment +#define TRcomment(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRcomment(a) ((void)0) +#endif + +#ifdef TRACEheader +#define TRxtra(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRxtra(a) ((void)0) +#endif + +#ifdef TRACEbracket +#define TRbracket(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRbracket(a) ((void)0) +#endif + +#ifdef TRACEarray +#define TRarray(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRarray(a) ((void)0) +#endif + +#define INIT_CONTAINER(container, value) {if ( (container) != NULL ) delete (container); (container) = (value); } +#define DELETE_CONTAINER(container) {if ( (container) != NULL ) delete (container); } +#define IS_A(a,b) ( ((a) & (b)) == (b)) + +using namespace std; + +namespace astyle +{ +vector ASFormatter::headers; +vector ASFormatter::nonParenHeaders; +vector ASFormatter::preDefinitionHeaders; +vector ASFormatter::preCommandHeaders; +vector ASFormatter::operators; +vector ASFormatter::assignmentOperators; +vector ASFormatter::castOperators; + +/** + * Constructor of ASFormatter + */ +ASFormatter::ASFormatter() +{ + preBracketHeaderStack = NULL; + bracketTypeStack = NULL; + parenStack = NULL; + lineCommentNoIndent = false; + sourceIterator = NULL; + bracketFormatMode = NONE_MODE; + shouldPadOperators = false; + shouldPadParensOutside = false; + shouldPadParensInside = false; + shouldUnPadParens = false; + shouldBreakOneLineBlocks = true; + shouldBreakOneLineStatements = true; + shouldConvertTabs = false; + shouldBreakBlocks = false; + shouldBreakClosingHeaderBlocks = false; + shouldBreakClosingHeaderBrackets = false; + shouldBreakElseIfs = false; +#ifdef TRACEF + // create a trace text file + string filename = "tracef.txt"; + char* env = getenv("HOME"); + if (env != NULL) + filename = string(env) + string("/tracef.txt"); + else + { + env = getenv("USERPROFILE"); + if (env != NULL) + filename = string(env) + string("\\My Documents\\tracef.txt"); + else + { + cout << "\nCould not open tracef.txt\n" << endl; + exit(1); + } + } + traceOutF = new ofstream(filename.c_str()); +#endif +} + +/** + * Destructor of ASFormatter + */ +ASFormatter::~ASFormatter() +{ + DELETE_CONTAINER(preBracketHeaderStack); + DELETE_CONTAINER(bracketTypeStack); + DELETE_CONTAINER(parenStack); +#ifdef TRACEF + delete traceOutF; +#endif +} + +/** + * initialization of static data of ASFormatter. + */ +void ASFormatter::staticInit() +{ + static int formatterFileType = 9; // initialized with an invalid type + + if (fileType == formatterFileType) // don't build unless necessary + return; + + formatterFileType = fileType; + + headers.clear(); + nonParenHeaders.clear(); + assignmentOperators.clear(); + operators.clear(); + preDefinitionHeaders.clear(); + preCommandHeaders.clear(); + castOperators.clear(); + + ASResource::buildHeaders(headers, fileType); + ASResource::buildNonParenHeaders(nonParenHeaders, fileType); + ASResource::buildAssignmentOperators(assignmentOperators); + ASResource::buildOperators(operators); + ASResource::buildPreDefinitionHeaders(preDefinitionHeaders); + ASResource::buildPreCommandHeaders(preCommandHeaders); + ASResource::buildCastOperators(castOperators); +} + +/** + * initialize the ASFormatter. + * + * init() should be called every time a ASFormatter object is to start + * formatting a NEW source file. + * init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object + * that will be used to iterate through the source code. This object will be + * deleted during the ASFormatter's destruction, and thus should not be + * deleted elsewhere. + * + * @param iter a pointer to the DYNAMICALLY CREATED ASSourceIterator object. + */ +void ASFormatter::init(ASSourceIterator *si) +{ + staticInit(); + + ASBeautifier::init(si); + ASEnhancer::init(ASBeautifier::getIndentLength(), + ASBeautifier::getIndentString(), + ASBeautifier::getCStyle(), + ASBeautifier::getJavaStyle(), + ASBeautifier::getSharpStyle(), + ASBeautifier::getCaseIndent(), + ASBeautifier::getEmptyLineFill()); + sourceIterator = si; + + INIT_CONTAINER(preBracketHeaderStack, new vector); + INIT_CONTAINER(bracketTypeStack, new vector); + bracketTypeStack->push_back(NULL_TYPE); + INIT_CONTAINER(parenStack, new vector); + parenStack->push_back(0); + + currentHeader = NULL; + currentLine = string(""); + readyFormattedLine = string(""); + formattedLine = ""; + currentChar = ' '; + previousChar = ' '; + previousCommandChar = ' '; + previousNonWSChar = ' '; + quoteChar = '"'; + charNum = 0; + spacePadNum = 0; + previousReadyFormattedLineLength = string::npos; + templateDepth = 0; + previousBracketType = NULL_TYPE; + previousOperator = NULL; + + isVirgin = true; + isInLineComment = false; + isInComment = false; + isInPreprocessor = false; + doesLineStartComment = false; + isInQuote = false; + isSpecialChar = false; + isNonParenHeader = true; + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + foundCastOperator = false; + foundQuestionMark = false; + isInLineBreak = false; + endOfCodeReached = false; + isLineReady = false; + isPreviousBracketBlockRelated = true; + isInPotentialCalculation = false; + shouldReparseCurrentChar = false; + passedSemicolon = false; + passedColon = false; + isInTemplate = false; + isInBlParen = false; + shouldBreakLineAfterComments = false; + isImmediatelyPostComment = false; + isImmediatelyPostLineComment = false; + isImmediatelyPostEmptyBlock = false; + isImmediatelyPostPreprocessor = false; + + isPrependPostBlockEmptyLineRequested = false; + isAppendPostBlockEmptyLineRequested = false; + prependEmptyLine = false; + appendOpeningBracket = false; + + foundClosingHeader = false; + previousReadyFormattedLineLength = 0; + + isImmediatelyPostHeader = false; + isInHeader = false; +#ifdef TRACEF + // fileName will be empty if ASTYLE_LIB is defined + if (fileName.empty()) + *traceOutF << "new file" << endl; + else + *traceOutF << fileName << endl; +#endif +} + +/** + * get the next formatted line. + * + * @return formatted line. + */ + +string ASFormatter::nextLine() +{ + // these are reset with each new line + const string *newHeader; + bool isInVirginLine = isVirgin; + isCharImmediatelyPostComment = false; + isPreviousCharPostComment = false; + isCharImmediatelyPostLineComment = false; + isCharImmediatelyPostOpenBlock = false; + isCharImmediatelyPostCloseBlock = false; + isCharImmediatelyPostTemplate = false; + + while (!isLineReady) + { + if (shouldReparseCurrentChar) + shouldReparseCurrentChar = false; + else if (!getNextChar()) + { + breakLine(); + return beautify(readyFormattedLine); + } + else // stuff to do when reading a new character... + { + // make sure that a virgin '{' at the begining ofthe file will be treated as a block... + if (isInVirginLine && currentChar == '{') + previousCommandChar = '{'; + isPreviousCharPostComment = isCharImmediatelyPostComment; + isCharImmediatelyPostComment = false; + isCharImmediatelyPostTemplate = false; + } + + //if (inLineNumber >= 185) + // int x = 1; + + if (isInLineComment) + { + appendCurrentChar(); + + // explicitely break a line when a line comment's end is found. + if (charNum + 1 == (int) currentLine.length()) + { + isInLineBreak = true; + isInLineComment = false; + isImmediatelyPostLineComment = true; + currentChar = 0; //make sure it is a neutral char. + } + continue; + } + else if (isInComment) + { + if (isSequenceReached("*/")) + { + isInComment = false; + isImmediatelyPostComment = true; + appendSequence(AS_CLOSE_COMMENT); + goForward(1); + } + else + appendCurrentChar(); + + continue; + } + + // not in line comment or comment + + else if (isInQuote) + { + if (isSpecialChar) + { + isSpecialChar = false; + appendCurrentChar(); + } + else if (currentChar == '\\') + { + isSpecialChar = true; + appendCurrentChar(); + } + else if (quoteChar == currentChar) + { + isInQuote = false; + appendCurrentChar(); + } + else + { + appendCurrentChar(); + } + + continue; + } + + // handle white space - needed to simplify the rest. + if (isWhiteSpace(currentChar) || isInPreprocessor) + { + appendCurrentChar(); + continue; + } + + /* not in MIDDLE of quote or comment or white-space of any type ... */ + + if (isSequenceReached("//")) + { + if (currentLine[charNum+2] == '\xf2') // check for windows line marker + isAppendPostBlockEmptyLineRequested = false; + isInLineComment = true; + // do not indent if in column 1 or 2 + if (lineCommentNoIndent == false) + { + if (charNum == 0) + lineCommentNoIndent = true; + else if (charNum == 1 && currentLine[0] == ' ') + lineCommentNoIndent = true; + } + // move comment if spaces were added or deleted + if (lineCommentNoIndent == false && spacePadNum != 0) + adjustComments(); + formattedLineCommentNum = formattedLine.length(); + appendSequence(AS_OPEN_LINE_COMMENT); + goForward(1); + // explicitely break a line when a line comment's end is found. + if (charNum + 1 == (int) currentLine.length()) + { + isInLineBreak = true; + isInLineComment = false; + isImmediatelyPostLineComment = true; + currentChar = 0; //make sure it is a neutral char. + } + continue; + } + else if (isSequenceReached("/*")) + { + isInComment = true; + if (spacePadNum != 0) + adjustComments(); + formattedLineCommentNum = formattedLine.length(); + appendSequence(AS_OPEN_COMMENT); + goForward(1); + continue; + } + else if (currentChar == '"' || currentChar == '\'') + { + isInQuote = true; + quoteChar = currentChar; + appendCurrentChar(); + continue; + } + + /* not in quote or comment or white-space of any type ... */ + + // check if in preprocessor + // ** isInPreprocessor will be automatically reset at the begining + // of a new line in getnextChar() + if (currentChar == '#') + { + isInPreprocessor = true; + appendCurrentChar(); + continue; + } + + /* not in preprocessor ... */ + + if (isImmediatelyPostComment) + { + isImmediatelyPostComment = false; + isCharImmediatelyPostComment = true; + } + + if (isImmediatelyPostLineComment) + { + isImmediatelyPostLineComment = false; + isCharImmediatelyPostLineComment = true; + } + + if (shouldBreakLineAfterComments) + { + shouldBreakLineAfterComments = false; + shouldReparseCurrentChar = true; + breakLine(); + continue; + } + + // reset isImmediatelyPostHeader information + if (isImmediatelyPostHeader) + { + isImmediatelyPostHeader = false; + + // Make sure headers are broken from their succeeding blocks + // (e.g. + // if (isFoo) DoBar(); + // should become + // if (isFoo) + // DoBar; + // ) + // But treat else if() as a special case which should not be broken! + if (shouldBreakOneLineStatements) + { + // if may break 'else if()'s, then simply break the line + + if (shouldBreakElseIfs) + isInLineBreak = true; + } + } + + if (passedSemicolon) // need to break the formattedLine + { + passedSemicolon = false; + if (parenStack->back() == 0 && currentChar != ';') // allow ;; + { + // does a one-line statement have ending comments? + if (IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE)) + { + size_t blockEnd = currentLine.rfind(AS_CLOSE_BRACKET); + assert(blockEnd != string::npos); + // move ending comments to this formattedLine + if (isBeforeLineEndComment(blockEnd)) + { + size_t commentStart = currentLine.find_first_not_of(" \t", blockEnd + 1); + assert(commentStart != string::npos); + assert((currentLine.compare(commentStart, 2, "//") == 0) + || (currentLine.compare(commentStart, 2, "/*") == 0)); + size_t commentLength = currentLine.length() - commentStart; + int tabCount = getIndentLength(); + appendSpacePad(); + for (int i=1; iback() == 0 && !isBeforeComment()) + { + shouldReparseCurrentChar = true; + isInLineBreak = true; + continue; + } + } + + // Check if in template declaration, e.g. foo or foo + // If so, set isInTemplate to true + if (!isInTemplate && currentChar == '<') + { + int maxTemplateDepth = 0; + templateDepth = 0; + const string *oper; + for (size_t i = charNum; + i < currentLine.length(); + i += (oper ? oper->length() : 1)) + { + oper = ASBeautifier::findHeader(currentLine, i, operators); + + if (oper == &AS_LS) + { + templateDepth++; + maxTemplateDepth++; + } + else if (oper == &AS_GR) + { + templateDepth--; + if (templateDepth == 0) + { + // this is a template! + isInTemplate = true; + templateDepth = maxTemplateDepth; + break; + } + } + else if (oper == &AS_COMMA // comma, e.g. A + || oper == &AS_BIT_AND // reference, e.g. A + || oper == &AS_MULT // pointer, e.g. A + || oper == &AS_COLON_COLON) // ::, e.g. std::string + { + continue; + } + else if (!isLegalNameChar(currentLine[i]) && !isWhiteSpace(currentLine[i])) + { + // this is not a template -> leave... + isInTemplate = false; + break; + } + } + } + + // handle parenthesies + if (currentChar == '(' || currentChar == '[' || (isInTemplate && currentChar == '<')) + { + parenStack->back()++; + if (currentChar == '[') + isInBlParen = true; + } + else if (currentChar == ')' || currentChar == ']' || (isInTemplate && currentChar == '>')) + { + parenStack->back()--; + if (isInTemplate && currentChar == '>') + { + templateDepth--; + if (templateDepth == 0) + { + isInTemplate = false; + isCharImmediatelyPostTemplate = true; + } + } + + // check if this parenthesis closes a header, e.g. if (...), while (...) + if (isInHeader && parenStack->back() == 0) + { + isInHeader = false; + isImmediatelyPostHeader = true; + } + if (currentChar == ']') + isInBlParen = false; + if (currentChar == ')') + foundCastOperator = false; + } + + // handle brackets + if (currentChar == '{' || currentChar == '}') + { + if (currentChar == '{') + { + BracketType newBracketType = getBracketType(); + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + isInPotentialCalculation = false; + + bracketTypeStack->push_back(newBracketType); + preBracketHeaderStack->push_back(currentHeader); + currentHeader = NULL; + + isPreviousBracketBlockRelated = !IS_A(newBracketType, ARRAY_TYPE); + } + + // this must be done before the bracketTypeStack is popped + BracketType bracketType = bracketTypeStack->back(); + bool isOpeningArrayBracket = (IS_A(bracketType, ARRAY_TYPE) + && bracketTypeStack->size() >= 2 + && !IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], ARRAY_TYPE) + ); + + if (currentChar == '}') + { + // if a request has been made to append a post block empty line, + // but the block exists immediately before a closing bracket, + // then there is not need for the post block empty line. + // + isAppendPostBlockEmptyLineRequested = false; + + if (!bracketTypeStack->empty()) + { + previousBracketType = bracketTypeStack->back(); + bracketTypeStack->pop_back(); + isPreviousBracketBlockRelated = !IS_A(bracketType, ARRAY_TYPE); + } + + if (!preBracketHeaderStack->empty()) + { + currentHeader = preBracketHeaderStack->back(); + preBracketHeaderStack->pop_back(); + } + else + currentHeader = NULL; + } + + // format brackets + if (IS_A(bracketType, ARRAY_TYPE)) + formatArrayBrackets(bracketType, isOpeningArrayBracket); + else + formatBrackets(bracketType); + continue; + } + + if (((previousCommandChar == '{' && isPreviousBracketBlockRelated) + || (previousCommandChar == '}' + && bracketFormatMode != NONE_MODE + && !isImmediatelyPostEmptyBlock + && isPreviousBracketBlockRelated + && !isPreviousCharPostComment // Fixes wrongly appended newlines after '}' immediately after comments + && peekNextChar() != ' ' + && !IS_A(previousBracketType, DEFINITION_TYPE) + && !(ASBeautifier::isJavaStyle && currentChar == ')')) + && !IS_A(bracketTypeStack->back(), DEFINITION_TYPE)) + && (shouldBreakOneLineBlocks + || !IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE))) + { + isCharImmediatelyPostOpenBlock = (previousCommandChar == '{'); + isCharImmediatelyPostCloseBlock = (previousCommandChar == '}'); + + //if (bracketFormatMode != NONE_MODE) + //{ + previousCommandChar = ' '; + isInLineBreak = true; + //} + } + + // reset block handling flags + isImmediatelyPostEmptyBlock = false; + + // look for headers + if (!isInTemplate) + { + if ((newHeader = findHeader(headers)) != NULL) + { + foundClosingHeader = false; + const string *previousHeader; + + // recognize closing headers of do..while, if..else, try..catch..finally + if ((newHeader == &AS_ELSE && currentHeader == &AS_IF) + || (newHeader == &AS_WHILE && currentHeader == &AS_DO) + || (newHeader == &AS_CATCH && currentHeader == &AS_TRY) + || (newHeader == &AS_CATCH && currentHeader == &AS_CATCH) + || (newHeader == &AS_FINALLY && currentHeader == &AS_TRY) + || (newHeader == &AS_FINALLY && currentHeader == &AS_CATCH)) + foundClosingHeader = true; + + previousHeader = currentHeader; + currentHeader = newHeader; + + // If in ATTACH or LINUX bracket modes, attach closing headers (e.g. 'else', 'catch') + // to their preceding bracket, + // But do not perform the attachment if the shouldBreakClosingHeaderBrackets is set! + if (!shouldBreakClosingHeaderBrackets + && foundClosingHeader + && (bracketFormatMode == ATTACH_MODE || bracketFormatMode == BDAC_MODE) + && (shouldBreakOneLineBlocks || !IS_A(previousBracketType, SINGLE_LINE_TYPE)) + && previousNonWSChar == '}') + { + spacePadNum = 0; // don't count as padding + + size_t firstChar = formattedLine.find_first_not_of(" \t"); + if (firstChar != string::npos) // if a blank line does not preceed this + { + isInLineBreak = false; + appendSpacePad(); + } + + if (shouldBreakBlocks) + isAppendPostBlockEmptyLineRequested = false; + } + + // If NONE bracket mode, leave closing headers as they are (e.g. 'else', 'catch') + if (foundClosingHeader && bracketFormatMode == NONE_MODE && previousCommandChar == '}') + { + if (lineBeginsWith('}')) // is closing bracket broken? + { + isInLineBreak = false; + appendSpacePad(); + } + + if (shouldBreakBlocks) + isAppendPostBlockEmptyLineRequested = false; + } + + if (foundClosingHeader && bracketFormatMode == BREAK_MODE && previousCommandChar == '}') + breakLine(); + + //Check if a template definition as been reached, e.g. template + //if (newHeader == &AS_TEMPLATE) + //{ + // isInTemplate = true; + //} + + // check if the found header is non-paren header + isNonParenHeader = (find(nonParenHeaders.begin(), nonParenHeaders.end(), + newHeader) != nonParenHeaders.end()); + + appendSequence(*currentHeader); + goForward(currentHeader->length() - 1); + // if a paren-header is found add a space after it, if needed + // this checks currentLine, appendSpacePad() checks formattedLine + if (!isNonParenHeader && charNum < (int) currentLine.length() && !isWhiteSpace(currentLine[charNum+1])) + appendSpacePad(); + + // Signal that a header has been reached + // *** But treat a closing while() (as in do...while) + // as if it where NOT a header since a closing while() + // should never have a block after it! + if (!(foundClosingHeader && currentHeader == &AS_WHILE)) + { + isInHeader = true; + if (isNonParenHeader) + { + isImmediatelyPostHeader = true; + isInHeader = false; + } + } + + if (currentHeader == &AS_IF && previousHeader == &AS_ELSE) + isInLineBreak = false; + + if (shouldBreakBlocks) + { + if (previousHeader == NULL + && !foundClosingHeader + && !isCharImmediatelyPostOpenBlock) + { + isPrependPostBlockEmptyLineRequested = true; + } + + if (currentHeader == &AS_ELSE + || currentHeader == &AS_CATCH + || currentHeader == &AS_FINALLY + || foundClosingHeader) + { + isPrependPostBlockEmptyLineRequested = false; + } + + if (shouldBreakClosingHeaderBlocks + && isCharImmediatelyPostCloseBlock) + { + isPrependPostBlockEmptyLineRequested = true; + } + + } + + continue; + } + else if ((newHeader = findHeader(preDefinitionHeaders)) != NULL + && parenStack->back() == 0) + { + if (newHeader == &AS_NAMESPACE) + foundNamespaceHeader = true; + if (newHeader == &AS_CLASS) + foundClassHeader = true; + foundPreDefinitionHeader = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + if (shouldBreakBlocks) + isPrependPostBlockEmptyLineRequested = true; + + continue; + } + else if ((newHeader = findHeader(preCommandHeaders)) != NULL) + { + if (ASBeautifier::isJavaStyle + || (*newHeader == AS_CONST && previousCommandChar == ')') // 'const' member functions is a command bracket + || *newHeader == AS_EXTERN) + foundPreCommandHeader = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + continue; + } + else if ((newHeader = findHeader(castOperators)) != NULL) + { + foundCastOperator = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + continue; + } + + } + + if (isInLineBreak) // OK to break line here + breakLine(); + + if (previousNonWSChar == '}' || currentChar == ';') + { + if (shouldBreakOneLineStatements && currentChar == ';' + && (shouldBreakOneLineBlocks || !IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE)) + //&& (! bracketFormatMode == NONE_MODE) + ) + { + passedSemicolon = true; + } + + if (shouldBreakBlocks && currentHeader != NULL && parenStack->back() == 0) + { + isAppendPostBlockEmptyLineRequested = true; + } + + if (currentChar != ';') + currentHeader = NULL; + + foundQuestionMark = false; + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + foundCastOperator = false; + isInPotentialCalculation = false; + isNonInStatementArray = false; + } + + if (currentChar == ':' + && shouldBreakOneLineStatements + && !foundQuestionMark // not in a ... ? ... : ... sequence + && !foundPreDefinitionHeader // not in a definition block (e.g. class foo : public bar + && previousCommandChar != ')' // not immediately after closing paren of a method header, e.g. ASFormatter::ASFormatter(...) : ASBeautifier(...) + && previousChar != ':' // not part of '::' + && peekNextChar() != ':') // not part of '::' + { + passedColon = true; + if (shouldBreakBlocks) + isPrependPostBlockEmptyLineRequested = true; + } + + if (currentChar == '?') + foundQuestionMark = true; + + // determine if this is a potential calculation + newHeader = findHeader(operators); + + if (newHeader != NULL) + { + if (!isInPotentialCalculation) + { + if (find(assignmentOperators.begin(), assignmentOperators.end(), newHeader) + != assignmentOperators.end()) + { + char peekedChar = peekNextChar(); + isInPotentialCalculation = (newHeader != &AS_RETURN + && !(newHeader == &AS_EQUAL && peekedChar == '*') + && !(newHeader == &AS_EQUAL && peekedChar == '&')); + } + } + } + else + { + // the following are not calculations + if (currentLine.compare(charNum, 3, "new") == 0 && !isLegalNameChar(currentLine[charNum+3])) + isInPotentialCalculation = false; + } + + if (shouldPadOperators && newHeader != NULL) + { + padOperators(newHeader); + continue; + } + + if ((shouldPadParensOutside || shouldPadParensInside || shouldUnPadParens) + && (currentChar == '(' || currentChar == ')')) + { + padParens(); + continue; + } + + appendCurrentChar(); + } // end of while loop * end of while loop * end of while loop * end of while loop + + // return a beautified (i.e. correctly indented) line. + + string beautifiedLine; + size_t readyFormattedLineLength = trim(readyFormattedLine).length(); + + if (prependEmptyLine // prepend a blank line before this formatted line + && readyFormattedLineLength > 0 + && previousReadyFormattedLineLength > 0) + { + isLineReady = true; // signal that a readyFormattedLine is still waiting + beautifiedLine = beautify(""); + previousReadyFormattedLineLength = 0; + } + else // format the current formatted line + { + isLineReady = false; + beautifiedLine = beautify(readyFormattedLine); + previousReadyFormattedLineLength = readyFormattedLineLength; + lineCommentNoBeautify = lineCommentNoIndent; + lineCommentNoIndent = false; + if (appendOpeningBracket) // insert bracket after this formatted line + { + appendOpeningBracket = false; + isLineReady = true; // signal that a readyFormattedLine is still waiting + readyFormattedLine = "{"; + isPrependPostBlockEmptyLineRequested = false; // next line should not be empty + } + } + + prependEmptyLine = false; + enhance(beautifiedLine); // call the enhancer function + return beautifiedLine; +} + + +/** +* check if there are any indented lines ready to be read by nextLine() +* +* @return are there any indented lines ready? +*/ +bool ASFormatter::hasMoreLines() const +{ + return !endOfCodeReached; +} + +/** + * set the bracket formatting mode. + * options: + * astyle::NONE_MODE no formatting of brackets. + * astyle::ATTACH_MODE Java, K&R style bracket placement. + * astyle::BREAK_MODE ANSI C/C++ style bracket placement. + * + * @param mode the bracket formatting mode. + */ +void ASFormatter::setBracketFormatMode(BracketMode mode) +{ + bracketFormatMode = mode; +} + +/** + * set closing header bracket breaking mode + * options: + * true brackets just before closing headers (e.g. 'else', 'catch') + * will be broken, even if standard brackets are attached. + * false closing header brackets will be treated as standard brackets. + * + * @param state the closing header bracket breaking mode. + */ +void ASFormatter::setBreakClosingHeaderBracketsMode(bool state) +{ + shouldBreakClosingHeaderBrackets = state; +} + +/** + * set 'else if()' breaking mode + * options: + * true 'else' headers will be broken from their succeeding 'if' headers. + * false 'else' headers will be attached to their succeeding 'if' headers. + * + * @param state the 'else if()' breaking mode. + */ +void ASFormatter::setBreakElseIfsMode(bool state) +{ + shouldBreakElseIfs = state; +} + +/** + * set operator padding mode. + * options: + * true statement operators will be padded with spaces around them. + * false statement operators will not be padded. + * + * @param state the padding mode. + */ +void ASFormatter::setOperatorPaddingMode(bool state) +{ + shouldPadOperators = state; +} + +/** +* set parenthesis outside padding mode. +* options: +* true statement parenthesiss will be padded with spaces around them. +* false statement parenthesiss will not be padded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensOutsidePaddingMode(bool state) +{ + shouldPadParensOutside = state; +} + +/** +* set parenthesis inside padding mode. +* options: +* true statement parenthesis will be padded with spaces around them. +* false statement parenthesis will not be padded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensInsidePaddingMode(bool state) +{ + shouldPadParensInside = state; +} + +/** +* set parenthesis unpadding mode. +* options: +* true statement parenthesis will be unpadded with spaces removed around them. +* false statement parenthesis will not be unpadded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensUnPaddingMode(bool state) +{ + shouldUnPadParens = state; +} + +/** + * set option to break/not break one-line blocks + * + * @param state true = break, false = don't break. + */ +void ASFormatter::setBreakOneLineBlocksMode(bool state) +{ + shouldBreakOneLineBlocks = state; +} + +/** + * set option to break/not break lines consisting of multiple statements. + * + * @param state true = break, false = don't break. + */ +void ASFormatter::setSingleStatementsMode(bool state) +{ + shouldBreakOneLineStatements = state; +} + +/** + * set option to convert tabs to spaces. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setTabSpaceConversionMode(bool state) +{ + shouldConvertTabs = state; +} + + +/** + * set option to break unrelated blocks of code with empty lines. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setBreakBlocksMode(bool state) +{ + shouldBreakBlocks = state; +} + +/** + * set option to break closing header blocks of code (such as 'else', 'catch', ...) with empty lines. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setBreakClosingHeaderBlocksMode(bool state) +{ + shouldBreakClosingHeaderBlocks = state; +} + +/** + * jump over several characters. + * + * @param i the number of characters to jump over. + */ +void ASFormatter::goForward(int i) +{ + while (--i >= 0) + getNextChar(); +} + +/** +* peek at the next unread character. +* +* @return the next unread character. +*/ +char ASFormatter::peekNextChar() const +{ + char ch = ' '; + size_t peekNum = currentLine.find_first_not_of(" \t", charNum + 1); + + if (peekNum == string::npos) + return ch; + + ch = currentLine[peekNum]; + +// if (shouldConvertTabs && ch == '\t') +// ch = ' '; + + return ch; +} + +/** +* check if current placement is before a comment or line-comment +* +* @return is before a comment or line-comment. +*/ +bool ASFormatter::isBeforeComment() const +{ + bool foundComment = false; + size_t peekNum = currentLine.find_first_not_of(" \t", charNum + 1); + + if (peekNum == string::npos) + return foundComment; + + foundComment = (currentLine.compare(peekNum, 2, "/*") == 0 + || currentLine.compare(peekNum, 2, "//") == 0); + + return foundComment; +} + +/** +* check if current placement is before a comment or line-comment +* if a block comment it must be at the end of the line +* +* @return is before a comment or line-comment. +*/ +bool ASFormatter::isBeforeLineEndComment(int startPos) const +{ + bool foundLineEndComment = false; + size_t peekNum = currentLine.find_first_not_of(" \t", startPos + 1); + + if (peekNum != string::npos) + { + if (currentLine.compare(peekNum, 2, "//") == 0) + foundLineEndComment = true; + else if (currentLine.compare(peekNum, 2, "/*") == 0) + { + // comment must be closed on this line with nothing after it + size_t endNum = currentLine.find("*/", peekNum + 2); + if (endNum != string::npos) + if (currentLine.find_first_not_of(" \t", endNum + 2) == string::npos) + foundLineEndComment = true; + } + } + return foundLineEndComment; +} + + +/** +* get the next character, increasing the current placement in the process. +* the new character is inserted into the variable currentChar. +* +* @return whether succeded to recieve the new character. +*/ +bool ASFormatter::getNextChar() +{ + isInLineBreak = false; + previousChar = currentChar; + + if (!isWhiteSpace(currentChar)) + { + previousNonWSChar = currentChar; + if (!isInComment && !isInLineComment && !isInQuote + && !isImmediatelyPostComment + && !isImmediatelyPostLineComment + && !isSequenceReached("/*") + && !isSequenceReached("//")) + previousCommandChar = previousNonWSChar; + } + + int currentLineLength = currentLine.length(); + + if (charNum + 1 < currentLineLength + && (!isWhiteSpace(peekNextChar()) || isInComment || isInLineComment)) + { + currentChar = currentLine[++charNum]; + + if (shouldConvertTabs && currentChar == '\t') + currentChar = ' '; + + return true; + } + else // end of line has been reached + { + if (sourceIterator->hasMoreLines()) + { + currentLine = sourceIterator->nextLine(); + spacePadNum = 0; + inLineNumber++; + + if (currentLine.length() == 0) + { + currentLine = string(" "); // a null is inserted if this is not done + } + + // unless reading in the first line of the file, + // break a new line. + if (!isVirgin) + isInLineBreak = true; + else + isVirgin = false; + + if (isInLineComment) + isImmediatelyPostLineComment = true; + isInLineComment = false; + + // check if is in preprocessor before line trimming + isImmediatelyPostPreprocessor = isInPreprocessor; + if (previousNonWSChar != '\\') + isInPreprocessor = false; + + trimNewLine(); + currentChar = currentLine[charNum]; + + if (shouldConvertTabs && currentChar == '\t') + currentChar = ' '; + + return true; + } + else + { + endOfCodeReached = true; + return false; + } + } +} + +/** +* jump over the leading white space in the current line, +* IF the line does not begin a comment or is in a preprocessor definition. +*/ +void ASFormatter::trimNewLine() +{ + int len = currentLine.length(); + charNum = 0; + + if (isInComment || isInPreprocessor) + return; + + while (isWhiteSpace(currentLine[charNum]) && charNum + 1 < len) + ++charNum; + + doesLineStartComment = false; + if (isSequenceReached("/*")) + { + charNum = 0; + doesLineStartComment = true; + } +} + +/** + * append a character to the current formatted line. + * Unless disabled (via canBreakLine == false), first check if a + * line-break has been registered, and if so break the + * formatted line, and only then append the character into + * the next formatted line. + * + * @param ch the character to append. + * @param canBreakLine if true, a registered line-break + */ +void ASFormatter::appendChar(char ch, bool canBreakLine) +{ + if (canBreakLine && isInLineBreak) + breakLine(); + formattedLine.append(1, ch); +} + +/** + * append a string sequence to the current formatted line. + * Unless disabled (via canBreakLine == false), first check if a + * line-break has been registered, and if so break the + * formatted line, and only then append the sequence into + * the next formatted line. + * + * @param sequence the sequence to append. + * @param canBreakLine if true, a registered line-break + */ +void ASFormatter::appendSequence(const string &sequence, bool canBreakLine) +{ + if (canBreakLine && isInLineBreak) + breakLine(); + formattedLine.append(sequence); +} + +/** + * append a space to the current formattedline, UNLESS the + * last character is already a white-space character. + */ +void ASFormatter::appendSpacePad() +{ + int len = formattedLine.length(); + if (len > 0 && !isWhiteSpace(formattedLine[len-1])) + { + formattedLine.append(1, ' '); + spacePadNum++; + } +} + +/** + * append a space to the current formattedline, UNLESS the + * next character is already a white-space character. + */ +void ASFormatter::appendSpaceAfter() +{ + int len = currentLine.length(); + if (charNum + 1 < len && !isWhiteSpace(currentLine[charNum+1])) + { + formattedLine.append(1, ' '); + spacePadNum++; + } +} + +/** + * register a line break for the formatted line. + */ +void ASFormatter::breakLine() +{ + isLineReady = true; + isInLineBreak = false; + spacePadNum = 0; + formattedLineCommentNum = string::npos; + + // queue an empty line prepend request if one exists + prependEmptyLine = isPrependPostBlockEmptyLineRequested; + + readyFormattedLine = formattedLine; + if (isAppendPostBlockEmptyLineRequested) + { + isAppendPostBlockEmptyLineRequested = false; + isPrependPostBlockEmptyLineRequested = true; + } + else + { + isPrependPostBlockEmptyLineRequested = false; + } + + formattedLine = ""; +} + +/** + * check if the currently reached open-bracket (i.e. '{') + * opens a: + * - a definition type block (such as a class or namespace), + * - a command block (such as a method block) + * - a static array + * this method takes for granted that the current character + * is an opening bracket. + * + * @return the type of the opened block. + */ +BracketType ASFormatter::getBracketType() const +{ + BracketType returnVal; + + if (foundPreDefinitionHeader) + { + returnVal = DEFINITION_TYPE; + if (foundNamespaceHeader) + returnVal = (BracketType)(returnVal | NAMESPACE_TYPE); + else if (foundClassHeader) + returnVal = (BracketType)(returnVal | CLASS_TYPE); + } + else + { + bool isCommandType = false; + + if (previousNonWSChar != '=') + isCommandType = (foundPreCommandHeader + || (currentHeader != NULL && isNonParenHeader) + || (previousCommandChar == ')') + || (previousCommandChar == ':' && !foundQuestionMark) + || (previousCommandChar == ';') + || ((previousCommandChar == '{' || previousCommandChar == '}') + && isPreviousBracketBlockRelated)); + + returnVal = (isCommandType ? COMMAND_TYPE : ARRAY_TYPE); + } + + if (isOneLineBlockReached()) + returnVal = (BracketType)(returnVal | SINGLE_LINE_TYPE); + + TRbracket(returnVal); + return returnVal; +} + +/** + * check if the currently reached '*' or '&' character is + * a pointer-or-reference symbol, or another operator. + * this method takes for granted that the current character + * is either a '*' or '&'. + * + * @return whether current character is a reference-or-pointer + */ +bool ASFormatter::isPointerOrReference() const +{ + bool isPR; + isPR = (!isInPotentialCalculation + || IS_A(bracketTypeStack->back(), DEFINITION_TYPE) + || (!isLegalNameChar(previousNonWSChar) + && previousNonWSChar != ')' + && previousNonWSChar != ']') + ); + + if (!isPR) + { + char nextChar = peekNextChar(); + isPR |= (!isWhiteSpace(nextChar) + && nextChar != '-' + && nextChar != '(' + && nextChar != '[' + && !isLegalNameChar(nextChar)); + } + + return isPR; +} + + +/** + * check if the currently reached '-' character is + * a unary minus + * this method takes for granted that the current character + * is a '-'. + * + * @return whether the current '-' is a unary minus. + */ +bool ASFormatter::isUnaryMinus() const +{ + return ((previousOperator == &AS_RETURN || !isalnum(previousCommandChar)) + && previousCommandChar != '.' + && previousCommandChar != ')' + && previousCommandChar != ']'); +} + + +/** + * check if the currently reached '-' or '+' character is + * part of an exponent, i.e. 0.2E-5. + * this method takes for granted that the current character + * is a '-' or '+'. + * + * @return whether the current '-' is in an exponent. + */ +bool ASFormatter::isInExponent() const +{ + int formattedLineLength = formattedLine.length(); + if (formattedLineLength >= 2) + { + char prevPrevFormattedChar = formattedLine[formattedLineLength - 2]; + char prevFormattedChar = formattedLine[formattedLineLength - 1]; + + return ((prevFormattedChar == 'e' || prevFormattedChar == 'E') + && (prevPrevFormattedChar == '.' || isdigit(prevPrevFormattedChar))); + } + else + return false; +} + +/** + * check if a one-line bracket has been reached, + * i.e. if the currently reached '{' character is closed + * with a complimentry '}' elsewhere on the current line, + *. + * @return has a one-line bracket been reached? + */ +bool ASFormatter::isOneLineBlockReached() const +{ + bool isInComment = false; + bool isInQuote = false; + int bracketCount = 1; + int currentLineLength = currentLine.length(); + char quoteChar = ' '; + + for (int i = charNum + 1; i < currentLineLength; ++i) + { + char ch = currentLine[i]; + + if (isInComment) + { + if (currentLine.compare(i, 2, "*/") == 0) + { + isInComment = false; + ++i; + } + continue; + } + + if (ch == '\\') + { + ++i; + continue; + } + + if (isInQuote) + { + if (ch == quoteChar) + isInQuote = false; + continue; + } + + if (ch == '"' || ch == '\'') + { + isInQuote = true; + quoteChar = ch; + continue; + } + + if (currentLine.compare(i, 2, "//") == 0) + break; + + if (currentLine.compare(i, 2, "/*") == 0) + { + isInComment = true; + ++i; + continue; + } + + if (ch == '{') + ++bracketCount; + else if (ch == '}') + --bracketCount; + + if (bracketCount == 0) + return true; + } + + return false; +} + +/** + * check if one of a set of headers has been reached in the + * current position of the current line. + * + * @return a pointer to the found header. Or a NULL if no header has been reached. + * @param headers a vector of headers. + * @param checkBoundry + */ +const string *ASFormatter::findHeader(const vector &headers, bool checkBoundry) +{ + return ASBeautifier::findHeader(currentLine, charNum, headers, checkBoundry); +} + +/** + * check if a line begins with the specified character + * i.e. if the current line begins with a open bracket. + * + * @return true or false + */ +bool ASFormatter::lineBeginsWith(char charToCheck) const +{ + bool beginsWith = false; + size_t i = currentLine.find_first_not_of(" \t"); + + if (i != string::npos) + if (currentLine[i] == charToCheck && (int) i == charNum) + beginsWith = true; + + return beginsWith; +} + +/** + * adjust comment position because of adding or deleting spaces + * the spaces are added or deleted to formattedLine + * spacePadNum contains the adjustment + */ +void ASFormatter::adjustComments(void) +{ + assert(spacePadNum != 0); + assert(currentLine.compare(charNum, 2, "//") == 0 + || currentLine.compare(charNum, 2, "/*") == 0); + + + // block comment must be closed on this line with nothing after it + if (currentLine.compare(charNum, 2, "/*") == 0) + { + size_t endNum = currentLine.find("*/", charNum + 2); + if (endNum == string::npos) + return; + if (currentLine.find_first_not_of(" \t", endNum + 2) != string::npos) + return; + } + + size_t len = formattedLine.length(); + // if spaces were removed, need to add spaces before the comment + if (spacePadNum < 0) + { + int adjust = -spacePadNum; // make the number positive + if (formattedLine[len-1] != '\t') // don't adjust if a tab + formattedLine.append(adjust, ' '); +// else // comment out to avoid compiler warning +// adjust = 0; +// TRcomment(adjust); // trace macro + } + // if spaces were added, need to delete spaces before the comment, if possible + else if (spacePadNum > 0) + { + int adjust = spacePadNum; + if (formattedLine.find_last_not_of(' ') < len - adjust - 1 + && formattedLine[len-1] != '\t') // don't adjust a tab + formattedLine.resize(len - adjust); + // the following are commented out to avoid a Borland compiler warning + //else + // adjust = 0; + TRcomment(-adjust); // trace macro + } +} + +/** + * append the current bracket inside the end of line comments + * currentChar contains the bracket, it will be appended to formattedLine + * formattedLineCommentNum is the comment location on formattedLine + */ +void ASFormatter::appendCharInsideComments(void) +{ + if (formattedLineCommentNum == string::npos // does the comment start on the previous line? + || isBeforeComment()) // does a comment follow on this line? + { + appendCurrentChar(true); // don't attach + return; + } + assert(formattedLine.compare(formattedLineCommentNum, 2, "//") == 0 + || formattedLine.compare(formattedLineCommentNum, 2, "/*") == 0); + + // find the previous non space char + size_t end = formattedLineCommentNum; + size_t beg = formattedLine.find_last_not_of(" \t", end-1); + if (beg == string::npos) // is the previous line comment only? + { + appendCurrentChar(true); // don't attach + return; + } + beg++; + + // insert the bracket + if (end - beg < 3) // is there room to insert? + formattedLine.insert(beg, 3-end+beg, ' '); + if (formattedLine[beg] == '\t') // don't pad with a tab + formattedLine.insert(beg, 1, ' '); + formattedLine[beg+1] = currentChar; +} + +/** + * add or remove space padding to operators + * currentChar contains the paren + * the operators and necessary padding will be appended to formattedLine + * the calling function should have a continue statement after calling this method + * + * @param *newOperator the operator to be padded + */ +void ASFormatter::padOperators(const string *newOperator) +{ + assert (shouldPadOperators); + assert(newOperator != NULL); + + bool shouldPad = (newOperator != &AS_COLON_COLON + && newOperator != &AS_PAREN_PAREN + && newOperator != &AS_BLPAREN_BLPAREN + && newOperator != &AS_PLUS_PLUS + && newOperator != &AS_MINUS_MINUS + && newOperator != &AS_NOT + && newOperator != &AS_BIT_NOT + && newOperator != &AS_ARROW + && newOperator != &AS_OPERATOR + && newOperator != &AS_RETURN + && !(newOperator == &AS_MINUS && isInExponent()) + && !(newOperator == &AS_MINUS // check for negative number + && (previousNonWSChar == '(' + || previousNonWSChar == '=' + || previousNonWSChar == ',')) + && !(newOperator == &AS_PLUS && isInExponent()) + && previousOperator != &AS_OPERATOR + && !((newOperator == &AS_MULT || newOperator == &AS_BIT_AND) + && isPointerOrReference()) + && !(newOperator == &AS_MULT + && (previousNonWSChar == '.' + || previousNonWSChar == '>')) // check for -> + && !((isInTemplate || isCharImmediatelyPostTemplate) + && (newOperator == &AS_LS || newOperator == &AS_GR)) + ); + // pad before operator + if (shouldPad + && !isInBlParen + && !(newOperator == &AS_COLON && !foundQuestionMark) + && newOperator != &AS_SEMICOLON + && newOperator != &AS_COMMA) + appendSpacePad(); + appendSequence(*newOperator); + goForward(newOperator->length() - 1); + + // since this block handles '()' and '[]', + // the parenStack must be updated here accordingly! + if (newOperator == &AS_PAREN_PAREN + || newOperator == &AS_BLPAREN_BLPAREN) + parenStack->back()--; + + currentChar = (*newOperator)[newOperator->length() - 1]; + // pad after operator + // but do not pad after a '-' that is a unary-minus. + if (shouldPad + && !isInBlParen + && !isBeforeComment() + && !(newOperator == &AS_MINUS && isUnaryMinus()) + && !(currentLine.compare(charNum + 1, 1, ";") == 0) + && !(currentLine.compare(charNum + 1, 2, "::") == 0)) + appendSpaceAfter(); + + previousOperator = newOperator; + return; +} + +/** + * add or remove space padding to parens + * currentChar contains the paren + * the parens and necessary padding will be appended to formattedLine + * the calling function should have a continue statement after calling this method + */ +void ASFormatter::padParens(void) +{ + assert(shouldPadParensOutside || shouldPadParensInside || shouldUnPadParens); + assert (currentChar == '(' || currentChar == ')'); + + if (currentChar == '(') + { + int spacesOutsideToDelete = formattedLine.length() - 1; + int spacesInsideToDelete = 0; + + // compute spaces outside the opening paren to delete + if (shouldUnPadParens) + { + char lastChar = ' '; + bool prevIsParenHeader = false; + size_t i = formattedLine.find_last_not_of(" \t"); + if (i != string::npos) + { + size_t end = i; + spacesOutsideToDelete -= i; + lastChar = formattedLine[i]; + // was last word a paren header? + int start; // start of the previous word + for (start = i; start > 0; start--) + { + if (isLegalNameChar(formattedLine[start]) || formattedLine[start] == '*') + continue; + start++; + break; + } + string prevWord = formattedLine.substr(start, end-start+1); + // if previous word is a header, it will be a paren header + const string *prevWordH = ASBeautifier::findHeader(formattedLine, start, headers); + if (prevWordH != NULL) + { + prevIsParenHeader = true; + TRxtra(*prevWordH); // trace macro + } + else if (prevWord == "return" // don't unpad return statements + || prevWord == "*") // don't unpad multiply or pointer + { + prevIsParenHeader = true; + TRxtra(prevWord); // trace macro + } + // don't unpad variables + else if (prevWord == "bool" + || prevWord == "int" + || prevWord == "void" + || prevWord == "void*" + || (prevWord.length() >= 6 // check end of word for _t + && prevWord.compare(prevWord.length()-2, 2, "_t") == 0) + || prevWord == "BOOL" + || prevWord == "DWORD" + || prevWord == "HWND" + || prevWord == "INT" + || prevWord == "LPSTR" + || prevWord == "VOID" + || prevWord == "LPVOID" + ) + { + prevIsParenHeader = true; + TRxtra(prevWord); // trace macro + } + } + // do not unpad operators, but leave them if already padded + if (shouldPadParensOutside || prevIsParenHeader) + spacesOutsideToDelete--; + else if (lastChar == '|' // check for || + || lastChar == '&' // check for && + || lastChar == ',' + || (lastChar == '>' && !foundCastOperator) + || lastChar == '<' + || lastChar == '?' + || lastChar == ':' + || lastChar == ';' + || lastChar == '=' + || lastChar == '+' + || lastChar == '-' + || (lastChar == '*' && isInPotentialCalculation) + || lastChar == '/' + || lastChar == '%') + spacesOutsideToDelete--; + + if (spacesOutsideToDelete > 0) + { + formattedLine.erase(i + 1, spacesOutsideToDelete); + spacePadNum -= spacesOutsideToDelete; + } + } + + // pad open paren outside + char peekedCharOutside = peekNextChar(); + if (shouldPadParensOutside) + if (!(currentChar == '(' && peekedCharOutside == ')')) + appendSpacePad(); + + appendCurrentChar(); + + // unpad open paren inside + if (shouldUnPadParens) + { + size_t j = currentLine.find_first_not_of(" \t", charNum + 1); + if (j != string::npos) + spacesInsideToDelete = j - charNum - 1; + if (shouldPadParensInside) + spacesInsideToDelete--; + if (spacesInsideToDelete > 0) + { + currentLine.erase(charNum + 1, spacesInsideToDelete); + spacePadNum -= spacesInsideToDelete; + } + } + + // pad open paren inside + char peekedCharInside = peekNextChar(); + if (shouldPadParensInside) + if (!(currentChar == '(' && peekedCharInside == ')')) + appendSpaceAfter(); + + TRunpad('(', spacesOutsideToDelete, spacesInsideToDelete); // trace macro + } + else if (currentChar == ')' /*|| currentChar == ']'*/) + { + int spacesOutsideToDelete = 0; + int spacesInsideToDelete = formattedLine.length(); + + // unpad close paren inside + if (shouldUnPadParens) + { + size_t i = formattedLine.find_last_not_of(" \t"); + if (i != string::npos) + spacesInsideToDelete = formattedLine.length() - 1 - i; + if (shouldPadParensInside) + spacesInsideToDelete--; + if (spacesInsideToDelete > 0) + { + formattedLine.erase(i + 1, spacesInsideToDelete); + spacePadNum -= spacesInsideToDelete; + } + } + + // pad close paren inside + if (shouldPadParensInside) + if (!(previousChar == '(' && currentChar == ')')) + appendSpacePad(); + + appendCurrentChar(); + + // unpad close paren outside + if (shouldUnPadParens) + { + // may have end of line comments + size_t j = currentLine.find_first_not_of(" \t", charNum + 1); + if (j != string::npos) + if (currentLine[j] == '[' || currentLine[j] == ']') + spacesOutsideToDelete = j - charNum - 1; + if (shouldPadParensOutside) + spacesOutsideToDelete--; +// spacesOutsideToDelete--; // always leave 1 space + + if (spacesOutsideToDelete > 0) + { + currentLine.erase(charNum + 1, spacesOutsideToDelete); + spacePadNum -= spacesOutsideToDelete; + } + } + + // pad close paren outside + char peekedCharOutside = peekNextChar(); + if (shouldPadParensOutside) + if (peekedCharOutside != ';' + && peekedCharOutside != ',' + && peekedCharOutside != '.' + && peekedCharOutside != '-') // check for -> +// && !(currentChar == ']' && peekedCharOutside == '[')) + appendSpaceAfter(); + + TRunpad(')', spacesInsideToDelete, 0 /*spacesOutsideToDelete*/); // trace macro + } + return; +} + +/** + * format brackets as attached or broken + * currentChar contains the bracket + * the brackets will be appended to the current formattedLine or a new formattedLine as necessary + * the calling function should have a continue statement after calling this method + * + * @param bracketType the type of bracket to be formatted. + */ +void ASFormatter::formatBrackets(BracketType bracketType) +{ + assert(!IS_A(bracketType, ARRAY_TYPE)); + assert (currentChar == '{' || currentChar == '}'); + + if (currentChar == '{') + { + parenStack->push_back(0); + } + else if (currentChar == '}') + { + if (!parenStack->empty()) + { + parenStack->pop_back(); + } + } + + if (currentChar == '{') + { + bool bdacBreak = false; + // should a Linux bracket be broken? + if (bracketFormatMode == BDAC_MODE) + { + // always break a class + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], CLASS_TYPE)) + bdacBreak = true; + // break a namespace and the first bracket if a function + else if (bracketTypeStack->size() <= 2) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], NAMESPACE_TYPE) + || IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + // break the first bracket after a namespace if a function + else if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], NAMESPACE_TYPE)) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + // if not C style then break the first bracket after a class if a function + else if (!ASBeautifier::isCStyle) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], CLASS_TYPE) + && IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + } + if (bracketFormatMode == ATTACH_MODE + || (bracketFormatMode == BDAC_MODE && !bdacBreak)) + { + // are there comments before the bracket? + if (isCharImmediatelyPostComment || isCharImmediatelyPostLineComment) + { + if ((shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) + && peekNextChar() != '}') + appendCharInsideComments(); + else + appendCurrentChar(true); // don't attach + } + else if (previousCommandChar == '{' + || previousCommandChar == '}' + || previousCommandChar == ';') // '}' , ';' chars added for proper handling of '{' immediately after a '}' or ';' + { + appendCurrentChar(true); // don't attach + } + else + { + size_t firstChar = formattedLine.find_first_not_of(" \t"); + if (firstChar == string::npos) // if a blank line preceeds this + appendCurrentChar(true); // don't attach + else if (shouldBreakOneLineBlocks + || !IS_A(bracketType, SINGLE_LINE_TYPE) + || peekNextChar() == '}') + { + appendSpacePad(); + appendCurrentChar(false); // OK to attach + } + else + appendCurrentChar(true); // don't attach + } + } + else if (bracketFormatMode == BREAK_MODE + || (bracketFormatMode == BDAC_MODE && bdacBreak)) + { + if (isBeforeComment()) + { + // do not break unless comment is at line end + if (isBeforeLineEndComment(charNum)) + { + currentChar = ' '; // remove bracket from current line + appendOpeningBracket = true; // append bracket to following line + } + } + else if (!IS_A(bracketType, SINGLE_LINE_TYPE)) + breakLine(); + else if (shouldBreakOneLineBlocks && peekNextChar() != '}') + breakLine(); + + appendCurrentChar(); + } + else if (bracketFormatMode == NONE_MODE) + { + if (lineBeginsWith('{')) // is opening bracket broken? + appendCurrentChar(true); + else + appendCurrentChar(false); + } + } + else if (currentChar == '}') + { + // mark state of immediately after empty block + // this state will be used for locating brackets that appear immedately AFTER an empty block (e.g. '{} \n}'). + if (previousCommandChar == '{') + isImmediatelyPostEmptyBlock = true; + + if ((!(previousCommandChar == '{' && isPreviousBracketBlockRelated)) // this '{' does not close an empty block + && (shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) // astyle is allowed to break on line blocks + && (!(bracketFormatMode == NONE_MODE && IS_A(bracketType, SINGLE_LINE_TYPE))) + && !isImmediatelyPostEmptyBlock) // this '}' does not immediately follow an empty block + { + breakLine(); + appendCurrentChar(); + } + else + { + if (!isCharImmediatelyPostComment + && !bracketFormatMode == NONE_MODE + && !isImmediatelyPostEmptyBlock) + isInLineBreak = false; + + appendCurrentChar(); + + //if (!bracketFormatMode == NONE_MODE) + // if ((shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) + // && !(currentChar == '}' && peekNextChar() == ';')) // fixes }; placed on separate lines + // shouldBreakLineAfterComments = true; + } + + if (shouldBreakBlocks) + { + isAppendPostBlockEmptyLineRequested = true; + } + } + return; +} + +/** + * format array brackets as attached or broken + * determine if the brackets can have an inStatement indent + * currentChar contains the bracket + * the brackets will be appended to the current formattedLine or a new formattedLine as necessary + * the calling function should have a continue statement after calling this method + * + * @param bracketType the type of bracket to be formatted, must be an ARRAY_TYPE. + * @param isOpeningArrayBracket indicates if this is the opening bracket for the array block. + */ +void ASFormatter::formatArrayBrackets(BracketType bracketType, bool isOpeningArrayBracket) +{ + assert(IS_A(bracketType, ARRAY_TYPE)); + assert (currentChar == '{' || currentChar == '}'); + + if (currentChar == '{') + { + // is this the first opening bracket in the array? + if (isOpeningArrayBracket) + { + if (bracketFormatMode == ATTACH_MODE || bracketFormatMode == BDAC_MODE) + { + // don't attach to a preprocessor directive + if (isImmediatelyPostPreprocessor) + appendCurrentChar(true); // don't attach + // are there comments before the bracket? + else if (isCharImmediatelyPostComment || isCharImmediatelyPostLineComment) + { + appendCharInsideComments(); + } + else + { + // if bracket is broken or not an assignment + if (lineBeginsWith('{') || previousNonWSChar != '=') + appendSpacePad(); + appendCurrentChar(false); // OK to attach + } + } + else if (bracketFormatMode == BREAK_MODE) + { + if (isWhiteSpace(peekNextChar())) + breakLine(); + else if (isBeforeComment()) + { + // do not break unless comment is at line end + if (isBeforeLineEndComment(charNum)) + { + currentChar = ' '; // remove bracket from current line + appendOpeningBracket = true; // append bracket to following line + } + } + appendCurrentChar(); + } + else if (bracketFormatMode == NONE_MODE) + { + if (lineBeginsWith('{')) // is opening bracket broken? + appendCurrentChar(); + else + appendCurrentChar(false); + } + } + else + appendCurrentChar(); // not the first opening bracket - don't change + + // if an opening bracket ends the line there will be no inStatement indent + char nextChar = peekNextChar(); + if (isWhiteSpace(nextChar) + || isBeforeLineEndComment(charNum) + || nextChar == '{') + isNonInStatementArray = true; + if (isNonInStatementArray) + TRarray('x'); + else + TRarray(' '); + + } + else if (currentChar == '}') + { + // does this close the first opening bracket in the array? + if (isOpeningArrayBracket && !IS_A(bracketType, SINGLE_LINE_TYPE) ) + { + breakLine(); + appendCurrentChar(); + } + else + appendCurrentChar(); + } +} + + +} // end namespace astyle diff --git a/CodeFormatter/ASResource.cpp b/CodeFormatter/ASResource.cpp new file mode 100644 index 0000000000..32e8c26e73 --- /dev/null +++ b/CodeFormatter/ASResource.cpp @@ -0,0 +1,387 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASResource.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" +namespace astyle +{ +const string ASResource::AS_IF = string("if"); +const string ASResource::AS_ELSE = string("else"); +const string ASResource::AS_FOR = string("for"); +const string ASResource::AS_DO = string("do"); +const string ASResource::AS_WHILE = string("while"); +const string ASResource::AS_SWITCH = string("switch"); +const string ASResource::AS_CASE = string("case"); +const string ASResource::AS_DEFAULT = string("default"); +const string ASResource::AS_CLASS = string("class"); +const string ASResource::AS_STRUCT = string("struct"); +const string ASResource::AS_UNION = string("union"); +const string ASResource::AS_INTERFACE = string("interface"); +const string ASResource::AS_NAMESPACE = string("namespace"); +const string ASResource::AS_EXTERN = string("extern"); +const string ASResource::AS_PUBLIC = string("public"); +const string ASResource::AS_PROTECTED = string("protected"); +const string ASResource::AS_PRIVATE = string("private"); +const string ASResource::AS_STATIC = string("static"); +const string ASResource::AS_SYNCHRONIZED = string("synchronized"); +const string ASResource::AS_OPERATOR = string("operator"); +const string ASResource::AS_TEMPLATE = string("template"); +const string ASResource::AS_TRY = string("try"); +const string ASResource::AS_CATCH = string("catch"); +const string ASResource::AS_FINALLY = string("finally"); +const string ASResource::AS_THROWS = string("throws"); +const string ASResource::AS_CONST = string("const"); + +const string ASResource::AS_ASM = string("asm"); + +const string ASResource::AS_BAR_DEFINE = string("#define"); +const string ASResource::AS_BAR_INCLUDE = string("#include"); +const string ASResource::AS_BAR_IF = string("#if"); +const string ASResource::AS_BAR_EL = string("#el"); +const string ASResource::AS_BAR_ENDIF = string("#endif"); + +const string ASResource::AS_OPEN_BRACKET = string("{"); +const string ASResource::AS_CLOSE_BRACKET = string("}"); +const string ASResource::AS_OPEN_LINE_COMMENT = string("//"); +const string ASResource::AS_OPEN_COMMENT = string("/*"); +const string ASResource::AS_CLOSE_COMMENT = string("*/"); + +const string ASResource::AS_ASSIGN = string("="); +const string ASResource::AS_PLUS_ASSIGN = string("+="); +const string ASResource::AS_MINUS_ASSIGN = string("-="); +const string ASResource::AS_MULT_ASSIGN = string("*="); +const string ASResource::AS_DIV_ASSIGN = string("/="); +const string ASResource::AS_MOD_ASSIGN = string("%="); +const string ASResource::AS_OR_ASSIGN = string("|="); +const string ASResource::AS_AND_ASSIGN = string("&="); +const string ASResource::AS_XOR_ASSIGN = string("^="); +const string ASResource::AS_GR_GR_ASSIGN = string(">>="); +const string ASResource::AS_LS_LS_ASSIGN = string("<<="); +const string ASResource::AS_GR_GR_GR_ASSIGN = string(">>>="); +const string ASResource::AS_LS_LS_LS_ASSIGN = string("<<<="); +const string ASResource::AS_RETURN = string("return"); + +const string ASResource::AS_EQUAL = string("=="); +const string ASResource::AS_PLUS_PLUS = string("++"); +const string ASResource::AS_MINUS_MINUS = string("--"); +const string ASResource::AS_NOT_EQUAL = string("!="); +const string ASResource::AS_GR_EQUAL = string(">="); +const string ASResource::AS_GR_GR = string(">>"); +const string ASResource::AS_GR_GR_GR = string(">>>"); +const string ASResource::AS_LS_EQUAL = string("<="); +const string ASResource::AS_LS_LS = string("<<"); +const string ASResource::AS_LS_LS_LS = string("<<<"); +const string ASResource::AS_ARROW = string("->"); +const string ASResource::AS_AND = string("&&"); +const string ASResource::AS_OR = string("||"); +const string ASResource::AS_COLON_COLON = string("::"); +const string ASResource::AS_PAREN_PAREN = string("()"); +const string ASResource::AS_BLPAREN_BLPAREN = string("[]"); + +const string ASResource::AS_PLUS = string("+"); +const string ASResource::AS_MINUS = string("-"); +const string ASResource::AS_MULT = string("*"); +const string ASResource::AS_DIV = string("/"); +const string ASResource::AS_MOD = string("%"); +const string ASResource::AS_GR = string(">"); +const string ASResource::AS_LS = string("<"); +const string ASResource::AS_NOT = string("!"); +const string ASResource::AS_BIT_OR = string("|"); +const string ASResource::AS_BIT_AND = string("&"); +const string ASResource::AS_BIT_NOT = string("~"); +const string ASResource::AS_BIT_XOR = string("^"); +const string ASResource::AS_QUESTION = string("?"); +const string ASResource::AS_COLON = string(":"); +const string ASResource::AS_COMMA = string(","); +const string ASResource::AS_SEMICOLON = string(";"); + +const string ASResource::AS_FOREACH = string("foreach"); +const string ASResource::AS_LOCK = string("lock"); +const string ASResource::AS_UNSAFE = string("unsafe"); +const string ASResource::AS_FIXED = string("fixed"); +const string ASResource::AS_GET = string("get"); +const string ASResource::AS_SET = string("set"); +const string ASResource::AS_ADD = string("add"); +const string ASResource::AS_REMOVE = string("remove"); + +const string ASResource::AS_CONST_CAST = string("const_cast"); +const string ASResource::AS_DYNAMIC_CAST = string("dynamic_cast"); +const string ASResource::AS_REINTERPRET_CAST = string("reinterpret_cast"); +const string ASResource::AS_STATIC_CAST = string("static_cast"); + + +/** + * Build the vector of assignment operators. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param assignmentOperators a reference to the vector to be built. + */ +void ASResource::buildAssignmentOperators(vector &assignmentOperators) +{ + assignmentOperators.push_back(&AS_ASSIGN); + assignmentOperators.push_back(&AS_PLUS_ASSIGN); + assignmentOperators.push_back(&AS_MINUS_ASSIGN); + assignmentOperators.push_back(&AS_MULT_ASSIGN); + assignmentOperators.push_back(&AS_DIV_ASSIGN); + assignmentOperators.push_back(&AS_MOD_ASSIGN); + assignmentOperators.push_back(&AS_OR_ASSIGN); + assignmentOperators.push_back(&AS_AND_ASSIGN); + assignmentOperators.push_back(&AS_XOR_ASSIGN); + + // Java + assignmentOperators.push_back(&AS_GR_GR_GR_ASSIGN); + assignmentOperators.push_back(&AS_GR_GR_ASSIGN); + assignmentOperators.push_back(&AS_LS_LS_ASSIGN); + + // Unknown + assignmentOperators.push_back(&AS_LS_LS_LS_ASSIGN); + + assignmentOperators.push_back(&AS_RETURN); +} + +/** + * Build the vector of C++ cast operators. + * Used by ONLY ASFormatter.cpp + * + * @param castOperators a reference to the vector to be built. + */ +void ASResource::buildCastOperators(vector &castOperators) +{ + castOperators.push_back(&AS_CONST_CAST); + castOperators.push_back(&AS_DYNAMIC_CAST); + castOperators.push_back(&AS_REINTERPRET_CAST); + castOperators.push_back(&AS_STATIC_CAST); +} + +/** + * Build the vector of header words. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param headers a reference to the vector to be built. + */ +void ASResource::buildHeaders(vector &headers, int fileType, bool beautifier) +{ + headers.push_back(&AS_IF); + headers.push_back(&AS_ELSE); + headers.push_back(&AS_FOR); + headers.push_back(&AS_WHILE); + headers.push_back(&AS_DO); + headers.push_back(&AS_SWITCH); + headers.push_back(&AS_TRY); + headers.push_back(&AS_CATCH); + + if (beautifier) + { + headers.push_back(&AS_CASE); + headers.push_back(&AS_DEFAULT); + headers.push_back(&AS_CONST); + headers.push_back(&AS_STATIC); + headers.push_back(&AS_EXTERN); + headers.push_back(&AS_TEMPLATE); + } + + if (fileType == JAVA_TYPE) + { + headers.push_back(&AS_FINALLY); + headers.push_back(&AS_SYNCHRONIZED); + } + + if (fileType == SHARP_TYPE) + { + headers.push_back(&AS_FINALLY); + headers.push_back(&AS_FOREACH); + headers.push_back(&AS_LOCK); + headers.push_back(&AS_UNSAFE); + headers.push_back(&AS_FIXED); + headers.push_back(&AS_GET); + headers.push_back(&AS_SET); + headers.push_back(&AS_ADD); + headers.push_back(&AS_REMOVE); + } +} + +/** + * Build the vector of non-assignment operators. + * Used by ONLY ASBeautifier.cpp + * + * @param nonParenHeaders a reference to the vector to be built. + */ +void ASResource::buildNonAssignmentOperators(vector &nonAssignmentOperators) +{ + nonAssignmentOperators.push_back(&AS_EQUAL); + nonAssignmentOperators.push_back(&AS_PLUS_PLUS); + nonAssignmentOperators.push_back(&AS_MINUS_MINUS); + nonAssignmentOperators.push_back(&AS_NOT_EQUAL); + nonAssignmentOperators.push_back(&AS_GR_EQUAL); + nonAssignmentOperators.push_back(&AS_GR_GR_GR); + nonAssignmentOperators.push_back(&AS_GR_GR); + nonAssignmentOperators.push_back(&AS_LS_EQUAL); + nonAssignmentOperators.push_back(&AS_LS_LS_LS); + nonAssignmentOperators.push_back(&AS_LS_LS); + nonAssignmentOperators.push_back(&AS_ARROW); + nonAssignmentOperators.push_back(&AS_AND); + nonAssignmentOperators.push_back(&AS_OR); +} + +/** + * Build the vector of header non-paren headers. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param nonParenHeaders a reference to the vector to be built. + */ +void ASResource::buildNonParenHeaders(vector &nonParenHeaders, int fileType, bool beautifier) +{ + nonParenHeaders.push_back(&AS_ELSE); + nonParenHeaders.push_back(&AS_DO); + nonParenHeaders.push_back(&AS_TRY); + + if (beautifier) + { + nonParenHeaders.push_back(&AS_CASE); + nonParenHeaders.push_back(&AS_DEFAULT); + nonParenHeaders.push_back(&AS_CONST); + nonParenHeaders.push_back(&AS_STATIC); + nonParenHeaders.push_back(&AS_EXTERN); + nonParenHeaders.push_back(&AS_TEMPLATE); + } + + if (fileType == JAVA_TYPE) + { + nonParenHeaders.push_back(&AS_FINALLY); + } + + if (fileType == SHARP_TYPE) + { + nonParenHeaders.push_back(&AS_FINALLY); + nonParenHeaders.push_back(&AS_UNSAFE); + nonParenHeaders.push_back(&AS_GET); + nonParenHeaders.push_back(&AS_SET); + nonParenHeaders.push_back(&AS_ADD); + nonParenHeaders.push_back(&AS_REMOVE); + } +} + +/** + * Build the vector of operators. + * Used by ONLY ASFormatter.cpp + * + * @param operators a reference to the vector to be built. + */ +void ASResource::buildOperators(vector &operators) +{ + operators.push_back(&AS_PLUS_ASSIGN); + operators.push_back(&AS_MINUS_ASSIGN); + operators.push_back(&AS_MULT_ASSIGN); + operators.push_back(&AS_DIV_ASSIGN); + operators.push_back(&AS_MOD_ASSIGN); + operators.push_back(&AS_OR_ASSIGN); + operators.push_back(&AS_AND_ASSIGN); + operators.push_back(&AS_XOR_ASSIGN); + operators.push_back(&AS_EQUAL); + operators.push_back(&AS_PLUS_PLUS); + operators.push_back(&AS_MINUS_MINUS); + operators.push_back(&AS_NOT_EQUAL); + operators.push_back(&AS_GR_EQUAL); + operators.push_back(&AS_GR_GR_GR_ASSIGN); + operators.push_back(&AS_GR_GR_ASSIGN); + operators.push_back(&AS_GR_GR_GR); + operators.push_back(&AS_GR_GR); + operators.push_back(&AS_LS_EQUAL); + operators.push_back(&AS_LS_LS_LS_ASSIGN); + operators.push_back(&AS_LS_LS_ASSIGN); + operators.push_back(&AS_LS_LS_LS); + operators.push_back(&AS_LS_LS); + operators.push_back(&AS_ARROW); + operators.push_back(&AS_AND); + operators.push_back(&AS_OR); + operators.push_back(&AS_COLON_COLON); + operators.push_back(&AS_PLUS); + operators.push_back(&AS_MINUS); + operators.push_back(&AS_MULT); + operators.push_back(&AS_DIV); + operators.push_back(&AS_MOD); + operators.push_back(&AS_QUESTION); + operators.push_back(&AS_COLON); + operators.push_back(&AS_ASSIGN); + operators.push_back(&AS_LS); + operators.push_back(&AS_GR); + operators.push_back(&AS_NOT); + operators.push_back(&AS_BIT_OR); + operators.push_back(&AS_BIT_AND); + operators.push_back(&AS_BIT_NOT); + operators.push_back(&AS_BIT_XOR); + operators.push_back(&AS_OPERATOR); + operators.push_back(&AS_COMMA); + operators.push_back(&AS_RETURN); +} + +/** + * Build the vector of pre-block statements. + * Used by ONLY ASBeautifier.cpp + * + * @param preBlockStatements a reference to the vector to be built. + */ +void ASResource::buildPreBlockStatements(vector &preBlockStatements) +{ + preBlockStatements.push_back(&AS_CLASS); + preBlockStatements.push_back(&AS_STRUCT); + preBlockStatements.push_back(&AS_UNION); + preBlockStatements.push_back(&AS_INTERFACE); + preBlockStatements.push_back(&AS_NAMESPACE); + preBlockStatements.push_back(&AS_THROWS); + preBlockStatements.push_back(&AS_EXTERN); +} + +/** + * Build the vector of pre-command headers. + * Used by ONLY ASFormatter.cpp + * + * @param preCommandHeaders a reference to the vector to be built. + */ +void ASResource::buildPreCommandHeaders(vector &preCommandHeaders) +{ + preCommandHeaders.push_back(&AS_EXTERN); + preCommandHeaders.push_back(&AS_THROWS); + preCommandHeaders.push_back(&AS_CONST); +} + +/** + * Build the vector of pre-definition headers. + * Used by ONLY ASFormatter.cpp + * + * @param preDefinitionHeaders a reference to the vector to be built. + */ +void ASResource::buildPreDefinitionHeaders(vector &preDefinitionHeaders) +{ + preDefinitionHeaders.push_back(&AS_CLASS); + preDefinitionHeaders.push_back(&AS_INTERFACE); + preDefinitionHeaders.push_back(&AS_NAMESPACE); + preDefinitionHeaders.push_back(&AS_STRUCT); +} + + +} // end namespace astyle diff --git a/CodeFormatter/CodeFormatter.project b/CodeFormatter/CodeFormatter.project new file mode 100644 index 0000000000..c69fab0c4f --- /dev/null +++ b/CodeFormatter/CodeFormatter.project @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeFormatter/CodeFormatter.vcproj b/CodeFormatter/CodeFormatter.vcproj new file mode 100644 index 0000000000..40cb128bdf --- /dev/null +++ b/CodeFormatter/CodeFormatter.vcproj @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeFormatter/astyle.h b/CodeFormatter/astyle.h new file mode 100644 index 0000000000..e2b5d205f0 --- /dev/null +++ b/CodeFormatter/astyle.h @@ -0,0 +1,494 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * astyle.h + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#ifndef ASTYLE_H +#define ASTYLE_H + +#ifdef __VMS +#define __USE_STD_IOSTREAM 1 +#include +#endif + +#include +#include +#include + +using namespace std; + +// 4996 - secure version deprecation warnings for .NET 2005 +// 4267 - 64 bit signed/unsigned loss of data +#ifdef _MSC_VER +#pragma warning(disable: 4996) +#pragma warning(disable: 4267) +#endif + +namespace astyle +{ + +enum FileType { C_TYPE=0, JAVA_TYPE=1, SHARP_TYPE=2 }; + +/* The enums below are not recognized by 'vectors' in Microsoft Visual C++ + V5 when they are part of a namespace!!! Use Visual C++ V6 or higher. +*/ +enum BracketMode { NONE_MODE, ATTACH_MODE, BREAK_MODE, BDAC_MODE }; + +enum BracketType { NULL_TYPE = 0, + NAMESPACE_TYPE = 1, // also a DEFINITION_TYPE + CLASS_TYPE = 2, // also a DEFINITION_TYPE + DEFINITION_TYPE = 4, + COMMAND_TYPE = 8, + ARRAY_TYPE = 16, // arrays and enums + SINGLE_LINE_TYPE = 32 + }; + +class ASSourceIterator +{ + public: + int eolWindows; + int eolLinux; + int eolMacOld; + char outputEOL[4]; // output end of line char + ASSourceIterator() { eolWindows = eolLinux = eolMacOld = 0; } + virtual ~ASSourceIterator() {} + virtual bool hasMoreLines() const = 0; + virtual string nextLine() = 0; +}; + +class ASResource +{ + public: + void buildAssignmentOperators(vector &assignmentOperators); + void buildCastOperators(vector &castOperators); + void buildHeaders(vector &headers, int fileType, bool beautifier=false); + void buildNonAssignmentOperators(vector &nonAssignmentOperators); + void buildNonParenHeaders(vector &nonParenHeaders, int fileType, bool beautifier=false); + void buildOperators(vector &operators); + void buildPreBlockStatements(vector &preBlockStatements); + void buildPreCommandHeaders(vector &preCommandHeaders); + void buildPreDefinitionHeaders(vector &preDefinitionHeaders); + + public: + static const string AS_IF, AS_ELSE; + static const string AS_DO, AS_WHILE; + static const string AS_FOR; + static const string AS_SWITCH, AS_CASE, AS_DEFAULT; + static const string AS_TRY, AS_CATCH, AS_THROWS, AS_FINALLY; + static const string AS_PUBLIC, AS_PROTECTED, AS_PRIVATE; + static const string AS_CLASS, AS_STRUCT, AS_UNION, AS_INTERFACE, AS_NAMESPACE, AS_EXTERN; + static const string AS_STATIC; + static const string AS_CONST; + static const string AS_SYNCHRONIZED; + static const string AS_OPERATOR, AS_TEMPLATE; + static const string AS_OPEN_BRACKET, AS_CLOSE_BRACKET; + static const string AS_OPEN_LINE_COMMENT, AS_OPEN_COMMENT, AS_CLOSE_COMMENT; + static const string AS_BAR_DEFINE, AS_BAR_INCLUDE, AS_BAR_IF, AS_BAR_EL, AS_BAR_ENDIF; + static const string AS_RETURN; + static const string AS_ASSIGN, AS_PLUS_ASSIGN, AS_MINUS_ASSIGN, AS_MULT_ASSIGN; + static const string AS_DIV_ASSIGN, AS_MOD_ASSIGN, AS_XOR_ASSIGN, AS_OR_ASSIGN, AS_AND_ASSIGN; + static const string AS_GR_GR_ASSIGN, AS_LS_LS_ASSIGN, AS_GR_GR_GR_ASSIGN, AS_LS_LS_LS_ASSIGN; + static const string AS_EQUAL, AS_PLUS_PLUS, AS_MINUS_MINUS, AS_NOT_EQUAL, AS_GR_EQUAL, AS_GR_GR_GR, AS_GR_GR; + static const string AS_LS_EQUAL, AS_LS_LS_LS, AS_LS_LS, AS_ARROW, AS_AND, AS_OR; + static const string AS_COLON_COLON, AS_PAREN_PAREN, AS_BLPAREN_BLPAREN; + static const string AS_PLUS, AS_MINUS, AS_MULT, AS_DIV, AS_MOD, AS_GR, AS_LS; + static const string AS_NOT, AS_BIT_XOR, AS_BIT_OR, AS_BIT_AND, AS_BIT_NOT; + static const string AS_QUESTION, AS_COLON, AS_SEMICOLON, AS_COMMA; + static const string AS_ASM; + static const string AS_FOREACH, AS_LOCK, AS_UNSAFE, AS_FIXED; + static const string AS_GET, AS_SET, AS_ADD, AS_REMOVE; + static const string AS_CONST_CAST, AS_DYNAMIC_CAST, AS_REINTERPRET_CAST, AS_STATIC_CAST; +}; + +class ASBeautifier : protected ASResource +{ + public: + ASBeautifier(); + virtual ~ASBeautifier(); + virtual void init(ASSourceIterator* iter); // pointer to dynamically created iterator. + void init(); + virtual bool hasMoreLines() const; + virtual string nextLine(); + virtual string beautify(const string &line); + void setTabIndentation(int length = 4, bool forceTabs = false); + void setSpaceIndentation(int length = 4); + void setMaxInStatementIndentLength(int max); + void setMinConditionalIndentLength(int min); + void setClassIndent(bool state); + void setSwitchIndent(bool state); + void setCaseIndent(bool state); + void setBracketIndent(bool state); + void setBlockIndent(bool state); + void setNamespaceIndent(bool state); + void setLabelIndent(bool state); + void setCStyle(); + void setJavaStyle(); + void setSharpStyle(); + void setEmptyLineFill(bool state); + void setPreprocessorIndent(bool state); + int getIndentLength(void); + string getIndentString(void); + bool getCaseIndent(void); + bool getCStyle(void); + bool getJavaStyle(void); + bool getSharpStyle(void); + bool getEmptyLineFill(void); + + protected: + int getNextProgramCharDistance(const string &line, int i); +// bool isLegalNameChar(char ch) const; + const string *findHeader(const string &line, int i, + const vector &possibleHeaders, + bool checkBoundry = true); + string trim(const string &str); + int indexOf(vector &container, const string *element); + int fileType; + bool isCStyle; + bool isJavaStyle; + bool isSharpStyle; + + // variables set by ASFormatter - must be updated in preprocessor + int inLineNumber; // for debugging + int outLineNumber; // for debugging + bool lineCommentNoBeautify; + bool isNonInStatementArray; + + private: + ASBeautifier(const ASBeautifier ©); + void operator=(ASBeautifier&); // not to be implemented + + void initStatic(); + void registerInStatementIndent(const string &line, int i, int spaceTabCount, + int minIndent, bool updateParenStack); + string preLineWS(int spaceTabCount, int tabCount); + + static vector headers; + static vector nonParenHeaders; + static vector preBlockStatements; + static vector assignmentOperators; + static vector nonAssignmentOperators; + + ASSourceIterator *sourceIterator; + vector *waitingBeautifierStack; + vector *activeBeautifierStack; + vector *waitingBeautifierStackLengthStack; + vector *activeBeautifierStackLengthStack; + vector *headerStack; + vector< vector* > *tempStacks; + vector *blockParenDepthStack; + vector *blockStatementStack; + vector *parenStatementStack; + vector *inStatementIndentStack; + vector *inStatementIndentStackSizeStack; + vector *parenIndentStack; + vector *bracketBlockStateStack; + string indentString; + const string *currentHeader; + const string *previousLastLineHeader; + const string *immediatelyPreviousAssignmentOp; + const string *probationHeader; + bool isInQuote; + bool isInComment; + bool isInCase; + bool isInQuestion; + bool isInStatement; + bool isInHeader; + bool isInOperator; + bool isInTemplate; + bool isInDefine; + bool isInDefineDefinition; + bool classIndent; + bool isInClassHeader; + bool isInClassHeaderTab; + bool switchIndent; + bool caseIndent; + bool namespaceIndent; + bool bracketIndent; + bool blockIndent; + bool labelIndent; + bool preprocessorIndent; + bool isInConditional; + bool isMinimalConditinalIndentSet; + bool shouldForceTabIndentation; + bool emptyLineFill; + bool backslashEndsPrevLine; + bool blockCommentNoIndent; + bool blockCommentNoBeautify; + bool previousLineProbationTab; + int minConditionalIndent; + int parenDepth; + int indentLength; + int blockTabCount; + int leadingWhiteSpaces; + int maxInStatementIndent; + int templateDepth; + int prevFinalLineSpaceTabCount; + int prevFinalLineTabCount; + int defineTabCount; + char quoteChar; + char prevNonSpaceCh; + char currentNonSpaceCh; + char currentNonLegalCh; + char prevNonLegalCh; + char peekNextChar(string &line, int i); + + protected: // inline functions + // check if a specific character can be used in a legal variable/method/class name + inline bool isLegalNameChar(char ch) const { + return (isalnum(ch) || ch == '.' || ch == '_' || (isJavaStyle && ch == '$') || (isCStyle && ch == '~')); + } + + // check if a specific character is a whitespace character + inline bool isWhiteSpace(char ch) const { + return (ch == ' ' || ch == '\t'); + } +}; + + +class ASEnhancer +{ + public: + // functions + ASEnhancer(); + ~ASEnhancer(); + void init(int, string, bool, bool, bool, bool, bool); + void enhance(string &line); + + private: + // set by init function + int indentLength; + bool useTabs; + bool isCStyle; + bool isJavaStyle; + bool isSharpStyle; + bool caseIndent; + bool emptyLineFill; + + // parsing variables + int lineNumber; + bool isInQuote; + bool isInComment; + char quoteChar; + + // unindent variables + int bracketCount; + int switchDepth; + bool lookingForCaseBracket; + bool unindentNextLine; + + // stringstream for trace + stringstream *traceOut; + + private: // private functions + bool findKeyword(const string &line, int i, const char *header) const; + int indentLine(string &line, const int indent) const; + int unindentLine(string &line, const int unindent) const; + + private: + // struct used by ParseFormattedLine function + // contains variables used to unindent the case blocks + struct switchVariables { + int switchBracketCount; + int unindentDepth; + bool unindentCase; + + switchVariables() { // constructor + switchBracketCount = 0; + unindentDepth = 0; + unindentCase = false; + } + }; + + private: // inline functions + // check if a specific character can be used in a legal variable/method/class name + inline bool isLegalNameCharX(char ch) const { + return (isalnum(ch) || ch == '.' || ch == '_' || (isJavaStyle && ch == '$') || (isCStyle && ch == '~')); + } + + // check if a specific character is a whitespace character + inline bool isWhiteSpaceX(char ch) const { + return (ch == ' ' || ch == '\t'); + } +}; + + +class ASFormatter : public ASBeautifier, private ASEnhancer +{ + public: + ASFormatter(); + virtual ~ASFormatter(); + virtual void init(ASSourceIterator* iter); + virtual bool hasMoreLines() const; + virtual string nextLine(); + void setBracketFormatMode(BracketMode mode); + void setBreakClosingHeaderBracketsMode(bool state); + void setOperatorPaddingMode(bool mode); + void setParensOutsidePaddingMode(bool mode); + void setParensInsidePaddingMode(bool mode); + void setParensUnPaddingMode(bool state); + void setBreakOneLineBlocksMode(bool state); + void setSingleStatementsMode(bool state); + void setTabSpaceConversionMode(bool state); + void setBreakBlocksMode(bool state); + void setBreakClosingHeaderBlocksMode(bool state); + void setBreakElseIfsMode(bool state); + string fileName; + + private: + void ASformatter(ASFormatter ©); // not to be imlpemented + void operator=(ASFormatter&); // not to be implemented + void staticInit(); + void goForward(int i); + void trimNewLine(); + char peekNextChar() const; + BracketType getBracketType() const; + bool getNextChar(); + bool isBeforeComment() const; + bool isBeforeLineEndComment(int startPos) const; + bool isPointerOrReference() const; + bool isUnaryMinus() const; + bool isInExponent() const; + bool isOneLineBlockReached() const; +// bool isNextCharWhiteSpace() const; + bool lineBeginsWith(char charToCheck) const; + void appendChar(char ch, bool canBreakLine = true); + void appendCharInsideComments(); + void appendSequence(const string &sequence, bool canBreakLine = true); + void appendSpacePad(); + void appendSpaceAfter(); + void breakLine(); + void padOperators(const string *newOperator); + void padParens(); + void formatBrackets(BracketType bracketType); + void formatArrayBrackets(BracketType bracketType, bool isOpeningArrayBracket); + void adjustComments(); + const string *findHeader(const vector &headers, bool checkBoundry = true); + + static vector headers; + static vector nonParenHeaders; + static vector preDefinitionHeaders; + static vector preCommandHeaders; + static vector operators; + static vector assignmentOperators; + static vector castOperators; + + ASSourceIterator *sourceIterator; + vector *preBracketHeaderStack; + vector *bracketTypeStack; + vector *parenStack; + string readyFormattedLine; + string currentLine; + string formattedLine; + const string *currentHeader; + const string *previousOperator; // used ONLY by pad=oper + char currentChar; + char previousChar; + char previousNonWSChar; + char previousCommandChar; + char quoteChar; + int charNum; + int spacePadNum; + int templateDepth; + int traceFileNumber; + size_t formattedLineCommentNum; // comment location on formattedLine + size_t previousReadyFormattedLineLength; + BracketMode bracketFormatMode; + BracketType previousBracketType; + bool isVirgin; + bool shouldPadOperators; + bool shouldPadParensOutside; + bool shouldPadParensInside; + bool shouldUnPadParens; + bool shouldConvertTabs; + bool isInLineComment; + bool isInComment; + bool isInPreprocessor; + bool isInTemplate; // true both in template definitions (e.g. template) and template usage (e.g. F). + bool doesLineStartComment; + bool isInQuote; + bool isInBlParen; + bool isSpecialChar; + bool isNonParenHeader; + bool foundQuestionMark; + bool foundPreDefinitionHeader; + bool foundNamespaceHeader; + bool foundClassHeader; + bool foundPreCommandHeader; + bool foundCastOperator; + bool isInLineBreak; +// bool isInClosingBracketLineBreak; + bool endOfCodeReached; + bool lineCommentNoIndent; + bool isLineReady; + bool isPreviousBracketBlockRelated; + bool isInPotentialCalculation; + bool isCharImmediatelyPostComment; + bool isPreviousCharPostComment; + bool isCharImmediatelyPostLineComment; + bool isCharImmediatelyPostOpenBlock; + bool isCharImmediatelyPostCloseBlock; + bool isCharImmediatelyPostTemplate; + bool shouldBreakOneLineBlocks; + bool shouldReparseCurrentChar; + bool shouldBreakOneLineStatements; + bool shouldBreakLineAfterComments; + bool shouldBreakClosingHeaderBrackets; + bool shouldBreakElseIfs; + bool passedSemicolon; + bool passedColon; + bool isImmediatelyPostComment; + bool isImmediatelyPostLineComment; + bool isImmediatelyPostEmptyBlock; + bool isImmediatelyPostPreprocessor; + + bool shouldBreakBlocks; + bool shouldBreakClosingHeaderBlocks; + bool isPrependPostBlockEmptyLineRequested; + bool isAppendPostBlockEmptyLineRequested; + + bool prependEmptyLine; + bool appendOpeningBracket; + bool foundClosingHeader; + + bool isInHeader; + bool isImmediatelyPostHeader; + + private: // inline functions + // append the CURRENT character (curentChar)to the current formatted line. + inline void appendCurrentChar(bool canBreakLine = true) { + appendChar(currentChar, canBreakLine); + } + + // check if a specific sequence exists in the current placement of the current line + inline bool isSequenceReached(const char *sequence) const { + return currentLine.compare(charNum, strlen(sequence), sequence) == 0; + } +}; + +} // end of namespace astyle + +#endif // closes ASTYLE_H + diff --git a/CodeFormatter/astyle_main.cpp b/CodeFormatter/astyle_main.cpp new file mode 100644 index 0000000000..a7fa3e93a0 --- /dev/null +++ b/CodeFormatter/astyle_main.cpp @@ -0,0 +1,1134 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * astyle_main.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include +#include +#include +#include + +#ifndef ASTYLE_LIB // for console build only +#if defined(_MSC_VER) || defined(__DMC__) +#include +#include +//#define utimbuf _utimbuf +//#define utime _utime +#else +#include +#include +#endif // end compiler checks +#endif // end ASTYLE_LIB + +// for G++ implementation of string.compare: +// compare((str), (place), (length)) instead of compare(place, length, str) +#if defined(__GNUC__) && __GNUC__ < 3 +#error - Use GNU C compiler release 3 or higher +#endif + +// for namespace problem in version 5.0 +#if defined(_MSC_VER) && _MSC_VER < 1200 // check for V6.0 +#error - Use Microsoft compiler version 6 or higher +#endif + +#ifdef _WIN32 +#define STDCALL __stdcall +#define EXPORT __declspec(dllexport) +#else +#define STDCALL +#define EXPORT +#endif + +#define IS_OPTION(arg,op) ((arg).compare(op)==0) +#define IS_OPTIONS(arg,a,b) (IS_OPTION((arg),(a)) || IS_OPTION((arg),(b))) + +#define GET_PARAM(arg,op) ((arg).substr(strlen(op))) +#define GET_PARAMS(arg,a,b) (isParamOption((arg),(a)) ? GET_PARAM((arg),(a)) : GET_PARAM((arg),(b))) + +using namespace astyle; + +const char* _version = "1.21"; + +// some compilers want this declared +bool parseOption(ASFormatter &formatter, const string &arg, const string &errorInfo); + +#ifdef ASTYLE_LIB +// GUI function pointers +typedef void (STDCALL *fpError)(int, char*); // pointer to callback error handler +typedef char* (STDCALL *fpAlloc)(unsigned long); // pointer to callback memory allocation +// GUI variables +stringstream *_err = NULL; +#else +// console variables +ostream *_err = &cerr; +bool _purgeOrigIn = false; +bool _preserveDate = false; +string _suffix = ".orig"; +stringstream _msg; // info messages are not printed until a file is read +#endif +bool _modeManuallySet = false; + + +// typename will be istringstream for GUI and istream otherwise +template +class ASStreamIterator : + public ASSourceIterator +{ + public: + ASStreamIterator(T *in); + virtual ~ASStreamIterator(); + bool hasMoreLines() const; + string nextLine(); + + private: + T * inStream; + string buffer; + bool inStreamEOF; +}; + +template +ASStreamIterator::ASStreamIterator(T *in) +{ + inStream = in; + buffer.reserve(200); + inStreamEOF = false; +} + + +template +ASStreamIterator::~ASStreamIterator() +{ +} + + +template +bool ASStreamIterator::hasMoreLines() const +{ + return !inStreamEOF; +} + + +/** + * read the input stream, delete any end of line characters, + * and build a string that contains the input line. + * + * @return string containing the next input line minus any end of line characters + */ +template +string ASStreamIterator::nextLine() +{ + char ch; + char LF = '\n'; + char CR = '\r'; + inStream->get(ch); + buffer.clear(); + + while (!inStream->eof() && ch != LF && ch != CR) + { + buffer.append(1, ch); + inStream->get(ch); + } + + if (inStream->eof()) + { + inStreamEOF = true; + return buffer; + } + + int peekch = inStream->peek(); + + if (ch == CR) // CR+LF is windows otherwise Mac OS 9 + { + if (peekch == LF) + { + inStream->get(); + eolWindows++; + } + else + eolMacOld++; + } + else // LF is Linux, allow for improbable LF/CR + { + if (peekch == CR) + { + inStream->get(); + eolWindows++; + } + else + eolLinux++; + } + + // set output end of line character + if (eolWindows >= eolLinux) + if (eolWindows >= eolMacOld) + strcpy(outputEOL, "\r\n"); // Windows (CR+LF) + else + strcpy(outputEOL, "\r"); // MacOld (CR) + else + if (eolLinux >= eolMacOld) + strcpy(outputEOL, "\n"); // Linux (LF) + else + strcpy(outputEOL, "\r"); // MacOld (CR) + + return buffer; +} + + +template +bool parseOptions(ASFormatter &formatter, + const ITER &optionsBegin, + const ITER &optionsEnd, + const string &errorInfo) +{ + ITER option; + bool ok = true; + string arg, subArg; + + for (option = optionsBegin; option != optionsEnd; ++option) + { + arg = *option; + + if (arg.compare(0, 2, "--") == 0) + ok &= parseOption(formatter, arg.substr(2), errorInfo); + else if (arg[0] == '-') + { + size_t i; + + for (i = 1; i < arg.length(); ++i) + { + if (isalpha(arg[i]) && i > 1) + { + ok &= parseOption(formatter, subArg, errorInfo); + subArg = ""; + } + subArg.append(1, arg[i]); + } + ok &= parseOption(formatter, subArg, errorInfo); + subArg = ""; + } + else + { + ok &= parseOption(formatter, arg, errorInfo); + subArg = ""; + } + } + return ok; +} + +void importOptions(istream &in, vector &optionsVector) +{ + char ch; + string currentToken; + + while (in) + { + currentToken = ""; + do + { + in.get(ch); + if (in.eof()) + break; + // treat '#' as line comments + if (ch == '#') + while (in) + { + in.get(ch); + if (ch == '\n') + break; + } + + // break options on spaces, tabs or new-lines + if (in.eof() || ch == ' ' || ch == '\t' || ch == '\n') + break; + else + currentToken.append(1, ch); + + } + while (in); + + if (currentToken.length() != 0) + optionsVector.push_back(currentToken); + } +} + +bool isParamOption(const string &arg, const char *option) +{ + bool retVal = arg.compare(0, strlen(option), option) == 0; + // if comparing for short option, 2nd char of arg must be numeric + if (retVal && strlen(option) == 1 && arg.length() > 1) + if (!isdigit(arg[1])) + retVal = false; + return retVal; +} + +void isOptionError(const string &arg, const string &errorInfo) +{ +#ifdef ASTYLE_LIB + if (_err->str().length() == 0) + { + (*_err) << errorInfo << endl; // need main error message + (*_err) << arg; // output the option in error + } + else + (*_err) << endl << arg; // put endl after previous option +#else + if (errorInfo.length() > 0) // to avoid a compiler warning + (*_err) << "Error in param: " << arg << endl; +#endif +} + +bool isParamOption(const string &arg, const char *option1, const char *option2) +{ + return isParamOption(arg, option1) || isParamOption(arg, option2); +} + + +bool parseOption(ASFormatter &formatter, const string &arg, const string &errorInfo) +{ + if ( IS_OPTION(arg, "style=ansi") ) + { + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(BREAK_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=gnu") ) + { + formatter.setSpaceIndentation(2); + formatter.setBracketFormatMode(BREAK_MODE); + formatter.setBlockIndent(true); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=java") ) + { +// formatter.setJavaStyle(); +// _modeManuallySet = true; + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(ATTACH_MODE); + formatter.setBracketIndent(false); + formatter.setSwitchIndent(false); + } + else if ( IS_OPTION(arg, "style=kr") ) + { + //manuallySetCStyle(formatter); + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(ATTACH_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=linux") ) + { + formatter.setSpaceIndentation(8); + formatter.setBracketFormatMode(BDAC_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + // must check for mode=cs before mode=c !!! + else if ( IS_OPTION(arg, "mode=cs") ) + { + formatter.setSharpStyle(); + _modeManuallySet = true; + } + else if ( IS_OPTION(arg, "mode=c") ) + { + formatter.setCStyle(); + _modeManuallySet = true; + } + else if ( IS_OPTION(arg, "mode=java") ) + { + formatter.setJavaStyle(); + _modeManuallySet = true; + } + else if ( isParamOption(arg, "t", "indent=tab=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setTabIndentation(spaceNum, false); + } + else if ( isParamOption(arg, "T", "force-indent=tab=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setTabIndentation(spaceNum, true); + } + else if ( IS_OPTION(arg, "indent=tab") ) + { + formatter.setTabIndentation(4); + } + else if ( isParamOption(arg, "s", "indent=spaces=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "s", "indent=spaces="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setSpaceIndentation(spaceNum); + } + else if ( IS_OPTION(arg, "indent=spaces") ) + { + formatter.setSpaceIndentation(4); + } + else if ( isParamOption(arg, "m", "min-conditional-indent=") ) + { + int minIndent = 8; + string minIndentParam = GET_PARAMS(arg, "m", "min-conditional-indent="); + if (minIndentParam.length() > 0) + minIndent = atoi(minIndentParam.c_str()); + if (minIndent > 40) + isOptionError(arg, errorInfo); + else + formatter.setMinConditionalIndentLength(minIndent); + } + else if ( isParamOption(arg, "M", "max-instatement-indent=") ) + { + int maxIndent = 40; + string maxIndentParam = GET_PARAMS(arg, "M", "max-instatement-indent="); + if (maxIndentParam.length() > 0) + maxIndent = atoi(maxIndentParam.c_str()); + if (maxIndent > 80) + isOptionError(arg, errorInfo); + else + formatter.setMaxInStatementIndentLength(maxIndent); + } + else if ( IS_OPTIONS(arg, "B", "indent-brackets") ) + { + formatter.setBracketIndent(true); + } + else if ( IS_OPTIONS(arg, "G", "indent-blocks") ) + { + formatter.setBlockIndent(true); + } + else if ( IS_OPTIONS(arg, "N", "indent-namespaces") ) + { + formatter.setNamespaceIndent(true); + } + else if ( IS_OPTIONS(arg, "C", "indent-classes") ) + { + formatter.setClassIndent(true); + } + else if ( IS_OPTIONS(arg, "S", "indent-switches") ) + { + formatter.setSwitchIndent(true); + } + else if ( IS_OPTIONS(arg, "K", "indent-cases") ) + { + formatter.setCaseIndent(true); + } + else if ( IS_OPTIONS(arg, "L", "indent-labels") ) + { + formatter.setLabelIndent(true); + } + else if ( IS_OPTIONS(arg, "y", "brackets=break-closing") ) + { + formatter.setBreakClosingHeaderBracketsMode(true); + } + else if ( IS_OPTIONS(arg, "b", "brackets=break") ) + { + formatter.setBracketFormatMode(BREAK_MODE); + } + else if ( IS_OPTIONS(arg, "a", "brackets=attach") ) + { + formatter.setBracketFormatMode(ATTACH_MODE); + } + else if ( IS_OPTIONS(arg, "l", "brackets=linux") ) + { + formatter.setBracketFormatMode(BDAC_MODE); + } + else if ( IS_OPTIONS(arg, "O", "one-line=keep-blocks") ) + { + formatter.setBreakOneLineBlocksMode(false); + } + else if ( IS_OPTIONS(arg, "o", "one-line=keep-statements") ) + { + formatter.setSingleStatementsMode(false); + } + else if ( IS_OPTIONS(arg, "P", "pad=paren") ) + { + formatter.setParensOutsidePaddingMode(true); + formatter.setParensInsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "d", "pad=paren-out") ) + { + formatter.setParensOutsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "D", "pad=paren-in") ) + { + formatter.setParensInsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "U", "unpad=paren") ) + { + formatter.setParensUnPaddingMode(true); + } + else if ( IS_OPTIONS(arg, "p", "pad=oper") ) + { + formatter.setOperatorPaddingMode(true); + } + else if ( IS_OPTIONS(arg, "E", "fill-empty-lines") ) + { + formatter.setEmptyLineFill(true); + } + else if ( IS_OPTIONS(arg, "w", "indent-preprocessor") ) + { + formatter.setPreprocessorIndent(true); + } + else if ( IS_OPTIONS(arg, "V", "convert-tabs") ) + { + formatter.setTabSpaceConversionMode(true); + } + else if ( IS_OPTIONS(arg, "F", "break-blocks=all") ) + { + formatter.setBreakBlocksMode(true); + formatter.setBreakClosingHeaderBlocksMode(true); + } + else if ( IS_OPTIONS(arg, "f", "break-blocks") ) + { + formatter.setBreakBlocksMode(true); + } + else if ( IS_OPTIONS(arg, "e", "break-elseifs") ) + { + formatter.setBreakElseIfsMode(true); + } +#ifdef ASTYLE_LIB + // End of options used by GUI + else + isOptionError(arg, errorInfo); +#else + // Options used by only console + else if ( IS_OPTIONS(arg, "n", "suffix=none") ) + { + _purgeOrigIn = true; + } + else if ( isParamOption(arg, "suffix=") ) + { + string suffixParam = GET_PARAM(arg, "suffix="); + if (suffixParam.length() > 0) + { + _suffix = suffixParam; +// if (_suffix[0] != '.') +// _suffix = '.' + _suffix; + } + } + else if ( IS_OPTIONS(arg, "Z", "preserve-date") ) + { + _preserveDate =true; + } + else if ( IS_OPTIONS(arg, "X", "errors-to-stdout") ) + { + _err = &cout; + } + else if ( IS_OPTIONS(arg, "v", "version") ) + { + (*_err) << "Artistic Style " << _version << endl; + exit(0); + } + else + { + (*_err) << errorInfo << arg << endl; + return false; // unknown option + } +#endif +// End of parseOption function + return true; //o.k. +} + + +#ifdef ASTYLE_LIB +// ************************* GUI functions ***************************************************** +/* + * IMPORTANT VC DLL linker must have the parameter /EXPORT:AStyleMain=_AStyleMain@16 + * /EXPORT:AStyleGetVersion=_AStyleGetVersion@0 + * For Dll only - "warning C4702: unreachable code" in the header + * is caused by using the Optimization options. + * /O2 Maximize speed + * /O1 Minimize size + * /Ob2 Inline Expansion + * This is a bug in the Microsoft compiler. The program runs about twice as fast + * with the options set. There haven't been any problems so far. +*/ +extern "C" EXPORT char* STDCALL + AStyleMain(const char* pSourceIn, // pointer to the source to be formatted + const char* pOptions, // pointer to AStyle options, separated by \n + fpError fpErrorHandler, // pointer to error handler function + fpAlloc fpMemoryAlloc) // pointer to memory allocation function +{ + if (fpErrorHandler == NULL) // cannot display a message if no error handler + return NULL; + + if (pSourceIn == NULL) + { + fpErrorHandler(101, "No pointer to source input"); + return NULL; + } + if (pOptions == NULL) + { + fpErrorHandler(102, "No pointer to AStyle options"); + return NULL; + } + if (fpMemoryAlloc == NULL) + { + fpErrorHandler(103, "No pointer to memory allocation function"); + return NULL; + } + + ASFormatter formatter; + + string arg; + vector optionsVector; + istringstream opt(pOptions); + stringstream _err; + _modeManuallySet = false; + + importOptions(opt, optionsVector); + + parseOptions(formatter, + optionsVector.begin(), + optionsVector.end(), + "Unknown Artistic Style options\n" + "The following options were not processed:"); + + if (_err.str().length() > 0) + fpErrorHandler(210, (char*) _err.str().c_str()); + + + istringstream in(pSourceIn); + ASStreamIterator streamIterator(&in); + ostringstream out; + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + out << formatter.nextLine(); + out << streamIterator.outputEOL; + } + + unsigned long textSizeOut = out.str().length(); + char* pTextOut = fpMemoryAlloc(textSizeOut + 1); // call memory allocation function + if (pTextOut == NULL) + { + fpErrorHandler(110, "Allocation failure on output"); + return NULL; + } + + strcpy(pTextOut, out.str().c_str()); + return pTextOut; +} + +extern "C" EXPORT const char* STDCALL AStyleGetVersion (void) +{ + return _version; +} + +#else + +void preserveFileDate(const char *oldFileName, const char *newFileName) +{ + struct stat stBuf; + bool statErr = false; + if (stat (oldFileName, &stBuf) == -1) + statErr = true; + else + { + struct utimbuf outBuf; + outBuf.actime = stBuf.st_atime; + // add 1 so RCS will recoginze a change + outBuf.modtime = stBuf.st_mtime + 1; + if (utime (newFileName, &outBuf) == -1) + statErr = true; + } + if (statErr) + (*_err) << " Could not preserve file date" << endl; +} + +bool stringEndsWith(const string &str, const string &suffix) +{ + int strIndex = (int) str.length() - 1; + int suffixIndex = (int) suffix.length() - 1; + + while (strIndex >= 0 && suffixIndex >= 0) + { + if (tolower(str[strIndex]) != tolower(suffix[suffixIndex])) + return false; + + --strIndex; + --suffixIndex; + } + + return true; +} + + +void error(const char *why, const char* what) +{ + (*_err) << why << ' ' << what << '\n' << endl; + exit(1); +} + + +void printHelp() +{ + (*_err) << endl; + (*_err) << " Artistic Style " << _version << endl; + (*_err) << " Maintained by: Jim Pattee\n"; + (*_err) << " Original Author: Tal Davidson\n"; + (*_err) << endl; + (*_err) << "Usage : astyle [options] Source1.cpp Source2.cpp [...]\n"; + (*_err) << " astyle [options] < Original > Beautified\n"; + (*_err) << endl; + (*_err) << "When indenting a specific file, the resulting indented file RETAINS the\n"; + (*_err) << "original file-name. The original pre-indented file is renamed, with a\n"; + (*_err) << "suffix of \".orig\" added to the original filename.\n"; + (*_err) << endl; + (*_err) << "By default, astyle is set up to indent C/C++/C#/Java files, with 4 spaces\n"; + (*_err) << "per indent, a maximal indentation of 40 spaces inside continuous statements,\n"; + (*_err) << "and NO formatting.\n"; + (*_err) << endl; + (*_err) << "Option's Format:\n"; + (*_err) << "----------------\n"; + (*_err) << " Long options (starting with '--') must be written one at a time.\n"; + (*_err) << " Short options (starting with '-') may be appended together.\n"; + (*_err) << " Thus, -bps4 is the same as -b -p -s4.\n"; + (*_err) << endl; + (*_err) << "Predefined Style Options:\n"; + (*_err) << "-------------------------\n"; + (*_err) << " --style=ansi\n"; + (*_err) << " ANSI style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=gnu\n"; + (*_err) << " GNU style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=kr\n"; + (*_err) << " Kernighan&Ritchie style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=linux\n"; + (*_err) << " Linux mode (8 spaces per indent, break definition-block\n"; + (*_err) << " brackets but attach command-block brackets).\n"; + (*_err) << endl; + (*_err) << " --style=java\n"; + (*_err) << " Java mode, with standard java style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << "Tab and Bracket Options:\n"; + (*_err) << "------------------------\n"; + (*_err) << " default indent option\n"; + (*_err) << " If no indentation option is set,\n"; + (*_err) << " the default option of 4 spaces will be used.\n"; + (*_err) << endl; + (*_err) << " --indent=spaces=# OR -s#\n"; + (*_err) << " Indent using # spaces per indent. Not specifying #\n"; + (*_err) << " will result in a default of 4 spaces per indent.\n"; + (*_err) << endl; + (*_err) << " --indent=tab OR --indent=tab=# OR -t OR -t#\n"; + (*_err) << " Indent using tab characters, assuming that each\n"; + (*_err) << " tab is # spaces long. Not specifying # will result\n"; + (*_err) << " in a default assumption of 4 spaces per tab.\n"; + (*_err) << endl; + (*_err) << " --force-indent=tab=# OR -T#\n"; + (*_err) << " Indent using tab characters, assuming that each\n"; + (*_err) << " tab is # spaces long. Force tabs to be used in areas\n"; + (*_err) << " Astyle would prefer to use spaces.\n"; + (*_err) << endl; + (*_err) << " default brackets option\n"; + (*_err) << " If no brackets option is set,\n"; + (*_err) << " the brackets will not be changed.\n"; + (*_err) << endl; + (*_err) << " --brackets=break OR -b\n"; + (*_err) << " Break brackets from pre-block code (i.e. ANSI C/C++ style).\n"; + (*_err) << endl; + (*_err) << " --brackets=attach OR -a\n"; + (*_err) << " Attach brackets to pre-block code (i.e. Java/K&R style).\n"; + (*_err) << endl; + (*_err) << " --brackets=linux OR -l\n"; + (*_err) << " Break definition-block brackets and attach command-block\n"; + (*_err) << " brackets.\n"; + (*_err) << endl; + (*_err) << " --brackets=break-closing OR -y\n"; + (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ...).\n"; + (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n"; + (*_err) << endl; + (*_err) << "Indentation options:\n"; + (*_err) << "--------------------\n"; + (*_err) << " --indent-classes OR -C\n"; + (*_err) << " Indent 'class' blocks, so that the inner 'public:',\n"; + (*_err) << " 'protected:' and 'private: headers are indented in\n"; + (*_err) << " relation to the class block.\n"; + (*_err) << endl; + (*_err) << " --indent-switches OR -S\n"; + (*_err) << " Indent 'switch' blocks, so that the inner 'case XXX:'\n"; + (*_err) << " headers are indented in relation to the switch block.\n"; + (*_err) << endl; + (*_err) << " --indent-cases OR -K\n"; + (*_err) << " Indent case blocks from the 'case XXX:' headers.\n"; + (*_err) << " Case statements not enclosed in blocks are NOT indented.\n"; + (*_err) << endl; + (*_err) << " --indent-brackets OR -B\n"; + (*_err) << " Add extra indentation to '{' and '}' block brackets.\n"; + (*_err) << endl; + (*_err) << " --indent-blocks OR -G\n"; + (*_err) << " Add extra indentation entire blocks (including brackets).\n"; + (*_err) << endl; + (*_err) << " --indent-namespaces OR -N\n"; + (*_err) << " Indent the contents of namespace blocks.\n"; + (*_err) << endl; + (*_err) << " --indent-labels OR -L\n"; + (*_err) << " Indent labels so that they appear one indent less than\n"; + (*_err) << " the current indentation level, rather than being\n"; + (*_err) << " flushed completely to the left (which is the default).\n"; + (*_err) << endl; + (*_err) << " --indent-preprocessor OR -w\n"; + (*_err) << " Indent multi-line #define statements.\n"; + (*_err) << endl; + (*_err) << " --max-instatement-indent=# OR -M#\n"; + (*_err) << " Indent a maximal # spaces in a continuous statement,\n"; + (*_err) << " relative to the previous line.\n"; + (*_err) << endl; + (*_err) << " --min-conditional-indent=# OR -m#\n"; + (*_err) << " Indent a minimal # spaces in a continuous conditional\n"; + (*_err) << " belonging to a conditional header.\n"; + (*_err) << endl; + (*_err) << "Formatting options:\n"; + (*_err) << "-------------------\n"; + (*_err) << " --break-blocks OR -f\n"; + (*_err) << " Insert empty lines around unrelated blocks, labels, classes, ...\n"; + (*_err) << endl; + (*_err) << " --break-blocks=all OR -F\n"; + (*_err) << " Like --break-blocks, except also insert empty lines \n"; + (*_err) << " around closing headers (e.g. 'else', 'catch', ...).\n"; + (*_err) << endl; + (*_err) << " --break-elseifs OR -e\n"; + (*_err) << " Break 'else if()' statements into two different lines.\n"; + (*_err) << endl; + (*_err) << " --pad=oper OR -p\n"; + (*_err) << " Insert space paddings around operators.\n"; + (*_err) << endl; + (*_err) << " --pad=paren OR -P\n"; + (*_err) << " Insert space padding around parenthesis on both the outside\n"; + (*_err) << " and the inside.\n"; + (*_err) << endl; + (*_err) << " --pad=paren-out OR -d\n"; + (*_err) << " Insert space padding around parenthesis on the outside only.\n"; + (*_err) << endl; + (*_err) << " --pad=paren-in OR -D\n"; + (*_err) << " Insert space padding around parenthesis on the inside only.\n"; + (*_err) << endl; + (*_err) << " --unpad=paren OR -U\n"; + (*_err) << " Remove unnecessary space padding around parenthesis. This\n"; + (*_err) << " can be used in combination with the 'pad' options above.\n"; + (*_err) << endl; + (*_err) << " --one-line=keep-statements OR -o\n"; + (*_err) << " Don't break lines containing multiple statements into\n"; + (*_err) << " multiple single-statement lines.\n"; + (*_err) << endl; + (*_err) << " --one-line=keep-blocks OR -O\n"; + (*_err) << " Don't break blocks residing completely on one line.\n"; + (*_err) << endl; + (*_err) << " --convert-tabs OR -V\n"; + (*_err) << " Convert tabs to spaces.\n"; + (*_err) << endl; + (*_err) << " --fill-empty-lines OR -E\n"; + (*_err) << " Fill empty lines with the white space of their\n"; + (*_err) << " previous lines.\n"; + (*_err) << endl; + (*_err) << " --mode=c OR -c\n"; + (*_err) << " Indent a C, C++ or C# source file (this is the default).\n"; + (*_err) << endl; + (*_err) << " --mode=java OR -j\n"; + (*_err) << " Indent a Java(TM) source file.\n"; + (*_err) << endl; + (*_err) << "Other options:\n"; + (*_err) << "--------------\n"; + (*_err) << " --suffix=####\n"; + (*_err) << " Append the suffix #### instead of '.orig' to original filename.\n"; + (*_err) << endl; + (*_err) << " --suffix=none OR -n\n"; + (*_err) << " Do not retain a backup of the original file.\n"; + (*_err) << endl; + (*_err) << " --options=####\n"; + (*_err) << " Specify an options file #### to read and use.\n"; + (*_err) << endl; + (*_err) << " --options=none\n"; + (*_err) << " Disable the default options file.\n"; + (*_err) << " Only the command-line parameters will be used.\n"; + (*_err) << endl; + (*_err) << " --preserve-date OR -Z\n"; + (*_err) << " The date and time modified will not be changed in the formatted file.\n"; + (*_err) << endl; + (*_err) << " --errors-to-stdout OR -X\n"; + (*_err) << " Print errors and help information to standard-output rather than\n"; + (*_err) << " to standard-error.\n"; + (*_err) << endl; + (*_err) << " --version OR -v\n"; + (*_err) << " Print version number.\n"; + (*_err) << endl; + (*_err) << " --help OR -h OR -?\n"; + (*_err) << " Print this help message.\n"; + (*_err) << endl; + (*_err) << "Default options file:\n"; + (*_err) << "---------------------\n"; + (*_err) << " Artistic Style looks for a default options file in the\n"; + (*_err) << " following order:\n"; + (*_err) << " 1. The contents of the ARTISTIC_STYLE_OPTIONS environment\n"; + (*_err) << " variable if it exists.\n"; + (*_err) << " 2. The file called .astylerc in the directory pointed to by the\n"; + (*_err) << " HOME environment variable ( i.e. $HOME/.astylerc ).\n"; + (*_err) << " 3. The file called astylerc in the directory pointed to by the\n"; + (*_err) << " USERPROFILE environment variable ( i.e. %USERPROFILE%\\astylerc ).\n"; + (*_err) << " If a default options file is found, the options in this file\n"; + (*_err) << " will be parsed BEFORE the command-line options.\n"; + (*_err) << " Long options within the default option file may be written without\n"; + (*_err) << " the preliminary '--'.\n"; + (*_err) << endl; +} + +int main(int argc, char *argv[]) +{ + ASFormatter formatter; + vector fileNameVector; + vector optionsVector; + string optionsFileName = ""; + string arg; + bool ok = true; + bool shouldPrintHelp = false; + bool shouldParseOptionsFile = true; + + _modeManuallySet = false; + + _msg << "\nArtistic Style " << _version << endl; + // manage flags + for (int i = 1; i < argc; i++) + { + arg = string(argv[i]); + + if ( IS_OPTION(arg, "--options=none") ) + { + shouldParseOptionsFile = false; + } + else if ( isParamOption(arg, "--options=") ) + { + optionsFileName = GET_PARAM(arg, "--options="); + } + else if ( IS_OPTION(arg, "-h") + || IS_OPTION(arg, "--help") + || IS_OPTION(arg, "-?") ) + { + shouldPrintHelp = true; + } + else if (arg[0] == '-') + { + optionsVector.push_back(arg); + } + else // file-name + { + fileNameVector.push_back(arg); + } + } + + // parse options file + if (shouldParseOptionsFile) + { + if (optionsFileName.compare("") == 0) + { + char* env = getenv("ARTISTIC_STYLE_OPTIONS"); + if (env != NULL) + optionsFileName = string(env); + } + if (optionsFileName.compare("") == 0) + { + char* env = getenv("HOME"); + if (env != NULL) + optionsFileName = string(env) + string("/.astylerc"); + } + if (optionsFileName.compare("") == 0) + { + char* env = getenv("USERPROFILE"); + if (env != NULL) + optionsFileName = string(env) + string("/astylerc"); + } + + if (optionsFileName.compare("") != 0) + { + ifstream optionsIn(optionsFileName.c_str()); + if (optionsIn) + { + _msg << "Using default options file " << optionsFileName << endl; + vector fileOptionsVector; + importOptions(optionsIn, fileOptionsVector); + ok = parseOptions(formatter, + fileOptionsVector.begin(), + fileOptionsVector.end(), + string("Unknown option in default options file: ")); + } + + optionsIn.close(); + if (!ok) + { + (*_err) << "For help on options, type 'astyle -h' " << endl; + } + } + } + + // parse options from command line + + ok = parseOptions(formatter, + optionsVector.begin(), + optionsVector.end(), + string("Unknown command line option: ")); + if (!ok) + { + (*_err) << "For help on options, type 'astyle -h' \n" << endl; + exit(1); + } + + if (shouldPrintHelp) + { + printHelp(); + exit(0); + } + + // if no files have been given, use cin for input and cout for output + // this is used to format text for text editors like TextWrangler + // do NOT display any console messages when this branch is used + if (fileNameVector.empty()) + { + ASStreamIterator streamIterator(&cin); + + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + cout << formatter.nextLine(); + if (formatter.hasMoreLines()) + cout << streamIterator.outputEOL; + } + cout.flush(); + } + else + { + // indent the given files + cout << _msg.str().c_str(); + clock_t startTime = clock(); + for (size_t i = 0; i < fileNameVector.size(); i++) + { + string originalFileName = fileNameVector[i]; + string inFileName = originalFileName + _suffix; + + remove(inFileName.c_str()); // remove the old .orig if present + + // check if the file is present before rename + ifstream inCheck(originalFileName.c_str()); + if (!inCheck) + error("Could not open input file", originalFileName.c_str()); + inCheck.close(); + + if (rename(originalFileName.c_str(), inFileName.c_str()) < 0) + error("Could not rename ", string(originalFileName + " to " + inFileName).c_str()); + + ifstream in(inFileName.c_str(), ios::binary); + if (!in) + error("Could not open input file", inFileName.c_str()); + + ofstream out(originalFileName.c_str(), ios::binary); + if (!out) + error("Could not open output file", originalFileName.c_str()); + + // Unless a specific language mode has been, set the language mode + // according to the file's suffix. + if (!_modeManuallySet) + { + if (stringEndsWith(originalFileName, string(".java"))) + formatter.setJavaStyle(); + else if (stringEndsWith(originalFileName, string(".cs"))) + formatter.setSharpStyle(); + else + formatter.setCStyle(); + } + // display file formatting message and save the filename + cout << "formatting " << originalFileName.c_str() << endl; + size_t fname = originalFileName.find_last_of("/\\"); + if (fname == string::npos) + fname = 0; + else + fname +=1; + formatter.fileName = originalFileName.substr(fname); + + ASStreamIterator streamIterator(&in); + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + out << formatter.nextLine(); + // the last line does not get an eol + if (formatter.hasMoreLines()) + out << streamIterator.outputEOL; + } + out.flush(); + out.close(); + in.close(); + + // change date modified to original file date + if (_preserveDate) + preserveFileDate(inFileName.c_str(), originalFileName.c_str()); + + if (_purgeOrigIn) + remove(inFileName.c_str()); + } + // all files formatted + clock_t stopTime = clock(); + float secs = (float) (stopTime - startTime) / CLOCKS_PER_SEC; + // show tenths of a second if time is less than 20 seconds + cout.precision(2); + if (secs >= 100 || (secs >= 10 && secs < 20)) + cout.precision(3); + cout << "total time " << secs << " seconds" << endl; + cout.precision(0); + cout << endl; + } + return 0; +} + +#endif +// ************************* end of console functions ***************************************** diff --git a/CodeFormatter/codeforammaterbasedlg.cpp b/CodeFormatter/codeforammaterbasedlg.cpp new file mode 100644 index 0000000000..29dd3dba67 --- /dev/null +++ b/CodeFormatter/codeforammaterbasedlg.cpp @@ -0,0 +1,195 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "codeforammaterbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +CodeFormatterBaseDlg::CodeFormatterBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 589,618 ), wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + wxString m_radioBoxPredefinedStyleChoices[] = { wxT("GNU"), wxT("Java"), wxT("K&&R"), wxT("Linux"), wxT("ANSI") }; + int m_radioBoxPredefinedStyleNChoices = sizeof( m_radioBoxPredefinedStyleChoices ) / sizeof( wxString ); + m_radioBoxPredefinedStyle = new wxRadioBox( m_panel1, wxID_ANY, wxT("Predefined Style:"), wxDefaultPosition, wxDefaultSize, m_radioBoxPredefinedStyleNChoices, m_radioBoxPredefinedStyleChoices, 1, wxRA_SPECIFY_ROWS ); + m_radioBoxPredefinedStyle->SetSelection( 3 ); + bSizer3->Add( m_radioBoxPredefinedStyle, 0, wxALL|wxEXPAND, 0 ); + + wxString m_radioBoxBracketsChoices[] = { wxT("Break Closing"), wxT("Attach"), wxT("Linux"), wxT("Break") }; + int m_radioBoxBracketsNChoices = sizeof( m_radioBoxBracketsChoices ) / sizeof( wxString ); + m_radioBoxBrackets = new wxRadioBox( m_panel1, wxID_ANY, wxT("Brackets:"), wxDefaultPosition, wxDefaultSize, m_radioBoxBracketsNChoices, m_radioBoxBracketsChoices, 1, wxRA_SPECIFY_ROWS ); + m_radioBoxBrackets->SetSelection( 2 ); + bSizer3->Add( m_radioBoxBrackets, 0, wxALL|wxEXPAND, 0 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_panel1, -1, wxT("Indentation:") ), wxVERTICAL ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 5, 2, 0, 0 ); + + m_checkBoxIndetClass = new wxCheckBox( m_panel1, wxID_ANY, wxT("Class"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndetClass, 0, wxALL, 5 ); + + m_checkBoxIndentBrackets = new wxCheckBox( m_panel1, wxID_ANY, wxT("Brackets"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndentBrackets, 0, wxALL, 5 ); + + m_checkBoxIndetSwitch = new wxCheckBox( m_panel1, wxID_ANY, wxT("Switches"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndetSwitch, 0, wxALL, 5 ); + + m_checkBoxIndentNamespaces = new wxCheckBox( m_panel1, wxID_ANY, wxT("Namespaces"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndentNamespaces, 0, wxALL, 5 ); + + m_checkBoxIndetCase = new wxCheckBox( m_panel1, wxID_ANY, wxT("Case"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndetCase, 0, wxALL, 5 ); + + m_checkBoxIndentLabels = new wxCheckBox( m_panel1, wxID_ANY, wxT("Labels"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndentLabels, 0, wxALL, 5 ); + + m_checkBoxIndetBlocks = new wxCheckBox( m_panel1, wxID_ANY, wxT("Blocks"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndetBlocks, 0, wxALL, 5 ); + + m_checkBoxIndentPreprocessors = new wxCheckBox( m_panel1, wxID_ANY, wxT("Preprocessors"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxIndentPreprocessors->SetValue(true); + + gSizer1->Add( m_checkBoxIndentPreprocessors, 0, wxALL, 5 ); + + m_checkBoxIndentMaxInst = new wxCheckBox( m_panel1, wxID_ANY, wxT("Max Instatement Indent"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndentMaxInst, 0, wxALL, 5 ); + + m_checkBoxIndentMinCond = new wxCheckBox( m_panel1, wxID_ANY, wxT("Min Conditional Indent"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer1->Add( m_checkBoxIndentMinCond, 0, wxALL, 5 ); + + sbSizer1->Add( gSizer1, 0, wxEXPAND, 5 ); + + bSizer3->Add( sbSizer1, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_panel1, -1, wxT("Formatting Options:") ), wxVERTICAL ); + + wxGridSizer* gSizer2; + gSizer2 = new wxGridSizer( 2, 2, 0, 0 ); + + m_checkBoxFormatBreakBlocks = new wxCheckBox( m_panel1, wxID_ANY, wxT("Break Blocks"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatBreakBlocks, 0, wxALL, 5 ); + + m_checkBoxFormatPadParenth = new wxCheckBox( m_panel1, wxID_ANY, wxT("Pad Parenthesis"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatPadParenth, 0, wxALL, 5 ); + + m_checkBoxFormatBreakBlocksAll = new wxCheckBox( m_panel1, wxID_ANY, wxT("Break Blocks All"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatBreakBlocksAll, 0, wxALL, 5 ); + + m_checkBoxFormatPadParentOut = new wxCheckBox( m_panel1, wxID_ANY, wxT("Pad Parenthesis Outside"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatPadParentOut, 0, wxALL, 5 ); + + m_checkBoxFormatBreakElseif = new wxCheckBox( m_panel1, wxID_ANY, wxT("Break else-if"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatBreakElseif, 0, wxALL, 5 ); + + m_checkBoxFormatPadParentIn = new wxCheckBox( m_panel1, wxID_ANY, wxT("Pad Parenthesis Inside"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatPadParentIn, 0, wxALL, 5 ); + + m_checkBoxFormatPadOperators = new wxCheckBox( m_panel1, wxID_ANY, wxT("Pad Operators"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatPadOperators, 0, wxALL, 5 ); + + m_checkBoxFormatUnPadParent = new wxCheckBox( m_panel1, wxID_ANY, wxT("UnPad Parenthesis"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatUnPadParent, 0, wxALL, 5 ); + + m_checkBoxFormatOneLineKeepStmnt = new wxCheckBox( m_panel1, wxID_ANY, wxT("One Line Keep Statement"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatOneLineKeepStmnt, 0, wxALL, 5 ); + + m_checkBoxFormatFillEmptyLines = new wxCheckBox( m_panel1, wxID_ANY, wxT("Fill Empty Lines"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatFillEmptyLines, 0, wxALL, 5 ); + + m_checkBoxFormatOneLineKeepBlocks = new wxCheckBox( m_panel1, wxID_ANY, wxT("One Line Keep Blocks"), wxDefaultPosition, wxDefaultSize, 0 ); + + gSizer2->Add( m_checkBoxFormatOneLineKeepBlocks, 0, wxALL, 5 ); + + sbSizer2->Add( gSizer2, 0, wxEXPAND, 5 ); + + bSizer3->Add( sbSizer2, 0, wxEXPAND, 5 ); + + m_textCtrlPreview = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_textCtrlPreview->SetFont( wxFont( 8, 76, 90, 90, false, wxEmptyString ) ); + m_textCtrlPreview->SetMinSize( wxSize( -1,200 ) ); + + bSizer3->Add( m_textCtrlPreview, 1, wxALL|wxEXPAND, 5 ); + + m_panel1->SetSizer( bSizer3 ); + m_panel1->Layout(); + bSizer3->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonClose = new wxButton( this, wxID_CANCEL, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonClose, 0, wxALL, 5 ); + + m_buttonHelp = new wxButton( this, wxID_ANY, wxT("&Help"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonHelp, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_radioBoxPredefinedStyle->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( CodeFormatterBaseDlg::OnRadioBoxPredefinedStyle ), NULL, this ); + m_radioBoxBrackets->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( CodeFormatterBaseDlg::OnRadioBoxBrackets ), NULL, this ); + m_checkBoxIndetClass->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentBrackets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndetSwitch->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentNamespaces->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndetCase->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentLabels->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndetBlocks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentPreprocessors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentMaxInst->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxIndentMinCond->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatBreakBlocks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatPadParenth->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatBreakBlocksAll->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatPadParentOut->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatBreakElseif->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatPadParentIn->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatPadOperators->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatUnPadParent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatOneLineKeepStmnt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatFillEmptyLines->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); + m_checkBoxFormatOneLineKeepBlocks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( CodeFormatterBaseDlg::OnCheckBox ), NULL, this ); +} diff --git a/CodeFormatter/codeforammaterbasedlg.h b/CodeFormatter/codeforammaterbasedlg.h new file mode 100644 index 0000000000..86f3d1a17b --- /dev/null +++ b/CodeFormatter/codeforammaterbasedlg.h @@ -0,0 +1,78 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __codeforammaterbasedlg__ +#define __codeforammaterbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class CodeFormatterBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class CodeFormatterBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_panel1; + wxRadioBox* m_radioBoxPredefinedStyle; + wxRadioBox* m_radioBoxBrackets; + wxCheckBox* m_checkBoxIndetClass; + wxCheckBox* m_checkBoxIndentBrackets; + wxCheckBox* m_checkBoxIndetSwitch; + wxCheckBox* m_checkBoxIndentNamespaces; + wxCheckBox* m_checkBoxIndetCase; + wxCheckBox* m_checkBoxIndentLabels; + wxCheckBox* m_checkBoxIndetBlocks; + wxCheckBox* m_checkBoxIndentPreprocessors; + wxCheckBox* m_checkBoxIndentMaxInst; + wxCheckBox* m_checkBoxIndentMinCond; + wxCheckBox* m_checkBoxFormatBreakBlocks; + wxCheckBox* m_checkBoxFormatPadParenth; + wxCheckBox* m_checkBoxFormatBreakBlocksAll; + wxCheckBox* m_checkBoxFormatPadParentOut; + wxCheckBox* m_checkBoxFormatBreakElseif; + wxCheckBox* m_checkBoxFormatPadParentIn; + wxCheckBox* m_checkBoxFormatPadOperators; + wxCheckBox* m_checkBoxFormatUnPadParent; + wxCheckBox* m_checkBoxFormatOneLineKeepStmnt; + wxCheckBox* m_checkBoxFormatFillEmptyLines; + wxCheckBox* m_checkBoxFormatOneLineKeepBlocks; + wxTextCtrl* m_textCtrlPreview; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonClose; + wxButton* m_buttonHelp; + + // Virtual event handlers, overide them in your derived class + virtual void OnRadioBoxPredefinedStyle( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRadioBoxBrackets( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCheckBox( wxCommandEvent& event ){ event.Skip(); } + + + public: + CodeFormatterBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("AStyle Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 589,618 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + +}; + +#endif //__codeforammaterbasedlg__ diff --git a/CodeFormatter/codeformatter.cpp b/CodeFormatter/codeformatter.cpp new file mode 100644 index 0000000000..5101395c66 --- /dev/null +++ b/CodeFormatter/codeformatter.cpp @@ -0,0 +1,160 @@ +#include "globals.h" +#include "codeformatter.h" +#include +#include //wxInitialize/wxUnInitialize +#include "wx/ffile.h" +#include "formatoptions.h" +#include "wx/log.h" +#include "codeformatterdlg.h" +#include "wx/menu.h" +#include "precompiled_header.h" + + +extern "C" EXPORT char* STDCALL + AStyleMain(const char* pSourceIn, + const char* pOptions, + void(STDCALL *fpError)(int, char*), + char*(STDCALL *fpAlloc)(unsigned long)); + + +//------------------------------------------------------------------------ +// Astyle functions required by AStyleLib +// Error handler for the Artistic Style formatter +void STDCALL ASErrorHandler(int errorNumber, char* errorMessage) { + wxString errStr; + errStr << _U(errorMessage) << wxT(" (error ") << errorNumber << wxT(")"); + wxLogMessage(errStr); +} + +// Allocate memory for the Artistic Style formatter +char* STDCALL ASMemoryAlloc(unsigned long memoryNeeded) { + // error condition is checked after return from AStyleMain + char* buffer = new char [memoryNeeded]; + return buffer; +} +//------------------------------------------------------------------------ +static CodeFormatter *theFormatter = NULL; + +//Allocate the code formatter on the heap, it will be freed by +//the application +extern "C" EXPORT IPlugin *CreatePlugin(IManager *manager) { + if(theFormatter == 0){ + theFormatter = new CodeFormatter(manager); + } + return theFormatter; +} + +CodeFormatter::CodeFormatter(IManager *manager) + : IPlugin(manager) { + m_longName = wxT("Source Code Formatter (AStyle)"); + m_shortName = wxT("CodeFormatter"); +} + +CodeFormatter::~CodeFormatter() { +} + +wxToolBar *CodeFormatter::CreateToolBar(wxWindow *parent) { + wxToolBar *tb = new wxToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + + tb->AddTool(XRCID("format_source"), wxT("Format Source"), wxXmlResource::Get()->LoadBitmap(wxT("code_format")), wxT("Format Source Code")); + tb->AddTool(XRCID("formatter_options"), wxT("Format Options"), wxXmlResource::Get()->LoadBitmap(wxT("code_format_options")), wxT("Source Code Formatter Options...")); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + tb->Realize(); + + //Connect the events to us + parent->Connect(XRCID("format_source"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CodeFormatter::OnFormat), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("formatter_options"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(CodeFormatter::OnFormatOptions), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("format_source"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CodeFormatter::OnFormatUI), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("formatter_options"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(CodeFormatter::OnFormatOptionsUI), NULL, (wxEvtHandler*)this); + return tb; +} + +void CodeFormatter::CreatePluginMenu(wxMenu *pluginsMenu){ + wxMenu *menu = new wxMenu(); + wxMenuItem *item(NULL); + item = new wxMenuItem(menu, XRCID("format_source"), wxT("Format Current Source\tCtrl+I"), wxT("Format Current Source"), wxITEM_NORMAL); + menu->Append(item); + menu->AppendSeparator(); + item = new wxMenuItem(menu, XRCID("formatter_options"), wxT("Options..."), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + pluginsMenu->Append(wxID_ANY, wxT("Source Code Formatter"), menu); +} + +void CodeFormatter::OnFormat(wxCommandEvent &e) { + wxUnusedVar(e); + IEditor *editor = m_mgr->GetActiveEditor(); + if (!editor) + return; + + DoFormatFile(editor); +} + +void CodeFormatter::DoFormatFile(IEditor *editor) { + long curpos = editor->GetCurrentPosition(); + //execute the formatter + FormatOptions fmtroptions; + m_mgr->GetConfigTool()->ReadObject(wxT("FormatterOptions"), &fmtroptions); + wxString options = fmtroptions.ToString(); + + wxString output; + AstyleFormat(editor->GetEditorText(), options, output); + if(output.IsEmpty() == false){ + editor->SetEditorText(output); + editor->SetCaretAt(curpos); + } +} + +void CodeFormatter::AstyleFormat(const wxString &input, const wxString &options, wxString &output) +{ + char *textOut = AStyleMain(_C(input), _C(options), ASErrorHandler, ASMemoryAlloc); + if (textOut) { + output = _U(textOut); + output.Trim(); + output << wxT("\n"); + delete [] textOut; + } +} + +void CodeFormatter::OnFormatOptions(wxCommandEvent &e) { + //load options from settings file + FormatOptions fmtroptions; + m_mgr->GetConfigTool()->ReadObject(wxT("FormatterOptions"), &fmtroptions); + + wxString sampleFile; + wxString content; + sampleFile << m_mgr->GetStartupDirectory() << wxT("/astyle.sample"); + ReadFileWithConversion(sampleFile, content); + + CodeFormatterDlg *dlg = new CodeFormatterDlg(NULL, this, fmtroptions.GetOptions(), content); + if(dlg->ShowModal() == wxID_OK){ + //update the settings on the configuration file + fmtroptions.SetOption(dlg->GetOptions()); + m_mgr->GetConfigTool()->WriteObject(wxT("FormatterOptions"), &fmtroptions); + } + + dlg->Destroy(); + wxUnusedVar(e); +} + +void CodeFormatter::OnFormatUI(wxUpdateUIEvent &e) { + e.Enable(m_mgr->GetActiveEditor() != NULL); +} + +void CodeFormatter::OnFormatOptionsUI(wxUpdateUIEvent &e) { + e.Enable(true); +} + +void CodeFormatter::HookPopupMenu(wxMenu *menu, MenuType type) +{ + wxUnusedVar(type); + wxUnusedVar(menu); +} + +void CodeFormatter::UnPlug() +{ + //nothing to do +} + diff --git a/CodeFormatter/codeformatter.h b/CodeFormatter/codeformatter.h new file mode 100644 index 0000000000..64eb0a34bb --- /dev/null +++ b/CodeFormatter/codeformatter.h @@ -0,0 +1,29 @@ +#ifndef CODEFORMATTER_H +#define CODEFORMATTER_H + +#include "plugin.h" + +class CodeFormatter : public IPlugin +{ +protected: + void DoFormatFile(IEditor *editor); + +public: + CodeFormatter(IManager *manager); + virtual ~CodeFormatter(); + void AstyleFormat(const wxString &input, const wxString &options, wxString &output); + virtual wxToolBar *CreateToolBar(wxWindow *parent); + virtual void CreatePluginMenu(wxMenu *pluginsMenu); + virtual void HookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnPlug(); + + //event handlers + void OnFormat(wxCommandEvent &e); + void OnFormatOptions(wxCommandEvent &e); + void OnFormatUI(wxUpdateUIEvent &e); + void OnFormatOptionsUI(wxUpdateUIEvent &e); +}; + +#endif //CODEFORMATTER_H + + diff --git a/CodeFormatter/codeformatterdlg.cpp b/CodeFormatter/codeformatterdlg.cpp new file mode 100644 index 0000000000..47b8b24e26 --- /dev/null +++ b/CodeFormatter/codeformatterdlg.cpp @@ -0,0 +1,206 @@ +#include "codeformatter.h" +#include "codeformatterdlg.h" + +CodeFormatterDlg::CodeFormatterDlg( wxWindow* parent, CodeFormatter *cf, size_t flags, const wxString &sampleCode ) +: CodeFormatterBaseDlg( parent ) +, m_cf(cf) +, m_sampleCode(sampleCode) +{ + m_options.SetOption(flags); + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterDlg::OnOK), NULL, this); + m_buttonHelp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(CodeFormatterDlg::OnHelp), NULL, this); + + // Initialise dialog + m_textCtrlPreview->SetValue(m_sampleCode); + InitDialog(); + GetSizer()->Fit(this); + UpdatePreview(); +} + +void CodeFormatterDlg::UpdateCheckBox(wxCheckBox *obj, size_t flag) +{ + obj->SetValue(m_options.GetOptions() & flag ? true : false); +} + +void CodeFormatterDlg::InitDialog() +{ + UpdateCheckBox(m_checkBoxFormatBreakBlocks,AS_BREAK_BLOCKS); + UpdateCheckBox(m_checkBoxFormatBreakBlocksAll,AS_BREAK_BLOCKS_ALL); + UpdateCheckBox(m_checkBoxFormatBreakElseif,AS_BREAK_ELSEIF); + UpdateCheckBox(m_checkBoxFormatFillEmptyLines,AS_FILL_EMPTY_LINES); + UpdateCheckBox(m_checkBoxFormatOneLineKeepBlocks,AS_ONE_LINE_KEEP_BLOCKS); + UpdateCheckBox(m_checkBoxFormatOneLineKeepStmnt,AS_ONE_LINE_KEEP_STATEMENT); + UpdateCheckBox(m_checkBoxFormatPadOperators,AS_PAD_OPER); + UpdateCheckBox(m_checkBoxFormatPadParenth,AS_PAD_PARENTHESIS); + UpdateCheckBox(m_checkBoxFormatPadParentIn,AS_PAD_PARENTHESIS_IN); + UpdateCheckBox(m_checkBoxFormatPadParentOut,AS_PAD_PARENTHESIS_OUT); + UpdateCheckBox(m_checkBoxFormatUnPadParent,AS_UNPAD_PARENTHESIS); + UpdateCheckBox(m_checkBoxIndentBrackets,AS_INDENT_BRACKETS); + UpdateCheckBox(m_checkBoxIndentLabels,AS_INDENT_LABELS); + UpdateCheckBox(m_checkBoxIndentMaxInst,AS_MAX_INSTATEMENT_INDENT); + UpdateCheckBox(m_checkBoxIndentMinCond,AS_MIN_COND_INDENT); + UpdateCheckBox(m_checkBoxIndentNamespaces,AS_INDENT_NAMESPACES); + UpdateCheckBox(m_checkBoxIndentPreprocessors,AS_INDENT_PREPROCESSORS); + UpdateCheckBox(m_checkBoxIndetBlocks,AS_INDENT_BLOCKS); + UpdateCheckBox(m_checkBoxIndetCase,AS_INDENT_CASE); + UpdateCheckBox(m_checkBoxIndetClass,AS_INDENT_CASE); + UpdateCheckBox(m_checkBoxIndetSwitch,AS_INDENT_SWITCHES); + + //update the two radio box controls + int selection(3); //AS_LINUX + if(m_options.GetOptions() & AS_LINUX){ + selection = 3; + }else if(m_options.GetOptions() & AS_GNU){ + selection =0; + }else if(m_options.GetOptions() & AS_ANSI){ + selection = 4; + }else if(m_options.GetOptions() & AS_JAVA){ + selection = 1; + }else if(m_options.GetOptions() & AS_KR){ + selection = 2; + } + m_radioBoxPredefinedStyle->SetSelection(selection); + + selection = 2;//AS_BRACKETS_LINUX + if(m_options.GetOptions() & AS_BRACKETS_BREAK_CLOSING){ + selection = 0; + }else if(m_options.GetOptions() & AS_BRACKETS_ATTACH){ + selection = 1; + }else if(m_options.GetOptions() & AS_BRACKETS_LINUX){ + selection = 2; + }else if(m_options.GetOptions() & AS_BRACKETS_BREAK){ + selection = 3; + } + m_radioBoxBrackets->SetSelection(selection); +} + +void CodeFormatterDlg::OnRadioBoxPredefinedStyle( wxCommandEvent& event ) +{ + int sel = event.GetSelection(); + + //remove all predefined styles + size_t options = m_options.GetOptions(); + options &= ~(AS_ANSI);//4 + options &= ~(AS_GNU); //0 + options &= ~(AS_LINUX);//3 + options &= ~(AS_JAVA);//1 + options &= ~(AS_KR);//2 + + size_t flag = AS_LINUX; + switch(sel){ + case 0: flag = AS_GNU; break; + case 1: flag = AS_JAVA; break; + case 2: flag = AS_KR; break; + case 3: flag = AS_LINUX; break; + case 4: flag = AS_ANSI; break; + default: flag = AS_LINUX; break; + } + m_options.SetOption(options | flag); + UpdatePreview(); +} + +void CodeFormatterDlg::OnRadioBoxBrackets( wxCommandEvent& event ) +{ + int sel = event.GetSelection(); + + //remove all predefined styles + size_t options = m_options.GetOptions(); + options &= ~(AS_BRACKETS_BREAK_CLOSING);//0 + options &= ~(AS_BRACKETS_ATTACH); //1 + options &= ~(AS_BRACKETS_LINUX);//2 + options &= ~(AS_BRACKETS_BREAK);//3 + + size_t flag = AS_LINUX; + switch(sel){ + case 0: flag = AS_BRACKETS_BREAK_CLOSING; break; + case 1: flag = AS_BRACKETS_ATTACH; break; + case 2: flag = AS_BRACKETS_LINUX; break; + case 3: flag = AS_BRACKETS_BREAK; break; + } + m_options.SetOption(options | flag); + UpdatePreview(); +} + +void CodeFormatterDlg::OnCheckBox( wxCommandEvent& event ) +{ + size_t flag(0); + wxObject *obj = event.GetEventObject(); + if(obj == m_checkBoxFormatBreakBlocks){ + flag = AS_BREAK_BLOCKS; + }else if(obj == m_checkBoxFormatBreakBlocksAll){ + flag = AS_BREAK_BLOCKS_ALL; + }else if(obj == m_checkBoxFormatBreakElseif){ + flag = AS_BREAK_ELSEIF; + }else if(obj == m_checkBoxFormatFillEmptyLines){ + flag = AS_FILL_EMPTY_LINES; + }else if(obj == m_checkBoxFormatOneLineKeepBlocks){ + flag = AS_ONE_LINE_KEEP_BLOCKS; + }else if(obj == m_checkBoxFormatOneLineKeepStmnt){ + flag = AS_ONE_LINE_KEEP_STATEMENT; + }else if(obj == m_checkBoxFormatPadOperators){ + flag = AS_PAD_OPER; + }else if(obj == m_checkBoxFormatPadParenth){ + flag = AS_PAD_PARENTHESIS; + }else if(obj == m_checkBoxFormatPadParentIn){ + flag = AS_PAD_PARENTHESIS_IN; + }else if(obj == m_checkBoxFormatPadParentOut){ + flag = AS_PAD_PARENTHESIS_OUT; + }else if(obj == m_checkBoxFormatUnPadParent){ + flag = AS_UNPAD_PARENTHESIS; + }else if(obj == m_checkBoxIndentBrackets){ + flag = AS_INDENT_BRACKETS; + }else if(obj == m_checkBoxIndentLabels){ + flag = AS_INDENT_LABELS; + }else if(obj == m_checkBoxIndentMaxInst){ + flag = AS_MAX_INSTATEMENT_INDENT; + }else if(obj == m_checkBoxIndentMinCond){ + flag = AS_MIN_COND_INDENT; + }else if(obj == m_checkBoxIndentNamespaces){ + flag = AS_INDENT_NAMESPACES; + }else if(obj == m_checkBoxIndentPreprocessors){ + flag = AS_INDENT_PREPROCESSORS; + }else if(obj == m_checkBoxIndetBlocks){ + flag = AS_INDENT_BLOCKS; + }else if(obj == m_checkBoxIndetCase){ + flag = AS_INDENT_CASE; + }else if(obj == m_checkBoxIndetClass){ + flag = AS_INDENT_CASE; + }else if(obj == m_checkBoxIndetSwitch){ + flag = AS_INDENT_SWITCHES; + } + + size_t options = m_options.GetOptions(); + EnableFlag(options, flag, event.IsChecked()); + m_options.SetOption(options); + UpdatePreview(); +} + +void CodeFormatterDlg::EnableFlag(size_t &options, size_t flag, bool enable) +{ + if(enable){ + options |= flag; + }else{ + options &= ~(flag); + } +} + +void CodeFormatterDlg::OnOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + //Save the options + EndModal(wxID_OK); +} + +void CodeFormatterDlg::OnHelp(wxCommandEvent &e) +{ + wxUnusedVar(e); + static wxString helpUrl(wxT("http://astyle.sourceforge.net/astyle.html")); + wxLaunchDefaultBrowser(helpUrl); +} + +void CodeFormatterDlg::UpdatePreview() +{ + wxString output; + m_cf->AstyleFormat(m_sampleCode, m_options.ToString(), output); + m_textCtrlPreview->SetValue(output); +} diff --git a/CodeFormatter/codeformatterdlg.h b/CodeFormatter/codeformatterdlg.h new file mode 100644 index 0000000000..8616dae8dc --- /dev/null +++ b/CodeFormatter/codeformatterdlg.h @@ -0,0 +1,39 @@ +#ifndef __codeformatterdlg__ +#define __codeformatterdlg__ + +/** +@file +Subclass of CodeFormatterBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "codeforammaterbasedlg.h" +#include "formatoptions.h" + +class CodeFormatter; + +/** Implementing CodeFormatterBaseDlg */ +class CodeFormatterDlg : public CodeFormatterBaseDlg +{ + FormatOptions m_options; + CodeFormatter *m_cf; + wxString m_sampleCode; + +protected: + // Handlers for CodeFormatterBaseDlg events. + void OnRadioBoxPredefinedStyle( wxCommandEvent& event ); + void OnRadioBoxBrackets( wxCommandEvent& event ); + void OnCheckBox( wxCommandEvent& event ); + void OnOK(wxCommandEvent &e); + void OnHelp(wxCommandEvent &e); + void EnableFlag(size_t &options, size_t flag, bool enable); + void InitDialog(); + void UpdateCheckBox(wxCheckBox *obj, size_t flag); + void UpdatePreview(); + +public: + /** Constructor */ + CodeFormatterDlg( wxWindow* parent, CodeFormatter *cf, size_t flags, const wxString &sampleCode ); + size_t GetOptions() const{return m_options.GetOptions();} +}; + +#endif // __codeformatterdlg__ diff --git a/CodeFormatter/codeformatterdll.def b/CodeFormatter/codeformatterdll.def new file mode 100644 index 0000000000..b77cd1bcb8 --- /dev/null +++ b/CodeFormatter/codeformatterdll.def @@ -0,0 +1,3 @@ +LIBRARY CodeFormatter +EXPORTS + CreatePlugin diff --git a/CodeFormatter/formatoptions.cpp b/CodeFormatter/formatoptions.cpp new file mode 100644 index 0000000000..6e067f6a0f --- /dev/null +++ b/CodeFormatter/formatoptions.cpp @@ -0,0 +1,114 @@ +#include "formatoptions.h" + +FormatOptions::FormatOptions() +: m_options(AS_DEFAULT) +{ +} + +FormatOptions::~FormatOptions() +{ +} + +void FormatOptions::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_options"), m_options); +} + +void FormatOptions::Serialize(Archive &arch) +{ + arch.Write(wxT("m_options"), m_options); +} + +wxString FormatOptions::ToString() const +{ + //by default use tabs as indentation with size 4 + wxString options; + + if (m_options & AS_ANSI){ + options << wxT(" --style=ansi "); + } + if(m_options & AS_GNU){ + options << wxT(" --style=gnu "); + } + if(m_options & AS_KR){ + options << wxT(" --style=kr "); + } + if(m_options & AS_LINUX){ + options << wxT(" --style=linux "); + } + if(m_options & AS_JAVA){ + options << wxT(" --style=java "); + } + if(m_options & AS_BRACKETS_BREAK){ + options << wxT(" -b "); + } + if(m_options & AS_BRACKETS_ATTACH){ + options << wxT(" -a "); + } + if(m_options & AS_BRACKETS_LINUX){ + options << wxT(" -l "); + } + if(m_options & AS_BRACKETS_BREAK_CLOSING){ + options << wxT(" -y "); + } + if(m_options & AS_INDENT_CLASS){ + options << wxT(" -C "); + } + if(m_options & AS_INDENT_SWITCHES){ + options << wxT(" -S "); + } + if(m_options & AS_INDENT_CASE){ + options << wxT(" -K "); + } + if(m_options & AS_INDENT_BLOCKS){ + options << wxT(" -B "); + } + if(m_options & AS_INDENT_NAMESPACES){ + options << wxT(" -N "); + } + if(m_options & AS_INDENT_LABELS){ + options << wxT(" -L "); + } + if(m_options & AS_INDENT_PREPROCESSORS){ + options << wxT(" -w "); + } + if(m_options & AS_MAX_INSTATEMENT_INDENT){ + options << wxT(" -M "); + } + if(m_options & AS_BREAK_BLOCKS){ + options << wxT(" -f "); + } + if(m_options & AS_BREAK_BLOCKS_ALL){ + options << wxT(" -F "); + } + if(m_options & AS_BREAK_ELSEIF){ + options << wxT(" -e "); + } + if(m_options & AS_PAD_OPER){ + options << wxT(" -p "); + } + if(m_options & AS_PAD_PARENTHESIS){ + options << wxT(" -P "); + } + if(m_options & AS_PAD_PARENTHESIS_OUT){ + options << wxT(" -d "); + } + if(m_options & AS_PAD_PARENTHESIS_IN){ + options << wxT(" -D "); + } + if(m_options & AS_ONE_LINE_KEEP_STATEMENT){ + options << wxT(" -o "); + } + if(m_options & AS_ONE_LINE_KEEP_BLOCKS){ + options << wxT(" -O "); + } + if(m_options & AS_FILL_EMPTY_LINES){ + options << wxT(" -E "); + } + if(m_options & AS_UNPAD_PARENTHESIS){ + options << wxT(" -U "); + } + + options << wxT(" -t4 "); + return options; +} diff --git a/CodeFormatter/formatoptions.h b/CodeFormatter/formatoptions.h new file mode 100644 index 0000000000..8fad7487c4 --- /dev/null +++ b/CodeFormatter/formatoptions.h @@ -0,0 +1,57 @@ +#ifndef FORMATOPTIONS_H +#define FORMATOPTIONS_H + +#include "serialized_object.h" + +enum AstyleOptions { + AS_ANSI = 0x00000001, + AS_GNU = 0x00000002, + AS_KR = 0x00000004, + AS_LINUX = 0x00000008, + AS_JAVA = 0x00000010, + AS_BRACKETS_BREAK = 0x00000020, + AS_BRACKETS_ATTACH = 0x00000040, + AS_BRACKETS_LINUX = 0x00000080, + AS_BRACKETS_BREAK_CLOSING = 0x00000100, + AS_INDENT_CLASS = 0x00000200, + AS_INDENT_SWITCHES = 0x00000400, + AS_INDENT_CASE = 0x00000800, + AS_INDENT_BLOCKS = 0x00001000, + AS_INDENT_BRACKETS = 0x00002000, + AS_INDENT_NAMESPACES = 0x00004000, + AS_INDENT_LABELS = 0x00008000, + AS_INDENT_PREPROCESSORS = 0x00010000, + AS_MAX_INSTATEMENT_INDENT = 0x00020000, + AS_BREAK_BLOCKS = 0x00040000, + AS_BREAK_BLOCKS_ALL = 0x00080000, + AS_BREAK_ELSEIF = 0x00100000, + AS_PAD_OPER = 0x00200000, + AS_PAD_PARENTHESIS = 0x00400000, + AS_PAD_PARENTHESIS_OUT = 0x00800000, + AS_PAD_PARENTHESIS_IN = 0x01000000, + AS_UNPAD_PARENTHESIS = 0x02000000, + AS_ONE_LINE_KEEP_STATEMENT = 0x04000000, + AS_ONE_LINE_KEEP_BLOCKS = 0x08000000, + AS_FILL_EMPTY_LINES = 0x10000000, + AS_MIN_COND_INDENT = 0x20000000, + AS_DEFAULT = AS_JAVA | AS_BRACKETS_LINUX | AS_INDENT_PREPROCESSORS +}; + +class FormatOptions : public SerializedObject { + size_t m_options; + +public: + FormatOptions(); + virtual ~FormatOptions(); + + wxString ToString() const; + + void Serialize(Archive &arch); + void DeSerialize(Archive &arch); + + size_t GetOptions() const{return m_options;} + void SetOption(size_t options){m_options = options;} +}; + +#endif //FORMATOPTIONS_H + diff --git a/CodeFormatter/makefile b/CodeFormatter/makefile new file mode 100644 index 0000000000..e1c0241682 --- /dev/null +++ b/CodeFormatter/makefile @@ -0,0 +1,85 @@ +## Author: Eran Ifrah + +SOFLAG=-shared +OSNAME=$(shell uname -s) +ifeq ($(OSNAME), Darwin) +SOFLAG=-dynamiclib +endif + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +ifeq ($(type), release) +WXCFG=--unicode=no --debug=no +EXT= +OBJ_DIR=Release_gcc +OPT=-O3 +DEBUG= +endif + +ifeq ($(type), release_unicode) +WXCFG=--unicode=yes --debug=no +EXT=u +OBJ_DIR=Release_gcc_unicode +OPT=-O3 -DREGEXP_UNICODE +DEBUG= +endif + +ifeq ($(type), debug_unicode) +WXCFG=--unicode=yes --debug=yes +EXT=ud +OBJ_DIR=Debug_gcc_unicode +DEBUG= -g +OPT=-DREGEXP_UNICODE +endif + +WXVER=26 +OUTPUT_DIR=../lib + +#PROFILER= -pg +## +## Define variables, using wx-config tool +## +CMP=g++ $(DEBUG) $(OPT) + +CCFLAGS= -DASTYLE_LIB -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 + +SQLITE_INCLUDE= -I../sdk/wxsqlite3/include -I../sdk/wxsqlite3/sqlite3/include +INCLUDES = -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxflatnotebook/include $(SQLITE_INCLUDE) +LINK_FLAGS=$(shell wx-config --libs $(WXCFG)) -L../lib -lplugin$(EXT) -lcodelite$(EXT) -L../sdk/wxflatnotebook/lib -lwxflatnotebook$(EXT) -lwxsqlite3$(EXT) + +## +## Define the object files +## +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.cpp))))) + +## our main build target +build : pre_build CodeFormatter + +CodeFormatter: $(lib_cpp_objects) $(lib_c_objects) + $(CMP) $(SOFLAG) -o $(OUTPUT_DIR)/CodeFormatter.so $(lib_cpp_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: %.cpp %.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +%.o.d: + $(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM $(addsuffix .cpp, $(basename $(basename $(@F)))) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + +clean: + $(RM) -fR Release_gcc_unicode/ $(OUTPUT_DIR)/CodeFormatter.so + $(RM) -fR Debug_gcc_unicode/ + +-include $(OBJ_DIR)/*.d diff --git a/CodeLite.sln b/CodeLite.sln new file mode 100644 index 0000000000..02ba83e7d6 --- /dev/null +++ b/CodeLite.sln @@ -0,0 +1,195 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LiteEditor", "LiteEditor\LiteEditor.vcproj", "{33133335-3996-408B-81E2-2FA20E5E4F64}" + ProjectSection(ProjectDependencies) = postProject + {E8E7D604-D0FC-423A-81EF-70C182B40C14} = {E8E7D604-D0FC-423A-81EF-70C182B40C14} + {E8E7D604-D0FC-423A-81EF-70C182B40C14} = {E8E7D604-D0FC-423A-81EF-70C182B40C14} + {F9550C0D-30DA-45C5-A08F-C41B14495A08} = {F9550C0D-30DA-45C5-A08F-C41B14495A08} + {F9550C0D-30DA-45C5-A08F-C41B14495A08} = {F9550C0D-30DA-45C5-A08F-C41B14495A08} + {DC3A9951-C351-4C62-BF0C-37F7A2178999} = {DC3A9951-C351-4C62-BF0C-37F7A2178999} + {DC3A9951-C351-4C62-BF0C-37F7A2178999} = {DC3A9951-C351-4C62-BF0C-37F7A2178999} + {08C385A7-9128-4789-B6AE-93B8B1D3B05B} = {08C385A7-9128-4789-B6AE-93B8B1D3B05B} + {C441CED4-C175-4944-B4AC-775A0568ED2F} = {C441CED4-C175-4944-B4AC-775A0568ED2F} + {C441CED4-C175-4944-B4AC-775A0568ED2F} = {C441CED4-C175-4944-B4AC-775A0568ED2F} + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1} = {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeLite", "CodeLite\CodeLite.vcproj", "{E8E7D604-D0FC-423A-81EF-70C182B40C14}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxFlatNotebook", "sdk\wxflatnotebook\build\wxFlatNotebook\wxFlatNotebook.vcproj", "{F9550C0D-30DA-45C5-A08F-C41B14495A08}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxsqlite3", "sdk\wxsqlite3\build\wxsqlite3_wxsqlite3.vcproj", "{DC3A9951-C351-4C62-BF0C-37F7A2178999}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "sdk\wxscintilla\build\wxscintilla.vcproj", "{C441CED4-C175-4944-B4AC-775A0568ED2F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDK", "Plugin\Plugin.vcproj", "{08C385A7-9128-4789-B6AE-93B8B1D3B05B}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctags", "sdk\ctags\ctags.vcproj", "{5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DebuggerGDB", "Debugger\Debugger.vcproj", "{88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}" + ProjectSection(ProjectDependencies) = postProject + {08C385A7-9128-4789-B6AE-93B8B1D3B05B} = {08C385A7-9128-4789-B6AE-93B8B1D3B05B} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Interfaces", "Interfaces\Interfaces.vcproj", "{BFE57BF2-8940-441D-B6F0-5CE06C94099F}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeFormatter", "CodeFormatter\CodeFormatter.vcproj", "{875960CF-B481-482E-A9BF-F7F05288F995}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Subversion", "Subversion\Subversion.vcproj", "{92882D2A-AF43-4451-890A-B09A38DF83EA}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Debug Unicode = Debug Unicode + Release = Release + Release Unicode = Release Unicode + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug.ActiveCfg = Debug|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug.Build.0 = Debug|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release.ActiveCfg = Release|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release.Build.0 = Release|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release Unicode.Build.0 = Release Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug.ActiveCfg = Debug|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug.Build.0 = Debug|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release.ActiveCfg = Release|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release.Build.0 = Release|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release Unicode.Build.0 = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug.ActiveCfg = Debug|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug.Build.0 = Debug|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release.ActiveCfg = Release|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release.Build.0 = Release|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode.Build.0 = Release Unicode|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug.ActiveCfg = Debug Monolithic|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug.Build.0 = Debug Monolithic|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug Unicode.ActiveCfg = Unicode Debug Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug Unicode.Build.0 = Unicode Debug Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release.ActiveCfg = Release|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release.Build.0 = Release|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release Unicode.ActiveCfg = Unicode Release Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release Unicode.Build.0 = Unicode Release Multilib|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug.ActiveCfg = Debug|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug.Build.0 = Debug|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug Unicode.ActiveCfg = DebugUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug Unicode.Build.0 = DebugUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release.ActiveCfg = Release|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release.Build.0 = Release|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release Unicode.ActiveCfg = ReleaseUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release Unicode.Build.0 = ReleaseUnicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug.ActiveCfg = Debug|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug.Build.0 = Debug|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release.ActiveCfg = Release|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release.Build.0 = Release|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release Unicode.Build.0 = Release Unicode|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug.ActiveCfg = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug.Build.0 = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug Unicode.ActiveCfg = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug Unicode.Build.0 = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release.ActiveCfg = Release|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release.Build.0 = Release|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release Unicode.ActiveCfg = Release|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release Unicode.Build.0 = Release|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Debug.ActiveCfg = Debug Unicode|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Debug.Build.0 = Debug Unicode|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Release.ActiveCfg = Release|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Release.Build.0 = Release|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {88BEAAF6-1D4D-478D-B1C2-59B61E75B2D1}.Release Unicode.Build.0 = Release Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Debug.ActiveCfg = Debug Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Debug.Build.0 = Debug Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Release.ActiveCfg = Release|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Release.Build.0 = Release|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {BFE57BF2-8940-441D-B6F0-5CE06C94099F}.Release Unicode.Build.0 = Release Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Debug.ActiveCfg = Debug Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Debug.Build.0 = Debug Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Release.ActiveCfg = Release Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Release.Build.0 = Release Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {875960CF-B481-482E-A9BF-F7F05288F995}.Release Unicode.Build.0 = Release Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Debug.ActiveCfg = Debug Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Debug.Build.0 = Debug Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Debug Unicode.ActiveCfg = Debug Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Debug Unicode.Build.0 = Debug Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Release.ActiveCfg = Release Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Release.Build.0 = Release Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Release Unicode.ActiveCfg = Release Unicode|Win32 + {92882D2A-AF43-4451-890A-B09A38DF83EA}.Release Unicode.Build.0 = Release Unicode|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Unicode|Win32 = Debug Unicode|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {33133335-3996-408B-81E2-2FA20E5E4F64}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {E8E7D604-D0FC-423A-81EF-70C182B40C14}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug Unicode|Win32.ActiveCfg = Unicode Debug Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Debug Unicode|Win32.Build.0 = Unicode Debug Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release Unicode|Win32.ActiveCfg = Unicode Release Multilib|Win32 + {DC3A9951-C351-4C62-BF0C-37F7A2178999}.Release Unicode|Win32.Build.0 = Unicode Release Multilib|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug Unicode|Win32.ActiveCfg = DebugUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Debug Unicode|Win32.Build.0 = DebugUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release Unicode|Win32.ActiveCfg = ReleaseUnicode|Win32 + {C441CED4-C175-4944-B4AC-775A0568ED2F}.Release Unicode|Win32.Build.0 = ReleaseUnicode|Win32 + {AED4ECE5-FB94-4ABF-AC23-610876F65B56}.Debug Unicode|Win32.ActiveCfg = DebugUnicode|Win32 + {AED4ECE5-FB94-4ABF-AC23-610876F65B56}.Debug Unicode|Win32.Build.0 = DebugUnicode|Win32 + {AED4ECE5-FB94-4ABF-AC23-610876F65B56}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {AED4ECE5-FB94-4ABF-AC23-610876F65B56}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {08C385A7-9128-4789-B6AE-93B8B1D3B05B}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CodeLite/CodeLite.cbp b/CodeLite/CodeLite.cbp new file mode 100644 index 0000000000..2a53363f01 --- /dev/null +++ b/CodeLite/CodeLite.cbp @@ -0,0 +1,297 @@ + + + + + + \ No newline at end of file diff --git a/CodeLite/CodeLite.project b/CodeLite/CodeLite.project new file mode 100644 index 0000000000..ec5bbc354c --- /dev/null +++ b/CodeLite/CodeLite.project @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeLite/CodeLite.vcproj b/CodeLite/CodeLite.vcproj new file mode 100644 index 0000000000..1fdb052e01 --- /dev/null +++ b/CodeLite/CodeLite.vcproj @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeLite/DoxySMain.page b/CodeLite/DoxySMain.page new file mode 100644 index 0000000000..7bb12198ca --- /dev/null +++ b/CodeLite/DoxySMain.page @@ -0,0 +1,12 @@ +/** \mainpage "CodeLite API Reference Manual" +!!! CodeLite API Reference Manual +\n +CodeLite is a wxWidgets C++ code parser library for parsing C/C++ +(and other languages supported by Ctags in the future) intended for using +CodeCompletion in IDEs like Code::Blocks. + +Here you will %find the #CodeLite# autogenerated documentation. +\n\n +The Wiki is located at: https://opensvn.csie.org/traccgi/CodeLite + +*/ diff --git a/CodeLite/FlexLexer.h b/CodeLite/FlexLexer.h new file mode 100644 index 0000000000..3b727de862 --- /dev/null +++ b/CodeLite/FlexLexer.h @@ -0,0 +1,198 @@ +// $Header: /CVS/wxUS/wxXtudio/Apps/USClient/FlexLexer.h,v 1.2 2006/02/08 14:30:12 eran Exp $ + +// FlexLexer.h -- define interfaces for lexical analyzer classes generated +// by flex + +// Copyright (c) 1993 The Regents of the University of California. +// All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Kent Williams and Tom Epperly. +// +// Redistribution and use in source and binary forms with or without +// modification are permitted provided that: (1) source distributions retain +// this entire copyright notice and comment, and (2) distributions including +// binaries display the following acknowledgement: ``This product includes +// software developed by the University of California, Berkeley and its +// contributors'' in the documentation or other materials provided with the +// distribution and in all advertising materials mentioning features or use +// of this software. Neither the name of the University nor the names of +// its contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +// This file defines FlexLexer, an abstract class which specifies the +// external interface provided to flex C++ lexer objects, and yyFlexLexer, +// which defines a particular lexer class. +// +// If you want to create multiple lexer classes, you use the -P flag +// to rename each yyFlexLexer to some other xxFlexLexer. You then +// include in your other sources once per lexer class: +// +// #undef yyFlexLexer +// #define yyFlexLexer xxFlexLexer +// #include +// +// #undef yyFlexLexer +// #define yyFlexLexer zzFlexLexer +// #include +// ... + +#ifndef CODELITE_FLEX_LEXER_H +// Never included before - need to define base class. +#define CODELITE_FLEX_LEXER_H +#include +#include + +//extern "C++" { + +namespace flex +{ + +struct yy_buffer_state; +typedef int yy_state_type; + +class FlexLexer { +public: + virtual ~FlexLexer() { } + + const char* YYText() { return yytext; } + int YYLeng() { return yyleng; } + + virtual void + yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0; + virtual struct yy_buffer_state* + yy_create_buffer( std::istream* s, int size ) = 0; + virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0; + virtual void yyrestart( std::istream* s ) = 0; + + virtual int yylex() = 0; + + /// Call yylex with new input/output sources. + int yylex( std::istream* new_in, std::ostream* new_out = 0 ) + { + switch_streams( new_in, new_out ); + return yylex(); + } + + /// Switch to new input/output streams. A nil stream pointer + /// indicates "keep the current one". + virtual void switch_streams( std::istream* new_in = 0, + std::ostream* new_out = 0 ) = 0; + + int lineno() const { return yylineno; } + + int debug() const { return yy_flex_debug; } + void set_debug( int flag ) { yy_flex_debug = flag; } + +protected: + char* yytext; + int yyleng; + int yylineno; ///< only maintained if you use %option yylineno + int yy_flex_debug; ///< only has effect with -d or "%option debug" + + /// Hack for keeping comments from the lexer + wxString m_comment; + int m_keepComments; + int m_returnWhite; +}; + +//} + +#endif + +#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) +// Either this is the first time through (yyFlexLexerOnce not defined), +// or this is a repeated include to define a different flavor of +// yyFlexLexer, as discussed in the flex man page. +#define yyFlexLexerOnce + +class yyFlexLexer : public FlexLexer { +public: + /// arg_yyin and arg_yyout default to the cin and cout, but we + /// only make that assignment when initializing in yylex(). + yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); + + virtual ~yyFlexLexer(); + + void yy_switch_to_buffer( struct yy_buffer_state* new_buffer ); + struct yy_buffer_state* yy_create_buffer( std::istream* s, int size ); + void yy_delete_buffer( struct yy_buffer_state* b ); + void yyrestart( std::istream* s ); + + virtual int yylex(); + virtual void switch_streams( std::istream* new_in, std::ostream* new_out ); + +protected: + virtual int LexerInput( char* buf, int max_size ); + virtual void LexerOutput( const char* buf, int size ); + virtual void LexerError( const char* msg ); + + void yyunput( int c, char* buf_ptr ); + int yyinput(); + + void yy_load_buffer_state(); + void yy_init_buffer( struct yy_buffer_state* b, std::istream* s ); + void yy_flush_buffer( struct yy_buffer_state* b ); + + int yy_start_stack_ptr; + int yy_start_stack_depth; + int* yy_start_stack; + + void yy_push_state( int new_state ); + void yy_pop_state(); + int yy_top_state(); + + yy_state_type yy_get_previous_state(); + yy_state_type yy_try_NUL_trans( yy_state_type current_state ); + int yy_get_next_buffer(); + + std::istream* yyin; ///< input source for default LexerInput + std::ostream* yyout; ///< output sink for default LexerOutput + + struct yy_buffer_state* yy_current_buffer; + + /// yy_hold_char holds the character lost when yytext is formed. + char yy_hold_char; + + /// Number of characters read into yy_ch_buf. + int yy_n_chars; + + /// Points to current character in buffer. + char* yy_c_buf_p; + + int yy_init; ///< whether we need to initialize + int yy_start; ///< start state number + + /// Flag which is used to allow yywrap()'s to do buffer switches + /// instead of setting up a fresh yyin. A bit of a hack ... + int yy_did_buffer_switch_on_eof; + + // The following are not always needed, but may be depending + // on use of certain flex features (like REJECT or yymore()). + + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + yy_state_type* yy_state_buf; + yy_state_type* yy_state_ptr; + + char* yy_full_match; + int* yy_full_state; + int yy_full_lp; + + int yy_lp; + int yy_looking_for_trail_begin; + + int yy_more_flag; + int yy_more_len; + int yy_more_offset; + int yy_prev_more_offset; +}; + +} // namespace flex + +#endif // CODELITE_FLEX_LEXER_H diff --git a/CodeLite/archive.cpp b/CodeLite/archive.cpp new file mode 100644 index 0000000000..616232cabd --- /dev/null +++ b/CodeLite/archive.cpp @@ -0,0 +1,300 @@ +#include "archive.h" +#include +#include "serialized_object.h" + +//helper functions +static wxXmlNode *FindNodeByName(const wxXmlNode *parent, const wxString &tagName, const wxString &name) +{ + if (!parent) { + return NULL; + } + + wxXmlNode *child = parent->GetChildren(); + while ( child ) { + if ( child->GetName() == tagName) { + if ( child->GetPropVal(wxT("Name"), wxEmptyString) == name) { + return child; + } + } + child = child->GetNext(); + } + return NULL; +} + +Archive::Archive() + : m_root(NULL) +{ +} + +Archive::~Archive() +{ +} + +void Archive::Write(const wxString &name, SerializedObject *obj) +{ + Archive arch; + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("SerializedObject")); + m_root->AddChild(node); + node->AddProperty(wxT("Name"), name); + + arch.SetXmlNode(node); + obj->Serialize(arch); +} + +void Archive::Read(const wxString &name, SerializedObject *obj) +{ + Archive arch; + wxXmlNode *node = FindNodeByName(m_root, wxT("SerializedObject"), name); + if (node) { + arch.SetXmlNode(node); + obj->DeSerialize(arch); + } +} + +void Archive::Write(const wxString &name, const wxArrayString &arr) +{ + if (!m_root) { + return; + } + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("wxArrayString")); + m_root->AddChild(node); + node->AddProperty(wxT("Name"), name); + + //add an entry for each wxString in the array + for (size_t i=0; iAddChild(child); + child->AddProperty(wxT("Value"), arr.Item(i)); + } +} + +void Archive::Write(const wxString &name, wxSize size) +{ + if (!m_root) { + return; + } + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("wxSize")); + m_root->AddChild(node); + node->AddProperty(wxT("Name"), name); + + wxString xstr, ystr; + xstr << size.x; + ystr << size.y; + + node->AddProperty(wxT("x"), xstr); + node->AddProperty(wxT("y"), ystr); +} + +void Archive::Write(const wxString &name, wxPoint pt) +{ + if (!m_root) { + return; + } + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("wxPoint")); + m_root->AddChild(node); + node->AddProperty(wxT("Name"), name); + + wxString xstr, ystr; + xstr << pt.x; + ystr << pt.y; + + node->AddProperty(wxT("x"), xstr); + node->AddProperty(wxT("y"), ystr); +} + +void Archive::Read(const wxString &name, wxArrayString &arr) +{ + if (!m_root) { + return; + } + + wxXmlNode *node = FindNodeByName(m_root, wxT("wxArrayString"), name); + if (node) { + //fill the output array with the values + arr.Clear(); + wxXmlNode *child = node->GetChildren(); + while (child) { + if (child->GetName() == wxT("wxString")) { + wxString value; + value = child->GetPropVal(wxT("Value"), wxEmptyString); + arr.Add(value); + } + child = child->GetNext(); + } + } +} + +void Archive::Read(const wxString &name, wxSize &size) +{ + if (!m_root) { + return; + } + + wxXmlNode *node = FindNodeByName(m_root, wxT("wxSize"), name); + if (node) { + long v; + wxString value; + value = node->GetPropVal(wxT("x"), wxEmptyString); + value.ToLong(&v); + size.x = v; + + value = node->GetPropVal(wxT("y"), wxEmptyString); + value.ToLong(&v); + size.y = v; + } +} + +void Archive::Read(const wxString &name, wxPoint &pt) +{ + if (!m_root) { + return; + } + + wxXmlNode *node = FindNodeByName(m_root, wxT("wxPoint"), name); + if (node) { + long v; + wxString value; + value = node->GetPropVal(wxT("x"), wxEmptyString); + value.ToLong(&v); + pt.x = v; + + value = node->GetPropVal(wxT("y"), wxEmptyString); + value.ToLong(&v); + pt.y = v; + } +} + +void Archive::Write(const wxString &name, int value) +{ + if (!m_root) { + return; + } + + WriteSimple(value, wxT("int"), name); +} + +void Archive::Read(const wxString &name, int &value) +{ + if (!m_root) { + return; + } + + long v; + ReadSimple(v, wxT("int"), name); + value = v; +} + +void Archive::Write(const wxString &name, long value) +{ + if (!m_root) { + return; + } + WriteSimple(value, wxT("long"), name); +} + +void Archive::Read(const wxString &name, long &value) +{ + if (!m_root) { + return; + } + ReadSimple(value, wxT("long"), name); +} + +void Archive::Write(const wxString &name, bool value) +{ + if (!m_root) { + return; + } + WriteSimple(value ? 1 : 0, wxT("bool"), name); +} + +void Archive::Read(const wxString &name, bool &value) +{ + if (!m_root) { + return; + } + + long v; + ReadSimple(v, wxT("bool"), name); + v == 0 ? value = false : value = true; +} + +void Archive::Write(const wxString &name, const wxString &str) +{ + if (!m_root) { + return; + } + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("wxString")); + m_root->AddChild(node); + node->AddProperty(wxT("Value"), str); + node->AddProperty(wxT("Name"), name); +} + +void Archive::Read(const wxString &name, wxString &value) +{ + if (!m_root) { + return; + } + wxXmlNode *node = FindNodeByName(m_root, wxT("wxString"), name); + if (node) { + value = node->GetPropVal(wxT("Value"), wxEmptyString); + } +} + +void Archive::Read(const wxString &name, size_t &value) +{ + long v = 0; + Read(name, v); + value = v; +} + +void Archive::Read(const wxString &name, wxFileName &fileName) +{ + wxString value; + Read(name, value); + fileName = wxFileName(value); +} + +void Archive::Write(const wxString &name, size_t value) +{ + Write(name, (long)value); +} + +void Archive::Write(const wxString &name, const wxFileName &fileName) +{ + Write(name, fileName.GetFullPath()); +} + +void Archive::SetXmlNode(wxXmlNode *node) +{ + m_root = node; +} + +void Archive::WriteSimple(long value, const wxString &typeName, const wxString &name) +{ + if (!m_root) + return; + + wxString propValue; + propValue << value; + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, typeName); + m_root->AddChild(node); + node->AddProperty(wxT("Value"), propValue); + node->AddProperty(wxT("Name"), name); +} + +void Archive::ReadSimple(long &value, const wxString &typeName, const wxString &name) +{ + if (!m_root) + return; + + value = 0; + wxXmlNode *node = FindNodeByName(m_root, typeName, name); + if (node) { + wxString val = node->GetPropVal(wxT("Value"), wxEmptyString); + val.ToLong(&value); + } +} diff --git a/CodeLite/archive.h b/CodeLite/archive.h new file mode 100644 index 0000000000..fb6bd5bc2b --- /dev/null +++ b/CodeLite/archive.h @@ -0,0 +1,76 @@ +#ifndef ARCHIVE_H +#define ARCHIVE_H + +#include "wx/string.h" +#include +#include "wx/filename.h" +#include + +class wxXmlNode; + +#ifndef WXDLLIMPEXP_CL +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE +#endif // WXDLLIMPEXP_CL + +class SerializedObject; + +/** + * \class Archive + * \brief an auxulariy class which serializes variables into XML format + * \author Eran + * \date 07/20/07 + */ +class WXDLLIMPEXP_CL Archive +{ + wxXmlNode *m_root; + +public: + Archive(); + virtual ~Archive(); + + /** + * \brief set a root node for this Archive object, all Write operations will append their nodes + * to this node + * \param node wxXmlNode to act as the root + */ + void SetXmlNode(wxXmlNode *node); + + //-------------------- + // Write API + //-------------------- + void Write(const wxString &name, SerializedObject *obj); + void Write(const wxString &name, int value); + void Write(const wxString &name, bool value); + void Write(const wxString &name, long value); + void Write(const wxString &name, const wxString &str); + void Write(const wxString &name, const wxArrayString &arr); + void Write(const wxString &name, const wxFileName &fileName); + void Write(const wxString &name, size_t value); + void Write(const wxString &name, wxSize size); + void Write(const wxString &name, wxPoint pt); + + //-------------------- + // Read API + //-------------------- + void Read(const wxString &name, int &value); + void Read(const wxString &name, bool &value); + void Read(const wxString &name, long &value); + void Read(const wxString &name, wxString &value); + void Read(const wxString &name, wxArrayString &arr); + void Read(const wxString &name, wxFileName &fileName); + void Read(const wxString &name, size_t &value); + void Read(const wxString &name, wxSize &size); + void Read(const wxString &name, wxPoint &pt); + void Read(const wxString &name, SerializedObject *obj); + +private: + void WriteSimple(long value, const wxString &typeName, const wxString &name); + void ReadSimple(long &value, const wxString &typeName, const wxString &name); +}; +#endif //ARCHIVE_H diff --git a/CodeLite/calltip.cpp b/CodeLite/calltip.cpp new file mode 100644 index 0000000000..09449f423d --- /dev/null +++ b/CodeLite/calltip.cpp @@ -0,0 +1,91 @@ +#include "calltip.h" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +clCallTip::clCallTip(const std::vector &tips) +: m_tips(tips) +, m_curr(0) +{ +} + +clCallTip::clCallTip(const clCallTip& rhs) +{ + *this = rhs; +} + +clCallTip& clCallTip::operator =(const clCallTip& rhs) +{ + if(this == &rhs) + return *this; + m_tips = rhs.m_tips; + return *this; +} + +wxString clCallTip::First() +{ + m_curr = 0; + if(m_tips.empty()) + return wxEmptyString; + return TipAt(0); +} + +wxString clCallTip::TipAt(int at) +{ + wxString tip; + if( m_tips.size() > 1 ) + tip << _T("\n\001 ") << static_cast(m_curr)+1 << _T(" of ") << static_cast(m_tips.size()) << _T(" \002 ") + << m_tips.at(at) << _T("\n"); + else + tip << _T("\n") << m_tips.at( 0 ) << _T("\n"); + return tip; +} + +wxString clCallTip::Next() +{ + // format a tip string and return it + wxString tip; + if( m_tips.empty() ) + return wxEmptyString; + + m_curr++; + if( m_curr >= (int)m_tips.size() ){ + m_curr = 0; + } // if( m_curr >= m_tips.size() ) + + return TipAt(m_curr); +} + +wxString clCallTip::Prev() +{ + // format a tip string and return it + wxString tip; + if( m_tips.empty() ) + return wxEmptyString; + + m_curr--; + if(m_curr < 0){ + m_curr = (int)m_tips.size()-1; + } + return TipAt(m_curr); +} + +int clCallTip::Count() const +{ + return (int)m_tips.size(); +} + +wxString clCallTip::All() +{ + wxString tip; + for(size_t i=0; i< m_tips.size(); i++){ + tip << m_tips.at(i) << wxT("\n"); + } + tip = tip.BeforeLast(wxT('\n')); + return tip; +} + + diff --git a/CodeLite/calltip.h b/CodeLite/calltip.h new file mode 100644 index 0000000000..595bb2b216 --- /dev/null +++ b/CodeLite/calltip.h @@ -0,0 +1,93 @@ +#ifndef CODELITE_CALLTIP_H +#define CODELITE_CALLTIP_H + +#include "tokenizer.h" +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +/** + * A call tip function that wraps a tip strings for function prototypes. + * + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 09-18-2006 + * \author Eran + */ +class WXDLLIMPEXP_CL clCallTip +{ + std::vector m_tips; + int m_curr; + +public: + /** + * Constructor + * \param tips input tips + */ + clCallTip(const std::vector & tips ); + + /** + * default constructor + */ + clCallTip() {} + + /** + * Copy constructor + */ + clCallTip(const clCallTip& rhs); + + /** + * Assignment operator + * \param rhs right hand side + * \return this + */ + clCallTip& operator=(const clCallTip& rhs); + + /** + * Destructor + * \return + */ + virtual ~clCallTip(){} + + /** + * Show next tip, if we are at last tip, return the first tip or empty string if no tips exists + * \return next tip + */ + wxString Next() ; + + /** + * Show previous tip, if we are at first tip, return the last tip or empty string if no tips exists + * \return previous tip + */ + wxString Prev() ; + + /** + * return the first tip + */ + wxString First(); + + /** + * Return number of tips stored in this object + * \return number of tips + */ + int Count() const; + + /** + * \brief return all tips as a single string + */ + wxString All(); + +private: + wxString TipAt(int at); +}; + +typedef SmartPtr clCallTipPtr; +#endif // CODELITE_CALLTIP_H diff --git a/CodeLite/cl_process.cpp b/CodeLite/cl_process.cpp new file mode 100644 index 0000000000..a1f9939a24 --- /dev/null +++ b/CodeLite/cl_process.cpp @@ -0,0 +1,132 @@ +#include "cl_process.h" +#include +#include +#include "procutils.h" + +clProcess::clProcess(int id, const wxString &cmdLine, bool redirect) +: wxProcess(NULL, id) +, m_pid(-1) +, m_uid(id) +, m_cmd(cmdLine) +, m_redirect(redirect) +{ +} + +clProcess::~clProcess() +{ +} + +long clProcess::GetPid() +{ + return m_pid; +} + +void clProcess::SetPid(long pid) +{ + m_pid = pid; +} + +void clProcess::Terminate() +{ + wxKillError rc; +#ifdef __WXMSW__ + std::map tree; + ProcUtils::GetProcTree(tree, GetPid()); + + std::map::iterator iter = tree.begin(); + for(; iter != tree.end(); iter++){ + wxKill(iter->first, wxSIGKILL, &rc); + } +#else + wxKill(GetPid(), wxSIGKILL, &rc, wxKILL_CHILDREN); +#endif + + // Sleep for 20 ms to allow the process to be killed and + // the main frame to handle the event or else we can get + // memory leak + wxMilliSleep( 150 ); +} + +long clProcess::Start(bool hide) +{ + if(m_redirect){ + Redirect(); + } + + long flags = wxEXEC_ASYNC | wxEXEC_MAKE_GROUP_LEADER ; + if( !hide ){ + flags |= wxEXEC_NOHIDE; + } + + m_pid = wxExecute(m_cmd, flags, this); + return m_pid; +} + +bool clProcess::HasInput(wxString &input, wxString &errors) +{ + if(m_redirect == false){ + wxASSERT_MSG(false, wxT("Process is not redirected")); + return false; + } + + bool hasInput = false; + while ( IsInputAvailable() ) + { + wxTextInputStream tis(*GetInputStream()); + wxChar ch = tis.GetChar(); + input << ch; + hasInput = true; + if(ch == wxT('\n')) + break; + } + + while ( IsErrorAvailable() ) + { + wxTextInputStream tis(*GetErrorStream()); + wxChar ch = tis.GetChar(); + errors << ch; + hasInput = true; + if(ch == wxT('\n')) + break; + } + return hasInput; +} + +bool clProcess::ReadAll(wxString &input, wxString &errors) +{ + if(m_redirect == false){ + wxASSERT_MSG(false, wxT("Process is not redirected")); + return false; + } + + bool hasInput = false; + while ( IsInputAvailable() ) + { + wxTextInputStream tis(*GetInputStream()); + input << tis.GetChar(); + hasInput = true; + } + + while ( IsErrorAvailable() ) + { + wxTextInputStream tis(*GetErrorStream()); + errors << tis.GetChar(); + hasInput = true; + } + return hasInput; +} + +bool clProcess::Write(const wxString &text) +{ + if(m_redirect == false){ + wxASSERT_MSG(false, wxT("Process is not redirected")); + return false; + } + wxTextOutputStream tos(*GetOutputStream()); + tos.WriteString(text); + return true; +} + + + + diff --git a/CodeLite/cl_process.h b/CodeLite/cl_process.h new file mode 100644 index 0000000000..e5305070a3 --- /dev/null +++ b/CodeLite/cl_process.h @@ -0,0 +1,91 @@ +#ifndef CODELITE_TAGSPROCESS_H +#define CODELITE_TAGSPROCESS_H + +#include "wx/process.h" +#include "wx/string.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +/** + * \ingroup CodeLite + * \brief this class represents a cross platform process + * + * \version 1.0 + * first version + * + * \date 05-04-2007 + * + * \author Eran + */ +class clProcess : public wxProcess +{ + long m_pid; + int m_uid; + int m_type; + wxString m_cmd; + bool m_redirect; + +public: + /** + * Constructs a process object. id is only used in the case you want to use wxWidgets events. + * It identifies this object, or another window that will receive the event. + */ + clProcess(int id, const wxString &cmdLine, bool redirect = true); + + virtual ~clProcess(); + + /** + * \return return the process id + */ + long GetPid(); + + /** + * \param set the process ID + */ + void SetPid(long pid); + + //int GetId() { return m_id; } + + /** + * Kill the process + */ + void Terminate(); + + /** + * Start the process + * \return the process id + */ + long Start(bool hide = true); + + int GetUid() { return m_uid; } + void SetType(int type) { m_type = type; } + int GetType() const { return m_type; } + + bool HasInput(wxString &input, wxString &errors); + + /** + * Read all process output & error + * \param input [output] + * \param errors [output] + * \return + */ + bool ReadAll(wxString &input, wxString &errors); + + /** + * Write text to the process + * \param text + * \return true on success, false otherwise + */ + bool Write(const wxString &text); + + //Getters + const bool& GetRedirect() const {return m_redirect;} +}; + +#endif // CODELITE_TAGSPROCESS_H diff --git a/CodeLite/comment.cpp b/CodeLite/comment.cpp new file mode 100644 index 0000000000..cf372e4352 --- /dev/null +++ b/CodeLite/comment.cpp @@ -0,0 +1,111 @@ +#include "precompiled_header.h" + +#include "comment.h" +#include + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +Comment::Comment(wxSQLite3ResultSet & rs) +{ + m_comment = rs.GetString(0); + m_file = rs.GetString(1); + m_line = rs.GetInt(2); +} + +Comment::Comment(const Comment& rhs) +{ + *this = rhs; +} + +Comment::Comment(const wxString & comment, const wxString & file, const int line) +: m_comment( comment ) +, m_file( file ) +, m_line( line ) +{ + m_comment.erase(m_comment.find_last_not_of(_T("\n\r\t"))+1); +} + +Comment & Comment::operator=(const Comment &rhs) +{ + if( this == &rhs ) + return *this; + + m_comment = rhs.m_comment; + m_file = rhs.m_file; + m_line = rhs.m_line; + return *this; +} + +int Comment::Store(wxSQLite3Statement& insertPreparedStmnt) +{ + try + { + insertPreparedStmnt.Bind(1, GetComment()); + insertPreparedStmnt.Bind(2, GetFile()); + insertPreparedStmnt.Bind(3, GetLine()); + insertPreparedStmnt.ExecuteUpdate(); + insertPreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + if(exc.ErrorCodeAsString(exc.GetErrorCode()) == _T("SQLITE_CONSTRAINT")) + return TagExist; + std::cerr << "Error: " << exc.GetMessage() << std::endl; + return TagError; + } + return TagOk; +} + +int Comment::Update(wxSQLite3Statement& updatePreparedStmnt) +{ + try + { + updatePreparedStmnt.Bind(1, GetComment()); + updatePreparedStmnt.Bind(2, GetFile()); + updatePreparedStmnt.Bind(3, GetLine()); + updatePreparedStmnt.ExecuteUpdate(); + updatePreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + std::cerr << "Error: " << exc.GetMessage() << std::endl; + return TagError; + } + return TagOk; +} + +int Comment::Delete(wxSQLite3Statement& deletePreparedStmnt) +{ + try + { + deletePreparedStmnt.Bind(1, GetFile()); + deletePreparedStmnt.Bind(2, GetLine()); + deletePreparedStmnt.ExecuteUpdate(); + deletePreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + std::cerr << "Error: " << exc.GetMessage() << std::endl; + return TagError; + } + return TagOk; +} + +wxString Comment::GetDeleteOneStatement() +{ + return _T("DELETE FROM COMMENTS WHERE File=? AND Line=?"); +} + +wxString Comment::GetUpdateOneStatement() +{ + return _T("UPDATE COMMENTS SET Comment=? WHERE File=? AND Line=?"); +} + +wxString Comment::GetInsertOneStatement() +{ + return _T("INSERT INTO COMMENTS VALUES (?, ?, ?)"); +} diff --git a/CodeLite/comment.h b/CodeLite/comment.h new file mode 100644 index 0000000000..4dd15666d0 --- /dev/null +++ b/CodeLite/comment.h @@ -0,0 +1,108 @@ +#ifndef CODELITE_COMMENT_H +#define CODELITE_COMMENT_H + +#include "db_record.h" + + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +class WXDLLIMPEXP_CL Comment : public DbRecord +{ + wxString m_comment; + wxString m_file; + int m_line; + +public: + /** + * construct a Comment object + * \param comment comment string + * \param file comment file name + * \param line comment line number + */ + Comment(const wxString &comment, const wxString & file, const int line); + + /** + * Copy constructor + */ + Comment(const Comment& rhs); + + /** + * Construct Comment object from database record + * \param rs resutl set + */ + Comment(wxSQLite3ResultSet& rs); + + /** + * Destructor + */ + virtual ~Comment(){}; + + /// asgginment operator + Comment& operator=(const Comment& rhs); + + /// accessors + /** + * Get the file name + * \return file name + */ + const wxString & GetFile() const { return m_file; } + + /** + * Get string comment + * \return comment + */ + const wxString & GetComment() const { return m_comment; } + + /** + * Get the line number + * \return line number + */ + const int & GetLine() const { return m_line; } + + /// Database operation + /** + * Save this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagExist, TagError + */ + virtual int Store(wxSQLite3Statement& insertPreparedStmnt); + + /** + * Update this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagError + */ + virtual int Update(wxSQLite3Statement& updatePreparedStmnt); + + /** + * Delete this record from db. + * \param deletePreparedStmnt Prepared statement for delete operation + * \return TagOk, TagError + */ + virtual int Delete(wxSQLite3Statement& deletePreparedStmnt); + + /** + * \return delete preapred statement + */ + virtual wxString GetDeleteOneStatement(); + + /** + * \return update preapred statement + */ + virtual wxString GetUpdateOneStatement(); + + /** + * \return insert preapred statement + */ + virtual wxString GetInsertOneStatement(); +}; + +typedef SmartPtr CommentPtr; + +#endif // CODELITE_COMMENT_H diff --git a/CodeLite/comment_creator.h b/CodeLite/comment_creator.h new file mode 100644 index 0000000000..147dfbec8c --- /dev/null +++ b/CodeLite/comment_creator.h @@ -0,0 +1,25 @@ +#ifndef COMMENT_CREATOT_H +#define COMMENT_CREATOT_H + +#include "wx/string.h" + +/** + * \ingroup CodeLite + * an interface class to the comment creator. + * + * \version 1.0 + * first version + * + * \date 07-20-2007 + * + * \author Eran + * + */ +class CommentCreator +{ +public: + CommentCreator(){} + virtual ~CommentCreator(){} + virtual wxString CreateComment() = 0; +}; +#endif //COMMENT_CREATOT_H diff --git a/CodeLite/cpp5.l b/CodeLite/cpp5.l new file mode 100644 index 0000000000..a6843cffda --- /dev/null +++ b/CodeLite/cpp5.l @@ -0,0 +1,419 @@ +%{ + + /* Copyright (C) 1989-1991 James A. Roskind, All rights reserved. + This lexer description was written by James A. Roskind. Copying + of this file, as a whole, is permitted providing this notice is + intact and applicable in all complete copies. Direct + translations as a whole to other lexer generator input languages + (or lexical description languages) is permitted provided that + this notice is intact and applicable in all such copies, along + with a disclaimer that the contents are a translation. The + reproduction of derived files or text, such as modified versions + of this file, or the output of scanner generators, is permitted, + provided the resulting work includes the copyright notice + "Portions Copyright (c) 1989, 1990 James A. Roskind". Derived + products must also provide the notice "Portions Copyright (c) + 1989, 1990 James A. Roskind" in a manner appropriate to the + utility, and in keeping with copyright law (e.g.: EITHER + displayed when first invoked/executed; OR displayed continuously + on display terminal; OR via placement in the object code in form + readable in a printout, with or near the title of the work, or at + the end of the file). No royalties, licenses or commissions of + any kind are required to copy this file, its translations, or + derivative products, when the copies are made in compliance with + this notice. Persons or corporations that do make copies in + compliance with this notice may charge whatever price is + agreeable to a buyer, for such copies or derivative works. THIS + FILE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + James A. Roskind + Independent Consultant + 516 Latania Palm Drive + Indialantic FL, 32903 + (407)729-4348 + jar@hq.ileaf.com + or ...!uunet!leafusa!jar + + ---end of copyright notice--- + + +COMMENTS- + +My goal is to see software developers adopt my C++ grammar as a +standard until such time as a better standard is accessible. The +only way to get it to become a standard, is to be sure that people +know that derivations are based on a specific work. The intent of +releasing this Flex input file is to facilitate experimentation with +my C++ grammar. The intent of the copyright notice is to allow +arbitrary commercial and non-commercial use of this file, as long as +reference is given to my standardization effort. Without reference +to a specific standard, many alternative grammars would develop. By +referring to the standard, the C++ grammar is given publicity, which +should lead to further use in compatible products and systems. The +benefits of such a standard to commercial products (browsers, +beautifiers, translators, compilers, ...) should be obvious to the +developers, in that other compatible products will emerge, and the +value of all conforming products will rise. Most developers are +aware of the value of acquiring a fairly complete grammar for a +language, and the copyright notice (and the resulting affiliation +with my work) should not be too high a price to pay. By copyrighting +my work, I have some minor control over what this standard is, and I +can (hopefully) keep it from degrading without my approval. I will +consistently attempt to provide upgraded grammars that are compliant +with the current art, and the ANSI C++ Committee recommendation in +particular. A developer is never prevented from modifying the +grammar or this file to improve it in whatever way is seen fit. There +is also no restriction on the sale of copies, or derivative works, +providing the request in the copyright notice are satisfied. + +If you are not "copying" my work, but are rather only abstracting +some of my work, an acknowledgment with references to such a standard +would be appreciated. Specifically, agreements with my grammar and +its resolution of otherwise ambiguous constructs, should be noted. + +Simply put: "make whatever use you would like of the grammar and this +file, but include the ``portions Copyright ...'' as a reference to +this standard." + + +*/ + +/* Last modified 7/4/91, Version 2.0 */ + +/* File cpp5.l, becomes lex.yy.c after processing by FLEX */ + +/* This file is a dramatically cut down version of the FLEX input file +used in my ANSI C Preprocessor. The executable version of my +preprocessor is available on many platforms (shareware), but this is +the only source extract that is currently being distributed. If you +need a full ANSI C preprocessor, with extensive diagnostic +capabilities and customization facilities, please contact me at the +addresses given above. Current platforms include IBMPC (DOS/OS2), Sun +(SPARC and Motorola), and IBM R/6000. ... end of commercial +announcement. + +This file is being distributed to facilitate experimentation and use +of my C and C++ grammar. + + +Comment removal must be done during the lexing, as context (such as +enclosure in string literals) must be observed. For this cut-down +lexer, we will assume that comments have been removed (don't assume +this if you are writing a compiler or browser!). + + +/* For each IDENTIFIER like string that is found, there are several +distinct interpretations that can be applied: + +1) The preprocessor may interpret the string as a "keyword" in a +directive (eg: "pragma" or "include", "defined"). + +2) The parser may interpret the string as a keyword. (eg: "int"). + +3) Both parser and preprocessor may interpret the string as a keyword +(eg: "if"). + +Since this file is based on source that actually lexically analyses +text for both preprocessing and parsing, macro definitions were used +throughout. The macro definitions supplied here have been customized +to a C++ parse only, and all preprocessor keywords are passed as +IDENTIFIER or TYPEDEFname. Also, since there is no symbol table to +interrogate to decide whether a string is a TYPEDEFname, I simply +assume that any identifier beginning with an upper case letter is a +TYPEDEFname. This hack should allow you to check out how code +segments are parsed using my grammar. Unfortunately, if you really +want to parse major league code, you have to write a symbol table, and +maintain appropriate scoping information. + + + +*/ + + +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "y.tab.h" /* YACC generated definitions based on C++ grammar */ + +typedef char * YYSTYPE; /* interface with lexer: should be in header + file*/ + +extern char * yylval; /* We will always point at the text of the lexeme. + This makes it easy to print out nice trees when YYDEBUG is + enabled. (see C++ grammar file and its definition of + YYDEBUG_LEXER_TEXT to be "yylval" */ + +#include +#include + +/* Prototypes */ + + +#define WHITE_RETURN(x) /* do nothing */ + +#define NEW_LINE_RETURN() WHITE_RETURN('\n') + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN() RETURN_VAL(IDENTIFIER) + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) return(x); +#define yywrap() 1 + + + +%} + +%option yylineno + +identifier [a-zA-Z_][0-9a-zA-Z_]* + +exponent_part [eE][-+]?[0-9]+ +fractional_constant ([0-9]*"."[0-9]+)|([0-9]+".") +floating_constant (({fractional_constant}{exponent_part}?)|([0-9]+{exponent_part}))[FfLl]? + +integer_suffix_opt ([uU]?[lL]?)|([lL][uU]) +decimal_constant [1-9][0-9]*{integer_suffix_opt} +octal_constant "0"[0-7]*{integer_suffix_opt} +hex_constant "0"[xX][0-9a-fA-F]+{integer_suffix_opt} + +simple_escape [abfnrtv'"?\\] +octal_escape [0-7]{1,3} +hex_escape "x"[0-9a-fA-F]+ + +escape_sequence [\\]({simple_escape}|{octal_escape}|{hex_escape}) +c_char [^'\\\n]|{escape_sequence} +s_char [^"\\\n]|{escape_sequence} + + +h_tab [\011] +form_feed [\014] +v_tab [\013] +c_return [\015] + +horizontal_white [ ]|{h_tab} + + +%% + +"/*" { + /* Handle C-Style comment */ + register int c; + if(m_keepComments) m_comment += yytext; + for ( ; ; ) + { + while ( (c = yyinput()) != '*' && c != EOF ) + { + if(m_keepComments) m_comment += c; + + ; /* eat up text of comment */ + } + if(m_keepComments) m_comment += c; + if ( c == '*' ) + { + while ( (c = yyinput()) == '*' ) + { + if(m_keepComments) m_comment += c; + ; + } + if(m_keepComments) m_comment += c; + if ( c == '/' ) + { + break; /* found the end */ + } + } + if ( c == EOF ) + { + break; + } + } + if(m_keepComments ) return CComment; + } + +"//" { + /* Handle CPP style comment */ + /* Constume everything until the newline */ + register int c; + if(m_keepComments) m_comment += yytext; + while((c = yyinput()) != '\n' && c != EOF) + { + if(m_keepComments) m_comment += c; + } + if(m_keepComments) m_comment += c; + if(m_keepComments ) return CPPComment; + } + +{horizontal_white}+ { + if(!m_returnWhite) + WHITE_RETURN(' '); + else + return ' '; + + } + +({v_tab}|{c_return}|{form_feed})+ { + if(!m_returnWhite) + WHITE_RETURN(' '); + else + return ' '; + } + + +({horizontal_white}|{v_tab}|{c_return}|{form_feed})*"\n" { + if(!m_returnWhite) + NEW_LINE_RETURN(); + else + return '\n'; + } + +auto {PA_KEYWORD_RETURN(AUTO);} +break {PA_KEYWORD_RETURN(BREAK);} +case {PA_KEYWORD_RETURN(CASE);} +char {PA_KEYWORD_RETURN(lexCHAR);} +const {PA_KEYWORD_RETURN(lexCONST);} +continue {PA_KEYWORD_RETURN(CONTINUE);} +default {PA_KEYWORD_RETURN(lexDEFAULT);} +define {PP_KEYWORD_RETURN(DEFINE);} +defined {PP_KEYWORD_RETURN(OPDEFINED);} +do {PA_KEYWORD_RETURN(DO);} +double {PA_KEYWORD_RETURN(lexDOUBLE);} +elif {PP_KEYWORD_RETURN(ELIF);} +else {PPPA_KEYWORD_RETURN(ELSE);} +endif {PP_KEYWORD_RETURN(ENDIF);} +enum {PA_KEYWORD_RETURN(ENUM);} +error {PP_KEYWORD_RETURN(ERROR);} +extern {PA_KEYWORD_RETURN(EXTERN);} +float {PA_KEYWORD_RETURN(lexFLOAT);} +for {PA_KEYWORD_RETURN(FOR);} +goto {PA_KEYWORD_RETURN(GOTO);} +if {PPPA_KEYWORD_RETURN(IF);} +ifdef {PP_KEYWORD_RETURN(IFDEF);} +ifndef {PP_KEYWORD_RETURN(IFNDEF);} +include {PP_KEYWORD_RETURN(INCLUDE); } +int {PA_KEYWORD_RETURN(lexINT);} +line {PP_KEYWORD_RETURN(LINE);} +long {PA_KEYWORD_RETURN(lexLONG);} +pragma {PP_KEYWORD_RETURN(PRAGMA);} +register {PA_KEYWORD_RETURN(REGISTER);} +return {PA_KEYWORD_RETURN(RETURN);} +short {PA_KEYWORD_RETURN(SHORT);} +signed {PA_KEYWORD_RETURN(SIGNED);} +sizeof {PA_KEYWORD_RETURN(SIZEOF);} +static {PA_KEYWORD_RETURN(STATIC);} +struct {PA_KEYWORD_RETURN(lexSTRUCT);} +switch {PA_KEYWORD_RETURN(SWITCH);} +typedef {PA_KEYWORD_RETURN(TYPEDEF);} +undef {PP_KEYWORD_RETURN(UNDEF);} +union {PA_KEYWORD_RETURN(UNION);} +unsigned {PA_KEYWORD_RETURN(UNSIGNED);} +void {PA_KEYWORD_RETURN(lexVOID);} +volatile {PA_KEYWORD_RETURN(VOLATILE);} +while {PA_KEYWORD_RETURN(WHILE);} + + +class {CPP_KEYWORD_RETURN(lexCLASS);} +namespace {CPP_KEYWORD_RETURN(lexNAMESPACE);} +delete {CPP_KEYWORD_RETURN(lexDELETE);} +friend {CPP_KEYWORD_RETURN(FRIEND);} +inline {CPP_KEYWORD_RETURN(INLINE);} +new {CPP_KEYWORD_RETURN(NEW);} +operator {CPP_KEYWORD_RETURN(OPERATOR);} +overload {CPP_KEYWORD_RETURN(OVERLOAD);} +protected {CPP_KEYWORD_RETURN(lexPROTECTED);} +private {CPP_KEYWORD_RETURN(lexPRIVATE);} +public {CPP_KEYWORD_RETURN(lexPUBLIC);} +this {CPP_KEYWORD_RETURN(lexTHIS);} +virtual {CPP_KEYWORD_RETURN(VIRTUAL);} + +{identifier} {IDENTIFIER_RETURN();} + +{decimal_constant} {NUMERICAL_RETURN(INTEGERconstant);} +{octal_constant} {NUMERICAL_RETURN(OCTALconstant);} +{hex_constant} {NUMERICAL_RETURN(HEXconstant);} +{floating_constant} {NUMERICAL_RETURN(FLOATINGconstant);} + + +"L"?[']{c_char}+['] { + NUMERICAL_RETURN(CHARACTERconstant); + } + + +"L"?["]{s_char}*["] { + LITERAL_RETURN(STRINGliteral);} + + + + +"(" {PPOP_RETURN(LP);} +")" {PPOP_RETURN(RP);} +"," {PPOP_RETURN(COMMA);} +"#" {NAMED_PPOP_RETURN('#') ;} +"##" {NAMED_PPOP_RETURN(POUNDPOUND);} + +"{" {ASCIIOP_RETURN(LC);} +"}" {ASCIIOP_RETURN(RC);} +"[" {ASCIIOP_RETURN(LB);} +"]" {ASCIIOP_RETURN(RB);} +"." {ASCIIOP_RETURN(DOT);} +"&" {ASCIIOP_RETURN(AND);} +"*" {ASCIIOP_RETURN(STAR);} +"+" {ASCIIOP_RETURN(PLUS);} +"-" {ASCIIOP_RETURN(MINUS);} +"~" {ASCIIOP_RETURN(NEGATE);} +"!" {ASCIIOP_RETURN(NOT);} +"/" {ASCIIOP_RETURN(DIV);} +"%" {ASCIIOP_RETURN(MOD);} +"<" {ASCIIOP_RETURN(LT);} +">" {ASCIIOP_RETURN(GT);} +"^" {ASCIIOP_RETURN(XOR);} +"|" {ASCIIOP_RETURN(PIPE);} +"?" {ASCIIOP_RETURN(QUESTION);} +":" {ASCIIOP_RETURN(COLON);} +";" {ASCIIOP_RETURN(SEMICOLON);} +"=" {ASCIIOP_RETURN(ASSIGN);} + +".*" {NAMEDOP_RETURN(DOTstar);} +"::" {NAMEDOP_RETURN(CLCL);} +"->" {NAMEDOP_RETURN(ARROW);} +"->*" {NAMEDOP_RETURN(ARROWstar);} +"++" {NAMEDOP_RETURN(ICR);} +"--" {NAMEDOP_RETURN(DECR);} +"<<" {NAMEDOP_RETURN(LS);} +">>" {NAMEDOP_RETURN(RS);} +"<=" {NAMEDOP_RETURN(LE);} +">=" {NAMEDOP_RETURN(GE);} +"==" {NAMEDOP_RETURN(EQ);} +"!=" {NAMEDOP_RETURN(NE);} +"&&" {NAMEDOP_RETURN(ANDAND);} +"||" {NAMEDOP_RETURN(OROR);} +"*=" {NAMEDOP_RETURN(MULTassign);} +"/=" {NAMEDOP_RETURN(DIVassign);} +"%=" {NAMEDOP_RETURN(MODassign);} +"+=" {NAMEDOP_RETURN(PLUSassign);} +"-=" {NAMEDOP_RETURN(MINUSassign);} +"<<=" {NAMEDOP_RETURN(LSassign);} +">>=" {NAMEDOP_RETURN(RSassign);} +"&=" {NAMEDOP_RETURN(ANDassign);} +"^=" {NAMEDOP_RETURN(ERassign);} +"|=" {NAMEDOP_RETURN(ORassign);} +"..." {NAMEDOP_RETURN(ELLIPSIS);} +. {return yytext[0];} + + +%% + +/*******************************************************************/ diff --git a/CodeLite/cpp_comment_creator.cpp b/CodeLite/cpp_comment_creator.cpp new file mode 100644 index 0000000000..5776251e7f --- /dev/null +++ b/CodeLite/cpp_comment_creator.cpp @@ -0,0 +1,74 @@ +#include "precompiled_header.h" +#include "cpp_comment_creator.h" +#include +#include +#include "language.h" + +#define trimMe(str){\ + str = str.Trim();\ + str = str.Trim(false);\ + } + +CppCommentCreator::CppCommentCreator(TagEntryPtr tag) +: m_tag(tag) +{ +} + +CppCommentCreator::~CppCommentCreator() +{ +} + +wxString CppCommentCreator::CreateComment() +{ + if(m_tag->GetKind() == wxT("class")) + return ClassComment(); + else if(m_tag->GetKind() == wxT("function")) + return FunctionComment(); + else if(m_tag->GetKind() == wxT("prototype")) + return FunctionComment(); + return wxEmptyString; +} + +wxString CppCommentCreator::ClassComment() +{ + wxDateTime now = wxDateTime::Now(); + wxString comment; + comment << wxT("/**\n"); + comment << wxT(" * \\class ") << m_tag->GetName() << wxT("\n"); + comment << wxT(" * \\brief \n"); + comment << wxT(" * \\author ") << wxGetUserName() << wxT("\n"); + comment << wxT(" * \\date ") << now.FormatDate() << wxT("\n"); + comment << wxT(" */\n"); + return comment; +} + +wxString CppCommentCreator::FunctionComment() +{ + wxDateTime now = wxDateTime::Now(); + wxString comment; + + //parse the function signature + std::vector tags; + Language *lang = LanguageST::Get(); + lang->GetLocalVariables(m_tag->GetSignature(), tags); + + Variable var; + lang->VariableFromPattern(m_tag->GetPattern(), var); + + comment << wxT("/**\n"); + comment << wxT(" * \\brief \n"); + for(size_t i=0; iGetName() << wxT("\n"); + + wxString type = _U(var.m_type.c_str()); + wxString name = _U(var.m_name.c_str()); + trimMe(type); + trimMe(name); + + if( type != wxT("void") //void has no return value + && name != type){ //constructor + comment << wxT(" * \\return \n"); + } + comment << wxT(" */\n"); + return comment; +} diff --git a/CodeLite/cpp_comment_creator.h b/CodeLite/cpp_comment_creator.h new file mode 100644 index 0000000000..1cf4c463a7 --- /dev/null +++ b/CodeLite/cpp_comment_creator.h @@ -0,0 +1,21 @@ +#ifndef CPP_COMMENT_CREATOR_H +#define CPP_COMMENT_CREATOR_H + +#include "wx/string.h" +#include "entry.h" +#include "comment_creator.h" + +class CppCommentCreator : public CommentCreator +{ + TagEntryPtr m_tag; +public: + CppCommentCreator(TagEntryPtr tag); + virtual ~CppCommentCreator(); + virtual wxString CreateComment(); + +private: + wxString FunctionComment(); + wxString ClassComment(); +}; + +#endif //CPP_COMMENT_CREATOR_H diff --git a/CodeLite/cpp_expr_lexer.cpp b/CodeLite/cpp_expr_lexer.cpp new file mode 100644 index 0000000000..723c456318 --- /dev/null +++ b/CodeLite/cpp_expr_lexer.cpp @@ -0,0 +1,2608 @@ +#define yy_create_buffer cl_expr__create_buffer +#define yy_delete_buffer cl_expr__delete_buffer +#define yy_scan_buffer cl_expr__scan_buffer +#define yy_scan_string cl_expr__scan_string +#define yy_scan_bytes cl_expr__scan_bytes +#define yy_flex_debug cl_expr__flex_debug +#define yy_init_buffer cl_expr__init_buffer +#define yy_flush_buffer cl_expr__flush_buffer +#define yy_load_buffer_state cl_expr__load_buffer_state +#define yy_switch_to_buffer cl_expr__switch_to_buffer +#define yyin cl_expr_in +#define yyleng cl_expr_leng +#define yylex cl_expr_lex +#define yyout cl_expr_out +#define yyrestart cl_expr_restart +#define yytext cl_expr_text +#define yylineno cl_expr_lineno +#define yywrap cl_expr_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 138 +#define YY_END_OF_BUFFER 139 +static yyconst short int yy_acclist[582] = + { 0, + 139, 125, 138, 3, 125, 138, 5, 138, 4, 125, + 138, 89, 125, 138, 125, 138, 91, 125, 138, 84, + 125, 138, 125, 138, 75, 125, 138, 76, 125, 138, + 85, 125, 138, 86, 125, 138, 77, 125, 138, 87, + 125, 138, 83, 125, 138, 90, 125, 138, 70, 125, + 138, 69, 125, 138, 97, 125, 138, 98, 125, 138, + 92, 125, 138, 99, 125, 138, 93, 125, 138, 96, + 125, 138, 68, 125, 138, 68, 125, 138, 81, 125, + 138, 82, 125, 138, 94, 125, 138, 68, 125, 138, + 68, 125, 138, 68, 125, 138, 68, 125, 138, 68, + + 125, 138, 68, 125, 138, 68, 125, 138, 68, 125, + 138, 68, 125, 138, 68, 125, 138, 68, 125, 138, + 68, 125, 138, 68, 125, 138, 68, 125, 138, 68, + 125, 138, 68, 125, 138, 68, 125, 138, 68, 125, + 138, 79, 125, 138, 95, 125, 138, 80, 125, 138, + 88, 125, 138, 78, 125, 138, 133, 138, 126, 138, + 131, 133, 138, 127, 133, 138, 131, 133, 138, 132, + 138, 129, 138, 130, 132, 138, 135, 138, 134, 138, + 137, 138, 138, 137, 138, 3, 5, 4, 111, 74, + 116, 112, 121, 114, 104, 117, 105, 118, 102, 100, + + 72, 1, 2, 115, 72, 70, 70, 70, 69, 69, + 69, 101, 106, 108, 110, 109, 107, 68, 122, 68, + 68, 68, 68, 68, 68, 68, 15, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 26, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 123, 113, 131, 131, 130, 136, 73, 103, 124, 72, + 72, 70, 71, 69, 119, 120, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 24, 68, 68, 68, 68, 68, 68, + + 68, 30, 68, 68, 68, 68, 54, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 131, 72, 71, 71, 6, 68, 68, + 8, 68, 9, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 17, 68, 18, 68, 68, 20, 68, 68, + 68, 68, 68, 25, 68, 68, 68, 68, 68, 31, + 68, 32, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 60, 68, 68, 68, 68, 68, 68, 46, 68, 68, + + 68, 131, 71, 7, 68, 49, 68, 10, 68, 68, + 68, 68, 68, 68, 68, 19, 68, 21, 68, 68, + 23, 68, 68, 27, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 36, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 43, 68, + 44, 68, 68, 68, 68, 48, 68, 131, 68, 68, + 68, 13, 68, 51, 68, 16, 68, 68, 22, 68, + 52, 68, 28, 68, 68, 53, 68, 68, 68, 68, + 33, 68, 68, 68, 59, 68, 68, 68, 35, 68, + 37, 68, 38, 68, 39, 68, 40, 68, 41, 68, + + 68, 68, 68, 68, 68, 68, 128, 131, 68, 68, + 12, 68, 14, 68, 68, 29, 68, 68, 68, 68, + 58, 68, 68, 68, 68, 68, 68, 42, 68, 68, + 68, 61, 68, 68, 68, 11, 68, 68, 68, 55, + 68, 56, 68, 68, 34, 68, 68, 68, 62, 68, + 63, 68, 45, 68, 47, 68, 68, 68, 50, 68, + 57, 68, 68, 68, 66, 68, 68, 68, 68, 68, + 68, 65, 68, 64, 68, 68, 68, 68, 68, 67, + 68 + } ; + +static yyconst short int yy_accept[439] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 7, 9, 12, 15, 17, 20, 23, + 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, + 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, + 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, + 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 159, 161, 164, 167, 170, + 172, 174, 177, 179, 181, 183, 184, 186, 187, 188, + 188, 189, 190, 190, 191, 191, 192, 193, 194, 194, + 194, 195, 196, 197, 198, 199, 200, 201, 201, 202, + + 203, 204, 205, 206, 207, 207, 207, 208, 209, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 219, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 267, 267, + 268, 268, 268, 269, 270, 270, 271, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + + 294, 296, 297, 298, 299, 300, 301, 302, 304, 305, + 306, 307, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 335, + 335, 335, 335, 335, 336, 337, 338, 340, 341, 343, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 355, + 357, 358, 360, 361, 362, 363, 364, 366, 367, 368, + 369, 370, 372, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 393, 394, 395, 396, 397, 398, 400, 401, 402, + + 403, 403, 403, 403, 403, 404, 406, 408, 410, 411, + 412, 413, 414, 415, 416, 418, 420, 421, 423, 424, + 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 451, 453, 454, 455, 456, 458, 459, + 460, 461, 462, 464, 466, 468, 469, 471, 473, 475, + 476, 478, 479, 480, 481, 483, 484, 485, 487, 488, + 489, 491, 493, 495, 497, 499, 501, 502, 503, 504, + 505, 506, 507, 509, 510, 511, 513, 515, 516, 518, + 519, 520, 521, 523, 524, 525, 526, 527, 528, 530, + + 531, 532, 534, 535, 536, 538, 539, 540, 542, 544, + 545, 547, 548, 549, 551, 553, 555, 557, 558, 559, + 561, 563, 564, 565, 567, 568, 569, 570, 571, 572, + 574, 576, 577, 578, 579, 580, 582, 582 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 8, 9, 10, 1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, + 23, 23, 23, 23, 23, 24, 24, 25, 26, 27, + 28, 29, 30, 1, 31, 31, 31, 31, 32, 33, + 34, 34, 34, 34, 34, 35, 34, 34, 34, 34, + 34, 34, 34, 34, 36, 34, 34, 37, 34, 34, + 38, 39, 40, 41, 42, 1, 43, 44, 45, 46, + + 47, 48, 49, 50, 51, 34, 52, 53, 54, 55, + 56, 57, 34, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[71] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 5, 6, 1, 1, 1, 1, 1, 3, + 6, 6, 6, 7, 7, 7, 7, 1, 3, 1, + 1, 7, 5, 5, 6, 6, 6, 5, 7, 7, + 7, 7, 7, 7, 8, 7, 7, 8, 7, 8, + 7, 8, 7, 8, 7, 7, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[450] = + { 0, + 0, 783, 70, 0, 140, 0, 789, 788, 208, 209, + 790, 794, 211, 794, 224, 761, 210, 760, 208, 748, + 794, 794, 758, 204, 794, 214, 224, 229, 238, 231, + 760, 794, 195, 756, 206, 794, 0, 228, 794, 794, + 755, 721, 723, 226, 212, 240, 230, 724, 216, 238, + 209, 239, 229, 732, 255, 260, 723, 252, 727, 794, + 244, 794, 794, 794, 794, 794, 0, 794, 729, 794, + 794, 0, 794, 794, 794, 794, 754, 317, 794, 324, + 330, 794, 272, 794, 216, 794, 794, 794, 300, 294, + 794, 794, 794, 794, 794, 758, 794, 753, 318, 794, + + 794, 794, 322, 354, 340, 374, 307, 303, 0, 382, + 312, 314, 794, 744, 794, 794, 794, 743, 0, 343, + 731, 794, 709, 721, 708, 723, 722, 709, 261, 702, + 707, 329, 333, 703, 700, 703, 700, 706, 696, 337, + 350, 700, 699, 699, 689, 704, 703, 357, 705, 360, + 692, 350, 369, 696, 692, 694, 687, 373, 685, 308, + 691, 794, 794, 0, 693, 0, 794, 414, 0, 794, + 408, 0, 794, 794, 422, 794, 426, 432, 794, 398, + 794, 794, 794, 684, 696, 691, 679, 677, 325, 409, + 688, 690, 690, 684, 684, 679, 675, 672, 680, 683, + + 0, 678, 668, 676, 676, 668, 669, 0, 672, 669, + 670, 0, 658, 657, 665, 651, 652, 658, 659, 654, + 647, 649, 651, 658, 644, 642, 642, 644, 641, 652, + 651, 641, 645, 635, 648, 650, 639, 640, 448, 479, + 450, 515, 452, 460, 425, 387, 0, 638, 0, 0, + 630, 628, 636, 625, 630, 624, 630, 628, 0, 0, + 633, 0, 622, 621, 618, 622, 0, 628, 628, 613, + 618, 0, 0, 613, 628, 617, 615, 625, 620, 615, + 606, 604, 605, 602, 614, 604, 608, 613, 612, 603, + 0, 422, 607, 599, 604, 591, 0, 591, 603, 594, + + 419, 0, 425, 0, 794, 0, 0, 606, 592, 593, + 598, 597, 596, 591, 0, 0, 586, 0, 594, 0, + 591, 592, 590, 579, 575, 578, 590, 572, 586, 585, + 569, 581, 572, 0, 580, 570, 572, 552, 561, 548, + 542, 538, 0, 0, 502, 513, 504, 0, 506, 507, + 490, 490, 503, 0, 0, 500, 0, 0, 0, 497, + 0, 500, 486, 498, 0, 493, 476, 0, 488, 476, + 0, 0, 0, 491, 0, 0, 472, 483, 476, 482, + 468, 467, 0, 476, 470, 0, 0, 474, 0, 470, + 456, 463, 0, 460, 448, 448, 459, 453, 0, 452, + + 452, 0, 450, 437, 0, 449, 445, 0, 0, 445, + 0, 432, 438, 0, 0, 0, 0, 419, 435, 0, + 0, 422, 407, 0, 403, 382, 366, 365, 339, 0, + 0, 302, 257, 238, 205, 0, 794, 563, 571, 579, + 587, 591, 595, 599, 605, 611, 615, 617, 619 + } ; + +static yyconst short int yy_def[450] = + { 0, + 437, 1, 437, 3, 437, 5, 438, 438, 439, 439, + 437, 437, 437, 437, 437, 437, 440, 437, 437, 441, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 442, 442, 437, 437, + 437, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 437, + 437, 437, 437, 437, 437, 437, 443, 437, 443, 437, + 437, 444, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 440, 437, 445, 437, 437, 437, 441, 446, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 447, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 442, 440, + 441, 437, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 437, 437, 443, 443, 444, 437, 440, 448, 437, + 441, 449, 437, 437, 437, 437, 437, 437, 437, 447, + 437, 437, 437, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 443, 440, 440, + 441, 441, 437, 437, 437, 437, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 443, + + 440, 240, 441, 242, 437, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 443, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 443, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 0, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437 + } ; + +static yyconst short int yy_nxt[865] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 12, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, + 37, 37, 37, 37, 38, 37, 37, 39, 12, 40, + 41, 37, 42, 43, 44, 45, 46, 47, 48, 37, + 49, 37, 50, 37, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 37, 37, 37, 60, 61, 62, 63, + 65, 65, 66, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + + 67, 67, 67, 67, 67, 67, 67, 65, 68, 65, + 65, 67, 67, 67, 67, 69, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 65, 65, 65, 65, + 70, 70, 71, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 72, 72, 72, 72, 72, 72, 72, 70, 70, 70, + 70, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + + 72, 72, 72, 72, 72, 72, 70, 70, 70, 70, + 76, 76, 78, 79, 80, 80, 80, 78, 84, 87, + 92, 114, 115, 77, 77, 80, 79, 81, 81, 81, + 80, 93, 94, 117, 118, 88, 120, 168, 168, 97, + 121, 95, 96, 98, 100, 99, 99, 99, 85, 101, + 103, 144, 110, 110, 110, 145, 102, 103, 129, 104, + 104, 105, 106, 140, 436, 111, 112, 130, 125, 106, + 141, 162, 107, 108, 109, 126, 131, 106, 127, 169, + 84, 128, 136, 111, 106, 137, 148, 138, 142, 149, + 107, 112, 132, 143, 133, 146, 435, 134, 108, 434, + + 147, 109, 159, 135, 151, 152, 155, 160, 190, 156, + 85, 163, 170, 191, 153, 171, 171, 154, 78, 79, + 80, 80, 80, 78, 157, 80, 79, 80, 80, 80, + 80, 80, 79, 81, 81, 81, 80, 179, 90, 99, + 99, 99, 179, 99, 99, 99, 433, 181, 181, 175, + 176, 84, 176, 175, 176, 179, 176, 172, 235, 103, + 236, 105, 105, 105, 175, 176, 181, 179, 175, 176, + 176, 106, 181, 103, 176, 104, 104, 105, 196, 194, + 432, 85, 204, 252, 253, 106, 106, 195, 107, 108, + 177, 205, 177, 197, 206, 178, 178, 178, 223, 215, + + 106, 103, 207, 110, 110, 110, 107, 216, 219, 208, + 220, 225, 217, 106, 108, 224, 111, 112, 231, 221, + 170, 305, 84, 232, 431, 430, 226, 84, 106, 241, + 241, 233, 245, 246, 111, 239, 239, 170, 243, 305, + 243, 429, 112, 244, 244, 244, 90, 178, 178, 178, + 245, 254, 85, 178, 178, 178, 84, 85, 246, 255, + 305, 428, 170, 90, 176, 427, 176, 341, 426, 301, + 301, 303, 303, 244, 244, 244, 342, 425, 424, 176, + 423, 244, 244, 244, 176, 305, 85, 84, 90, 422, + 421, 420, 176, 419, 176, 418, 417, 416, 415, 414, + + 302, 302, 302, 413, 412, 411, 410, 176, 409, 302, + 302, 302, 176, 408, 407, 406, 405, 85, 404, 403, + 402, 302, 302, 302, 302, 302, 302, 170, 401, 400, + 399, 398, 397, 396, 395, 394, 304, 304, 304, 393, + 392, 391, 390, 389, 388, 304, 304, 304, 387, 386, + 385, 384, 383, 90, 382, 381, 380, 304, 304, 304, + 304, 304, 304, 73, 73, 73, 73, 73, 73, 73, + 73, 75, 75, 75, 75, 75, 75, 75, 75, 83, + 379, 83, 83, 83, 83, 83, 83, 89, 378, 89, + 377, 89, 89, 89, 89, 119, 119, 119, 119, 164, + + 164, 164, 164, 166, 166, 166, 166, 83, 83, 83, + 376, 375, 83, 89, 89, 89, 374, 373, 89, 180, + 180, 240, 240, 242, 242, 372, 371, 370, 369, 368, + 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, + 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, + 347, 346, 345, 344, 343, 340, 339, 338, 337, 336, + 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, + 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, + 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, + 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, + + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, + 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, + 260, 259, 258, 257, 256, 251, 250, 249, 248, 247, + 238, 237, 234, 230, 229, 228, 227, 222, 218, 214, + 213, 212, 211, 210, 209, 203, 202, 201, 200, 199, + 198, 193, 192, 189, 188, 187, 186, 185, 184, 90, + 183, 182, 174, 173, 167, 165, 161, 158, 150, 139, + 124, 123, 122, 116, 113, 91, 90, 86, 82, 437, + 74, 74, 64, 11, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437 + } ; + +static yyconst short int yy_chk[865] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 9, 10, 13, 13, 13, 13, 13, 13, 17, 19, + 24, 33, 33, 9, 10, 15, 15, 15, 15, 15, + 15, 24, 26, 35, 35, 19, 38, 85, 85, 27, + 38, 26, 26, 27, 28, 27, 27, 27, 17, 28, + 30, 51, 30, 30, 30, 51, 28, 29, 45, 29, + 29, 29, 30, 49, 435, 30, 30, 45, 44, 29, + 49, 61, 29, 29, 29, 44, 45, 30, 44, 85, + 83, 44, 47, 30, 29, 47, 53, 47, 50, 53, + 29, 30, 46, 50, 46, 52, 434, 46, 29, 433, + + 52, 29, 58, 46, 55, 55, 56, 58, 129, 56, + 83, 61, 89, 129, 55, 90, 90, 55, 78, 78, + 78, 78, 78, 78, 56, 80, 80, 80, 80, 80, + 80, 81, 81, 81, 81, 81, 81, 108, 89, 99, + 99, 99, 107, 103, 103, 103, 432, 111, 112, 99, + 99, 120, 99, 103, 103, 108, 103, 90, 160, 105, + 160, 105, 105, 105, 99, 99, 112, 107, 103, 103, + 99, 105, 111, 104, 103, 104, 104, 104, 133, 132, + 429, 120, 140, 189, 189, 104, 105, 132, 104, 104, + 106, 140, 106, 133, 141, 106, 106, 106, 152, 148, + + 104, 110, 141, 110, 110, 110, 104, 148, 150, 141, + 150, 153, 148, 110, 104, 152, 110, 110, 158, 150, + 171, 246, 168, 158, 428, 427, 153, 301, 110, 171, + 171, 158, 180, 180, 110, 168, 168, 303, 175, 246, + 175, 426, 110, 175, 175, 175, 171, 177, 177, 177, + 180, 190, 168, 178, 178, 178, 239, 301, 180, 190, + 245, 425, 241, 303, 178, 423, 178, 292, 422, 239, + 239, 241, 241, 243, 243, 243, 292, 419, 418, 178, + 413, 244, 244, 244, 178, 245, 239, 240, 241, 412, + 410, 407, 244, 406, 244, 404, 403, 401, 400, 398, + + 240, 240, 240, 397, 396, 395, 394, 244, 392, 240, + 240, 240, 244, 391, 390, 388, 385, 240, 384, 382, + 381, 240, 240, 240, 240, 240, 240, 242, 380, 379, + 378, 377, 374, 370, 369, 367, 242, 242, 242, 366, + 364, 363, 362, 360, 356, 242, 242, 242, 353, 352, + 351, 350, 349, 242, 347, 346, 345, 242, 242, 242, + 242, 242, 242, 438, 438, 438, 438, 438, 438, 438, + 438, 439, 439, 439, 439, 439, 439, 439, 439, 440, + 342, 440, 440, 440, 440, 440, 440, 441, 341, 441, + 340, 441, 441, 441, 441, 442, 442, 442, 442, 443, + + 443, 443, 443, 444, 444, 444, 444, 445, 445, 445, + 339, 338, 445, 446, 446, 446, 337, 336, 446, 447, + 447, 448, 448, 449, 449, 335, 333, 332, 331, 330, + 329, 328, 327, 326, 325, 324, 323, 322, 321, 319, + 317, 314, 313, 312, 311, 310, 309, 308, 300, 299, + 298, 296, 295, 294, 293, 290, 289, 288, 287, 286, + 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, + 275, 274, 271, 270, 269, 268, 266, 265, 264, 263, + 261, 258, 257, 256, 255, 254, 253, 252, 251, 248, + 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, + + 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, + 218, 217, 216, 215, 214, 213, 211, 210, 209, 207, + 206, 205, 204, 203, 202, 200, 199, 198, 197, 196, + 195, 194, 193, 192, 191, 188, 187, 186, 185, 184, + 165, 161, 159, 157, 156, 155, 154, 151, 149, 147, + 146, 145, 144, 143, 142, 139, 138, 137, 136, 135, + 134, 131, 130, 128, 127, 126, 125, 124, 123, 121, + 118, 114, 98, 96, 77, 69, 59, 57, 54, 48, + 43, 42, 41, 34, 31, 23, 20, 18, 16, 11, + 8, 7, 2, 437, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_expr_lval; +extern std::string cl_var_lval; + +bool setExprLexerInput(const std::string &in); +void cl_expr_lex_clean(); + +bool exprIsaTYPE(char *string); +bool exprIsaMACRO(char *string); +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(exprIsaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(exprIsaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_expr_lval = yytext;\ + return(x);} +#define PREPR 1 + +#define WRAP_PREP 2 + +#define CPP_COMMENT 3 + +#define C_COMMENT 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 794 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + BEGIN C_COMMENT; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{ + BEGIN CPP_COMMENT; + } + YY_BREAK +case 3: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 4: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 5: +YY_RULE_SETUP +{ + WHITE_RETURN('\n'); + } + YY_BREAK +case 6: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_AUTO);} + YY_BREAK +case 7: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_BREAK);} + YY_BREAK +case 8: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CASE);} + YY_BREAK +case 9: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CHAR);} + YY_BREAK +case 10: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONST);} + YY_BREAK +case 11: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONTINUE);} + YY_BREAK +case 12: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DEFAULT);} + YY_BREAK +case 13: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_DEFINE);} + YY_BREAK +case 14: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_OPDEFINED);} + YY_BREAK +case 15: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DO);} + YY_BREAK +case 16: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DOUBLE);} + YY_BREAK +case 17: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ELIF);} + YY_BREAK +case 18: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_ELSE);} + YY_BREAK +case 19: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ENDIF);} + YY_BREAK +case 20: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_ENUM);} + YY_BREAK +case 21: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ERROR);} + YY_BREAK +case 22: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_EXTERN);} + YY_BREAK +case 23: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FLOAT);} + YY_BREAK +case 24: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FOR);} + YY_BREAK +case 25: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_GOTO);} + YY_BREAK +case 26: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_IF);} + YY_BREAK +case 27: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFDEF);} + YY_BREAK +case 28: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFNDEF);} + YY_BREAK +case 29: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_INCLUDE); } + YY_BREAK +case 30: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_INT);} + YY_BREAK +case 31: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_LINE);} + YY_BREAK +case 32: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_LONG);} + YY_BREAK +case 33: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_PRAGMA);} + YY_BREAK +case 34: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_REGISTER);} + YY_BREAK +case 35: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_RETURN);} + YY_BREAK +case 36: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SHORT);} + YY_BREAK +case 37: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIGNED);} + YY_BREAK +case 38: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIZEOF);} + YY_BREAK +case 39: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STATIC);} + YY_BREAK +case 40: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STRUCT);} + YY_BREAK +case 41: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SWITCH);} + YY_BREAK +case 42: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_TYPEDEF);} + YY_BREAK +case 43: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_UNDEF);} + YY_BREAK +case 44: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNION);} + YY_BREAK +case 45: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNSIGNED);} + YY_BREAK +case 46: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOID);} + YY_BREAK +case 47: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOLATILE);} + YY_BREAK +case 48: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_WHILE);} + YY_BREAK +case 49: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CLASS);} + YY_BREAK +case 50: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NAMESPACE);} + YY_BREAK +case 51: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DELETE);} + YY_BREAK +case 52: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_FRIEND);} + YY_BREAK +case 53: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_INLINE);} + YY_BREAK +case 54: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NEW);} + YY_BREAK +case 55: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OPERATOR);} + YY_BREAK +case 56: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OVERLOAD);} + YY_BREAK +case 57: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PROTECTED);} + YY_BREAK +case 58: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PRIVATE);} + YY_BREAK +case 59: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PUBLIC);} + YY_BREAK +case 60: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_THIS);} + YY_BREAK +case 61: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_VIRTUAL);} + YY_BREAK +case 62: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TEMPLATE);} + YY_BREAK +case 63: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TYPENAME);} + YY_BREAK +case 64: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} + YY_BREAK +case 65: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_STATIC_CAST);} + YY_BREAK +case 66: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CONST_CAST);} + YY_BREAK +case 67: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} + YY_BREAK +case 68: +YY_RULE_SETUP +{IDENTIFIER_RETURN();} + YY_BREAK +case 69: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_INTEGERconstant);} + YY_BREAK +case 70: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_OCTALconstant);} + YY_BREAK +case 71: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_HEXconstant);} + YY_BREAK +case 72: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_FLOATINGconstant);} + YY_BREAK +case 73: +YY_RULE_SETUP +{ + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + YY_BREAK +case 74: +YY_RULE_SETUP +{ + LITERAL_RETURN(LE_STRINGliteral);} + YY_BREAK +case 75: +YY_RULE_SETUP +{PPOP_RETURN(LE_LP);} + YY_BREAK +case 76: +YY_RULE_SETUP +{PPOP_RETURN(LE_RP);} + YY_BREAK +case 77: +YY_RULE_SETUP +{PPOP_RETURN(LE_COMMA);} + YY_BREAK +case 78: +YY_RULE_SETUP +{BEGIN PREPR;} + YY_BREAK +case 79: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LC);} + YY_BREAK +case 80: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RC);} + YY_BREAK +case 81: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LB);} + YY_BREAK +case 82: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RB);} + YY_BREAK +case 83: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DOT);} + YY_BREAK +case 84: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_AND);} + YY_BREAK +case 85: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_STAR);} + YY_BREAK +case 86: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PLUS);} + YY_BREAK +case 87: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MINUS);} + YY_BREAK +case 88: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NEGATE);} + YY_BREAK +case 89: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NOT);} + YY_BREAK +case 90: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DIV);} + YY_BREAK +case 91: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MOD);} + YY_BREAK +case 92: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LT);} + YY_BREAK +case 93: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_GT);} + YY_BREAK +case 94: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_XOR);} + YY_BREAK +case 95: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PIPE);} + YY_BREAK +case 96: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_QUESTION);} + YY_BREAK +case 97: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_COLON);} + YY_BREAK +case 98: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_SEMICOLON);} + YY_BREAK +case 99: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_ASSIGN);} + YY_BREAK +case 100: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DOTstar);} + YY_BREAK +case 101: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_CLCL);} + YY_BREAK +case 102: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROW);} + YY_BREAK +case 103: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROWstar);} + YY_BREAK +case 104: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ICR);} + YY_BREAK +case 105: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DECR);} + YY_BREAK +case 106: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LS);} + YY_BREAK +case 107: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RS);} + YY_BREAK +case 108: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LE);} + YY_BREAK +case 109: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_GE);} + YY_BREAK +case 110: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_EQ);} + YY_BREAK +case 111: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_NE);} + YY_BREAK +case 112: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDAND);} + YY_BREAK +case 113: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_OROR);} + YY_BREAK +case 114: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MULTassign);} + YY_BREAK +case 115: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DIVassign);} + YY_BREAK +case 116: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MODassign);} + YY_BREAK +case 117: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_PLUSassign);} + YY_BREAK +case 118: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MINUSassign);} + YY_BREAK +case 119: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LSassign);} + YY_BREAK +case 120: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RSassign);} + YY_BREAK +case 121: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDassign);} + YY_BREAK +case 122: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ERassign);} + YY_BREAK +case 123: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ORassign);} + YY_BREAK +case 124: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ELLIPSIS);} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PREPR): +case YY_STATE_EOF(WRAP_PREP): +case YY_STATE_EOF(CPP_COMMENT): +case YY_STATE_EOF(C_COMMENT): +{ + //reset lexer + yyterminate(); + } + YY_BREAK +case 125: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 126: +YY_RULE_SETUP +{ + defineFound = false; + BEGIN INITIAL; + } + YY_BREAK +case 127: +YY_RULE_SETUP +{ + BEGIN WRAP_PREP; + } + YY_BREAK +case 128: +YY_RULE_SETUP +{ + defineFound = true; + } + YY_BREAK +case 129: +YY_RULE_SETUP +{ + BEGIN PREPR; + } + YY_BREAK +case 130: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + } + } + YY_BREAK +case 131: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + } + } + YY_BREAK +case 132: +YY_RULE_SETUP +{} + YY_BREAK +case 133: +YY_RULE_SETUP +{} + YY_BREAK +case 134: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 135: +YY_RULE_SETUP +{} + YY_BREAK +case 136: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 137: +YY_RULE_SETUP +{} + YY_BREAK +case 138: +YY_RULE_SETUP +ECHO; + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 437); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +bool exprIsaTYPE(char *string) +{ + return false; +} + +bool exprIsaMACRO(char *string) +{ + return false; +} + +void cl_expr_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_expr_lineno = 1; +} + +/*******************************************************************/ +bool setExprLexerInput(const std::string &in) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap() +{ + return 1; +} diff --git a/CodeLite/cpp_expr_parser.cpp b/CodeLite/cpp_expr_parser.cpp new file mode 100644 index 0000000000..694271de4b --- /dev/null +++ b/CodeLite/cpp_expr_parser.cpp @@ -0,0 +1,878 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_expr_parse +#define yylex cl_expr_lex +#define yyerror cl_expr_error +#define yychar cl_expr_char +#define yyval cl_expr_val +#define yylval cl_expr_lval +#define yydebug cl_expr_debug +#define yynerrs cl_expr_nerrs +#define yyerrflag cl_expr_errflag +#define yyss cl_expr_ss +#define yyssp cl_expr_ssp +#define yyvs cl_expr_vs +#define yyvsp cl_expr_vsp +#define yylhs cl_expr_lhs +#define yylen cl_expr_len +#define yydefred cl_expr_defred +#define yydgoto cl_expr_dgoto +#define yysindex cl_expr_sindex +#define yyrindex cl_expr_rindex +#define yygindex cl_expr_gindex +#define yytable cl_expr_table +#define yycheck cl_expr_check +#define yyname cl_expr_name +#define yyrule cl_expr_rule +#define YYPREFIX "cl_expr_" + +/* Copyright Eran Ifrah(c)*/ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "expression_result.h" + +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +void cl_expr_error(char *string); + +static ExpressionResult result; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_expr_text; +extern int cl_expr_lex(); +extern int cl_expr_parse(); +extern int cl_expr_lineno; +extern std::vector currentScope; +extern bool setExprLexerInput(const std::string &in); +extern void cl_expr_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_expr_lhs[] = { -1, + 0, 0, 3, 1, 1, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, + 7, 7, 2, 2, 2, 2, 2, 2, 2, 13, + 13, 14, 14, 11, 11, 11, 11, 15, 15, 16, + 16, 9, 10, 10, 10, 12, 12, 8, 8, 17, +}; +short cl_expr_len[] = { 2, + 0, 2, 0, 2, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 3, 4, + 4, 6, 6, 2, 3, 3, 6, 8, 5, 0, + 3, 0, 1, 1, 1, 1, 1, 0, 1, 0, + 2, 2, 0, 1, 1, 6, 3, 0, 2, 2, +}; +short cl_expr_defred[] = { 1, + 0, 5, 2, 0, 44, 45, 4, 0, 24, 34, + 35, 36, 37, 0, 0, 0, 0, 48, 0, 0, + 25, 26, 0, 49, 48, 0, 0, 40, 50, 0, + 0, 0, 40, 0, 47, 0, 0, 7, 48, 0, + 18, 33, 29, 0, 0, 0, 41, 39, 42, 27, + 0, 0, 31, 23, 0, 40, 13, 8, 11, 9, + 12, 10, 15, 14, 16, 0, 40, 19, 28, 46, + 0, 20, 21, 0, 22, +}; +short cl_expr_dgoto[] = { 1, + 3, 7, 4, 39, 67, 40, 41, 19, 35, 8, + 17, 20, 31, 43, 49, 36, 24, +}; +short cl_expr_sindex[] = { 0, + -254, 0, 0, 21, 0, 0, 0, -25, 0, 0, + 0, 0, 0, -17, -230, -274, -12, 0, -272, -4, + 0, 0, -60, 0, 0, 27, -57, 0, 0, -227, + 32, 12, 0, -227, 0, 29, -226, 0, 0, -34, + 0, 0, 0, 45, -219, -32, 0, 0, 0, 0, + -225, -227, 0, 0, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -56, 0, 0, 0, 0, + -227, 0, 0, 13, 0, +}; +short cl_expr_rindex[] = { 0, + -33, 0, 0, -29, 0, 0, 0, -214, 0, 0, + 0, 0, 0, -214, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, -6, 0, 0, -38, + 5, 0, 0, -38, 0, -23, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -193, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -22, 0, 0, 0, 0, + -38, 0, 0, 0, 0, +}; +short cl_expr_gindex[] = { 0, + 0, 0, 0, 0, 0, -26, 38, 19, -14, 0, + 0, 44, 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 350 +short cl_expr_table[] = { 30, + 30, 2, 34, 71, 32, 17, 3, 46, 3, 52, + 43, 52, 43, 37, 14, 40, 15, 38, 45, 40, + 38, 40, 18, 17, 3, 3, 16, 53, 23, 56, + 27, 40, 57, 58, 40, 40, 28, 59, 38, 40, + 30, 70, 30, 60, 74, 38, 32, 25, 61, 62, + 63, 72, 73, 64, 65, 40, 52, 51, 30, 30, + 21, 26, 32, 32, 6, 6, 48, 33, 32, 6, + 47, 42, 22, 44, 75, 6, 50, 66, 6, 5, + 6, 6, 6, 55, 54, 6, 6, 69, 48, 68, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 6, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 6, 6, 6, 0, 0, + 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30, 3, 0, 0, + 32, 43, 0, 0, 6, 9, 0, 29, 0, 3, + 29, 29, 0, 43, 0, 0, 0, 0, 0, 38, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 32, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 32, 3, 3, + 3, 3, 43, 43, 43, 43, 10, 11, 12, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 30, 30, 30, 30, 32, 32, 32, 32, +}; +short cl_expr_check[] = { 60, + 0, 256, 60, 60, 0, 44, 40, 34, 42, 44, + 40, 44, 42, 28, 40, 38, 42, 41, 33, 42, + 44, 44, 40, 62, 58, 59, 8, 62, 303, 62, + 303, 38, 258, 259, 41, 42, 41, 263, 62, 62, + 40, 56, 42, 269, 71, 273, 42, 60, 274, 275, + 276, 66, 67, 279, 280, 62, 44, 39, 58, 59, + 291, 18, 58, 59, 258, 259, 38, 41, 25, 263, + 42, 40, 303, 62, 62, 269, 303, 303, 58, 59, + 274, 275, 276, 303, 40, 279, 280, 41, 303, 52, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 303, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, -1, + 269, -1, -1, -1, -1, 274, 275, 276, -1, -1, + 279, 280, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 256, 291, -1, -1, + 256, 291, -1, -1, 303, 291, -1, 328, -1, 303, + 328, 328, -1, 303, -1, -1, -1, -1, -1, 303, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 291, -1, -1, -1, 291, -1, -1, -1, -1, + -1, -1, -1, 303, -1, -1, -1, 303, 342, 343, + 344, 345, 342, 343, 344, 345, 342, 343, 344, 345, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 342, 343, 344, 345, 342, 343, 344, 345, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_expr_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'", +"'<'",0,"'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG", +"LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR", +"LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT", +"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT", +"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE", +"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC", +"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD", +"LE_TEMPLATE","LE_TYPENAME","LE_IDENTIFIER","LE_STRINGliteral", +"LE_FLOATINGconstant","LE_INTEGERconstant","LE_CHARACTERconstant", +"LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND","LE_CComment", +"LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname","LE_ARROW","LE_ICR", +"LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE","LE_ANDAND","LE_OROR", +"LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar","LE_MULTassign", +"LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign","LE_LSassign", +"LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign","LE_MACRO", +"LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST","LE_REINTERPRET_CAST", +}; +char *cl_expr_rule[] = { +"$accept : translation_unit", +"translation_unit :", +"translation_unit : translation_unit primary_expr", +"$$1 :", +"primary_expr : $$1 simple_expr", +"primary_expr : error", +"const_spec :", +"const_spec : LE_CONST", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"parameter_list :", +"parameter_list : template_parameter", +"parameter_list : parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +"simple_expr : stmnt_starter special_cast '<' cast_type '>' '('", +"simple_expr : stmnt_starter LE_THIS", +"simple_expr : stmnt_starter '*' LE_THIS", +"simple_expr : stmnt_starter '*' LE_IDENTIFIER", +"simple_expr : stmnt_starter '(' cast_type ')' special_star_amp LE_IDENTIFIER", +"simple_expr : stmnt_starter '(' '(' cast_type ')' special_star_amp LE_IDENTIFIER ')'", +"simple_expr : stmnt_starter nested_scope_specifier LE_IDENTIFIER optional_template_init_list optinal_postifx", +"optional_template_init_list :", +"optional_template_init_list : '<' parameter_list '>'", +"optinal_postifx :", +"optinal_postifx : '('", +"special_cast : LE_DYNAMIC_CAST", +"special_cast : LE_STATIC_CAST", +"special_cast : LE_CONST_CAST", +"special_cast : LE_REINTERPRET_CAST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"cast_type : nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp", +"cast_type : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + + +void expr_FuncArgList() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +void expr_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +void expr_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +ExpressionResult &parse_expression(const std::string &in) +{ + result.Reset(); + //provide the lexer with new input + if( !setExprLexerInput(in) ){ + return result; + } + + //printf("parsing...\n"); + cl_expr_parse(); + //do the lexer cleanup + cl_expr_lex_clean(); + + return result; +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 3: +{result.Reset();} +break; +case 5: +{ + yyclearin; /*clear lookahead token*/ + yyerrok; + /*fprintf(stderr, "CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_expr_text, cl_expr_lineno);*/ + /*fflush(stderr);*/ + expr_syncParser(); + } +break; +case 6: +{yyval = ""; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 10: +{ yyval = yyvsp[0]; } +break; +case 11: +{ yyval = yyvsp[0]; } +break; +case 12: +{ yyval = yyvsp[0]; } +break; +case 13: +{ yyval = yyvsp[0]; } +break; +case 14: +{ yyval = yyvsp[0]; } +break; +case 15: +{ yyval = yyvsp[0]; } +break; +case 16: +{ yyval = yyvsp[0]; } +break; +case 17: +{yyval = "";} +break; +case 18: +{yyval = yyvsp[0];} +break; +case 19: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 20: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 21: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 22: +{yyval = yyvsp[-5] + " " + yyvsp[-4] + " " + yyvsp[-3] +yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 23: +{ + expr_FuncArgList(); + yyval = yyvsp[-2]; + result.m_isaType = true; + result.m_name = yyvsp[-2]; + result.m_isFunc = false; + printf("Rule 1\n"); + /*result.Print();*/ + } +break; +case 24: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = true; + result.m_isPtr = true; + /*result.Print();*/ + } +break; +case 25: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = true; + /*result.Print();*/ + } +break; +case 26: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + result.m_isPtr = false; + /*result.Print();*/ + } +break; +case 27: +{ + yyval = yyvsp[-3]; + result.m_isaType = true; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + /*result.Print();*/ + } +break; +case 28: +{ + yyval = yyvsp[-4]; + result.m_isaType = true; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + /*result.Print();*/ + } +break; +case 29: +{ + result.m_isaType = false; + result.m_name = yyvsp[-2]; + result.m_isThis = false; + yyvsp[-3].erase(yyvsp[-3].find_last_not_of(":")+1); + result.m_scope = yyvsp[-3]; + result.m_isTemplate = yyvsp[-1].empty() ? false : true; + result.m_templateInitList = yyvsp[-1]; + /*result.Print();*/ + } +break; +case 30: +{yyval = "";} +break; +case 31: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = "";} +break; +case 33: +{ + yyval = yyvsp[0]; + expr_FuncArgList(); + result.m_isFunc = true; + } +break; +case 34: +{yyval = yyvsp[0];} +break; +case 35: +{yyval = yyvsp[0];} +break; +case 36: +{yyval = yyvsp[0];} +break; +case 37: +{yyval = yyvsp[0];} +break; +case 38: +{yyval = ""; } +break; +case 39: +{ yyval = yyvsp[0]; } +break; +case 40: +{yyval = ""; } +break; +case 41: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 42: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 43: +{yyval = "";} +break; +case 44: +{ yyval = ";";} +break; +case 45: +{ yyval = ":";} +break; +case 46: +{ + yyval = yyvsp[-5] + yyvsp[-4]; + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + result.m_scope = yyvsp[-5]; + result.m_name = yyvsp[-4]; + result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);; + result.m_isTemplate = true; + result.m_templateInitList = yyvsp[-3] + yyvsp[-2] + yyvsp[-1]; + } +break; +case 47: +{ + yyval = yyvsp[-2] + yyvsp[-1]; + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + result.m_scope = yyvsp[-2]; + result.m_name = yyvsp[-1]; + result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);; + } +break; +case 48: +{yyval = "";} +break; +case 49: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 50: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CodeLite/cpp_func_parser.cpp b/CodeLite/cpp_func_parser.cpp new file mode 100644 index 0000000000..66c58a1bb0 --- /dev/null +++ b/CodeLite/cpp_func_parser.cpp @@ -0,0 +1,913 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_func_parse +#define yylex cl_func_lex +#define yyerror cl_func_error +#define yychar cl_func_char +#define yyval cl_func_val +#define yylval cl_func_lval +#define yydebug cl_func_debug +#define yynerrs cl_func_nerrs +#define yyerrflag cl_func_errflag +#define yyss cl_func_ss +#define yyssp cl_func_ssp +#define yyvs cl_func_vs +#define yyvsp cl_func_vsp +#define yylhs cl_func_lhs +#define yylen cl_func_len +#define yydefred cl_func_defred +#define yydgoto cl_func_dgoto +#define yysindex cl_func_sindex +#define yyrindex cl_func_rindex +#define yygindex cl_func_gindex +#define yytable cl_func_table +#define yycheck cl_func_check +#define yyname cl_func_name +#define yyrule cl_func_rule +#define YYPREFIX "cl_func_" + +/* Copyright Eran Ifrah(c)*/ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "function.h" + +#define YYDEBUG_LEXER_TEXT (cl_func_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +#ifdef yylex +#undef yylex +#define yylex cl_scope_lex +#endif + +int cl_func_parse(); +void cl_func_error(char *string); + +static FunctionList *g_funcs = NULL; +static clFunction curr_func; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_func_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern void cl_scope_lex_clean(); + + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_func_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 4, 2, 2, 5, 5, 7, 7, 6, 6, + 8, 8, 9, 9, 9, 10, 14, 14, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 19, + 3, 21, 21, 12, 12, 20, 20, 22, 23, 22, + 17, 17, 11, 11, 24, 24, 25, 25, 13, 16, + 16, 16, 18, 18, 18, +}; +short cl_func_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 0, 2, 1, 0, 2, 1, 3, 1, 1, + 0, 4, 0, 1, 3, 4, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, + 12, 1, 1, 0, 2, 0, 2, 2, 0, 4, + 0, 1, 0, 1, 0, 1, 0, 2, 2, 0, + 1, 1, 3, 3, 6, +}; +short cl_func_defred[] = { 10, + 0, 14, 11, 0, 81, 82, 13, 0, 0, 0, + 0, 72, 0, 19, 20, 17, 0, 0, 74, 64, + 16, 0, 22, 0, 64, 18, 6, 1, 4, 2, + 5, 3, 8, 7, 9, 0, 77, 65, 0, 68, + 0, 84, 0, 83, 0, 0, 0, 0, 24, 64, + 0, 78, 76, 79, 57, 58, 45, 49, 50, 41, + 42, 51, 52, 53, 54, 43, 44, 48, 46, 59, + 39, 40, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 47, 0, 0, 28, 69, 60, 0, 77, + 0, 70, 55, 56, 0, 25, 85, 0, 0, 26, + 0, 0, 67, 62, 63, 61, +}; +short cl_func_dgoto[] = { 1, + 37, 3, 7, 4, 16, 17, 18, 10, 48, 49, + 50, 24, 42, 47, 86, 8, 13, 25, 95, 102, + 106, 38, 51, 54, 43, +}; +short cl_func_sindex[] = { 0, + -219, 0, 0, -27, 0, 0, 0, -263, -16, -243, + -212, 0, -211, 0, 0, 0, -236, 4, 0, 0, + 0, -212, 0, -163, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -59, 0, 0, -221, 0, + -211, 0, 59, 0, -33, -58, 29, 13, 0, 0, + -254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 36, -4, 0, 0, 0, -211, 0, + -209, 0, 0, 0, -211, 0, 0, -58, 38, 0, + -201, -51, 0, 0, 0, 0, +}; +short cl_func_rindex[] = { 0, + -39, 0, 0, -233, 0, 0, 0, -224, 0, -171, + 16, 0, -138, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -21, 0, 0, 0, 0, + -29, 0, -38, 0, 0, 70, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -189, 0, + 0, 0, 0, 0, -43, 0, 0, 21, -37, 0, + 0, 0, 0, 0, 0, 0, +}; +short cl_func_gindex[] = { 0, + 0, 0, 0, 0, 93, 0, 0, 0, 0, 30, + -10, 3, -14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 299 +short cl_func_table[] = { 82, + 41, 87, 20, 77, 79, 75, 84, 105, 75, 73, + 70, 74, 83, 76, 23, 73, 77, 73, 12, 12, + 77, 66, 44, 75, 80, 80, 71, 39, 72, 80, + 6, 5, 23, 21, 21, 80, 2, 9, 21, 80, + 80, 80, 80, 11, 21, 80, 80, 22, 21, 21, + 21, 21, 91, 12, 21, 21, 89, 85, 77, 15, + 78, 19, 77, 80, 77, 23, 21, 80, 88, 80, + 45, 104, 21, 92, 90, 97, 93, 15, 21, 73, + 14, 46, 77, 100, 99, 66, 71, 71, 94, 15, + 80, 71, 81, 98, 27, 28, 53, 71, 101, 29, + 52, 71, 71, 71, 71, 30, 103, 71, 71, 27, + 31, 32, 33, 73, 26, 34, 35, 0, 96, 73, + 73, 0, 0, 0, 73, 0, 0, 0, 0, 0, + 73, 71, 0, 0, 0, 73, 73, 73, 0, 36, + 73, 73, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 12, + 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 75, 0, 55, 56, 12, 0, 0, + 0, 12, 0, 12, 75, 0, 0, 0, 40, 40, + 77, 0, 0, 73, 0, 0, 0, 0, 0, 0, + 0, 77, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 0, 68, 69, 0, 69, +}; +short cl_func_check[] = { 33, + 60, 60, 13, 37, 38, 44, 40, 59, 42, 43, + 44, 45, 46, 47, 44, 59, 38, 61, 58, 59, + 42, 59, 37, 62, 258, 259, 60, 25, 62, 263, + 58, 59, 62, 258, 259, 269, 256, 301, 263, 273, + 274, 275, 276, 60, 269, 279, 280, 44, 273, 274, + 275, 276, 50, 297, 279, 280, 44, 91, 38, 44, + 94, 273, 42, 297, 44, 62, 303, 301, 40, 303, + 292, 123, 297, 328, 62, 90, 41, 62, 303, 123, + 293, 303, 62, 98, 95, 123, 258, 259, 93, 302, + 124, 263, 126, 303, 258, 259, 38, 269, 61, 263, + 42, 273, 274, 275, 276, 269, 308, 279, 280, 40, + 274, 275, 276, 303, 22, 279, 280, -1, 89, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, -1, + 269, 303, -1, -1, -1, 274, 275, 276, -1, 303, + 279, 280, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 258, 259, + -1, -1, -1, 263, -1, -1, -1, -1, -1, 269, + -1, -1, -1, 273, 274, 275, 276, -1, -1, 279, + 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 292, -1, 289, 290, 297, -1, -1, + -1, 301, -1, 303, 303, -1, -1, -1, 328, 328, + 292, -1, -1, 303, -1, -1, -1, -1, -1, -1, + -1, 303, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, -1, -1, 329, 330, -1, 328, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_func_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,0, +0,0,0,0,0,0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,"'{'","'|'",0,"'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE", +"LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE", +"LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN","LE_RETURN", +"LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED","LE_CONTINUE", +"LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF","LE_VOLATILE", +"LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE","LE_THIS", +"LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL", +"LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME", +"LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant", +"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND", +"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname", +"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE", +"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar", +"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign", +"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign", +"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST", +"LE_REINTERPRET_CAST", +}; +char *cl_func_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"$$1 :", +"external_decl : $$1 function_decl", +"external_decl : error", +"template_arg :", +"template_arg : template_specifiter LE_IDENTIFIER", +"template_arg_list : template_arg", +"template_arg_list : template_arg_list ',' template_arg", +"template_specifiter : LE_CLASS", +"template_specifiter : LE_TYPENAME", +"opt_template_qualifier :", +"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'", +"template_parameter_list :", +"template_parameter_list : template_parameter", +"template_parameter_list : template_parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"func_name : LE_IDENTIFIER", +"func_name : LE_OPERATOR any_operator", +"any_operator : '+'", +"any_operator : '-'", +"any_operator : '*'", +"any_operator : '/'", +"any_operator : '%'", +"any_operator : '^'", +"any_operator : '&'", +"any_operator : '|'", +"any_operator : '~'", +"any_operator : '!'", +"any_operator : '<'", +"any_operator : '>'", +"any_operator : LE_LS", +"any_operator : LE_RS", +"any_operator : LE_ANDAND", +"any_operator : LE_OROR", +"any_operator : LE_ARROW", +"any_operator : LE_ARROWstar", +"any_operator : '.'", +"any_operator : LE_DOTstar", +"any_operator : LE_ICR", +"any_operator : LE_DECR", +"any_operator : LE_LE", +"any_operator : LE_GE", +"any_operator : LE_EQ", +"any_operator : LE_NE", +"any_operator : '(' ')'", +"any_operator : '[' ']'", +"any_operator : LE_NEW", +"any_operator : LE_DELETE", +"any_operator : ','", +"$$2 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$2 const_spec opt_pure_virtual func_postfix", +"func_postfix : '{'", +"func_postfix : ';'", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"opt_pure_virtual :", +"opt_pure_virtual : '=' LE_OCTALconstant", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"$$3 :", +"scope_specifier : LE_IDENTIFIER '<' $$3 LE_CLCL", +"virtual_spec :", +"virtual_spec : LE_VIRTUAL", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"variable_decl : nested_scope_specifier basic_type_name special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + +void func_consumeFuncArgList() +{ + curr_func.m_signature = "("; + + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch == 0) + { + break; + } + + curr_func.m_signature += cl_func_lval; + curr_func.m_signature += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void func_consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void func_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +void get_functions(const std::string &in, FunctionList &li, const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ) + { + return; + } + + g_funcs = &li; + + //call tghe main parsing routine + cl_func_parse(); + g_funcs = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 12: +{curr_func.Reset();} +break; +case 14: +{ + /*printf("CodeLite: syntax error, unexpected token '%s' found\n", cl_func_lval.c_str());*/ + } +break; +case 15: +{ yyval = "";} +break; +case 16: +{yyval = yyvsp[-1] + " " + yyvsp[0];} +break; +case 17: +{ yyval = yyvsp[0]; } +break; +case 18: +{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; } +break; +case 19: +{ yyval = yyvsp[0]; } +break; +case 20: +{ yyval = yyvsp[0]; } +break; +case 22: +{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 23: +{yyval = "";} +break; +case 24: +{yyval = yyvsp[0];} +break; +case 25: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 26: +{yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];} +break; +case 27: +{yyval = yyvsp[0];} +break; +case 28: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 60: +{func_consumeFuncArgList();} +break; +case 61: +{ + /*trim down trailing '::' from scope name*/ + yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1); + curr_func.m_name = yyvsp[-5]; + curr_func.m_scope = yyvsp[-6]; + curr_func.m_retrunValusConst = yyvsp[-8]; + curr_func.m_lineno = cl_scope_lineno; + if(g_funcs) + { + g_funcs->push_back(curr_func); + } + curr_func.Reset(); + } +break; +case 64: +{yyval = "";} +break; +case 65: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 68: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; +case 69: +{func_consumeTemplateDecl();} +break; +case 70: +{yyval = yyvsp[-3] + yyvsp[0];} +break; +case 71: +{yyval = ""; } +break; +case 72: +{ yyval = yyvsp[0]; } +break; +case 73: +{yyval = ""; } +break; +case 74: +{ yyval = yyvsp[0]; } +break; +case 75: +{yyval = ""; } +break; +case 76: +{ yyval = yyvsp[0]; } +break; +case 77: +{yyval = ""; } +break; +case 78: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 79: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 80: +{yyval = "";} +break; +case 81: +{ yyval = ";";} +break; +case 82: +{ yyval = ":";} +break; +case 83: +{ + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-1]; + curr_func.m_returnValue.m_typeScope = yyvsp[-2]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0]; + } +break; +case 84: +{ + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-1]; + curr_func.m_returnValue.m_typeScope = yyvsp[-2]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ; + } +break; +case 85: +{ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-4]; + curr_func.m_returnValue.m_typeScope = yyvsp[-5]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + curr_func.m_returnValue.m_isTemplate = true; + curr_func.m_returnValue.m_templateDecl = yyvsp[-2]; + yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ; + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CodeLite/cpp_lexer.cpp b/CodeLite/cpp_lexer.cpp new file mode 100644 index 0000000000..481f26aa18 --- /dev/null +++ b/CodeLite/cpp_lexer.cpp @@ -0,0 +1,2711 @@ +#define yy_create_buffer cl_scope__create_buffer +#define yy_delete_buffer cl_scope__delete_buffer +#define yy_scan_buffer cl_scope__scan_buffer +#define yy_scan_string cl_scope__scan_string +#define yy_scan_bytes cl_scope__scan_bytes +#define yy_flex_debug cl_scope__flex_debug +#define yy_init_buffer cl_scope__init_buffer +#define yy_flush_buffer cl_scope__flush_buffer +#define yy_load_buffer_state cl_scope__load_buffer_state +#define yy_switch_to_buffer cl_scope__switch_to_buffer +#define yyin cl_scope_in +#define yyleng cl_scope_leng +#define yylex cl_scope_lex +#define yyout cl_scope_out +#define yyrestart cl_scope_restart +#define yytext cl_scope_text +#define yylineno cl_scope_lineno +#define yywrap cl_scope_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 139 +#define YY_END_OF_BUFFER 140 +static yyconst short int yy_acclist[592] = + { 0, + 140, 126, 139, 3, 126, 139, 5, 139, 4, 126, + 139, 90, 126, 139, 126, 139, 92, 126, 139, 85, + 126, 139, 126, 139, 76, 126, 139, 77, 126, 139, + 86, 126, 139, 87, 126, 139, 78, 126, 139, 88, + 126, 139, 84, 126, 139, 91, 126, 139, 71, 126, + 139, 70, 126, 139, 98, 126, 139, 99, 126, 139, + 93, 126, 139, 100, 126, 139, 94, 126, 139, 97, + 126, 139, 69, 126, 139, 69, 126, 139, 82, 126, + 139, 83, 126, 139, 95, 126, 139, 69, 126, 139, + 69, 126, 139, 69, 126, 139, 69, 126, 139, 69, + + 126, 139, 69, 126, 139, 69, 126, 139, 69, 126, + 139, 69, 126, 139, 69, 126, 139, 69, 126, 139, + 69, 126, 139, 69, 126, 139, 69, 126, 139, 69, + 126, 139, 69, 126, 139, 69, 126, 139, 69, 126, + 139, 80, 126, 139, 96, 126, 139, 81, 126, 139, + 89, 126, 139, 3, 126, 139, 79, 126, 139, 134, + 139, 127, 139, 132, 134, 139, 128, 134, 139, 132, + 134, 139, 133, 139, 130, 139, 131, 133, 139, 136, + 139, 135, 139, 138, 139, 139, 138, 139, 3, 5, + 4, 112, 75, 117, 113, 122, 115, 105, 118, 106, + + 119, 103, 101, 73, 1, 2, 116, 73, 71, 71, + 71, 70, 70, 70, 102, 107, 109, 111, 110, 108, + 69, 123, 69, 69, 69, 69, 69, 69, 69, 15, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 26, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 124, 114, 3, 79, 132, 132, + 131, 137, 74, 104, 125, 73, 73, 71, 72, 70, + 120, 121, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 24, + + 69, 69, 69, 69, 69, 69, 69, 30, 69, 69, + 69, 69, 54, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 132, 73, 72, 72, 6, 69, 69, 8, 69, 9, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 17, + 69, 18, 69, 69, 20, 69, 69, 69, 69, 69, + 25, 69, 69, 69, 69, 69, 31, 69, 32, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 60, 69, 69, + + 69, 69, 69, 69, 69, 46, 69, 69, 69, 132, + 72, 7, 69, 49, 69, 10, 69, 69, 69, 69, + 69, 69, 69, 19, 69, 21, 69, 69, 23, 69, + 69, 27, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 36, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 43, 69, 44, 69, + 69, 68, 69, 69, 69, 48, 69, 132, 69, 69, + 69, 13, 69, 51, 69, 16, 69, 69, 22, 69, + 52, 69, 28, 69, 69, 53, 69, 69, 69, 69, + 33, 69, 69, 69, 59, 69, 69, 69, 35, 69, + + 37, 69, 38, 69, 39, 69, 40, 69, 41, 69, + 69, 69, 69, 69, 69, 69, 129, 132, 69, 69, + 12, 69, 14, 69, 69, 29, 69, 69, 69, 69, + 58, 69, 69, 69, 69, 69, 69, 42, 69, 69, + 69, 61, 69, 69, 69, 11, 69, 69, 69, 55, + 69, 56, 69, 69, 34, 69, 69, 69, 62, 69, + 63, 69, 45, 69, 47, 69, 69, 69, 50, 69, + 57, 69, 69, 69, 66, 69, 69, 69, 69, 69, + 69, 65, 69, 64, 69, 69, 69, 69, 69, 67, + 69 + + } ; + +static yyconst short int yy_accept[446] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 7, 9, 12, 15, 17, 20, 23, + 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, + 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, + 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, + 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 160, 162, 164, 167, 170, + 173, 175, 177, 180, 182, 184, 186, 187, 189, 190, + 191, 191, 192, 193, 193, 194, 194, 195, 196, 197, + 197, 197, 198, 199, 200, 201, 202, 203, 204, 204, + + 205, 206, 207, 208, 209, 210, 210, 210, 211, 212, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 222, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 273, 273, 274, 274, 274, 275, 276, 276, + 277, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + + 296, 297, 298, 299, 300, 302, 303, 304, 305, 306, + 307, 308, 310, 311, 312, 313, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 342, 342, 342, 342, 342, 343, + 344, 345, 347, 348, 350, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 362, 364, 365, 367, 368, 369, + 370, 371, 373, 374, 375, 376, 377, 379, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 400, 401, 402, 403, + + 404, 405, 406, 408, 409, 410, 411, 411, 411, 411, + 411, 412, 414, 416, 418, 419, 420, 421, 422, 423, + 424, 426, 428, 429, 431, 432, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 449, 450, 451, 452, 453, 454, 455, 456, 457, 459, + 461, 462, 464, 465, 466, 468, 469, 470, 471, 472, + 474, 476, 478, 479, 481, 483, 485, 486, 488, 489, + 490, 491, 493, 494, 495, 497, 498, 499, 501, 503, + 505, 507, 509, 511, 512, 513, 514, 515, 516, 517, + 519, 520, 521, 523, 525, 526, 528, 529, 530, 531, + + 533, 534, 535, 536, 537, 538, 540, 541, 542, 544, + 545, 546, 548, 549, 550, 552, 554, 555, 557, 558, + 559, 561, 563, 565, 567, 568, 569, 571, 573, 574, + 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, + 588, 589, 590, 592, 592 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 8, 9, 10, 1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, + 23, 23, 23, 23, 23, 24, 24, 25, 26, 27, + 28, 29, 30, 1, 31, 31, 31, 31, 32, 33, + 34, 34, 34, 34, 34, 35, 34, 34, 34, 34, + 34, 34, 34, 34, 36, 34, 34, 37, 34, 34, + 38, 39, 40, 41, 42, 1, 43, 44, 45, 46, + + 47, 48, 49, 50, 51, 34, 52, 53, 54, 55, + 56, 57, 34, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[71] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 5, 6, 1, 1, 1, 1, 1, 3, + 6, 6, 6, 7, 7, 7, 7, 1, 3, 1, + 1, 7, 5, 5, 6, 6, 6, 5, 7, 7, + 7, 7, 7, 7, 8, 7, 7, 8, 7, 8, + 7, 8, 7, 8, 7, 7, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[457] = + { 0, + 0, 69, 79, 0, 149, 0, 810, 809, 217, 218, + 811, 814, 220, 814, 233, 782, 219, 781, 217, 769, + 814, 814, 779, 213, 814, 223, 233, 238, 247, 240, + 781, 814, 45, 777, 46, 814, 0, 234, 814, 814, + 776, 742, 744, 235, 221, 249, 239, 745, 225, 247, + 201, 248, 238, 753, 264, 269, 191, 261, 749, 814, + 253, 814, 814, 326, 814, 814, 814, 0, 814, 751, + 814, 814, 0, 814, 814, 814, 814, 776, 335, 814, + 341, 347, 814, 222, 814, 300, 814, 814, 814, 296, + 303, 814, 814, 814, 814, 814, 780, 814, 775, 333, + + 814, 814, 814, 337, 369, 351, 389, 229, 323, 0, + 397, 326, 342, 814, 766, 814, 814, 814, 765, 0, + 370, 753, 814, 731, 743, 730, 745, 744, 731, 346, + 724, 729, 337, 228, 725, 722, 725, 722, 728, 718, + 368, 365, 722, 721, 721, 711, 726, 725, 383, 727, + 386, 714, 358, 320, 718, 714, 716, 709, 390, 714, + 706, 267, 712, 814, 814, 449, 814, 0, 714, 0, + 814, 438, 0, 814, 444, 0, 814, 814, 446, 814, + 449, 452, 814, 443, 814, 814, 814, 705, 717, 712, + 700, 698, 18, 397, 709, 711, 711, 705, 705, 700, + + 696, 693, 701, 704, 0, 699, 689, 697, 697, 689, + 690, 0, 693, 690, 691, 0, 679, 678, 686, 672, + 673, 679, 680, 675, 668, 670, 672, 679, 665, 663, + 663, 665, 662, 673, 672, 662, 666, 661, 655, 668, + 670, 659, 660, 471, 502, 468, 538, 475, 479, 366, + 347, 0, 658, 0, 0, 650, 648, 656, 645, 650, + 644, 650, 648, 0, 0, 653, 0, 642, 641, 638, + 642, 0, 648, 648, 633, 638, 0, 0, 633, 648, + 637, 635, 645, 640, 635, 626, 624, 625, 622, 634, + 624, 628, 633, 632, 623, 0, 440, 627, 619, 624, + + 623, 610, 0, 610, 622, 613, 406, 0, 425, 0, + 814, 0, 0, 625, 611, 612, 617, 616, 615, 610, + 0, 0, 605, 0, 613, 0, 610, 611, 609, 598, + 594, 597, 609, 591, 605, 604, 581, 593, 580, 0, + 588, 566, 567, 544, 530, 536, 531, 533, 0, 0, + 520, 0, 531, 522, 0, 525, 523, 506, 506, 519, + 0, 0, 519, 0, 0, 0, 516, 0, 516, 502, + 514, 0, 509, 495, 0, 507, 495, 0, 0, 0, + 510, 0, 0, 484, 495, 488, 493, 486, 485, 0, + 494, 489, 0, 0, 489, 0, 485, 471, 482, 0, + + 476, 464, 464, 475, 472, 0, 471, 471, 0, 469, + 456, 0, 468, 462, 0, 0, 462, 0, 448, 449, + 0, 0, 0, 0, 429, 445, 0, 0, 437, 423, + 0, 403, 383, 382, 371, 386, 0, 0, 358, 354, + 247, 172, 0, 814, 586, 594, 602, 610, 614, 618, + 622, 628, 634, 638, 640, 642 + } ; + +static yyconst short int yy_def[457] = + { 0, + 444, 1, 444, 3, 444, 5, 445, 445, 446, 446, + 444, 444, 444, 444, 444, 444, 447, 444, 444, 448, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 449, 449, 444, 444, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 444, + 444, 444, 444, 444, 444, 444, 444, 450, 444, 450, + 444, 444, 451, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 447, 444, 452, 444, 444, 444, 448, + 453, 444, 444, 444, 444, 444, 444, 444, 444, 444, + + 444, 444, 444, 444, 444, 444, 444, 444, 444, 454, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 449, + 447, 448, 444, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 444, 444, 444, 444, 450, 450, 451, + 444, 447, 455, 444, 448, 456, 444, 444, 444, 444, + 444, 444, 444, 454, 444, 444, 444, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 450, 447, 447, 448, 448, 444, 444, 444, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 450, 447, 245, 448, 247, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 450, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 450, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 0, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444 + } ; + +static yyconst short int yy_nxt[885] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 12, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, + 37, 37, 37, 37, 38, 37, 37, 39, 12, 40, + 41, 37, 42, 43, 44, 45, 46, 47, 48, 37, + 49, 37, 50, 37, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 37, 37, 37, 60, 61, 62, 63, + 64, 115, 116, 118, 119, 64, 257, 258, 65, 66, + 66, 67, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + + 66, 66, 66, 66, 66, 66, 66, 66, 66, 68, + 68, 68, 68, 68, 68, 68, 66, 69, 66, 66, + 68, 68, 68, 68, 70, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 66, 66, 66, 66, 71, + 71, 72, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 73, + 73, 73, 73, 73, 73, 73, 71, 71, 71, 71, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 71, 71, 71, 71, 77, + 77, 79, 80, 81, 81, 81, 79, 85, 88, 93, + 85, 443, 78, 78, 81, 80, 82, 82, 82, 81, + 94, 95, 121, 145, 89, 159, 122, 146, 98, 160, + 96, 97, 99, 101, 100, 100, 100, 86, 102, 104, + 86, 111, 111, 111, 183, 103, 104, 130, 105, 105, + 106, 107, 141, 200, 112, 113, 131, 126, 107, 142, + 164, 108, 109, 110, 127, 132, 107, 128, 201, 183, + 129, 137, 112, 107, 138, 149, 139, 143, 150, 108, + + 113, 133, 144, 134, 147, 442, 135, 109, 174, 148, + 110, 161, 136, 152, 153, 156, 162, 240, 157, 241, + 165, 172, 172, 154, 175, 175, 155, 166, 80, 81, + 81, 81, 166, 158, 91, 167, 79, 80, 81, 81, + 81, 79, 81, 80, 81, 81, 81, 81, 81, 80, + 82, 82, 82, 81, 100, 100, 100, 183, 100, 100, + 100, 185, 229, 173, 179, 180, 176, 180, 179, 180, + 104, 180, 106, 106, 106, 183, 185, 230, 85, 179, + 180, 311, 107, 179, 180, 180, 185, 198, 104, 180, + 105, 105, 106, 194, 185, 199, 441, 107, 195, 311, + + 107, 311, 440, 108, 109, 181, 227, 181, 86, 210, + 182, 182, 182, 208, 85, 107, 104, 211, 111, 111, + 111, 108, 209, 228, 212, 219, 311, 439, 107, 109, + 438, 112, 113, 220, 223, 235, 224, 174, 221, 259, + 236, 437, 436, 107, 86, 225, 85, 260, 237, 112, + 166, 80, 81, 81, 81, 166, 174, 113, 167, 244, + 244, 435, 248, 91, 248, 246, 246, 249, 249, 249, + 182, 182, 182, 182, 182, 182, 86, 250, 251, 85, + 174, 434, 91, 433, 180, 347, 180, 432, 431, 309, + 309, 430, 307, 307, 348, 250, 249, 249, 249, 180, + + 249, 249, 249, 251, 180, 429, 91, 428, 427, 86, + 85, 180, 426, 180, 425, 424, 423, 422, 421, 420, + 419, 418, 417, 308, 308, 308, 180, 416, 415, 414, + 413, 180, 308, 308, 308, 412, 411, 410, 409, 408, + 86, 407, 406, 405, 308, 308, 308, 308, 308, 308, + 174, 404, 403, 402, 401, 400, 399, 398, 397, 310, + 310, 310, 396, 395, 394, 393, 392, 391, 310, 310, + 310, 390, 389, 388, 387, 386, 91, 385, 384, 383, + 310, 310, 310, 310, 310, 310, 74, 74, 74, 74, + 74, 74, 74, 74, 76, 76, 76, 76, 76, 76, + + 76, 76, 84, 382, 84, 84, 84, 84, 84, 84, + 90, 381, 90, 380, 90, 90, 90, 90, 120, 120, + 120, 120, 168, 168, 168, 168, 170, 170, 170, 170, + 84, 84, 84, 379, 378, 84, 90, 90, 90, 377, + 376, 90, 184, 184, 245, 245, 247, 247, 375, 374, + 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, + 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, + 353, 352, 351, 350, 349, 346, 345, 344, 343, 342, + 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, + 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, + + 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, + 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, + 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, + 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, + 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, + 266, 265, 264, 263, 262, 261, 256, 255, 254, 253, + 252, 243, 242, 239, 238, 234, 233, 232, 231, 226, + 222, 218, 217, 216, 215, 214, 213, 207, 206, 205, + 204, 203, 202, 197, 196, 193, 192, 191, 190, 189, + 188, 91, 187, 186, 178, 177, 171, 169, 163, 151, + + 140, 125, 124, 123, 117, 114, 92, 91, 87, 83, + 444, 75, 75, 11, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444 + } ; + +static yyconst short int yy_chk[885] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 33, 33, 35, 35, 2, 193, 193, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, + 10, 13, 13, 13, 13, 13, 13, 17, 19, 24, + 84, 442, 9, 10, 15, 15, 15, 15, 15, 15, + 24, 26, 38, 51, 19, 57, 38, 51, 27, 57, + 26, 26, 27, 28, 27, 27, 27, 17, 28, 30, + 84, 30, 30, 30, 108, 28, 29, 45, 29, 29, + 29, 30, 49, 134, 30, 30, 45, 44, 29, 49, + 61, 29, 29, 29, 44, 45, 30, 44, 134, 108, + 44, 47, 30, 29, 47, 53, 47, 50, 53, 29, + + 30, 46, 50, 46, 52, 441, 46, 29, 90, 52, + 29, 58, 46, 55, 55, 56, 58, 162, 56, 162, + 61, 86, 86, 55, 91, 91, 55, 64, 64, 64, + 64, 64, 64, 56, 90, 64, 79, 79, 79, 79, + 79, 79, 81, 81, 81, 81, 81, 81, 82, 82, + 82, 82, 82, 82, 100, 100, 100, 109, 104, 104, + 104, 112, 154, 86, 100, 100, 91, 100, 104, 104, + 106, 104, 106, 106, 106, 109, 113, 154, 121, 100, + 100, 251, 106, 104, 104, 100, 112, 133, 105, 104, + 105, 105, 105, 130, 113, 133, 440, 106, 130, 251, + + 105, 250, 439, 105, 105, 107, 153, 107, 121, 142, + 107, 107, 107, 141, 307, 105, 111, 142, 111, 111, + 111, 105, 141, 153, 142, 149, 250, 436, 111, 105, + 435, 111, 111, 149, 151, 159, 151, 309, 149, 194, + 159, 434, 433, 111, 307, 151, 172, 194, 159, 111, + 166, 166, 166, 166, 166, 166, 175, 111, 166, 172, + 172, 432, 179, 309, 179, 175, 175, 179, 179, 179, + 181, 181, 181, 182, 182, 182, 172, 184, 184, 244, + 246, 430, 175, 429, 182, 297, 182, 426, 425, 246, + 246, 420, 244, 244, 297, 184, 248, 248, 248, 182, + + 249, 249, 249, 184, 182, 419, 246, 417, 414, 244, + 245, 249, 413, 249, 411, 410, 408, 407, 405, 404, + 403, 402, 401, 245, 245, 245, 249, 399, 398, 397, + 395, 249, 245, 245, 245, 392, 391, 389, 388, 387, + 245, 386, 385, 384, 245, 245, 245, 245, 245, 245, + 247, 381, 377, 376, 374, 373, 371, 370, 369, 247, + 247, 247, 367, 363, 360, 359, 358, 357, 247, 247, + 247, 356, 354, 353, 351, 348, 247, 347, 346, 345, + 247, 247, 247, 247, 247, 247, 445, 445, 445, 445, + 445, 445, 445, 445, 446, 446, 446, 446, 446, 446, + + 446, 446, 447, 344, 447, 447, 447, 447, 447, 447, + 448, 343, 448, 342, 448, 448, 448, 448, 449, 449, + 449, 449, 450, 450, 450, 450, 451, 451, 451, 451, + 452, 452, 452, 341, 339, 452, 453, 453, 453, 338, + 337, 453, 454, 454, 455, 455, 456, 456, 336, 335, + 334, 333, 332, 331, 330, 329, 328, 327, 325, 323, + 320, 319, 318, 317, 316, 315, 314, 306, 305, 304, + 302, 301, 300, 299, 298, 295, 294, 293, 292, 291, + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 276, 275, 274, 273, 271, 270, 269, 268, + + 266, 263, 262, 261, 260, 259, 258, 257, 256, 253, + 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, + 223, 222, 221, 220, 219, 218, 217, 215, 214, 213, + 211, 210, 209, 208, 207, 206, 204, 203, 202, 201, + 200, 199, 198, 197, 196, 195, 192, 191, 190, 189, + 188, 169, 163, 161, 160, 158, 157, 156, 155, 152, + 150, 148, 147, 146, 145, 144, 143, 140, 139, 138, + 137, 136, 135, 132, 131, 129, 128, 127, 126, 125, + 124, 122, 119, 115, 99, 97, 78, 70, 59, 54, + + 48, 43, 42, 41, 34, 31, 23, 20, 18, 16, + 11, 8, 7, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_scope_lval; +extern std::string cl_var_lval; +extern std::string cl_func_lval; + +std::vector currentScope; + +bool setLexerInput(const std::string &in, const std::map &ignoreTokens); + +std::string getCurrentScope(); +void printScopeName(); +void cl_scope_lex_clean(); +void cl_scope_less(int count); + +//we keep a very primitive map with only symbol name +//that we encountered so far +std::map g_symbols; +std::map g_macros; + +static std::map g_ignoreList; + +bool isaTYPE(char *string); +bool isaMACRO(char *string); +bool isignoredToken(char *string); + +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(isaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(isaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else if(isignoredToken(yytext)){\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_scope_lval = yytext;\ + cl_var_lval = yytext;\ + cl_func_lval = yytext;\ + return(x);} + +#define PREPR 1 + +#define WRAP_PREP 2 + +#define CPP_COMMENT 3 + +#define C_COMMENT 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 814 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + BEGIN C_COMMENT; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{ + BEGIN CPP_COMMENT; + } + YY_BREAK +case 3: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 4: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 5: +YY_RULE_SETUP +{ + WHITE_RETURN('\n'); + } + YY_BREAK +case 6: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_AUTO);} + YY_BREAK +case 7: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_BREAK);} + YY_BREAK +case 8: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CASE);} + YY_BREAK +case 9: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CHAR);} + YY_BREAK +case 10: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONST);} + YY_BREAK +case 11: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONTINUE);} + YY_BREAK +case 12: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DEFAULT);} + YY_BREAK +case 13: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_DEFINE);} + YY_BREAK +case 14: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_OPDEFINED);} + YY_BREAK +case 15: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DO);} + YY_BREAK +case 16: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DOUBLE);} + YY_BREAK +case 17: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ELIF);} + YY_BREAK +case 18: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_ELSE);} + YY_BREAK +case 19: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ENDIF);} + YY_BREAK +case 20: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_ENUM);} + YY_BREAK +case 21: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ERROR);} + YY_BREAK +case 22: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_EXTERN);} + YY_BREAK +case 23: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FLOAT);} + YY_BREAK +case 24: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FOR);} + YY_BREAK +case 25: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_GOTO);} + YY_BREAK +case 26: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_IF);} + YY_BREAK +case 27: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFDEF);} + YY_BREAK +case 28: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFNDEF);} + YY_BREAK +case 29: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_INCLUDE); } + YY_BREAK +case 30: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_INT);} + YY_BREAK +case 31: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_LINE);} + YY_BREAK +case 32: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_LONG);} + YY_BREAK +case 33: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_PRAGMA);} + YY_BREAK +case 34: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_REGISTER);} + YY_BREAK +case 35: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_RETURN);} + YY_BREAK +case 36: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SHORT);} + YY_BREAK +case 37: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIGNED);} + YY_BREAK +case 38: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIZEOF);} + YY_BREAK +case 39: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STATIC);} + YY_BREAK +case 40: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STRUCT);} + YY_BREAK +case 41: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SWITCH);} + YY_BREAK +case 42: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_TYPEDEF);} + YY_BREAK +case 43: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_UNDEF);} + YY_BREAK +case 44: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNION);} + YY_BREAK +case 45: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNSIGNED);} + YY_BREAK +case 46: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOID);} + YY_BREAK +case 47: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOLATILE);} + YY_BREAK +case 48: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_WHILE);} + YY_BREAK +case 49: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CLASS);} + YY_BREAK +case 50: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NAMESPACE);} + YY_BREAK +case 51: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DELETE);} + YY_BREAK +case 52: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_FRIEND);} + YY_BREAK +case 53: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_INLINE);} + YY_BREAK +case 54: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NEW);} + YY_BREAK +case 55: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OPERATOR);} + YY_BREAK +case 56: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OVERLOAD);} + YY_BREAK +case 57: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PROTECTED);} + YY_BREAK +case 58: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PRIVATE);} + YY_BREAK +case 59: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PUBLIC);} + YY_BREAK +case 60: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_THIS);} + YY_BREAK +case 61: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_VIRTUAL);} + YY_BREAK +case 62: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TEMPLATE);} + YY_BREAK +case 63: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TYPENAME);} + YY_BREAK +case 64: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} + YY_BREAK +case 65: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_STATIC_CAST);} + YY_BREAK +case 66: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CONST_CAST);} + YY_BREAK +case 67: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} + YY_BREAK +case 68: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_USING);} + YY_BREAK +case 69: +YY_RULE_SETUP +{IDENTIFIER_RETURN();} + YY_BREAK +case 70: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_INTEGERconstant);} + YY_BREAK +case 71: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_OCTALconstant);} + YY_BREAK +case 72: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_HEXconstant);} + YY_BREAK +case 73: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_FLOATINGconstant);} + YY_BREAK +case 74: +YY_RULE_SETUP +{ + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + YY_BREAK +case 75: +YY_RULE_SETUP +{ + LITERAL_RETURN(LE_STRINGliteral);} + YY_BREAK +case 76: +YY_RULE_SETUP +{PPOP_RETURN(LE_LP);} + YY_BREAK +case 77: +YY_RULE_SETUP +{PPOP_RETURN(LE_RP);} + YY_BREAK +case 78: +YY_RULE_SETUP +{PPOP_RETURN(LE_COMMA);} + YY_BREAK +case 79: +YY_RULE_SETUP +{BEGIN PREPR;} + YY_BREAK +case 80: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LC);} + YY_BREAK +case 81: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RC);} + YY_BREAK +case 82: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LB);} + YY_BREAK +case 83: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RB);} + YY_BREAK +case 84: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DOT);} + YY_BREAK +case 85: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_AND);} + YY_BREAK +case 86: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_STAR);} + YY_BREAK +case 87: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PLUS);} + YY_BREAK +case 88: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MINUS);} + YY_BREAK +case 89: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NEGATE);} + YY_BREAK +case 90: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NOT);} + YY_BREAK +case 91: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DIV);} + YY_BREAK +case 92: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MOD);} + YY_BREAK +case 93: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LT);} + YY_BREAK +case 94: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_GT);} + YY_BREAK +case 95: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_XOR);} + YY_BREAK +case 96: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PIPE);} + YY_BREAK +case 97: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_QUESTION);} + YY_BREAK +case 98: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_COLON);} + YY_BREAK +case 99: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_SEMICOLON);} + YY_BREAK +case 100: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_ASSIGN);} + YY_BREAK +case 101: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DOTstar);} + YY_BREAK +case 102: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_CLCL);} + YY_BREAK +case 103: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROW);} + YY_BREAK +case 104: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROWstar);} + YY_BREAK +case 105: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ICR);} + YY_BREAK +case 106: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DECR);} + YY_BREAK +case 107: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LS);} + YY_BREAK +case 108: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RS);} + YY_BREAK +case 109: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LE);} + YY_BREAK +case 110: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_GE);} + YY_BREAK +case 111: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_EQ);} + YY_BREAK +case 112: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_NE);} + YY_BREAK +case 113: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDAND);} + YY_BREAK +case 114: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_OROR);} + YY_BREAK +case 115: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MULTassign);} + YY_BREAK +case 116: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DIVassign);} + YY_BREAK +case 117: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MODassign);} + YY_BREAK +case 118: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_PLUSassign);} + YY_BREAK +case 119: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MINUSassign);} + YY_BREAK +case 120: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LSassign);} + YY_BREAK +case 121: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RSassign);} + YY_BREAK +case 122: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDassign);} + YY_BREAK +case 123: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ERassign);} + YY_BREAK +case 124: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ORassign);} + YY_BREAK +case 125: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ELLIPSIS);} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PREPR): +case YY_STATE_EOF(WRAP_PREP): +case YY_STATE_EOF(CPP_COMMENT): +case YY_STATE_EOF(C_COMMENT): +{ + //reset lexer + yyterminate(); + } + YY_BREAK +case 126: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 127: +YY_RULE_SETUP +{ + defineFound = false; + cl_scope_lineno++; + BEGIN INITIAL; + } + YY_BREAK +case 128: +YY_RULE_SETUP +{ + BEGIN WRAP_PREP; + } + YY_BREAK +case 129: +YY_RULE_SETUP +{ + defineFound = true; + } + YY_BREAK +case 130: +YY_RULE_SETUP +{ + cl_scope_lineno++; + BEGIN PREPR; + } + YY_BREAK +case 131: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } + YY_BREAK +case 132: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } + YY_BREAK +case 133: +YY_RULE_SETUP +{} + YY_BREAK +case 134: +YY_RULE_SETUP +{} + YY_BREAK +case 135: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 136: +YY_RULE_SETUP +{} + YY_BREAK +case 137: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 138: +YY_RULE_SETUP +{} + YY_BREAK +case 139: +YY_RULE_SETUP +ECHO; + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 444); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +bool isaTYPE(char *string) +{ + return g_symbols.find(string) != g_symbols.end(); +} + +bool isignoredToken(char *string) +{ + return g_ignoreList.find(string) != g_ignoreList.end(); +} + +bool isaMACRO(char *string) +{ + return g_macros.find(string) != g_macros.end(); +} + +void cl_scope_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_scope_lineno = 1; + currentScope.clear(); + g_symbols.clear(); + g_macros.clear(); +} + +/** + * scope util functions + */ +void printScopeName() +{ + /* + if(currentScope.empty()) + { + printf("%d: current scope is global scope\n", cl_scope_lineno ); + } + else + { + printf("%d: current scope is %s\n", cl_scope_lineno, getCurrentScope().c_str()); + } + */ +} + +void increaseScope() +{ + static int value = 0; + std::string scopeName("__anon_"); + + char buf[100]; + sprintf(buf, "%d", value++); + scopeName += buf; + currentScope.push_back(scopeName); +} + +std::string getCurrentScope() +{ + //format scope name + std::string scope; + if(currentScope.empty()){ + return ""; + } + + std::vector tmpscope(currentScope); + + while( tmpscope.empty() == false ){ + std::string _scope = tmpscope.front(); + tmpscope.erase(tmpscope.begin()); + + if(_scope.find("__anon_") == (size_t)-1 && _scope.empty() == false){ + scope += _scope; + scope += "::"; + } + } + + //remove the trailing '::' + scope.erase(scope.find_last_not_of(":")+1); + return scope; +} + +/*******************************************************************/ +bool setLexerInput(const std::string &in, const std::map &ignoreTokens) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + g_ignoreList = ignoreTokens; + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} + +void cl_scope_less(int count){ + yyless(count); +} diff --git a/CodeLite/cpp_lexer.h b/CodeLite/cpp_lexer.h new file mode 100644 index 0000000000..bc0d97a2cf --- /dev/null +++ b/CodeLite/cpp_lexer.h @@ -0,0 +1,89 @@ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 diff --git a/CodeLite/cpp_scanner.cpp b/CodeLite/cpp_scanner.cpp new file mode 100644 index 0000000000..32df4e9694 --- /dev/null +++ b/CodeLite/cpp_scanner.cpp @@ -0,0 +1,65 @@ +#include "precompiled_header.h" +#include "cpp_scanner.h" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +CppScanner::CppScanner() +: m_curr(0) +{ + m_data = NULL; + m_pcurr = NULL; + m_keepComments = 0; + m_returnWhite = 0; + m_comment = wxEmptyString; +} + +CppScanner::~CppScanner(void) +{ + delete [] m_data; +} + +int CppScanner::LexerInput(char *buf, int max_size) +{ + if( !m_data ) + return 0; + + memset(buf, 0, max_size); + char *pendData = m_data + strlen(m_data); + int n = (max_size < (pendData - m_pcurr)) ? max_size : (pendData - m_pcurr); + if(n > 0) + { + memcpy(buf, m_pcurr, n); + m_pcurr += n; + } + return n; +} + +void CppScanner::SetText(const char* data) +{ + // release previous buffer + Reset(); + + m_data = new char[strlen(data)+1]; + strcpy(m_data, data); + m_pcurr = m_data; +} + +void CppScanner::Reset() +{ + if(m_data) + { + delete [] m_data; + m_data = NULL; + m_pcurr = NULL; + m_curr = 0; + } + + // Notify lex to restart its buffer + yy_flush_buffer(yy_current_buffer); + m_comment = wxEmptyString; + yylineno = 1; +} diff --git a/CodeLite/cpp_scanner.h b/CodeLite/cpp_scanner.h new file mode 100644 index 0000000000..1b2ea767f4 --- /dev/null +++ b/CodeLite/cpp_scanner.h @@ -0,0 +1,47 @@ +#ifndef CODELITE_CPPSCANNER_H +#define CODELITE_CPPSCANNER_H + +#include "FlexLexer.h" +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +class WXDLLIMPEXP_CL CppScanner : public flex::yyFlexLexer +{ +public: + CppScanner(); + ~CppScanner(void); + + /// Override the LexerInput function + int LexerInput(char *buf, int max_size); + void SetText(const char* data); + void Reset(); + + + /// Note about comment and line number: + /// If the last text consumed is a comment, the line number + /// returned is the line number of the last line of the comment + /// incase the comment spans over number of lines + /// (i.e. /* ... */ comment style) + + const int& LineNo() const { return yylineno; } + inline void ClearComment() { m_comment = wxEmptyString; } + inline const wxChar* GetComment() const { return m_comment.GetData(); } + inline void KeepComment(const int& keep) { m_keepComments = keep; } + inline void ReturnWhite(const int& rw) { m_returnWhite = rw; } + +private: + char *m_data; + char *m_pcurr; + int m_total; + int m_curr; +}; + +typedef SmartPtr CppScannerPtr; +#endif // CODELITE_CPPSCANNER_H diff --git a/CodeLite/ctags_manager.cpp b/CodeLite/ctags_manager.cpp new file mode 100644 index 0000000000..0837100bcb --- /dev/null +++ b/CodeLite/ctags_manager.cpp @@ -0,0 +1,1724 @@ +#include "precompiled_header.h" +#include "ctags_manager.h" +#include +#include +#include +#include +#include "dirtraverser.h" +#include "wx/tokenzr.h" +#include "wx/filename.h" +#include +#include +#include "cpp_comment_creator.h" +#include "tags_options_data.h" +#include +#include "wx/timer.h" +#include "variable_entry.h" +#include "procutils.h" + +//--------------------------------------------------------------------------- +// Misc + +// Descending sorting function +struct SDescendingSort { + bool operator()(const TagEntryPtr &rStart, const TagEntryPtr &rEnd) { + return rStart->GetName().Cmp(rEnd->GetName()) > 0; + } +}; + +/// Ascending sorting function +struct SAscendingSort { + bool operator()(const TagEntryPtr &rStart, const TagEntryPtr &rEnd) { + return rEnd->GetName().Cmp(rStart->GetName()) > 0; + } +}; + +struct tagParseResult { + TagTreePtr tree; + std::vector *comments; + wxString fileName; +}; + +//--------------------------------------------------------------------------- +// Tag cache entry +//--------------------------------------------------------------------------- +TagCacheEntry::TagCacheEntry(const wxString &query, const std::vector &tags) + : m_query(query) + , m_tags(tags) +{ +} + +TagCacheEntry::~TagCacheEntry() +{ +} + +static int CtagsMgrTimerId = wxNewId(); + +//------------------------------------------------------------------------------ +// CTAGS Manager +//------------------------------------------------------------------------------ +BEGIN_EVENT_TABLE(TagsManager, wxEvtHandler) + EVT_TIMER(CtagsMgrTimerId, TagsManager::OnTimer) +END_EVENT_TABLE() + +TagsManager::TagsManager() : wxEvtHandler() + , m_ctagsPath(wxT("ctags-le")) +#if defined (__WXMSW__) || defined (__WXGTK__) + , m_ctags(NULL) +#endif + , m_canDeleteCtags(true) + , m_timer(NULL) +{ + m_pDb = new TagsDatabase(); + m_pExternalDb = new TagsDatabase(); + +#if defined (__WXMSW__) || defined (__WXGTK__) + m_ctagsCmd = wxT(" --excmd=pattern --sort=no --fields=aKmSsnit --c-kinds=+p --C++-kinds=+p --filter=yes --filter-terminator=\"<>\" "); + m_timer = new wxTimer(this, CtagsMgrTimerId); + m_timer->Start(100); +#else + m_ctagsCmd = wxT(" -f- --excmd=pattern --sort=no --fields=aKmSsnit --c-kinds=+p --C++-kinds=+p "); +#endif + +} + +TagsManager::~TagsManager() +{ + delete m_pDb; + delete m_pExternalDb; + if (m_timer) { + delete m_timer; + } + +#if defined (__WXMSW__) || defined (__WXGTK__) + wxCriticalSectionLocker locker(m_cs); + if (m_canDeleteCtags) { + if (m_ctags) m_ctags->Disconnect(m_ctags->GetUid(), wxEVT_END_PROCESS, wxProcessEventHandler(TagsManager::OnCtagsEnd), NULL, this); + // terminate ctags process + if (m_ctags) m_ctags->Terminate(); + + std::list::iterator it = m_gargabeCollector.begin(); + for (; it != m_gargabeCollector.end(); it++) { + delete (*it); + } + + if (m_gargabeCollector.empty() == false) { + } + m_gargabeCollector.clear(); + } +#endif +} + +void TagsManager::OnTimer(wxTimerEvent &event) +{ + //clean the garbage collector + wxUnusedVar(event); + { + wxCriticalSectionLocker locker(m_cs); + if (m_canDeleteCtags) { + + std::list::iterator it = m_gargabeCollector.begin(); + for (; it != m_gargabeCollector.end(); it++) { + delete (*it); + } + + if (m_gargabeCollector.empty() == false) { + } + m_gargabeCollector.clear(); + } + } +} + +void TagsManager::OpenDatabase(const wxFileName& fileName) +{ + m_pDb->OpenDatabase(fileName); + if (m_pDb->GetVersion() != m_pDb->GetSchemaVersion()) { + m_pDb->RecreateDatabase(); + } +} + +// Currently not in use, maybe in the future?? +TagTreePtr TagsManager::ParseTagsFile(const wxFileName& fp) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + + tagFileInfo info; + tagEntry entry; + wxString tagFileName = fp.GetFullPath(); + const wxCharBuffer fileName = _C(tagFileName); + + tagFile *const file = tagsOpen(fileName.data(), &info); + if ( !file ) { + return TagTreePtr( NULL ); + } + + // Load the records and build a language tree + TagEntry root; + root.SetName(wxT("")); + + TagTreePtr tree( new TagTree(wxT(""), root) ); + while (tagsNext (file, &entry) == TagSuccess) { + TagEntry tag( entry ); + tree->AddEntry(tag); + } + tagsClose(file); + return tree; +} + +void TagsManager::TagFromLine(const wxString& line, TagEntry& tag) +{ + wxString pattern, kind; + wxString strLine = line; + long lineNumber = wxNOT_FOUND; + std::map extFields; + + //get the token name + wxString name = strLine.BeforeFirst(wxT('\t')); + strLine = strLine.AfterFirst(wxT('\t')); + + //get the file name + wxString fileName = strLine.BeforeFirst(wxT('\t')); + strLine = strLine.AfterFirst(wxT('\t')); + + //here we can get two options: + //pattern followed by ;" + //or + //line number followed by ;" + int end = strLine.Find(wxT(";\"")); + if (end == wxNOT_FOUND) { + //invalid pattern found + return; + } + + if (strLine.StartsWith(wxT("/^"))) { + //regular expression pattern found + pattern = strLine.Mid(0, end); + strLine = strLine.Right(strLine.Length() - (end + 2)); + } else { + //line number pattern found, this is usually the case when + //dealing with macros in C++ + pattern = strLine.Mid(0, end); + strLine = strLine.Right(strLine.Length() - (end + 2)); + + pattern = pattern.Trim(); + pattern = pattern.Trim(false); + pattern.ToLong(&lineNumber); + } + + //next is the kind of the token + if (strLine.StartsWith(wxT("\t"))) { + strLine = strLine.AfterFirst(wxT('\t')); + } + + kind = strLine.BeforeFirst(wxT('\t')); + strLine = strLine.AfterFirst(wxT('\t')); + + if (strLine.IsEmpty() == false) { + wxStringTokenizer tkz(strLine, wxT('\t')); + while (tkz.HasMoreTokens()) { + wxString token = tkz.NextToken(); + wxString key = token.BeforeFirst(wxT(':')); + wxString val = token.AfterFirst(wxT(':')); + key = key.Trim(); + key = key.Trim(false); + + val = val.Trim(); + val = val.Trim(false); + if (key == wxT("line") && !val.IsEmpty()) { + val.ToLong(&lineNumber); + } else { + if (key == wxT("enum")) { + //enums are specials, they are not really a scope + //so they should appear when I type: + //enumName:: + //they should be member of their parent (which can be , or class) + val = val.BeforeLast(wxT(':')); + val = val.BeforeLast(wxT(':')); + } + extFields[key] = val; + } + } + } + + kind = kind.Trim(); + name = name.Trim(); + fileName = fileName.Trim(); + pattern = pattern.Trim(); + tag.Create(fileName, name, lineNumber, pattern, kind, extFields); +} + +TagTreePtr TagsManager::ParseSourceFile(const wxFileName& fp, std::vector *comments) +{ + wxString tags; + +#if defined (__WXMSW__) || defined (__WXGTK__) + if ( !m_ctags ) { + return TagTreePtr( NULL ); + } + SourceToTags(fp, tags, m_ctags); +#else + //Mac + SourceToTags2(fp, tags); +#endif + + // return ParseTagsFile(tags, project); + TagTreePtr ttp = TagTreePtr( TreeFromTags(tags) ); + + if ( comments && GetParseComments() ) { + // parse comments + LanguageST::Get()->ParseComments( fp, comments ); + + } + return ttp; +} + +TagTreePtr TagsManager::ParseSourceFile2(const wxFileName& fp, const wxString &tags, std::vector *comments) +{ + // return ParseTagsFile(tags, project); + TagTreePtr ttp = TagTreePtr( TreeFromTags(tags) ); + + if (comments && GetParseComments()) { + // parse comments + LanguageST::Get()->ParseComments(fp, comments); + } + return ttp; +} + +//----------------------------------------------------------- +// Database operations +//----------------------------------------------------------- + +void TagsManager::Store(TagTreePtr tree, const wxFileName& path) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + m_pDb->Store(tree, path); +} + +TagTreePtr TagsManager::Load(const wxFileName& fileName) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + // Incase empty file path is provided, use the current file name + TagTreePtr tree; + try { + wxSQLite3ResultSet rs = m_pDb->SelectTagsByFile(fileName.GetFullPath()); + + // Load the records and build a language tree + TagEntry root; + std::vector rejectedTags; + root.SetName(wxT("")); + tree.Reset( new TagTree(wxT(""), root) ); + while ( rs.NextRow() ) { + TagEntry entry(rs); + tree->AddEntry(entry); + } + rs.Finalize(); + } catch (wxSQLite3Exception& e) { + wxUnusedVar(e); + } + return tree; +} + +/** + * \brief + * \param path + * \param fileName + */ +void TagsManager::Delete(const wxFileName& path, const wxString& fileName) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + m_pDb->DeleteByFileName(path, fileName); +} + +//-------------------------------------------------------- +// Process Handling of CTAGS +//-------------------------------------------------------- + +#if defined (__WXMSW__) || defined (__WXGTK__) +clProcess *TagsManager::StartCtagsProcess() +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + // Run ctags process + wxString cmd; + wxString ctagsCmd; + ctagsCmd << m_options.ToString() << m_ctagsCmd; + + // build the command, we surround ctags name with double quatations + cmd << wxT("\"") << m_ctagsPath.GetFullPath() << wxT("\"") << ctagsCmd; + clProcess* process; + + process = new clProcess(wxNewId(), cmd); + + // Launch it! + process->Start(); + m_processes[process->GetPid()] = process; + + if ( process->GetPid() <= 0 ) { + m_ctags = NULL; + return NULL; + } + + // attach the termination event to the tags manager class + process->Connect(process->GetUid(), wxEVT_END_PROCESS, wxProcessEventHandler(TagsManager::OnCtagsEnd), NULL, this); + m_ctags = process; + return process; +} + +void TagsManager::RestartCtagsProcess() +{ + clProcess *oldProc(NULL); + oldProc = m_ctags; + + if ( !oldProc ) { + return ; + } + + // no need to call StartCtagsProcess(), since it will be called automatically + // by the termination handler OnCtagsEnd() + oldProc->Terminate(); +} +#endif + +void TagsManager::SetCtagsPath(const wxString& path) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + m_ctagsPath = wxFileName(path, wxT("ctags-le")); +} + +#if defined (__WXMSW__) || defined (__WXGTK__) +void TagsManager::OnCtagsEnd(wxProcessEvent& event) +{ + //----------------------------------------------------------- + // This event handler is a must if you wish to delete + // the process and prevent memory leaks + // In addition, I implemented here some kind of a watchdog + // mechanism: if ctags process terminated abnormally, it will + // be restarted automatically by this function (unless the + // termination of it was from OnClose() function, then we + // choose to ignore the restart) + //----------------------------------------------------------- + + // Which ctags process died? + std::map::iterator iter = m_processes.find(event.GetPid()); + if ( iter != m_processes.end()) { + clProcess *proc = iter->second; + proc->Disconnect(proc->GetUid(), wxEVT_END_PROCESS, wxProcessEventHandler(TagsManager::OnCtagsEnd), NULL, this); + // start new process + StartCtagsProcess(); + + { + wxCriticalSectionLocker locker(m_cs); + // delete the one that just terminated + if (m_canDeleteCtags) { + delete proc; + //also delete all old ctags that might be in the garbage collector + std::list::iterator it = m_gargabeCollector.begin(); + for (; it != m_gargabeCollector.end(); it++) { + delete (*it); + } + m_gargabeCollector.clear(); + } else + m_gargabeCollector.push_back(proc); + } + + // remove it from the map + m_processes.erase(iter); + } +} +#endif + +//--------------------------------------------------------------------- +// Parsing +//--------------------------------------------------------------------- +void TagsManager::SourceToTags(const wxFileName& source, wxString& tags, clProcess *ctags) +{ + wxASSERT_MSG(wxThread::IsMain(), wxT("SourceToTags can be called only from the main thread!")); + +#if defined (__WXMSW__) || defined (__WXGTK__) + if (ctags == NULL) { + ctags = m_ctags; + } + + wxOutputStream *out = ctags->GetOutputStream(); + if ( out ) { + wxString cmd(source.GetFullPath()); + cmd += wxT("\n"); + + const wxCharBuffer pWriteData = _C(cmd); + out->Write(pWriteData.data(), cmd.Length()); + } else { + return; + } + + static int maxPeeks = 1000; + int count = 0; + + tags.Empty(); + while (true) { + if (ctags->IsInputAvailable()) { + wxTextInputStream in(*ctags->GetInputStream()); + tags << in.GetChar(); + if (tags.EndsWith(wxT("<>"))) + break; + count = 0; + } else { + count++; + wxMilliSleep(1); + if (count >= maxPeeks) { + RestartCtagsProcess(); + tags.Empty(); + break; + } + } + } +#else + //On mac use the second version of tags processing + wxUnusedVar(ctags); + SourceToTags2(source, tags); + return; +#endif +} + +void TagsManager::SourceToTags2(const wxFileName &fileName, wxString &tags) +{ + //second version of soruce->tags + //this function can be called only from the main thread + wxString cmd; + + // Get ctags flags from the map + wxString ctagsCmd; + ctagsCmd << m_options.ToString() << m_ctagsCmd; + + // build the command, we surround ctags name with double quatations + cmd << wxT("\"") << m_ctagsPath.GetFullPath() << wxT("\"") << ctagsCmd << wxT(" \"") << fileName.GetFullPath() << wxT("\""); + + wxArrayString output; + ProcUtils::ExecuteCommand(cmd, output, wxEXEC_SYNC); + + tags.Clear(); + for (size_t i=0; i")); + + TagTreePtr tree( new TagTree(wxT(""), root) ); + + wxStringTokenizer tkz(tags, wxT("\n")); + while (tkz.HasMoreTokens()) { + TagEntry tag; + wxString line = tkz.NextToken(); + + line = line.Trim(); + line = line.Trim(false); + if (line.IsEmpty()) + continue; + + // Construct the tag from the line + TagFromLine(line, tag); + + // Add the tag to the tree, locals are not added to the + // tree + if ( tag.GetKind() != wxT("local") ) + tree->AddEntry(tag); + } + return tree; +} + +bool TagsManager::IsValidCtagsFile(const wxFileName &filename) const +{ + bool is_ok(false); + // Put a request on the parsing thread to update the GUI tree & the database + wxString filespec = GetCtagsOptions().GetFileSpec(); + + // do we support files without an extension? + if (GetCtagsOptions().GetFlags() & CC_PARSE_EXT_LESS_FILES && filename.GetExt().IsEmpty()) + return true; + + //if the file spec matches the current file, notify ctags + wxStringTokenizer tkz(filespec, wxT(";")); + while (tkz.HasMoreTokens()) { + wxString spec = tkz.NextToken(); + if (wxMatchWild(spec, filename.GetFullName())) { + is_ok = true; + break; + } + } // while(tkz.HasMoreTokens()) + return is_ok; +} + +//----------------------------------------------------------------------------- +// >>>>>>>>>>>>>>>>>>>>> Code Completion API START +//----------------------------------------------------------------------------- + +void TagsManager::TagsByScopeAndName(const wxString& scope, const wxString &name, std::vector &tags, SearchFlags flags) +{ + wxString sql; + std::vector derivationList; + //add this scope as well to the derivation list + derivationList.push_back(scope); + GetDerivationList(scope, derivationList); + + //make enough room for max of 500 elements in the vector + tags.reserve(500); + wxString tmpName(name); + tmpName.Replace(wxT("_"), wxT("^_")); + + for (size_t i=0; i &tags) +{ + wxString sql; + std::vector derivationList; + //add this scope as well to the derivation list + derivationList.push_back(scope); + GetDerivationList(scope, derivationList); + + //make enough room for max of 500 elements in the vector + tags.reserve(500); + + for (size_t i=0; i &candidates) +{ + candidates.clear(); + wxString path, tmp; + wxString typeName, typeScope; + + //remove the word from the expression + wxString expression(expr); + + // Trim whitespace from right and left + static wxString trimString(wxT("!<>=(){};\r\n\t\v ")); + + expression.erase(0, expression.find_first_not_of(trimString)); + expression.erase(expression.find_last_not_of(trimString)+1); + tmp = expression; + expression.EndsWith(word, &tmp); + expression = tmp; + + wxString funcSig; + std::vector additionlScopes; //from 'using namespace XXX;' statements + + wxString scope; + wxString scopeName = LanguageST::Get()->GetScopeName(text, &additionlScopes); + TagEntryPtr funcTag = FunctionFromFileLine(fileName, lineno); + if (funcTag) { + funcSig = funcTag->GetSignature(); + } + + if (expression.IsEmpty()) { + //collect all the tags from the current scope, and + //from the global scope + scope = LanguageST::Get()->GetScope(text); + std::vector tmpCandidates; + GetGlobalTags(word, tmpCandidates); + GetLocalTags(word, scope, tmpCandidates); + GetLocalTags(word, funcSig, tmpCandidates); + TagsByScopeAndName(scopeName, word, tmpCandidates); + for (size_t i=0; i")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + std::vector tmpCandidates; + TagsByScope(scope, tmpCandidates); + RemoveDuplicates(tmpCandidates, candidates); + } + return true; +} + +bool TagsManager::AutoCompleteCandidates(const wxFileName &fileName, int lineno, const wxString& expr, const wxString& text, std::vector& candidates) +{ + candidates.clear(); + wxString path; + wxString typeName, typeScope; + + wxString expression(expr); + static wxString trimLeftString(wxT("{};\r\n\t\v ")); + static wxString trimRightString(wxT("({};\r\n\t\v ")); + expression.erase(0, expression.find_first_not_of(trimLeftString)); + expression.erase(expression.find_last_not_of(trimRightString)+1); + + bool res = ProcessExpression(fileName, lineno, expression, text, typeName, typeScope); + if (!res) { + return false; + } + + //load all tags from the database that matches typeName & typeScope + wxString scope; + if (typeScope == wxT("")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + //this function will retrieve the ineherited tags as well + TagsByScope(scope, candidates); + return candidates.empty() == false; +} + +void TagsManager::RemoveDuplicates(std::vector& src, std::vector& target) +{ + for (size_t i=0; iGetName() != target.at(target.size()-1)->GetName()) { + target.push_back(src.at(i)); + } + } + } +} + +void TagsManager::RemoveDuplicatesTips(std::vector& src, std::vector& target) +{ + for (size_t i=0; iGetSignature() != target.at(target.size()-1)->GetSignature()) { + target.push_back(src.at(i)); + } + } + } +} + +void TagsManager::GetGlobalTags(const wxString &name, std::vector &tags, SearchFlags flags) +{ + wxString sql, tmpName; + + //make enough room for max of 500 elements in the vector + tags.reserve(500); + tmpName = name; + if (flags == PartialMatch) { + tmpName.Replace(wxT("_"), wxT("^_")); + sql << wxT("select * from tags where parent='' and name like '") << tmpName << wxT("%%' ESCAPE '^' "); + } else { + sql << wxT("select * from tags where parent='' and name ='") << tmpName << wxT("' "); + } + DoExecuteQueury(sql, tags); + std::sort(tags.begin(), tags.end(), SAscendingSort()); +} + +void TagsManager::GetLocalTags(const wxString &name, const wxString &scope, std::vector &tags, SearchFlags flags) +{ + //collect tags from the current scope text + LanguageST::Get()->GetLocalVariables(scope, tags, name, flags); +} + +void TagsManager::GetHoverTip(const wxFileName &fileName, int lineno, const wxString & expr, const wxString &word, const wxString & text, std::vector & tips) +{ + wxString path; + wxString typeName, typeScope, tmp; + std::vector tmpCandidates, candidates; + + //remove the word from the expression + wxString expression(expr); + + // Trim whitespace from right and left + static wxString trimLeftString(wxT("{};\r\n\t\v ")); + static wxString trimRightString(wxT("({};\r\n\t\v ")); + expression.erase(0, expression.find_first_not_of(trimLeftString)); + expression.erase(expression.find_last_not_of(trimRightString)+1); + + tmp = expression; + expression.EndsWith(word, &tmp); + expression = tmp; + + wxString scope = LanguageST::Get()->GetScope(text); + wxString scopeName = LanguageST::Get()->GetScopeName(scope, NULL); + if (expression.IsEmpty()) { + //collect all the tags from the current scope, and + //from the global scope + + GetGlobalTags(word, tmpCandidates, ExactMatch); + GetLocalTags(word, scope, tmpCandidates, ExactMatch); + TagsByScopeAndName(scopeName, word, tmpCandidates); + RemoveDuplicates(tmpCandidates, candidates); + + // we now have a list of tags that matches our word + TipsFromTags(candidates, word, tips); + } else { + wxString typeName, typeScope; + bool res = ProcessExpression(fileName, lineno, expression, text, typeName, typeScope); + if (!res) { + return; + } + + //get all symbols realted to this scope + scope = wxT(""); + if (typeScope == wxT("")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + std::vector tmpCandidates; + TagsByScopeAndName(scope, word, tmpCandidates); + RemoveDuplicatesTips(tmpCandidates, candidates); + + // we now have a list of tags that matches our word + TipsFromTags(candidates, word, tips); + } +} + +void TagsManager::FindImplDecl(const wxFileName &fileName, int lineno, const wxString & expr, const wxString &word, const wxString & text, std::vector &tags, bool imp) +{ + wxString path; + wxString typeName, typeScope, tmp; + std::vector tmpCandidates, candidates; + + //remove the word from the expression + wxString expression(expr); + + // Trim whitespace from right and left + static wxString trimString(wxT("(){};\r\n\t\v ")); + + expression.erase(0, expression.find_first_not_of(trimString)); + expression.erase(expression.find_last_not_of(trimString)+1); + tmp = expression; + expression.EndsWith(word, &tmp); + expression = tmp; + + wxString scope(text);// = LanguageST::Get()->GetScope(text); + wxString scopeName = LanguageST::Get()->GetScopeName(scope, NULL); + if (expression.IsEmpty()) { + + //collect all the tags from the current scope, and + //from the global scope + GetGlobalTags(word, tmpCandidates, ExactMatch); + TagsByScopeAndName(scopeName, word, tmpCandidates, ExactMatch); + + if (!imp) { + //collect only implementation + FilterImplementation(tmpCandidates, tags); + } else { + FilterDeclarations(tmpCandidates, tags); + } + + } else { + + wxString typeName, typeScope; + bool res = ProcessExpression(fileName, lineno, expression, text, typeName, typeScope); + if (!res) { + return; + } + + //get all symbols realted to this scope + scope = wxT(""); + if (typeScope == wxT("")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + std::vector tmpCandidates; + TagsByScopeAndName(scope, word, tmpCandidates, ExactMatch); + + if (!imp) { + //collect only implementation + FilterImplementation(tmpCandidates, tags); + } else { + FilterDeclarations(tmpCandidates, tags); + } + } +} + +void TagsManager::FilterImplementation(const std::vector &src, std::vector &tags) +{ + //remove all implementations and leave only declarations + std::map tmpMap; + for (size_t i=0; iGetKind() != wxT("function")) { + wxString key; + key << tag->GetFile() << tag->GetLine(); + tmpMap[key] = tag; + } + } + + std::map::iterator iter = tmpMap.begin(); + for (; iter != tmpMap.end(); iter++) { + tags.push_back(iter->second); + } +} + +void TagsManager::FilterDeclarations(const std::vector &src, std::vector &tags) +{ + std::map tmpMap; + for (size_t i=0; iGetKind() != wxT("prototype")) { + wxString key; + key << tag->GetFile() << tag->GetLine(); + tmpMap[key] = tag; + } + } + std::map::iterator iter = tmpMap.begin(); + for (; iter != tmpMap.end(); iter++) { + tags.push_back(iter->second); + } +} + +clCallTipPtr TagsManager::GetFunctionTip(const wxFileName &fileName, int lineno, const wxString &expr, const wxString &text, const wxString &word) +{ + std::vector candidates; + wxString path; + wxString typeName, typeScope, tmp; + std::vector tips; + + // Trim whitespace from right and left + wxString expression(expr); + static wxString trimLeftString(wxT("{};\r\n\t\v ")); + static wxString trimRightString(wxT("({};\r\n\t\v ")); + expression.erase(0, expression.find_first_not_of(trimLeftString)); + expression.erase(expression.find_last_not_of(trimRightString)+1); + + //remove the last token from the expression + expression.EndsWith(word, &tmp); + expression = tmp; + if (word.IsEmpty()) { + return NULL; + } + + CppScanner scanner; + scanner.SetText(_C(word)); + if (scanner.yylex() != IDENTIFIER) { + return NULL; + } + + if (expression.IsEmpty()) { + std::vector additionlScopes; + //we are probably examining a global function, or a scope function + wxString scopeName = LanguageST::Get()->GetScopeName(text, &additionlScopes); + GetGlobalTags(word, candidates, ExactMatch); + TagsByScopeAndName(scopeName, word, candidates); + for (size_t i=0; i")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + //this function will retrieve the ineherited tags as well + std::vector tmpCandidates; + TagsByScope(scope, tmpCandidates); + GetFunctionTipFromTags(tmpCandidates, word, tips); + } + + // display call tip with function prototype + clCallTipPtr ct( new clCallTip(tips) ); + return ct; +} + +//----------------------------------------------------------------------------- +// <<<<<<<<<<<<<<<<<<< Code Completion API END +//----------------------------------------------------------------------------- +void TagsManager::OpenType(std::vector &tags) +{ + wxString sql; + sql << wxT("select * from tags where kind in ('class', 'namespace', 'struct', 'union', 'enum', 'typedef') order by name DESC"); + DoExecuteQueury(sql, tags); +} + +void TagsManager::FindSymbol(const wxString& name, std::vector &tags) +{ + wxString query; + query << wxT("select * from tags where name='") << name << wxT("' "); + DoExecuteQueury(query, tags); +} + +void TagsManager::DeleteFilesTags(const std::vector &projectFiles) +{ + wxString query; + wxString filelist; + query << wxT("delete from tags where file in ("); + for (size_t i=0; iBegin(); + m_pDb->ExecuteUpdate(query); + m_pDb->Commit(); +} + +void TagsManager::BuildExternalDatabase(ExtDbData &data) +{ + // set cursor to busy + wxBusyCursor busy; + wxArrayString all_files; + wxArrayString files; + bool extlessFiles = m_options.GetFlags() & CC_PARSE_EXT_LESS_FILES ? true : false; + + wxDir::GetAllFiles(data.rootPath, &all_files); + wxStringTokenizer tok(m_options.GetFileSpec(), wxT(";")); + std::map specMap; + while ( tok.HasMoreTokens() ) { + std::pair val; + val.first = tok.GetNextToken().AfterLast(wxT('*')); + val.first = val.first.AfterLast(wxT('.')).MakeLower(); + val.second = true; + specMap.insert( val ); + } + + //filter non interesting files + for (size_t i=0; i &files) +{ + DeleteFilesTags(files); + wxArrayString strFiles; + for (size_t i=0; iGetSizer()->Fit(prgDlg); + prgDlg->Layout(); + prgDlg->Centre(); + + prgDlg->Update(0, wxT("Parsing...")); + int maxVal = (int)files.GetCount(); + int i = 0; + + std::list trees; + for (i=0; iUpdate(i, msg); + + tags.Clear(); + tagParseResult result; + result.fileName = curFile.GetFullName(); + if (GetParseComments()) { + result.comments = new std::vector(); + result.tree = ParseSourceFile(curFile, result.comments); + } else { + result.tree = ParseSourceFile(curFile); + } + trees.push_back(result); + } + + unsigned int cur = 0; + for (std::list::iterator iter = trees.begin(); iter != trees.end(); iter++) { + wxString msg; + msg << wxT("Saving symbols from file: ") << (*iter).fileName; + prgDlg->Update(maxVal + cur, msg); + + db.Store((*iter).tree, wxFileName()); + if (GetParseComments()) { + // drop all old entries from this file + try { + db.Store(*(*iter).comments, wxFileName()); + } catch ( wxSQLite3Exception & e) { + wxUnusedVar(e); + } + + //free the vector + delete (*iter).comments; + } + cur++; + } + + //update the variable table + if (rootPath) { + DbRecordPtr record(new VariableEntry(*rootPath, *rootPath)); + db.Begin(); + if (db.Insert(record) == TagExist) { + db.Update(record); + } + db.Commit(); + } + prgDlg->Destroy(); +} + +void TagsManager::OpenExternalDatabase(const wxFileName &dbName) +{ + // check that the database exist + if (!wxFile::Exists(dbName.GetFullPath())) + return; + + wxString message; + + // load it to memory + if (GetCtagsOptions().GetFlags() & CC_LOAD_EXT_DB_TO_MEMORY) { + message << wxT("Attaching symbols database '") << dbName.GetFullName() << wxT("' to memory ..."); + wxBusyInfo wait(message); + wxWindowDisabler disableAll; + wxBusyCursor cursor; + + { + //check version, we do it a inner scope, so that the db cerated on the stack + //will be destroyed and close the underlying database + TagsDatabase db; + db.OpenDatabase(dbName); + if (db.GetSchemaVersion() != db.GetVersion()) { + db.RecreateDatabase(); + } + } + + m_pExternalDb->LoadToMemory(dbName); + } else { + m_pExternalDb->OpenDatabase(dbName); + if (m_pExternalDb->GetVersion() != m_pExternalDb->GetSchemaVersion()) { + m_pExternalDb->RecreateDatabase(); + } + } +} + +wxString TagsManager::GetComment(const wxString &file, const int line) +{ + wxString sql; + // the comments is searched one line above the requested line + sql << wxT("SELECT * FROM COMMENTS WHERE file='") + << file << wxT("' AND line=") << line - 1; + + try { + wxSQLite3ResultSet rs = m_pDb->Query( sql ); + if ( rs.NextRow() ) { + Comment comment( rs ); + return comment.GetComment(); + } + + // try the external database + if ( m_pExternalDb->IsOpen() ) { + wxSQLite3ResultSet rs = m_pExternalDb->Query( sql ); + if ( rs.NextRow() ) { + Comment comment( rs ); + return comment.GetComment(); + } + } + } catch ( wxSQLite3Exception &e ) { + wxUnusedVar(e); + } + + return wxEmptyString; +} + +void TagsManager::StoreComments(const std::vector &comments, const wxFileName& path) +{ + // Make this call threadsafe + wxCriticalSectionLocker locker(m_cs); + + m_pDb->Store( comments, path ); +} + +void TagsManager::FindByNameAndScope(const wxString &name, const wxString &scope, std::vector &tags) +{ + DoFindByNameAndScope(name, scope, tags); + + // Sort the results base on their name + std::sort(tags.begin(), tags.end(), SDescendingSort()); +} + +void TagsManager::FindByPath(const wxString &path, std::vector &tags) +{ + wxString sql; + sql << wxT("select * from tags where path='") << path << wxT("' "); + DoExecuteQueury(sql, tags); +} + +void TagsManager::DoFindByNameAndScope(const wxString &name, const wxString &scope, std::vector &tags) +{ + wxString sql; + if (scope == wxT("")) { + sql << wxT("select * from tags where name='") << name << wxT("' and parent='' "); + DoExecuteQueury(sql, tags); + } else { + std::vector derivationList; + derivationList.push_back(scope); + GetDerivationList(scope, derivationList); + + for (size_t i=0; iIsOpen()) { + m_typeScopeCache.clear(); + } + + //we search the cache first, note that the cache + //is used only for the external database + std::map::iterator iter = m_typeScopeCache.find(cacheKey); + if (iter != m_typeScopeCache.end()) { + return iter->second; + } + + wxString sql; + + long value = 0; + sql << wxT("select count(*) from tags where name='") << typeName << wxT("' and scope='") << scope << wxT("'"); + + for (size_t i=0; i<2; i++) { + + if (i == 1) { + // Second try, change the SQL query to test against the global scope + sql.Clear(); + sql << wxT("select count(*) from tags where name='") << typeName << wxT("' and scope=''"); + value = 0; + } + + wxSQLite3ResultSet rs = m_pDb->Query(sql); + try { + if (rs.NextRow()) { + rs.GetAsString(0).ToLong(&value); + if (value > 0) { + if(i == 1) { scope = wxT(""); } + return true; + } + } + + if ( m_pExternalDb->IsOpen() ) { + wxSQLite3ResultSet ex_rs; + ex_rs = m_pExternalDb->Query(sql); + + // add results from external database to the workspace database + if ( ex_rs.NextRow() ) { + ex_rs.GetAsString(0).ToLong(&value); + if (value > 0) { + if(i == 1) { + scope = wxT(""); + return true; + } + m_typeScopeCache[cacheKey] = true; + return true; + } else { + if( i == 1 ){ + m_typeScopeCache[cacheKey] = false; + } + } + } + ex_rs.Finalize(); + } + rs.Finalize(); + } catch ( wxSQLite3Exception& e) { + wxUnusedVar(e); + return false; + } + + // no match, try to find the typeName in the global scope + } + return false; +} + +bool TagsManager::QueryExtDbCache(const wxString &sql, std::vector &tags) +{ + std::map::iterator iter = m_cache.find(sql); + if (iter != m_cache.end()) { + tags.insert(tags.end(), iter->second->GetTags().begin(), iter->second->GetTags().end()); + return true; + } + return false; +} + +void TagsManager::AddToExtDbCache(const wxString &query, const std::vector &tags) +{ + TagCacheEntryPtr entry(new TagCacheEntry(query, tags)); + m_cache[entry->GetQueryKey()] = entry; +} + +void TagsManager::DoExecuteQueury(const wxString &sql, std::vector &tags) +{ + try { + //try the external database first + if ( m_pExternalDb->IsOpen() ) { + //check the cache first + if (!QueryExtDbCache(sql, tags)) { + //nothing found in the cache + wxSQLite3ResultSet ex_rs; + ex_rs = m_pExternalDb->Query(sql); + + // add results from external database to the workspace database + std::vector tmpTags; + while ( ex_rs.NextRow() ) { + // Construct a TagEntry from the rescord set + TagEntryPtr tag(new TagEntry(ex_rs)); + //conver the path to be real path + ConvertPath(tag); + tmpTags.push_back(tag); + } + //add results to cache + AddToExtDbCache(sql, tmpTags); + tags.insert(tags.end(), tmpTags.begin(), tmpTags.end()); + ex_rs.Finalize(); + } + } + //now try the local tags database + wxSQLite3ResultSet rs = m_pDb->Query(sql); + while ( rs.NextRow() ) { + // Construct a TagEntry from the rescord set + TagEntryPtr tag(new TagEntry(rs)); + tags.push_back(tag); + } + rs.Finalize(); + } catch ( wxSQLite3Exception& e) { + wxUnusedVar(e); + } +} + +void TagsManager::ConvertPath(TagEntryPtr& tag) +{ + //get list of variables from database if not loaded + if (m_pExternalDb->IsOpen() && m_vars.empty()) { + m_pExternalDb->GetVariables(m_vars); + } + + wxString filename = tag->GetFile(); + for (size_t i=0; iGetValue().IsEmpty() == false) { + if (filename.StartsWith(m_vars.at(i)->GetName(), &fixedpath)) { + fixedpath = fixedpath.Prepend(m_vars.at(i)->GetValue() + wxT("/")); + tag->SetFile(fixedpath); + break; + } + } + } +} + +bool TagsManager::GetDerivationList(const wxString &path, std::vector &derivationList) +{ + wxString sql; + sql << wxT("select * from tags where path='") << path << wxT("' and kind in ('struct', 'class', 'interface') "); + + std::vector tags; + TagEntryPtr tag; + DoExecuteQueury(sql, tags); + if (tags.size() == 1) { + tag = tags.at(0); + } else { + return false; + } + + if (tag && tag->IsOk()) { + wxString ineheritsList = tag->GetInherits(); + wxStringTokenizer tok(ineheritsList, wxT(',')); + while (tok.HasMoreTokens()) { + wxString inherits = tok.GetNextToken(); + if (tag->GetScopeName() != wxT("")) { + inherits = tag->GetScopeName() + wxT("::") + inherits; + } + derivationList.push_back(inherits); + GetDerivationList(inherits, derivationList); + } + } + return true; +} + +void TagsManager::TipsFromTags(const std::vector &tags, const wxString &word, std::vector &tips) +{ + for (size_t i=0; iGetName() != word) + continue; + + wxString tip = tags.at(i)->GetPattern(); + wxString comment; + + //handle comments + if (GetCtagsOptions().GetFlags() & CC_DISP_COMMENTS) { + int lineno = tags.at(i)->GetLine(); + wxString filename = tags.at(i)->GetFile(); + if (lineno != wxNOT_FOUND && filename.IsEmpty() == false) { + comment = GetComment(filename, lineno); + if (comment.IsEmpty() == false) { + comment << wxT("\n"); + } + } + } + + //remove the pattern perfix and suffix + tip = tip.Trim().Trim(false); + tip = tip.AfterFirst(wxT('^')); + if (tip.Find(wxT('$')) != wxNOT_FOUND) { + tip = tip.BeforeLast(wxT('$')); + } else { + if (tip.EndsWith(wxT("/"))) { + tip = tip.BeforeLast(wxT('/')); + } + } + + //since the tip is built from the pattern, which is actually a regex expression + //some characters might be escaped (e.g. '/' will appear as '\/') + tip.Replace(wxT("\\/"), wxT("/")); + + // Trim whitespace from right and left + static wxString trimString(wxT("{};\r\n\t\v ")); + + tip.erase(0, tip.find_first_not_of(trimString)); + tip.erase(tip.find_last_not_of(trimString)+1); + tip.Replace(wxT("\t"), wxT(" ")); + + tip.Prepend(comment); + tips.push_back(tip); + } +} + +void TagsManager::GetFunctionTipFromTags(const std::vector &tags, const wxString &word, std::vector &tips) +{ + std::map tipsMap; + + for (size_t i=0; iGetName() != word) + continue; + + if (tags.at(i)->GetKind() != wxT("function") && tags.at(i)->GetKind() != wxT("prototype")) + continue; + + wxString tip; + tip << tags.at(i)->GetSignature(); + + //collect each signature only once, we do this by using + //map + tipsMap[tags.at(i)->GetSignature()] = tip; + } + + for (std::map::iterator iter = tipsMap.begin(); iter != tipsMap.end(); iter++) { + tips.push_back(iter->second); + } +} + +void TagsManager::CloseDatabase() +{ + if (m_pDb) { + delete m_pDb; + m_pDb = new TagsDatabase(); + } +} + +void TagsManager::CloseExternalDatabase() +{ + //close the database by simply deleting it and creating new + //empty one + if (m_pExternalDb) { + delete m_pExternalDb; + m_pExternalDb = new TagsDatabase(); + //clear variables cache + m_vars.clear(); + //clear the cache + m_cache.clear(); + } +} + +wxString TagsManager::GenerateDoxygenComment(const wxString &file, const int line) +{ + if (m_pDb->IsOpen()) { + wxString sql; + sql << wxT("select * from tags where file='") << file << wxT("' and line=") << line + 1 << wxT(" "); + std::vector tags; + DoExecuteQueury(sql, tags); + if (tags.empty() || tags.size() > 1) + return wxEmptyString; + + //create a doxygen comment from the tag + return DoCreateDoxygenComment(tags.at(0)); + } + return wxEmptyString; +} + +wxString TagsManager::DoCreateDoxygenComment(TagEntryPtr tag) +{ + CppCommentCreator commentCreator(tag); + return commentCreator.CreateComment(); +} + +bool TagsManager::GetParseComments() +{ + //wxCriticalSectionLocker lock(m_cs); + return m_parseComments; +} + +void TagsManager::SetCtagsOptions(const TagsOptionsData &options) +{ + m_options = options; +#if defined (__WXMSW__) || defined (__WXGTK__) + RestartCtagsProcess(); +#endif + + wxCriticalSectionLocker locker(m_cs); + m_parseComments = m_options.GetFlags() & CC_PARSE_COMMENTS ? true : false; +} + +void TagsManager::GenerateSettersGetters(const wxString &scope, const SettersGettersData &data, const std::vector &tags, wxString &impl, wxString *decl) +{ + wxUnusedVar(scope); + wxUnusedVar(data); + wxUnusedVar(tags); + wxUnusedVar(impl); + wxUnusedVar(decl); +} + +void TagsManager::TagsByScope(const wxString &scopeName, const wxString &kind, std::vector &tags, bool includeInherits) +{ + wxString sql; + std::vector derivationList; + //add this scope as well to the derivation list + derivationList.push_back(scopeName); + + if (includeInherits) { + GetDerivationList(scopeName, derivationList); + } + + //make enough room for max of 500 elements in the vector + tags.reserve(500); + + for (size_t i=0; iGetScopeName(scope, NULL); +} + +bool TagsManager::ProcessExpression(const wxFileName &filename, int lineno, const wxString &expr, const wxString &scopeText, wxString &typeName, wxString &typeScope) +{ + return LanguageST::Get()->ProcessExpression(expr, scopeText, filename, lineno, typeName, typeScope); +} + +int TagsManager::UpdatePathVariable(const wxString &name, const wxString &value) +{ + DbRecordPtr record(new VariableEntry(name, value)); + return m_pExternalDb->Update(record); +} + +int TagsManager::InsertPathVariable(const wxString &name, const wxString &value) +{ + DbRecordPtr record(new VariableEntry(name, value)); + return m_pExternalDb->Insert(record); +} + +int TagsManager::GetPathVariable(const wxString &name, wxString &path) +{ + VariableEntryPtr var = m_pExternalDb->FindVariableByName(name); + if (var) { + path = var->GetValue(); + return TagOk; + } + return TagError; +} + +void TagsManager::ReloadExtDbPaths() +{ + m_vars.clear(); +} + +void TagsManager::GetFiles(const wxString &partialName, std::vector &files) +{ + if (m_pDb) { + m_pDb->GetFiles(partialName, files); + } + if (m_pExternalDb) { + m_pExternalDb->GetFiles(partialName, files); + } +} + + +TagEntryPtr TagsManager::FunctionFromFileLine(const wxFileName &fileName, int lineno) +{ + if (!m_pDb) { + return NULL; + } + + wxString sql; + sql << wxT("select * from tags where file = '") + << fileName.GetFullPath() + << wxT("' and line <= ") + << lineno + << wxT(" and kind='function' order by line DESC"); + + //we take the first entry + try { + wxSQLite3ResultSet rs = m_pDb->Query(sql); + if ( rs.NextRow() ) { + // Construct a TagEntry from the rescord set + TagEntryPtr tag(new TagEntry(rs)); + rs.Finalize(); + return tag; + } + rs.Finalize(); + } catch ( wxSQLite3Exception& e) { + wxUnusedVar(e); + } + return NULL; +} + +void TagsManager::GetScopesFromFile(const wxFileName &fileName, std::vector< TagEntryPtr > &tags) +{ + if (!m_pDb) { + return; + } + + wxString sql; + sql << wxT("select * from tags where file = '") + << fileName.GetFullPath() + << wxT("' and kind in('class', 'struct', 'union')"); + + //we take the first entry + try { + wxSQLite3ResultSet rs = m_pDb->Query(sql); + while ( rs.NextRow() ) { + // Construct a TagEntry from the rescord set + TagEntryPtr tag(new TagEntry(rs)); + tags.push_back(tag); + } + rs.Finalize(); + } catch ( wxSQLite3Exception& e) { + wxUnusedVar(e); + } +} + +void TagsManager::TagsFromFileAndScope(const wxFileName& fileName, const wxString &scopeName, std::vector< TagEntryPtr > &tags) +{ + if (!m_pDb) { + return; + } + + wxString sql; + sql << wxT("select * from tags where file = '") + << fileName.GetFullPath() << wxT("' ") + << wxT(" and scope='") << scopeName << wxT("' ") + << wxT(" and kind in('prototype', 'function', 'enum')"); + + //we take the first entry + try { + wxSQLite3ResultSet rs = m_pDb->Query(sql); + while ( rs.NextRow() ) { + // Construct a TagEntry from the rescord set + TagEntryPtr tag(new TagEntry(rs)); + tags.push_back(tag); + } + rs.Finalize(); + } catch ( wxSQLite3Exception& e) { + wxUnusedVar(e); + } +} + +bool TagsManager::GetFunctionDetails(const wxFileName &fileName, int lineno, TagEntryPtr &tag, clFunction &func) +{ + tag = FunctionFromFileLine(fileName, lineno); + if (tag) { + LanguageST::Get()->FunctionFromPattern( tag->GetPattern(), func ); + return true; + } + return false; +} diff --git a/CodeLite/ctags_manager.h b/CodeLite/ctags_manager.h new file mode 100644 index 0000000000..0d3f8f48e6 --- /dev/null +++ b/CodeLite/ctags_manager.h @@ -0,0 +1,574 @@ +#ifndef CODELITE_CTAGS_MANAGER_H +#define CODELITE_CTAGS_MANAGER_H + +#include "wx/event.h" +#include "wx/process.h" +#include "cl_process.h" +#include "tree.h" +#include "entry.h" +#include "tags_database.h" +#include +#include "singleton.h" +#include "calltip.h" +#include "comment.h" +#include "language.h" +#include "tags_options_data.h" +#include "setters_getters_data.h" +#include "extdbdata.h" + +#ifndef WXDLLIMPEXP_CL +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE +#endif // WXDLLIMPEXP_CL + +#ifdef USE_TRACE +#include +#endif + +/// Forward declaration +class clProcess; +class DirTraverser; +class Language; +class wxTimer; + +#define TagsGlobal 0 +#define TagsGlobalGTK 1 + +class WXDLLIMPEXP_CL TagCacheEntry { + wxString m_query; + std::vector m_tags; +public: + TagCacheEntry(const wxString& query, const std::vector &tags); + ~TagCacheEntry(); + + const wxString &GetQueryKey() const{return m_query;} + const std::vector &GetTags() const{return m_tags;} +}; + +typedef SmartPtr TagCacheEntryPtr; + +/** + * This class is the interface to ctags and SQLite database. + * It contains various APIs that allows the caller to parse source file(s), + * store it into the database and return a symbol tree. + * TagsManager is also responsible for starting ctags processes. + * + * Before you use TagsManager, usually you would like to start ctags, + * this is easily done by writing something like this: + * + * \code + * // Create ctags processes + * TagsManagerST::Get()->StartCtagsProcess(TagsGlobal); + * \endcode + * + * In the destructor of your main frame it is recommended to call Free() to avoid memory leaks: + * + * \code + * // kill the TagsManager object first it will do the process termination and cleanup + * TagsManager::Free(); + * \endcode + * + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 09-01-2006 + * + * \author Eran + * + */ +class WXDLLIMPEXP_CL TagsManager : public wxEvtHandler +{ + // Members + friend class Singleton; + friend class DirTraverser; + friend class Language; + + TagsDatabase *m_pDb; + TagsDatabase *m_pExternalDb; + + wxCriticalSection m_cs; + + wxFileName m_ctagsPath; +#if defined (__WXMSW__) || defined (__WXGTK__) + clProcess* m_ctags; +#endif + + wxString m_ctagsCmd; + wxStopWatch m_watch; + TagsOptionsData m_options; + std::map m_processes; + bool m_parseComments; + bool m_canDeleteCtags; + std::list m_gargabeCollector; + wxTimer *m_timer; + std::vector m_vars; + std::map m_cache; + +public: + /** + * Return the CtagsOptions used by the tags manager + * \return + */ + const TagsOptionsData& GetCtagsOptions() const { return m_options; } + + /** + * Set Ctags Options + * \param options options to use + */ + void SetCtagsOptions(const TagsOptionsData &options); + + /** + * Locate symbol by name in database + * \param name name to search + * \param tags [output] result vector + */ + void FindSymbol(const wxString& name, std::vector &tags); + + /** + * ParseTagsFile CTAGS file and construct a TagTree. + * User should use ParseSourceFile, which calls to this function internally. + * This function throws a std::exception*. + * \param fp CTAGS tags file name + * \return tag tree + */ + TagTreePtr ParseTagsFile(const wxFileName& fp); + + /** + * Parse a source file and construct a TagTree. + * This function throws a std::exception*. + * \param fp Source file name + * \param comments if not null, comments will be parsed as well, and will be returned as vector + * \return tag tree + */ + TagTreePtr ParseSourceFile(const wxFileName& fp, std::vector *comments = NULL); + TagTreePtr ParseSourceFile2(const wxFileName& fp, const wxString &tags, std::vector *comments = NULL); + + /** + * \brief Set the full path to ctags executable, else TagsManager will use relative path ctags. + * So, if for example, ctags is located at: $/home/eran/bin$, you simply call this function + * with SetCtagsPath(_T("/home/eran/bin")); + * \param path ctags + */ + void SetCtagsPath(const wxString& path); + + /** + * \brief Store tree of tags into db. + * \param tree Tags tree to store + * \param path Database file name + */ + void Store(TagTreePtr tree, const wxFileName& path = wxFileName()); + + /** + * \brief Store vector of comments into database + * \param comments comments vector to store + * \param path Database file name + */ + void StoreComments(const std::vector &comments, const wxFileName& path = wxFileName()); + + /** + * load all symbols of fileName from the database and return them + * to user as tree + * \param path file's symbols + * \return tag tree + */ + TagTreePtr Load(const wxFileName& fileName); + + /** + * Open sqlite database. + * \param fileName Database file name + */ + void OpenDatabase(const wxFileName& fileName); + + /** + * Return a pointer to the underlying databases object. + * \return tags database + */ + TagsDatabase* GetDatabase() { return m_pDb; } + TagsDatabase* GetExtDatabase() { return m_pExternalDb;} + + /** + * Delete all entries from database that are related to file name. + * \param path Database name + * \param fileName File name + */ + void Delete(const wxFileName& path, const wxString& fileName); + +#if defined (__WXMSW__) || defined (__WXGTK__) + /** + * Start a ctags process on a filter mode. + * By default, TagsManager will try to launch the ctags process using the following command line: + * \code + * ctags --fields=aKmSsni --filter=yes --filter-terminator="<>\n" + * \endcode + * + * It is possible to add a full path to ctags exectuable by calling the SetCtagsPath() function. + */ + clProcess *StartCtagsProcess(); + + /** + * Restart ctags process. + * \param kind + * \return + */ + void RestartCtagsProcess(); +#endif + + /** + * Set the event handler to handle notifications of tree changes. + * This is usually the SymbolTree class (or its derived classes). + * \param evtHandler + */ + void SetEventHandler(wxEvtHandler* evtHandler); + + /** + * Test if filename matches the current ctags file spec. + * \param filename file name to test + * \return true if the file name extension matches the current running ctags file spec + */ + bool IsValidCtagsFile(const wxFileName &filename) const; + + /** + * Find symbols by name and scope. + * \param name symbol name + * \param scope full path to symbol. if set to wxEmptyString, the search is performed against the global + * \param tags [output] a vector of the results tags + * \return true on success false otherwise + */ + void FindByNameAndScope(const wxString &name, const wxString &scope, std::vector &tags); + + /** + * Find tags with given path + * \param path path to search + * \param tags [output] output tags + */ + void FindByPath(const wxString &path, std::vector &tags); + + /** + * Get tags related to a scope. + * \param scope scope to search for members + * \param tags [output] vector of tags + */ + void TagsByScope(const wxString& scope, std::vector &tags); + + /** + * Get tags related to a scope and name (name can be partial name + * \param scope scope to search for members + * \param name partial tag name + * \param tags [output] vector of tags + */ + void TagsByScopeAndName(const wxString& scope, const wxString &name, std::vector &tags, SearchFlags flags = PartialMatch); + + /** + * Return autocompletion candidates based on parsing an expression and retrieving its member from the database. + * \param expr Expression to evaluate, can be complex one, such as ((MyClass&)cls).GetName().GetData() ... ) + * \param text Scope where the expression is located + * \param candidates [output] list of TagEntries that can be displayed in Autucompletion box + * \return true if candidates.size() is greater than 0 + */ + bool AutoCompleteCandidates(const wxFileName &fileName, int lineno, const wxString& expr, const wxString& text, std::vector &candidates); + + /** + * Return a word completion candidates. this function is used when user hit Ctrl+Space. + * \param expr Expression to evaluate, can be complex one, such as ((MyClass&)cls).GetName().GetData() ... ) + * \param text Scope where the expression is located + * \param &word the partial word entered by user + * \param &candidates [output] list of TagEntries that can be displayed in Autucompletion box + * \return true if candidates.size() is greater than 0 + */ + bool WordCompletionCandidates(const wxFileName &fileName, int lineno, const wxString& expr, const wxString& text, const wxString &word, std::vector &candidates); + + /** + * Delete all tags related to these files + * \param files list of files, in absolute path + */ + void DeleteFilesTags(const std::vector &files); + + /** + * Build a secondary database that will be used for searching (e.g. database containing C/C++ header files) + * if dbName is already existed, it will be updated, else it will be created. + * \param rootDir root directory to start processing files + * \param dbName database to store the data + * \param FFU + * \param updateDlgParent when set to non-null, TagsManager will popup a modal dialog to report its progress + */ + void BuildExternalDatabase(ExtDbData &data); + + /** + * Retag files in the database. 'Retagging' means: + * - delete all entries from the database that belongs to one of these files + * - parse the files + * - update the database again + * \param files list of files, in absolute path, to retag + */ + void RetagFiles(const std::vector &files); + + /** + * Open a an existing external database that will be used for searching (e.g. database containing C/C++ header files) + * tags in this database can not be updated. This is a read-only database + * \param dbName external database file name + */ + void OpenExternalDatabase(const wxFileName &dbName); + + /** + * close external database and free all its resources + */ + void CloseExternalDatabase(); + + /** + * Close the workspace database + */ + void CloseDatabase(); + + /** + * Get a hover tip. This function is a wrapper around the Language::GetHoverTip. + * \param expr the current expression + * \param word the token under the cursor + * \param text scope where token was found + * \param scopeName scope name + * \param isFunc is token is a function + * \param tips array of tip strings + */ + void GetHoverTip(const wxFileName &fileName, int lineno, const wxString & expr, const wxString &word, const wxString & text, std::vector & tips); + + /** + * Return a function call tip object + * \param expression expression where the function was found + * \param text local scope + * \param word function name + * \return call tip object + */ + clCallTipPtr GetFunctionTip(const wxFileName &fileName, int lineno, const wxString &expression, const wxString &text, const wxString &word); + + /** + * Return true if comment parsing is enabled, false otherwise + */ + bool GetParseComments(); + + /** + * Load comment from database by line and file + * \param line line number + * \param file file name + */ + wxString GetComment(const wxString &file, const int line); + + /** + * Generate doxygen based on file & line + * \param line line number + * \param file file name + */ + wxString GenerateDoxygenComment(const wxString &file, const int line); + + /** + * Load all types from database. 'Type' is one of: + * class, namespace, struct, union, enum, macro, typedef + * \param &tags + */ + void OpenType(std::vector &tags); + + /** + * return string containing a code section to be inserted into the document. By providing + * decl which is not null, this function will split the generated code into two - decl & impl + * \param scope the current text from begining of the document up to the cursor pos, this + * string will be parsed by CodeLite to determine the current scope + * \param data user's settings for the generation of the getters/setters + * \param tags list of members to create setters/getters for them. + * \param impl [output] the generated code - implementation, if 'decl' member is null, + it will include the declaration as well + * \param decl [output] if not null, will contain the declaration part of the functions + */ + void GenerateSettersGetters(const wxString &scope, const SettersGettersData &data, const std::vector &tags, wxString &impl, wxString *decl = NULL); + + /** + * return tags belongs to given scope and kind + * \param scopeName the scope to search + * \param kind tags's kind to return + * \param tags [ouput] the result vector + * \param inherits set to true if you want inherited members as well members + */ + void TagsByScope(const wxString &scopeName, const wxString &kind, std::vector &tags, bool includeInherits = false); + + /** + * Find implementation/declaration of symbol + * \param expr the current expression + * \param word the token under the cursor + * \param text scope where token was found + * \param gotoImpl set to true, if you wish that CodeLite will find the implementation, false to declaration + * \param tags the output + */ + void FindImplDecl(const wxFileName &fileName, int lineno, const wxString & expr, const wxString &word, const wxString &text, std::vector &tags, bool impl = true); + + /** + * \brief get the scope name. CodeLite assumes that the caret is placed at the end of the 'scope' + * \param scope the input string + * \return scope name or '' if non found + */ + wxString GetScopeName(const wxString &scope); + + /** + * Update path variable in the database + * return TagOk on success. + * TagExist when a variable with this name already exist + * TagError in any other failure + */ + int UpdatePathVariable(const wxString &name, const wxString &value); + + /** + * insert path variable into the database + * return TagOk on success. + * TagExist when a variable with this name already exist + * TagError in any other failure + */ + int InsertPathVariable(const wxString &name, const wxString &value); + + /** + * find variable's value in the database + * return TagOk on success. + * TagExist when a variable with this name already exist + * TagError in any other failure + */ + int GetPathVariable(const wxString &name, wxString &path); + + /** + * Reload the external database paths + */ + void ReloadExtDbPaths(); + + /** + * \brief convert source file to tags using second method wxExecute() instead of using the + * daemon process ctags-le + * \param source Source file name + * \param tags String containing the ctags output + */ + void SourceToTags2(const wxFileName& source, wxString& tags); + + /** + * Pass a source file to ctags process, wait for it to process it and return the output. + * This function throws a std::exception*. + * \param source Source file name + * \param tags String containing the ctags output + * \param ctags Ctags process to use for the parsing of the source file - ctags manager holds two + * ctags processes, one for parsing local variables and one for global scope + */ + void SourceToTags(const wxFileName& source, wxString& tags, clProcess *ctags); + + /** + * return list of files from the database(s). The returned list is ordered + * by name (ascending) + * \param partialName part of the file name to act as a filter + * \param files [output] array of files + */ + void GetFiles(const wxString &partialName, std::vector &files); + + /** + * Return function that is close to current line number and matches + * file name + * \param fileName file to search for + * \param lineno the line number + * \return pointer to the tage which matches the line number & files + */ + TagEntryPtr FunctionFromFileLine(const wxFileName &fileName, int lineno); + + /** + * \brief return list of scopes from a given file. This function is used by the navigation bar + * \param name + * \param scope + * \param tags + */ + void GetScopesFromFile(const wxFileName &fileName, std::vector &tags); + + /** + * \brief return list of tags by file name & scope + * \param fileName + * \param scopeName + * \param tags + */ + void TagsFromFileAndScope(const wxFileName &fileName, const wxString &scopeName, std::vector &tags); + + /** + * \brief return information about the current function based on file & line + * \param fileName the current file name + * \param lineno the current line number + * \param tag [output] + * \param func [output] + * \return true on success, false otherwise + */ + bool GetFunctionDetails(const wxFileName &fileName, int lineno, TagEntryPtr &tag, clFunction &func); + + bool IsTypeAndScopeExists(const wxString &typeName, wxString &scope); + +protected: + std::map m_typeScopeCache; + + /** + * Handler ctags process termination + */ +#if defined (__WXMSW__) || defined (__WXGTK__) + void OnCtagsEnd(wxProcessEvent& event); +#endif + void OnTimer(wxTimerEvent &event); + DECLARE_EVENT_TABLE() + +private: + /** + * Construct a TagsManager object, for internal use + */ + TagsManager(); + + /** + * Destructor + */ + virtual ~TagsManager(); + + /** + * Construct a tag object from line. + * \param line Line + * \param tag Tag from the line (output) + */ + void TagFromLine(const wxString& line, TagEntry& tag); + + /** + * Parse tags from memory and constructs a TagTree. + * This function throws a std::exception*. + * \param tags wxString containing the tags to parse + * \return tag tree, must be freed by caller + */ + TagTreePtr TreeFromTags(const wxString& tags); + + /** + * + * \param &path + * \param &derivationList + * \return + */ + bool GetDerivationList(const wxString &path, std::vector &derivationList); + +protected: + void DoFindByNameAndScope(const wxString &name, const wxString &scope, std::vector &tags); + void DoExecuteQueury(const wxString &sql, std::vector &tags); + void RemoveDuplicates(std::vector& src, std::vector& target); + void RemoveDuplicatesTips(std::vector& src, std::vector& target); + void GetGlobalTags(const wxString &name, std::vector &tags, SearchFlags flags = PartialMatch); + void GetLocalTags(const wxString &name, const wxString &scope, std::vector &tags, SearchFlags flags = PartialMatch); + void TipsFromTags(const std::vector &tags, const wxString &word, std::vector &tips); + void GetFunctionTipFromTags(const std::vector &tags, const wxString &word, std::vector &tips); + wxString DoCreateDoxygenComment(TagEntryPtr tag); + void DoBuildDatabase(const wxArrayString &files, TagsDatabase &db, const wxString *rootPath = NULL); + bool ProcessExpression(const wxFileName &filename, int lineno, const wxString &expr, const wxString &scopeText, wxString &typeName, wxString &typeScope); + void FilterImplementation(const std::vector &src, std::vector &tags); + void FilterDeclarations(const std::vector &src, std::vector &tags); + void ConvertPath(TagEntryPtr& tag); + bool QueryExtDbCache(const wxString &query, std::vector &tags); + void AddToExtDbCache(const wxString &query, const std::vector &tags); +}; + +/// create the singleton typedef +typedef Singleton TagsManagerST; + +#endif // CODELITE_CTAGS_MANAGER_H + diff --git a/CodeLite/db_record.h b/CodeLite/db_record.h new file mode 100644 index 0000000000..a7270c7825 --- /dev/null +++ b/CodeLite/db_record.h @@ -0,0 +1,78 @@ +#ifndef CODELITE_DB_RECORD_H +#define CODELITE_DB_RECORD_H + +#include +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +enum +{ + TagOk = 0, + TagExist, + TagError +}; + +/** + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 09-21-2006 + * + * \author Eran + * Base class for any database record + */ +class WXDLLIMPEXP_CL DbRecord +{ +public: + DbRecord(){} + virtual ~DbRecord(){} + +public: + /** + * Save this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagExist, TagError + */ + virtual int Store(wxSQLite3Statement& insertPreparedStmnt) = 0; + + /** + * Update this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagError + */ + virtual int Update(wxSQLite3Statement& updatePreparedStmnt) = 0; + + /** + * Delete this record from db. + * \param deletePreparedStmnt Prepared statement for delete operation + * \return TagOk, TagError + */ + virtual int Delete(wxSQLite3Statement& deletePreparedStmnt) = 0; + + /** + * \return delete preapred statement + */ + virtual wxString GetDeleteOneStatement() = 0; + + /** + * \return update preapred statement + */ + virtual wxString GetUpdateOneStatement() = 0; + + /** + * \return insert preapred statement + */ + virtual wxString GetInsertOneStatement() = 0; +}; + +typedef SmartPtr DbRecordPtr; + +#endif // CODELITE_DB_RECORD_H diff --git a/CodeLite/dirsaver.h b/CodeLite/dirsaver.h new file mode 100644 index 0000000000..51e9899c62 --- /dev/null +++ b/CodeLite/dirsaver.h @@ -0,0 +1,28 @@ +#ifndef DIR_SAVER_H +#define DIR_SAVER_H + +#include "wx/string.h" +#include "wx/filefn.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +// Utility class that helps keeping the current directory +class WXDLLIMPEXP_CL DirSaver +{ + wxString m_curDir; +public: + DirSaver(){ + m_curDir = wxGetCwd(); + } + + virtual ~DirSaver(){ + wxSetWorkingDirectory(m_curDir); + } +}; +#endif // DIR_SAVER_H diff --git a/CodeLite/dirtraverser.cpp b/CodeLite/dirtraverser.cpp new file mode 100644 index 0000000000..078ffdd947 --- /dev/null +++ b/CodeLite/dirtraverser.cpp @@ -0,0 +1,52 @@ +#include "dirtraverser.h" +#include "wx/tokenzr.h" +#include "wx/filename.h" +#include "wx/log.h" + +DirTraverser::DirTraverser(const wxString &filespec, bool includeExtLessFiles) +: wxDirTraverser() +, m_filespec(filespec) +, m_extlessFiles(includeExtLessFiles) +, m_excludeDirs(NULL) +{ + if(m_filespec.Trim() == wxT("*.*") || m_filespec.Trim() == wxT("*")){ + m_specMap.clear(); + } else { + wxStringTokenizer tok(m_filespec, wxT(";")); + while( tok.HasMoreTokens() ){ + std::pair val; + val.first = tok.GetNextToken().AfterLast(wxT('*')); + val.first = val.first.AfterLast(wxT('.')).MakeLower(); + val.second = true; + m_specMap.insert( val ); + } + } +} + +wxDirTraverseResult DirTraverser::OnFile(const wxString& filename) +{ + // add the file to our array + wxFileName fn(filename); + + if( m_specMap.empty() ){ + m_files.Add(filename); + } else if(fn.GetExt().IsEmpty() & m_extlessFiles){ + m_files.Add(filename); + } else if(m_specMap.find(fn.GetExt().MakeLower()) != m_specMap.end()){ + m_files.Add(filename); + } + return wxDIR_CONTINUE; +} + +wxDirTraverseResult DirTraverser::OnDir(const wxString &dirname) +{ + if(m_excludeDirs){ + for(size_t i=0; iGetCount(); i++){ + wxString dir = m_excludeDirs->Item(i); + if(dirname.Contains(dir)){ + return wxDIR_IGNORE; + } + } + } + return wxDIR_CONTINUE; +} diff --git a/CodeLite/dirtraverser.h b/CodeLite/dirtraverser.h new file mode 100644 index 0000000000..f89e7fd7d8 --- /dev/null +++ b/CodeLite/dirtraverser.h @@ -0,0 +1,74 @@ +#ifndef DIRTRAVERSER_H +#define DIRTRAVERSER_H + +#include +#include +#include + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // + +/** + * A helper class that help us recurse into sub-directories. + * For each found directory, sink.OnDir() is called and sink.OnFile() is called for every file. + * Depending on the return value, the enumeration may continue or stop of one of the files, the + * recurse may stop. + * \ingroup CodeLite + * \version 1.0 + * first version + * \date 11-08-2006 + * \author Eran + */ +class WXDLLIMPEXP_CL DirTraverser : public wxDirTraverser +{ + wxArrayString m_files; + wxString m_filespec; + std::map m_specMap; + bool m_extlessFiles; + wxArrayString *m_excludeDirs; + +public: + + /** + * Construct a DirTraverser with a given file spec + */ + DirTraverser(const wxString &filespec, bool includExtLessFiles = false); + + /** + * This function is called once a file is found. The traverse of the directories + * can be stopped based on the return value from this function: + * - wxDIR_IGNORE = -1, // ignore this directory but continue with others + * - wxDIR_STOP, // stop traversing + * - wxDIR_CONTINUE // continue into this directory + * \param filename name of the file that was found + * \return one of the values wxDIR_STOP, wxDIR_IGNORE or wxDIR_CONTINUE + */ + virtual wxDirTraverseResult OnFile(const wxString& filename); + + /** + * This function is called once a directory is found. The traverse of the directories + * can be stopped based on the return value from this function: + * - wxDIR_IGNORE = -1, // ignore this directory but continue with others + * - wxDIR_STOP, // stop traversing + * - wxDIR_CONTINUE // continue into this directory + * \param dirname name of the directory that was found + * \return one of the values wxDIR_STOP, wxDIR_IGNORE or wxDIR_CONTINUE + */ + virtual wxDirTraverseResult OnDir(const wxString& dirname); + + /** + * Return list of files found + * \return Return list of files found + */ + wxArrayString& GetFiles() + { + return m_files; + } +}; + +#endif //DIRTRAVERSER_H diff --git a/CodeLite/docs/DoxySfile b/CodeLite/docs/DoxySfile new file mode 100644 index 0000000000..b465ef24ae --- /dev/null +++ b/CodeLite/docs/DoxySfile @@ -0,0 +1,185 @@ +# DoxySfile 0.90b ShortConfig -- Do not remove or edit this line please -- + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = CodeLite +PROJECT_NUMBER = +INPUT = ../. +OUTPUT_DIRECTORY = htmlhelp/ +GENERATE_DOXYS_HELP = NO +HTML_FILE_EXTENSION = .html +CUSTOM_DIR = +SERVER_STATISTICS = +HTML_HELP_SERVER_PATH = +STRIP_CODE_COMMENTS = YES +#--------------------------------------------------------------------------- +# Special options (rarely changed) +#--------------------------------------------------------------------------- +DELETE_OUTPUT_DIRECTORY = NO +MS_DOT_NET_INTEGRATION = NO +MS_DOT_NET_INTEGRATION_PATH = +GENERATE_HTMLHELP1 = YES +GENERATE_STATISTICS = NO +#--------------------------------------------------------------------------- +# Search page options +#--------------------------------------------------------------------------- +CREATE_SEARCHPAGE = YES +SEARCH_BRIEF_DESCRIPTION = YES +SEARCH_FUNCTIONS = YES +SEARCH_VARIABLES = YES +SEARCH_TYPEDEFS_ETC = YES +#--------------------------------------------------------------------------- +# Specify what is included in the output +#--------------------------------------------------------------------------- +CREATE_DOC_FOR_FILES = YES +CREATE_SOURCECODE_FOR_FILES = NO +CREATE_SOURCECODE_FOR_MEMBERS = NO +EXTRACT_PRIVATE = YES +EXTRACT_PROTECTED = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +HIDE_UNDOC_NAMESPACES = NO +HIDE_UNDOC_CLASSES = NO +HIDE_UNDOC_FUNCTIONS = NO +HIDE_UNDOC_VARIABLES = NO +HIDE_UNDOC_ENUMS = NO +HIDE_UNDOC_ENUM_VALUES = NO +HIDE_UNDOC_TYPEDEFS = NO +HIDE_UNDOC_MACROS = NO +HIDE_UNDOC_DEFINES = YES +GENERATE_TODOLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST = YES +#--------------------------------------------------------------------------- +# Customize how the documentation is generated +#--------------------------------------------------------------------------- +MEMBER_SAME_FILE_RELATE_TO_CLASSES = YES +MEMBER_SAME_FILE_RELATE_TO_STRUCTS = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +TODO_DOCS = YES +INHERIT_DOCS = YES +HIDE_CLASS_METHODS_IN_OVERVIEW = NO +CONCATENATE_DECL_AND_DEFINITION_DOC = YES +#--------------------------------------------------------------------------- +# Customize layout for pure text projects (ie containing no code) +#--------------------------------------------------------------------------- +PAGE_DOCUMENTATION_MODE = NO +#--------------------------------------------------------------------------- +# Options to control how the input is parsed +#--------------------------------------------------------------------------- +HIDE_IN_BODY_DOCS = NO +TAB_SIZE = 4 +ALIASES = +ENABLED_SECTIONS = +IGNORE_CLASS_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +MESSAGE_LEVEL_SCREEN = Messages Warnings +OUTPUT_PREFIX_SCREEN = Warnings Errors +OUTPUT_PATTERNS_SCREEN = Progress Preprocessor Scanner Generator Docparser Dot Definition Configfile Undocumented Unknown +MESSAGE_SCREEN_LOGFILE = +MESSAGE_LEVEL_HTML_FILE = Messages Warnings Errors Debug +OUTPUT_PATTERNS_HTML_FILE = Progress Preprocessor Scanner Generator Docparser Dot Definition Configfile Undocumented Unknown +QUIET = YES +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- +IGNORE_FILE_NAME = DoxyS.ignore +FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl *.odl *.cs *.page *.dir *.dxd *.doc +RECURSIVE = YES +EXCLUDE = htmlhelp/ +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# Configuration options related to the HTML layout +#--------------------------------------------------------------------------- +NAVIGATION_CHAR_LENGTH = 30 +LIMIT_COMPACT_IN_OVERVIEW_TABLES = 100 +COLS_IN_OVERVIEW_TABLES = 4 +LIMIT_ALFA_INDEX_IN_OVERVIEW_TABLES = 200 +COMPACT_CHAR_LENGTH = 25 +INFO_ON_OVERVIEW_TABLES_NORMAL = YES +INFO_ON_OVERVIEW_TABLES_COMPACT = YES +INCLUDE_BRIEF_IN_HEADER = YES +INCLUDE_BRIEF_IN_DESCRIPTION = YES +HIDE_TYPE_ON_DESCRIPTION = NO +EXPAND_COLLAPSE_SECTIONS = YES +EXPAND_COLLAPSE_TABLE_SECTIONS_ONLY = YES +CENTER_ALIGN_IMAGES = NO +#--------------------------------------------------------------------------- +# Configuration options related to Left Menu layout +#--------------------------------------------------------------------------- +SHOW_LEFT_MENU = NO +SHOW_LEFT_MENU_MAINDIR = YES +SHOW_LEFT_MENU_SEARCH = YES +SHOW_LEFT_MENU_DIRECTORY = YES +SHOW_LEFT_MENU_DOC = YES +SHOW_LOGO = NO +LEFT_MENU_DIRECTORIES = NO +LEFT_MENU_PAGES = YES +LEFT_MENU_CLASSES = YES +LEFT_MENU_FUNCTIONS = NO +LEFT_MENU_MACROS = NO +LEFT_MENU_DEFINES = NO +LEFT_MENU_ATTRIBUTES = NO +LEFT_MENU_TYPES = NO +LEFT_MENU_UNITS = YES +LEFT_MENU_STATISTICS = NO +STATISTICS_LINK_ON_MAIN_PAGE = NO +#--------------------------------------------------------------------------- +# Configuration options related to header and footer layout +#--------------------------------------------------------------------------- +HIDE_HEADER_ON_DIRS_AND_PAGES = YES +HIDE_FOOTER_ON_DIRS_AND_PAGES = YES +HIDE_HEADER_ON_CLASS_AND_MEMBERS = NO +HIDE_FOOTER_ON_CLASS_AND_MEMBERS = NO +HIDE_HEADER_ON_UNITS = NO +HIDE_FOOTER_ON_UNITS = NO +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +ENABLE_DOT_GRAPHS = YES +DOT_PATH = +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +DIR_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_IMAGE_FORMAT = png +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 0 +CENTER_ALIGN_DOT_IMAGES = NO +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Language options +#--------------------------------------------------------------------------- +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = YES diff --git a/CodeLite/docs/build-docs.bat b/CodeLite/docs/build-docs.bat new file mode 100644 index 0000000000..7741468501 --- /dev/null +++ b/CodeLite/docs/build-docs.bat @@ -0,0 +1,9 @@ +@echo off +rem To create the HTML help you will need to download DoxyS from http://doxys.dk +doxys DoxySfile + +copy /Y default.css htmlhelp\common\ + +rem And to compile from it the CHM file you'll need to download the HTML Help from +rem http://download.microsoft.com/download/0/a/9/0a939ef6-e31c-430f-a3df-dfae7960d564/htmlhelp.exe +"%PROGRAMFILES%\HTML Help Workshop\hhc.exe" htmlhelp\CodeLite.hhp diff --git a/CodeLite/entry.cpp b/CodeLite/entry.cpp new file mode 100644 index 0000000000..11c3890f1a --- /dev/null +++ b/CodeLite/entry.cpp @@ -0,0 +1,477 @@ +#include "precompiled_header.h" + +#include "entry.h" +#include "tokenizer.h" +#include "language.h" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +TagEntry::TagEntry(const tagEntry& entry) +{ + Create(entry); +} + +TagEntry::TagEntry() +: m_path(wxEmptyString) +, m_file(wxEmptyString) +, m_lineNumber(-1) +, m_pattern(wxEmptyString) +, m_kind(wxT("")) +, m_parent(wxEmptyString) +, m_name(wxEmptyString) +, m_position(wxNOT_FOUND) +, m_id(wxNOT_FOUND) +, m_scope(wxEmptyString) +{ +} + +TagEntry::~TagEntry() +{ +} + +TagEntry::TagEntry(const TagEntry& rhs) +{ + *this = rhs; +} + +TagEntry& TagEntry::operator=(const TagEntry& rhs) +{ + m_id = rhs.m_id; + m_file = rhs.m_file; + m_kind = rhs.m_kind; + m_parent = rhs.m_parent; + m_pattern = rhs.m_pattern; + m_lineNumber = rhs.m_lineNumber; + m_name = rhs.m_name; + m_path = rhs.m_path; + m_hti = rhs.m_hti; + m_position = rhs.m_position; + m_scope = rhs.m_scope; + m_extFields = std::map(rhs.m_extFields); + return *this; +} + +bool TagEntry::operator ==(const TagEntry& rhs) +{ + //Note: tree item id is not used in this function! + return + m_scope == rhs.m_scope && + m_file == rhs.m_file && + m_kind == rhs.m_kind && + m_parent == rhs.m_parent && + m_pattern == rhs.m_pattern && + m_lineNumber == rhs.m_lineNumber && + m_name == rhs.m_name && + m_path == rhs.m_path && + GetInherits() == rhs.GetInherits() && + GetAccess() == rhs.GetAccess() && + GetSignature() == rhs.GetSignature() && + GetPosition() == rhs.GetPosition() && + GetTyperef() == rhs.GetTyperef(); +} + +void TagEntry::Create(const wxString &fileName, + const wxString &name, + int lineNumber, + const wxString &pattern, + const wxString &kind, + std::map& extFields) +{ + SetPosition( wxNOT_FOUND ); + SetName( name ); + SetLine( lineNumber ); + SetKind( kind.IsEmpty() ? wxT("") : kind ); + SetPattern( pattern ); + SetFile( fileName ); + SetId(-1); + m_extFields = extFields; + wxString path; + + // Check if we can get full name (including path) + path = GetExtField(wxT("class")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + }else{ + path = GetExtField(wxT("struct")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + }else{ + path = GetExtField(wxT("namespace")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + }else{ + path = GetExtField(wxT("interface")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + }else{ + path = GetExtField(wxT("enum")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + }else{ + path = GetExtField(wxT("union")); + if(!path.IsEmpty()){ + UpdatePath( path ) ; + } + } + } + } + } + } + + if(!path.IsEmpty()){ + SetScope(path); + }else{ + SetScope(wxT("")); + } + + // If there is no path, path is set to name + if( GetPath().IsEmpty() ) + SetPath( GetName() ); + + // Get the parent name + StringTokenizer tok(GetPath(), wxT("::")); + wxString parent; + + (tok.Count() < 2) ? parent = wxT("") : parent = tok[tok.Count()-2]; + SetParent(parent); +} + +void TagEntry::Create(const tagEntry& entry) +{ + // Get other information from the string data and store it into map + for (int i = 0; i < entry.fields.count; ++i) + { + wxString key = _U(entry.fields.list[i].key); + wxString value = _U(entry.fields.list[i].value); + m_extFields[key] = _U(value); + } + Create( _U(entry.file), + _U(entry.name), + entry.address.lineNumber, + _U(entry.address.pattern), + _U(entry.kind), + m_extFields); +} + +void TagEntry::Print() +{ + std::cout << "======================================" << std::endl; + std::cout << "Name:\t\t" << GetName() << std::endl; + std::cout << "File:\t\t" << GetFile() << std::endl; + std::cout << "Line:\t\t" << GetLine() << std::endl; + std::cout << "Pattern\t\t" << GetPattern() << std::endl; + std::cout << "Kind:\t\t" << GetKind() << std::endl; + std::cout << "Parent:\t\t" << GetParent() << std::endl; + + std::cout << " ---- Ext fields: ---- " << std::endl; + std::map::const_iterator iter = m_extFields.begin(); + for(; iter != m_extFields.end(); iter++) + std::cout << iter->first << ":\t\t" << iter->second << std::endl; + std::cout << "======================================" << std::endl; +} + +wxString TagEntry::Key() const +{ + wxString key; + if( GetKind() == wxT("prototype")) + key << wxT("[prototype] "); + key << GetPath() << GetSignature(); + return key; +} + +wxString TagEntry::GetDisplayName() const +{ + wxString name; + name << GetName() << GetSignature(); + if(GetKind() == wxT("prototype")) + { + name << wxT(": [prototype]"); + } + return name; +} + +wxString TagEntry::GetFullDisplayName() const +{ + wxString name; + + if( GetParent() == wxT("") ){ + name << GetDisplayName(); + } else { + name << GetParent() << wxT("::") << GetName() << GetSignature(); + } + + return name; +} + +TagEntry::TagEntry(wxSQLite3ResultSet& rs) +{ + m_extFields.clear(); + m_id = rs.GetInt(0); + m_name = rs.GetString(1); + m_file = rs.GetString(2); + m_lineNumber = rs.GetInt(3); + m_kind = rs.GetString(4); + m_extFields[wxT("access")] = rs.GetString(5); + m_extFields[wxT("signature")] = rs.GetString(6); + m_pattern = rs.GetString(7); + m_parent = rs.GetString(8); + m_extFields[wxT("inherits")] = rs.GetString(9); + m_path = rs.GetString(10); + m_extFields[wxT("typeref")] = rs.GetString(11); + m_scope = rs.GetString(12); + m_position = wxNOT_FOUND; +} + +//---------------------------------------------------------------------------- +// Database operations +//---------------------------------------------------------------------------- + +int TagEntry::Store(wxSQLite3Statement& insertPerepareStmnt) +{ + // If this node is a dummy, (IsOk() == false) we dont insert it to database + if( !IsOk() ) + return TagOk; + + try + { + // see TagsDatabase::GetInsertOneStatement() for the order of binding + insertPerepareStmnt.Bind(1, GetName()); + insertPerepareStmnt.Bind(2, GetFile()); + insertPerepareStmnt.Bind(3, GetLine()); + insertPerepareStmnt.Bind(4, GetKind()); + insertPerepareStmnt.Bind(5, GetAccess()); + insertPerepareStmnt.Bind(6, GetSignature()); + insertPerepareStmnt.Bind(7, GetPattern()); + insertPerepareStmnt.Bind(8, GetParent()); + insertPerepareStmnt.Bind(9, GetInherits()); + insertPerepareStmnt.Bind(10, GetPath()); + insertPerepareStmnt.Bind(11, GetTyperef()); + insertPerepareStmnt.Bind(12, GetScope()); + insertPerepareStmnt.ExecuteUpdate(); + insertPerepareStmnt.Reset(); + + } + catch(wxSQLite3Exception& exc) + { + if(exc.ErrorCodeAsString(exc.GetErrorCode()) == wxT("SQLITE_CONSTRAINT")) + return TagExist; + return TagError; + } + return TagOk; +} + +int TagEntry::Update(wxSQLite3Statement& updatePerepareStmnt) +{ + // If this node is a dummy, (IsOk() == false) we dont update it to database + if( !IsOk() ) + return TagOk; + + try + { + // see TagsDatabase::GetUpdateOneStatement() function for the order of binding + updatePerepareStmnt.Bind(1, GetName()); + updatePerepareStmnt.Bind(2, GetFile()); + updatePerepareStmnt.Bind(3, GetLine()); + updatePerepareStmnt.Bind(4, GetAccess()); + updatePerepareStmnt.Bind(5, GetPattern()); + updatePerepareStmnt.Bind(6, GetParent()); + updatePerepareStmnt.Bind(7, GetInherits()); + updatePerepareStmnt.Bind(8, GetTyperef()); + updatePerepareStmnt.Bind(9, GetScope()); + updatePerepareStmnt.Bind(10, GetKind()); + updatePerepareStmnt.Bind(11, GetSignature()); + updatePerepareStmnt.Bind(12, GetPath()); + updatePerepareStmnt.ExecuteUpdate(); + updatePerepareStmnt.Reset(); + } + catch(wxSQLite3Exception& WXUNUSED(exc)) + { + return TagError; + } + return TagOk; +} + +int TagEntry::Delete(wxSQLite3Statement &deletePreparedStmnt) +{ + // Delete this record from database. + // Delete is done using the index + try + { + deletePreparedStmnt.Bind(1, GetKind()); // Kind + deletePreparedStmnt.Bind(2, GetSignature()); // Signature + deletePreparedStmnt.Bind(3, GetPath()); // Path + deletePreparedStmnt.ExecuteUpdate(); + deletePreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + wxUnusedVar(exc); + return TagError; + } + return TagOk; +} + +wxString TagEntry::GetScopeName() const +{ + return GetScope(); +} + +wxString TagEntry::GetKind() const { + wxString kind(m_kind); + kind.Trim(); + return kind; +} + + +const bool TagEntry::IsContainer() const +{ + return GetKind() == wxT("class") || + GetKind() == wxT("struct") || + GetKind() == wxT("union") || + GetKind() == wxT("namespace") || + GetKind() == wxT("project"); +} + +void TagEntry::UpdatePath(wxString & path) +{ + if(!path.IsEmpty()) + { + wxString name(path); + name += wxT("::"); + name += GetName(); + SetPath(name); + } +} + +wxString TagEntry::TypeFromTyperef() const +{ + wxString typeref = GetTyperef(); + if( typeref.IsEmpty() == false ) + { + wxString name = typeref.BeforeFirst(wxT(':')); + return name; + } + return wxEmptyString; +} + + +wxString TagEntry::NameFromTyperef(wxString &templateInitList) +{ + wxString typeref = GetTyperef(); + if( typeref.IsEmpty() == false ) + { + wxString name = typeref.AfterFirst(wxT(':')); + return name; + } + + // incase our entry is a typedef, and it is not marked as typeref, + // try to get the real name from the pattern + if( GetKind() == wxT("typedef")) + { + wxString name; + if(TypedefFromPattern(GetPattern(), GetName(),name, templateInitList)) + return name; + } + return wxEmptyString; +} + +bool TagEntry::TypedefFromPattern(const wxString &tagPattern, const wxString &typedefName, wxString &name, wxString &templateInit) +{ + CppScanner sc; + //remove the pattern prefix & suffix + wxString pattern(tagPattern); + pattern.StartsWith(wxT("/^"), &pattern); + sc.SetText( _C(pattern) ); + + int type(0); + int depth(0); + bool found(false); + wxString token; + while((type = sc.yylex()) != 0) + { + if(type == 0) + return false; + + if(!found){ + if(type != TYPEDEF){ + continue; + }else{ + found = true; + continue; + } + } + + token = _U(sc.YYText()); + if(token == typedefName){ + //we found the end token, break + break; + } + + switch(type) + { + case CLCL: + if(depth == 0){ + name << token; + }else{ + templateInit << token; + } + break; + + case IDENTIFIER: + if(depth == 0){ + name << token; + }else{ + templateInit << token; + } + break; + + case wxT('<'): + depth++; + if(depth > 0){ templateInit << token; } + break; + + case wxT('>'): + if(depth > 0){ templateInit << token; } + depth--; + break; + + case wxT('{'): + case wxT('('): + case wxT('['): + if(depth > 0){ templateInit << token; } + depth++; + break; + + case wxT('}'): + case wxT(')'): + case wxT(']'): + if(depth > 0){ templateInit << token; } + depth--; + break; + + default: + if(depth > 0){ templateInit << token; } + break; + } + } + return true; +} + +wxString TagEntry::GetDeleteOneStatement() +{ + return wxT("DELETE FROM TAGS WHERE Kind=? AND Signature=? AND Path=?"); +} + +wxString TagEntry::GetUpdateOneStatement() +{ + return wxT("UPDATE TAGS SET Name=?, File=?, Line=?, Access=?, Pattern=?, Parent=?, Inherits=?, Typeref=?, Scope=? WHERE Kind=? AND Signature=? AND Path=?"); +} + +wxString TagEntry::GetInsertOneStatement() +{ + return wxT("INSERT INTO TAGS VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); +} diff --git a/CodeLite/entry.h b/CodeLite/entry.h new file mode 100644 index 0000000000..580385ac8d --- /dev/null +++ b/CodeLite/entry.h @@ -0,0 +1,271 @@ +#ifndef CODELITE_ENTRY_H +#define CODELITE_ENTRY_H + +#include "db_record.h" +#include +#include "readtags.h" +#include +#include +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // + +/** + * TagEntry is a persistent object which is capable of storing and loading itself from + * various inputs: + * - tagEntry (ctags structure) + * - wxSQLite3ResultSet - from the database + * + * It contains all the knowledge of storing and retrieving itself from the database + * + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 11-11-2006 + * \author Eran + */ +class WXDLLIMPEXP_CL TagEntry : public DbRecord +{ + wxString m_path; ///< Tag full path + wxString m_file; ///< File this tag is found + int m_lineNumber; ///< Line number + wxString m_pattern; ///< A pattern that can be used to locate the tag in the file + wxString m_kind; ///< Member, function, class, typedef etc. + wxString m_parent; ///< Direct parent + wxTreeItemId m_hti; ///< Handle to tree item, not persistent item + wxString m_name; ///< Tag name (short name, excluding any scope names) + std::map m_extFields; ///< Additional extension fields + long m_position; ///< Position in the document - optional field, not persistent item + long m_id; + wxString m_scope; + +public: + /** + * Construct a TagEntry from tagEntry struct + * \param entry Tag entry + */ + TagEntry(const tagEntry& entry); + + /** + * Default constructor. + */ + TagEntry(); + + /** + * Copy constructor. + */ + TagEntry(const TagEntry& rhs); + + /** + * Construct a tag entry from db record. + * \param rs Result set + */ + TagEntry(wxSQLite3ResultSet& rs); + + /** + * \param rhs Source to copy from (right hand side) + * \return this + */ + TagEntry& operator=(const TagEntry& rhs); + + /** + * Compare two TagEntry objects. + * \param rhs Right hand side + * \return true if identical, false otherwise + */ + bool operator==(const TagEntry& rhs); + + /** + * Destructor + */ + virtual ~TagEntry(); + + /** + * Construct a TagEntry from tagEntry struct. + * \param entry Tag entry + */ + void Create(const tagEntry& entry); + + /** + * Construct a TagEntry from values. + * \param fileName File name + * \param name Tag name + * \param lineNumber Tag line number + * \param pattern Pattern + * \param kind Tag kind (class, struct, etc) + * \param extFields Map of extenstion fields (key:value) + * \param project Project name + */ + void Create(const wxString &fileName, + const wxString &name, + int lineNumber, + const wxString &pattern, + const wxString &kind, + std::map& extFields); + + /** + * Test if this entry has been initialised. + * \return true if this tag entry has been initialised + */ + const bool IsOk() const { return GetKind() != _T(""); } + + /** + * Test of this tag is a container (class, union, struct or namespace + */ + const bool IsContainer() const; + + //------------------------------------------ + // Operations + //------------------------------------------ + int GetId() const { return m_id; } + void SetId(int id) { m_id = id;} + + const wxString& GetName() const { return m_name;} + void SetName(const wxString& name) { m_name = name; } + + const wxString& GetPath() const { return m_path;} + void SetPath(const wxString& path) { m_path = path; } + + const wxString& GetFile() const { return m_file;} + void SetFile(const wxString& file) { m_file = file;} + + int GetLine() const { return m_lineNumber;} + void SetLine(int line) { m_lineNumber = line; } + + const wxString& GetPattern() const { return m_pattern; } + void SetPattern(const wxString& pattern) { m_pattern = pattern; } + + wxString GetKind() const; + void SetKind(const wxString& kind) { m_kind = kind; } + + const wxString& GetParent() const { return m_parent; } + void SetParent(const wxString& parent) { m_parent = parent; } + + wxTreeItemId& GetTreeItemId() { return m_hti; } + void SetTreeItemId(wxTreeItemId& hti) { m_hti = hti; } + + wxString GetAccess() const { return GetExtField(_T("access"));} + void SetAccess(const wxString &access){m_extFields[wxT("access")] = access;} + + wxString GetSignature() const { return GetExtField(_T("signature")); } + wxString GetInherits() const { return GetExtField(_T("inherits")); } + wxString GetTyperef() const { return GetExtField(_T("typeref")); } + + int GetPosition() const { return m_position; } + void SetPosition(int col) { m_position = col; } + + const wxString &GetScope() const {return m_scope;} + void SetScope(const wxString &scope){m_scope = scope;} + + /** + * \return Scope name of the tag. + * If path is empty in db or contains just the project name, it will return the literal . + * For project tags, an empty string is returned. + */ + wxString GetScopeName() const; + + /** + * Generate a Key for this tag based on its attributes + * \return tag key + */ + wxString Key() const; + + /** + * Generate a display name for this tag to be used by the symbol tree + * \return tag display name + */ + wxString GetDisplayName() const; + + /** + * Generate a full display name for this tag that includes: + * full scope + name + signature + * \return tag full display name + */ + wxString GetFullDisplayName() const; + + /** + * Return the actual name as described in the 'typeref' field + * \return real name or wxEmptyString + */ + wxString NameFromTyperef(wxString &templateInitList); + + /** + * Return the actual type as described in the 'typeref' field + * \return real name or wxEmptyString + */ + wxString TypeFromTyperef() const; + //------------------------------------------ + // Extenstion fields + //------------------------------------------ + wxString GetExtField(const wxString& extField) const + { + std::map::const_iterator iter = m_extFields.find(extField); + if(iter == m_extFields.end()) + return wxEmptyString; + return iter->second; + } + + //------------------------------------------ + // Misc + //------------------------------------------ + void Print(); + + + //------------------------------------------ + // Database operations + //------------------------------------------ + /** + * Save this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagExist, TagError + */ + virtual int Store(wxSQLite3Statement& insertPreparedStmnt); + + /** + * Update this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagError + */ + virtual int Update(wxSQLite3Statement& updatePreparedStmnt); + + /** + * Delete this record from db. + * \param deletePreparedStmnt Prepared statement for delete operation + * \return TagOk, TagError + */ + virtual int Delete(wxSQLite3Statement& deletePreparedStmnt); + + /** + * \return delete preapred statement + */ + virtual wxString GetDeleteOneStatement(); + + /** + * \return update preapred statement + */ + virtual wxString GetUpdateOneStatement(); + + /** + * \return insert preapred statement + */ + virtual wxString GetInsertOneStatement(); + + +private: + /** + * Update the path with full path (e.g. namespace::class) + * \param path path to add + */ + void UpdatePath(wxString & path); + bool TypedefFromPattern(const wxString &tagPattern, const wxString &typedefName, wxString &name, wxString &templateInit); +}; + +typedef SmartPtr TagEntryPtr; +#endif // CODELITE_ENTRY_H diff --git a/CodeLite/expression_result.cpp b/CodeLite/expression_result.cpp new file mode 100644 index 0000000000..da13f39690 --- /dev/null +++ b/CodeLite/expression_result.cpp @@ -0,0 +1,44 @@ +#include "expression_result.h" + +#define BOOL_TO_STR(b) b ? "true" : "false" + +ExpressionResult::ExpressionResult() +{ + Reset(); +} + +ExpressionResult::~ExpressionResult() +{ +} + +void ExpressionResult::Print() +{ + printf("%s\n", ToString().c_str()); +} + +std::string ExpressionResult::ToString() const +{ + char tmp[256]; + sprintf(tmp, "{m_name:%s, m_isFunc:%s, m_isTemplate:%s, m_isThis:%s, m_isaType:%s, m_isPtr:%s, m_scope:%s, m_templateInitList:%s}", + m_name.c_str(), + BOOL_TO_STR(m_isFunc), + BOOL_TO_STR(m_isTemplate), + BOOL_TO_STR(m_isThis), + BOOL_TO_STR(m_isaType), + BOOL_TO_STR(m_isPtr), + m_scope.c_str(), + m_templateInitList.c_str()); + return tmp; +} + +void ExpressionResult::Reset() +{ + m_isFunc = false; + m_name = ""; + m_isThis = false; + m_isaType = false; + m_isPtr = false; + m_scope = ""; + m_isTemplate = false; + m_templateInitList = ""; +} diff --git a/CodeLite/expression_result.h b/CodeLite/expression_result.h new file mode 100644 index 0000000000..b6e6a9221d --- /dev/null +++ b/CodeLite/expression_result.h @@ -0,0 +1,25 @@ +#ifndef EXPRESSION_RESULT_H +#define EXPRESSION_RESULT_H + +#include "string" + +class ExpressionResult +{ +public: + + bool m_isFunc; + std::string m_name; + bool m_isThis; + bool m_isaType; + bool m_isPtr; + std::string m_scope; + bool m_isTemplate; + std::string m_templateInitList; +public: + ExpressionResult(); + virtual ~ExpressionResult(); + void Reset(); + void Print(); + std::string ToString() const; +}; +#endif //EXPRESSION_RESULT_H diff --git a/CodeLite/extdbdata.h b/CodeLite/extdbdata.h new file mode 100644 index 0000000000..263da6aa1c --- /dev/null +++ b/CodeLite/extdbdata.h @@ -0,0 +1,13 @@ +#ifndef EXTDBDATA_H +#define EXTDBDATA_H + +#include + +struct ExtDbData { + wxString dbName; + wxString rootPath; + wxArrayString includeDirs; + bool attachDb; +}; + +#endif //EXTDBDATA_H diff --git a/CodeLite/fileutils.cpp b/CodeLite/fileutils.cpp new file mode 100644 index 0000000000..c2a0f6d9cf --- /dev/null +++ b/CodeLite/fileutils.cpp @@ -0,0 +1,53 @@ +#include "fileutils.h" +#include +#include "wx/string.h" +#include + +bool FileUtils::ReadFileUTF8(const wxFileName &fn, wxString &data) +{ + wxFFile file(fn.GetFullPath().GetData(), wxT("rb")); + if(file.IsOpened() == false) + { + // Nothing to be done + return false; + } + + if( file.Length() <= 0){ + return false; + } + + if( file.Length() > 0 ){ + data.Alloc(file.Length()); + } + + //read first two bytes to check if unicode detected + bool isUnic(false); + unsigned char bom[2]; + if(file.Length() >= 2){ + if(file.Read(bom, 2) == 2){ + if(bom[0] == 0xFE && bom[1] == 0xFF){ + //UTF16 + isUnic = true; + } + } + } + + size_t len(file.Length()); + wxFileOffset off(0); + if( isUnic ){ + //seek file to start to read the consumed two bytes + len -= 2; + off = 2; + } + + file.Seek(off); + + char *pdata = new char[len + 1]; + file.Read(pdata, len); + pdata[len] = 0; + + data = wxString::FromAscii(pdata); + file.Close(); + delete [] pdata; + return true; +} diff --git a/CodeLite/fileutils.h b/CodeLite/fileutils.h new file mode 100644 index 0000000000..7b95c44a09 --- /dev/null +++ b/CodeLite/fileutils.h @@ -0,0 +1,17 @@ +#ifndef FILEUTILS_H +#define FILEUTILS_H +#include "wx/filename.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +class WXDLLIMPEXP_CL FileUtils { +public: + static bool ReadFileUTF8(const wxFileName &fn, wxString &data); +}; +#endif //FILEUTILS_H diff --git a/CodeLite/function.cpp b/CodeLite/function.cpp new file mode 100644 index 0000000000..e4e5855566 --- /dev/null +++ b/CodeLite/function.cpp @@ -0,0 +1,31 @@ +#include "function.h" + +clFunction::clFunction() +{ + Reset(); +} + +clFunction::~clFunction() +{ +} + +void clFunction::Reset() +{ + m_name = ""; + m_scope = ""; + m_returnValue.Reset(); + m_name = ""; + m_signature = ""; + m_lineno = 0; + m_retrunValusConst = ""; +} + +void clFunction::Print() +{ + fprintf( stdout, "{m_name=%s, m_lineno=%d, m_scope=%s, m_signature=%s, m_retrunValusConst=%s\nm_returnValue=", + m_name.c_str(), m_lineno, m_scope.c_str(), m_signature.c_str(), m_retrunValusConst.c_str()); + m_returnValue.Print(); + fprintf( stdout, "}\n"); + fflush(stdout); +} + diff --git a/CodeLite/function.h b/CodeLite/function.h new file mode 100644 index 0000000000..024de41093 --- /dev/null +++ b/CodeLite/function.h @@ -0,0 +1,30 @@ +#ifndef FUNCTION_H +#define FUNCTION_H + +#include "string" +#include "list" +#include "variable.h" + +class clFunction +{ +public: + std::string m_name; + std::string m_scope; //functions' scope + std::string m_retrunValusConst; // is the return value a const? + std::string m_signature; + Variable m_returnValue; + int m_lineno; + +public: + clFunction(); + virtual ~clFunction(); + + //clear the class content + void Reset(); + + //print the variable to stdout + void Print(); +}; + +typedef std::list FunctionList; +#endif //FUNCTION_H diff --git a/CodeLite/language.cpp b/CodeLite/language.cpp new file mode 100644 index 0000000000..1c3676e3da --- /dev/null +++ b/CodeLite/language.cpp @@ -0,0 +1,1068 @@ +#include "precompiled_header.h" + +#include "language.h" +#include "variable.h" +#include "function.h" +#include "ctags_manager.h" +#include "y.tab.h" +#include +#include +#include "map" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +//=============================================================== +//defined in generated files from the yacc grammar: +//cpp_scope_garmmar.y +//cpp_variables_grammar.y +//expr_garmmar.y + +extern std::string get_scope_name(const std::string &in, std::vector &additionlNS, const std::map &ignoreTokens); +extern ExpressionResult &parse_expression(const std::string &in); +extern void get_variables(const std::string &in, VariableList &li, const std::map &ignoreTokens); +extern void get_functions(const std::string &in, FunctionList &li, const std::map &ignoreTokens); + +//=============================================================== + +Language::Language() + : m_expression(wxEmptyString) + , m_scanner(new CppScanner()) + , m_tokenScanner(new CppScanner()) +{ + // Initialise the braces map + m_braces['<'] = '>'; + m_braces['('] = ')'; + m_braces['['] = ']'; + m_braces['{'] = '}'; + + // C++ / C auto complete delimiters for tokens + std::vector delimArr; + delimArr.push_back(_T("::")); + delimArr.push_back(_T("->")); + delimArr.push_back(_T(".")); + SetAutoCompDeliemters(delimArr); +} + +/// Destructor +Language::~Language() +{ +} + +/// Return the visible scope until pchStopWord is encountered +wxString Language::GetScope(const wxString& srcString) +{ + wxArrayString scope_stack; + wxString currScope; + int type; + + // Initialize the scanner with the string to search + const wxCharBuffer scannerText = _C(srcString); + m_scanner->SetText( scannerText.data()); + bool changedLine = false; + bool prepLine = false; + int curline = 0; + while (true) { + type = m_scanner->yylex(); + + + // Eof ? + if (type == 0) { + if (!currScope.empty()) + scope_stack.push_back(currScope); + break; + } + + // eat up all tokens until next line + if ( prepLine && m_scanner->lineno() == curline) { + wxString word = _U(m_scanner->YYText()); + currScope += _T(" "); + currScope += word; + continue; + } + + prepLine = false; + + // Get the current line number, it will help us detect preprocessor lines + changedLine = (m_scanner->lineno() > curline); + if (changedLine) { + currScope << wxT("\n"); + } + + curline = m_scanner->lineno(); + + // For debug purposes + wxString word = _U(m_scanner->YYText()); + switch (type) { + case (int)'(': + currScope += _T("\n"); + scope_stack.push_back(currScope); + currScope = wxT("(\n"); + break; + case (int)'{': + currScope += _T("\n"); + scope_stack.push_back(currScope); + currScope = _T("{\n"); + break; + case (int)')': + // Discard the current scope since it is completed + if ( !scope_stack.empty() ) { + currScope = scope_stack.back(); + scope_stack.pop_back(); + currScope += _T("()"); + } else + currScope = wxEmptyString; + break; + case (int)'}': + // Discard the current scope since it is completed + if ( !scope_stack.empty() ) { + currScope = scope_stack.back(); + scope_stack.pop_back(); + currScope += _T("\n{}\n"); + } else { + currScope = wxEmptyString; + } + break; + case (int)'#': + if (changedLine) { + // We are at the start of a new line + // consume everything until new line is found or end of text + currScope += _T(" "); + currScope += _U(m_scanner->YYText()); + prepLine = true; + break; + } + default: + currScope += _T(" "); + currScope += _U(m_scanner->YYText()); + break; + } + } + + m_scanner->Reset(); + + if (scope_stack.empty()) + return srcString; + + currScope = wxEmptyString; + size_t i = 0; + for (; i < scope_stack.size(); i++) + currScope += scope_stack[i]; + + // if the current scope is not empty, terminate it with ';' and return + if ( currScope.IsEmpty() == false ) { + currScope += _T(";"); + return currScope; + } + + return srcString; +} + +bool Language::NextToken(wxString &token, wxString &delim) +{ + int type(0); + int depth(0); + while ( (type = m_tokenScanner->yylex()) != 0 ) { + switch (type) { + case CLCL: + case wxT('.'): + case lexARROW: + if (depth == 0) { + delim = _U(m_tokenScanner->YYText()); + return true; + } else { + token << wxT(" ") << _U(m_tokenScanner->YYText()); + } + break; + case wxT('<'): + case wxT('['): + case wxT('('): + case wxT('{'): + depth++; + token << wxT(" ") << _U(m_tokenScanner->YYText()); + break; + case wxT('>'): + case wxT(']'): + case wxT(')'): + case wxT('}'): + depth--; + token << wxT(" ") << _U(m_tokenScanner->YYText()); + break; + default: + token << wxT(" ") << _U(m_tokenScanner->YYText()); + break; + } + } + return false; +} + +void Language::SetAutoCompDeliemters(const std::vector &delimArr) +{ + m_delimArr = delimArr; +} + +bool Language::ProcessExpression(const wxString& stmt, + const wxString& text, + const wxFileName &fn, int lineno, + wxString &typeName, //output + wxString &typeScope)//output +{ + ExpressionResult result; + wxString statement( stmt ); + bool evaluationSucceeded = true; + + // Trim whitespace from right and left + static wxString trimString(_T("{};\r\n\t\v ")); + + statement.erase(0, statement.find_first_not_of(trimString)); + statement.erase(statement.find_last_not_of(trimString)+1); + wxString dbgStmnt = statement; + + // First token is handled sepratly + wxString word; + wxString oper; + wxString lastFuncSig; + wxString accumulatedScope; + + std::vector tags; + wxString visibleScope = GetScope(text); + std::vector additionalScopes; + wxString scopeName = GetScopeName(text, &additionalScopes); + + TagEntryPtr tag = TagsManagerST::Get()->FunctionFromFileLine(fn, lineno); + if (tag) { + lastFuncSig = tag->GetSignature(); + } + + wxString parentTypeName, parentTypeScope; + wxString grandParentTypeName, grandParentTypeScope; + + //get next token using the tokenscanner object + m_tokenScanner->SetText(_C(statement)); + Variable parent; + while (NextToken(word, oper)) { + m_parentVar.Reset(); + wxString templateInitList; + result = ParseExpression(word); + word.clear(); + + //parsing failed? + if (result.m_name.empty()) { + evaluationSucceeded = false; + break; + } + + //no tokens before this, what we need to do now, is find the TagEntry + //that corrseponds to the result + if (result.m_isaType) { + //------------------------------------------- + // Handle type (usually when casting is found + //-------------------------------------------- + + typeScope = result.m_scope.empty() ? wxT("") : _U(result.m_scope.c_str()); + typeName = _U(result.m_name.c_str()); + } else if (result.m_isThis) { + //----------------------------------------- + // special handle for 'this' keyword + //----------------------------------------- + + typeScope = result.m_scope.empty() ? wxT("") : _U(result.m_scope.c_str()); + if (scopeName == wxT("")) { + evaluationSucceeded = false; + break; + } + if (oper == wxT("::")) { + evaluationSucceeded = false; + break; + } // if(oper == wxT("::")) + + if (result.m_isPtr && oper == wxT(".")) { + evaluationSucceeded = false; + break; + } + if (!result.m_isPtr && oper == wxT("->")) { + evaluationSucceeded = false; + break; + } + typeName = scopeName; + } else { + //------------------------------------------- + // found an identifier + //-------------------------------------------- + wxString scopeToSearch(scopeName); + if (parentTypeScope.IsEmpty() == false && parentTypeScope != wxT("")) { + scopeToSearch = parentTypeScope + wxT("::") + parentTypeName; + } else if ((parentTypeScope.IsEmpty()|| parentTypeScope == wxT("")) && !parentTypeName.IsEmpty()) { + scopeToSearch = parentTypeName; + } + + //-------------------------------------------------------------------------------------------- + //keep the scope that we searched so far. The accumumlated scope + //are used for types, for scenarios like: + //void Box::GetWidth() + //{ + // Rectangle:: + // + //trying to process the above code, will yield searching Rectangle inside Box scope, since we are + //inside Box's GetWidth() function. + //the correct behavior shuold be searching for Rectangle in the global scope. + //to correct this, we do special handling for Qualifier followed by coloon:colon operator (::) + if (accumulatedScope.IsEmpty() == false) { + if (accumulatedScope == wxT("")) { + accumulatedScope = scopeToSearch; + } else { + accumulatedScope << wxT("::"); + accumulatedScope << scopeToSearch; + } + } else { + accumulatedScope << wxT(""); + } + + if (oper == wxT("::")) { + //if the operator was something like 'Qualifier::', it is safe to assume + //that the secope to be searched is the full expression + scopeToSearch = accumulatedScope; + } + + //get the derivation list of the typename + bool res(false); + res = TypeFromName( _U(result.m_name.c_str()), + visibleScope, + lastFuncSig, + scopeToSearch, + additionalScopes, + parentTypeName.IsEmpty(), + typeName, //output + typeScope); //output + if (!res) { + evaluationSucceeded = false; + break; + } + + //do typedef subsitute + while (OnTypedef(typeName, typeScope, templateInitList, scopeName)); + //do template subsitute + if (OnTemplates(typeName, typeScope, parent)) { + //do typedef subsitute + while (OnTypedef(typeName, typeScope, templateInitList, scopeName)); + } + + //try match any overloading operator to the typeName + wxString tmpTypeName(typeName); + if ( oper == wxT("->") && OnArrowOperatorOverloading(typeName, typeScope) ) { + + //there is an operator overloading for -> + //do the whole typedef/template subsitute again + while (OnTypedef(typeName, typeScope, templateInitList, scopeName)); + + //When template is found, replace the typeName with the temporary type name + //usually it will replace 'T' with the parent type, such as + //'Singleton' + if (templateInitList.IsEmpty() == false) { + m_parentVar.m_isTemplate = true; + m_parentVar.m_templateDecl = _C(templateInitList); + m_parentVar.m_type = _C(tmpTypeName); + m_parentVar.m_typeScope = _C(typeScope); + } + + //do template subsitute + if (OnTemplates(typeName, typeScope, m_parentVar)) { + //do typedef subsitute + while (OnTypedef(typeName, typeScope, templateInitList, scopeName)); + } + } + } + + parent = m_parentVar; + + //Keep the information about this token for next iteration + if (!parent.m_isTemplate && result.m_isTemplate) { + + parent.m_isTemplate = true; + parent.m_templateDecl = result.m_templateInitList; + parent.m_type = _C(typeName); + parent.m_typeScope = _C(typeScope); + + } else if (templateInitList.IsEmpty() == false) { + + parent.m_isTemplate = true; + parent.m_templateDecl = _C(templateInitList); + parent.m_type = _C(typeName); + parent.m_typeScope = _C(typeScope); + } + + parentTypeName = typeName; + parentTypeScope = typeScope; + } + return evaluationSucceeded; +} + +bool Language::OnTemplates(wxString &typeName, wxString &typeScope, Variable &parent) +{ + bool res (false); + //make sure that the type really exist + TagsManager *tagsManager = TagsManagerST::Get(); + if (!tagsManager->IsTypeAndScopeExists(typeName, typeScope)) { + if (parent.m_isTemplate) { + //we need to test the parent declaration line + std::vector< TagEntryPtr > tagsVec; + wxString parent_scope = _U(parent.m_typeScope.c_str()); + + parent_scope.IsEmpty() ? parent_scope = wxT("") : parent_scope; + wxString parent_type = _U(parent.m_type.c_str()); + tagsManager->TagsByScopeAndName(parent_scope, parent_type, tagsVec, ExactMatch); + if (tagsVec.size() == 1) { + //we got a match in the database + TagEntryPtr tt = tagsVec.at(0); + wxString pattern = tt->GetPattern(); + + //extract the template declartion list + CppScanner declScanner; + declScanner.SetText( _C(pattern) ); + bool foundTemplate(false); + int type (0); + while ( !foundTemplate ) { + type = declScanner.yylex(); + if ( type == 0 ) //eof + break; + + switch (type) { + case IDENTIFIER: { + wxString word = _U(declScanner.YYText()); + if (word == wxT("template")) { + foundTemplate = true; + break; + } + } + default: + //do nothing + break; + } + } + + wxArrayString templateDecl; // the names of the classes/typenames 'T' + wxArrayString templateImpl; // the actual initialisation list + + CppScanner implScanner; + implScanner.SetText(parent.m_templateDecl.c_str()); + ParseTemplateInitList(&implScanner, templateImpl); + + if ( foundTemplate ) { + //we found our template declaration + ParseTemplateArgs(&declScanner, templateDecl); + } + + //we now got two lists, one contains the template name 'T' etc. + //and the second is the actual types (initialisation) + //we loop over the template list, and search for our real type + for (size_t i=0; i< templateDecl.GetCount(); i++) { + if (templateDecl.Item(i) == typeName) { + if (templateImpl.GetCount() > i) { + std::vector tags_vec; + tagsManager->FindByPath(templateImpl.Item(i), tags_vec); + //replace template arguments with actual values + if (tags_vec.size() == 1) { + TagEntryPtr t = tags_vec.at(0); + typeName = t->GetName(); + typeScope = t->GetScope(); + res = true; + } + break; + } + } + } + } + } + } + return res; +} + +bool Language::OnTypedef(wxString &typeName, wxString &typeScope, wxString &templateInitList, const wxString &optionalScope) +{ + //if the match is typedef, try to replace it with the actual + //typename + bool res (false); + TagsManager *tagsManager = TagsManagerST::Get(); + std::vector tags; + wxString path; + if (typeScope == wxT("")) { + path << typeName; + } else { + path << typeScope << wxT("::") << typeName; + } + + tagsManager->FindByPath(path, tags); + if (tags.empty()) { + //try again using the additional scope + if (optionalScope.IsEmpty() == false) { + path.Clear(); + if (optionalScope == wxT("")) { + path << typeName; + } else { + path << optionalScope << wxT("::") << typeName; + } + tagsManager->FindByPath(path, tags); + } + } + + if (tags.size() == 1) { + //we have a single match, test to see if it a typedef + TagEntryPtr tag = tags.at(0); + if (tag->GetKind() == wxT("typedef")) { + wxString realName = tag->NameFromTyperef(templateInitList); + if (realName.IsEmpty() == false) { + typeName = realName; + typeScope = tag->GetScope(); + + //incase the realName already includes the scope, remove it from the typename + if (!typeScope.IsEmpty() && typeName.StartsWith(typeScope, &typeName)) { + //remove any :: prefix + typeName.StartsWith(wxT("::"), &typeName); + } + res = true; + } + } + } + return res; +} + +void Language::ParseTemplateArgs(CppScanner *scanner, wxArrayString &argsList) +{ + int type = scanner->yylex(); + wxString word = _U(scanner->YYText()); + + //Eof? + if (type == 0) { + return; + } + if (type != (int)'<') { + return; + } + + bool nextIsArg(false); + bool cont(true); + while ( cont ) { + type = scanner->yylex(); + if (type == 0) { + break; + } + + switch (type) { + case lexCLASS: + case IDENTIFIER: { + wxString word = _U(scanner->YYText()); + if (word == wxT("class") || word == wxT("typename")) { + nextIsArg = true; + + } else if (nextIsArg) { + argsList.Add(word); + nextIsArg = false; + } + break; + } + case (int)'>': + cont = false; + break; + default: + break; + } + } +} + +void Language::ParseTemplateInitList(CppScanner *scanner, wxArrayString &argsList) +{ + int type = scanner->yylex(); + wxString word = _U(scanner->YYText()); + + //Eof? + if (type == 0) { + return; + } + if (type != (int)'<') { + return; + } + + int depth(1); + wxString typeName; + while ( depth > 0 ) { + type = scanner->yylex(); + if (type == 0) { + break; + } + + switch (type) { + case (int)',': { + if (depth == 1) { + argsList.Add(typeName.Trim().Trim(false)); + typeName.Empty(); + } + break; + } + case (int)'>': + depth--; + break; + case (int)'<': + depth++; + break; + case (int)'*': + case (int)'&': + //ignore pointers & references + break; + default: + if (depth == 1) { + typeName << _U(scanner->YYText()); + } + break; + } + } + + if (typeName.Trim().Trim(false).IsEmpty() == false) { + argsList.Add(typeName.Trim().Trim(false)); + } + typeName.Empty(); +} + +void Language::ParseComments(const wxFileName &fileName, std::vector *comments) +{ + wxString content; + try { + wxFFile f(fileName.GetFullPath().GetData()); + if ( !f.IsOpened() ) + return; + + // read the content of the file and parse it + f.ReadAll( &content ); + f.Close(); + } catch ( ... ) { + return; + } + + m_scanner->Reset(); + m_scanner->SetText( _C(content) ); + m_scanner->KeepComment( 1 ); + + int type( 0 ); + + wxString comment(_T("")); + int line(-1); + + while ( true ) { + type = m_scanner->yylex(); + if ( type == 0 ) //eof + break; + + + // we keep only comments + if ( type == CPPComment ) { + // incase the previous comment was one line above this one, + // concatenate them to a single comment + if ( m_scanner->lineno() - 1 == line ) { + comment << m_scanner->GetComment(); + line = m_scanner->lineno(); + m_scanner->ClearComment(); + continue; + } + + // first time or no comment is buffer + if ( comment.IsEmpty() ) { + comment = m_scanner->GetComment(); + line = m_scanner->lineno(); + m_scanner->ClearComment(); + continue; + } + + if ( comment.IsEmpty() == false ) { + comments->push_back( static_cast( new Comment( comment, fileName.GetFullPath(), line - 1)) ); + comment.Empty(); + line = -1; + } + + comments->push_back( static_cast( new Comment( m_scanner->GetComment(), fileName.GetFullPath(), m_scanner->lineno()-1)) ); + m_scanner->ClearComment(); + } else if ( type == CComment ) { + comments->push_back( static_cast( new Comment( m_scanner->GetComment(), fileName.GetFullPath(), m_scanner->lineno()) ) ); + m_scanner->ClearComment(); + } + } + + if ( comment.IsEmpty() == false ) { + comments->push_back( static_cast( new Comment( comment, fileName.GetFullPath(), line - 1) ) ); + } + + // reset the scanner + m_scanner->KeepComment( 0 ); + m_scanner->Reset(); +} + +wxString Language::GetScopeName(const wxString &in, std::vector *additionlNS) +{ + std::string lastFunc, lastFuncSig; + std::vector moreNS; + FunctionList fooList; + + const wxCharBuffer buf = _C(in); + + TagsManager *mgr = TagsManagerST::Get(); + wxArrayString prep = mgr->GetCtagsOptions().GetPreprocessor(); + std::map ignoreTokens; + + for (size_t i=0; i< prep.GetCount(); i++) { + const wxCharBuffer token = _C(prep.Item(i)); + ignoreTokens[ token.data() ] = true; + } + + std::string scope_name = get_scope_name(buf.data(), moreNS, ignoreTokens); + wxString scope = _U(scope_name.c_str()); + if (scope.IsEmpty()) { + scope = wxT(""); + } + if (additionlNS) { + for (size_t i=0; ipush_back(_U(moreNS.at(i).c_str())); + } + } + return scope; +} + +ExpressionResult Language::ParseExpression(const wxString &in) +{ + const wxCharBuffer buf = _C(in); + ExpressionResult result = parse_expression(buf.data()); + return result; +} + +bool Language::TypeFromName(const wxString &name, + const wxString &text, + const wxString &extraScope, + const wxString &scopeName, + const std::vector &moreScopes, + bool firstToken, + wxString &type, + wxString &typeScope) +{ + //try local scope + VariableList li; + FunctionList fooList; + + //first we try to match the current scope + std::vector tags; + + TagsManager *mgr = TagsManagerST::Get(); + wxArrayString prep = mgr->GetCtagsOptions().GetPreprocessor(); + std::map ignoreTokens; + + for (size_t i=0; i< prep.GetCount(); i++) { + const wxCharBuffer token = _C(prep.Item(i)); + ignoreTokens[ token.data() ] = true; + } + + if (!DoSearchByNameAndScope(name, scopeName, tags, type, typeScope)) { + if (firstToken) { + //can we test visible scope? + const wxCharBuffer buf = _C(text); + const wxCharBuffer buf2 = _C(extraScope); + get_variables(buf.data(), li, ignoreTokens); + get_variables(buf2.data(), li, ignoreTokens); + + //search for a full match in the returned list + for (VariableList::iterator iter = li.begin(); iter != li.end(); iter++) { + Variable var = (*iter); + wxString var_name = _U(var.m_name.c_str()); + if (var_name == name) { + type = _U(var.m_type.c_str()); + typeScope = var.m_typeScope.empty() ? wxT("") : _U(var.m_typeScope.c_str()); + + m_parentVar = var; + + //support for 'using namespace' + if (typeScope == wxT("")) { + return CorrectUsingNamespace(type, typeScope, moreScopes, tags); + } + return true; + } + } + + //failed to find it in the local scope + //try the additional scopes + for (size_t i=0; i")) { + return CorrectUsingNamespace(type, typeScope, moreScopes, tags); + } + return true; + } + } + } + return false; + } else { + if (tags.size() > 0) { + const wxCharBuffer buf = _C(tags.at(0)->GetPattern()); + get_variables(buf.data(), li, ignoreTokens); + //search for a full match in the returned list + for (VariableList::iterator iter = li.begin(); iter != li.end(); iter++) { + Variable var = (*iter); + wxString var_name = _U(var.m_name.c_str()); + if (var_name == name) { + m_parentVar = var; + } + } + } else { + m_parentVar.m_name = _C(name); + m_parentVar.m_type = _C(type); + m_parentVar.m_typeScope = _C(typeScope); + } + return CorrectUsingNamespace(type, typeScope, moreScopes, tags); + } +} + +bool Language::CorrectUsingNamespace(wxString &type, wxString &typeScope, const std::vector &moreScopes, std::vector &tags) +{ + if (moreScopes.empty() == false) { + if (!TagsManagerST::Get()->IsTypeAndScopeExists(type, typeScope)) { + //the type does not exist in the global scope, + //try the additional scopes + for (size_t i=0; i &tags, + wxString &type, + wxString &typeScope) +{ + TagsManagerST::Get()->FindByNameAndScope(name, scopeName, tags); + if (tags.size() == 1) { + TagEntryPtr tag(tags.at(0)); + //we have a single match! + if (tag->GetKind() == wxT("function") || tag->GetKind() == wxT("prototype")) { + clFunction foo; + if (FunctionFromPattern(tag->GetPattern(), foo)) { + type = _U(foo.m_returnValue.m_type.c_str()); + typeScope = foo.m_returnValue.m_typeScope.empty() ? wxT("") : _U(foo.m_returnValue.m_typeScope.c_str()); + return true; + } // if(FunctionFromPattern(tag->GetPattern(), foo)) + return false; + } // if(tag->GetKind() == wxT("function") || tag->GetKind() == wxT("prototype")) + else if (tag->GetKind() == wxT("member") || tag->GetKind() == wxT("variable")) { + Variable var; + if (VariableFromPattern(tag->GetPattern(), var)) { + type = _U(var.m_type.c_str()); + typeScope = var.m_typeScope.empty() ? wxT("") : _U(var.m_typeScope.c_str()); + return true; + } + return false; + } else { + type = tag->GetName(); + typeScope = tag->GetScopeName(); + } + return true; + } else if (tags.size() > 1) { + //if list contains more than one entry, check if all entries are of type 'function' or 'prototype' + //(they can be mixed). If all entries are of one of these types, test their return value, + //if all have the same return value, then we are ok + clFunction foo; + wxString tmpType, tmpTypeScope; + bool allthesame(true); + for (size_t i=0; iGetPattern(); + if (!FunctionFromPattern(tag->GetPattern(), foo)) { + allthesame = false; + break; + } + + tmpType = _U(foo.m_returnValue.m_type.c_str()); + tmpTypeScope = foo.m_returnValue.m_typeScope.empty() ? wxT("") : _U(foo.m_returnValue.m_typeScope.c_str()); + if (i > 0 && (tmpType != type || tmpTypeScope != typeScope)) { + allthesame = false; + break; + } + type = tmpType; + typeScope = tmpTypeScope; + } + + if (allthesame && !tags.empty()) { + return true; + } + wxString msg; + msg << wxT("Too many matches for ") << name << wxT(", using scope: ") << scopeName; +// wxLogMessage(msg); + return false; + } + return false; +} + +bool Language::VariableFromPattern(const wxString &in, Variable &var) +{ + VariableList li; + wxString pattern(in); + //we need to extract the return value from the pattern + pattern = pattern.BeforeLast(wxT('$')); + pattern = pattern.AfterFirst(wxT('^')); + + const wxCharBuffer patbuf = _C(pattern); + li.clear(); + + TagsManager *mgr = TagsManagerST::Get(); + wxArrayString prep = mgr->GetCtagsOptions().GetPreprocessor(); + std::map ignoreTokens; + + for (size_t i=0; i< prep.GetCount(); i++) { + const wxCharBuffer token = _C(prep.Item(i)); + ignoreTokens[ token.data() ] = true; + } + + get_variables(patbuf.data(), li, ignoreTokens); + if (li.size() == 1) { + var = (*li.begin()); + return true; + } // if(li.size() == 1) + return false; +} + +bool Language::FunctionFromPattern(const wxString &in, clFunction &foo) +{ + FunctionList fooList; + wxString pattern(in); + //we need to extract the return value from the pattern + pattern = pattern.BeforeLast(wxT('$')); + pattern = pattern.AfterFirst(wxT('^')); + + pattern = pattern.Trim(); + pattern = pattern.Trim(false); + if (pattern.EndsWith(wxT(";"))) { + pattern = pattern.RemoveLast(); + } + + //a limitiation of the function parser... + pattern << wxT(';'); + + TagsManager *mgr = TagsManagerST::Get(); + wxArrayString prep = mgr->GetCtagsOptions().GetPreprocessor(); + std::map ignoreTokens; + + for (size_t i=0; i< prep.GetCount(); i++) { + const wxCharBuffer token = _C(prep.Item(i)); + ignoreTokens[ token.data() ] = true; + } + + const wxCharBuffer patbuf = _C(pattern); + get_functions(patbuf.data(), fooList, ignoreTokens); + if (fooList.size() == 1) { + foo = (*fooList.begin()); + return true; + } else if (fooList.size() == 0) { + //fail to parse the statement, assume we got a broken pattern + //(this can happen because ctags keeps only the first line of a function which was declared + //over multiple lines) + //do some work on the input buffer + if (pattern.EndsWith(wxT(";"))) { + pattern = pattern.RemoveLast(); + } + if (pattern.EndsWith(wxT(","))) { + pattern = pattern.RemoveLast(); + } + pattern << wxT(");"); + const wxCharBuffer patbuf1 = _C(pattern); + get_functions(patbuf1.data(), fooList, ignoreTokens); + if (fooList.size() == 1) { + foo = (*fooList.begin()); + return true; + } + } + return false; +} + +void Language::GetLocalVariables(const wxString &in, std::vector &tags, const wxString &name, SearchFlags flags) +{ + VariableList li; + Variable var; + wxString pattern(in); + + const wxCharBuffer patbuf = _C(pattern); + li.clear(); + + TagsManager *mgr = TagsManagerST::Get(); + wxArrayString prep = mgr->GetCtagsOptions().GetPreprocessor(); + std::map ignoreTokens; + + for (size_t i=0; i< prep.GetCount(); i++) { + const wxCharBuffer token = _C(prep.Item(i)); + ignoreTokens[ token.data() ] = true; + } + + get_variables(patbuf.data(), li, ignoreTokens); + VariableList::iterator iter = li.begin(); + for (; iter != li.end(); iter++) { + var = (*iter); + wxString tagName = _U(var.m_name.c_str()); + + //if we have name, collect only tags that matches name + if (!name.IsEmpty()) { + if (flags == PartialMatch && !tagName.StartsWith(name)) + continue; + if (flags == ExactMatch && tagName != name) + continue; + } + + TagEntryPtr tag(new TagEntry()); + tag->SetName(tagName); + tag->SetKind(wxT("variable")); + tag->SetParent(wxT("")); + tag->SetAccess(wxT("public")); + tag->SetPattern(_U(var.m_pattern.c_str())); + tags.push_back(tag); + } +} + +bool Language::OnArrowOperatorOverloading(wxString &typeName, wxString &typeScope) +{ + bool ret(false); + + //collect all functions of typename + std::vector< TagEntryPtr > tags; + wxString scope; + if (typeScope == wxT("")) + scope << typeName; + else + scope << typeScope << wxT("::") << typeName; + + //this function will retrieve the ineherited tags as well + TagsManagerST::Get()->TagsByScope(scope, tags); + if(tags.empty() == false){ + //loop over the tags and scan for operator -> overloading + for(std::vector< TagEntryPtr >::size_type i=0; i< tags.size(); i++){ + wxString pattern = tags.at(i)->GetPattern(); + if(pattern.Contains(wxT("operator")) && pattern.Contains(wxT("->"))){ + //we found our overloading operator + //extract the 'real' type from the pattern + clFunction f; + if(FunctionFromPattern(pattern, f)){ + typeName = _U(f.m_returnValue.m_type.c_str()); + typeScope = f.m_returnValue.m_typeScope.empty() ? wxT("") : _U(f.m_returnValue.m_typeScope.c_str()); + ret = true; + break; + } else { + //failed to extract the return value from the patterm + //fallback to the current behavior + break; + } + } + } + } + return ret; +} + diff --git a/CodeLite/language.h b/CodeLite/language.h new file mode 100644 index 0000000000..15fc0307cf --- /dev/null +++ b/CodeLite/language.h @@ -0,0 +1,216 @@ +#ifndef CODELITE_LANGUAGE_H +#define CODELITE_LANGUAGE_H + +#include "tokenizer.h" +#include "cpp_scanner.h" +#include "y.tab.h" +#include "singleton.h" +#include "entry.h" +#include +#include "db_record.h" +#include "expression_result.h" +#include "variable.h" +#include "function.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else +# define WXDLLIMPEXP_CL +#endif + +enum SearchFlags +{ + PartialMatch = 1, + ExactMatch = 2 +}; + +/** + * Language, a helper class that parses (currently) C/C++ code. + * It conatains all the parsing of small fragments of code, in places where + * ctags chosose to ignore (for example, ctags provides us with a member name, + * but it does not provide us with its qualifier). + * + * Whenever possible, it is advised to use TagsManager API instead of Language API. + * + * \ingroup CodeLite + * \date 09-02-2006 + * \author Eran + */ +class WXDLLIMPEXP_CL Language +{ + friend class Singleton; + +public: + /** + * Return the visible scope of syntax starting at depth zero. + * + * For example, given the following srcString: + * \code + * int main() + * { + * { + * int i =0; + * } + * } + * \endcode + * + * the output will be: + * \code + * int main() + * { + * ; + * } + * \code + * + * \note The scopes with depth greater then 0 will be removed. + * This function is useful for searching for local members. + * \param srcString Input string + * \return visible scope + */ + wxString GetScope(const wxString& srcString); + + /** + * Set the language specific auto completion delimeteres, for example: for C++ you should populate + * the array with { . , -> , :: } + * \param delimArr delimeter array + */ + void SetAutoCompDeliemters(const std::vector& delimArr); + + /** + * Parse comments from source file + * \param name file name + * \param comments [output] returned vector of comments + */ + void ParseComments(const wxFileName &fileName, std::vector* comments); + + //========================================================== + // New API based on the yacc grammar files + //========================================================== + + /** + * Evaluate a C++ expression. for example, the following expression: '((wxFlatNotebook*)book)->' + * will be processed into typeName=wxFlatNotebook, and typeScope= (assuming wxFlatNotebook is not + * placed within any namespace) + * \param stmt c++ expression + * \param text text where this expression was found + * \param fn filename context + * \param lineno current line number + * \param typeName [output] + * \param typeScope [output] + * \return true on success, false otherwise. The output fields are only to be checked with the return + * valus is 'true' + */ + bool ProcessExpression(const wxString& stmt, const wxString& text, const wxFileName &fn, int lineno, wxString &typeName, wxString &typeScope); + + /** + * return scope name from given input string + * \param in input string + * \return scope name or empty string + */ + wxString GetScopeName(const wxString &in, std::vector *additionlNS); + + /** + * parse an expression and return the result. this functions uses + * the sqlite database as its symbol table + * \param in input string expression + * \return ExpressionResult, if it fails to parse it, check result.m_name.empty() for success + */ + ExpressionResult ParseExpression(const wxString &in); + + /** + * get the name's type, using local scope when possible. if parsing of local scope fails to find + * a match, try the symbol database + * \param name name to search for + * \param text the scope + * \param scopeName the scope name + * \param firstToken set to true if the 'name' is the first token in the chain (myClass.some_func(). --> when testing for some_func(), firstToken = false + * and when testing myClass. --> first token is set to true + * \param type [output] name's type, incase 'name' is matched to a function, type will contain the type of the reutrn value of the function + * \param typeScope [output] type's scope + * \return true on success false otherwise + */ + bool TypeFromName( const wxString &name, + const wxString &text, + const wxString &extraScope, + const wxString &scopeName, + const std::vector &moreScopes, + bool firstToken, + wxString &type, + wxString &typeScope); + + /** + * Collect local variables from given scope text (in) and an optional symbol name + * \param in scope to search for + * \param tags output, since we dont have full information about each token, all local variables returned are of type + * 'variable' with public access + * \param name optional name to look for (name can be partial). + */ + void GetLocalVariables(const wxString &in, std::vector &tags, const wxString &name = wxEmptyString, SearchFlags flag = PartialMatch); + + + bool VariableFromPattern(const wxString &pattern, Variable &var); + bool FunctionFromPattern(const wxString &pattern, clFunction &foo); + +private: + bool DoSearchByNameAndScope(const wxString &name, + const wxString &scopeName, + std::vector &tags, + wxString &type, + wxString &typeScope); + bool CorrectUsingNamespace(wxString &type, wxString &typeScope, const std::vector &moreScopes, std::vector& tags); + /** + * Private constructor + */ + Language(); + + /** + * Private destructor + */ + virtual ~Language(); + + /** + * Return the next token and the delimiter found, the source string is taken from the + * m_tokenScanner member of this class + * \param token next token + * \param delim delimiter found + * \return true if token was found false otherwise + */ + bool NextToken(wxString &token, wxString &delim); + + /** + * \brief Attempt to fix template results + * \param typeName the type name that was detected by the parser + * \param typeScope the type scope + */ + bool OnTemplates(wxString &typeName, wxString &typeScope, Variable &parent); + + /** + * \brief attempt to expand 'typedef' to their actual value + */ + bool OnTypedef(wxString &typeName, wxString &typeScope, wxString &templateInitList, const wxString &optionalScope); + + /** + * \brief expand reference operator (->) overloading + * \param typeName [input/output] the type name to check for the reference operator overloading + * \param typeScope [input/output] its scope + * \return true on success, false otherwise + */ + bool OnArrowOperatorOverloading(wxString &typeName, wxString &typeScope); + + void ParseTemplateArgs(CppScanner *scanner, wxArrayString &argsList); + void ParseTemplateInitList(CppScanner *scanner, wxArrayString &argsList); + +private: + std::map m_braces; + std::vector m_delimArr; + wxString m_expression; + CppScannerPtr m_scanner; + CppScannerPtr m_tokenScanner; + Variable m_parentVar; +}; + +typedef Singleton LanguageST; + +#endif // CODELITE_LANGUAGE_H diff --git a/CodeLite/lex.yy.cpp b/CodeLite/lex.yy.cpp new file mode 100644 index 0000000000..7a9d0c15ee --- /dev/null +++ b/CodeLite/lex.yy.cpp @@ -0,0 +1,2543 @@ +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /CVS/wxUS/wxXtudio/Apps/USClient/lex.yy.cpp,v 1.3 2005/12/13 07:53:23 eran Exp $ + */ + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + +#ifdef __cplusplus +#include +#include "unistd.h" +#include + +#include "FlexLexer.h" +#include "precompiled_header.h" +#endif + +namespace flex +{ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#ifdef __cplusplus + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state +{ + std::istream* yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + +}; + + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +#define yytext_ptr yytext +#define YY_INTERACTIVE + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 121 +#define YY_END_OF_BUFFER 122 +static yyconst short int yy_acclist[493] = + { 0, + 122, 120, 121, 3, 120, 121, 5, 121, 4, 120, + 121, 84, 120, 121, 120, 121, 72, 120, 121, 86, + 120, 121, 79, 120, 121, 120, 121, 69, 120, 121, + 70, 120, 121, 80, 120, 121, 81, 120, 121, 71, + 120, 121, 82, 120, 121, 78, 120, 121, 85, 120, + 121, 64, 120, 121, 63, 120, 121, 92, 120, 121, + 93, 120, 121, 87, 120, 121, 94, 120, 121, 88, + 120, 121, 91, 120, 121, 62, 120, 121, 62, 120, + 121, 76, 120, 121, 77, 120, 121, 89, 120, 121, + 62, 120, 121, 62, 120, 121, 62, 120, 121, 62, + + 120, 121, 62, 120, 121, 62, 120, 121, 62, 120, + 121, 62, 120, 121, 62, 120, 121, 62, 120, 121, + 62, 120, 121, 62, 120, 121, 62, 120, 121, 62, + 120, 121, 62, 120, 121, 62, 120, 121, 62, 120, + 121, 62, 120, 121, 74, 120, 121, 90, 120, 121, + 75, 120, 121, 83, 120, 121, 3, 5, 4, 106, + 68, 73, 111, 107, 116, 109, 99, 112, 100, 113, + 97, 95, 66, 1, 2, 110, 66, 64, 64, 64, + 63, 63, 63, 96, 101, 103, 105, 104, 102, 62, + 117, 62, 62, 62, 62, 62, 62, 62, 15, 62, + + 62, 62, 62, 62, 62, 62, 62, 62, 26, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 118, 108, 67, 98, 119, 66, 66, 64, 65, 63, + 114, 115, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 24, 62, + 62, 62, 62, 62, 62, 62, 30, 62, 62, 62, + 62, 54, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 66, 65, 65, 6, + + 62, 62, 8, 62, 9, 62, 62, 62, 62, 62, + 62, 62, 62, 17, 62, 18, 62, 62, 20, 62, + 62, 62, 62, 62, 25, 62, 62, 62, 62, 62, + 31, 62, 32, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 60, + 62, 62, 62, 62, 62, 62, 46, 62, 62, 62, + 65, 7, 62, 49, 62, 10, 62, 62, 62, 62, + 62, 62, 19, 62, 21, 62, 62, 23, 62, 62, + 27, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 36, 62, 62, 62, 62, 62, + + 62, 62, 43, 62, 44, 62, 62, 62, 62, 48, + 62, 62, 62, 13, 62, 51, 62, 16, 62, 22, + 62, 52, 62, 28, 62, 62, 53, 62, 62, 62, + 62, 33, 62, 62, 62, 59, 62, 62, 35, 62, + 37, 62, 38, 62, 39, 62, 40, 62, 41, 62, + 62, 62, 62, 62, 62, 12, 62, 14, 62, 29, + 62, 62, 62, 62, 58, 62, 62, 62, 42, 62, + 62, 61, 62, 62, 11, 62, 62, 55, 62, 56, + 62, 62, 34, 62, 45, 62, 47, 62, 50, 62, + 57, 62 + + } ; + +static yyconst short int yy_accept[365] = + { 0, + 1, 1, 1, 2, 4, 7, 9, 12, 15, 17, + 20, 23, 26, 28, 31, 34, 37, 40, 43, 46, + 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, + 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, + 139, 142, 145, 148, 151, 154, 157, 158, 159, 159, + 160, 161, 161, 162, 162, 163, 164, 165, 166, 166, + 166, 167, 168, 169, 170, 171, 172, 173, 173, 174, + 175, 176, 177, 178, 179, 179, 179, 180, 181, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + + 191, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 233, 233, 234, 234, 234, 235, 236, 236, + 237, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 261, 262, 263, 264, 265, 266, + 267, 269, 270, 271, 272, 274, 275, 276, 277, 278, + 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, + + 289, 290, 291, 292, 293, 294, 295, 296, 297, 297, + 297, 297, 297, 297, 298, 299, 300, 302, 303, 305, + 307, 308, 309, 310, 311, 312, 313, 314, 316, 318, + 319, 321, 322, 323, 324, 325, 327, 328, 329, 330, + 331, 333, 335, 336, 337, 338, 339, 340, 341, 342, + 343, 344, 345, 346, 347, 348, 349, 350, 352, 353, + 354, 355, 356, 357, 359, 360, 361, 361, 361, 361, + 361, 362, 364, 366, 368, 369, 370, 371, 372, 373, + 375, 377, 378, 380, 381, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 397, 398, + + 399, 400, 401, 402, 403, 405, 407, 408, 409, 410, + 412, 413, 414, 416, 418, 420, 422, 424, 426, 427, + 429, 430, 431, 432, 434, 435, 436, 438, 439, 441, + 443, 445, 447, 449, 451, 452, 453, 454, 455, 456, + 458, 460, 462, 463, 464, 465, 467, 468, 469, 471, + 472, 474, 475, 477, 478, 480, 482, 483, 485, 487, + 489, 491, 493, 493 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 8, 9, 10, 1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, + 23, 23, 23, 23, 23, 24, 24, 25, 26, 27, + 28, 29, 30, 1, 31, 31, 31, 31, 32, 33, + 34, 34, 34, 34, 34, 35, 34, 34, 34, 34, + 34, 34, 34, 34, 36, 34, 34, 37, 34, 34, + 38, 39, 40, 41, 34, 1, 42, 43, 44, 45, + + 46, 47, 48, 49, 50, 34, 51, 52, 53, 54, + 55, 56, 34, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[70] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 5, 6, 1, 1, 1, 1, 1, 3, + 6, 6, 6, 7, 7, 7, 7, 1, 3, 1, + 1, 5, 5, 6, 6, 6, 5, 7, 7, 7, + 7, 7, 7, 8, 7, 7, 8, 7, 8, 7, + 8, 7, 8, 7, 7, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[372] = + { 0, + 0, 0, 570, 571, 68, 571, 74, 541, 73, 558, + 539, 71, 527, 571, 571, 537, 67, 571, 68, 69, + 82, 93, 100, 539, 571, 73, 535, 76, 571, 0, + 77, 571, 571, 534, 501, 503, 85, 56, 105, 86, + 504, 60, 71, 102, 86, 49, 512, 105, 69, 503, + 108, 507, 571, 103, 571, 571, 169, 571, 175, 181, + 571, 110, 571, 128, 571, 571, 571, 571, 153, 167, + 571, 571, 571, 571, 571, 539, 571, 534, 171, 571, + 571, 571, 175, 209, 192, 229, 160, 167, 0, 236, + 165, 174, 571, 525, 571, 571, 571, 524, 0, 196, + + 512, 571, 491, 503, 490, 505, 504, 491, 187, 484, + 111, 168, 486, 483, 486, 483, 489, 479, 195, 198, + 483, 482, 482, 472, 487, 486, 212, 488, 152, 475, + 199, 221, 479, 478, 471, 225, 469, 224, 475, 571, + 571, 264, 0, 571, 267, 0, 571, 571, 275, 571, + 278, 285, 571, 269, 571, 571, 571, 469, 481, 476, + 464, 462, 178, 235, 473, 475, 470, 470, 465, 461, + 458, 466, 469, 0, 464, 454, 462, 462, 454, 455, + 0, 458, 455, 456, 0, 444, 443, 451, 437, 438, + 444, 445, 434, 436, 438, 445, 431, 429, 429, 429, + + 440, 439, 429, 433, 423, 436, 438, 427, 301, 332, + 303, 367, 289, 335, 255, 279, 0, 427, 0, 0, + 419, 417, 425, 414, 419, 413, 419, 0, 0, 423, + 0, 412, 411, 408, 412, 0, 418, 418, 403, 408, + 0, 0, 403, 418, 407, 405, 415, 410, 405, 396, + 396, 386, 398, 384, 388, 382, 380, 0, 371, 361, + 353, 357, 344, 0, 344, 356, 256, 0, 280, 0, + 571, 0, 0, 0, 347, 345, 350, 349, 348, 0, + 0, 339, 0, 347, 0, 341, 341, 339, 328, 324, + 326, 331, 313, 325, 323, 307, 308, 0, 316, 313, + + 309, 293, 302, 304, 0, 0, 295, 306, 297, 0, + 286, 286, 299, 0, 0, 0, 0, 0, 297, 0, + 297, 283, 294, 0, 289, 275, 0, 287, 0, 0, + 0, 0, 0, 0, 283, 282, 275, 270, 271, 0, + 0, 0, 240, 224, 234, 0, 220, 186, 0, 120, + 0, 62, 0, 48, 0, 0, 43, 0, 0, 0, + 0, 0, 571, 414, 422, 426, 432, 438, 442, 444, + 446 + } ; + +static yyconst short int yy_def[372] = + { 0, + 363, 1, 363, 363, 363, 363, 363, 363, 364, 363, + 363, 363, 365, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 366, + 366, 363, 363, 363, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 364, 363, 367, 363, 363, 363, 363, 365, 368, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 369, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 366, 364, + + 365, 363, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 363, + 363, 364, 370, 363, 365, 371, 363, 363, 363, 363, + 363, 363, 363, 369, 363, 363, 363, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + + 366, 366, 366, 366, 366, 366, 366, 366, 364, 364, + 365, 365, 363, 363, 363, 363, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 364, 210, 365, 212, + 363, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 0, 363, 363, 363, 363, 363, 363, 363, + 363 + } ; + +static yyconst short int yy_nxt[641] = + { 0, + 4, 5, 6, 7, 7, 7, 5, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 23, 24, 25, 26, 27, 28, 29, + 30, 30, 30, 30, 31, 30, 30, 32, 4, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 30, 42, + 30, 43, 30, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 30, 30, 30, 53, 54, 55, 56, 57, + 58, 59, 59, 59, 57, 59, 58, 60, 60, 60, + 59, 63, 67, 72, 77, 100, 74, 362, 78, 101, + 79, 79, 79, 361, 73, 75, 76, 80, 68, 94, + + 95, 109, 81, 97, 98, 127, 119, 360, 128, 82, + 110, 64, 83, 120, 84, 84, 85, 134, 63, 83, + 121, 90, 90, 90, 86, 122, 105, 87, 88, 89, + 140, 86, 135, 106, 91, 92, 107, 115, 86, 108, + 116, 125, 117, 123, 87, 86, 126, 124, 64, 142, + 142, 91, 88, 130, 131, 89, 111, 137, 112, 92, + 167, 113, 138, 132, 359, 144, 133, 114, 168, 141, + 57, 58, 59, 59, 59, 57, 59, 58, 59, 59, + 59, 59, 59, 58, 60, 60, 60, 59, 145, 145, + 143, 70, 79, 79, 79, 153, 79, 79, 79, 192, + + 155, 153, 149, 150, 63, 150, 149, 150, 155, 150, + 193, 83, 169, 85, 85, 85, 149, 150, 153, 153, + 149, 150, 150, 86, 155, 155, 150, 170, 83, 146, + 84, 84, 85, 164, 64, 222, 223, 86, 165, 177, + 86, 179, 358, 87, 88, 151, 195, 151, 178, 180, + 152, 152, 152, 188, 86, 83, 181, 90, 90, 90, + 87, 189, 197, 196, 63, 357, 190, 86, 88, 202, + 91, 92, 63, 206, 203, 207, 224, 198, 356, 144, + 355, 86, 204, 354, 225, 209, 209, 91, 211, 211, + 271, 213, 144, 213, 64, 92, 214, 214, 214, 152, + + 152, 152, 64, 215, 216, 70, 152, 152, 152, 63, + 214, 214, 214, 271, 271, 144, 353, 150, 70, 150, + 215, 352, 267, 267, 269, 269, 351, 350, 216, 349, + 271, 150, 348, 347, 346, 345, 150, 344, 343, 64, + 63, 70, 342, 341, 340, 339, 338, 337, 336, 335, + 334, 333, 332, 268, 268, 268, 214, 214, 214, 331, + 330, 329, 268, 268, 268, 328, 327, 150, 326, 150, + 64, 325, 324, 268, 268, 268, 268, 268, 268, 144, + 323, 150, 322, 321, 320, 319, 150, 318, 270, 270, + 270, 317, 316, 315, 314, 313, 312, 270, 270, 270, + + 311, 310, 309, 308, 307, 70, 306, 305, 270, 270, + 270, 270, 270, 270, 62, 304, 62, 62, 62, 62, + 62, 62, 69, 303, 69, 302, 69, 69, 69, 69, + 99, 99, 99, 99, 62, 62, 62, 301, 300, 62, + 69, 69, 69, 299, 298, 69, 154, 154, 210, 210, + 212, 212, 297, 296, 295, 294, 293, 292, 291, 290, + 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, + 279, 278, 277, 276, 275, 274, 273, 272, 266, 265, + 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, + 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, + + 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, + 234, 233, 232, 231, 230, 229, 228, 227, 226, 221, + 220, 219, 218, 217, 208, 205, 201, 200, 199, 194, + 191, 187, 186, 185, 184, 183, 182, 176, 175, 174, + 173, 172, 171, 166, 163, 162, 161, 160, 159, 158, + 70, 157, 156, 148, 147, 139, 136, 129, 118, 104, + 103, 102, 96, 93, 71, 70, 66, 65, 61, 363, + 3, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363 + } ; + +static yyconst short int yy_chk[641] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, + 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, + 7, 9, 12, 17, 20, 31, 19, 357, 20, 31, + 20, 20, 20, 354, 17, 19, 19, 21, 12, 26, + + 26, 38, 21, 28, 28, 46, 42, 352, 46, 21, + 38, 9, 22, 42, 22, 22, 22, 49, 62, 23, + 43, 23, 23, 23, 22, 43, 37, 22, 22, 22, + 54, 23, 49, 37, 23, 23, 37, 40, 22, 37, + 40, 45, 40, 44, 22, 23, 45, 44, 62, 64, + 64, 23, 22, 48, 48, 22, 39, 51, 39, 23, + 111, 39, 51, 48, 350, 69, 48, 39, 111, 54, + 57, 57, 57, 57, 57, 57, 59, 59, 59, 59, + 59, 59, 60, 60, 60, 60, 60, 60, 70, 70, + 64, 69, 79, 79, 79, 87, 83, 83, 83, 129, + + 91, 88, 79, 79, 100, 79, 83, 83, 92, 83, + 129, 85, 112, 85, 85, 85, 79, 79, 88, 87, + 83, 83, 79, 85, 91, 92, 83, 112, 84, 70, + 84, 84, 84, 109, 100, 163, 163, 85, 109, 119, + 84, 120, 348, 84, 84, 86, 131, 86, 119, 120, + 86, 86, 86, 127, 84, 90, 120, 90, 90, 90, + 84, 127, 132, 131, 267, 347, 127, 90, 84, 136, + 90, 90, 142, 138, 136, 138, 164, 132, 345, 145, + 344, 90, 136, 343, 164, 142, 142, 90, 145, 145, + 215, 149, 269, 149, 267, 90, 149, 149, 149, 151, + + 151, 151, 142, 154, 154, 145, 152, 152, 152, 209, + 213, 213, 213, 216, 215, 211, 339, 152, 269, 152, + 154, 338, 209, 209, 211, 211, 337, 336, 154, 335, + 216, 152, 328, 326, 325, 323, 152, 322, 321, 209, + 210, 211, 319, 313, 312, 311, 309, 308, 307, 304, + 303, 302, 301, 210, 210, 210, 214, 214, 214, 300, + 299, 297, 210, 210, 210, 296, 295, 214, 294, 214, + 210, 293, 292, 210, 210, 210, 210, 210, 210, 212, + 291, 214, 290, 289, 288, 287, 214, 286, 212, 212, + 212, 284, 282, 279, 278, 277, 276, 212, 212, 212, + + 275, 266, 265, 263, 262, 212, 261, 260, 212, 212, + 212, 212, 212, 212, 364, 259, 364, 364, 364, 364, + 364, 364, 365, 257, 365, 256, 365, 365, 365, 365, + 366, 366, 366, 366, 367, 367, 367, 255, 254, 367, + 368, 368, 368, 253, 252, 368, 369, 369, 370, 370, + 371, 371, 251, 250, 249, 248, 247, 246, 245, 244, + 243, 240, 239, 238, 237, 235, 234, 233, 232, 230, + 227, 226, 225, 224, 223, 222, 221, 218, 208, 207, + 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, + 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, + + 186, 184, 183, 182, 180, 179, 178, 177, 176, 175, + 173, 172, 171, 170, 169, 168, 167, 166, 165, 162, + 161, 160, 159, 158, 139, 137, 135, 134, 133, 130, + 128, 126, 125, 124, 123, 122, 121, 118, 117, 116, + 115, 114, 113, 110, 108, 107, 106, 105, 104, 103, + 101, 98, 94, 78, 76, 52, 50, 47, 41, 36, + 35, 34, 27, 24, 16, 13, 11, 10, 8, 3, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363, + 363, 363, 363, 363, 363, 363, 363, 363, 363, 363 + } ; + +#define REJECT \ + { \ + *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ + yy_cp = yy_full_match; /* restore poss. backed-over text */ \ + ++yy_lp; \ + goto find_rule; \ + } +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#define INITIAL 0 + +/* Copyright (C) 1989-1991 James A. Roskind, All rights reserved. +This lexer description was written by James A. Roskind. Copying +of this file, as a whole, is permitted providing this notice is +intact and applicable in all complete copies. Direct +translations as a whole to other lexer generator input languages +(or lexical description languages) is permitted provided that +this notice is intact and applicable in all such copies, along +with a disclaimer that the contents are a translation. The +reproduction of derived files or text, such as modified versions +of this file, or the output of scanner generators, is permitted, +provided the resulting work includes the copyright notice +"Portions Copyright (c) 1989, 1990 James A. Roskind". Derived +products must also provide the notice "Portions Copyright (c) +1989, 1990 James A. Roskind" in a manner appropriate to the +utility, and in keeping with copyright law (e.g.: EITHER +displayed when first invoked/executed; OR displayed continuously +on display terminal; OR via placement in the object code in form +readable in a printout, with or near the title of the work, or at +the end of the file). No royalties, licenses or commissions of +any kind are required to copy this file, its translations, or +derivative products, when the copies are made in compliance with +this notice. Persons or corporations that do make copies in +compliance with this notice may charge whatever price is +agreeable to a buyer, for such copies or derivative works. THIS +FILE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +James A. Roskind +Independent Consultant +516 Latania Palm Drive +Indialantic FL, 32903 +(407)729-4348 +jar@hq.ileaf.com +or ...!uunet!leafusa!jar + +---end of copyright notice--- + + +COMMENTS- + +My goal is to see software developers adopt my C++ grammar as a +standard until such time as a better standard is accessible. The +only way to get it to become a standard, is to be sure that people +know that derivations are based on a specific work. The intent of +releasing this Flex input file is to facilitate experimentation with +my C++ grammar. The intent of the copyright notice is to allow +arbitrary commercial and non-commercial use of this file, as long as +reference is given to my standardization effort. Without reference +to a specific standard, many alternative grammars would develop. By +referring to the standard, the C++ grammar is given publicity, which +should lead to further use in compatible products and systems. The +benefits of such a standard to commercial products (browsers, +beautifiers, translators, compilers, ...) should be obvious to the +developers, in that other compatible products will emerge, and the +value of all conforming products will rise. Most developers are +aware of the value of acquiring a fairly complete grammar for a +language, and the copyright notice (and the resulting affiliation +with my work) should not be too high a price to pay. By copyrighting +my work, I have some minor control over what this standard is, and I +can (hopefully) keep it from degrading without my approval. I will +consistently attempt to provide upgraded grammars that are compliant +with the current art, and the ANSI C++ Committee recommendation in +particular. A developer is never prevented from modifying the +grammar or this file to improve it in whatever way is seen fit. There +is also no restriction on the sale of copies, or derivative works, +providing the request in the copyright notice are satisfied. + +If you are not "copying" my work, but are rather only abstracting +some of my work, an acknowledgment with references to such a standard +would be appreciated. Specifically, agreements with my grammar and +its resolution of otherwise ambiguous constructs, should be noted. + +Simply put: "make whatever use you would like of the grammar and this +file, but include the ``portions Copyright ...'' as a reference to +this standard." + + +*/ + +/* Last modified 7/4/91, Version 2.0 */ + +/* File cpp5.l, becomes lex.yy.c after processing by FLEX */ + +/* This file is a dramatically cut down version of the FLEX input file +used in my ANSI C Preprocessor. The executable version of my +preprocessor is available on many platforms (shareware), but this is +the only source extract that is currently being distributed. If you +need a full ANSI C preprocessor, with extensive diagnostic +capabilities and customization facilities, please contact me at the +addresses given above. Current platforms include IBMPC (DOS/OS2), Sun +(SPARC and Motorola), and IBM R/6000. ... end of commercial +announcement. + +This file is being distributed to facilitate experimentation and use +of my C and C++ grammar. + + +Comment removal must be done during the lexing, as context (such as +enclosure in string literals) must be observed. For this cut-down +lexer, we will assume that comments have been removed (don't assume +this if you are writing a compiler or browser!). + + +For each IDENTIFIER like string that is found, there are several +distinct interpretations that can be applied: + +1) The preprocessor may interpret the string as a "keyword" in a +directive (eg: "pragma" or "include", "defined"). + +2) The parser may interpret the string as a keyword. (eg: "int"). + +3) Both parser and preprocessor may interpret the string as a keyword +(eg: "if"). + +Since this file is based on source that actually lexically analyses +text for both preprocessing and parsing, macro definitions were used +throughout. The macro definitions supplied here have been customized +to a C++ parse only, and all preprocessor keywords are passed as +IDENTIFIER or TYPEDEFname. Also, since there is no symbol table to +interrogate to decide whether a string is a TYPEDEFname, I simply +assume that any identifier beginning with an upper case letter is a +TYPEDEFname. This hack should allow you to check out how code +segments are parsed using my grammar. Unfortunately, if you really +want to parse major league code, you have to write a symbol table, and +maintain appropriate scoping information. + + + +*/ + + +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "y.tab.h" /* YACC generated definitions based on C++ grammar */ + +typedef char * YYSTYPE; /* interface with lexer: should be in header + file*/ + +extern char * yylval; /* We will always point at the text of the lexeme. + This makes it easy to print out nice trees when YYDEBUG is + enabled. (see C++ grammar file and its definition of + YYDEBUG_LEXER_TEXT to be "yylval" */ + +#include +#include + +/* Prototypes */ + + +#define WHITE_RETURN(x) /* do nothing */ + +#define NEW_LINE_RETURN() WHITE_RETURN('\n') + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN() RETURN_VAL(IDENTIFIER) + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) return(x); +#define yywrap() 1 + + + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail +* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) +* or sizeof(void*) != sizeof(int). +*/ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +#define ECHO LexerOutput( yytext, yyleng ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) LexerError( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yyFlexLexer::yylex() +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = &std::cin; + + if ( ! yyout ) + yyout = &std::cout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 364 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 571 ); + + yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + + do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ + case 1: + YY_RULE_SETUP + { + /* Handle C-Style comment */ + register int c; + if (m_keepComments) + m_comment += _U(yytext); + for ( ; ; ) + { + while ( (c = yyinput()) != '*' && c != EOF ) + { + if (m_keepComments) + m_comment += c; + + ; /* eat up text of comment */ + } + if (m_keepComments) + m_comment += c; + if ( c == '*' ) + { + while ( (c = yyinput()) == '*' ) + { + if (m_keepComments) + m_comment += c; + ; + } + if (m_keepComments) + m_comment += c; + if ( c == '/' ) + { + break; /* found the end */ + } + } + if ( c == EOF ) + { + break; + } + } + if (m_keepComments ) + return CComment; + } + YY_BREAK + case 2: + YY_RULE_SETUP + { + /* Handle CPP style comment */ + /* Constume everything until the newline */ + register int c; + if (m_keepComments) + m_comment += _U(yytext); + while ((c = yyinput()) != '\n' && c != EOF) + { + if (m_keepComments) + m_comment += c; + } + if (m_keepComments) + m_comment += c; + if (m_keepComments ) + return CPPComment; + } + YY_BREAK + case 3: + YY_RULE_SETUP + { + if (!m_returnWhite) + WHITE_RETURN(' '); + else + return ' '; + + } + YY_BREAK + case 4: + YY_RULE_SETUP + { + if (!m_returnWhite) + WHITE_RETURN(' '); + else + return ' '; + } + YY_BREAK + case 5: + YY_RULE_SETUP + { + if (!m_returnWhite) + NEW_LINE_RETURN(); + else + return '\n'; + } + YY_BREAK + case 6: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(AUTO); + } + YY_BREAK + case 7: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(BREAK); + } + YY_BREAK + case 8: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(CASE); + } + YY_BREAK + case 9: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexCHAR); + } + YY_BREAK + case 10: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexCONST); + } + YY_BREAK + case 11: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(CONTINUE); + } + YY_BREAK + case 12: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexDEFAULT); + } + YY_BREAK + case 13: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(DEFINE); + } + YY_BREAK + case 14: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(OPDEFINED); + } + YY_BREAK + case 15: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(DO); + } + YY_BREAK + case 16: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexDOUBLE); + } + YY_BREAK + case 17: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(ELIF); + } + YY_BREAK + case 18: + YY_RULE_SETUP + {PPPA_KEYWORD_RETURN(ELSE); + } + YY_BREAK + case 19: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(ENDIF); + } + YY_BREAK + case 20: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexENUM); + } + YY_BREAK + case 21: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(ERROR); + } + YY_BREAK + case 22: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(EXTERN); + } + YY_BREAK + case 23: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexFLOAT); + } + YY_BREAK + case 24: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(FOR); + } + YY_BREAK + case 25: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(GOTO); + } + YY_BREAK + case 26: + YY_RULE_SETUP + {PPPA_KEYWORD_RETURN(IF); + } + YY_BREAK + case 27: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(IFDEF); + } + YY_BREAK + case 28: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(IFNDEF); + } + YY_BREAK + case 29: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(INCLUDE); + } + YY_BREAK + case 30: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexINT); + } + YY_BREAK + case 31: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(LINE); + } + YY_BREAK + case 32: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexLONG); + } + YY_BREAK + case 33: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(PRAGMA); + } + YY_BREAK + case 34: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(REGISTER); + } + YY_BREAK + case 35: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(RETURN); + } + YY_BREAK + case 36: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexSHORT); + } + YY_BREAK + case 37: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(SIGNED); + } + YY_BREAK + case 38: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(SIZEOF); + } + YY_BREAK + case 39: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(STATIC); + } + YY_BREAK + case 40: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexSTRUCT); + } + YY_BREAK + case 41: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(SWITCH); + } + YY_BREAK + case 42: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(TYPEDEF); + } + YY_BREAK + case 43: + YY_RULE_SETUP + {PP_KEYWORD_RETURN(UNDEF); + } + YY_BREAK + case 44: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(UNION); + } + YY_BREAK + case 45: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(UNSIGNED); + } + YY_BREAK + case 46: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(lexVOID); + } + YY_BREAK + case 47: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(VOLATILE); + } + YY_BREAK + case 48: + YY_RULE_SETUP + {PA_KEYWORD_RETURN(WHILE); + } + YY_BREAK + case 49: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexCLASS); + } + YY_BREAK + case 50: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexNAMESPACE); + } + YY_BREAK + case 51: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexDELETE); + } + YY_BREAK + case 52: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(FRIEND); + } + YY_BREAK + case 53: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(INLINE); + } + YY_BREAK + case 54: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(NEW); + } + YY_BREAK + case 55: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexOPERATOR); + } + YY_BREAK + case 56: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(OVERLOAD); + } + YY_BREAK + case 57: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexPROTECTED); + } + YY_BREAK + case 58: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexPRIVATE); + } + YY_BREAK + case 59: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexPUBLIC); + } + YY_BREAK + case 60: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(lexTHIS); + } + YY_BREAK + case 61: + YY_RULE_SETUP + {CPP_KEYWORD_RETURN(VIRTUAL); + } + YY_BREAK + case 62: + YY_RULE_SETUP + {IDENTIFIER_RETURN(); + } + YY_BREAK + case 63: + YY_RULE_SETUP + {NUMERICAL_RETURN(INTEGERconstant); + } + YY_BREAK + case 64: + YY_RULE_SETUP + {NUMERICAL_RETURN(OCTALconstant); + } + YY_BREAK + case 65: + YY_RULE_SETUP + {NUMERICAL_RETURN(HEXconstant); + } + YY_BREAK + case 66: + YY_RULE_SETUP + {NUMERICAL_RETURN(FLOATINGconstant); + } + YY_BREAK + case 67: + YY_RULE_SETUP + { + NUMERICAL_RETURN(CHARACTERconstant); + } + YY_BREAK + case 68: + YY_RULE_SETUP + { + LITERAL_RETURN(STRINGliteral); + } + YY_BREAK + case 69: + YY_RULE_SETUP + {PPOP_RETURN(LP); + } + YY_BREAK + case 70: + YY_RULE_SETUP + {PPOP_RETURN(RP); + } + YY_BREAK + case 71: + YY_RULE_SETUP + {PPOP_RETURN(COMMA); + } + YY_BREAK + case 72: + YY_RULE_SETUP + {NAMED_PPOP_RETURN('#') ; + } + YY_BREAK + case 73: + YY_RULE_SETUP + {NAMED_PPOP_RETURN(POUNDPOUND); + } + YY_BREAK + case 74: + YY_RULE_SETUP + {ASCIIOP_RETURN(LC); + } + YY_BREAK + case 75: + YY_RULE_SETUP + {ASCIIOP_RETURN(RC); + } + YY_BREAK + case 76: + YY_RULE_SETUP + {ASCIIOP_RETURN(LB); + } + YY_BREAK + case 77: + YY_RULE_SETUP + {ASCIIOP_RETURN(RB); + } + YY_BREAK + case 78: + YY_RULE_SETUP + {ASCIIOP_RETURN(DOT); + } + YY_BREAK + case 79: + YY_RULE_SETUP + {ASCIIOP_RETURN(AND); + } + YY_BREAK + case 80: + YY_RULE_SETUP + {ASCIIOP_RETURN(STAR); + } + YY_BREAK + case 81: + YY_RULE_SETUP + {ASCIIOP_RETURN(PLUS); + } + YY_BREAK + case 82: + YY_RULE_SETUP + {ASCIIOP_RETURN(MINUS); + } + YY_BREAK + case 83: + YY_RULE_SETUP + {ASCIIOP_RETURN(NEGATE); + } + YY_BREAK + case 84: + YY_RULE_SETUP + {ASCIIOP_RETURN(NOT); + } + YY_BREAK + case 85: + YY_RULE_SETUP + {ASCIIOP_RETURN(DIV); + } + YY_BREAK + case 86: + YY_RULE_SETUP + {ASCIIOP_RETURN(MOD); + } + YY_BREAK + case 87: + YY_RULE_SETUP + {ASCIIOP_RETURN(LT); + } + YY_BREAK + case 88: + YY_RULE_SETUP + {ASCIIOP_RETURN(GT); + } + YY_BREAK + case 89: + YY_RULE_SETUP + {ASCIIOP_RETURN(XOR); + } + YY_BREAK + case 90: + YY_RULE_SETUP + {ASCIIOP_RETURN(PIPE); + } + YY_BREAK + case 91: + YY_RULE_SETUP + {ASCIIOP_RETURN(QUESTION); + } + YY_BREAK + case 92: + YY_RULE_SETUP + {ASCIIOP_RETURN(COLON); + } + YY_BREAK + case 93: + YY_RULE_SETUP + {ASCIIOP_RETURN(SEMICOLON); + } + YY_BREAK + case 94: + YY_RULE_SETUP + {ASCIIOP_RETURN(ASSIGN); + } + YY_BREAK + case 95: + YY_RULE_SETUP + {NAMEDOP_RETURN(DOTstar); + } + YY_BREAK + case 96: + YY_RULE_SETUP + {NAMEDOP_RETURN(CLCL); + } + YY_BREAK + case 97: + YY_RULE_SETUP + {NAMEDOP_RETURN(lexARROW); + } + YY_BREAK + case 98: + YY_RULE_SETUP + {NAMEDOP_RETURN(ARROWstar); + } + YY_BREAK + case 99: + YY_RULE_SETUP + {NAMEDOP_RETURN(ICR); + } + YY_BREAK + case 100: + YY_RULE_SETUP + {NAMEDOP_RETURN(DECR); + } + YY_BREAK + case 101: + YY_RULE_SETUP + {NAMEDOP_RETURN(LS); + } + YY_BREAK + case 102: + YY_RULE_SETUP + {NAMEDOP_RETURN(RS); + } + YY_BREAK + case 103: + YY_RULE_SETUP + {NAMEDOP_RETURN(LE); + } + YY_BREAK + case 104: + YY_RULE_SETUP + {NAMEDOP_RETURN(GE); + } + YY_BREAK + case 105: + YY_RULE_SETUP + {NAMEDOP_RETURN(EQ); + } + YY_BREAK + case 106: + YY_RULE_SETUP + {NAMEDOP_RETURN(NE); + } + YY_BREAK + case 107: + YY_RULE_SETUP + {NAMEDOP_RETURN(ANDAND); + } + YY_BREAK + case 108: + YY_RULE_SETUP + {NAMEDOP_RETURN(OROR); + } + YY_BREAK + case 109: + YY_RULE_SETUP + {NAMEDOP_RETURN(MULTassign); + } + YY_BREAK + case 110: + YY_RULE_SETUP + {NAMEDOP_RETURN(DIVassign); + } + YY_BREAK + case 111: + YY_RULE_SETUP + {NAMEDOP_RETURN(MODassign); + } + YY_BREAK + case 112: + YY_RULE_SETUP + {NAMEDOP_RETURN(PLUSassign); + } + YY_BREAK + case 113: + YY_RULE_SETUP + {NAMEDOP_RETURN(MINUSassign); + } + YY_BREAK + case 114: + YY_RULE_SETUP + {NAMEDOP_RETURN(LSassign); + } + YY_BREAK + case 115: + YY_RULE_SETUP + {NAMEDOP_RETURN(RSassign); + } + YY_BREAK + case 116: + YY_RULE_SETUP + {NAMEDOP_RETURN(ANDassign); + } + YY_BREAK + case 117: + YY_RULE_SETUP + {NAMEDOP_RETURN(ERassign); + } + YY_BREAK + case 118: + YY_RULE_SETUP + {NAMEDOP_RETURN(ORassign); + } + YY_BREAK + case 119: + YY_RULE_SETUP + {NAMEDOP_RETURN(ELLIPSIS); + } + YY_BREAK + case 120: + YY_RULE_SETUP + { return yytext[0]; + } + YY_BREAK + case 121: + YY_RULE_SETUP + ECHO; + YY_BREAK + case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) +{ + yyin = arg_yyin; + yyout = arg_yyout; + yy_c_buf_p = 0; + yy_init = 1; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = 0; + + yy_current_buffer = 0; + +#ifdef YY_USES_REJECT + + yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2]; +#else + + yy_state_buf = 0; +#endif + +} + +yyFlexLexer::~yyFlexLexer() +{ + delete yy_state_buf; + yy_delete_buffer( yy_current_buffer ); +} + +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if ( new_in ) + { + yy_delete_buffer( yy_current_buffer ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + } + + if ( new_out ) + yyout = new_out; +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin->eof() || yyin->fail() ) + return 0; + +#ifdef YY_INTERACTIVE + + yyin->get + ( buf[0] ); + + if ( yyin->eof() ) + return 0; + + if ( yyin->bad() ) + return -1; + + return 1; + +#else + + (void) yyin->read( buf, max_size ); + + if ( yyin->bad() ) + return -1; + else + return yyin->gcount(); +#endif + +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout->write( buf, size ); +} + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +int yyFlexLexer::yy_get_next_buffer() +{ + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#if 0 + YY_FATAL_ERROR( + "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; +} + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +yy_state_type yyFlexLexer::yy_get_previous_state() +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 364 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; +} + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 364 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 363); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; +} + + +void yyFlexLexer::yyunput( int c, register char* yy_bp ) +{ + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; +} + + +int yyFlexLexer::yyinput() +{ + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + + return yyinput(); +#else + + return input(); +#endif + + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; +} + + +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); +} + + +void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +{ + if ( yy_current_buffer == new_buffer ) + return ; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; +} + + +void yyFlexLexer::yy_load_buffer_state() +{ + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; +} + + +YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + + +void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +{ + if ( ! b ) + return ; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); +} + + +/*extern "C" int isatty YY_PROTO(( int ));*/ +void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file ) + +{ + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + b->yy_is_interactive = 0; +} + + +void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +{ + if ( ! b ) + return ; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); +} + + +#ifndef YY_NO_SCAN_BUFFER +#endif + + +#ifndef YY_NO_SCAN_STRING +#endif + + +#ifndef YY_NO_SCAN_BYTES +#endif + + +#ifndef YY_NO_PUSH_STATE +void yyFlexLexer::yy_push_state( int new_state ) +{ + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); +} +#endif + + +#ifndef YY_NO_POP_STATE +void yyFlexLexer::yy_pop_state() +{ + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); +} +#endif + + +#ifndef YY_NO_TOP_STATE +int yyFlexLexer::yy_top_state() +{ + return yy_start_stack[yy_start_stack_ptr - 1]; +} +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + + +void yyFlexLexer::LexerError( yyconst char msg[] ) +{ + std::cerr << msg << '\n'; + exit( YY_EXIT_FAILURE ); +} + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + +{ + return (void *) malloc( size ); +} + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + +{ + free( ptr ); +} + +#if YY_MAIN +int main() +{ + yylex(); + return 0; +} +#endif + + + +} // namespace flex + + +/*******************************************************************/ diff --git a/CodeLite/parse_thread.cpp b/CodeLite/parse_thread.cpp new file mode 100644 index 0000000000..9c36cd786f --- /dev/null +++ b/CodeLite/parse_thread.cpp @@ -0,0 +1,154 @@ +#include "precompiled_header.h" + +#include "parse_thread.h" +#include "ctags_manager.h" +#include "tags_database.h" +#include + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + + +IMPLEMENT_DYNAMIC_CLASS(SymbolTreeEvent, wxNotifyEvent) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_SYMBOL_TREE_UPDATE_ITEM) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_SYMBOL_TREE_DELETE_ITEM) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_SYMBOL_TREE_ADD_ITEM) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_SYMBOL_TREE_DELETE_PROJECT) + +ParseThread::ParseThread() +: WorkerThread() +, m_pDb( new TagsDatabase() ) +{ +} + +ParseThread::~ParseThread() +{ +} + +void ParseThread::ProcessRequest(ThreadRequest * request) +{ + ParseRequest *req = (ParseRequest*)request; + wxString dbfile = req->dbfile; + wxString file = req->file; + + //---------------------------------------------- + // Build a tree from project/file/project + // from the value which are set in the database + //---------------------------------------------- + TagTreePtr oldTree; + try + { + wxSQLite3ResultSet rs = m_pDb->SelectTagsByFile(file, wxFileName(dbfile)); + + // Load the records and build a language tree + TagEntry root; + root.SetName(wxT("")); + oldTree.Reset( new TagTree(wxT(""), root) ); + while( rs.NextRow() ) + { + TagEntry entry(rs); + oldTree->AddEntry(entry); + } + rs.Finalize(); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } + + // Build second tree from the updated file + TagTreePtr newTree; + std::vector comments; + + TagsManager *mgr = TagsManagerST::Get(); + if(mgr->GetParseComments() ){ + newTree = mgr->ParseSourceFile2(wxFileName(file), req->tags, &comments); + }else{ + newTree = mgr->ParseSourceFile2(wxFileName(file), req->tags); + } + + //------------------------------------------------------------------- + // Now what is left to be done here, is to update the GUI tree + // The GUI tree needs to be updated item by item, to avoid total tree + // Collapsing + //------------------------------------------------------------------- + + // Compare old tree vs new tree + std::vector > deletedItems; + std::vector > newItems; + std::vector > goodNewItems; + std::vector > modifiedItems; + + oldTree->Compare(newTree.Get(), deletedItems, modifiedItems, newItems); + // Delete old entries + size_t i=0; + m_pDb->Begin(); + + // Prepare sql statements + TagEntry dummy; + + wxSQLite3Statement insertStmt = m_pDb->PrepareStatement( dummy.GetInsertOneStatement() ); + wxSQLite3Statement updateStmt = m_pDb->PrepareStatement( dummy.GetUpdateOneStatement() ); + wxSQLite3Statement deleteStmt = m_pDb->PrepareStatement( dummy.GetDeleteOneStatement() ); + + if( TagsManagerST::Get()->GetParseComments() ) + { + // drop all old entries from this file + try + { + wxString sql; + sql << wxT("DELETE FROM COMMENTS WHERE FILE='") << file << wxT("'"); + m_pDb->ExecuteUpdate( sql ); + m_pDb->Store( comments, wxFileName(), false ); + } + catch( wxSQLite3Exception & e) + { + wxUnusedVar(e); + } + } + + for(i=0; iCommit(); + + insertStmt.Finalize(); + updateStmt.Finalize(); + deleteStmt.Finalize(); + + // If there is no event handler set to handle this comaprison + // results, then nothing more to be done + if(m_notifiedWindow == NULL) + return; + + // Send an event for each operation type + if( !deletedItems.empty() ) + SendEvent(wxEVT_COMMAND_SYMBOL_TREE_DELETE_ITEM, deletedItems); + + if( !newItems.empty() ) + SendEvent(wxEVT_COMMAND_SYMBOL_TREE_ADD_ITEM, goodNewItems); + + if( !modifiedItems.empty() ) + SendEvent(wxEVT_COMMAND_SYMBOL_TREE_UPDATE_ITEM, modifiedItems); +} + + +void ParseThread::SendEvent(int evtType, std::vector > &items) +{ + SymbolTreeEvent event(items, evtType); + wxPostEvent(m_notifiedWindow, event); +} + diff --git a/CodeLite/parse_thread.h b/CodeLite/parse_thread.h new file mode 100644 index 0000000000..aef25bcfc4 --- /dev/null +++ b/CodeLite/parse_thread.h @@ -0,0 +1,154 @@ +#ifndef CODELITE_PARSE_THREAD_H +#define CODELITE_PARSE_THREAD_H + +#include "entry.h" +#include "singleton.h" +#include +#include +#include +#include +#include "worker_thread.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + +class TagsDatabase; + +class WXDLLIMPEXP_CL ParseRequest : public ThreadRequest +{ +public: + wxString file; + wxString dbfile; + wxString tags; +}; + +class WXDLLIMPEXP_CL ParseThread : public WorkerThread +{ + friend class Singleton; + std::auto_ptr m_pDb; + + wxStopWatch m_watch; + +private: + /** + * Default constructor. + */ + ParseThread(); + + /** + * Destructor. + */ + virtual ~ParseThread(); + +private: + + /** + * Process request from the editor. + * \param request the request to process + */ + void ProcessRequest(ThreadRequest *request); + + /** + * Send an event to the window with an array of items that where changed. + * \param evtType Event type to send, one of: + * - wxEVT_CMD_DEL_SYMBOL_TREE_ITEMS + * - wxEVT_CMD_ADD_SYMBOL_TREE_ITEMS + * - wxEVT_CMD_UPD_SYMBOL_TREE_ITEMS + * \param items Vector of items that were modified/deleted/added + */ + void SendEvent(int evtType, std::vector > &items); +}; + +typedef Singleton ParseThreadST; + +/** + * Holds information about events associated with SymbolTree object. + */ +class WXDLLIMPEXP_CL SymbolTreeEvent : public wxNotifyEvent +{ + DECLARE_DYNAMIC_CLASS(SymbolTreeEvent) + std::vector > m_items; + wxString m_project; + +public: + /** + * Constructor + * \param commandType Event type + * \param winid Window ID + * \param key Item key + * \param data Item data + */ + SymbolTreeEvent(std::vector > &items, wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + , m_items(items) + { + } + + /** + * Construct event with project name + * \param project project name + * \param commandType Event type + * \param winid Window ID + */ + SymbolTreeEvent(const wxString& project, wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + , m_project(project) + { + } + + /** + * Copy constructor + * \param rhs Right hand side + */ + SymbolTreeEvent(const SymbolTreeEvent& rhs) + : wxNotifyEvent(rhs.GetEventType(), rhs.GetId()) + , m_items(rhs.m_items) + , m_project(rhs.m_project) + { + } + + /** + * Clone method to allow the event to be posted between threads. + * \return + */ + wxEvent *Clone(void) const { return new SymbolTreeEvent(*this); } + + SymbolTreeEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) + : wxNotifyEvent(commandType, winid) + {} + + std::vector >& GetItems() { return m_items; } + const wxString& GetProject() const { return m_project; } +}; + + +BEGIN_DECLARE_EVENT_TYPES() +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CL, wxEVT_COMMAND_SYMBOL_TREE_UPDATE_ITEM, 50300) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CL, wxEVT_COMMAND_SYMBOL_TREE_DELETE_ITEM, 50301) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CL, wxEVT_COMMAND_SYMBOL_TREE_ADD_ITEM, 50302) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CL, wxEVT_COMMAND_SYMBOL_TREE_DELETE_PROJECT, 50303) +END_DECLARE_EVENT_TYPES() + +typedef void (wxEvtHandler::*SymbolTreeEventFunction)(SymbolTreeEvent&); + +#define SymbolTreeEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(SymbolTreeEventFunction, &func) + +#define EVT_SYMBOLTREE_ADD_ITEM(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_SYMBOL_TREE_ADD_ITEM, winid, SymbolTreeEventHandler(fn)) + +#define EVT_SYMBOLTREE_DELETE_ITEM(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_SYMBOL_TREE_DELETE_ITEM, winid, SymbolTreeEventHandler(fn)) + +#define EVT_SYMBOLTREE_UPDATE_ITEM(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_SYMBOL_TREE_UPDATE_ITEM, winid, SymbolTreeEventHandler(fn)) + +#define EVT_SYMBOLTREE_DELETE_PROJECT(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_SYMBOL_TREE_DELETE_PROJECT, winid, SymbolTreeEventHandler(fn)) + +#endif // CODELITE_PARSE_THREAD_H diff --git a/CodeLite/precompiled_header.h b/CodeLite/precompiled_header.h new file mode 100644 index 0000000000..6e2ccc2b7e --- /dev/null +++ b/CodeLite/precompiled_header.h @@ -0,0 +1,75 @@ +#ifndef CODELITE_PRECOMPILED_HEADER_H +#define CODELITE_PRECOMPILED_HEADER_H + +#include + +#ifdef __WXMSW__ + #ifdef _DEBUG + #include + #define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__) + #else + #define DEBUG_NEW new + #endif +#endif + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + // Only include the headers we need here + #include + #include + #include + #include +#endif + +#include +#include +#include +#include +#include +#include "readtags.h" + +///////////////////////////////////////////////////////////////////////////// +// Unicode: +// Use the following macros, in the following cases: +// +// 1. If your API requires const char*, wrap wxString with _C() macro +// 2. To convert char* ( not litteral ) use _U() +// 3. To convert literal strings, use _T() +///////////////////////////////////////////////////////////////////////////// + +#ifdef __APPLE__ + #include + #undef _C /* _CTYPE_C */ + #undef _U /* _CTYPE_U */ +#endif + +#ifdef wxUSE_UNICODE + #ifndef _U + #define _U(x) wxString((x),wxConvUTF8) + #endif + #ifndef _UU + #define _UU(x,y) wxString((x),y) + #endif + #ifndef _CC + #define _CC(x,y) (x).mb_str((y)) + #endif +#else + #ifndef _U + #define _U(x) (x) + #endif + #ifndef _UU + #define _UU(x,y) (x) + #endif + #ifndef _CC + #define _CC(x,y) (x) + #endif +#endif + +#ifndef _C + #define _C(x) _CC((x),wxConvUTF8) +#endif + +#endif // CODELITE_PRECOMPILED_HEADER_H diff --git a/CodeLite/procutils.cpp b/CodeLite/procutils.cpp new file mode 100644 index 0000000000..ce6c71f4fd --- /dev/null +++ b/CodeLite/procutils.cpp @@ -0,0 +1,362 @@ +#include "procutils.h" + +#include +#ifdef __WXMSW__ +#include "wx/msw/private.h" +#include "wx/textbuf.h" +#ifndef pclose +#define pclose _pclose +#endif + +#ifndef popen +#define popen _popen +#endif + +#endif + +ProcUtils::ProcUtils() +{ +} + +ProcUtils::~ProcUtils() +{ +} + +void ProcUtils::GetProcTree(std::map &parentsMap, long pid) +{ +#ifdef __WXMSW__ + OSVERSIONINFO osver ; + + // Check to see if were running under Windows95 or + // Windows NT. + osver.dwOSVersionInfoSize = sizeof( osver ) ; + if ( !GetVersionEx( &osver ) ) { + return ; + } + + if ( osver.dwPlatformId != VER_PLATFORM_WIN32_NT ) { + return; + } + + //get child processes of this node + HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (!hProcessSnap) { + return; + } + + //Fill in the size of the structure before using it. + PROCESSENTRY32 pe; + memset(&pe, 0, sizeof(pe)); + pe.dwSize = sizeof(PROCESSENTRY32); + + // Walk the snapshot of the processes, and for each process, + // kill it if its parent is pid. + if (!Process32First(hProcessSnap, &pe)) { + // Can't get first process. + CloseHandle (hProcessSnap); + return; + } + + parentsMap[pid] = true; + + do { + if (parentsMap.find(pe.th32ParentProcessID) != parentsMap.end()) { + //get the process handle + HANDLE hProcess = ::OpenProcess(SYNCHRONIZE | + PROCESS_TERMINATE | + PROCESS_QUERY_INFORMATION, + FALSE, // not inheritable + (DWORD)pid); + if (hProcess != NULL) { + CloseHandle(hProcess); + //dont kill the process, just keep its ID + parentsMap[pe.th32ProcessID] = true; + } + } + } while (Process32Next (hProcessSnap, &pe)); + CloseHandle (hProcessSnap); +#else + parentsMap[pid] = true; +#endif +} + +wxString ProcUtils::GetProcessNameByPid(long pid) +{ +#ifdef __WXMSW__ + //go over the process modules and get the full path of + //the executeable + HANDLE hModuleSnap = INVALID_HANDLE_VALUE; + MODULEENTRY32 me32; + + // Take a snapshot of all modules in the specified process. + hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, (DWORD)pid ); + if ( hModuleSnap == INVALID_HANDLE_VALUE ) { + return wxEmptyString; + } + + // Set the size of the structure before using it. + me32.dwSize = sizeof( MODULEENTRY32 ); + + // Retrieve information about the first module, + // and exit if unsuccessful + if (!Module32First( hModuleSnap, &me32 )) { + CloseHandle( hModuleSnap ); // Must clean up the + // snapshot object! + return wxEmptyString; + } + + //get the name of the process (it is located in the first entry) + CloseHandle( hModuleSnap ); + return me32.szExePath; + +#else + wxArrayString output; + ExecuteCommand(wxT("ps -A -o pid,command --no-heading"), output); + //parse the output and search for our process ID + for (size_t i=0; i< output.GetCount(); i++) { + wxString line = output.Item(i); + //remove whitespaces + line = line.Trim(); + line = line.Trim(false); + //get the process ID + wxString spid = line.BeforeFirst(wxT(' ')); + long cpid(0); + spid.ToLong( &cpid ); + if (cpid == pid) { + //we got a match, extract the command, it is in the second column + wxString command = line.AfterFirst(wxT(' ')); + return command; + } + } + return wxEmptyString; //Not implemented yet +#endif +} + +void ProcUtils::ExecuteCommand(const wxString &command, wxArrayString &output, long flags) +{ +#ifdef __WXMSW__ + wxExecute(command, output, flags); +#else + FILE *fp; + char line[512]; + memset(line, 0, sizeof(line)); + fp = popen(_C(command), "r"); + while ( fgets( line, sizeof line, fp)) { + output.Add(_U(line)); + memset(line, 0, sizeof(line)); + } + + pclose(fp); +#endif +} + +void ProcUtils::ExecuteInteractiveCommand(const wxString &command) +{ + wxShell(command); +} + +void ProcUtils::GetProcessList(std::vector &proclist) +{ +#ifdef __WXMSW__ + OSVERSIONINFO osver ; + + // Check to see if were running under Windows95 or + // Windows NT. + osver.dwOSVersionInfoSize = sizeof( osver ) ; + if ( !GetVersionEx( &osver ) ) { + return; + } + + if ( osver.dwPlatformId != VER_PLATFORM_WIN32_NT ) { + return; + } + + //get child processes of this node + HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (!hProcessSnap) { + return; + } + + //Fill in the size of the structure before using it. + PROCESSENTRY32 pe; + memset(&pe, 0, sizeof(pe)); + pe.dwSize = sizeof(PROCESSENTRY32); + + // Walk the snapshot of the processes, and for each process, + // kill it if its parent is pid. + if (!Process32First(hProcessSnap, &pe)) { + // Can't get first process. + CloseHandle (hProcessSnap); + return; + } + + do { + ProcessEntry entry; + entry.name = pe.szExeFile; + entry.pid = (long)pe.th32ProcessID; + proclist.push_back(entry); + } while (Process32Next (hProcessSnap, &pe)); + CloseHandle (hProcessSnap); +#else + //GTK and other + wxArrayString output; +#if defined (__WXGTK__) + ExecuteCommand(wxT("ps -A -o pid,command --no-heading"), output); +#elif defined (__WXMAC__) + // Mac does not like the --no-heading... + ExecuteCommand(wxT("ps -A -o pid,command "), output); +#endif + for (size_t i=0; i< output.GetCount(); i++) { + wxString line = output.Item(i); + //remove whitespaces + line = line.Trim().Trim(false); + + //get the process ID + ProcessEntry entry; + wxString spid = line.BeforeFirst(wxT(' ')); + spid.ToLong( &entry.pid ); + entry.name = line.AfterFirst(wxT(' ')); + + if (entry.pid == 0 && i > 0) { + //probably this line belongs to the provious one + ProcessEntry e = proclist.back(); + proclist.pop_back(); + e.name << entry.name; + proclist.push_back( e ); + } else { + proclist.push_back( entry ); + } + } +#endif +} + +void ProcUtils::GetChildren(long pid, std::vector &proclist) +{ +#ifdef __WXMSW__ + OSVERSIONINFO osver ; + + // Check to see if were running under Windows95 or + // Windows NT. + osver.dwOSVersionInfoSize = sizeof( osver ) ; + if ( !GetVersionEx( &osver ) ) { + return; + } + + if ( osver.dwPlatformId != VER_PLATFORM_WIN32_NT ) { + return; + } + + //get child processes of this node + HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (!hProcessSnap) { + return; + } + + //Fill in the size of the structure before using it. + PROCESSENTRY32 pe; + memset(&pe, 0, sizeof(pe)); + pe.dwSize = sizeof(PROCESSENTRY32); + + // Walk the snapshot of the processes, and for each process, + // kill it if its parent is pid. + if (!Process32First(hProcessSnap, &pe)) { + // Can't get first process. + CloseHandle (hProcessSnap); + return; + } + + //loop over all processes and collect all the processes their parent + //pid matches PID + do { + if((long)pe.th32ParentProcessID == pid){ + proclist.push_back((long)pe.th32ProcessID); + } + } while (Process32Next (hProcessSnap, &pe)); + CloseHandle (hProcessSnap); +#else + //GTK and other + wxArrayString output; +#ifdef __WXGTK__ + ExecuteCommand(wxT("ps -A -o pid,ppid --no-heading"), output); +#else + ExecuteCommand(wxT("ps -A -o pid,ppid "), output); +#endif + //parse the output and search for our process ID + for (size_t i=0; i< output.GetCount(); i++) { + long lpid(0); + long lppid(0); + wxString line = output.Item(i); + + //remove whitespaces + line = line.Trim().Trim(false); + + //get the process ID + wxString spid = line.BeforeFirst(wxT(' ')); + spid.ToLong( &lpid ); + + //get the process Parent ID + wxString sppid = line.AfterFirst(wxT(' ')); + sppid.ToLong( &lppid ); + if(lppid == pid){ + proclist.push_back(lpid); + } + } +#endif +} + +bool ProcUtils::Shell() +{ + wxString cmd; +#ifdef __WXMSW__ + wxChar *shell = wxGetenv(wxT("COMSPEC")); + if ( !shell ){ + shell = (wxChar*) wxT("\\COMMAND.COM"); + } + + // just the shell + cmd = shell; +#elif defined(__WXMAC__) + wxString path = wxGetCwd(); + cmd = wxString( wxT("osascript -e 'tell application \"Terminal\"' -e 'activate' -e 'do script with command \"cd ") + path + wxT("\"' -e 'end tell'") ); +#else //non-windows + //try to locate the default terminal + wxString terminal; + wxString where; + if(Locate(wxT("gnome-terminal"), where)){ + terminal = where; + } + else if(Locate(wxT("konsole"), where)){ + terminal = where; + } + else if(Locate(wxT("xterm"), where)){ + terminal = where; + } + cmd = terminal; +#endif + return wxExecute(cmd, wxEXEC_ASYNC) != 0; +} + +bool ProcUtils::Locate(const wxString &name, wxString &where) +{ + wxString command; + wxArrayString output; + command << wxT("which \"") << name << wxT("\""); + ProcUtils::ExecuteCommand(command, output); + + if(output.IsEmpty() == false){ + wxString interstingLine = output.Item(0); + + if(interstingLine.Trim().Trim(false).IsEmpty()){ + return false; + } + + if(!interstingLine.StartsWith(wxT("which: no "))){ + where = output.Item(0); + where = where.Trim().Trim(false); + return true; + } + } + return false; +} + + diff --git a/CodeLite/procutils.h b/CodeLite/procutils.h new file mode 100644 index 0000000000..cc221abf95 --- /dev/null +++ b/CodeLite/procutils.h @@ -0,0 +1,43 @@ +#ifndef PROCUTILS_H +#define PROCUTILS_H + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else +# define WXDLLIMPEXP_CL +#endif + +#include "precompiled_header.h" +#include "wx/string.h" +#include "wx/arrstr.h" + +#ifdef __WXMSW__ +#include +#include +#include +#include +#endif + +struct ProcessEntry { + wxString name; + long pid; +}; + +class ProcUtils { +public: + ProcUtils(); + ~ProcUtils(); + + static void GetProcTree(std::map &parentsMap, long pid); + static void ExecuteCommand(const wxString &command, wxArrayString &output, long flags = wxEXEC_NODISABLE| wxEXEC_SYNC); + static void ExecuteInteractiveCommand(const wxString &command); + static wxString GetProcessNameByPid(long pid); + static void GetProcessList(std::vector &proclist); + static void GetChildren(long pid, std::vector &children); + static bool Shell(); + static bool Locate(const wxString &name, wxString &where); +}; + +#endif // PROCUTILS_H diff --git a/CodeLite/progress_dialog.cpp b/CodeLite/progress_dialog.cpp new file mode 100644 index 0000000000..bc168f757f --- /dev/null +++ b/CodeLite/progress_dialog.cpp @@ -0,0 +1,14 @@ +#include "progress_dialog.h" + +/////////////////////////////////////////////////////////////////////////// + +ProgressDialog::ProgressDialog(const wxString &title, const wxString &message, int maximum, wxWindow *parent) +: wxProgressDialog(title, message, maximum, parent, wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_AUTO_HIDE) +{ + SetSize(400, 250); + Layout(); +} + +ProgressDialog::~ProgressDialog() +{ +} diff --git a/CodeLite/progress_dialog.h b/CodeLite/progress_dialog.h new file mode 100644 index 0000000000..46cc045fb0 --- /dev/null +++ b/CodeLite/progress_dialog.h @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __progress_dialog__ +#define __progress_dialog__ + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif +/////////////////////////////////////////////////////////////////////////////// +/// Class ProgressDialog +/////////////////////////////////////////////////////////////////////////////// +class WXDLLIMPEXP_CL ProgressDialog : public wxProgressDialog { +public: + ProgressDialog(const wxString &title, const wxString &message, int maximum, wxWindow *parent); + virtual ~ProgressDialog(); +}; + +#endif //__progress_dialog__ diff --git a/CodeLite/readtags.cpp b/CodeLite/readtags.cpp new file mode 100644 index 0000000000..27cc8962d1 --- /dev/null +++ b/CodeLite/readtags.cpp @@ -0,0 +1,961 @@ +/* +* $Id: readtags.c,v 1.1 2005/11/21 18:00:11 eran Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released into the public domain. +* +* This module contains functions for reading tag files. +*/ + +/* +* INCLUDE FILES +*/ +#include +#include +#include +#include +#include +#include /* to declare off_t */ + +#include "readtags.h" + +/* +* MACROS +*/ +#define TAB '\t' + + +/* +* DATA DECLARATIONS +*/ +typedef struct { + size_t size; + char *buffer; +} vstring; + +/** Information about current tag file */ +struct sTagFile { + /** has the file been opened and this structure initialized? */ + short initialized; + /** format of tag file */ + short format; + /** how is the tag file sorted? */ + sortType sortMethod; + /** pointer to file structure */ + FILE* fp; + /** file position of first character of `line' */ + off_t pos; + /** size of tag file in seekable positions */ + off_t size; + /** last line read */ + vstring line; + /** name of tag in last line read */ + vstring name; + /** defines tag search state */ + struct { + /** file position of last match for tag */ + off_t pos; + /** name of tag last searched for */ + const char *name; + /** length of name for partial matches */ + size_t nameLength; + /** peforming partial match */ + short partial; + /** ignoring case */ + short ignorecase; + } search; + /** miscellaneous extension fields */ + struct { + /** number of entries in `list' */ + unsigned short max; + /** list of key value pairs */ + tagExtensionField *list; + } fields; + /** buffers to be freed at close */ + struct { + /** name of program author */ + char *author; + /** name of program */ + char *name; + /** URL of distribution */ + char *url; + /** program version */ + char *version; + } program; +}; + +/* +* DATA DEFINITIONS +*/ +const char *const EmptyString = ""; +const char *const PseudoTagPrefix = "!_"; + +/* +* FUNCTION DEFINITIONS +*/ + +/** +* Compare two strings, ignoring case. +* Return 0 for match, < 0 for smaller, > 0 for bigger +* Make sure case is folded to uppercase in comparison (like for 'sort -f') +* This makes a difference when one of the chars lies between upper and lower +* ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !) +*/ +static int struppercmp (const char *s1, const char *s2) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int strnuppercmp (const char *s1, const char *s2, size_t n) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int growString (vstring *s) +{ + int result = 0; + size_t newLength; + char *newLine; + if (s->size == 0) + { + newLength = 128; + newLine = (char*) malloc (newLength); + *newLine = '\0'; + } + else + { + newLength = 2 * s->size; + newLine = (char*) realloc (s->buffer, newLength); + } + if (newLine == NULL) + perror ("string too large"); + else + { + s->buffer = newLine; + s->size = newLength; + result = 1; + } + return result; +} + +/** Copy name of tag out of tag line */ +static void copyName (tagFile *const file) +{ + size_t length; + const char *end = strchr (file->line.buffer, '\t'); + if (end == NULL) + { + end = strchr (file->line.buffer, '\n'); + if (end == NULL) + end = strchr (file->line.buffer, '\r'); + } + if (end != NULL) + length = end - file->line.buffer; + else + length = strlen (file->line.buffer); + while (length >= file->name.size) + growString (&file->name); + strncpy (file->name.buffer, file->line.buffer, length); + file->name.buffer [length] = '\0'; +} + +static int readTagLineRaw (tagFile *const file) +{ + int result = 1; + int reReadLine; + + /* If reading the line places any character other than a null or a + * newline at the last character position in the buffer (one less than + * the buffer size), then we must resize the buffer and reattempt to read + * the line. + */ + do + { + char *const pLastChar = file->line.buffer + file->line.size - 2; + char *line; + + file->pos = ftell (file->fp); + reReadLine = 0; + *pLastChar = '\0'; + line = fgets (file->line.buffer, (int) file->line.size, file->fp); + if (line == NULL) + { + /* read error */ + if (! feof (file->fp)) + perror ("readTagLine"); + result = 0; + } + else if (*pLastChar != '\0' && + *pLastChar != '\n' && *pLastChar != '\r') + { + /* buffer overflow */ + growString (&file->line); + fseek (file->fp, file->pos, SEEK_SET); + reReadLine = 1; + } + else + { + size_t i = strlen (file->line.buffer); + while (i > 0 && + (file->line.buffer [i - 1] == '\n' || file->line.buffer [i - 1] == '\r')) + { + file->line.buffer [i - 1] = '\0'; + --i; + } + } + } while (reReadLine && result); + if (result) + copyName (file); + return result; +} + +static int readTagLine (tagFile *const file) +{ + int result; + do + { + result = readTagLineRaw (file); + } while (result && *file->name.buffer == '\0'); + return result; +} + +static tagResult growFields (tagFile *const file) +{ + tagResult result = TagFailure; + unsigned short newCount = 2 * file->fields.max; + tagExtensionField *newFields = (tagExtensionField*) + realloc (file->fields.list, newCount * sizeof (tagExtensionField)); + if (newFields == NULL) + perror ("too many extension fields"); + else + { + file->fields.list = newFields; + file->fields.max = newCount; + result = TagSuccess; + } + return result; +} + +static void parseExtensionFields (tagFile *const file, tagEntry *const entry, + char *const string) +{ + char *p = string; + while (p != NULL && *p != '\0') + { + while (*p == TAB) + *p++ = '\0'; + if (*p != '\0') + { + char *colon; + char *field = p; + p = strchr (p, TAB); + if (p != NULL) + *p++ = '\0'; + colon = strchr (field, ':'); + if (colon == NULL) + entry->kind = field; + else + { + const char *key = field; + const char *value = colon + 1; + *colon = '\0'; + if (strcmp (key, "kind") == 0) + entry->kind = value; + else if (strcmp (key, "file") == 0) + entry->fileScope = 1; + else if (strcmp (key, "line") == 0) + entry->address.lineNumber = atol (value); + else + { + if (entry->fields.count == file->fields.max) + growFields (file); + file->fields.list [entry->fields.count].key = key; + file->fields.list [entry->fields.count].value = value; + ++entry->fields.count; + } + } + } + } +} + +static void parseTagLine (tagFile *file, tagEntry *const entry) +{ + int i; + char *p = file->line.buffer; + char *tab = strchr (p, TAB); + int fieldsPresent = 0; + + entry->fields.list = NULL; + entry->fields.count = 0; + entry->kind = NULL; + entry->fileScope = 0; + + entry->name = p; + if (tab != NULL) + { + *tab = '\0'; + p = tab + 1; + entry->file = p; + tab = strchr (p, TAB); + if (tab != NULL) + { + *tab = '\0'; + p = tab + 1; + if (*p == '/' || *p == '?') + { + /* parse pattern */ + int delimiter = *(unsigned char*) p; + entry->address.lineNumber = 0; + entry->address.pattern = p; + do + { + p = strchr (p + 1, delimiter); + } while (p != NULL && *(p - 1) == '\\'); + if (p == NULL) + { + /* invalid pattern */ + } + else + ++p; + } + else if (isdigit ((int) *(unsigned char*) p)) + { + /* parse line number */ + entry->address.pattern = p; + entry->address.lineNumber = atol (p); + while (isdigit ((int) *(unsigned char*) p)) + ++p; + } + else + { + /* invalid pattern */ + } + fieldsPresent = (strncmp (p, ";\"", 2) == 0); + *p = '\0'; + if (fieldsPresent) + parseExtensionFields (file, entry, p + 2); + } + } + if (entry->fields.count > 0) + entry->fields.list = file->fields.list; + for (i = entry->fields.count ; i < file->fields.max ; ++i) + { + file->fields.list [i].key = NULL; + file->fields.list [i].value = NULL; + } +} + +static char *duplicate (const char *str) +{ + char *result = NULL; + if (str != NULL) + { + result = (char*) malloc (strlen (str) + 1); + if (result == NULL) + perror (NULL); + else + strcpy (result, str); + } + return result; +} + +static void readPseudoTags (tagFile *const file, tagFileInfo *const info) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + if (info != NULL) + { + info->file.format = 1; + info->file.sort = TAG_UNSORTED; + info->program.author = NULL; + info->program.name = NULL; + info->program.url = NULL; + info->program.version = NULL; + } + for( ;; ) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + else + { + tagEntry entry; + const char *key, *value; + parseTagLine (file, &entry); + key = entry.name + prefixLength; + value = entry.file; + if (strcmp (key, "TAG_FILE_SORTED") == 0) + file->sortMethod = (sortType) atoi (value); + else if (strcmp (key, "TAG_FILE_FORMAT") == 0) + file->format = static_cast(atoi (value)); + else if (strcmp (key, "TAG_PROGRAM_AUTHOR") == 0) + file->program.author = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_NAME") == 0) + file->program.name = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_URL") == 0) + file->program.url = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_VERSION") == 0) + file->program.version = duplicate (value); + if (info != NULL) + { + info->file.format = file->format; + info->file.sort = file->sortMethod; + info->program.author = file->program.author; + info->program.name = file->program.name; + info->program.url = file->program.url; + info->program.version = file->program.version; + } + } + } + fsetpos (file->fp, &startOfLine); +} + +static void gotoFirstLogicalTag (tagFile *const file) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + rewind (file->fp); + for ( ;; ) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + } + fsetpos (file->fp, &startOfLine); +} + +static tagFile *initialize (const char *const filePath, tagFileInfo *const info) +{ + tagFile *result = (tagFile*) malloc (sizeof (tagFile)); + if (result != NULL) + { + memset (result, 0, sizeof (tagFile)); + growString (&result->line); + growString (&result->name); + result->fields.max = 20; + result->fields.list = (tagExtensionField*) malloc ( + result->fields.max * sizeof (tagExtensionField)); + result->fp = fopen (filePath, "r"); + if (result->fp == NULL) + { + free (result); + result = NULL; + info->status.error_number = errno; + } + else + { + fseek (result->fp, 0, SEEK_END); + result->size = ftell (result->fp); + rewind (result->fp); + readPseudoTags (result, info); + info->status.opened = 1; + result->initialized = 1; + } + } + return result; +} + +static void terminate (tagFile *const file) +{ + fclose (file->fp); + + free (file->line.buffer); + free (file->name.buffer); + free (file->fields.list); + + if (file->program.author != NULL) + free (file->program.author); + if (file->program.name != NULL) + free (file->program.name); + if (file->program.url != NULL) + free (file->program.url); + if (file->program.version != NULL) + free (file->program.version); + + memset (file, 0, sizeof (tagFile)); + + free (file); +} + +static tagResult readNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file == NULL || ! file->initialized) + result = TagFailure; + else if (! readTagLine (file)) + result = TagFailure; + else + { + if (entry != NULL) + parseTagLine (file, entry); + result = TagSuccess; + } + return result; +} + +static const char *readFieldValue ( + const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + int i; + if (strcmp (key, "kind") == 0) + result = entry->kind; + else if (strcmp (key, "file") == 0) + result = EmptyString; + else for (i = 0 ; i < entry->fields.count && result == NULL ; ++i) + if (strcmp (entry->fields.list [i].key, key) == 0) + result = entry->fields.list [i].value; + return result; +} + +static int readTagLineSeek (tagFile *const file, const off_t pos) +{ + int result = 0; + if (fseek (file->fp, pos, SEEK_SET) == 0) + { + result = readTagLine (file); /* read probable partial line */ + if (pos > 0 && result) + result = readTagLine (file); /* read complete line */ + } + return result; +} + +static int nameComparison (tagFile *const file) +{ + int result; + if (file->search.ignorecase) + { + if (file->search.partial) + result = strnuppercmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = struppercmp (file->search.name, file->name.buffer); + } + else + { + if (file->search.partial) + result = strncmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = strcmp (file->search.name, file->name.buffer); + } + return result; +} + +static void findFirstNonMatchBefore (tagFile *const file) +{ +#define JUMP_BACK 512 + int more_lines; + int comp; + off_t start = file->pos; + off_t pos = start; + do + { + if (pos < (off_t) JUMP_BACK) + pos = 0; + else + pos = pos - JUMP_BACK; + more_lines = readTagLineSeek (file, pos); + comp = nameComparison (file); + } while (more_lines && comp == 0 && pos > 0 && pos < start); +} + +static tagResult findFirstMatchBefore (tagFile *const file) +{ + tagResult result = TagFailure; + int more_lines; + off_t start = file->pos; + findFirstNonMatchBefore (file); + do + { + more_lines = readTagLine (file); + if (nameComparison (file) == 0) + result = TagSuccess; + } while (more_lines && result != TagSuccess && file->pos < start); + return result; +} + +static tagResult findBinary (tagFile *const file) +{ + tagResult result = TagFailure; + off_t lower_limit = 0; + off_t upper_limit = file->size; + off_t last_pos = 0; + off_t pos = upper_limit / 2; + while (result != TagSuccess) + { + if (! readTagLineSeek (file, pos)) + { + /* in case we fell off end of file */ + result = findFirstMatchBefore (file); + break; + } + else if (pos == last_pos) + { + /* prevent infinite loop if we backed up to beginning of file */ + break; + } + else + { + const int comp = nameComparison (file); + last_pos = pos; + if (comp < 0) + { + upper_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (comp > 0) + { + lower_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (pos == 0) + result = TagSuccess; + else + result = findFirstMatchBefore (file); + } + } + return result; +} + +static tagResult findSequential (tagFile *const file) +{ + tagResult result = TagFailure; + if (file->initialized) + { + while (result == TagFailure && readTagLine (file)) + { + if (nameComparison (file) == 0) + result = TagSuccess; + } + } + return result; +} + +static tagResult find (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result = TagFailure; + file->search.name = name; + file->search.nameLength = strlen (name); + file->search.partial = (options & TAG_PARTIALMATCH) != 0; + file->search.ignorecase = (options & TAG_IGNORECASE) != 0; + fseek (file->fp, 0, SEEK_END); + file->size = ftell (file->fp); + rewind (file->fp); + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findBinary (file); + } + else + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findSequential (file); + } + + if (result != TagSuccess) + file->search.pos = file->size; + else + { + file->search.pos = file->pos; + if (entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +static tagResult findNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { + result = tagsNext (file, entry); + if (result == TagSuccess && nameComparison (file) != 0) + result = TagFailure; + } + else + { + result = findSequential (file); + if (result == TagSuccess && entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +/* +* EXTERNAL INTERFACE +*/ + +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info) +{ + return initialize (filePath, info); +} + +extern tagResult tagsSetSortType (tagFile *const file, const sortType type) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + file->sortMethod = type; + result = TagSuccess; + } + return result; +} + +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + gotoFirstLogicalTag (file); + result = readNext (file, entry); + } + return result; +} + +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = readNext (file, entry); + return result; +} + +extern const char *tagsField (const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + if (entry != NULL) + result = readFieldValue (entry, key); + return result; +} + +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = find (file, entry, name, options); + return result; +} + +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = findNext (file, entry); + return result; +} + +extern tagResult tagsClose (tagFile *const file) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + terminate (file); + result = TagSuccess; + } + return result; +} + + +/* +* TEST FRAMEWORK +*/ + +#ifdef READTAGS_MAIN + + +static const char *TagFileName = "tags"; +static const char *ProgramName; +static int extensionFields; +static int SortOverride; +static sortType SortMethod; + +static void printTag (const tagEntry *entry) +{ + int i; + int first = 1; + const char* separator = ";\""; + const char* const empty = ""; + /* "sep" returns a value only the first time it is evaluated */ +#define sep (first ? (first = 0, separator) : empty) + printf ("%s\t%s\t%s", + entry->name, entry->file, entry->address.pattern); + if (extensionFields) + { + if (entry->kind != NULL && entry->kind [0] != '\0') + printf ("%s\tkind:%s", sep, entry->kind); + if (entry->fileScope) + printf ("%s\tfile:", sep); +#if 0 + if (entry->address.lineNumber > 0) + printf ("%s\tline:%lu", sep, entry->address.lineNumber); +#endif + for (i = 0 ; i < entry->fields.count ; ++i) + printf ("%s\t%s:%s", sep, entry->fields.list [i].key, + entry->fields.list [i].value); + } + putchar ('\n'); +#undef sep +} + +static void findTag (const char *const name, const int options) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), name); + exit (1); + } + else + { + if (SortOverride) + tagsSetSortType (file, SortMethod); + if (tagsFind (file, &entry, name, options) == TagSuccess) + { + do + { + printTag (&entry); + } while (tagsFindNext (file, &entry) == TagSuccess); + } + tagsClose (file); + } +} + +static void listTags (void) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), TagFileName); + exit (1); + } + else + { + while (tagsNext (file, &entry) == TagSuccess) + printTag (&entry); + tagsClose (file); + } +} + +const char *const Usage = +"Find tag file entries matching specified names.\n\n" +"Usage: %s [-ilp] [-s[0|1]] [-t file] [name(s)]\n\n" +"Options:\n" +" -e Include extension fields in output.\n" +" -i Perform case-insensitive matching.\n" +" -l List all tags.\n" +" -p Perform partial matching.\n" +" -s[0|1|2] Override sort detection of tag file.\n" +" -t file Use specified tag file (default: \"tags\").\n" +"Note that options are acted upon as encountered, so order is significant.\n"; + +extern int main (int argc, char **argv) +{ + int options = 0; + int actionSupplied = 0; + int i; + ProgramName = argv [0]; + if (argc == 1) + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + for (i = 1 ; i < argc ; ++i) + { + const char *const arg = argv [i]; + if (arg [0] != '-') + { + findTag (arg, options); + actionSupplied = 1; + } + else + { + size_t j; + for (j = 1 ; arg [j] != '\0' ; ++j) + { + switch (arg [j]) + { + case 'e': extensionFields = 1; break; + case 'i': options |= TAG_IGNORECASE; break; + case 'p': options |= TAG_PARTIALMATCH; break; + case 'l': listTags (); actionSupplied = 1; break; + + case 't': + if (arg [j+1] != '\0') + { + TagFileName = arg + j + 1; + j += strlen (TagFileName); + } + else if (i + 1 < argc) + TagFileName = argv [++i]; + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + case 's': + SortOverride = 1; + ++j; + if (arg [j] == '\0') + SortMethod = TAG_SORTED; + else if (strchr ("012", arg[j]) != NULL) + SortMethod = (sortType) (arg[j] - '0'); + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + default: + fprintf (stderr, "%s: unknown option: %c\n", + ProgramName, arg[j]); + exit (1); + break; + } + } + } + } + if (! actionSupplied) + { + fprintf (stderr, + "%s: no action specified: specify tag name(s) or -l option\n", + ProgramName); + exit (1); + } + return 0; +} + + +#endif + +/* vi:set tabstop=8 shiftwidth=4: */ diff --git a/CodeLite/readtags.h b/CodeLite/readtags.h new file mode 100644 index 0000000000..67a7a923ee --- /dev/null +++ b/CodeLite/readtags.h @@ -0,0 +1,245 @@ +/* +* $Id: readtags.h,v 1.1 2005/11/21 18:00:11 eran Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for the public domain. +* +* This file defines the public interface for looking up tag entries in tag +* files. +* +* The functions defined in this interface are intended to provide tag file +* support to a software tool. The tag lookups provided are sufficiently fast +* enough to permit opening a sorted tag file, searching for a matching tag, +* then closing the tag file each time a tag is looked up (search times are +* on the order of hundreths of a second, even for huge tag files). This is +* the recommended use of this library for most tool applications. Adhering +* to this approach permits a user to regenerate a tag file at will without +* the tool needing to detect and resynchronize with changes to the tag file. +* Even for an unsorted 24MB tag file, tag searches take about one second. +*/ +#ifndef CODELITE_READTAGS_H +#define CODELITE_READTAGS_H + +/* +* MACROS +*/ + +/** Options for tagsSetSortType() */ +typedef enum { + TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED +} sortType ; + +/* Options for tagsFind() */ +#define TAG_FULLMATCH 0x0 +#define TAG_PARTIALMATCH 0x1 + +#define TAG_OBSERVECASE 0x0 +#define TAG_IGNORECASE 0x2 + +/* +* DATA DECLARATIONS +*/ + +typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult; + +struct sTagFile; + +typedef struct sTagFile tagFile; + +/** This structure contains information about the tag file. */ +typedef struct { + + struct { + /** was the tag file successfully opened? */ + int opened; + + /** errno value when 'opened' is false */ + int error_number; + } status; + + /** information about the structure of the tag file */ + struct { + /** format of tag file (1 = original, 2 = extended) */ + short format; + + /** how is the tag file sorted? */ + sortType sort; + } file; + + + /** information about the program which created this tag file */ + struct { + /** name of author of generating program (may be null) */ + const char *author; + + /** name of program (may be null) */ + const char *name; + + /** URL of distribution (may be null) */ + const char *url; + + /** program version (may be null) */ + const char *version; + } program; + +} tagFileInfo; + +/** This structure contains information about an extension field for a tag. + * These exist at the end of the tag in the form "key:value"). + */ +typedef struct { + + /** the key of the extension field */ + const char *key; + + /** the value of the extension field (may be an empty string) */ + const char *value; + +} tagExtensionField; + +/** This structure contains information about a specific tag. */ +typedef struct { + + /** name of tag */ + const char *name; + + /** path of source file containing definition of tag */ + const char *file; + + /** address for locating tag in source file */ + struct { + /** pattern for locating source line + * (may be NULL if not present) */ + const char *pattern; + + /** line number in source file of tag definition + * (may be zero if not known) */ + unsigned long lineNumber; + } address; + + /** kind of tag (may by name, character, or NULL if not known) */ + const char *kind; + + /** is tag of file-limited scope? */ + short fileScope; + + /** miscellaneous extension fields */ + struct { + /** number of entries in `list' */ + unsigned short count; + + /** list of key value pairs */ + tagExtensionField *list; + } fields; + +} tagEntry; + + +/* +* FUNCTION PROTOTYPES +*/ + +/** +* This function must be called before calling other functions in this +* library. It is passed the path to the tag file to read and a (possibly +* null) pointer to a structure which, if not null, will be populated with +* information about the tag file. If successful, the function will return a +* handle which must be supplied to other calls to read information from the +* tag file, and info.status.opened will be set to true. If unsuccessful, +* info.status.opened will be set to false and info.status.error_number will +* be set to the errno value representing the system error preventing the tag +* file from being successfully opened. +*/ +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info); + +/** +* This function allows the client to override the normal automatic detection +* of how a tag file is sorted. Permissible values for `type' are +* TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED. Tag files in the new extended +* format contain a key indicating whether or not they are sorted. However, +* tag files in the original format do not contain such a key even when +* sorted, preventing this library from taking advantage of fast binary +* lookups. If the client knows that such an unmarked tag file is indeed +* sorted (or not), it can override the automatic detection. Note that +* incorrect lookup results will result if a tag file is marked as sorted when +* it actually is not. The function will return TagSuccess if called on an +* open tag file or TagFailure if not. +*/ +extern tagResult tagsSetSortType (tagFile *const file, const sortType type); + +/** +* Reads the first tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the first tag file entry. +* The function will return TagSuccess another tag entry is found, or +* TagFailure if not (i.e. it reached end of file). +*/ +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry); + +/** +* Step to the next tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the next tag file entry. The +* function will return TagSuccess another tag entry is found, or TagFailure +* if not (i.e. it reached end of file). It will always read the first tag in +* the file immediately after calling tagsOpen(). +*/ +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry); + +/** +* Retrieve the value associated with the extension field for a specified key. +* It is passed a pointer to a structure already populated with values by a +* previous call to tagsNext(), tagsFind(), or tagsFindNext(), and a string +* containing the key of the desired extension field. If no such field of the +* specified key exists, the function will return null. +*/ +extern const char *tagsField (const tagEntry *const entry, const char *const key); + +/** +* Find the first tag matching `name'. The structure pointed to by `entry' +* will be populated with information about the tag file entry. If a tag file +* is sorted using the C locale, a binary search algorithm is used to search +* the tag file, resulting in very fast tag lookups, even in huge tag files. +* Various options controlling the matches can be combined by bit-wise or-ing +* certain values together. The available values are: +* +* - TAG_PARTIALMATCH +* Tags whose leading characters match `name' will qualify. +* +* - TAG_FULLMATCH +* Only tags whose full lengths match `name' will qualify. +* +* - TAG_IGNORECASE +* Matching will be performed in a case-insenstive manner. Note that +* this disables binary searches of the tag file. +* +* - TAG_OBSERVECASE +* Matching will be performed in a case-senstive manner. Note that +* this enables binary searches of the tag file. +* +* The function will return TagSuccess if a tag matching the name is found, or +* TagFailure if not. +*/ +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, const char *const name, const int options); + +/** +* Find the next tag matching the name and options supplied to the most recent +* call to tagsFind() for the same tag file. The structure pointed to by +* `entry' will be populated with information about the tag file entry. The +* function will return TagSuccess if another tag matching the name is found, +* or TagFailure if not. +*/ +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry); + +/** +* Call tagsTerminate() at completion of reading the tag file, which will +* close the file and free any internal memory allocated. The function will +* return TagFailure is no file is currently open, TagSuccess otherwise. +*/ +extern tagResult tagsClose (tagFile *const file); + + +#endif /* CODELITE_READTAGS_H */ + +/* vi:set tabstop=8 shiftwidth=4: */ diff --git a/CodeLite/scope_parser.cpp b/CodeLite/scope_parser.cpp new file mode 100644 index 0000000000..5bbec0dc98 --- /dev/null +++ b/CodeLite/scope_parser.cpp @@ -0,0 +1,1187 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_scope_parse +#define yylex cl_scope_lex +#define yyerror cl_scope_error +#define yychar cl_scope_char +#define yyval cl_scope_val +#define yylval cl_scope_lval +#define yydebug cl_scope_debug +#define yynerrs cl_scope_nerrs +#define yyerrflag cl_scope_errflag +#define yyss cl_scope_ss +#define yyssp cl_scope_ssp +#define yyvs cl_scope_vs +#define yyvsp cl_scope_vsp +#define yylhs cl_scope_lhs +#define yylen cl_scope_len +#define yydefred cl_scope_defred +#define yydgoto cl_scope_dgoto +#define yysindex cl_scope_sindex +#define yyrindex cl_scope_rindex +#define yygindex cl_scope_gindex +#define yytable cl_scope_table +#define yycheck cl_scope_check +#define yyname cl_scope_name +#define yyrule cl_scope_rule +#define YYPREFIX "cl_scope_" +/* Copyright Eran Ifrah(c) */ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" + +#define YYDEBUG_LEXER_TEXT (cl_scope_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +int cl_scope_parse(); +void cl_scope_error(char *string); +void syncParser(); + +static std::vector gs_additionlNS; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern void printScopeName(); /*print the current scope name*/ +extern void increaseScope(); /*increase scope with anonymouse value*/ +extern std::string getCurrentScope(); +extern void cl_scope_lex_clean(); +extern void cl_scope_less(int count); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_scope_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 11, 11, 13, 13, 12, 12, 14, 14, 15, 15, + 15, 16, 18, 18, 17, 17, 17, 17, 19, 19, + 19, 20, 8, 7, 7, 25, 25, 3, 3, 9, + 10, 26, 26, 27, 27, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 29, 29, 32, 6, + 33, 6, 34, 6, 22, 22, 35, 36, 35, 30, + 30, 21, 21, 37, 37, 38, 38, 23, 24, 24, + 24, 31, 31, 31, 40, 4, 41, 41, 41, 41, + 42, 39, 39, 39, 5, +}; +short cl_scope_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 2, 1, 3, 1, 1, 0, 4, 0, 1, + 3, 3, 0, 3, 0, 1, 1, 1, 0, 1, + 3, 4, 4, 4, 3, 0, 1, 6, 8, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 0, 11, + 0, 10, 0, 11, 0, 2, 2, 0, 4, 0, + 1, 0, 1, 0, 1, 0, 2, 2, 0, 1, + 1, 3, 3, 6, 0, 7, 0, 2, 2, 2, + 2, 0, 1, 3, 4, +}; +short cl_scope_defred[] = { 10, + 0, 20, 0, 120, 51, 121, 50, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 53, + 52, 111, 0, 0, 43, 125, 135, 25, 26, 23, + 0, 0, 44, 47, 0, 113, 105, 0, 22, 0, + 28, 0, 0, 105, 0, 0, 133, 24, 48, 0, + 6, 1, 4, 2, 5, 3, 8, 7, 9, 0, + 0, 0, 116, 0, 106, 0, 0, 131, 0, 126, + 36, 38, 37, 0, 30, 0, 84, 85, 72, 76, + 77, 68, 69, 78, 79, 80, 81, 70, 71, 75, + 73, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 86, 66, 67, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 74, 0, 0, 55, 107, 0, + 123, 0, 54, 0, 122, 101, 0, 0, 130, 129, + 128, 134, 0, 49, 0, 82, 83, 0, 40, 105, + 0, 117, 115, 118, 103, 0, 108, 99, 31, 0, + 32, 0, 116, 0, 109, 0, 98, 0, 0, 0, + 41, 124, 0, 0, 102, 0, 34, 42, 104, 100, +}; +short cl_scope_dgoto[] = { 1, + 73, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 40, 41, 42, 23, 84, 85, 86, 161, 148, 149, + 150, 53, 131, 17, 45, 33, 74, 128, 168, 34, + 54, 169, 156, 166, 75, 151, 154, 132, 56, 48, + 78, 57, +}; +short cl_scope_sindex[] = { 0, + -19, 0, -288, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -234, -259, -254, -246, + 12, -108, -227, 19, -50, -43, -239, -42, 0, 0, + 0, 0, -255, -186, 0, 0, 0, 0, 0, 0, + -214, -7, 0, 0, -213, 0, 0, -209, 0, -239, + 0, -35, -31, 0, 31, -22, 0, 0, 0, -211, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -33, + -59, -244, 0, 56, 0, -241, -232, 0, -209, 0, + 0, 0, 0, -10, 0, -206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 57, 7, 0, 0, -186, + 0, 14, 0, 59, 0, 0, -58, 61, 0, 0, + 0, 0, -211, 0, 42, 0, 0, -2, 0, 0, + -223, 0, 0, 0, 0, 49, 0, 0, 0, -186, + 0, -186, 0, -194, 0, -186, 0, -6, -186, 2, + 0, 0, -58, -4, 0, -3, 0, 0, 0, 0, +}; +short cl_scope_rindex[] = { 0, + -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -83, 0, 0, 0, + 0, 0, -57, 0, 0, 0, 6, 0, 0, 0, + 0, 0, -193, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -14, 0, 6, + 0, 0, 0, 0, -13, 0, 0, 0, 0, -41, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, + 0, -38, 0, 0, 0, 0, 74, 0, 0, 0, + 0, 0, -182, 0, -8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, -36, + 0, -181, 0, 0, 0, 4, 0, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, +}; +short cl_scope_gindex[] = { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 0, -17, 0, 0, -32, -37, + -18, -34, -55, 0, 0, 0, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 50, +}; +#define YYTABLESIZE 358 +short cl_scope_table[] = { 124, + 130, 157, 29, 119, 121, 114, 126, 39, 117, 115, + 112, 119, 125, 118, 29, 47, 116, 135, 54, 76, + 116, 79, 60, 114, 18, 39, 113, 116, 114, 132, + 127, 19, 30, 143, 39, 33, 50, 20, 6, 4, + 116, 162, 27, 24, 116, 162, 116, 70, 25, 21, + 70, 153, 39, 38, 51, 152, 26, 127, 133, 163, + 120, 137, 39, 177, 116, 31, 21, 21, 110, 32, + 134, 27, 36, 139, 138, 140, 141, 35, 22, 37, + 43, 29, 81, 82, 83, 44, 46, 59, 49, 52, + 122, 77, 123, 55, 72, 136, 145, 146, 155, 147, + 158, 160, 80, 5, 165, 7, 167, 172, 173, 46, + 132, 127, 144, 54, 33, 164, 175, 178, 179, 180, + 35, 112, 58, 97, 171, 159, 112, 170, 142, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 119, 119, 119, 0, 174, 119, 0, + 176, 119, 0, 0, 119, 0, 0, 119, 119, 119, + 119, 119, 0, 0, 119, 119, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 27, 27, 119, 119, 27, + 112, 0, 119, 0, 0, 27, 119, 0, 119, 27, + 27, 27, 27, 0, 28, 27, 27, 0, 119, 0, + 110, 110, 0, 0, 0, 110, 0, 0, 27, 27, + 0, 110, 0, 27, 0, 110, 110, 110, 110, 27, + 0, 110, 110, 0, 0, 0, 61, 62, 0, 0, + 0, 63, 0, 0, 110, 0, 2, 64, 0, 0, + 0, 0, 65, 66, 67, 110, 0, 68, 69, 0, + 0, 0, 0, 114, 0, 87, 88, 0, 0, 0, + 70, 35, 0, 0, 114, 0, 112, 0, 129, 129, + 116, 71, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 116, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 112, 3, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 0, 0, 0, + 0, 0, 112, 112, 0, 0, 0, 112, 108, 0, + 0, 0, 0, 112, 0, 0, 0, 0, 112, 112, + 112, 0, 0, 112, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 112, +}; +short cl_scope_check[] = { 33, + 60, 60, 44, 37, 38, 44, 40, 44, 42, 43, + 44, 126, 46, 47, 123, 34, 38, 73, 40, 54, + 42, 44, 58, 62, 313, 62, 60, 61, 62, 44, + 44, 266, 260, 44, 44, 44, 44, 272, 58, 59, + 38, 44, 126, 303, 42, 44, 44, 292, 303, 44, + 292, 38, 62, 293, 62, 42, 303, 91, 303, 62, + 94, 303, 302, 62, 62, 293, 301, 62, 126, 297, + 72, 60, 123, 306, 76, 308, 309, 59, 313, 123, + 123, 123, 294, 295, 296, 341, 273, 123, 303, 303, + 124, 61, 126, 303, 126, 40, 303, 41, 40, 93, + 40, 60, 125, 123, 328, 125, 58, 163, 303, 303, + 125, 125, 123, 40, 123, 150, 123, 173, 123, 123, + 303, 303, 50, 123, 162, 143, 123, 160, 79, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 258, 259, 260, -1, 166, 263, -1, + 169, 266, -1, -1, 269, -1, -1, 272, 273, 274, + 275, 276, -1, -1, 279, 280, -1, -1, -1, -1, + -1, -1, -1, -1, 258, 259, 260, 292, 293, 263, + 126, -1, 297, -1, -1, 269, 301, -1, 303, 273, + 274, 275, 276, -1, 303, 279, 280, -1, 313, -1, + 258, 259, -1, -1, -1, 263, -1, -1, 292, 293, + -1, 269, -1, 297, -1, 273, 274, 275, 276, 303, + -1, 279, 280, -1, -1, -1, 258, 259, -1, -1, + -1, 263, -1, -1, 292, -1, 256, 269, -1, -1, + -1, -1, 274, 275, 276, 303, -1, 279, 280, -1, + -1, -1, -1, 292, -1, 289, 290, -1, -1, -1, + 292, 303, -1, -1, 303, -1, 303, -1, 328, 328, + 292, 303, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 303, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 303, 314, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, + -1, -1, 258, 259, -1, -1, -1, 263, 328, -1, + -1, -1, -1, 269, -1, -1, -1, -1, 274, 275, + 276, -1, -1, 279, 280, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 292, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 303, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_scope_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','",0,"'.'","'/'",0,0,0,0,0, +0,0,0,0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,"'{'","'|'","'}'","'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE", +"LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE", +"LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN","LE_RETURN", +"LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED","LE_CONTINUE", +"LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF","LE_VOLATILE", +"LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE","LE_THIS", +"LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL", +"LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME", +"LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant", +"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND", +"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname", +"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE", +"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar", +"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign", +"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign", +"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST", +"LE_REINTERPRET_CAST", +}; +char *cl_scope_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"external_decl : class_decl", +"external_decl : enum_decl", +"external_decl : union_decl", +"external_decl : function_decl", +"external_decl : namespace_decl", +"external_decl : using_namespace", +"external_decl : scope_reducer", +"external_decl : scope_increaer", +"external_decl : error", +"template_arg :", +"template_arg : template_specifiter LE_IDENTIFIER", +"template_arg_list : template_arg", +"template_arg_list : template_arg_list ',' template_arg", +"template_specifiter : LE_CLASS", +"template_specifiter : LE_TYPENAME", +"opt_template_qualifier :", +"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'", +"derivation_list :", +"derivation_list : parent_class", +"derivation_list : derivation_list ',' parent_class", +"parent_class : access_specifier LE_IDENTIFIER opt_template_specifier", +"opt_template_specifier :", +"opt_template_specifier : '<' template_parameter_list '>'", +"access_specifier :", +"access_specifier : LE_PUBLIC", +"access_specifier : LE_PRIVATE", +"access_specifier : LE_PROTECTED", +"template_parameter_list :", +"template_parameter_list : template_parameter", +"template_parameter_list : template_parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"using_namespace : LE_USING LE_NAMESPACE LE_IDENTIFIER ';'", +"namespace_decl : stmnt_starter LE_NAMESPACE LE_IDENTIFIER '{'", +"namespace_decl : stmnt_starter LE_NAMESPACE '{'", +"opt_class_qualifier :", +"opt_class_qualifier : LE_MACRO", +"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER '{'", +"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER ':' derivation_list '{'", +"scope_reducer : '}'", +"scope_increaer : '{'", +"class_keyword : LE_CLASS", +"class_keyword : LE_STRUCT", +"func_name : LE_IDENTIFIER", +"func_name : LE_OPERATOR any_operator", +"any_operator : '+'", +"any_operator : '='", +"any_operator : '*'", +"any_operator : '/'", +"any_operator : '%'", +"any_operator : '^'", +"any_operator : '&'", +"any_operator : '|'", +"any_operator : '~'", +"any_operator : '!'", +"any_operator : '<'", +"any_operator : '>'", +"any_operator : LE_LS", +"any_operator : LE_RS", +"any_operator : LE_ANDAND", +"any_operator : LE_OROR", +"any_operator : LE_ARROW", +"any_operator : LE_ARROWstar", +"any_operator : '.'", +"any_operator : LE_DOTstar", +"any_operator : LE_ICR", +"any_operator : LE_DECR", +"any_operator : LE_LE", +"any_operator : LE_GE", +"any_operator : LE_EQ", +"any_operator : LE_NE", +"any_operator : '(' ')'", +"any_operator : '[' ']'", +"any_operator : LE_NEW", +"any_operator : LE_DELETE", +"any_operator : ','", +"any_operator : LE_MULTassign", +"any_operator : LE_DIVassign", +"any_operator : LE_MODassign", +"any_operator : LE_PLUSassign", +"any_operator : LE_MINUSassign", +"any_operator : LE_LSassign", +"any_operator : LE_RSassign", +"any_operator : LE_ANDassign", +"any_operator : LE_ERassign", +"any_operator : LE_ORassign", +"optional_initialization_list :", +"optional_initialization_list : ':'", +"$$1 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$1 const_spec '{'", +"$$2 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier func_name '(' $$2 optional_initialization_list '{'", +"$$3 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier '~' func_name '(' $$3 const_spec '{'", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"$$4 :", +"scope_specifier : LE_IDENTIFIER '<' $$4 LE_CLCL", +"virtual_spec :", +"virtual_spec : LE_VIRTUAL", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"variable_decl : nested_scope_specifier basic_type_name special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp", +"$$5 :", +"enum_decl : stmnt_starter LE_ENUM LE_IDENTIFIER '{' $$5 enum_arg_list '}'", +"enum_optional_assign :", +"enum_optional_assign : '=' LE_HEXconstant", +"enum_optional_assign : '=' LE_OCTALconstant", +"enum_optional_assign : '=' LE_INTEGERconstant", +"enum_argument : LE_IDENTIFIER enum_optional_assign", +"enum_arg_list :", +"enum_arg_list : enum_argument", +"enum_arg_list : enum_arg_list ',' enum_argument", +"union_decl : stmnt_starter LE_UNION LE_IDENTIFIER '{'", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + +void syncParser(){ + //move lexer to the next ';' line or scope opening '{' + //int ch = cl_scope_lex(); +} + +//swallow all tokens up to the first '{' +void consumeInitializationList(){ + while( true ){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + //keep the function signature + if(ch == '{'){ + cl_scope_less(0); + break; + } + } +} + +//swallow all tokens up to the first '{' +void consumeBody (){ + std::string cs = "{"; + int depth = 1; + while( true ) { + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + cs += cl_scope_text; + cs += " "; + + if(ch == '{'){ + depth++; + }else if(ch == '}'){ + depth--; + if(depth == 0){ + cl_scope_less(0); + break; + } + } + } + printf("Consumed body: [%s]\n", cs.c_str()); +} + +void consumeFuncArgList(){ + int depth = 1; + while(depth > 0){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + if(ch == ')'){ + depth--; + continue; + } + else if(ch == '('){ + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + if(depth == 0) currentScope.pop_back();//reduce the scope + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +std::string get_scope_name( const std::string &in, + std::vector &additionalNS, + const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ){ + return ""; + } + + //call tghe main parsing routine + cl_scope_parse(); + std::string scope = getCurrentScope(); + //do the lexer cleanup + cl_scope_lex_clean(); + + for(size_t i=0; i= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 20: +{ + /*printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_scope_text, cl_scope_lineno);*/ + syncParser(); + } +break; +case 21: +{ yyval = "";} +break; +case 22: +{yyval = yyvsp[-1] + " " + yyvsp[0];} +break; +case 23: +{ yyval = yyvsp[0]; } +break; +case 24: +{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; } +break; +case 25: +{ yyval = yyvsp[0]; } +break; +case 26: +{ yyval = yyvsp[0]; } +break; +case 28: +{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 29: +{yyval = "";} +break; +case 30: +{yyval = yyvsp[0];} +break; +case 31: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0];} +break; +case 33: +{yyval = "";} +break; +case 34: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 35: +{yyval = "";} +break; +case 36: +{yyval = yyvsp[0];} +break; +case 37: +{yyval = yyvsp[0];} +break; +case 38: +{yyval = yyvsp[0];} +break; +case 39: +{yyval = "";} +break; +case 40: +{yyval = yyvsp[0];} +break; +case 41: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 42: +{yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];} +break; +case 43: +{ + /*printf("Found using namespace %s\n", $3.c_str());*/ + gs_additionlNS.push_back(yyvsp[-1]); + } +break; +case 44: +{ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + } +break; +case 45: +{ + /*anonymouse namespace*/ + increaseScope(); + printScopeName(); + } +break; +case 46: +{yyval = "";} +break; +case 47: +{yyval = yyvsp[0];} +break; +case 48: +{ + /*increase the scope level*/ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + } +break; +case 49: +{ + /*increase the scope level*/ + currentScope.push_back(yyvsp[-3]); + printScopeName(); + } +break; +case 50: +{ + if(currentScope.empty()) + { + /*fatal error!*/ + /*printf("CodeLite: fatal error - cant go beyond global scope!\n");*/ + } + else + { + currentScope.pop_back(); + printScopeName(); + } + } +break; +case 51: +{ + /*increase random scope*/ + increaseScope(); + printScopeName(); + } +break; +case 52: +{yyval = yyvsp[0];} +break; +case 53: +{yyval = yyvsp[0];} +break; +case 54: +{yyval = yyvsp[0];} +break; +case 55: +{yyval = yyvsp[-1];} +break; +case 98: +{consumeInitializationList();} +break; +case 99: +{consumeFuncArgList();} +break; +case 100: +{ + /*trim down trailing '::' from scope name*/ + if(yyvsp[-5].find_last_not_of(":") != std::string::npos){ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-5]); + printScopeName(); + } +break; +case 101: +{consumeFuncArgList();} +break; +case 102: +{ + + /*trim down trailing '::' from scope name*/ + if(yyvsp[-5].find_last_not_of(":") != std::string::npos){ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-5]); + printScopeName(); + } +break; +case 103: +{consumeFuncArgList();} +break; +case 104: +{ + + /*trim down trailing '::' from scope name*/ + if(yyvsp[-6].find_last_not_of(":") != std::string::npos){ + yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-6]); + printScopeName(); + } +break; +case 105: +{yyval = "";} +break; +case 106: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 107: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; +case 108: +{consumeTemplateDecl();} +break; +case 109: +{yyval = yyvsp[-3] + yyvsp[0];} +break; +case 110: +{yyval = ""; } +break; +case 111: +{ yyval = yyvsp[0]; } +break; +case 112: +{yyval = ""; } +break; +case 113: +{ yyval = yyvsp[0]; } +break; +case 114: +{yyval = ""; } +break; +case 115: +{ yyval = yyvsp[0]; } +break; +case 116: +{yyval = ""; } +break; +case 117: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 118: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 119: +{yyval = "";} +break; +case 120: +{ yyval = ";";} +break; +case 121: +{ yyval = ":";} +break; +case 122: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 123: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 124: +{yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 125: +{currentScope.push_back(yyvsp[-1]); printScopeName();} +break; +case 126: +{ + currentScope.pop_back();/*reduce the scope*/ + printScopeName(); + /*printf("found enum: %s, args are: %s\n", $2.c_str(), $5.c_str());*/ + } +break; +case 127: +{yyval = "";} +break; +case 128: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 129: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 130: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 131: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 132: +{yyval = "";} +break; +case 133: +{yyval = yyvsp[0];} +break; +case 134: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 135: +{ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + consumeDecl(); + printScopeName(); + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CodeLite/serialized_object.h b/CodeLite/serialized_object.h new file mode 100644 index 0000000000..bddcb978a9 --- /dev/null +++ b/CodeLite/serialized_object.h @@ -0,0 +1,32 @@ +#ifndef SERIALIZED_OBJECT_H +#define SERIALIZED_OBJECT_H + +#include "archive.h" + +#ifndef WXDLLIMPEXP_CL +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE +#endif // WXDLLIMPEXP_CL + +/** + * \class SerializedObject + * \brief an interface to the serialized object, every class who whishes to be + * serialized and to be read/write from an xml file, must implement this interface + * \author Eran + * \date 07/20/07 + */ +class WXDLLIMPEXP_CL SerializedObject +{ +public: + SerializedObject(){} + virtual ~SerializedObject(){} + virtual void Serialize(Archive &arch) = 0; + virtual void DeSerialize(Archive &arch) = 0; +}; + +#endif //SERIALIZED_OBJECT_H diff --git a/CodeLite/setters_getters_data.cpp b/CodeLite/setters_getters_data.cpp new file mode 100644 index 0000000000..ef66090f04 --- /dev/null +++ b/CodeLite/setters_getters_data.cpp @@ -0,0 +1,22 @@ +#include "setters_getters_data.h" + +SettersGettersData::SettersGettersData() +{ +} + + +SettersGettersData::~SettersGettersData() +{ +} + +void SettersGettersData::Serialize(Archive &arch) +{ + arch.Write(wxT("m_flags"), m_flags); +} + +void SettersGettersData::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_flags"), m_flags); +} + + diff --git a/CodeLite/setters_getters_data.h b/CodeLite/setters_getters_data.h new file mode 100644 index 0000000000..473d332420 --- /dev/null +++ b/CodeLite/setters_getters_data.h @@ -0,0 +1,28 @@ +#ifndef SETTERS_GETTERS_DATA_H +#define SETTERS_GETTERS_DATA_H + +#include "serialized_object.h" + +enum SettersGetters { + SG_KEEP_UNDERSCORES, + SG_LOWER_CASE_LETTER, + SG_REMOVE_M_PREFIX +}; + +class SettersGettersData : public SerializedObject +{ + size_t m_flags; +public: + SettersGettersData(); + virtual ~SettersGettersData(); + + const size_t &GetFlags() const {return m_flags;} + void SetFlags(const size_t &flags){m_flags = flags;} + + void Serialize(Archive &arch); + void DeSerialize(Archive &arch); +}; + +#endif // SETTERS_GETTERS_DATA_H + + diff --git a/CodeLite/singleton.h b/CodeLite/singleton.h new file mode 100644 index 0000000000..ae68fd0bed --- /dev/null +++ b/CodeLite/singleton.h @@ -0,0 +1,62 @@ +#ifndef SINGLETON_H +#define SINGLETON_H + +/** + * A template class that implements the Singleton pattern. + * + * \date 08-23-2006 + * \author eran + */ +template class Singleton +{ + static T* ms_instance; +public: + /** + * Static method to access the only pointer of this instance. + * \return a pointer to the only instance of this + */ + static T* Get(); + + /** + * Release resources. + */ + static void Free(); + +protected: + /** + * Default constructor. + */ + Singleton(); + + /** + * Destructor. + */ + virtual ~Singleton(); +}; +template T* Singleton::ms_instance = 0; + +template Singleton::Singleton() +{ +} + +template Singleton::~Singleton() +{ +} + +template T* Singleton::Get() +{ + if(!ms_instance) + ms_instance = new T(); + return ms_instance; +} + +template void Singleton::Free() +{ + if( ms_instance ) + { + delete ms_instance; + ms_instance = 0; + } +} + +#endif // SINGLETON_H diff --git a/CodeLite/smart_ptr.h b/CodeLite/smart_ptr.h new file mode 100644 index 0000000000..172f94d32e --- /dev/null +++ b/CodeLite/smart_ptr.h @@ -0,0 +1,222 @@ +#ifndef CODELITE_SMART_PTR_H +#define CODELITE_SMART_PTR_H + +/** + * A smart pointer class that provides a reference counting and auto delete memory. + * + * This class is similar to std::auto_ptr, with 2 exceptions: + * - This class uses reference counting + * - We dont provide a release() function (because of the reference counting) + * It is recommended to use this class instead of using raw pointer wherever possible. + * + * \note smart pointer to NULL is valid. + * + * \ingroup CodeLite + * \version 1.0 + * first version + * \date 09-17-2006 + * \author Eran + */ +template +class SmartPtr +{ + /** + * The reference counting class + * + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 09-17-2006 + * \author Eran + */ + class SmartPtrRef + { + T* m_data; + int m_refCount; + + public: + /** + * Construct a reference counting class for row pointer data + * \param data pointer + */ + SmartPtrRef(T* data) + : m_data( data ) + , m_refCount( 1 ) + { + } + + /** + * Destructor + */ + virtual ~SmartPtrRef() + { + delete m_data; + } + + /** + * \return Pointer to the row data + */ + T* GetData() { return m_data; } + + /** + * Increase reference counting by 1 + */ + void IncRef() { m_refCount ++ ; } + + + /** + * Decrease reference counting by 1 + */ + void DecRef() { m_refCount -- ; } + /** + * Return the current reference counting + * \return current reference counting + */ + int GetRefCount() { return m_refCount; } + }; + + SmartPtrRef *m_ref; + +public: + /** + * Construct smart pointer from ptr + * \param ptr pointer + */ + SmartPtr(T* ptr) + { + // create a fresh copy + CreateFresh( ptr ); + } + + /** + * Default constructor + */ + SmartPtr() + : m_ref(NULL) + { + } + + /** + * Copy constructor + * \param rhs right hand side + */ + SmartPtr(const SmartPtr& rhs) + : m_ref(NULL) + { + *this = rhs; + } + + /** + * Assignment operator + * \param rhs right hand side + * \return reference to this + */ + SmartPtr& operator=(const SmartPtr& rhs) + { + // increase the reference count + if( m_ref == rhs.m_ref ) + return *this; + + // Delete previous reference + DeleteRefCount(); + + if( !rhs.m_ref ) + return *this; + + m_ref = rhs.m_ref; + m_ref->IncRef(); + return *this; + } + + /** + * Destructor + */ + virtual ~SmartPtr() + { + DeleteRefCount(); + } + + /** + * Replace the current pointer with ptr + * if the current ptr is not NULL, it will be freed (reference counting free) before assingning the new ptr + * \param ptr new pointer + */ + void Reset(T* ptr) + { + DeleteRefCount(); + CreateFresh( ptr ); + } + + /** + * Return pointer the row data pointer + * \return pointer to the row data pointer + */ + T* Get() + { + return m_ref->GetData(); + } + + /** + * Overload the '->' operator + * \return pointer to the row data pointer + */ + T* operator->() const + { + return m_ref->GetData(); + } + + /** + * Dereference operator + * \return dereference the row data + */ + T& operator*() const + { + return *(m_ref->GetData()); + } + + /** + * Test for NULL operator + * \return true if the internal row data or the reference counting class are NULL false otherwise + */ + bool operator!() const + { + if( !m_ref ) + return true; + + return m_ref->GetData() == NULL; + } + + /** + * test for bool operation + * \return true of the internal raw data exist and it is not null + */ + operator bool() const + { + return m_ref && m_ref->GetData(); + } + +private: + void DeleteRefCount() + { + // decrease the ref count (or delete pointer if it is 1) + if( m_ref ) + { + if( m_ref->GetRefCount() == 1 ) + { + delete m_ref; + m_ref = NULL; + } + else + m_ref->DecRef(); + } + }; + + void CreateFresh(T* ptr) + { + m_ref = new SmartPtrRef( ptr ); + } +}; + + +#endif // CODELITE_SMART_PTR_H diff --git a/CodeLite/symbol_tree.cpp b/CodeLite/symbol_tree.cpp new file mode 100644 index 0000000000..a4b50aa987 --- /dev/null +++ b/CodeLite/symbol_tree.cpp @@ -0,0 +1,411 @@ +#include "precompiled_header.h" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +#include "symbol_tree.h" +#include "ctags_manager.h" +#include "tokenizer.h" + + +IMPLEMENT_DYNAMIC_CLASS(SymbolTree, wxTreeCtrl) + +SymbolTree::SymbolTree() +{ + InitialiseSymbolMap(); +} + +SymbolTree::SymbolTree(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style) +{ + InitialiseSymbolMap(); + Create(parent, id, pos, size, style); +} + +SymbolTree::~SymbolTree() +{ +} + +void SymbolTree::InitialiseSymbolMap() +{ + //-------------------------------------------------------- + // Initialise the images map (kind:icon_index) + //-------------------------------------------------------- + m_imagesMap[wxT("class_view")] = 14; + m_imagesMap[wxT("project")] = 0; + m_imagesMap[wxT("namespace")] = 1; + m_imagesMap[wxT("globals")] = 2; + m_imagesMap[wxT("class")] = 3; + m_imagesMap[wxT("interface")] = 3; + m_imagesMap[wxT("interface_private")] = 3; + m_imagesMap[wxT("interface_protected")] = 3; + m_imagesMap[wxT("class_private")] = 3; + m_imagesMap[wxT("class_public")] = 3; + m_imagesMap[wxT("class_protected")] = 3; + + m_imagesMap[wxT("struct")] = 4; + m_imagesMap[wxT("struct_private")] = 4; + m_imagesMap[wxT("struct_public")] = 4; + m_imagesMap[wxT("struct_protected")] = 4; + + m_imagesMap[wxT("function")] = 5; + m_imagesMap[wxT("prototype")] = 5; + m_imagesMap[wxT("function_public")] = 5; + m_imagesMap[wxT("prototype_public")] = 5; + + m_imagesMap[wxT("function_protected")] = 6; + m_imagesMap[wxT("prototype_protected")] = 6; + m_imagesMap[wxT("function_private")] = 7; + m_imagesMap[wxT("prototype_private")] = 7; + m_imagesMap[wxT("variable")] = 8; + m_imagesMap[wxT("member_public")] = 8; + m_imagesMap[wxT("member_protected")] = 9; + m_imagesMap[wxT("member_private")] = 10; + m_imagesMap[wxT("typedef")] = 11; + m_imagesMap[wxT("typedef_public")] = 11; + m_imagesMap[wxT("typedef_private")] = 11; + m_imagesMap[wxT("typedef_protected")] = 11; + m_imagesMap[wxT("macro")] = 12; + m_imagesMap[wxT("macro_private")] = 12; + m_imagesMap[wxT("macro_protected")] = 12; + m_imagesMap[wxT("macro_public")] = 12; + m_imagesMap[wxT("enum")] = 13; + m_imagesMap[wxT("enum_private")] = 13; + m_imagesMap[wxT("enum_public")] = 13; + m_imagesMap[wxT("enum_protected")] = 13; + m_imagesMap[wxT("enumerator")] = 14; + + m_imagesMap[wxT("method")] = 5; + m_imagesMap[wxT("method_public")] = 5; + m_imagesMap[wxT("method_protected")] = 6; + m_imagesMap[wxT("method_private")] = 7; + + //----------------------------------------------------------- + // Populate globals kind + //----------------------------------------------------------- + + m_globalsKind[wxT("")] = true; + m_globalsKind[wxT("function")] = true; + m_globalsKind[wxT("prototype")] = true; + m_globalsKind[wxT("variable")] = true; + m_globalsKind[wxT("enumerator")] = true; +} + +void SymbolTree::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style) +{ +#ifndef __WXGTK__ + style |= wxTR_LINES_AT_ROOT; +#endif + + wxTreeCtrl::Create(parent, id, pos, size, style); + BuildTree( wxFileName() ); +} + +void SymbolTree::BuildTree(const wxFileName &fileName) +{ + // Clear the tree + DeleteAllItems(); + m_items.clear(); + m_globalsNode = wxTreeItemId(); + m_prototypesNode = wxTreeItemId(); + m_macrosNode = wxTreeItemId(); + m_sortItems.clear(); + + m_fileName = fileName; + // Get the current tree + m_tree = TagsManagerST::Get()->Load(m_fileName); + if( !m_tree ) + { + return; + } + + // Add invisible root node + wxTreeItemId root; + root = AddRoot(fileName.GetFullName(), 15, 15); + + TreeWalker walker(m_tree->GetRoot()); + + // add three items here: + // the globals node, the mcros and the prototype node + m_globalsNode = AppendItem(root, wxT("Global Functions and Variables"), 2, 2, new MyTreeItemData(wxT("Global Functions and Variables"), -1)); + m_prototypesNode = AppendItem(root, wxT("Functions Prototypes"), 2, 2, new MyTreeItemData(wxT("Functions Prototypes"), -1)); + m_macrosNode = AppendItem(root, wxT("Macros"), 2, 2, new MyTreeItemData(wxT("Macros"), -1)); + + // Iterate over the tree and add items + m_sortItems.clear(); + + Freeze(); + for(; !walker.End(); walker++) + { + // Add the item to the tree + TagNode* node = walker.GetNode(); + + // Skip root node + if(node->IsRoot()) + continue; + + // Add the node + AddItem(node); + } + + SortTree(m_sortItems); + Thaw(); + + //select the root node by default + if(!(GetWindowStyleFlag() & wxTR_HIDE_ROOT)){ + //root is visible, select it + SelectItem(GetRootItem()); + } +} + +void SymbolTree::AddItem(TagNode* node) +{ + // Get node icon index + TagEntry nodeData = node->GetData(); + + int iconIndex = GetItemIconIndex(nodeData.GetKind(), nodeData.GetAccess()); + wxString displayName(nodeData.GetDisplayName()); + + wxTreeItemId parentHti; + if(nodeData.GetName().IsEmpty()) + return; + + //------------------------------------------------------------------------------- + // We gather globals together under special node + //------------------------------------------------------------------------------- + if( (nodeData.GetParent() == wxT("")) && // parent is global scope + m_globalsKind.find(nodeData.GetKind()) != m_globalsKind.end() ) //the node kind is one of function, prototype or variable + { + if(nodeData.GetKind() == wxT("prototype")) + parentHti = m_prototypesNode; + else + parentHti = m_globalsNode; + } + else + parentHti = node->GetParent()->GetData().GetTreeItemId(); + + //--------------------------------------------------------------------------------- + // Macros are gathered under the 'Macros' node + //--------------------------------------------------------------------------------- + if(nodeData.GetKind() == wxT("macro")) + { + parentHti = m_macrosNode; + } + + //only if parent is valid, we add item to the tree + wxTreeItemId hti; + + if(parentHti.IsOk() == false) + { + parentHti = GetRootItem(); + } + + if(parentHti.IsOk()){ + hti = AppendItem(parentHti, // parent + displayName, // display name + iconIndex, // item image index + iconIndex, // selected item image + new MyTreeItemData(node->GetData().GetFile(), node->GetData().GetLine())); + node->GetData().SetTreeItemId( hti ); + m_sortItems[parentHti.m_pItem] = true; + m_items[nodeData.Key()] = hti.m_pItem; + } +} + +void SymbolTree::SelectItemByName(const wxString &name) +{ + std::map::iterator iter = m_items.begin(); + for(; iter != m_items.end(); iter++){ + wxString tmpkey = iter->first; + wxString key(tmpkey); + tmpkey.StartsWith(wxT("[prototype] "), &key); + wxString path = key.BeforeFirst(wxT('(')); + //get the name from the path + path = path.AfterLast(wxT(':')); + + if(wxStrnicmp(path, name, name.Length()) == 0){ + //we got an item to select + SelectItem(iter->second); + return; + } + } +} + +void SymbolTree::SortTree(std::map & nodes) +{ + std::map::iterator iter = nodes.begin(); + for(; iter != nodes.end(); iter++) + { + wxTreeItemId item = iter->first; + if(item.IsOk()) + { + // Does this node has children? + if( GetChildrenCount( item ) == 0 ) + continue; + SortChildren(item); + } + } +} + +int SymbolTree::OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) +{ + // Get the items and compare their icons + int img1, img2; + img1 = GetItemImage(item1); + img2 = GetItemImage(item2); + if(img1 > img2) + return 1; + else if(img1 < img2) + return -1; + else + { + // Items has the same icons, compare text + return wxTreeCtrl::OnCompareItems(item1, item2); + } +} + +int SymbolTree::GetItemIconIndex(const wxString &kind, const wxString &access) +{ + wxString key(kind); + int index(4); // structs will be the default icon index + + if( !access.IsEmpty() ) + key += wxT("_") + access; + + key.Trim(); + + std::map::iterator iter = m_imagesMap.find(key); + if(iter != m_imagesMap.end()) + index = iter->second; + return index; +} + +void SymbolTree::UpdateSymbols(SymbolTreeEvent& event) +{ + if( !m_tree ) + return; + + std::vector > items = event.GetItems(); + + + size_t i=0; + Freeze(); + for(; iFind(key); + if( node ) + { + // Update the new data with the gui tree item id + data.SetTreeItemId( node->GetData().GetTreeItemId() ); + node->SetData(data); + + // Update Icon if needed + int iconIndex = GetItemIconIndex(data.GetKind(), data.GetAccess()); + int curIconIndex = -1; + wxTreeItemId itemId = node->GetData().GetTreeItemId(); + if(itemId.IsOk()){ + curIconIndex = GetItemImage(itemId); + if(curIconIndex != iconIndex ) + { + // Need to update the image as well + SetItemImage(node->GetData().GetTreeItemId(), iconIndex); + SetItemImage(node->GetData().GetTreeItemId(), iconIndex, wxTreeItemIcon_Selected); + + } // if(curIconIndex != iconIndex ) + //update the linenumber and file + MyTreeItemData *item_data = new MyTreeItemData(data.GetFile(), data.GetLine()); + wxTreeItemData *old_data = GetItemData(itemId); + if(old_data) + delete old_data; + SetItemData(itemId, item_data); + } + } +} + +void SymbolTree::DeleteSymbols(SymbolTreeEvent& event) +{ + if(!m_tree) + return; + + std::map deletedMap; + std::vector > items = event.GetItems(); + + Freeze(); + for(size_t i=0; i::iterator iter = m_items.find(key); + if(iter != m_items.end() && iter->second) + { + wxTreeItemId hti = iter->second; + //if this note was already deleted, dont delete it again + if(deletedMap.find(hti.m_pItem) == deletedMap.end()) + { + GetItemChildrenRecursive(hti, deletedMap); + //remove just the parent + Delete(hti); + } + m_items.erase(iter); + } + } + Thaw(); +} + +void SymbolTree::GetItemChildrenRecursive(wxTreeItemId &parent, std::map &deletedMap) +{ + //delete the item's children + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild(parent, cookie); + while(child.IsOk()) + { + if(ItemHasChildren(child)){ + GetItemChildrenRecursive(child, deletedMap); + }else{ + deletedMap[child.m_pItem] = child; + } + child = GetNextChild(parent, cookie); + } + deletedMap[parent.m_pItem] = true; +} + +void SymbolTree::AddSymbols(SymbolTreeEvent& event) +{ + if(!m_tree) + return; + + m_sortItems.clear(); + std::vector > items = event.GetItems(); + Freeze(); + for(size_t i=0; iAddEntry(data); + if(node) + { + AddItem(node); + } + } + } // for(size_t i=0; i m_imagesMap; + wxTreeItemId m_globalsNode; + wxTreeItemId m_prototypesNode; + wxTreeItemId m_macrosNode; + std::map m_sortItems; + std::map m_globalsKind; + wxFileName m_fileName; + std::map m_items; + TagTreePtr m_tree; + +public: + /** + * Default cosntructor. + */ + SymbolTree(); + + /** + * Parameterized constructor. + * \param parent Tree parent window + * \param id Window id + * \param pos Window position + * \param size Window size + * \param style Window style + */ + SymbolTree(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + + /** + * Destructor . + */ + virtual ~SymbolTree(void); + + /** + * Create tree, usually called after constructing SymbolTree with default constructor. + * \param parent Tree parent window + * \param id Window id + * \param pos Window position + * \param size Window size + * \param style Window style + */ + virtual void Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS); + + /** + * Construct a outline tree for fileName + */ + void BuildTree(const wxFileName &fileName); + + /** + * User provided icons for the symbols tree. + * The assignment is index based, in the following order: + * + * -# project + * -# namespace + * -# globals + * -# class + * -# function + * -# prototype_public + * -# prototype_protected + * -# prototype_private + * -# member_public + * -# member_protected + * -# member_private + * -# typedef + * -# macro + * -# enum + * + * \note Due to ctags limitation, only 'function' is mentioned here, there is no function_protected, function_private, etc + * since when coming to implementation (not prototypes!), all functions will receive 'public' icon. + * \param images Image list (allocated on the heap), this class becomes the owner of this image list + */ + virtual void SetSymbolsImages(wxImageList *images) + { + AssignImageList(images); + }; + + void AddSymbols(SymbolTreeEvent& event); + void DeleteSymbols(SymbolTreeEvent& event); + void UpdateSymbols(SymbolTreeEvent& event); + + /** + * return the file name assocaited with this symbol tree + */ + const wxFileName &GetFilename() const {return m_fileName;} + + /** + * \brief select item by its name and select it. If multiple matches + * fits 'name' the first one is selected + * \param name disply name of the item to be selected (can be partial name) + */ + void SelectItemByName(const wxString &name); +protected: + + void GetItemChildrenRecursive(wxTreeItemId& parent, std::map &deletedMap); + + /** + * Add an item to the gui tree. + * \param node Node to add + */ + void AddItem(TagNode* node); + + /** + * Return the icon index according to item kind and access. + * \param kind Item kind (class, namespace etc) + * \param access One of $public$, $private$, $protected$, or $wxEmptyString$ + * \return icon index + */ + int GetItemIconIndex(const wxString &kind, const wxString &access = wxEmptyString); + + /** + * Initialise the image: icon index map. + */ + void InitialiseSymbolMap(); + + /** + * Sort the tree. + * \param nodes Vector of nodes to sort + */ + void SortTree(std::map & nodes); + + /** + * Override this function in the derived class to change the sort order of the items in the tree control. + * \param item1 Item one + * \param item2 Item two + * \return The function should return a negative, zero or positive value + * if the first item is less than, equal to or greater than the second one. + */ + int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2); + + /** + * Update gui item with new data + * \param data new data + * \param key node key + */ + void UpdateGuiItem(TagEntry& data, const wxString& key); + + + DECLARE_DYNAMIC_CLASS(SymbolTree) + void OnItemActivated(wxTreeEvent &event); + void OnTimer(wxTimerEvent &event); +}; +#endif // CODELITE_SYMBOL_TREE_H diff --git a/CodeLite/tag_tree.cpp b/CodeLite/tag_tree.cpp new file mode 100644 index 0000000000..f0f95bb2bf --- /dev/null +++ b/CodeLite/tag_tree.cpp @@ -0,0 +1,68 @@ +#include "precompiled_header.h" + +#include "tag_tree.h" +#include "tokenizer.h" +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + + +TagTree::TagTree(const wxString& key, const TagEntry& data) +: Tree(key, data) +{ +} + +TagTree::~TagTree() +{ +} + +/// Util function to help us to build a tree from tags +TagNode* TagTree::AddEntry(TagEntry& tag) +{ + // If a node with thig tag already exist, we simply updating the + // data + wxString key(tag.Key()); + + TagNode* newNode = Find(key); + if( newNode ) + { + if( tag.IsOk() ) + newNode->SetData(tag); + return newNode; + + } + + // To add an entry to the tree, we first must make sure + // that all path to it exist + wxString name = tag.GetPath(); + StringTokenizer tok(name, wxT("::")); + + wxString parentPath; + TagNode* node = GetRoot(); + TagNode* lastFoundNode = GetRoot(); + for(int i=0; i TagNode; + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +/** + * Tree representation of tags. + * This is basically a data structure representing the GUI symbol tree. + * + * \date 08-23-2006 + * \author eran + * + */ +class WXDLLIMPEXP_CL TagTree : public Tree +{ +public: + /** + * Construct a tree with roots' values key & data. + * \param key Root's key + * \param data Root's data + */ + TagTree(const wxString& key, const TagEntry& data); + + + /** + * Destructor + */ + virtual ~TagTree(); + + /** + * Add an entry to the tree. + * This functions will add all parents of the tag to the tree if non exist (or some of some exist). + * For example: if TagName is box::m_string, this functions will make sure that a node 'box' exists. + * If not, it will add it and then will add m_string to it as its child. + * \param tag Tag to add + * \return new node that was added to the tree. + */ + TagNode* AddEntry(TagEntry& tag); + +}; + +typedef SmartPtr TagTreePtr; + +#endif // CODELITE_TAG_TREE_H diff --git a/CodeLite/tags_database.cpp b/CodeLite/tags_database.cpp new file mode 100644 index 0000000000..84c884820b --- /dev/null +++ b/CodeLite/tags_database.cpp @@ -0,0 +1,580 @@ +#include "precompiled_header.h" + +#include "tags_database.h" + +#ifdef __VISUALC__ +#ifdef _DEBUG +#define new DEBUG_NEW +#endif +#endif + +//------------------------------------------------- +// Tags database class implementation +//------------------------------------------------- +TagsDatabase::TagsDatabase(bool extDb) +: m_extDb(extDb) +{ + m_db = new wxSQLite3Database(); +} + +TagsDatabase::~TagsDatabase() +{ + if(m_db) + { + m_db->Close(); + delete m_db; + m_db = NULL; + } +} + +void TagsDatabase::OpenDatabase(const wxFileName& fileName) +{ + if(m_fileName == fileName) + return; + + // Did we get a file name to use? + if(!fileName.IsOk() && !m_fileName.IsOk()) + return; + + // We did not get any file name to use BUT we + // do have an open database, so we will use it + if(!fileName.IsOk()) + return; + + if(!m_fileName.IsOk()) + { + // First time we open the db + m_db->Open(fileName.GetFullPath()); + CreateSchema(); + m_fileName = fileName; + } + else + { + // We have both fileName & m_fileName and they + // are different, Close previous db + m_db->Close(); + m_db->Open(fileName.GetFullPath()); + CreateSchema(); + m_fileName = fileName; + } +} + +void TagsDatabase::CreateSchema() +{ + wxString sql; + + // improve performace by using pragma command: + // (this needs to be done before the creation of the + // tables and indices) + try + { + sql = wxT("PRAGMA synchronous = OFF;"); + m_db->ExecuteUpdate(sql); + + sql = wxT("PRAGMA temp_store = MEMORY;"); + m_db->ExecuteUpdate(sql); + + sql = wxT("PRAGMA default_cache_size = 20000;"); + m_db->ExecuteUpdate(sql); + + sql = wxT("create table if not exists tags (ID INTEGER PRIMARY KEY AUTOINCREMENT, name string, file string, line integer, kind string, access string, signature string, pattern string, parent string, inherits string, path string, typeref string, scope string);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("create table if not exists comments (comment string, file string, line number);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("create table if not exists variables (name string primary key, value string)"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE UNIQUE INDEX IF NOT EXISTS COMMENTS_UNIQ on comments(file, line)"); + m_db->ExecuteUpdate(sql); + + // Create unique index on tags table + sql = wxT("CREATE UNIQUE INDEX IF NOT EXISTS TAGS_UNIQ on tags(kind, path, signature);"); + m_db->ExecuteUpdate(sql); + + // Create search indexes + sql = wxT("CREATE INDEX IF NOT EXISTS TAGS_NAME on tags(name);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS TAGS_SCOPE on tags(scope);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS TAGS_PATH on tags(path);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS TAGS_PARENT on tags(parent);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS TAGS_KIND on tags(kind);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS COMMENTS_FILE on COMMENTS(file);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("CREATE INDEX IF NOT EXISTS COMMENTS_LINE on COMMENTS(line);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("create table if not exists tags_version (version string primary key);"); + m_db->ExecuteUpdate(sql); + + sql = wxT("create unique index if not exists tags_version_uniq on tags_version(version);"); + m_db->ExecuteUpdate(sql); + + sql = wxString(wxT("insert into tags_version values ('")); + sql << GetVersion() << wxT("');"); + m_db->ExecuteUpdate(sql); + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } +} + +void TagsDatabase::RecreateDatabase() +{ + try + { + wxString sql; + m_db->ExecuteUpdate(wxT("DROP TABLE IF EXISTS TAGS")); + m_db->ExecuteUpdate(wxT("DROP TABLE IF EXISTS COMMENTS")); + m_db->ExecuteUpdate(wxT("DROP TABLE IF EXISTS TAGS_VERSION")); + m_db->ExecuteUpdate(wxT("DROP TABLE IF EXISTS VARIABLES")); + + //recreate the schema + CreateSchema(); + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } +} + + +wxString TagsDatabase::GetSchemaVersion() const +{ + // return the current schema version + try + { + wxString sql; + wxString version; + sql = wxT("SELECT * FROM TAGS_VERSION"); + wxSQLite3ResultSet rs = m_db->ExecuteQuery( sql ); + + if( rs.NextRow() ) + version = rs.GetString(0); + return version; + } + catch(wxSQLite3Exception &e ) + { + wxUnusedVar(e); + } + return wxEmptyString; +} + +void TagsDatabase::Store(const std::vector &records, const wxFileName& path, bool autoCommit) +{ + if(!path.IsOk() && !m_fileName.IsOk()) + { + // An attempt is made to save the tree into db but no database + // is provided and none is currently opened to use + return; + } + + if(records.empty()) + return; + + OpenDatabase(path); + try + { + // Create the statements before the execution + wxSQLite3Statement insertStmt = m_db->PrepareStatement(records[0]->GetInsertOneStatement()); + + std::vector updateList; + + // AddChild entries to database + // we break the bug transaction into samller ones of 1000 operations + // each + const size_t bulk = 1000; + if( autoCommit ) + m_db->Begin(); + + size_t i=0; + for(; iStore(insertStmt) == TagExist) + { + // Update the record + updateList.push_back(records[i]); + } + else + { + // insert succeeded + if(i % bulk == 0 && autoCommit) + { + m_db->Commit(); + m_db->Begin(); + } + } + } + insertStmt.Finalize(); + + if( autoCommit ) + m_db->Commit(); + + // Do we need to update? + if(!updateList.empty()) + { + wxSQLite3Statement updateStmt = m_db->PrepareStatement( updateList[0]->GetUpdateOneStatement() ); + if( autoCommit ) + m_db->Begin(); + for(size_t i=0; iUpdate(updateStmt); + if( i % bulk == 0 && autoCommit ) + { + m_db->Commit(); + m_db->Begin(); + } + } + updateStmt.Finalize(); + if( autoCommit ) + m_db->Commit(); + } + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + try{ + if( autoCommit ) + m_db->Rollback(); + }catch(wxSQLite3Exception& e1){ + wxUnusedVar(e1); + } + } +} + +void TagsDatabase::Store(TagTreePtr tree, const wxFileName& path, bool autoCommit) +{ + if(!path.IsOk() && !m_fileName.IsOk()) + { + // An attempt is made to save the tree into db but no database + // is provided and none is currently opened to use + return; + } + + if( !tree ) + return; + + OpenDatabase(path); + TreeWalker walker( tree->GetRoot() ); + + try + { + // Create the statements before the execution + TagEntry dummy; + wxSQLite3Statement insertStmt = m_db->PrepareStatement( dummy.GetInsertOneStatement() ); + + std::vector updateList; + + // AddChild entries to database + if( autoCommit ) + m_db->Begin(); + + for(; !walker.End(); walker++) + { + // Skip root node + if(walker.GetNode() == tree->GetRoot()) + continue; + + //walker.GetNode()->GetData().SetParentId(walker.GetNode()->GetParent()->GetData().GetId()); + if(walker.GetNode()->GetData().Store(insertStmt) == TagExist) + { + // Update the record + updateList.push_back(walker.GetNode()->GetData()); + } + } + insertStmt.Finalize(); + + if( autoCommit ) + m_db->Commit(); + + // Do we need to update? + if(!updateList.empty()) + { + wxSQLite3Statement updateStmt = m_db->PrepareStatement( updateList[0].GetUpdateOneStatement() ); + if( autoCommit ) + m_db->Begin(); + for(size_t i=0; iCommit(); + } + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + try{ + if( autoCommit ) + m_db->Rollback(); + }catch(wxSQLite3Exception& WXUNUSED(e1)){ + wxUnusedVar(e); + } + } +} + +wxSQLite3ResultSet TagsDatabase::SelectTagsByFile(const wxString& file, const wxFileName& path) +{ + // Incase empty file path is provided, use the current file name + wxFileName databaseFileName(path); + path.IsOk() == false ? databaseFileName = m_fileName : databaseFileName = path; + OpenDatabase(databaseFileName); + + wxString query; + query << wxT("select * from tags where file='") << file << wxT("' "); + return m_db->ExecuteQuery(query.GetData()); +} + + +void TagsDatabase::DeleteByFileName(const wxFileName& path, const wxString& fileName, bool autoCommit) +{ + // make sure database is open + OpenDatabase(path); + + try + { + if( autoCommit ) + m_db->Begin(); + m_db->ExecuteUpdate(wxString::Format(wxT("Delete from tags where File='%s'"), fileName.GetData())); + + if( autoCommit ) + m_db->Commit(); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + if( autoCommit ) + m_db->Rollback(); + } +} + +wxSQLite3ResultSet TagsDatabase::Query(const wxString& sql, const wxFileName& path) +{ + // make sure database is open + OpenDatabase(path); + + try + { + return m_db->ExecuteQuery(sql); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } + return wxSQLite3ResultSet(); +} + +void TagsDatabase::ExecuteUpdate(const wxString& sql) +{ + try + { + m_db->ExecuteUpdate(sql); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } +} + +const bool TagsDatabase::IsOpen() const +{ + return m_db->IsOpen(); +} + +void TagsDatabase::LoadToMemory(const wxFileName& fn) +{ + + // this function is useful if our database is static and unlikely to be changed + // A good candidate for it, is the external database (a database for static tags like, stl, wxwidgets symbols etc) + + // to load a database into memory, we do the following: + // - attach to the file database and copy its schema to our memory + // - copy the whole database content to our memory + // - dettach the file database + if(m_db->IsOpen()) + { + // close any opened database and reopen it as in-memory + m_db->Close(); + } + + try + { + m_db->Open(wxT(":memory:")); + // copy database schema, we do it by opening a second database + wxString sql; + wxSQLite3Database *budb = new wxSQLite3Database(); + budb->Open(fn.GetFullPath()); + + budb->Begin(); + wxSQLite3ResultSet rs = budb->ExecuteQuery( wxT("SELECT sql FROM sqlite_master WHERE sql NOT NULL") ); + while( rs.NextRow() ) + { + sql = rs.GetString(0); + if(sql.Find(wxT("sqlite_sequence")) == wxNOT_FOUND){ + m_db->ExecuteUpdate( sql ); + } + } + budb->Commit(); + budb->Close(); + delete budb; + + // insert all data from file database into memory db + sql.Empty(); + sql << wxT("ATTACH DATABASE '") << fn.GetFullPath() << wxT("' as backup"); + m_db->ExecuteUpdate(sql); + + //copy tags table + m_db->Begin(); + sql = wxT("insert into tags select id, name, file, line, kind, access, signature, pattern, parent, inherits, path, typeref, scope FROM backup.tags"); + m_db->ExecuteUpdate(sql); + m_db->Commit(); + + //copy comments table + m_db->Begin(); + sql = wxT("insert into comments select comment, file, line FROM backup.comments"); + m_db->ExecuteUpdate(sql); + m_db->Commit(); + + //copy comments table + m_db->Begin(); + sql = wxT("insert into variables select name, value FROM backup.variables"); + m_db->ExecuteUpdate(sql); + m_db->Commit(); + } + catch(wxSQLite3Exception& e) + { + wxUnusedVar(e); + } +} + +TagEntryPtr TagsDatabase::FindTagById(int id) const +{ + wxString sql; + sql << wxT("select * from tags where id=") << id; + try + { + wxSQLite3ResultSet q = m_db->ExecuteQuery(sql); + if(q.NextRow()){ + return TagEntryPtr(new TagEntry(q)); + } + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } + return NULL; +} + +VariableEntryPtr TagsDatabase::FindVariableByName(const wxString &name) const +{ + wxString sql; + sql << wxT("select * from variables where name='") << name << wxT("'"); + try + { + wxSQLite3ResultSet q = m_db->ExecuteQuery(sql); + if(q.NextRow()){ + return VariableEntryPtr(new VariableEntry(q)); + } + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } + return NULL; +} + +int TagsDatabase::Insert(DbRecordPtr record) +{ + try + { + // Create the statements before the execution + wxSQLite3Statement insertStmt = m_db->PrepareStatement(record->GetInsertOneStatement()); + return record->Store(insertStmt); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } + return TagError; +} + +int TagsDatabase::Delete(DbRecordPtr record) +{ + try + { + // Create the statements before the execution + wxSQLite3Statement delStmnt = m_db->PrepareStatement(record->GetDeleteOneStatement()); + return record->Delete(delStmnt); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } + return TagError; +} + +int TagsDatabase::Update(DbRecordPtr record) +{ + try + { + // Create the statements before the execution + wxSQLite3Statement updStmnt = m_db->PrepareStatement(record->GetUpdateOneStatement()); + return record->Update(updStmnt); + } + catch (wxSQLite3Exception& e) + { + wxUnusedVar(e); + } + return TagError; +} + +void TagsDatabase::GetVariables(std::vector &vars) +{ + try + { + wxSQLite3ResultSet res = m_db->ExecuteQuery(wxT("select * from variables")); + while(res.NextRow()){ + vars.push_back(new VariableEntry(res)); + } + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } +} + +void TagsDatabase::GetFiles(const wxString &partialName, std::vector &files) +{ + try + { + wxString query; + wxString tmpName(partialName); + tmpName.Replace(wxT("_"), wxT("^_")); + query << wxT("select distinct file from tags where file like '%%") << tmpName << wxT("%%' ESCAPE '^' ") + << wxT("order by file"); + + wxSQLite3ResultSet res = m_db->ExecuteQuery(query); + while(res.NextRow()){ + wxFileName fileName(res.GetString(0)); + if(fileName.GetFullName().StartsWith(partialName)){ + files.push_back(fileName); + } + } + } + catch(wxSQLite3Exception &e) + { + wxUnusedVar(e); + } +} + diff --git a/CodeLite/tags_database.h b/CodeLite/tags_database.h new file mode 100644 index 0000000000..94538a31f6 --- /dev/null +++ b/CodeLite/tags_database.h @@ -0,0 +1,249 @@ +#ifndef CODELITE_TAGS_DATABASE_H +#define CODELITE_TAGS_DATABASE_H + +#include "tag_tree.h" +#include "entry.h" +#include +#include "db_record.h" +#include "variable_entry.h" + +const wxString gTagsDatabaseVersion(wxT("CodeLite version 0.5 Alpha")); + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +/** +TagsDatabase is a wrapper around wxSQLite3 database with tags specific functions. +It allows caller to query and populate the SQLite database for tags with a set of convinient functions. +this class is responsible for creating the schema for the CodeLite library. + +The tables are automatically created once a database is created + +Database tables: + +Table Name: TAGS + +|| Column Name || Type || Description +|Project | String | Project name of the entry +|Name | String | Tag name is appears in ctags output file +|File | String | File that this tag was found in +|Line | Number | Line number +|Kind | String | Tag kind, can be one of: function, prototype, class, namespace, variable, member, enum, enumerator, macro, project, union, typedef +|Access | String | Can be one of public, private protected +|Signature | String | For functions, this column holds the function signature +|Pattern | String | pattern that can be used to located this tag in the file +|Parent | String | tag direct parent, can be its class parent (for members or functions), namespace or the literal "" +|Inherits | String | If this class/struct inherits from other class, it will cotain the name of the base class +|Path | String | full name including path, (e.g. Project::ClassName::FunctionName +|Typeref| String | Special type of tag, that points to other Tag (i.e. typedef) + +Table Name: COMMENTS + +|| Column Name || Type || Description +|Comment| String | String comment found in code +|File | String | File that the comment was found in +|Line | Number | Line number of the comment in File + +Table Name: TAGS_VERSION + +|| Column Name || Type || Description +| Version | String | contains the current database schema + +Table Name: VARIABLES + +|| Column Name || Type || Description +| variable | String | contains the variable name +| value | String | the actual path + +\date 08-22-2006 +\author Eran +\ingroup CodeLite +*/ +class WXDLLIMPEXP_CL TagsDatabase +{ + wxSQLite3Database *m_db; + wxFileName m_fileName; + bool m_extDb; + +public: + /** + * Construct a tags database. + */ + TagsDatabase(bool extDb = false); + + /** + * + * Destructor + */ + virtual ~TagsDatabase(); + + /** + * Return the currently opened database. + * \return Currently open database + */ + const wxFileName& GetDatabaseFileName() const { return m_fileName; } + + /** + * Open sqlite database. + * \param fileName Database file name + */ + void OpenDatabase(const wxFileName& fileName); + + /** + * Create database if not existed already. + */ + void CreateSchema(); + + /** + * Store tree of tags into db. + * \param tree Tags tree to store + * \param path Database file name + * \param autoCommit handle the Store operation inside a transaction or let the user hadle it + */ + void Store(TagTreePtr tree, const wxFileName& path, bool autoCommit = true); + + /** + * Store vector of database recreds into db. + * ASSUMPTION: all records are of same type (i.e. Comments OR TagEntry ) + * \param records records to store + * \param path Database file name + * \param autoCommit handle the Store operation inside a transaction or let the user hadle it + */ + void Store(const std::vector &records, const wxFileName& path, bool autoCommit = true); + + /** + * Return a result set of tags according to file name. + * \param file Source file name + * \param path Database file name + * \return result set + */ + wxSQLite3ResultSet SelectTagsByFile(const wxString& file, const wxFileName& path = wxFileName()); + + /** + * Delete all entries from database that are related to filename. + * \param path Database name + * \param fileName File name + * \param autoCommit handle the Delete operation inside a transaction or let the user hadle it + */ + void DeleteByFileName(const wxFileName& path, const wxString& fileName, bool autoCommit = true); + + /** + * Begin transaction. + */ + void Begin() { return m_db->Begin(); } + + /** + * Commit transaction. + */ + void Commit() { return m_db->Commit(); } + + /** + * Rollback transaction. + */ + void Rollback() { return m_db->Begin(); } + + /** + * Test whether the database is opened + * \return true if database is attached to a file + */ + const bool IsOpen() const; + + /** + * Execute a query sql and return result set. + * \param sql Select statement + * \param path Database file to use + * \return result set + */ + wxSQLite3ResultSet Query(const wxString& sql, const wxFileName& path = wxFileName()); + + /** + * Return SQLite3 preapre statement object + * \param sql sql + * \return wxSQLite3ResultSet object + */ + wxSQLite3Statement PrepareStatement( const wxString & sql ) { return m_db->PrepareStatement( sql ); } + + /** + * Execute query + * \param sql sql to execute + */ + void ExecuteUpdate( const wxString& sql ); + + /** + * Return the current version of the database library . + * \return current version of the database library + */ + const wxString& GetVersion() const { return gTagsDatabaseVersion; } + + /** + * Load the tags table into memory, to improve performance + * \param fn file name + */ + void LoadToMemory(const wxFileName& fn); + + /** + * Schema version as appears in TAGS_VERSION table + * \return schema's version + */ + wxString GetSchemaVersion() const; + + /** + * Return tag entry from database by ID + * \param id + * \return tag entry or NULL + */ + TagEntryPtr FindTagById(int id) const; + + /** + * Return variable entry from database by name + * \param name + * \return variable entry or NULL + */ + VariableEntryPtr FindVariableByName(const wxString &name) const; + + /** + * A very dengerous API call, which drops all tables from the database + * and recreate the schema from fresh. It is used when upgrading database between different + * versions + */ + void RecreateDatabase(); + + //--------------------------------------- + // Basic database operations on a single + // record + //--------------------------------------- + + /** + * if item does not exist, insert it, else return 'TagExist' error code + */ + int Insert(DbRecordPtr record); + + /** + * if item does not exist, insert it, else return 'TagExist' error code + */ + int Update(DbRecordPtr record); + + /** + * delete record + */ + int Delete(DbRecordPtr record); + + /** + * return list of files from the database. The returned list is ordered + * by name (ascending) + * \param partialName part of the file name to act as a filter + * \param files [output] array of files + */ + void GetFiles(const wxString &partialName, std::vector &files); + + void GetVariables(std::vector &vars); +}; + +#endif // CODELITE_TAGS_DATABASE_H + + diff --git a/CodeLite/tags_options_data.cpp b/CodeLite/tags_options_data.cpp new file mode 100644 index 0000000000..47a12bd4c2 --- /dev/null +++ b/CodeLite/tags_options_data.cpp @@ -0,0 +1,69 @@ +#include "tags_options_data.h" + +//--------------------------------------------------------- + +TagsOptionsData::TagsOptionsData() +: SerializedObject() +, m_ccFlags(0) +, m_fileSpec(wxT("*.cpp;*.cc;*.cxx;*.h;*.hpp;*.c;*.c++")) +{ + m_languages.Add(wxT("C++")); + m_languages.Add(wxT("Java")); +} + +TagsOptionsData::~TagsOptionsData() +{ +} + +void TagsOptionsData::Serialize(Archive &arch) +{ + arch.Write(wxT("m_ccFlags"), m_ccFlags); + arch.Write(wxT("m_prep"), m_prep); + arch.Write(wxT("m_fileSpec"), m_fileSpec); + arch.Write(wxT("m_languages"), m_languages); +} + +void TagsOptionsData::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_ccFlags"), m_ccFlags); + arch.Read(wxT("m_prep"), m_prep); + arch.Read(wxT("m_fileSpec"), m_fileSpec); + arch.Read(wxT("m_languages"), m_languages); +} + +wxString TagsOptionsData::ToString() const +{ + wxString options(wxEmptyString); + if(m_prep.GetCount() > 0){ + options = wxT(" -I"); + for(size_t i=0; i= 2) + { + size_t i=1; + for(; i0) + { + m_nCurr = 1; //The next one + return m_tokensArr[0]; + } + else + { + return wxEmptyString; + } +} + +// This function is much similar to the 'next()' function with one difference, +// it does not advance the pointer to the next token. +wxString StringTokenizer::Current() +{ + if( m_nCurr == (int)m_tokensArr.size() ) + { + // We are at the end of the tokens array + return wxEmptyString; + } + return m_tokensArr[m_nCurr]; +} + +const int StringTokenizer::Count() const +{ + return (int)m_tokensArr.size(); +} + +void StringTokenizer::Initialize() +{ + m_tokensArr.clear(); + m_nCurr = 0; +} + +// Return last token +wxString StringTokenizer::Last() +{ + if(m_tokensArr.size() == 0) + return wxEmptyString; + m_nCurr = (int)m_tokensArr.size()-1; + return m_tokensArr[m_tokensArr.size()-1]; +} + +wxString StringTokenizer::operator[](const int nIndex) +{ + if(m_tokensArr.size() == 0) + return wxEmptyString; + if( nIndex>=(int)m_tokensArr.size() || nIndex<0) + return wxEmptyString; + return m_tokensArr[nIndex]; +} + + diff --git a/CodeLite/tokenizer.h b/CodeLite/tokenizer.h new file mode 100644 index 0000000000..2abeeaad27 --- /dev/null +++ b/CodeLite/tokenizer.h @@ -0,0 +1,164 @@ +// StringTokenizer.h: interface for the StringTokenizer class. +// +////////////////////////////////////////////////////////////////////// + +#ifndef CODELITE_TOKENIZER_H +#define CODELITE_TOKENIZER_H + +#include +#include +#include + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +/** + * StringTokenizer helps you to break a string up into a number of tokens. + * It replaces the standard C function strtok() and also extends it in a number of ways. + * + * Usage example: + * + * \code + * StringTokenizer tok(_T("first second third"), _T(" ")); + * while( tok.HasMore() ) + * { + * wxString token = tok.Next(); + * } + * \endcode + * + * An alternate way to iterate over the tokenizer: + * + * \code + * StringTokenizer tok(_T("first second third"), _T(" ")); + * for(int i=0; i m_tokensArr; + int m_nCurr; + +public: + /** + * Construct a tokenizer with given input string and delimiter + * \param str source string + * \param delimiter delimiter to use + * \param bAllowEmptyTokens if set to true, empty tokens will be returned as well. Default is no empty tokens + */ + StringTokenizer(const wxString& str,const wxString& delimiter = _T(" ") , const bool &bAllowEmptyTokens = false); + + /** + * Construct a tokenizer with given input string and array of delimiters + * \param str source string + * \param delimiterArr array of delimiters + * \param bAllowEmptyTokens if set to true, empty tokens will be returned as well. Default is no empty tokens + */ + StringTokenizer(const wxString& str,const wxArrayString& delimiterArr, const bool &bAllowEmptyTokens = false); + /** + * Copy constructor + * \param src source tokenizer + */ + StringTokenizer(const StringTokenizer& src); + + /** + * Default constructor + */ + StringTokenizer(); //Default + + /** + * Destructor + */ + virtual ~StringTokenizer(); + + //----------------------------------------------------- + // Operations + //----------------------------------------------------- + + /** + * Return the last token + * \return last token + */ + wxString Last(); + /** + * Get the number of tokens + * \return number of tokens + */ + const int Count() const; + /** + * Return the current token without progressing the internal pointer + * \return current token + */ + wxString Current(); + + /** + * Return the first token and progress the internal pointer + * \return First token + */ + wxString First(); + /** + * Do we have more tokens? + * \return true if the next call to Next() will return a token + */ + bool HasMore(); + /** + * Return the previous string, this function moves the internal pointer backward. + * So, subsequent calls to this function, will eventually return us to the start of the tokenizer + * \return previous token of empty string if we are already at start + */ + wxString Previous(); + /** + * Return next token, usually combined with HasMore() function. This function progress the + * internal pointer to next token + * \return next token + */ + wxString Next(); + /** + * Random acess operator, statring from zero + * \param nIndex token index + * \return token at nIndex (copy of it) + */ + wxString operator[](const int nIndex); + + /** + * Copy one tokenizer to another + * \param src source tokenizer to copy from + * \return this + */ + StringTokenizer& operator=(const StringTokenizer& src); + +private: + // Functions + /** + * Initialize the tokenizer + */ + void Initialize(); +}; + +#endif // CODELITE_TOKENIZER_H diff --git a/CodeLite/tree.h b/CodeLite/tree.h new file mode 100644 index 0000000000..c6e44f9cd0 --- /dev/null +++ b/CodeLite/tree.h @@ -0,0 +1,218 @@ +#ifndef CODELITE_TREE_H +#define CODELITE_TREE_H + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +#include "tree_node.h" +template +class WXDLLIMPEXP_CL Tree +{ + std::map*> m_nodes; + TreeNode* m_root; +public: + /** + * Construct a tree with root node with Key and data. + * \param key Root node key + * \param data Root node data + */ + Tree(const TKey& key, const TData& data); + + /** + * Destructor, deletes all tree and its sub nodes. + */ + virtual ~Tree(); + + /** + * Find node in the tree with Key. + * \param key Search key + * \return node + */ + TreeNode* Find(const TKey& key) ; + + /** + * Remove node (and all its sub nodes) from the tree using key as the criteria. + * This function does not delete the removed node. + * \param key search key + * \return remove node + */ + TreeNode* Remove(const TKey& key); + + /** + * Add child node to the tree. + * \param key New node key + * \param data New node data + * \param parent New node parent, if left NULL parent is set to root + * \return newly added node + */ + TreeNode* AddChild(const TKey& key, const TData& data, TreeNode* parent = NULL) ; + + /** + * Returns tree root. + * \return root node + */ + TreeNode* GetRoot() { return m_root;} + + /** + * Prints the tree in tabulated format to stream. + * \param stream Output stream (default is set to stdout) + * \param depth Tab depth (for internal use) + */ + void Print(std::ostream& stream = std::cout , int depth = 0); + + /** + * Compare this tree against another tree. + * \param targetTree Target tree to compare with + * \param deletedItems Array of pairs of items which exist in this tree and not in target tree + * \param modifiedItems Array of pairs of items which have the same key but differnt data + * \param newItems Aarray of pairs of items which exist in the target tree but not in this tree + * \param fromNode If its set to null, comparison will start from this tree root node, if not null, + * comparison will compare sub-tree which root of its fromNode + */ + void Compare(Tree* targetTree, std::vector >& deletedItems, std::vector >& modifiedItems, std::vector >& newItems, TreeNode* fromNode = NULL); + + /** + * Serialize the tree to vector + * \param vec output vector + */ + void ToVector(std::vector >& vec); +}; + +template +Tree::Tree(const TKey& key, const TData& data) +{ + m_root = new TreeNode(key, data); +} + +template +Tree::~Tree() +{ + delete m_root; +} + +template +TreeNode* Tree::Find(const TKey& key) +{ + typename std::map*>::const_iterator iter = m_nodes.find(key); + if(iter == m_nodes.end()) + return NULL; + return iter->second; +} + +template +TreeNode* Tree::AddChild(const TKey& key, const TData& data, TreeNode* parent /*NULL*/) +{ + TreeNode* parentNode; + (parent == NULL) ? parentNode = m_root : parentNode = parent; + TreeNode* node = parentNode->AddChild(key, data); + m_nodes[key] = node; + return node; +} + +template +TreeNode* Tree::Remove(const TKey& key) +{ + typename std::map*>::const_iterator iter = m_nodes.find(key); + if(iter == m_nodes.end()) + return NULL; + + // Remove from the map all sub-nodes of the tree + TreeWalker walker(iter->second); + + for(; !walker.End(); walker++) + { + typename std::map*>::iterator it = m_nodes.find(walker.GetNode()->GetKey()); + if(it != m_nodes.end()) + m_nodes.erase(it); + } + return m_root->Remove(key); +} +template +void Tree::Print(std::ostream& stream , int depth) +{ + m_root->Print(stream, depth); +} + +template +void Tree::ToVector(std::vector >& vec) +{ + TreeWalker walker(GetRoot()); + for(; !walker.End(); walker++) + { + if( walker.GetNode()->IsRoot() ) + continue; + + std::pair itemPair; + itemPair.first = walker.GetNode()->GetKey(); + itemPair.second = walker.GetNode()->GetData(); + vec.push_back( itemPair ); + } +} + +template +void Tree::Compare(Tree* targetTree, std::vector >& deletedItems, std::vector >& modifiedItems, std::vector >& newItems, TreeNode* fromNode) +{ + if(!targetTree){ + return; + } + + deletedItems.clear(); newItems.clear(); modifiedItems.clear(); + + TreeNode* node; + + fromNode == NULL ? node = GetRoot() : node = fromNode; + TreeWalker sourceTreeWalker(node); + TreeWalker targetTreeWalker(targetTree->GetRoot()); + + for(; !sourceTreeWalker.End(); sourceTreeWalker++) + { + if( sourceTreeWalker.GetNode()->IsRoot() ) + continue; + + TreeNode* node = targetTree->Find(sourceTreeWalker.GetNode()->GetKey()); + if(node == NULL) + { + // Item does not exist in target tree which means it must been deleted + std::pair itemPair; + itemPair.first = sourceTreeWalker.GetNode()->GetKey(); + itemPair.second = sourceTreeWalker.GetNode()->GetData(); + deletedItems.push_back( itemPair ); + } + else + { + // Compare data + if(node->GetData() == sourceTreeWalker.GetNode()->GetData()) + continue; + + // Data was modified + std::pair itemPair; + itemPair.first = sourceTreeWalker.GetNode()->GetKey(); + itemPair.second = node->GetData(); + modifiedItems.push_back( itemPair ); + } + } + + for(; !targetTreeWalker.End(); targetTreeWalker++) + { + if(targetTreeWalker.GetNode()->IsRoot()) + continue; + + if(Find(targetTreeWalker.GetNode()->GetKey()) == NULL) + { + // Node from target tree does not exist in this tree + // which means that this node is new + // Data was modified + std::pair itemPair; + itemPair.first = targetTreeWalker.GetNode()->GetKey(); + itemPair.second = targetTreeWalker.GetNode()->GetData(); + newItems.push_back( itemPair ); + } + } +} + +#endif // CODELITE_TREE_H diff --git a/CodeLite/tree_node.h b/CodeLite/tree_node.h new file mode 100644 index 0000000000..2bffd829ac --- /dev/null +++ b/CodeLite/tree_node.h @@ -0,0 +1,340 @@ +#ifndef CODELITE_TREE_NODE_H +#define CODELITE_TREE_NODE_H + +#include +#include +#include +#include + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif + +template +class WXDLLIMPEXP_CL TreeNode +{ + TKey m_key; + TData m_data; + TreeNode* m_parent; + std::map m_childs; + typename std::map::iterator m_pos; + +public: + /** + * Constructor, constructs a tree node with key and data. + * If parent is left NULL, node is assumed to be root. + * \param key Node key, must have operator =, < + * \param data Node data, this class must have operator= + * \param parent Parent node + */ + TreeNode(const TKey& key, const TData& data, TreeNode* parent = NULL); + + /** + * Destructor, deletes this node and all its children. + */ + virtual ~TreeNode(); + + //--------------------------------------------------- + // Setters / Getters + //--------------------------------------------------- + + /** + * Get node data. + * \return node data + */ + TData& GetData() + { + return m_data; + }; + + /** + * Get node key. + * \return key + */ + TKey& GetKey() + { + return m_key; + }; + + /** + * Set node data. + * \param data data + */ + void SetData(const TData& data) + { + m_data = data; + }; + + /** + * Set node key. + * \param key Key + */ + void SetKey(const TKey& key) + { + m_key = key; + }; + + /** + * Return the parent node of this node (or null if root). + * \return pointer to parent node + */ + TreeNode* GetParent() + { + return m_parent; + } + + //--------------------------------------------- + // Misc + //--------------------------------------------- + + /** + * Print the tree to stream (default is stdout). + */ + void Print(std::ostream& stream = std::cout , int depth = 0); + + /** + * Check if this node is root. + * \return true if node is root + */ + bool IsRoot() const + { + return m_parent == NULL; + }; + + //---------------------------------------------- + // Operations + //---------------------------------------------- + /** + * Add new child node to this node. + * Duplicate nodes are allowed. However, Remove() will remove the first occurance of a node by a given key. + * \param key Node key + * \param data Node data + * \return newly added node + */ + TreeNode* AddChild(const TKey& key, const TData& data) ; + + /** + * \brief Append new child to this tree node + * \param newNode node to append, must be allocated on the heap + * \return the newly added tree node + */ + TreeNode* AddChild(TreeNode* newNode); + + /** + * Remove first occurance of node with a given key. + * If the node to be removed is the root, a std::exception* is thrown, which must be deleted by caller. + * Remove does not delete the memory allocated for the node. The user must delete the removed node. + * \param key Node key + * \return removed node + */ + TreeNode* Remove(const TKey& key); + + /** + * Find a node by a key. + * \param key Node key + * \return node, or NULL if non exist + */ + TreeNode* Find(const TKey& key) ; + + /** + * Set the pointer to the first child of this node . + */ + void First(); + + /** + * Return the next child of this node. + */ + TreeNode* Next(); + + /** + * Test if this node has more childs. + * This call is usually used before issuing a Next() call. + * \return true if the next call to Next() will return a valid child pointer + */ + bool HasMore(); + std::map& GetChilds() { return m_childs; } +}; + +template +TreeNode::TreeNode(const TKey& key, const TData& data, TreeNode* parent) +: m_key(key), m_data(data), m_parent(parent) +{ +} + +template +TreeNode::~TreeNode() +{ + typename std::map::iterator iter = m_childs.begin(); + for(; iter != m_childs.end(); iter++) + { + delete iter->second; + } + m_childs.clear(); +} + +template +TreeNode* TreeNode::AddChild(const TKey& key, const TData& data) +{ + TreeNode* newNode = new TreeNode(key, data, this); + m_childs[newNode] = newNode; + return newNode; +} + +template +TreeNode* TreeNode::AddChild(TreeNode* newNode) +{ + m_childs[newNode] = newNode; + return newNode; +} + +template +TreeNode* TreeNode::Remove(const TKey& key) +{ + TreeNode* node = Find(key); + if( node ) + { + if(NULL == node->m_parent) + { + // Cant remove root + return NULL; + } + + typename std::map::iterator iter = node->m_parent->m_childs.find(node); + if(iter != node->m_parent->m_childs.end()) + node->m_parent->m_childs.erase(iter); + return node; + } + return NULL; +} + +template +TreeNode* TreeNode::Find(const TKey& key) +{ + if(m_key == key) + return this; + + typename std::map::iterator iter; + + // Scan first the childs of this node + for(iter = m_childs.begin(); iter != m_childs.end(); iter++) + { + if(((TreeNode*)iter->second)->GetKey() == key) + return iter->second; + } + + // Scan level below + for(iter = m_childs.begin(); iter != m_childs.end(); iter++) + { + TreeNode* node = NULL; + node = iter->second->Find(key); + if(node) return node; + } + return NULL; +} + +template +void TreeNode::Print(std::ostream& stream, int depth) +{ + std::string tab = " "; + for(int i=0; i::iterator iter = m_childs.begin(); + for(; iter != m_childs.end(); iter++) + iter->second->Print(stream, depth); +} + +/// Prepare for tree iteration in the current node +template +void TreeNode::First() +{ + m_pos = m_childs.begin(); +} + +template +TreeNode* TreeNode::Next() +{ + if(!HasMore()) + return NULL; + TreeNode* nextElem = m_pos->second; + m_pos++; + return nextElem; +} + +template +bool TreeNode::HasMore() +{ + return (m_pos != m_childs.end()); +} + +//---------------------------------------------------------------- +// TreeWalker class +//---------------------------------------------------------------- + +template +class TreeWalker +{ +private: + void GetChildren(TreeNode* node); + std::vector* > m_children; + size_t m_pos; + +public: + TreeWalker(TreeNode* node); + virtual ~TreeWalker(); + bool End(); + void operator++(int); + TreeNode* GetNode() + { + if(m_pos < m_children.size()) + return m_children[m_pos]; + return NULL; + } +}; + +template +TreeWalker::TreeWalker(TreeNode* node) +: m_pos(0) +{ + m_children.push_back(node); + GetChildren(node); +} + +template +TreeWalker::~TreeWalker() +{ +} + +template +void TreeWalker::GetChildren(TreeNode* node) +{ + if(node == NULL) + return; + typename std::map*, TreeNode*>::iterator iter = node->GetChilds().begin(); + for(; iter != node->GetChilds().end(); iter++) + { + m_children.push_back(iter->second); + GetChildren(iter->second); + } +} + +template +bool TreeWalker::End() +{ + return m_pos == m_children.size(); +} + +template +void TreeWalker::operator++(int) +{ + m_pos++; +} + +#endif // CODELITE_TREE_NODE_H diff --git a/CodeLite/unistd.h b/CodeLite/unistd.h new file mode 100644 index 0000000000..71cefefd1b --- /dev/null +++ b/CodeLite/unistd.h @@ -0,0 +1,16 @@ +/* + * This file is part of the Mingw32 package. + * + * unistd.h maps (roughly) to io.h + */ + +#ifndef __STRICT_ANSI__ +#ifdef __WXGTK__ +#include "/usr/include/unistd.h" +#elif defined(__WXMAC__) +#include "/usr/include/unistd.h" +#else +#include +#include +#endif +#endif diff --git a/CodeLite/var_parser.cpp b/CodeLite/var_parser.cpp new file mode 100644 index 0000000000..f70f1e3a6a --- /dev/null +++ b/CodeLite/var_parser.cpp @@ -0,0 +1,793 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_var_parse +#define yylex cl_var_lex +#define yyerror cl_var_error +#define yychar cl_var_char +#define yyval cl_var_val +#define yylval cl_var_lval +#define yydebug cl_var_debug +#define yynerrs cl_var_nerrs +#define yyerrflag cl_var_errflag +#define yyss cl_var_ss +#define yyssp cl_var_ssp +#define yyvs cl_var_vs +#define yyvsp cl_var_vsp +#define yylhs cl_var_lhs +#define yylen cl_var_len +#define yydefred cl_var_defred +#define yydgoto cl_var_dgoto +#define yysindex cl_var_sindex +#define yyrindex cl_var_rindex +#define yygindex cl_var_gindex +#define yytable cl_var_table +#define yycheck cl_var_check +#define yyname cl_var_name +#define yyrule cl_var_rule +#define YYPREFIX "cl_var_" + +/* Copyright Eran Ifrah(c) */ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "variable.h" + +#ifdef yylex +#undef yylex +#define yylex cl_scope_lex +#endif + +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +void cl_scope_error(char *string); +int cl_var_parse(); +void syncParser(); + +static VariableList *gs_vars = NULL; +static std::vector gs_names; + +Variable curr_var; +std::string temdecl; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern bool setLexerInput(const std::string &in, const std::map &ignoreMap); +extern void cl_scope_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_var_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 4, 2, 2, 5, 5, 5, 6, 6, 6, + 3, 12, 13, 13, 13, 13, 13, 14, 14, 8, + 8, 7, 7, 15, 15, 16, 16, 9, 10, 10, + 10, 10, 10, 10, 10, 11, 11, 11, +}; +short cl_var_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 0, 2, 1, 0, 1, 3, 4, 4, 6, + 5, 1, 1, 1, 1, 1, 1, 2, 5, 0, + 2, 0, 1, 0, 1, 0, 2, 2, 0, 1, + 1, 1, 1, 1, 1, 2, 3, 6, +}; +short cl_var_defred[] = { 10, + 0, 14, 11, 0, 40, 45, 42, 41, 43, 44, + 13, 0, 33, 0, 36, 6, 1, 4, 2, 5, + 3, 8, 7, 9, 46, 0, 0, 0, 0, 31, + 22, 0, 35, 37, 38, 28, 0, 26, 23, 24, + 25, 27, 21, 0, 16, 30, 0, 0, 0, 17, + 29, 0, 36, 0, 18, 19, 0, 0, +}; +short cl_var_dgoto[] = { 1, + 25, 3, 11, 4, 44, 45, 46, 26, 27, 12, + 15, 32, 43, 30, 35, 28, +}; +short cl_var_sindex[] = { 0, + -249, 0, 0, -30, 0, 0, 0, 0, 0, 0, + 0, -262, 0, -169, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -289, -287, -34, -60, 0, + 0, 68, 0, 0, 0, 0, -262, 0, 0, 0, + 0, 0, 0, -26, 0, 0, -262, -301, -216, 0, + 0, -59, 0, -262, 0, 0, -24, -301, +}; +short cl_var_rindex[] = { 0, + -37, 0, 0, -224, 0, 0, 0, 0, 0, 0, + 0, -178, 0, -271, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -32, -36, 0, + 0, 0, 0, 0, 0, 0, -29, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -178, -33, 0, 0, + 0, -25, 0, -29, 0, 0, 0, -21, +}; +short cl_var_gindex[] = { 0, + -9, 0, 0, 0, -10, -1, 36, 8, -27, 0, + 0, 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 274 +short cl_var_table[] = { 37, + 54, 47, 12, 33, 48, 47, 2, 34, 48, 7, + 13, 34, 36, 29, 15, 31, 36, 47, 36, 47, + 12, 12, 20, 12, 55, 56, 51, 10, 5, 34, + 6, 30, 15, 39, 39, 48, 36, 58, 39, 53, + 20, 16, 17, 57, 39, 50, 18, 14, 39, 39, + 39, 39, 19, 49, 39, 39, 0, 20, 21, 22, + 0, 0, 23, 24, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 39, 32, + 32, 0, 0, 0, 32, 12, 52, 12, 16, 17, + 32, 0, 8, 18, 9, 32, 32, 32, 0, 19, + 32, 32, 0, 0, 20, 21, 22, 42, 41, 23, + 24, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32, 0, 39, 0, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 12, 0, 0, 0, 12, 0, 0, 32, 32, + 0, 12, 0, 32, 0, 12, 12, 12, 12, 32, + 0, 12, 12, 0, 32, 32, 32, 0, 0, 32, + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 47, 36, 36, 48, + 34, 0, 0, 32, +}; +short cl_var_check[] = { 60, + 60, 38, 40, 38, 38, 42, 256, 42, 42, 40, + 273, 44, 38, 303, 44, 303, 42, 44, 44, 44, + 58, 59, 44, 61, 52, 53, 328, 58, 59, 62, + 61, 303, 62, 258, 259, 62, 62, 62, 263, 49, + 62, 258, 259, 54, 269, 47, 263, 12, 273, 274, + 275, 276, 269, 46, 279, 280, -1, 274, 275, 276, + -1, -1, 279, 280, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 303, 258, + 259, -1, -1, -1, 263, 123, 303, 125, 258, 259, + 269, -1, 123, 263, 125, 274, 275, 276, -1, 269, + 279, 280, -1, -1, 274, 275, 276, 40, 41, 279, + 280, 44, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 303, -1, 59, -1, 61, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 258, 259, -1, -1, -1, 263, -1, -1, 258, 259, + -1, 269, -1, 263, -1, 273, 274, 275, 276, 269, + -1, 279, 280, -1, 274, 275, 276, -1, -1, 279, + 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 303, 303, 328, 328, 303, + 303, -1, -1, 303, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_var_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'", +"'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE", +"LE_LONG","LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR", +"LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT", +"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT", +"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE", +"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC", +"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD", +"LE_TEMPLATE","LE_TYPENAME","LE_IDENTIFIER","LE_STRINGliteral", +"LE_FLOATINGconstant","LE_INTEGERconstant","LE_CHARACTERconstant", +"LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND","LE_CComment", +"LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname","LE_ARROW","LE_ICR", +"LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE","LE_ANDAND","LE_OROR", +"LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar","LE_MULTassign", +"LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign","LE_LSassign", +"LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign","LE_MACRO", +"LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST","LE_REINTERPRET_CAST", +}; +char *cl_var_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"$$1 :", +"external_decl : $$1 variables", +"external_decl : error", +"parameter_list :", +"parameter_list : template_parameter", +"parameter_list : parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +"variables : stmnt_starter variable_decl special_star_amp variable_name_list postfix", +"variable_name_list : LE_IDENTIFIER", +"postfix : ';'", +"postfix : '='", +"postfix : ')'", +"postfix : ','", +"postfix : '('", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"scope_specifier : LE_IDENTIFIER '<' parameter_list '>' LE_CLCL", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : '{'", +"stmnt_starter : '('", +"stmnt_starter : '}'", +"stmnt_starter : ':'", +"stmnt_starter : '='", +"variable_decl : const_spec basic_type_name", +"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER", +"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + + +std::string var_consumeFuncArgList() +{ + std::string consumedData; + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + consumedData += cl_scope_text; + consumedData += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } + return consumedData; +} + +void var_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +void get_variables(const std::string &in, VariableList &li, const std::map &ignoreMap) +{ + //provide the lexer with new input + if( !setLexerInput(in, ignoreMap) ) + { + return; + } + + //set the parser local output to our variable list + gs_vars = &li; + + //call tghe main parsing routine + cl_var_parse(); + gs_vars = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 12: +{curr_var.Reset(); gs_names.clear();} +break; +case 14: +{ + yyclearin; /*clear lookahead token*/ + yyerrok; + /*printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_var_lval.c_str(), cl_scope_lineno);*/ + var_syncParser(); + } +break; +case 15: +{yyval = "";} +break; +case 16: +{yyval = yyvsp[0];} +break; +case 17: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 18: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 19: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 20: +{yyval = yyvsp[-5] + " " + yyvsp[-4] + " " + yyvsp[-3] +yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 21: +{ + if(gs_vars) + { + Variable var; + std::string pattern; + curr_var.m_pattern = "/^"; + curr_var.m_pattern += yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + "$/"; + curr_var.m_isPtr = (yyvsp[-2].find("*") != (size_t)-1); + curr_var.m_starAmp = yyvsp[-2]; + curr_var.m_lineno = cl_scope_lineno; + for(size_t i=0; i< gs_names.size(); i++) + { + /*create new variable for every variable name found*/ + var = curr_var; + var.m_name = gs_names.at(i); + gs_vars->push_back(var); + } + curr_var.Reset(); + gs_names.clear(); + } + } +break; +case 22: +{gs_names.push_back(yyvsp[0]);} +break; +case 27: +{ yyval = yyvsp[0] + var_consumeFuncArgList();} +break; +case 28: +{yyval = yyvsp[-1]+ yyvsp[0]; } +break; +case 29: +{yyval = yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 30: +{yyval = "";} +break; +case 31: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = ""; } +break; +case 33: +{ yyval = yyvsp[0]; } +break; +case 34: +{yyval = ""; } +break; +case 35: +{ yyval = yyvsp[0]; } +break; +case 36: +{yyval = ""; } +break; +case 37: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 38: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 39: +{yyval = "";} +break; +case 40: +{ yyval = ";";} +break; +case 41: +{ yyval = "{";} +break; +case 42: +{ yyval = "(";} +break; +case 43: +{ yyval = "}";} +break; +case 44: +{ yyval = ":";} +break; +case 45: +{ yyval = "=";} +break; +case 46: +{ + yyval = yyvsp[-1] + " " + yyvsp[0]; + yyvsp[0].erase(yyvsp[0].find_last_not_of(":")+1); + curr_var.m_type = yyvsp[0]; + } +break; +case 47: +{ + yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0]; + yyvsp[-1].erase(yyvsp[-1].find_last_not_of(":")+1); + curr_var.m_typeScope = yyvsp[-1]; + curr_var.m_type = yyvsp[0]; + } +break; +case 48: +{ + yyval = yyvsp[-5] + " " + yyvsp[-4] + yyvsp[-3] + " " + yyvsp[-2] + yyvsp[-1] + yyvsp[0]; + yyvsp[-4].erase(yyvsp[-4].find_last_not_of(":")+1); + curr_var.m_typeScope = yyvsp[-4]; + curr_var.m_type = yyvsp[-3]; + curr_var.m_isTemplate = true; + curr_var.m_templateDecl = yyvsp[-2] +yyvsp[-1] +yyvsp[0]; + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CodeLite/variable.cpp b/CodeLite/variable.cpp new file mode 100644 index 0000000000..b2fadf0089 --- /dev/null +++ b/CodeLite/variable.cpp @@ -0,0 +1,52 @@ +#include "variable.h" + +Variable::Variable() +{ + Reset(); +} + +Variable::~Variable() +{ +} + +Variable::Variable(const Variable &src) +{ + *this = src; +} + +Variable & Variable::operator =(const Variable &src) +{ + m_type = src.m_type; + m_templateDecl = src.m_templateDecl; + m_name = src.m_name; + m_isTemplate = src.m_isTemplate; + m_isPtr = src.m_isPtr; + m_typeScope = src.m_typeScope; + m_pattern = src.m_pattern; + m_starAmp = src.m_starAmp; + m_lineno = src.m_lineno; + return *this; +} + +void Variable::Reset() +{ + m_type = ""; + m_templateDecl = ""; + m_name = ""; + m_isTemplate = false; + m_isPtr = false; + m_typeScope = ""; + m_pattern = ""; + m_starAmp = ""; + m_lineno = 0; +} + +void Variable::Print() +{ + fprintf( stdout, "{m_name=%s, m_lineno=%d, m_starAmp=%s, m_type=%s, m_typeScope=%s, m_templateDecl=%s, m_isPtr=%s, m_isTemplate=%s }\n", + m_name.c_str(), m_lineno, m_starAmp.c_str(), m_type.c_str(), m_typeScope.c_str(), m_templateDecl.c_str(), + m_isPtr ? "true" : "false", + m_isTemplate ? "true" : "false"); + fprintf( stdout, "Pattern: %s\n", m_pattern.c_str()); + fflush(stdout); +} diff --git a/CodeLite/variable.h b/CodeLite/variable.h new file mode 100644 index 0000000000..0300ff5b09 --- /dev/null +++ b/CodeLite/variable.h @@ -0,0 +1,38 @@ +#ifndef VARIABLE_H +#define VARIABLE_H + +#include "string" +#include "list" + +class Variable +{ +public: + std::string m_name; + bool m_isTemplate; + std::string m_templateDecl; + bool m_isPtr; + std::string m_type; //as in 'int a;' -> type=int + std::string m_typeScope;//as in 'std::string a;' -> typeScope = std, type=string + std::string m_pattern; + std::string m_starAmp; + int m_lineno; + +public: + Variable(); + virtual ~Variable(); + + //copy ctor + Variable(const Variable& src); + + //operator = + Variable& operator=(const Variable& src); + + //clear the class content + void Reset(); + + //print the variable to stdout + void Print(); +}; + +typedef std::list VariableList; +#endif //VARIABLE_H diff --git a/CodeLite/variable_entry.cpp b/CodeLite/variable_entry.cpp new file mode 100644 index 0000000000..7669c4a89b --- /dev/null +++ b/CodeLite/variable_entry.cpp @@ -0,0 +1,116 @@ +#include "variable_entry.h" +#include "wx/log.h" + +VariableEntry::VariableEntry(const wxString &name, const wxString &path) +: m_name(name) +, m_value(path) +{ +} + +VariableEntry::VariableEntry(wxSQLite3ResultSet &rs) +{ + m_name = rs.GetString(0); + m_value = rs.GetString(1); +} + +VariableEntry::VariableEntry(const VariableEntry &rhs) +{ + *this = rhs; +} + +VariableEntry::VariableEntry() +{ +} + +VariableEntry::~VariableEntry() +{ +} + +VariableEntry& VariableEntry::operator =(const VariableEntry& rhs) +{ + if(this == &rhs) + return *this; + + m_name = rhs.m_name; + m_value = rhs.m_value; + return *this; +} + +bool VariableEntry::operator ==(const VariableEntry& rhs) +{ + return m_name == rhs.m_name && m_value == rhs.m_value; +} + + +//--------------------------------------------------------- +// Database opertions +//--------------------------------------------------------- + +int VariableEntry::Store(wxSQLite3Statement& insertPreparedStmnt) +{ + try + { + // see TagsDatabase::GetInsertOneStatement() for the order of binding + insertPreparedStmnt.Bind(1, GetName()); + insertPreparedStmnt.Bind(2, GetValue()); + insertPreparedStmnt.ExecuteUpdate(); + insertPreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + if(exc.ErrorCodeAsString(exc.GetErrorCode()) == wxT("SQLITE_CONSTRAINT")) + return TagExist; + wxUnusedVar(exc); + return TagError; + } + return TagOk; +} + +int VariableEntry::Update(wxSQLite3Statement& updatePreparedStmnt) +{ + try + { + updatePreparedStmnt.Bind(1, GetValue()); + updatePreparedStmnt.Bind(2, GetName()); + updatePreparedStmnt.ExecuteUpdate(); + updatePreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + wxUnusedVar(exc); + return TagError; + } + return TagOk; +} + +int VariableEntry::Delete(wxSQLite3Statement& deletePreparedStmnt) +{ + try + { + deletePreparedStmnt.Bind(1, GetName()); + deletePreparedStmnt.ExecuteUpdate(); + deletePreparedStmnt.Reset(); + } + catch(wxSQLite3Exception& exc) + { + wxUnusedVar(exc); + return TagError; + } + return TagOk; +} + +wxString VariableEntry::GetDeleteOneStatement() +{ + return wxT("DELETE FROM VARIABLES WHERE NAME=?"); +} + +wxString VariableEntry::GetUpdateOneStatement() +{ + return wxT("UPDATE VARIABLES SET VALUE=? WHERE NAME=?"); +} + +wxString VariableEntry::GetInsertOneStatement() +{ + return wxT("INSERT INTO VARIABLES VALUES (?, ?)"); +} + diff --git a/CodeLite/variable_entry.h b/CodeLite/variable_entry.h new file mode 100644 index 0000000000..9592ab33f1 --- /dev/null +++ b/CodeLite/variable_entry.h @@ -0,0 +1,109 @@ +#ifndef VARIABLE_ENTRY_H +#define VARIABLE_ENTRY_H + +#include "wx/string.h" +#include "db_record.h" +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else +# define WXDLLIMPEXP_CL +#endif + +class WXDLLIMPEXP_CL VariableEntry : public DbRecord +{ + wxString m_name; + wxString m_value; +public: + /** + * Default constructor. + */ + VariableEntry(); + + /** + * Default constructor. + */ + VariableEntry(const wxString &name, const wxString &path); + + /** + * Copy constructor. + */ + VariableEntry(const VariableEntry& rhs); + + /** + * Construct a tag entry from db record. + * \param rs Result set + */ + VariableEntry(wxSQLite3ResultSet& rs); + + /** + * \param rhs Source to copy from (right hand side) + * \return this + */ + VariableEntry& operator=(const VariableEntry& rhs); + + /** + * Compare two VariableEntry objects. + * \param rhs Right hand side + * \return true if identical, false otherwise + */ + bool operator==(const VariableEntry& rhs); + + /** + * Destructor + */ + virtual ~VariableEntry(); + + + const wxString& GetName() const { return m_name;} + void SetName(const wxString& name) { m_name = name; } + + const wxString &GetValue() const{return m_value;} + void SetValue(const wxString &value){m_value = value;} + + //------------------------------------------ + // Database operations + //------------------------------------------ + /** + * Save this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagExist, TagError + */ + virtual int Store(wxSQLite3Statement& insertPreparedStmnt); + + /** + * Update this record into db. + * \param insertPreparedStmnt Prepared statement for insert operation + * \return TagOk, TagError + */ + virtual int Update(wxSQLite3Statement& updatePreparedStmnt); + + /** + * Delete this record from db. + * \param deletePreparedStmnt Prepared statement for delete operation + * \return TagOk, TagError + */ + virtual int Delete(wxSQLite3Statement& deletePreparedStmnt); + + /** + * \return delete preapred statement + */ + virtual wxString GetDeleteOneStatement(); + + /** + * \return update preapred statement + */ + virtual wxString GetUpdateOneStatement(); + + /** + * \return insert preapred statement + */ + virtual wxString GetInsertOneStatement(); +}; +typedef SmartPtr VariableEntryPtr; +#endif // VARIABLE_ENTRY_H + + diff --git a/CodeLite/worker_thread.cpp b/CodeLite/worker_thread.cpp new file mode 100644 index 0000000000..8e1e0eef55 --- /dev/null +++ b/CodeLite/worker_thread.cpp @@ -0,0 +1,82 @@ +#include "worker_thread.h" + +WorkerThread::WorkerThread() +: wxThread(wxTHREAD_JOINABLE) +, m_notifiedWindow( NULL ) +{ +} + +WorkerThread::~WorkerThread() +{ + if( !m_queue.empty() ){ + std::deque::iterator iter = m_queue.begin(); + for(; iter != m_queue.end(); iter++){ + delete (*iter); + } + m_queue.clear(); + } +} + +void* WorkerThread::Entry() +{ + while( true ) + { + // Did we get a request to terminate? + if(TestDestroy()) + break; + + ThreadRequest *request = GetRequest(); + if( request ) + { + // Call user's implementation for processing request + ProcessRequest( request ); + + wxThread::Sleep(10); // Allow other threads to work as well + delete request; + request = NULL; + continue; // to avoid the sleep + } + + // Sleep for 1 seconds, and then try again + wxThread::Sleep(200); + } + return NULL; +} + +void WorkerThread::Add(ThreadRequest *request) +{ + wxCriticalSectionLocker locker(m_cs); + m_queue.push_front(request); +} + +ThreadRequest *WorkerThread::GetRequest() +{ + wxCriticalSectionLocker locker(m_cs); + ThreadRequest *req = NULL; + if( !m_queue.empty() ){ + req = m_queue.front(); + m_queue.pop_front(); + } + return req; +} + +void WorkerThread::Stop() +{ + // Notify the thread to stop + // and wait for its termination + if( IsAlive() ) + Delete(); + + while( IsAlive() ) + { + wxThread::Sleep( 5 ); + } +} + +void WorkerThread::Start(int priority) +{ + Create(); + SetPriority(priority); + Run(); +} + diff --git a/CodeLite/worker_thread.h b/CodeLite/worker_thread.h new file mode 100644 index 0000000000..5bf725b34e --- /dev/null +++ b/CodeLite/worker_thread.h @@ -0,0 +1,103 @@ +#ifndef WORKER_THREAD_H +#define WORKER_THREAD_H + +#include +#include "wx/thread.h" +#include "wx/event.h" + + +#ifdef WXMAKINGDLL_CODELITE +# define WXDLLIMPEXP_CL WXEXPORT +#elif defined(WXUSINGDLL_CODELITE) +# define WXDLLIMPEXP_CL WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_CL +#endif // WXMAKINGDLL_CODELITE + + +/** + * Base class for thread requests, + */ +class WXDLLIMPEXP_CL ThreadRequest{ +public: + ThreadRequest(){}; + virtual ~ThreadRequest(){}; +}; + +/** + * Worker Thread class + * usually user should define the ProcessRequest method + */ +class WXDLLIMPEXP_CL WorkerThread : public wxThread +{ +protected: + wxCriticalSection m_cs; + wxEvtHandler *m_notifiedWindow; + std::deque m_queue; + +public: + /** + * Default constructor. + */ + WorkerThread(); + + /** + * Destructor. + */ + virtual ~WorkerThread(); + + /** + * Thread execution point. + */ + virtual void *Entry(); + + /** + * Called when the thread exits + * whether it terminates normally or is stopped with Delete() (but not when it is Kill()'ed!) + */ + virtual void OnExit(){}; + + /** + * Add a request to the worker thread + * \param request request to execute. + */ + void Add(ThreadRequest *request); + + /** + * Set the window to be notified when a change was done + * between current source file tree and the actual tree. + * \param evtHandler + */ + void SetNotifyWindow( wxEvtHandler* evtHandler ) { m_notifiedWindow = evtHandler; } + + /** + * Stops the thread + * This function returns only when the thread is terminated. + * \note This call must be called from the context of other thread (e.g. main thread) + */ + void Stop(); + + /** + * Start the thread as joinable thread. + * \note This call must be called from the context of other thread (e.g. main thread) + */ + void Start(int priority = WXTHREAD_DEFAULT_PRIORITY); + + /** + * Process request from the other thread + * \param request ThreadRequest object to process + */ + virtual void ProcessRequest(ThreadRequest *request) = 0; + +protected: + /** + * Get next request from queue. + * \param file [output] source file that was updated + * \param project [output] project name where file belongs to + * \param dbfile [output] dataabase file name + * \return true if there is a request to process + */ + ThreadRequest* GetRequest(); +}; + +#endif // WORKER_THREAD_H diff --git a/CodeLite/y.tab.h b/CodeLite/y.tab.h new file mode 100644 index 0000000000..0385b267b1 --- /dev/null +++ b/CodeLite/y.tab.h @@ -0,0 +1,90 @@ +/*#ifdef __cplusplus*/ +namespace flex +{ +/*#endif*/ + +#define AUTO 257 +#define lexDOUBLE 258 +#define lexINT 259 +#define lexSTRUCT 260 +#define BREAK 261 +#define ELSE 262 +#define lexLONG 263 +#define SWITCH 264 +#define CASE 265 +#define lexENUM 266 +#define REGISTER 267 +#define TYPEDEF 268 +#define lexCHAR 269 +#define EXTERN 270 +#define RETURN 271 +#define UNION 272 +#define lexCONST 273 +#define lexFLOAT 274 +#define lexSHORT 275 +#define UNSIGNED 276 +#define CONTINUE 277 +#define FOR 278 +#define SIGNED 279 +#define lexVOID 280 +#define lexDEFAULT 281 +#define GOTO 282 +#define SIZEOF 283 +#define VOLATILE 284 +#define DO 285 +#define IF 286 +#define STATIC 287 +#define WHILE 288 +#define NEW 289 +#define lexDELETE 290 +#define lexTHIS 291 +#define lexOPERATOR 292 +#define lexCLASS 293 +#define lexNAMESPACE 294 +#define lexPUBLIC 295 +#define lexPROTECTED 296 +#define lexPRIVATE 297 +#define VIRTUAL 298 +#define FRIEND 299 +#define INLINE 300 +#define OVERLOAD 301 +#define IDENTIFIER 302 +#define STRINGliteral 303 +#define FLOATINGconstant 304 +#define INTEGERconstant 305 +#define CHARACTERconstant 306 +#define OCTALconstant 307 +#define HEXconstant 308 +#define TYPEDEFname 309 +#define lexARROW 310 +#define ICR 311 +#define DECR 312 +#define LS 313 +#define RS 314 +#define LE 315 +#define GE 316 +#define EQ 317 +#define NE 318 +#define ANDAND 319 +#define OROR 320 +#define ELLIPSIS 321 +#define CLCL 322 +#define DOTstar 323 +#define ARROWstar 324 +#define MULTassign 325 +#define DIVassign 326 +#define MODassign 327 +#define PLUSassign 328 +#define MINUSassign 329 +#define LSassign 330 +#define RSassign 331 +#define ANDassign 332 +#define ERassign 333 +#define ORassign 334 +#define CComment 335 +#define CPPComment 336 +#define POUNDPOUND 337 + +//#ifdef __cplusplus +} // namespace flex +//#endif diff --git a/CxxParser/CxxParser.workspace b/CxxParser/CxxParser.workspace new file mode 100644 index 0000000000..b72c6abeb6 --- /dev/null +++ b/CxxParser/CxxParser.workspace @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/CxxParser/Debug/test.h b/CxxParser/Debug/test.h new file mode 100644 index 0000000000..46f28cbeae --- /dev/null +++ b/CxxParser/Debug/test.h @@ -0,0 +1,6 @@ +template struct TagEntry +{ + class TagEntry::SimpleClass { + } + virtual foo(); +} diff --git a/CxxParser/Parser.project b/CxxParser/Parser.project new file mode 100644 index 0000000000..139706f7fb --- /dev/null +++ b/CxxParser/Parser.project @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + copy *.h ..\CodeLite\. + copy *.cpp ..\CodeLite\. + + + + + + + + scope_parser.cpp cpp_lexer.cpp var_parser.cpp cpp_expr_lexer.cpp cpp_expr_parser.cpp cpp_func_parser.cpp +scope_parser.cpp: cpp_scope_grammar.y + yacc -dl -t -v -pcl_scope_ cpp_scope_grammar.y + mv y.tab.c scope_parser.cpp + mv y.tab.h cpp_lexer.h + +cpp_lexer.cpp: cpp.l + flex -L -Pcl_scope_ cpp.l + mv lex.cl_scope_.c cpp_lexer.cpp + +var_parser.cpp: cpp_variables_grammar.y + yacc -l -t -v -pcl_var_ cpp_variables_grammar.y + mv y.tab.c var_parser.cpp + +cpp_expr_lexer.cpp: expr_lexer.l + flex -L -Pcl_expr_ expr_lexer.l + mv lex.cl_expr_.c cpp_expr_lexer.cpp + +cpp_expr_parser.cpp: expr_grammar.y + yacc -l -t -v -pcl_expr_ expr_grammar.y + mv y.tab.c cpp_expr_parser.cpp + +cpp_func_parser.cpp: cpp_func_parser.y + yacc -l -t -v -pcl_func_ cpp_func_parser.y + mv y.tab.c cpp_func_parser.cpp + + + + + + diff --git a/CxxParser/Release/test.h b/CxxParser/Release/test.h new file mode 100644 index 0000000000..5602d065de --- /dev/null +++ b/CxxParser/Release/test.h @@ -0,0 +1,13 @@ +//------------------------------ +// Expression test suite +//------------------------------ + +//Singleton +//*this +//this +//Singleton +//dynamic_cast +//(Std::String*) eran +//((Std::string*)eran) +//((Singleton*)Eran) +//Eran(dfd, dfdf, dfdf) diff --git a/CxxParser/TODO.TXT b/CxxParser/TODO.TXT new file mode 100644 index 0000000000..a4b9f49708 --- /dev/null +++ b/CxxParser/TODO.TXT @@ -0,0 +1,9 @@ +1. Scope parser not detecting destructor & constructor properly +2. template intializing another template not supported. Possible workaround: + +//will not work +std::list > var; + +//will work +typedef std::pair StrStrPair; +std::list var; diff --git a/CxxParser/cpp.l b/CxxParser/cpp.l new file mode 100644 index 0000000000..5420ac750e --- /dev/null +++ b/CxxParser/cpp.l @@ -0,0 +1,406 @@ +%{ +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_scope_lval; +extern std::string cl_var_lval; +extern std::string cl_func_lval; + +std::vector currentScope; + +bool setLexerInput(const std::string &in, const std::map &ignoreTokens); + +std::string getCurrentScope(); +void printScopeName(); +void cl_scope_lex_clean(); +void cl_scope_less(int count); + +//we keep a very primitive map with only symbol name +//that we encountered so far +std::map g_symbols; +std::map g_macros; + +static std::map g_ignoreList; + +bool isaTYPE(char *string); +bool isaMACRO(char *string); +bool isignoredToken(char *string); + +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(isaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(isaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else if(isignoredToken(yytext)){\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_scope_lval = yytext;\ + cl_var_lval = yytext;\ + cl_func_lval = yytext;\ + return(x);} + +%} + +%option yylineno + +identifier [a-zA-Z_][0-9a-zA-Z_]* + +exponent_part [eE][-+]?[0-9]+ +fractional_constant ([0-9]*"."[0-9]+)|([0-9]+".") +floating_constant (({fractional_constant}{exponent_part}?)|([0-9]+{exponent_part}))[FfLl]? + +integer_suffix_opt ([uU]?[lL]?)|([lL][uU]) +decimal_constant [1-9][0-9]*{integer_suffix_opt} +octal_constant "0"[0-7]*{integer_suffix_opt} +hex_constant "0"[xX][0-9a-fA-F]+{integer_suffix_opt} + +simple_escape [abfnrtv'"?\\] +octal_escape [0-7]{1,3} +hex_escape "x"[0-9a-fA-F]+ + +escape_sequence [\\]({simple_escape}|{octal_escape}|{hex_escape}) +c_char [^'\\\n]|{escape_sequence} +s_char [^"\\\n]|{escape_sequence} + +h_tab [\011] +form_feed [\014] +v_tab [\013] +c_return [\015] + +horizontal_white [ ]|{h_tab} + +%x PREPR +%x WRAP_PREP +%x CPP_COMMENT +%x C_COMMENT + +%% + +"/*" { + BEGIN C_COMMENT; + } + +"//" { + BEGIN CPP_COMMENT; + } + +{horizontal_white}+ { + WHITE_RETURN(' '); + } + +({v_tab}|{c_return}|{form_feed})+ { + WHITE_RETURN(' '); + } + + +({horizontal_white}|{v_tab}|{c_return}|{form_feed})*"\n" { + WHITE_RETURN('\n'); + } + +auto {PA_KEYWORD_RETURN(LE_AUTO);} +break {PA_KEYWORD_RETURN(LE_BREAK);} +case {PA_KEYWORD_RETURN(LE_CASE);} +char {PA_KEYWORD_RETURN(LE_CHAR);} +const {PA_KEYWORD_RETURN(LE_CONST);} +continue {PA_KEYWORD_RETURN(LE_CONTINUE);} +default {PA_KEYWORD_RETURN(LE_DEFAULT);} +define {PP_KEYWORD_RETURN(LE_DEFINE);} +defined {PP_KEYWORD_RETURN(LE_OPDEFINED);} +do {PA_KEYWORD_RETURN(LE_DO);} +double {PA_KEYWORD_RETURN(LE_DOUBLE);} +elif {PP_KEYWORD_RETURN(LE_ELIF);} +else {PPPA_KEYWORD_RETURN(LE_ELSE);} +endif {PP_KEYWORD_RETURN(LE_ENDIF);} +enum {PA_KEYWORD_RETURN(LE_ENUM);} +error {PP_KEYWORD_RETURN(LE_ERROR);} +extern {PA_KEYWORD_RETURN(LE_EXTERN);} +float {PA_KEYWORD_RETURN(LE_FLOAT);} +for {PA_KEYWORD_RETURN(LE_FOR);} +goto {PA_KEYWORD_RETURN(LE_GOTO);} +if {PPPA_KEYWORD_RETURN(LE_IF);} +ifdef {PP_KEYWORD_RETURN(LE_IFDEF);} +ifndef {PP_KEYWORD_RETURN(LE_IFNDEF);} +include {PP_KEYWORD_RETURN(LE_INCLUDE); } +int {PA_KEYWORD_RETURN(LE_INT);} +line {PP_KEYWORD_RETURN(LE_LINE);} +long {PA_KEYWORD_RETURN(LE_LONG);} +pragma {PP_KEYWORD_RETURN(LE_PRAGMA);} +register {PA_KEYWORD_RETURN(LE_REGISTER);} +return {PA_KEYWORD_RETURN(LE_RETURN);} +short {PA_KEYWORD_RETURN(LE_SHORT);} +signed {PA_KEYWORD_RETURN(LE_SIGNED);} +sizeof {PA_KEYWORD_RETURN(LE_SIZEOF);} +static {PA_KEYWORD_RETURN(LE_STATIC);} +struct {PA_KEYWORD_RETURN(LE_STRUCT);} +switch {PA_KEYWORD_RETURN(LE_SWITCH);} +typedef {PA_KEYWORD_RETURN(LE_TYPEDEF);} +undef {PP_KEYWORD_RETURN(LE_UNDEF);} +union {PA_KEYWORD_RETURN(LE_UNION);} +unsigned {PA_KEYWORD_RETURN(LE_UNSIGNED);} +void {PA_KEYWORD_RETURN(LE_VOID);} +volatile {PA_KEYWORD_RETURN(LE_VOLATILE);} +while {PA_KEYWORD_RETURN(LE_WHILE);} + + +class {CPP_KEYWORD_RETURN(LE_CLASS);} +namespace {CPP_KEYWORD_RETURN(LE_NAMESPACE);} +delete {CPP_KEYWORD_RETURN(LE_DELETE);} +friend {CPP_KEYWORD_RETURN(LE_FRIEND);} +inline {CPP_KEYWORD_RETURN(LE_INLINE);} +new {CPP_KEYWORD_RETURN(LE_NEW);} +operator {CPP_KEYWORD_RETURN(LE_OPERATOR);} +overload {CPP_KEYWORD_RETURN(LE_OVERLOAD);} +protected {CPP_KEYWORD_RETURN(LE_PROTECTED);} +private {CPP_KEYWORD_RETURN(LE_PRIVATE);} +public {CPP_KEYWORD_RETURN(LE_PUBLIC);} +this {CPP_KEYWORD_RETURN(LE_THIS);} +virtual {CPP_KEYWORD_RETURN(LE_VIRTUAL);} +template {CPP_KEYWORD_RETURN(LE_TEMPLATE);} +typename {CPP_KEYWORD_RETURN(LE_TYPENAME);} +dynamic_cast {CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} +static_cast {CPP_KEYWORD_RETURN(LE_STATIC_CAST);} +const_cast {CPP_KEYWORD_RETURN(LE_CONST_CAST);} +reinterpret_cast {CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} +using {CPP_KEYWORD_RETURN(LE_USING);} +{identifier} {IDENTIFIER_RETURN();} + +{decimal_constant} {NUMERICAL_RETURN(LE_INTEGERconstant);} +{octal_constant} {NUMERICAL_RETURN(LE_OCTALconstant);} +{hex_constant} {NUMERICAL_RETURN(LE_HEXconstant);} +{floating_constant} {NUMERICAL_RETURN(LE_FLOATINGconstant);} + + +"L"?[']{c_char}+['] { + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + + +"L"?["]{s_char}*["] { + LITERAL_RETURN(LE_STRINGliteral);} + + + + +"(" {PPOP_RETURN(LE_LP);} +")" {PPOP_RETURN(LE_RP);} +"," {PPOP_RETURN(LE_COMMA);} +^({horizontal_white})*"#" {BEGIN PREPR;} +"{" {ASCIIOP_RETURN(LE_LC);} +"}" {ASCIIOP_RETURN(LE_RC);} +"[" {ASCIIOP_RETURN(LE_LB);} +"]" {ASCIIOP_RETURN(LE_RB);} +"." {ASCIIOP_RETURN(LE_DOT);} +"&" {ASCIIOP_RETURN(LE_AND);} +"*" {ASCIIOP_RETURN(LE_STAR);} +"+" {ASCIIOP_RETURN(LE_PLUS);} +"-" {ASCIIOP_RETURN(LE_MINUS);} +"~" {ASCIIOP_RETURN(LE_NEGATE);} +"!" {ASCIIOP_RETURN(LE_NOT);} +"/" {ASCIIOP_RETURN(LE_DIV);} +"%" {ASCIIOP_RETURN(LE_MOD);} +"<" {ASCIIOP_RETURN(LE_LT);} +">" {ASCIIOP_RETURN(LE_GT);} +"^" {ASCIIOP_RETURN(LE_XOR);} +"|" {ASCIIOP_RETURN(LE_PIPE);} +"?" {ASCIIOP_RETURN(LE_QUESTION);} +":" {ASCIIOP_RETURN(LE_COLON);} +";" {ASCIIOP_RETURN(LE_SEMICOLON);} +"=" {ASCIIOP_RETURN(LE_ASSIGN);} + +".*" {NAMEDOP_RETURN(LE_DOTstar);} +"::" {NAMEDOP_RETURN(LE_CLCL);} +"->" {NAMEDOP_RETURN(LE_ARROW);} +"->*" {NAMEDOP_RETURN(LE_ARROWstar);} +"++" {NAMEDOP_RETURN(LE_ICR);} +"--" {NAMEDOP_RETURN(LE_DECR);} +"<<" {NAMEDOP_RETURN(LE_LS);} +">>" {NAMEDOP_RETURN(LE_RS);} +"<=" {NAMEDOP_RETURN(LE_LE);} +">=" {NAMEDOP_RETURN(LE_GE);} +"==" {NAMEDOP_RETURN(LE_EQ);} +"!=" {NAMEDOP_RETURN(LE_NE);} +"&&" {NAMEDOP_RETURN(LE_ANDAND);} +"||" {NAMEDOP_RETURN(LE_OROR);} +"*=" {NAMEDOP_RETURN(LE_MULTassign);} +"/=" {NAMEDOP_RETURN(LE_DIVassign);} +"%=" {NAMEDOP_RETURN(LE_MODassign);} +"+=" {NAMEDOP_RETURN(LE_PLUSassign);} +"-=" {NAMEDOP_RETURN(LE_MINUSassign);} +"<<=" {NAMEDOP_RETURN(LE_LSassign);} +">>=" {NAMEDOP_RETURN(LE_RSassign);} +"&=" {NAMEDOP_RETURN(LE_ANDassign);} +"^=" {NAMEDOP_RETURN(LE_ERassign);} +"|=" {NAMEDOP_RETURN(LE_ORassign);} +"..." {NAMEDOP_RETURN(LE_ELLIPSIS);} +<> { + //reset lexer + yyterminate(); + } +. {return yytext[0];} +\n { + defineFound = false; + cl_scope_lineno++; + BEGIN INITIAL; + } +\\ { + BEGIN WRAP_PREP; + } +define { + defineFound = true; + } +\n { + cl_scope_lineno++; + BEGIN PREPR; + } +{identifier} { + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } +{identifier} { + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } +. {} +. {} +\n {BEGIN INITIAL;} +. {} +"*/" {BEGIN INITIAL;} +. {} +%% + +bool isaTYPE(char *string) +{ + return g_symbols.find(string) != g_symbols.end(); +} + +bool isignoredToken(char *string) +{ + return g_ignoreList.find(string) != g_ignoreList.end(); +} + +bool isaMACRO(char *string) +{ + return g_macros.find(string) != g_macros.end(); +} + +void cl_scope_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_scope_lineno = 1; + currentScope.clear(); + g_symbols.clear(); + g_macros.clear(); +} + +/** + * scope util functions + */ +void printScopeName() +{ + /* + if(currentScope.empty()) + { + printf("%d: current scope is global scope\n", cl_scope_lineno ); + } + else + { + printf("%d: current scope is %s\n", cl_scope_lineno, getCurrentScope().c_str()); + } + */ +} + +void increaseScope() +{ + static int value = 0; + std::string scopeName("__anon_"); + + char buf[100]; + sprintf(buf, "%d", value++); + scopeName += buf; + currentScope.push_back(scopeName); +} + +std::string getCurrentScope() +{ + //format scope name + std::string scope; + if(currentScope.empty()){ + return ""; + } + + std::vector tmpscope(currentScope); + + while( tmpscope.empty() == false ){ + std::string _scope = tmpscope.front(); + tmpscope.erase(tmpscope.begin()); + + if(_scope.find("__anon_") == (size_t)-1 && _scope.empty() == false){ + scope += _scope; + scope += "::"; + } + } + + //remove the trailing '::' + scope.erase(scope.find_last_not_of(":")+1); + return scope; +} + +/*******************************************************************/ +bool setLexerInput(const std::string &in, const std::map &ignoreTokens) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + g_ignoreList = ignoreTokens; + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} + +void cl_scope_less(int count){ + yyless(count); +} diff --git a/CxxParser/cpp5_grammar.y.full b/CxxParser/cpp5_grammar.y.full new file mode 100644 index 0000000000..a0ce433dd6 --- /dev/null +++ b/CxxParser/cpp5_grammar.y.full @@ -0,0 +1,2321 @@ +%{ + + /* Copyright (C) 1989-1991 James A. Roskind, All rights reserved. + This grammar was developed and written by James A. Roskind. + Copying of this grammar description, as a whole, is permitted + providing this notice is intact and applicable in all complete + copies. Translations as a whole to other parser generator input + languages (or grammar description languages) is permitted + provided that this notice is intact and applicable in all such + copies, along with a disclaimer that the contents are a + translation. The reproduction of derived text, such as modified + versions of this grammar, or the output of parser generators, is + permitted, provided the resulting work includes the copyright + notice "Portions Copyright (c) 1989, 1990 James A. Roskind". + Derived products, such as compilers, translators, browsers, etc., + that use this grammar, must also provide the notice "Portions + Copyright (c) 1989, 1990 James A. Roskind" in a manner + appropriate to the utility, and in keeping with copyright law + (e.g.: EITHER displayed when first invoked/executed; OR displayed + continuously on display terminal; OR via placement in the object + code in form readable in a printout, with or near the title of + the work, or at the end of the file). No royalties, licenses or + commissions of any kind are required to copy this grammar, its + translations, or derivative products, when the copies are made in + compliance with this notice. Persons or corporations that do make + copies in compliance with this notice may charge whatever price + is agreeable to a buyer, for such copies or derivative works. + LE_THIS GRAMMAR IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS LE_FOR A PARTICULAR + PURPOSE. + + James A. Roskind + Independent Consultant + 516 Latania Palm Drive + Indialantic FL, 32903 + (407)729-4348 + jar@hq.ileaf.com + + + ---end of copyright notice--- + +MOTIVATION- + +My goal is to see software developers adopt this grammar as a +standard until such time as a better standard is accessible. The +only way to get it to become a standard, is to be sure that people +know that derivations are based on a specific work. The intent of +releasing this grammar is to provide a publicly accessible standard +grammar for C++. The intent of the copyright notice is to allow +arbitrary commercial and non-commercial use of the grammar, as long +as reference is given to the original standard. Without reference to +a specific standard, many alternative grammars would develop. By +referring to the standard, this grammar is given publicity, which +should lead to further use in compatible products and systems. The +benefits of such a standard to commercial products (browsers, +beautifiers, translators, compilers, ...) should be obvious to the +developers, in that other compatible products will emerge, and the +value of all conforming products will rise. Most developers are +aware of the value of acquiring a fairly complete grammar for a +language, and the copyright notice (and the resulting affiliation +with my work) should not be too high a price to pay. By copyrighting +this grammar, I have some minor control over what this standard is, +and I can (hopefully) keep it from degrading without my approval. I +will consistently attempt to provide upgraded grammars that are +compliant with the current art, and the ANSI C++ Committee +recommendation in particular. A developer is never prevented from +modifying the grammar to improve it in whatever way is seen fit. +There is also no restriction on the sale of copies, or derivative +works, providing the requests in the copyright notice are satisfied. + +If you are not "copying" my work, but are rather only abstracting +some of the standard, an acknowledgment with references to such a +standard would be appreciated. Specifically, agreements with this +standard as to the resolution of otherwise ambiguous constructs, +should be noted. + +Simply put: "make whatever use you would like of the grammar, but +include the ``portions Copyright ...'' as a reference to this +standard." + + +*/ + + +/* Last modified 7/4/91, Version 2.0 */ + +/* File CPP5.Y is translated by YACC to Y.TAB.C */ + +/* ACKNOWLEDGMENT: Without Bjarne Stroustrup and his many co-workers +at Bell Labs, there would be no C++ Language for which to provide a +syntax description. Bjarne has also been especially helpful and open +in discussions, and by permitting me to review his texts prior to +their publication, allowed me a wonderful vantage point of clarity. + +Without the effort expended by the ANSI C standardizing committee, I +would have been lost. Although the ANSI C standard does not include +a fully disambiguated syntax description, the committee has at least +provided most of the disambiguating rules in narratives. This C++ +grammar is intended to be a superset of an ANSI C compatible grammar +that is provided in an related file. + +Several reviewers have also recently critiqued this grammar, the +related C grammar, and or assisted in discussions during it's +preparation. These reviewers are certainly not responsible for the +errors I have committed here, but they are responsible for allowing +me to provide fewer errors. These colleagues include: Bruce +Blodgett, Mark Langley, Joe Fialli, Greg Perkins, Ron Guilmette, and +Eric Krohn. */ + +/* Required fixes from last release : + +done: 0) Allow direct call to destructors + +done: 1) Allow placement of declarations in labeled statements. The +easiest fix involves using a larger variance from the C grammar, and +simply making "statement" include declarations. Note that it should +also be legal for declarations to be in the branches of if +statements, as long as there is no other code in the block (I think). +Consider: + + ... + { + if (0 == a) + int b=5; + else + int c=4; + } + +1) template support: Not done: pending syntax specification from +ANSI. (This looks like a major effort, as ANSI has decided to extend +the "LE_TYPEDEFname"-feedback-to-the-lexer-hack to support template +names as a new kind of terminal token.) + +2) exception handling: Not done: pending syntax specification from +ANSI (but it doesn't look hard) + +done: 3) Support nested types, including identifier::name, where we +realize that identifier was a hidden type. Force the lexer to keep +pace in this situation. This will require an extension of the +yacc-lex feedback loop. + +done: 4) Support nested types even when derivations are used in class +definitions. + +5) Provide advanced tutorial on YACC conflicts: almost done in +documentation about machine generated documentation. + +done: 6) Allow declaration specifiers to be left out of declarations +at file and structure scope so that operator conversion functions can +be declared and/or defined. Note that checking to see that it was a +function type that does not require declaration_specifiers is now a +constraint check, and not a syntax issue. Within function body +scopes, declaration specifiers are required, and this is critical to +distinguishing expressions. + + +*/ + +%} + +/* + +Interesting ambiguity: +Usually + typename ( typename2 ) ... +or + typename ( typename2 [4] ) ... +etc. +is a redeclaration of typename2. + +Inside a structure elaboration, it is sometimes the declaration of a +constructor! Note, this only counts if typename IS the current +containing class name. (Note this can't conflict with ANSI C because +ANSI C would call it a redefinition, but claim it is semantically +illegal because you can't have a member declared the same type as the +containing struct!) Since the ambiguity is only reached when a ';' is +found, there is no problem with the fact that the semantic +interpretation is providing the true resolution. As currently +implemented, the constructor semantic actions must be able to process +an ordinary declaration. I may reverse this in the future, to ease +semantic implementation. + +*/ + + + +/* + +INTRO TO ANSI C GRAMMAR (provided in a separate file): + +The refined grammar resolves several typedef ambiguities in the draft +proposed ANSI C standard syntax down to 1 shift/reduce conflict, as +reported by a YACC process. Note that the one shift reduce conflicts +is the traditional if-if-else conflict that is not resolved by the +grammar. This ambiguity can be removed using the method described in +the Dragon Book (2nd edition), but this does not appear worth the +effort. + +There was quite a bit of effort made to reduce the conflicts to this +level, and an additional effort was made to make the grammar quite +similar to the C++ grammar being developed in parallel. Note that +this grammar resolves the following ANSI C ambiguities: + +ANSI C section 3.5.6, "If the [typedef name] is redeclared at an +inner scope, the type specifiers shall not be omitted in the inner +declaration". Supplying type specifiers prevents consideration of T +as a typedef name in this grammar. Failure to supply type specifiers +forced the use of the LE_TYPEDEFname as a type specifier. This is taken +to an (unnecessary) extreme by this implementation. The ambiguity is +only a problem with the first declarator in a declaration, but we +restrict ALL declarators whenever the users fails to use a +type_specifier. + +ANSI C section 3.5.4.3, "In a parameter declaration, a single typedef +name in parentheses is taken to be an abstract declarator that +specifies a function with a single parameter, not as redundant +parentheses around the identifier". This is extended to cover the +following cases: + +typedef float T; +int noo(const (T[5])); +int moo(const (T(int))); +... + +Where again the '(' immediately to the left of 'T' is interpreted as +being the start of a parameter type list, and not as a redundant +paren around a redeclaration of T. Hence an equivalent code fragment +is: + +typedef float T; +int noo(const int identifier1 (T identifier2 [5])); +int moo(const int identifier1 (T identifier2 (int identifier3))); +... + +*/ + + +%{ +/*************** Includes and Defines *****************************/ +#define YYDEBUG_LEXER_TEXT (yylval) /* our lexer loads this up each time. + We are telling the graphical debugger + where to find the spelling of the + tokens.*/ +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ +#include "stdio.h" +int yyparse(); +void yyerror(char *string); +extern int yylex(); +extern char* yytext; +void setLexerInput(const char *line); + +/*************** Standard ytab.c continues here *********************/ +%} + +%union { + char value[128]; +} + +/*************************************************************************/ + + +/* This group is used by the C/C++ language parser */ +%token LE_AUTO LE_DOUBLE LE_INT LE_STRUCT +%token LE_BREAK LE_ELSE LE_LONG LE_SWITCH +%token LE_CASE LE_ENUM LE_REGISTER LE_TYPEDEF +%token LE_CHAR LE_EXTERN LE_RETURN LE_UNION +%token LE_CONST LE_FLOAT LE_SHORT LE_UNSIGNED +%token LE_CONTINUE LE_FOR LE_SIGNED LE_VOID +%token LE_DEFAULT LE_GOTO LE_SIZEOF LE_VOLATILE +%token LE_DO LE_IF LE_STATIC LE_WHILE + +/* The following are used in C++ only. ANSI C would call these IDENTIFIERs */ +%token LE_NEW LE_DELETE +%token LE_THIS +%token LE_OPERATOR +%token LE_CLASS +%token LE_PUBLIC LE_PROTECTED LE_PRIVATE +%token LE_VIRTUAL LE_FRIEND +%token LE_INLINE LE_OVERLOAD + +/* ANSI C Grammar suggestions */ +%token LE_IDENTIFIER LE_STRINGliteral +%token LE_FLOATINGconstant LE_INTEGERconstant LE_CHARACTERconstant +%token LE_OCTALconstant LE_HEXconstant +%token LE_POUNDPOUND LE_CComment LE_CPPComment LE_NAMESPACE + +/* New Lexical element, whereas ANSI C suggested non-terminal */ +%token LE_TYPEDEFname + +/* Multi-Character operators */ +%token LE_ARROW /* -> */ +%token LE_ICR LE_DECR /* ++ -- */ +%token LE_LS LE_RS /* << >> */ +%token LE_LE LE_GE LE_EQ LE_NE /* <= >= == != */ +%token LE_ANDAND LE_OROR /* && || */ +%token LE_ELLIPSIS /* ... */ + /* Following are used in C++, not ANSI C */ +%token LE_CLCL /* :: */ +%token LE_DOTstar LE_ARROWstar/* .* ->* */ + +/* modifying assignment operators */ +%token LE_MULTassign LE_DIVassign LE_MODassign /* *= /= %= */ +%token LE_PLUSassign LE_MINUSassign /* += -= */ +%token LE_LSassign LE_RSassign /* <<= >>= */ +%token LE_ANDassign LE_ERassign LE_ORassign /* &= ^= |= */ +%token LE_TEMPLATE +%token LE_TYPENAME + +/*************************************************************************/ + +%start translation_unit + +/*************************************************************************/ + +%% + +/*********************** CONSTANTS *********************************/ +constant: + LE_INTEGERconstant + | LE_FLOATINGconstant + /* We are not including ENUMERATIONconstant here because we + are treating it like a variable with a type of "enumeration + constant". */ + | LE_OCTALconstant + | LE_HEXconstant + | LE_CHARACTERconstant + ; + +string_literal_list: + LE_STRINGliteral + | string_literal_list LE_STRINGliteral + ; + + +/************************* EXPRESSIONS ********************************/ + + + /* Note that I provide a "scope_opt_identifier" that *cannot* + begin with ::. This guarantees we have a viable declarator, and + helps to disambiguate :: based uses in the grammar. For example: + + ... + { + int (* ::b()); // must be an expression + int (T::b); // officially a declaration, which fails on constraint grounds + + This *syntax* restriction reflects the current syntax in the ANSI + C++ Working Papers. This means that it is *incorrect* for + parsers to misparse the example: + + int (* ::b()); // must be an expression + + as a declaration, and then report a constraint error. + + In contrast, declarations such as: + + class T; + class A; + class B; + main(){ + T( F()); // constraint error: cannot declare local function + T (A::B::a); // constraint error: cannot declare member as a local value + + are *parsed* as declarations, and *then* given semantic error + reports. It is incorrect for a parser to "change its mind" based + on constraints. If your C++ compiler claims that the above 2 + lines are expressions, then *I* claim that they are wrong. */ + +paren_identifier_declarator: + scope_opt_identifier + | scope_opt_complex_name + | '(' paren_identifier_declarator ')' + ; + + + /* Note that LE_CLCL LE_IDENTIFIER is NOT part of scope_opt_identifier, + but it is part of global_opt_scope_opt_identifier. It is ONLY + valid for referring to an identifier, and NOT valid for declaring + (or importing an external declaration of) an identifier. This + disambiguates the following code, which would otherwise be + syntactically and semantically ambiguous: + + class base { + static int i; // element i; + float member_function(void); + }; + base i; // global i + float base::member_function(void) { + i; // refers to static int element "i" of base + ::i; // refers to global "i", with type "base" + { + base :: i; // import of global "i", like "base (::i);"? + // OR reference to global?? + } + } + */ + +primary_expression: + global_opt_scope_opt_identifier + | global_opt_scope_opt_complex_name + | LE_THIS /* C++, not ANSI C */ + | constant + | string_literal_list + | '(' comma_expression ')' + ; + + + /* I had to disallow struct, union, or enum elaborations during + operator_function_name. The ANSI C++ Working paper is vague + about whether this should be part of the syntax, or a constraint. + The ambiguities that resulted were more than LALR could handle, + so the easiest fix was to be more specific. This means that I + had to in-line expand type_specifier_or_name far enough that I + would be able to exclude elaborations. This need is what drove + me to distinguish a whole series of tokens based on whether they + include elaborations: + + struct A { ... } + + or simply a reference to an aggregate or enumeration: + + enum A + + The latter, as well an non-aggregate types are what make up + non_elaborating_type_specifier */ + + /* Note that the following does not include type_qualifier_list. + Hence, whenever non_elaborating_type_specifier is used, an + adjacent rule is supplied containing type_qualifier_list. It is + not generally possible to know immediately (i_e., reduce) a + type_qualifier_list, as a LE_TYPEDEFname that follows might not be + part of a type specifier, but might instead be "LE_TYPEDEFname ::*". + */ + +non_elaborating_type_specifier: + sue_type_specifier + | basic_type_specifier + | typedef_type_specifier + + | basic_type_name + | LE_TYPEDEFname + | global_or_scoped_typedefname + ; + + + /* The following introduces MANY conflicts. Requiring and + allowing '(' ')' around the `type' when the type is complex would + help a lot. */ + +operator_function_name: + LE_OPERATOR any_operator + | LE_OPERATOR type_qualifier_list operator_function_ptr_opt + | LE_OPERATOR non_elaborating_type_specifier operator_function_ptr_opt + ; + + + /* The following causes several ambiguities on * and &. These + conflicts would also be removed if parens around the `type' were + required in the derivations for operator_function_name */ + + /* Interesting aside: The use of right recursion in the + production for operator_function_ptr_opt gives both the correct + parsing, AND removes a conflict! Right recursion permits the + parser to defer reductions (a.k.a.: delay resolution), and + effectively make a second pass! */ + +operator_function_ptr_opt: + /* nothing */ + | unary_modifier operator_function_ptr_opt + | asterisk_or_ampersand operator_function_ptr_opt + ; + + + /* List of operators we can overload */ +any_operator: + '+' + | '-' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '<' + | '>' + | LE_LS + | LE_RS + | LE_ANDAND + | LE_OROR + | LE_ARROW + | LE_ARROWstar + | '.' + | LE_DOTstar + | LE_ICR + | LE_DECR + | LE_LE + | LE_GE + | LE_EQ + | LE_NE + | assignment_operator + | '(' ')' + | '[' ']' + | LE_NEW + | LE_DELETE + | ',' + ; + + + /* The following production for type_qualifier_list was specially + placed BEFORE the definition of postfix_expression to resolve a + reduce-reduce conflict set correctly. Note that a + type_qualifier_list is only used in a declaration, whereas a + postfix_expression is clearly an example of an expression. Hence + we are helping with the "if it can be a declaration, then it is" + rule. The reduce conflicts are on ')', ',' and '='. Do not move + the following productions */ + +type_qualifier_list_opt: + /* Nothing */ + | type_qualifier_list + ; + + + /* Note that the next set of productions in this grammar gives + post-increment a higher precedence that pre-increment. This is + not clearly stated in the C++ Reference manual, and is only + implied by the grammar in the ANSI C Standard. */ + + /* I *DON'T* use argument_expression_list_opt to simplify the + grammar shown below. I am deliberately deferring any decision + until *after* the closing paren, and using + "argument_expression_list_opt" would commit prematurely. This is + critical to proper conflict resolution. */ + + /* The {} in the following rules allow the parser to tell the + lexer to search for the member name in the appropriate scope, + much the way the LE_CLCL operator works.*/ + +postfix_expression: + primary_expression + | postfix_expression '[' comma_expression ']' + | postfix_expression '(' ')' + | postfix_expression '(' argument_expression_list ')' + | postfix_expression {} '.' member_name + | postfix_expression {} LE_ARROW member_name + | postfix_expression LE_ICR + | postfix_expression LE_DECR + + /* The next 4 rules are the source of cast ambiguity */ + | LE_TYPEDEFname '(' ')' + | global_or_scoped_typedefname '(' ')' + | LE_TYPEDEFname '(' argument_expression_list ')' + | global_or_scoped_typedefname '(' argument_expression_list ')' + | basic_type_name '(' assignment_expression ')' + /* If the following rule is added to the grammar, there + will be 3 additional reduce-reduce conflicts. They will + all be resolved in favor of NOT using the following rule, + so no harm will be done. However, since the rule is + semantically illegal we will omit it until we are + enhancing the grammar for error recovery */ +/* | basic_type_name '(' ')' /* Illegal: no such constructor*/ + ; + + + /* The last two productions in the next set are questionable, but + do not induce any conflicts. I need to ask X3J16 : Having them + means that we have complex member function deletes like: + + const unsigned int :: ~ const unsigned int + */ + +member_name: + scope_opt_identifier + | scope_opt_complex_name + | basic_type_name LE_CLCL '~' basic_type_name /* C++, not ANSI C */ + + | declaration_qualifier_list LE_CLCL '~' declaration_qualifier_list + | type_qualifier_list LE_CLCL '~' type_qualifier_list + ; + +argument_expression_list: + assignment_expression + | argument_expression_list ',' assignment_expression + ; + +unary_expression: + postfix_expression + | LE_ICR unary_expression + | LE_DECR unary_expression + | asterisk_or_ampersand cast_expression + | '-' cast_expression + | '+' cast_expression + | '~' cast_expression + | '!' cast_expression + | LE_SIZEOF unary_expression + | LE_SIZEOF '(' type_name ')' + | allocation_expression + ; + + + /* Note that I could have moved the newstore productions to a + lower precedence level than multiplication (binary '*'), and + lower than bitwise AND (binary '&'). These moves are the nice + way to disambiguate a trailing unary '*' or '&' at the end of a + freestore expression. Since the freestore expression (with such + a grammar and hence precedence given) can never be the left + operand of a binary '*' or '&', the ambiguity would be removed. + These problems really surface when the binary operators '*' or + '&' are overloaded, but this must be syntactically disambiguated + before the semantic checking is performed... Unfortunately, I am + not creating the language, only writing a grammar that reflects + its specification, and hence I cannot change its precedence + assignments. If I had my druthers, I would probably prefer + surrounding the type with parens all the time, and avoiding the + dangling * and & problem all together.*/ + + /* Following are C++, not ANSI C */ +allocation_expression: + global_opt_scope_opt_operator_new '(' type_name ')' + operator_new_initializer_opt + + | global_opt_scope_opt_operator_new '(' argument_expression_list ')' '(' type_name ')' + operator_new_initializer_opt + + /* next two rules are the source of * and & ambiguities */ + | global_opt_scope_opt_operator_new operator_new_type + | global_opt_scope_opt_operator_new '(' argument_expression_list ')' operator_new_type + ; + + + /* Following are C++, not ANSI C */ +global_opt_scope_opt_operator_new: + LE_NEW + | global_or_scope LE_NEW + ; + +operator_new_type: + type_qualifier_list operator_new_declarator_opt + operator_new_initializer_opt + + | non_elaborating_type_specifier operator_new_declarator_opt + operator_new_initializer_opt + ; + + + /* Right recursion is critical in the following productions to + avoid a conflict on LE_TYPEDEFname */ + +operator_new_declarator_opt: + /* Nothing */ + | operator_new_array_declarator + | asterisk_or_ampersand operator_new_declarator_opt + | unary_modifier operator_new_declarator_opt + ; + +operator_new_array_declarator: + '[' ']' + | '[' comma_expression ']' + | operator_new_array_declarator '[' comma_expression ']' + ; + +operator_new_initializer_opt: + /* Nothing */ + | '(' ')' + | '(' argument_expression_list ')' + ; + +cast_expression: + unary_expression + | '(' type_name ')' cast_expression + ; + + + /* Following are C++, not ANSI C */ +deallocation_expression: + cast_expression + | global_opt_scope_opt_delete deallocation_expression + | global_opt_scope_opt_delete '[' comma_expression ']' deallocation_expression /* archaic C++, what a concept */ + | global_opt_scope_opt_delete '[' ']' deallocation_expression + ; + + + /* Following are C++, not ANSI C */ +global_opt_scope_opt_delete: + LE_DELETE + | global_or_scope LE_DELETE + ; + + + /* Following are C++, not ANSI C */ +point_member_expression: + deallocation_expression + | point_member_expression LE_DOTstar deallocation_expression + | point_member_expression LE_ARROWstar deallocation_expression + ; + +multiplicative_expression: + point_member_expression + | multiplicative_expression '*' point_member_expression + | multiplicative_expression '/' point_member_expression + | multiplicative_expression '%' point_member_expression + ; + +additive_expression: + multiplicative_expression + | additive_expression '+' multiplicative_expression + | additive_expression '-' multiplicative_expression + ; + +shift_expression: + additive_expression + | shift_expression LE_LS additive_expression + | shift_expression LE_RS additive_expression + ; + +relational_expression: + shift_expression + | relational_expression '<' shift_expression + | relational_expression '>' shift_expression + | relational_expression LE_LE shift_expression + | relational_expression LE_GE shift_expression + ; + +equality_expression: + relational_expression + | equality_expression LE_EQ relational_expression + | equality_expression LE_NE relational_expression + ; + +AND_expression: + equality_expression + | AND_expression '&' equality_expression + ; + +exclusive_OR_expression: + AND_expression + | exclusive_OR_expression '^' AND_expression + ; + +inclusive_OR_expression: + exclusive_OR_expression + | inclusive_OR_expression '|' exclusive_OR_expression + ; + +logical_AND_expression: + inclusive_OR_expression + | logical_AND_expression LE_ANDAND inclusive_OR_expression + ; + +logical_OR_expression: + logical_AND_expression + | logical_OR_expression LE_OROR logical_AND_expression + ; + +conditional_expression: + logical_OR_expression + + | logical_OR_expression '?' comma_expression ':' + conditional_expression + ; + +assignment_expression: + conditional_expression + | unary_expression assignment_operator assignment_expression + ; + +assignment_operator: + '=' + | LE_MULTassign + | LE_DIVassign + | LE_MODassign + | LE_PLUSassign + | LE_MINUSassign + | LE_LSassign + | LE_RSassign + | LE_ANDassign + | LE_ERassign + | LE_ORassign + ; + +comma_expression: + assignment_expression + | comma_expression ',' assignment_expression + ; + +constant_expression: + conditional_expression + ; + + + /* The following was used for clarity */ +comma_expression_opt: + /* Nothing */ + | comma_expression + ; + + +/******************************* DECLARATIONS *********************************/ + + + /* The following are notably different from the ANSI C Standard + specified grammar, but are present in my ANSI C compatible + grammar. The changes were made to disambiguate typedefs presence + in declaration_specifiers (vs. in the declarator for + redefinition); to allow struct/union/enum/class tag declarations + without declarators, and to better reflect the parsing of + declarations (declarators must be combined with + declaration_specifiers ASAP, so that they can immediately become + visible in the current scope). */ + +declaration: + declaring_list ';' {printf("declaring_list\n");} + | default_declaring_list ';' {printf("default_declaring_list\n");} + | sue_declaration_specifier ';' {printf("sue_declaration_specifier\n");} + | sue_type_specifier ';' {printf("sue_type_specifier\n");} + | sue_type_specifier_elaboration ';' {printf("sue_type_specifier_elaboration\n");} + ; + + + /* Note that if a typedef were redeclared, then a declaration + specifier must be supplied (re: ANSI C spec). The following are + declarations wherein no declaration_specifier is supplied, and + hence the 'default' must be used. An example of this is + + const a; + + which by default, is the same as: + + const int a; + + `a' must NOT be a typedef in the above example. */ + + + /* The presence of `{}' in the following rules indicates points + at which the symbol table MUST be updated so that the tokenizer + can IMMEDIATELY continue to maintain the proper distinction + between a LE_TYPEDEFname and an LE_IDENTIFIER. */ + +default_declaring_list: /* Can't redeclare typedef names */ + declaration_qualifier_list identifier_declarator {} initializer_opt + | type_qualifier_list identifier_declarator {} initializer_opt + | default_declaring_list ',' identifier_declarator {} initializer_opt + + | declaration_qualifier_list constructed_identifier_declarator + | type_qualifier_list constructed_identifier_declarator + | default_declaring_list ',' constructed_identifier_declarator + ; + + + /* Note how type_qualifier_list is NOT used in the following + productions. Qualifiers are NOT sufficient to redefine + typedef-names (as prescribed by the ANSI C standard).*/ + +declaring_list: + declaration_specifier declarator {} initializer_opt {printf("1\n");} + | type_specifier declarator {} initializer_opt {printf("2\n");} + | basic_type_name declarator {} initializer_opt {printf("3\n");} + | LE_TYPEDEFname declarator {} initializer_opt {printf("4\n");} + | global_or_scoped_typedefname declarator {} initializer_opt {printf("5\n");} + | declaring_list ',' declarator {} initializer_opt {printf("6\n");} + + | declaration_specifier constructed_declarator {printf("7\n");} + | type_specifier constructed_declarator {printf("8\n");} + | basic_type_name constructed_declarator {printf("9\n");} + | LE_TYPEDEFname constructed_declarator {printf("10\n");} + | global_or_scoped_typedefname constructed_declarator {printf("11\n");} + | declaring_list ',' constructed_declarator {printf("12\n");} + ; + + + /* Declarators with parenthesized initializers present a big + problem. Typically a declarator that looks like: "*a(...)" is + supposed to bind FIRST to the "(...)", and then to the "*". This + binding presumes that the "(...)" stuff is a prototype. With + constructed declarators, we must (officially) finish the binding + to the "*" (finishing forming a good declarator) and THEN connect + with the argument list. Unfortunately, by the time we realize it + is an argument list (and not a prototype) we have pushed the + separate declarator tokens "*" and "a" onto the yacc stack + WITHOUT combining them. The solution is to use odd productions to + carry the incomplete declarator along with the "argument + expression list" back up the yacc stack. We would then actually + instantiate the symbol table after we have fully decorated the + symbol with all the leading "*" stuff. Actually, since we don't + have all the type information in one spot till we reduce to a + declaring_list, this delay is not a problem. Note that ordinary + initializers REQUIRE (ANSI C Standard) that the symbol be placed + into the symbol table BEFORE its initializer is read, but in the + case of parenthesized initializers, this is not possible (we + don't even know we have an initializer till have passed the + opening "(". ) */ + +constructed_declarator: + nonunary_constructed_identifier_declarator + | constructed_paren_typedef_declarator + | simple_paren_typedef_declarator '(' argument_expression_list ')' + + | simple_paren_typedef_declarator postfixing_abstract_declarator + '(' argument_expression_list ')' /* constraint error */ + + | constructed_parameter_typedef_declarator + | asterisk_or_ampersand constructed_declarator + | unary_modifier constructed_declarator + ; + +constructed_paren_typedef_declarator: + '(' paren_typedef_declarator ')' + '(' argument_expression_list ')' + + | '(' paren_typedef_declarator ')' postfixing_abstract_declarator + '(' argument_expression_list ')' + + | '(' simple_paren_typedef_declarator postfixing_abstract_declarator ')' + '(' argument_expression_list ')' + + | '(' LE_TYPEDEFname postfixing_abstract_declarator ')' + '(' argument_expression_list ')' + ; + + +constructed_parameter_typedef_declarator: + LE_TYPEDEFname '(' argument_expression_list ')' + + | LE_TYPEDEFname postfixing_abstract_declarator + '(' argument_expression_list ')' /* constraint error */ + + | '(' clean_typedef_declarator ')' + '(' argument_expression_list ')' + + | '(' clean_typedef_declarator ')' postfixing_abstract_declarator + '(' argument_expression_list ')' + ; + + +constructed_identifier_declarator: + nonunary_constructed_identifier_declarator + | asterisk_or_ampersand constructed_identifier_declarator + | unary_modifier constructed_identifier_declarator + ; + + + /* The following are restricted to NOT begin with any pointer + operators. This includes both "*" and "T::*" modifiers. Aside + from this restriction, the following would have been: + identifier_declarator '(' argument_expression_list ')' */ + +nonunary_constructed_identifier_declarator: + paren_identifier_declarator '(' argument_expression_list ')' + + | paren_identifier_declarator postfixing_abstract_declarator + '(' argument_expression_list ')' /* constraint error*/ + + | '(' unary_identifier_declarator ')' + '(' argument_expression_list ')' + + | '(' unary_identifier_declarator ')' postfixing_abstract_declarator + '(' argument_expression_list ')' + ; + + +declaration_specifier: + basic_declaration_specifier /* Arithmetic or void */ + | sue_declaration_specifier /* struct/union/enum/class */ + | typedef_declaration_specifier /* typedef*/ + ; + +type_specifier: + basic_type_specifier /* Arithmetic or void */ + | sue_type_specifier /* Struct/Union/Enum/Class */ + | sue_type_specifier_elaboration /* elaborated Struct/Union/Enum/Class */ + | typedef_type_specifier /* Typedef */ + ; + +declaration_qualifier_list: /* storage class and optional const/volatile */ + storage_class + | type_qualifier_list storage_class + | declaration_qualifier_list declaration_qualifier + ; + +type_qualifier_list: + type_qualifier + | type_qualifier_list type_qualifier + ; + +declaration_qualifier: + storage_class + | type_qualifier /* const or volatile */ + ; + +type_qualifier: + LE_CONST + | LE_VOLATILE + ; + +basic_declaration_specifier: /*Storage Class+Arithmetic or void*/ + declaration_qualifier_list basic_type_name + | basic_type_specifier storage_class + | basic_type_name storage_class + | basic_declaration_specifier declaration_qualifier + | basic_declaration_specifier basic_type_name + ; + +basic_type_specifier: + type_qualifier_list basic_type_name /* Arithmetic or void */ + | basic_type_name basic_type_name + | basic_type_name type_qualifier + | basic_type_specifier type_qualifier + | basic_type_specifier basic_type_name + ; + +sue_declaration_specifier: /* Storage Class + struct/union/enum/class */ + declaration_qualifier_list elaborated_type_name + | declaration_qualifier_list elaborated_type_name_elaboration + | sue_type_specifier storage_class + | sue_type_specifier_elaboration storage_class + | sue_declaration_specifier declaration_qualifier + ; + +sue_type_specifier_elaboration: + elaborated_type_name_elaboration /* elaborated struct/union/enum/class */ + | type_qualifier_list elaborated_type_name_elaboration + | sue_type_specifier_elaboration type_qualifier + ; + +sue_type_specifier: + elaborated_type_name /* struct/union/enum/class */ + | type_qualifier_list elaborated_type_name + | sue_type_specifier type_qualifier + ; + +typedef_declaration_specifier: /*Storage Class + typedef types */ + declaration_qualifier_list LE_TYPEDEFname + | declaration_qualifier_list global_or_scoped_typedefname + + | typedef_type_specifier storage_class + | LE_TYPEDEFname storage_class + | global_or_scoped_typedefname storage_class + + | typedef_declaration_specifier declaration_qualifier + ; + +typedef_type_specifier: /* typedef types */ + type_qualifier_list LE_TYPEDEFname + | type_qualifier_list global_or_scoped_typedefname + + | LE_TYPEDEFname type_qualifier + | global_or_scoped_typedefname type_qualifier + + | typedef_type_specifier type_qualifier + ; + + +/* There are really several distinct sets of storage_classes. The +sets vary depending on whether the declaration is at file scope, is a +declaration within a struct/class, is within a function body, or in a +function declaration/definition (prototype parameter declarations). +They are grouped here to simplify the grammar, and can be +semantically checked. Note that this approach tends to ease the +syntactic restrictions in the grammar slightly, but allows for future +language development, and tends to provide superior diagnostics and +error recovery (i_e.: a syntax error does not disrupt the parse). + + + File File Member Member Local Local Formal + Var Funct Var Funct Var Funct Params +LE_TYPEDEF x x x x x x +LE_EXTERN x x x x +LE_STATIC x x x x x +LE_AUTO x x +LE_REGISTER x x +LE_FRIEND x +LE_OVERLOAD x x x +LE_INLINE x x x +LE_VIRTUAL x x +*/ + +storage_class: + LE_EXTERN + | LE_TYPEDEF + | LE_STATIC + | LE_AUTO + | LE_REGISTER + | LE_FRIEND /* C++, not ANSI C */ + | LE_OVERLOAD /* C++, not ANSI C */ + | LE_INLINE /* C++, not ANSI C */ + | LE_VIRTUAL /* C++, not ANSI C */ + ; + +basic_type_name: + LE_INT + | LE_CHAR + | LE_SHORT + | LE_LONG + | LE_FLOAT + | LE_DOUBLE + | LE_SIGNED + | LE_UNSIGNED + | LE_VOID + ; + +elaborated_type_name_elaboration: + aggregate_name_elaboration + | enum_name_elaboration + ; + +elaborated_type_name: + aggregate_name + | enum_name + ; + + + /* Since the expression "new type_name" MIGHT use an elaborated + type and a derivation, it MIGHT have a ':'. This fact conflicts + with the requirement that a new expression can be placed between + a '?' and a ':' in a conditional expression (at least it confuses + LR(1) parsers). Hence the aggregate_name_elaboration is + responsible for a series of SR conflicts on ':'.*/ + + /* The intermediate actions {} represent points at which the + database of typedef names must be updated in C++. This is + critical to the lexer, which must begin to tokenize based on this + new information. */ + +aggregate_name_elaboration: + aggregate_name derivation_opt '{' member_declaration_list_opt '}' + | aggregate_key derivation_opt '{' member_declaration_list_opt '}' + ; + + + /* We distinguish between the above, which support elaboration, + and this set of productions so that we can provide special + declaration specifiers for operator_new_type, and for conversion + functions. Note that without this restriction a large variety of + conflicts appear when processing operator_new and conversions + operators (which can be followed by a ':' in a ternary ?: + expression) */ + + /* Note that at the end of each of the following rules we should + be sure that the tag name is in, or placed in the indicated + scope. If no scope is specified, then we must add it to our + current scope IFF it cannot be found in an external lexical + scope. */ + +aggregate_name: + aggregate_key tag_name + | global_scope scope aggregate_key tag_name + | global_scope aggregate_key tag_name + | scope aggregate_key tag_name + ; + +derivation_opt: + /* nothing */ + | ':' derivation_list + ; + +derivation_list: + parent_class + | derivation_list ',' parent_class + ; + +parent_class: + global_opt_scope_opt_typedefname + | LE_VIRTUAL access_specifier_opt global_opt_scope_opt_typedefname + | access_specifier virtual_opt global_opt_scope_opt_typedefname + ; + +virtual_opt: + /* nothing */ + | LE_VIRTUAL + ; + +access_specifier_opt: + /* nothing */ + | access_specifier + ; + +access_specifier: + LE_PUBLIC + | LE_PRIVATE + | LE_PROTECTED + ; + +aggregate_key: + LE_STRUCT + | LE_UNION + | LE_CLASS /* C++, not ANSI C */ + ; + + + /* Note that an empty list is ONLY allowed under C++. The grammar + can be modified so that this stands out. The trick is to define + member_declaration_list, and have that referenced for non-trivial + lists. */ + +member_declaration_list_opt: + /* nothing */ + | member_declaration_list_opt member_declaration + ; + +member_declaration: + member_declaring_list ';' + | member_default_declaring_list ';' + + | access_specifier ':' /* C++, not ANSI C */ + + | new_function_definition /* C++, not ANSI C */ + | constructor_function_in_class /* C++, not ANSI C */ + + | sue_type_specifier ';' /* C++, not ANSI C */ + | sue_type_specifier_elaboration ';' /* C++, not ANSI C */ + | identifier_declarator ';' /* C++, not ANSI C + access modification + conversion functions, + unscoped destructors */ + + | typedef_declaration_specifier ';' /* friend T */ /* C++, not ANSI C */ + | sue_declaration_specifier ';' /* friend class C*/ /* C++, not ANSI C */ + ; + +member_default_declaring_list: /* doesn't redeclare typedef*/ + type_qualifier_list + identifier_declarator member_pure_opt + + | declaration_qualifier_list + identifier_declarator member_pure_opt /* C++, not ANSI C */ + + | member_default_declaring_list ',' + identifier_declarator member_pure_opt + + | type_qualifier_list bit_field_identifier_declarator + | declaration_qualifier_list bit_field_identifier_declarator /* C++, not ANSI C */ + | member_default_declaring_list ',' bit_field_identifier_declarator + ; + + + /* There is a conflict when "struct A" is used as a declaration + specifier, and there is a chance that a bit field name will be + provided. To fix this syntactically would require distinguishing + non_elaborating_declaration_specifiers the way I handled + non_elaborating_type_specifiers. I think this should be a + constraint error anyway :-). */ + +member_declaring_list: /* Can possibly redeclare typedefs */ + type_specifier declarator member_pure_opt + | basic_type_name declarator member_pure_opt + + | global_or_scoped_typedefname declarator member_pure_opt + | member_conflict_declaring_item + | member_declaring_list ',' declarator member_pure_opt + + | type_specifier bit_field_declarator + | basic_type_name bit_field_declarator + | LE_TYPEDEFname bit_field_declarator + | global_or_scoped_typedefname bit_field_declarator + | declaration_specifier bit_field_declarator /* constraint violation: storage class used */ + | member_declaring_list ',' bit_field_declarator + ; + + + /* The following conflict with constructors- + member_conflict_declaring_item: + LE_TYPEDEFname declarator member_pure_opt + | declaration_specifier declarator member_pure_opt /* C++, not ANSI C * / + ; + so we inline expand declarator to get the following productions... + */ +member_conflict_declaring_item: + LE_TYPEDEFname identifier_declarator member_pure_opt + | LE_TYPEDEFname parameter_typedef_declarator member_pure_opt + | LE_TYPEDEFname simple_paren_typedef_declarator member_pure_opt + + | declaration_specifier identifier_declarator member_pure_opt + | declaration_specifier parameter_typedef_declarator member_pure_opt + | declaration_specifier simple_paren_typedef_declarator member_pure_opt + + | member_conflict_paren_declaring_item + ; + + + /* The following still conflicts with constructors- + member_conflict_paren_declaring_item: + LE_TYPEDEFname paren_typedef_declarator member_pure_opt + | declaration_specifier paren_typedef_declarator member_pure_opt + ; + so paren_typedef_declarator is expanded inline to get...*/ + +member_conflict_paren_declaring_item: + LE_TYPEDEFname asterisk_or_ampersand + '(' simple_paren_typedef_declarator ')' member_pure_opt + | LE_TYPEDEFname unary_modifier + '(' simple_paren_typedef_declarator ')' member_pure_opt + | LE_TYPEDEFname asterisk_or_ampersand + '(' LE_TYPEDEFname ')' member_pure_opt + | LE_TYPEDEFname unary_modifier + '(' LE_TYPEDEFname ')' member_pure_opt + | LE_TYPEDEFname asterisk_or_ampersand + paren_typedef_declarator member_pure_opt + | LE_TYPEDEFname unary_modifier + paren_typedef_declarator member_pure_opt + + | declaration_specifier asterisk_or_ampersand + '(' simple_paren_typedef_declarator ')' member_pure_opt + | declaration_specifier unary_modifier + '(' simple_paren_typedef_declarator ')' member_pure_opt + | declaration_specifier asterisk_or_ampersand + '(' LE_TYPEDEFname ')' member_pure_opt + | declaration_specifier unary_modifier + '(' LE_TYPEDEFname ')' member_pure_opt + | declaration_specifier asterisk_or_ampersand + paren_typedef_declarator member_pure_opt + | declaration_specifier unary_modifier + paren_typedef_declarator member_pure_opt + + | member_conflict_paren_postfix_declaring_item + ; + + + /* but we still have the following conflicts with constructors- + member_conflict_paren_postfix_declaring_item: + LE_TYPEDEFname postfix_paren_typedef_declarator member_pure_opt + | declaration_specifier postfix_paren_typedef_declarator member_pure_opt + ; + so we expand paren_postfix_typedef inline and get...*/ + +member_conflict_paren_postfix_declaring_item: + LE_TYPEDEFname '(' paren_typedef_declarator ')' + member_pure_opt + | LE_TYPEDEFname '(' simple_paren_typedef_declarator + postfixing_abstract_declarator ')' member_pure_opt + | LE_TYPEDEFname '(' LE_TYPEDEFname + postfixing_abstract_declarator ')' member_pure_opt + | LE_TYPEDEFname '(' paren_typedef_declarator ')' + postfixing_abstract_declarator member_pure_opt + + | declaration_specifier '(' paren_typedef_declarator ')' + member_pure_opt + | declaration_specifier '(' simple_paren_typedef_declarator + postfixing_abstract_declarator ')' member_pure_opt + | declaration_specifier '(' LE_TYPEDEFname + postfixing_abstract_declarator ')' member_pure_opt + | declaration_specifier '(' paren_typedef_declarator ')' + postfixing_abstract_declarator member_pure_opt + ; + /* ...and we are done. Now all the conflicts appear on ';', + which can be semantically evaluated/disambiguated */ + + +member_pure_opt: + /* nothing */ + | '=' LE_OCTALconstant /* C++, not ANSI C */ /* Pure function*/ + ; + + + /* Note that bit field names, where redefining TYPEDEFnames, + cannot be parenthesized in C++ (due to ambiguities), and hence + this part of the grammar is simpler than ANSI C. :-) The problem + occurs because: + + LE_TYPEDEFname ( LE_TYPEDEFname) : ..... + + doesn't look like a bit field, rather it looks like a constructor + definition! */ + +bit_field_declarator: + bit_field_identifier_declarator + | LE_TYPEDEFname {} ':' constant_expression + ; + + + /* The actions taken in the "{}" above and below are intended to + allow the symbol table to be updated when the declarator is + complete. It is critical for code like: + + foo : sizeof(foo + 1); + */ + +bit_field_identifier_declarator: + ':' constant_expression + | identifier_declarator {} ':' constant_expression + ; + +enum_name_elaboration: + global_opt_scope_opt_enum_key '{' enumerator_list '}' + | enum_name '{' enumerator_list '}' + ; + + + /* As with structures, the distinction between "elaborating" and + "non-elaborating" enum types is maintained. In actuality, it + probably does not cause much in the way of conflicts, since a ':' + is not allowed. For symmetry, we maintain the distinction. The + {} actions are intended to allow the symbol table to be updated. + These updates are significant to code such as: + + enum A { first=sizeof(A)}; + */ + +enum_name: + global_opt_scope_opt_enum_key tag_name + ; + +global_opt_scope_opt_enum_key: + LE_ENUM + | global_or_scope LE_ENUM + ; + +enumerator_list: + enumerator_list_no_trailing_comma + | enumerator_list_no_trailing_comma ',' /* C++, not ANSI C */ + ; + + + /* Note that we do not need to rush to add an enumerator to the + symbol table until *AFTER* the enumerator_value_opt is parsed. + The enumerated value is only in scope AFTER its definition is + complete. Hence the following is legal: "enum {a, b=a+10};" but + the following is (assuming no external matching of names) is not + legal: "enum {c, d=sizeof(d)};" ("d" not defined when sizeof was + applied.) This is notably contrasted with declarators, which + enter scope as soon as the declarator is complete. */ + +enumerator_list_no_trailing_comma: + enumerator_name enumerator_value_opt + | enumerator_list_no_trailing_comma ',' enumerator_name enumerator_value_opt + ; + +enumerator_name: + LE_IDENTIFIER + | LE_TYPEDEFname + ; + +enumerator_value_opt: + /* Nothing */ + | '=' constant_expression + ; + + + /* We special case the lone type_name which has no storage class + (even though it should be an example of a parameter_type_list). + This helped to disambiguate type-names in parenthetical casts.*/ + +parameter_type_list: + '(' ')' type_qualifier_list_opt + | '(' type_name ')' type_qualifier_list_opt + | '(' type_name initializer ')' type_qualifier_list_opt /* C++, not ANSI C */ + | '(' named_parameter_type_list ')' type_qualifier_list_opt + ; + + + /* The following are used in old style function definitions, when + a complex return type includes the "function returning" modifier. + Note the subtle distinction from parameter_type_list. These + parameters are NOT the parameters for the function being defined, + but are simply part of the type definition. An example would be: + + int(*f( a ))(float) long a; {...} + + which is equivalent to the full new style definition: + + int(*f(long a))(float) {...} + + The type list `(float)' is an example of an + old_parameter_type_list. The bizarre point here is that an old + function definition declarator can be followed by a type list, + which can start with a qualifier `const'. This conflicts with + the new syntactic construct for const member functions!?! As a + result, an old style function definition cannot be used in all + cases for a member function. */ + +old_parameter_type_list: + '(' ')' + | '(' type_name ')' + | '(' type_name initializer ')' /* C++, not ANSI C */ + | '(' named_parameter_type_list ')' + ; + +named_parameter_type_list: /* WARNING: excludes lone type_name*/ + parameter_list + | parameter_list comma_opt_ellipsis + | type_name comma_opt_ellipsis + | type_name initializer comma_opt_ellipsis /* C++, not ANSI C */ + | LE_ELLIPSIS /* C++, not ANSI C */ + ; + +comma_opt_ellipsis: + LE_ELLIPSIS /* C++, not ANSI C */ + | ',' LE_ELLIPSIS + ; + +parameter_list: + non_casting_parameter_declaration + | non_casting_parameter_declaration initializer /* C++, not ANSI C */ + | type_name ',' parameter_declaration + | type_name initializer ',' parameter_declaration /* C++, not ANSI C */ + | parameter_list ',' parameter_declaration + ; + + + /* There is some very subtle disambiguation going on here. Do + not be tempted to make further use of the following production in + parameter_list, or else the conflict count will grow noticeably. + Specifically, the next set of rules has already been inline + expanded for the first parameter in a parameter_list to support a + deferred disambiguation. The subtle disambiguation has to do with + contexts where parameter type lists look like old-style-casts. */ + +parameter_declaration: + type_name + | type_name initializer /* C++, not ANSI C */ + | non_casting_parameter_declaration + | non_casting_parameter_declaration initializer /* C++, not ANSI C */ + ; + + + /* There is an LR ambiguity between old-style parenthesized casts + and parameter-type-lists. This tends to happen in contexts where + either an expression or a parameter-type-list is possible. For + example, assume that T is an externally declared type in the + code: + + int (T ((int + + it might continue: + + int (T ((int)0)); + + which would make it: + + (int) (T) (int)0 ; + + which is an expression, consisting of a series of casts. + Alternatively, it could be: + + int (T ((int a))); + + which would make it the redeclaration of T, equivalent to: + + int T (dummy_name (int a)); + + if we see a type that either has a named variable (in the above + case "a"), or a storage class like: + + int (T ((int register + + then we know it can't be a cast, and it is "forced" to be a + parameter_list. + + It is not yet clear that the ANSI C++ committee would decide to + place this disambiguation into the syntax, rather than leaving it + as a constraint check (i.e., a valid parser would have to parse + everything as though it were a parameter list (in these odd + contexts), and then give an error if is to a following context + (like "0" above) that invalidated this syntax evaluation. */ + + /* One big thing implemented here is that a LE_TYPEDEFname CANNOT be + redeclared when we don't have declaration_specifiers! Notice that + when we do use a LE_TYPEDEFname based declarator, only the "special" + (non-ambiguous in this context) typedef_declarator is used. + Everything else that is "missing" shows up as a type_name. */ + +non_casting_parameter_declaration: /*have names or storage classes */ + declaration_specifier + | declaration_specifier abstract_declarator + | declaration_specifier identifier_declarator + | declaration_specifier parameter_typedef_declarator + + | declaration_qualifier_list + | declaration_qualifier_list abstract_declarator + | declaration_qualifier_list identifier_declarator + + | type_specifier identifier_declarator + | type_specifier parameter_typedef_declarator + + | basic_type_name identifier_declarator + | basic_type_name parameter_typedef_declarator + + | LE_TYPEDEFname identifier_declarator + | LE_TYPEDEFname parameter_typedef_declarator + + | global_or_scoped_typedefname identifier_declarator + | global_or_scoped_typedefname parameter_typedef_declarator + + | type_qualifier_list identifier_declarator + ; + +type_name: + type_specifier + | basic_type_name + | LE_TYPEDEFname + | global_or_scoped_typedefname + | type_qualifier_list + + | type_specifier abstract_declarator + | basic_type_name abstract_declarator + | LE_TYPEDEFname abstract_declarator + | global_or_scoped_typedefname abstract_declarator + | type_qualifier_list abstract_declarator + ; + +initializer_opt: + /* nothing */ + | initializer + ; + +initializer: + '=' initializer_group + ; + +initializer_group: + '{' initializer_list '}' + | '{' initializer_list ',' '}' + | assignment_expression + ; + +initializer_list: + initializer_group + | initializer_list ',' initializer_group + ; + + +/*************************** STATEMENTS *******************************/ + +statement: + labeled_statement + | compound_statement + | expression_statement + | selection_statement + | iteration_statement + | jump_statement + | declaration /* C++, not ANSI C */ + ; + +labeled_statement: + label ':' statement + | LE_CASE constant_expression ':' statement + | LE_DEFAULT ':' statement + ; + + + /* I sneak declarations into statement_list to support C++. The + grammar is a little clumsy this way, but the violation of C + syntax is heavily localized */ + +compound_statement: + '{' statement_list_opt '}' + ; + +declaration_list: + declaration + | declaration_list declaration + ; + +statement_list_opt: + /* nothing */ + | statement_list_opt statement + ; + +expression_statement: + comma_expression_opt ';' + ; + +selection_statement: + LE_IF '(' comma_expression ')' statement + | LE_IF '(' comma_expression ')' statement LE_ELSE statement + | LE_SWITCH '(' comma_expression ')' statement + ; + +iteration_statement: + LE_WHILE '(' comma_expression_opt ')' statement + | LE_DO statement LE_WHILE '(' comma_expression ')' ';' + + | LE_FOR '(' comma_expression_opt ';' comma_expression_opt ';' + comma_expression_opt ')' statement + + | LE_FOR '(' declaration comma_expression_opt ';' + comma_expression_opt ')' statement /* C++, not ANSI C */ + ; + +jump_statement: + LE_GOTO label ';' + | LE_CONTINUE ';' + | LE_BREAK ';' + | LE_RETURN comma_expression_opt ';' + ; + + + /* The following actions should update the symbol table in the + "label" name space */ + +label: + LE_IDENTIFIER + | LE_TYPEDEFname + ; + + +/***************************** EXTERNAL DEFINITIONS *****************************/ + +translation_unit: + /* nothing */ + | translation_unit external_definition + ; + +external_definition: + function_declaration {printf("Found function (decl)\n");} + | function_definition {printf("Found function (impl)\n");} + | declaration {printf("Found declaration %s\n", yytext);} + | linkage_specifier function_declaration /* C++, not ANSI C*/ + | linkage_specifier function_definition /* C++, not ANSI C*/ + | linkage_specifier declaration /* C++, not ANSI C*/ + | linkage_specifier '{' translation_unit '}' /* C++, not ANSI C*/ + ; + +linkage_specifier: + LE_EXTERN LE_STRINGliteral + ; + + + /* Note that declaration_specifiers are left out of the following + function declarations. Such omission is illegal in ANSI C. It is + sometimes necessary in C++, in instances where no return type + should be specified (e_g., a conversion operator).*/ + +function_declaration: + identifier_declarator ';' /* semantically verify it is a + function, and (if ANSI says it's + the law for C++ also...) that it + is something that can't have a + return type (like a conversion + function, or a destructor */ + + | constructor_function_declaration ';' + ; + +function_definition: + new_function_definition + | old_function_definition + | constructor_function_definition + ; + + + /* Note that in ANSI C, function definitions *ONLY* are presented + at file scope. Hence, if there is a typedefname active, it is + illegal to redeclare it (there is no enclosing scope at file + scope). + + In contrast, C++ allows function definitions at struct + elaboration scope, and allows tags that are defined at file scope + (and hence look like typedefnames) to be redeclared to function + calls. Hence several of the rules are "partially C++ only". I + could actually build separate rules for typedef_declarators and + identifier_declarators, and mention that the typedef_declarator + rules represent the C++ only features. + + In some sense, this is haggling, as I could/should have left + these as constraints in the ANSI C grammar, rather than as syntax + requirements. */ + +new_function_definition: + identifier_declarator compound_statement + | declaration_specifier declarator compound_statement /* partially C++ only */ + | type_specifier declarator compound_statement /* partially C++ only */ + | basic_type_name declarator compound_statement /* partially C++ only */ + | LE_TYPEDEFname declarator compound_statement /* partially C++ only */ + | global_or_scoped_typedefname declarator compound_statement /* partially C++ only */ + | declaration_qualifier_list identifier_declarator compound_statement + | type_qualifier_list identifier_declarator compound_statement + ; + + + /* Note that I do not support redeclaration of TYPEDEFnames into + function names as I did in new_function_definitions (see note). + Perhaps I should do it, but for now, ignore the issue. Note that + this is a non-problem with ANSI C, as tag names are not + considered TYPEDEFnames. */ + +old_function_definition: + old_function_declarator {} old_function_body + | declaration_specifier old_function_declarator {} old_function_body + | type_specifier old_function_declarator {} old_function_body + | basic_type_name old_function_declarator {} old_function_body + | LE_TYPEDEFname old_function_declarator {} old_function_body + | global_or_scoped_typedefname old_function_declarator {} old_function_body + | declaration_qualifier_list old_function_declarator {} old_function_body + | type_qualifier_list old_function_declarator {} old_function_body + ; + +old_function_body: + declaration_list compound_statement + | compound_statement + ; + + + /* Verify via constraints that the following + declaration_specifier is really a + typedef_declaration_specifier, consisting of: + + ... LE_TYPEDEFname :: LE_TYPEDEFname + + optionally *preceded* by a "inline" keyword. Use care not to + support "inline" as a postfix! + + Similarly, the global_or_scoped_typedefname must be: + + ... LE_TYPEDEFname :: LE_TYPEDEFname + + with matching names at the end of the list. + + We use the more general form to prevent a syntax conflict with a + typical function definition (which won't have a + constructor_init_list) */ + +constructor_function_definition: + global_or_scoped_typedefname parameter_type_list + constructor_init_list_opt compound_statement + + | declaration_specifier parameter_type_list + constructor_init_list_opt compound_statement + ; + + + /* Same comments as seen for constructor_function_definition + apply here */ + +constructor_function_declaration: + global_or_scoped_typedefname parameter_type_list /* wasteful redeclaration; used for friend decls. */ + + | declaration_specifier parameter_type_list /* request to inline, no definition */ + ; + + + /* The following use of declaration_specifiers are made to allow + for a LE_TYPEDEFname preceded by an LE_INLINE modifier. This fact must + be verified semantically. It should also be verified that the + LE_TYPEDEFname is ACTUALLY the class name being elaborated. Note + that we could break out typedef_declaration_specifier from within + declaration_specifier, and we might narrow down the conflict + region a bit. A second alternative (to what is done) for cleaning + up this stuff is to let the tokenizer specially identify the + current class being elaborated as a special token, and not just a + typedefname. Unfortunately, things would get very confusing for + the lexer, as we may pop into enclosed tag elaboration scopes; + into function definitions; or into both recursively! */ + + /* I should make the following rules easier to annotate with + scope entry and exit actions. Note how hard it is to establish + the scope when you don't even know what the decl_spec is!! It can + be done with $-1 hacking, but I should not encourage users to do + this directly. */ + +constructor_function_in_class: + declaration_specifier constructor_parameter_list_and_body + | LE_TYPEDEFname constructor_parameter_list_and_body + ; + + + /* The following conflicts with member declarations- + constructor_parameter_list_and_body: + parameter_type_list ';' + | parameter_type_list constructor_init_list_opt compound_statement + ; + so parameter_type_list was expanded inline to get */ + + /* C++, not ANSI C */ +constructor_parameter_list_and_body: + '(' ')' type_qualifier_list_opt ';' + | '(' type_name initializer ')' type_qualifier_list_opt ';' + | '(' named_parameter_type_list ')' type_qualifier_list_opt ';' + | '(' ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + | '(' type_name initializer ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + | '(' named_parameter_type_list ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | constructor_conflicting_parameter_list_and_body + ; + + + /* The following conflicted with member declaration- + constructor_conflicting_parameter_list_and_body: + '(' type_name ')' type_qualifier_list_opt ';' + | '(' type_name ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + ; + so type_name was inline expanded to get the following... */ + + + /* Note that by inline expanding type_qualifier_opt in a few of + the following rules I can transform 3 RR conflicts into 3 SR + conflicts. Since all the conflicts have a look ahead of ';', it + doesn't really matter (also, there are no bad LALR-only + components in the conflicts) */ + +constructor_conflicting_parameter_list_and_body: + '(' type_specifier ')' type_qualifier_list_opt + ';' + | '(' basic_type_name ')' type_qualifier_list_opt + ';' + + | '(' LE_TYPEDEFname ')' type_qualifier_list_opt + ';' + + | '(' global_or_scoped_typedefname ')' type_qualifier_list_opt + ';' + + | '(' type_qualifier_list ')' type_qualifier_list_opt + ';' + + + | '(' type_specifier abstract_declarator ')' type_qualifier_list_opt + ';' + | '(' basic_type_name abstract_declarator ')' type_qualifier_list_opt + ';' + + /* missing entry posted below */ + + | '(' global_or_scoped_typedefname abstract_declarator ')' type_qualifier_list_opt + ';' + | '(' type_qualifier_list abstract_declarator ')' type_qualifier_list_opt + ';' + + + | '(' type_specifier ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' basic_type_name ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' LE_TYPEDEFname ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' global_or_scoped_typedefname ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' type_qualifier_list ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + + | '(' type_specifier abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' basic_type_name abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + /* missing entry posted below */ + + | '(' global_or_scoped_typedefname abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' type_qualifier_list abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | constructor_conflicting_typedef_declarator + ; + + + /* The following have ambiguities with member declarations- + constructor_conflicting_typedef_declarator: + '(' LE_TYPEDEFname abstract_declarator ')' type_qualifier_list_opt + ';' + | '(' LE_TYPEDEFname abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + ; + which can be deferred by expanding abstract_declarator, and in two + cases parameter_qualifier_list, resulting in ...*/ + +constructor_conflicting_typedef_declarator: + '(' LE_TYPEDEFname unary_abstract_declarator ')' type_qualifier_list_opt + ';' + + | '(' LE_TYPEDEFname unary_abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + | '(' LE_TYPEDEFname postfix_abstract_declarator ')' type_qualifier_list_opt + ';' + + | '(' LE_TYPEDEFname postfix_abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + + + | '(' LE_TYPEDEFname postfixing_abstract_declarator ')' type_qualifier_list_opt + ';' + + | '(' LE_TYPEDEFname postfixing_abstract_declarator ')' type_qualifier_list_opt + constructor_init_list_opt compound_statement + ; + + +constructor_init_list_opt: + /* nothing */ + | constructor_init_list + ; + +constructor_init_list: + ':' constructor_init + | constructor_init_list ',' constructor_init + ; + +constructor_init: + LE_IDENTIFIER '(' argument_expression_list ')' + | LE_IDENTIFIER '(' ')' + + | LE_TYPEDEFname '(' argument_expression_list ')' + | LE_TYPEDEFname '(' ')' + | global_or_scoped_typedefname '(' argument_expression_list ')' + | global_or_scoped_typedefname '(' ')' + + | '(' argument_expression_list ')' /* Single inheritance ONLY*/ + | '(' ')' /* Is this legal? It might be default! */ + ; + +declarator: + identifier_declarator + | typedef_declarator + ; + +typedef_declarator: + paren_typedef_declarator /* would be ambiguous as parameter*/ + | simple_paren_typedef_declarator /* also ambiguous */ + | parameter_typedef_declarator /* not ambiguous as parameter*/ + ; + +parameter_typedef_declarator: + LE_TYPEDEFname + | LE_TYPEDEFname postfixing_abstract_declarator + | clean_typedef_declarator + ; + + + /* The following have at least one '*'or '&'. There is no + (redundant) '(' between the '*'/'&' and the LE_TYPEDEFname. This + definition is critical in that a redundant paren that it too + close to the LE_TYPEDEFname (i.e., nothing between them at all) + would make the LE_TYPEDEFname into a parameter list, rather than a + declarator.*/ + +clean_typedef_declarator: + clean_postfix_typedef_declarator + | asterisk_or_ampersand parameter_typedef_declarator + | unary_modifier parameter_typedef_declarator + ; + +clean_postfix_typedef_declarator: + '(' clean_typedef_declarator ')' + | '(' clean_typedef_declarator ')' postfixing_abstract_declarator + ; + + + /* The following have a redundant '(' placed immediately to the + left of the LE_TYPEDEFname. This opens up the possibility that the + LE_TYPEDEFname is really the start of a parameter list, and *not* a + declarator*/ + +paren_typedef_declarator: + postfix_paren_typedef_declarator + | asterisk_or_ampersand '(' simple_paren_typedef_declarator ')' + | unary_modifier '(' simple_paren_typedef_declarator ')' + | asterisk_or_ampersand '(' LE_TYPEDEFname ')' /* redundant paren */ + | unary_modifier '(' LE_TYPEDEFname ')' /* redundant paren */ + | asterisk_or_ampersand paren_typedef_declarator + | unary_modifier paren_typedef_declarator + ; + +postfix_paren_typedef_declarator: + '(' paren_typedef_declarator ')' + | '(' simple_paren_typedef_declarator postfixing_abstract_declarator ')' + | '(' LE_TYPEDEFname postfixing_abstract_declarator ')' /* redundant paren */ + | '(' paren_typedef_declarator ')' postfixing_abstract_declarator + ; + + + /* The following excludes lone LE_TYPEDEFname to help in a conflict + resolution. We have special cased lone LE_TYPEDEFname along side + all uses of simple_paren_typedef_declarator */ + +simple_paren_typedef_declarator: + '(' LE_TYPEDEFname ')' + | '(' simple_paren_typedef_declarator ')' + ; + +identifier_declarator: + unary_identifier_declarator + | paren_identifier_declarator + ; + + + /* The following allows "function return array of" as well as + "array of function returning". It COULD be cleaned up the way + abstract declarators have been. This change might make it hard + to recover from user's syntax errors, whereas now they appear as + simple constraint errors. */ + +unary_identifier_declarator: + postfix_identifier_declarator + | asterisk_or_ampersand identifier_declarator + | unary_modifier identifier_declarator + ; + +postfix_identifier_declarator: + paren_identifier_declarator postfixing_abstract_declarator + | '(' unary_identifier_declarator ')' + | '(' unary_identifier_declarator ')' postfixing_abstract_declarator + ; + +old_function_declarator: + postfix_old_function_declarator + | asterisk_or_ampersand old_function_declarator + | unary_modifier old_function_declarator + ; + + + /* ANSI C section 3.7.1 states "An identifier declared as a + typedef name shall not be redeclared as a parameter". Hence the + following is based only on IDENTIFIERs. + + Instead of identifier_lists, an argument_expression_list is used + in old style function definitions. The ambiguity with + constructors required the use of argument lists, with a + constraint verification of the list (e_g.: check to see that the + "expressions" consisted of lone identifiers). + + An interesting ambiguity appeared: + const constant=5; + int foo(constant) ... + + Is this an old function definition or constructor? The decision + is made later by LE_THIS grammar based on trailing context :-). This + ambiguity is probably what caused many parsers to give up on old + style function definitions. */ + +postfix_old_function_declarator: + paren_identifier_declarator '(' argument_expression_list ')' + | '(' old_function_declarator ')' + | '(' old_function_declarator ')' old_postfixing_abstract_declarator + ; + +old_postfixing_abstract_declarator: + array_abstract_declarator /* array modifiers */ + | old_parameter_type_list /* function returning modifiers */ + ; + +abstract_declarator: + unary_abstract_declarator + | postfix_abstract_declarator + | postfixing_abstract_declarator + ; + +postfixing_abstract_declarator: + array_abstract_declarator + | parameter_type_list + ; + +array_abstract_declarator: + '[' ']' + | '[' constant_expression ']' + | array_abstract_declarator '[' constant_expression ']' + ; + +unary_abstract_declarator: + asterisk_or_ampersand + | unary_modifier + | asterisk_or_ampersand abstract_declarator + | unary_modifier abstract_declarator + ; + +postfix_abstract_declarator: + '(' unary_abstract_declarator ')' + | '(' postfix_abstract_declarator ')' + | '(' postfixing_abstract_declarator ')' + | '(' unary_abstract_declarator ')' postfixing_abstract_declarator + ; + +asterisk_or_ampersand: + '*' + | '&' + ; + +unary_modifier: + scope '*' type_qualifier_list_opt + | asterisk_or_ampersand type_qualifier_list + ; + + + +/************************* NESTED SCOPE SUPPORT ******************************/ + + + /* The actions taken in the rules that follow involve notifying + the lexer that it should use the scope specified to determine if + the next LE_IDENTIFIER token is really a LE_TYPEDEFname token. Note + that the actions must be taken before the parse has a chance to + "look-ahead" at the token that follows the "::", and hence should + be done during a reduction to "scoping_name" (which is always + followed by LE_CLCL). Since we are defining an LR(1) grammar, we + are assured that an action specified *before* the :: will take + place before the :: is shifted, and hence before the token that + follows the LE_CLCL is scanned/lexed. */ + + /* Note that at the end of each of the following rules we should + be sure that the tag name is in, or placed in the indicated + scope. If no scope is specified, then we must add it to our + current scope IFF it cannot be found in an external lexical + scope. */ + +scoping_name: + tag_name + | aggregate_key tag_name /* also update symbol table here by notifying it about a (possibly) new tag*/ + ; + +scope: + scoping_name LE_CLCL + | scope scoping_name LE_CLCL + ; + + + /* Don't try to simplify the count of non-terminals by using one + of the other definitions of "LE_IDENTIFIER or LE_TYPEDEFname" (like + "label"). If you reuse such a non-terminal, 2 RR conflicts will + appear. The conflicts are LALR-only. The underlying cause of the + LALR-only conflict is that labels, are followed by ':'. + Similarly, structure elaborations which provide a derivation have + have ':' just after tag_name This reuse, with common right + context, is too much for an LALR parser. */ + +tag_name: + LE_IDENTIFIER + | LE_TYPEDEFname + ; + +global_scope: + { /*scan for upcoming name in file scope */ } LE_CLCL + ; + +global_or_scope: + global_scope + | scope + | global_scope scope + ; + + + /* The following can be used in an identifier based declarator. + (Declarators that redefine an existing LE_TYPEDEFname require + special handling, and are not included here). In addition, the + following are valid "identifiers" in an expression, whereas a + LE_TYPEDEFname is NOT.*/ + +scope_opt_identifier: + LE_IDENTIFIER + | scope LE_IDENTIFIER /* C++ not ANSI C */ + ; + +scope_opt_complex_name: + complex_name + | scope complex_name + ; + +complex_name: + '~' LE_TYPEDEFname + | operator_function_name + ; + + + /* Note that the derivations for global_opt_scope_opt_identifier + and global_opt_scope_opt_complex_name must be placed after the + derivation: + + paren_identifier_declarator : scope_opt_identifier + + There are several states with RR conflicts on "(", ")", and "[". + In these states we give up and assume a declaration, which means + resolving in favor of paren_identifier_declarator. This is + basically the "If it can be a declaration rule...", with our + finite cut off. */ + +global_opt_scope_opt_identifier: + global_scope scope_opt_identifier + | scope_opt_identifier + ; + +global_opt_scope_opt_complex_name: + global_scope scope_opt_complex_name + | scope_opt_complex_name + ; + + + /* Note that we exclude a lone LE_TYPEDEFname. When all alone, it + gets involved in a lot of ambiguities (re: function like cast vs + declaration), and hence must be special cased in several + contexts. Note that generally every use of scoped_typedefname is + accompanied by a parallel production using lone LE_TYPEDEFname */ + +scoped_typedefname: + scope LE_TYPEDEFname + ; + +global_or_scoped_typedefname: + scoped_typedefname + | global_scope scoped_typedefname + | global_scope LE_TYPEDEFname + ; + +global_opt_scope_opt_typedefname: + LE_TYPEDEFname + | global_or_scoped_typedefname + ; + +%% +void yyerror(char* string) +{ + printf("CodeLite: parser error: %s\n", string); +} + + +main() +{ + setLexerInput("class A{}; int foo(){ for(i=0; i<100; i++){}; return 3;}"); + yyparse(); +} diff --git a/CxxParser/cpp_expr_lexer.cpp b/CxxParser/cpp_expr_lexer.cpp new file mode 100644 index 0000000000..723c456318 --- /dev/null +++ b/CxxParser/cpp_expr_lexer.cpp @@ -0,0 +1,2608 @@ +#define yy_create_buffer cl_expr__create_buffer +#define yy_delete_buffer cl_expr__delete_buffer +#define yy_scan_buffer cl_expr__scan_buffer +#define yy_scan_string cl_expr__scan_string +#define yy_scan_bytes cl_expr__scan_bytes +#define yy_flex_debug cl_expr__flex_debug +#define yy_init_buffer cl_expr__init_buffer +#define yy_flush_buffer cl_expr__flush_buffer +#define yy_load_buffer_state cl_expr__load_buffer_state +#define yy_switch_to_buffer cl_expr__switch_to_buffer +#define yyin cl_expr_in +#define yyleng cl_expr_leng +#define yylex cl_expr_lex +#define yyout cl_expr_out +#define yyrestart cl_expr_restart +#define yytext cl_expr_text +#define yylineno cl_expr_lineno +#define yywrap cl_expr_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 138 +#define YY_END_OF_BUFFER 139 +static yyconst short int yy_acclist[582] = + { 0, + 139, 125, 138, 3, 125, 138, 5, 138, 4, 125, + 138, 89, 125, 138, 125, 138, 91, 125, 138, 84, + 125, 138, 125, 138, 75, 125, 138, 76, 125, 138, + 85, 125, 138, 86, 125, 138, 77, 125, 138, 87, + 125, 138, 83, 125, 138, 90, 125, 138, 70, 125, + 138, 69, 125, 138, 97, 125, 138, 98, 125, 138, + 92, 125, 138, 99, 125, 138, 93, 125, 138, 96, + 125, 138, 68, 125, 138, 68, 125, 138, 81, 125, + 138, 82, 125, 138, 94, 125, 138, 68, 125, 138, + 68, 125, 138, 68, 125, 138, 68, 125, 138, 68, + + 125, 138, 68, 125, 138, 68, 125, 138, 68, 125, + 138, 68, 125, 138, 68, 125, 138, 68, 125, 138, + 68, 125, 138, 68, 125, 138, 68, 125, 138, 68, + 125, 138, 68, 125, 138, 68, 125, 138, 68, 125, + 138, 79, 125, 138, 95, 125, 138, 80, 125, 138, + 88, 125, 138, 78, 125, 138, 133, 138, 126, 138, + 131, 133, 138, 127, 133, 138, 131, 133, 138, 132, + 138, 129, 138, 130, 132, 138, 135, 138, 134, 138, + 137, 138, 138, 137, 138, 3, 5, 4, 111, 74, + 116, 112, 121, 114, 104, 117, 105, 118, 102, 100, + + 72, 1, 2, 115, 72, 70, 70, 70, 69, 69, + 69, 101, 106, 108, 110, 109, 107, 68, 122, 68, + 68, 68, 68, 68, 68, 68, 15, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 26, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 123, 113, 131, 131, 130, 136, 73, 103, 124, 72, + 72, 70, 71, 69, 119, 120, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 24, 68, 68, 68, 68, 68, 68, + + 68, 30, 68, 68, 68, 68, 54, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 131, 72, 71, 71, 6, 68, 68, + 8, 68, 9, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 17, 68, 18, 68, 68, 20, 68, 68, + 68, 68, 68, 25, 68, 68, 68, 68, 68, 31, + 68, 32, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 60, 68, 68, 68, 68, 68, 68, 46, 68, 68, + + 68, 131, 71, 7, 68, 49, 68, 10, 68, 68, + 68, 68, 68, 68, 68, 19, 68, 21, 68, 68, + 23, 68, 68, 27, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 36, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 43, 68, + 44, 68, 68, 68, 68, 48, 68, 131, 68, 68, + 68, 13, 68, 51, 68, 16, 68, 68, 22, 68, + 52, 68, 28, 68, 68, 53, 68, 68, 68, 68, + 33, 68, 68, 68, 59, 68, 68, 68, 35, 68, + 37, 68, 38, 68, 39, 68, 40, 68, 41, 68, + + 68, 68, 68, 68, 68, 68, 128, 131, 68, 68, + 12, 68, 14, 68, 68, 29, 68, 68, 68, 68, + 58, 68, 68, 68, 68, 68, 68, 42, 68, 68, + 68, 61, 68, 68, 68, 11, 68, 68, 68, 55, + 68, 56, 68, 68, 34, 68, 68, 68, 62, 68, + 63, 68, 45, 68, 47, 68, 68, 68, 50, 68, + 57, 68, 68, 68, 66, 68, 68, 68, 68, 68, + 68, 65, 68, 64, 68, 68, 68, 68, 68, 67, + 68 + } ; + +static yyconst short int yy_accept[439] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 7, 9, 12, 15, 17, 20, 23, + 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, + 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, + 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, + 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 159, 161, 164, 167, 170, + 172, 174, 177, 179, 181, 183, 184, 186, 187, 188, + 188, 189, 190, 190, 191, 191, 192, 193, 194, 194, + 194, 195, 196, 197, 198, 199, 200, 201, 201, 202, + + 203, 204, 205, 206, 207, 207, 207, 208, 209, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 219, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 267, 267, + 268, 268, 268, 269, 270, 270, 271, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + + 294, 296, 297, 298, 299, 300, 301, 302, 304, 305, + 306, 307, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 332, 333, 334, 335, 335, + 335, 335, 335, 335, 336, 337, 338, 340, 341, 343, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 355, + 357, 358, 360, 361, 362, 363, 364, 366, 367, 368, + 369, 370, 372, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, + 391, 393, 394, 395, 396, 397, 398, 400, 401, 402, + + 403, 403, 403, 403, 403, 404, 406, 408, 410, 411, + 412, 413, 414, 415, 416, 418, 420, 421, 423, 424, + 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 441, 442, 443, 444, 445, 446, + 447, 448, 449, 451, 453, 454, 455, 456, 458, 459, + 460, 461, 462, 464, 466, 468, 469, 471, 473, 475, + 476, 478, 479, 480, 481, 483, 484, 485, 487, 488, + 489, 491, 493, 495, 497, 499, 501, 502, 503, 504, + 505, 506, 507, 509, 510, 511, 513, 515, 516, 518, + 519, 520, 521, 523, 524, 525, 526, 527, 528, 530, + + 531, 532, 534, 535, 536, 538, 539, 540, 542, 544, + 545, 547, 548, 549, 551, 553, 555, 557, 558, 559, + 561, 563, 564, 565, 567, 568, 569, 570, 571, 572, + 574, 576, 577, 578, 579, 580, 582, 582 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 8, 9, 10, 1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, + 23, 23, 23, 23, 23, 24, 24, 25, 26, 27, + 28, 29, 30, 1, 31, 31, 31, 31, 32, 33, + 34, 34, 34, 34, 34, 35, 34, 34, 34, 34, + 34, 34, 34, 34, 36, 34, 34, 37, 34, 34, + 38, 39, 40, 41, 42, 1, 43, 44, 45, 46, + + 47, 48, 49, 50, 51, 34, 52, 53, 54, 55, + 56, 57, 34, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[71] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 5, 6, 1, 1, 1, 1, 1, 3, + 6, 6, 6, 7, 7, 7, 7, 1, 3, 1, + 1, 7, 5, 5, 6, 6, 6, 5, 7, 7, + 7, 7, 7, 7, 8, 7, 7, 8, 7, 8, + 7, 8, 7, 8, 7, 7, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[450] = + { 0, + 0, 783, 70, 0, 140, 0, 789, 788, 208, 209, + 790, 794, 211, 794, 224, 761, 210, 760, 208, 748, + 794, 794, 758, 204, 794, 214, 224, 229, 238, 231, + 760, 794, 195, 756, 206, 794, 0, 228, 794, 794, + 755, 721, 723, 226, 212, 240, 230, 724, 216, 238, + 209, 239, 229, 732, 255, 260, 723, 252, 727, 794, + 244, 794, 794, 794, 794, 794, 0, 794, 729, 794, + 794, 0, 794, 794, 794, 794, 754, 317, 794, 324, + 330, 794, 272, 794, 216, 794, 794, 794, 300, 294, + 794, 794, 794, 794, 794, 758, 794, 753, 318, 794, + + 794, 794, 322, 354, 340, 374, 307, 303, 0, 382, + 312, 314, 794, 744, 794, 794, 794, 743, 0, 343, + 731, 794, 709, 721, 708, 723, 722, 709, 261, 702, + 707, 329, 333, 703, 700, 703, 700, 706, 696, 337, + 350, 700, 699, 699, 689, 704, 703, 357, 705, 360, + 692, 350, 369, 696, 692, 694, 687, 373, 685, 308, + 691, 794, 794, 0, 693, 0, 794, 414, 0, 794, + 408, 0, 794, 794, 422, 794, 426, 432, 794, 398, + 794, 794, 794, 684, 696, 691, 679, 677, 325, 409, + 688, 690, 690, 684, 684, 679, 675, 672, 680, 683, + + 0, 678, 668, 676, 676, 668, 669, 0, 672, 669, + 670, 0, 658, 657, 665, 651, 652, 658, 659, 654, + 647, 649, 651, 658, 644, 642, 642, 644, 641, 652, + 651, 641, 645, 635, 648, 650, 639, 640, 448, 479, + 450, 515, 452, 460, 425, 387, 0, 638, 0, 0, + 630, 628, 636, 625, 630, 624, 630, 628, 0, 0, + 633, 0, 622, 621, 618, 622, 0, 628, 628, 613, + 618, 0, 0, 613, 628, 617, 615, 625, 620, 615, + 606, 604, 605, 602, 614, 604, 608, 613, 612, 603, + 0, 422, 607, 599, 604, 591, 0, 591, 603, 594, + + 419, 0, 425, 0, 794, 0, 0, 606, 592, 593, + 598, 597, 596, 591, 0, 0, 586, 0, 594, 0, + 591, 592, 590, 579, 575, 578, 590, 572, 586, 585, + 569, 581, 572, 0, 580, 570, 572, 552, 561, 548, + 542, 538, 0, 0, 502, 513, 504, 0, 506, 507, + 490, 490, 503, 0, 0, 500, 0, 0, 0, 497, + 0, 500, 486, 498, 0, 493, 476, 0, 488, 476, + 0, 0, 0, 491, 0, 0, 472, 483, 476, 482, + 468, 467, 0, 476, 470, 0, 0, 474, 0, 470, + 456, 463, 0, 460, 448, 448, 459, 453, 0, 452, + + 452, 0, 450, 437, 0, 449, 445, 0, 0, 445, + 0, 432, 438, 0, 0, 0, 0, 419, 435, 0, + 0, 422, 407, 0, 403, 382, 366, 365, 339, 0, + 0, 302, 257, 238, 205, 0, 794, 563, 571, 579, + 587, 591, 595, 599, 605, 611, 615, 617, 619 + } ; + +static yyconst short int yy_def[450] = + { 0, + 437, 1, 437, 3, 437, 5, 438, 438, 439, 439, + 437, 437, 437, 437, 437, 437, 440, 437, 437, 441, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 442, 442, 437, 437, + 437, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 437, + 437, 437, 437, 437, 437, 437, 443, 437, 443, 437, + 437, 444, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 440, 437, 445, 437, 437, 437, 441, 446, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 447, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 442, 440, + 441, 437, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 437, 437, 443, 443, 444, 437, 440, 448, 437, + 441, 449, 437, 437, 437, 437, 437, 437, 437, 447, + 437, 437, 437, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 443, 440, 440, + 441, 441, 437, 437, 437, 437, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 443, + + 440, 240, 441, 242, 437, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 443, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 443, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 0, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437 + } ; + +static yyconst short int yy_nxt[865] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 12, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, + 37, 37, 37, 37, 38, 37, 37, 39, 12, 40, + 41, 37, 42, 43, 44, 45, 46, 47, 48, 37, + 49, 37, 50, 37, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 37, 37, 37, 60, 61, 62, 63, + 65, 65, 66, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + + 67, 67, 67, 67, 67, 67, 67, 65, 68, 65, + 65, 67, 67, 67, 67, 69, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 65, 65, 65, 65, + 70, 70, 71, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 72, 72, 72, 72, 72, 72, 72, 70, 70, 70, + 70, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + + 72, 72, 72, 72, 72, 72, 70, 70, 70, 70, + 76, 76, 78, 79, 80, 80, 80, 78, 84, 87, + 92, 114, 115, 77, 77, 80, 79, 81, 81, 81, + 80, 93, 94, 117, 118, 88, 120, 168, 168, 97, + 121, 95, 96, 98, 100, 99, 99, 99, 85, 101, + 103, 144, 110, 110, 110, 145, 102, 103, 129, 104, + 104, 105, 106, 140, 436, 111, 112, 130, 125, 106, + 141, 162, 107, 108, 109, 126, 131, 106, 127, 169, + 84, 128, 136, 111, 106, 137, 148, 138, 142, 149, + 107, 112, 132, 143, 133, 146, 435, 134, 108, 434, + + 147, 109, 159, 135, 151, 152, 155, 160, 190, 156, + 85, 163, 170, 191, 153, 171, 171, 154, 78, 79, + 80, 80, 80, 78, 157, 80, 79, 80, 80, 80, + 80, 80, 79, 81, 81, 81, 80, 179, 90, 99, + 99, 99, 179, 99, 99, 99, 433, 181, 181, 175, + 176, 84, 176, 175, 176, 179, 176, 172, 235, 103, + 236, 105, 105, 105, 175, 176, 181, 179, 175, 176, + 176, 106, 181, 103, 176, 104, 104, 105, 196, 194, + 432, 85, 204, 252, 253, 106, 106, 195, 107, 108, + 177, 205, 177, 197, 206, 178, 178, 178, 223, 215, + + 106, 103, 207, 110, 110, 110, 107, 216, 219, 208, + 220, 225, 217, 106, 108, 224, 111, 112, 231, 221, + 170, 305, 84, 232, 431, 430, 226, 84, 106, 241, + 241, 233, 245, 246, 111, 239, 239, 170, 243, 305, + 243, 429, 112, 244, 244, 244, 90, 178, 178, 178, + 245, 254, 85, 178, 178, 178, 84, 85, 246, 255, + 305, 428, 170, 90, 176, 427, 176, 341, 426, 301, + 301, 303, 303, 244, 244, 244, 342, 425, 424, 176, + 423, 244, 244, 244, 176, 305, 85, 84, 90, 422, + 421, 420, 176, 419, 176, 418, 417, 416, 415, 414, + + 302, 302, 302, 413, 412, 411, 410, 176, 409, 302, + 302, 302, 176, 408, 407, 406, 405, 85, 404, 403, + 402, 302, 302, 302, 302, 302, 302, 170, 401, 400, + 399, 398, 397, 396, 395, 394, 304, 304, 304, 393, + 392, 391, 390, 389, 388, 304, 304, 304, 387, 386, + 385, 384, 383, 90, 382, 381, 380, 304, 304, 304, + 304, 304, 304, 73, 73, 73, 73, 73, 73, 73, + 73, 75, 75, 75, 75, 75, 75, 75, 75, 83, + 379, 83, 83, 83, 83, 83, 83, 89, 378, 89, + 377, 89, 89, 89, 89, 119, 119, 119, 119, 164, + + 164, 164, 164, 166, 166, 166, 166, 83, 83, 83, + 376, 375, 83, 89, 89, 89, 374, 373, 89, 180, + 180, 240, 240, 242, 242, 372, 371, 370, 369, 368, + 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, + 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, + 347, 346, 345, 344, 343, 340, 339, 338, 337, 336, + 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, + 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, + 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, + 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, + + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, + 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, + 260, 259, 258, 257, 256, 251, 250, 249, 248, 247, + 238, 237, 234, 230, 229, 228, 227, 222, 218, 214, + 213, 212, 211, 210, 209, 203, 202, 201, 200, 199, + 198, 193, 192, 189, 188, 187, 186, 185, 184, 90, + 183, 182, 174, 173, 167, 165, 161, 158, 150, 139, + 124, 123, 122, 116, 113, 91, 90, 86, 82, 437, + 74, 74, 64, 11, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437 + } ; + +static yyconst short int yy_chk[865] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 9, 10, 13, 13, 13, 13, 13, 13, 17, 19, + 24, 33, 33, 9, 10, 15, 15, 15, 15, 15, + 15, 24, 26, 35, 35, 19, 38, 85, 85, 27, + 38, 26, 26, 27, 28, 27, 27, 27, 17, 28, + 30, 51, 30, 30, 30, 51, 28, 29, 45, 29, + 29, 29, 30, 49, 435, 30, 30, 45, 44, 29, + 49, 61, 29, 29, 29, 44, 45, 30, 44, 85, + 83, 44, 47, 30, 29, 47, 53, 47, 50, 53, + 29, 30, 46, 50, 46, 52, 434, 46, 29, 433, + + 52, 29, 58, 46, 55, 55, 56, 58, 129, 56, + 83, 61, 89, 129, 55, 90, 90, 55, 78, 78, + 78, 78, 78, 78, 56, 80, 80, 80, 80, 80, + 80, 81, 81, 81, 81, 81, 81, 108, 89, 99, + 99, 99, 107, 103, 103, 103, 432, 111, 112, 99, + 99, 120, 99, 103, 103, 108, 103, 90, 160, 105, + 160, 105, 105, 105, 99, 99, 112, 107, 103, 103, + 99, 105, 111, 104, 103, 104, 104, 104, 133, 132, + 429, 120, 140, 189, 189, 104, 105, 132, 104, 104, + 106, 140, 106, 133, 141, 106, 106, 106, 152, 148, + + 104, 110, 141, 110, 110, 110, 104, 148, 150, 141, + 150, 153, 148, 110, 104, 152, 110, 110, 158, 150, + 171, 246, 168, 158, 428, 427, 153, 301, 110, 171, + 171, 158, 180, 180, 110, 168, 168, 303, 175, 246, + 175, 426, 110, 175, 175, 175, 171, 177, 177, 177, + 180, 190, 168, 178, 178, 178, 239, 301, 180, 190, + 245, 425, 241, 303, 178, 423, 178, 292, 422, 239, + 239, 241, 241, 243, 243, 243, 292, 419, 418, 178, + 413, 244, 244, 244, 178, 245, 239, 240, 241, 412, + 410, 407, 244, 406, 244, 404, 403, 401, 400, 398, + + 240, 240, 240, 397, 396, 395, 394, 244, 392, 240, + 240, 240, 244, 391, 390, 388, 385, 240, 384, 382, + 381, 240, 240, 240, 240, 240, 240, 242, 380, 379, + 378, 377, 374, 370, 369, 367, 242, 242, 242, 366, + 364, 363, 362, 360, 356, 242, 242, 242, 353, 352, + 351, 350, 349, 242, 347, 346, 345, 242, 242, 242, + 242, 242, 242, 438, 438, 438, 438, 438, 438, 438, + 438, 439, 439, 439, 439, 439, 439, 439, 439, 440, + 342, 440, 440, 440, 440, 440, 440, 441, 341, 441, + 340, 441, 441, 441, 441, 442, 442, 442, 442, 443, + + 443, 443, 443, 444, 444, 444, 444, 445, 445, 445, + 339, 338, 445, 446, 446, 446, 337, 336, 446, 447, + 447, 448, 448, 449, 449, 335, 333, 332, 331, 330, + 329, 328, 327, 326, 325, 324, 323, 322, 321, 319, + 317, 314, 313, 312, 311, 310, 309, 308, 300, 299, + 298, 296, 295, 294, 293, 290, 289, 288, 287, 286, + 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, + 275, 274, 271, 270, 269, 268, 266, 265, 264, 263, + 261, 258, 257, 256, 255, 254, 253, 252, 251, 248, + 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, + + 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, + 218, 217, 216, 215, 214, 213, 211, 210, 209, 207, + 206, 205, 204, 203, 202, 200, 199, 198, 197, 196, + 195, 194, 193, 192, 191, 188, 187, 186, 185, 184, + 165, 161, 159, 157, 156, 155, 154, 151, 149, 147, + 146, 145, 144, 143, 142, 139, 138, 137, 136, 135, + 134, 131, 130, 128, 127, 126, 125, 124, 123, 121, + 118, 114, 98, 96, 77, 69, 59, 57, 54, 48, + 43, 42, 41, 34, 31, 23, 20, 18, 16, 11, + 8, 7, 2, 437, 437, 437, 437, 437, 437, 437, + + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 437, 437 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_expr_lval; +extern std::string cl_var_lval; + +bool setExprLexerInput(const std::string &in); +void cl_expr_lex_clean(); + +bool exprIsaTYPE(char *string); +bool exprIsaMACRO(char *string); +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(exprIsaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(exprIsaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_expr_lval = yytext;\ + return(x);} +#define PREPR 1 + +#define WRAP_PREP 2 + +#define CPP_COMMENT 3 + +#define C_COMMENT 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 794 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + BEGIN C_COMMENT; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{ + BEGIN CPP_COMMENT; + } + YY_BREAK +case 3: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 4: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 5: +YY_RULE_SETUP +{ + WHITE_RETURN('\n'); + } + YY_BREAK +case 6: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_AUTO);} + YY_BREAK +case 7: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_BREAK);} + YY_BREAK +case 8: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CASE);} + YY_BREAK +case 9: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CHAR);} + YY_BREAK +case 10: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONST);} + YY_BREAK +case 11: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONTINUE);} + YY_BREAK +case 12: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DEFAULT);} + YY_BREAK +case 13: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_DEFINE);} + YY_BREAK +case 14: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_OPDEFINED);} + YY_BREAK +case 15: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DO);} + YY_BREAK +case 16: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DOUBLE);} + YY_BREAK +case 17: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ELIF);} + YY_BREAK +case 18: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_ELSE);} + YY_BREAK +case 19: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ENDIF);} + YY_BREAK +case 20: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_ENUM);} + YY_BREAK +case 21: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ERROR);} + YY_BREAK +case 22: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_EXTERN);} + YY_BREAK +case 23: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FLOAT);} + YY_BREAK +case 24: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FOR);} + YY_BREAK +case 25: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_GOTO);} + YY_BREAK +case 26: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_IF);} + YY_BREAK +case 27: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFDEF);} + YY_BREAK +case 28: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFNDEF);} + YY_BREAK +case 29: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_INCLUDE); } + YY_BREAK +case 30: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_INT);} + YY_BREAK +case 31: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_LINE);} + YY_BREAK +case 32: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_LONG);} + YY_BREAK +case 33: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_PRAGMA);} + YY_BREAK +case 34: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_REGISTER);} + YY_BREAK +case 35: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_RETURN);} + YY_BREAK +case 36: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SHORT);} + YY_BREAK +case 37: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIGNED);} + YY_BREAK +case 38: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIZEOF);} + YY_BREAK +case 39: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STATIC);} + YY_BREAK +case 40: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STRUCT);} + YY_BREAK +case 41: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SWITCH);} + YY_BREAK +case 42: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_TYPEDEF);} + YY_BREAK +case 43: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_UNDEF);} + YY_BREAK +case 44: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNION);} + YY_BREAK +case 45: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNSIGNED);} + YY_BREAK +case 46: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOID);} + YY_BREAK +case 47: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOLATILE);} + YY_BREAK +case 48: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_WHILE);} + YY_BREAK +case 49: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CLASS);} + YY_BREAK +case 50: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NAMESPACE);} + YY_BREAK +case 51: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DELETE);} + YY_BREAK +case 52: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_FRIEND);} + YY_BREAK +case 53: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_INLINE);} + YY_BREAK +case 54: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NEW);} + YY_BREAK +case 55: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OPERATOR);} + YY_BREAK +case 56: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OVERLOAD);} + YY_BREAK +case 57: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PROTECTED);} + YY_BREAK +case 58: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PRIVATE);} + YY_BREAK +case 59: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PUBLIC);} + YY_BREAK +case 60: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_THIS);} + YY_BREAK +case 61: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_VIRTUAL);} + YY_BREAK +case 62: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TEMPLATE);} + YY_BREAK +case 63: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TYPENAME);} + YY_BREAK +case 64: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} + YY_BREAK +case 65: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_STATIC_CAST);} + YY_BREAK +case 66: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CONST_CAST);} + YY_BREAK +case 67: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} + YY_BREAK +case 68: +YY_RULE_SETUP +{IDENTIFIER_RETURN();} + YY_BREAK +case 69: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_INTEGERconstant);} + YY_BREAK +case 70: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_OCTALconstant);} + YY_BREAK +case 71: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_HEXconstant);} + YY_BREAK +case 72: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_FLOATINGconstant);} + YY_BREAK +case 73: +YY_RULE_SETUP +{ + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + YY_BREAK +case 74: +YY_RULE_SETUP +{ + LITERAL_RETURN(LE_STRINGliteral);} + YY_BREAK +case 75: +YY_RULE_SETUP +{PPOP_RETURN(LE_LP);} + YY_BREAK +case 76: +YY_RULE_SETUP +{PPOP_RETURN(LE_RP);} + YY_BREAK +case 77: +YY_RULE_SETUP +{PPOP_RETURN(LE_COMMA);} + YY_BREAK +case 78: +YY_RULE_SETUP +{BEGIN PREPR;} + YY_BREAK +case 79: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LC);} + YY_BREAK +case 80: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RC);} + YY_BREAK +case 81: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LB);} + YY_BREAK +case 82: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RB);} + YY_BREAK +case 83: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DOT);} + YY_BREAK +case 84: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_AND);} + YY_BREAK +case 85: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_STAR);} + YY_BREAK +case 86: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PLUS);} + YY_BREAK +case 87: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MINUS);} + YY_BREAK +case 88: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NEGATE);} + YY_BREAK +case 89: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NOT);} + YY_BREAK +case 90: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DIV);} + YY_BREAK +case 91: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MOD);} + YY_BREAK +case 92: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LT);} + YY_BREAK +case 93: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_GT);} + YY_BREAK +case 94: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_XOR);} + YY_BREAK +case 95: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PIPE);} + YY_BREAK +case 96: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_QUESTION);} + YY_BREAK +case 97: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_COLON);} + YY_BREAK +case 98: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_SEMICOLON);} + YY_BREAK +case 99: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_ASSIGN);} + YY_BREAK +case 100: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DOTstar);} + YY_BREAK +case 101: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_CLCL);} + YY_BREAK +case 102: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROW);} + YY_BREAK +case 103: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROWstar);} + YY_BREAK +case 104: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ICR);} + YY_BREAK +case 105: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DECR);} + YY_BREAK +case 106: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LS);} + YY_BREAK +case 107: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RS);} + YY_BREAK +case 108: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LE);} + YY_BREAK +case 109: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_GE);} + YY_BREAK +case 110: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_EQ);} + YY_BREAK +case 111: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_NE);} + YY_BREAK +case 112: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDAND);} + YY_BREAK +case 113: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_OROR);} + YY_BREAK +case 114: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MULTassign);} + YY_BREAK +case 115: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DIVassign);} + YY_BREAK +case 116: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MODassign);} + YY_BREAK +case 117: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_PLUSassign);} + YY_BREAK +case 118: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MINUSassign);} + YY_BREAK +case 119: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LSassign);} + YY_BREAK +case 120: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RSassign);} + YY_BREAK +case 121: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDassign);} + YY_BREAK +case 122: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ERassign);} + YY_BREAK +case 123: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ORassign);} + YY_BREAK +case 124: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ELLIPSIS);} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PREPR): +case YY_STATE_EOF(WRAP_PREP): +case YY_STATE_EOF(CPP_COMMENT): +case YY_STATE_EOF(C_COMMENT): +{ + //reset lexer + yyterminate(); + } + YY_BREAK +case 125: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 126: +YY_RULE_SETUP +{ + defineFound = false; + BEGIN INITIAL; + } + YY_BREAK +case 127: +YY_RULE_SETUP +{ + BEGIN WRAP_PREP; + } + YY_BREAK +case 128: +YY_RULE_SETUP +{ + defineFound = true; + } + YY_BREAK +case 129: +YY_RULE_SETUP +{ + BEGIN PREPR; + } + YY_BREAK +case 130: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + } + } + YY_BREAK +case 131: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + } + } + YY_BREAK +case 132: +YY_RULE_SETUP +{} + YY_BREAK +case 133: +YY_RULE_SETUP +{} + YY_BREAK +case 134: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 135: +YY_RULE_SETUP +{} + YY_BREAK +case 136: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 137: +YY_RULE_SETUP +{} + YY_BREAK +case 138: +YY_RULE_SETUP +ECHO; + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 438 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 437); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +bool exprIsaTYPE(char *string) +{ + return false; +} + +bool exprIsaMACRO(char *string) +{ + return false; +} + +void cl_expr_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_expr_lineno = 1; +} + +/*******************************************************************/ +bool setExprLexerInput(const std::string &in) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap() +{ + return 1; +} diff --git a/CxxParser/cpp_expr_parser.cpp b/CxxParser/cpp_expr_parser.cpp new file mode 100644 index 0000000000..694271de4b --- /dev/null +++ b/CxxParser/cpp_expr_parser.cpp @@ -0,0 +1,878 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_expr_parse +#define yylex cl_expr_lex +#define yyerror cl_expr_error +#define yychar cl_expr_char +#define yyval cl_expr_val +#define yylval cl_expr_lval +#define yydebug cl_expr_debug +#define yynerrs cl_expr_nerrs +#define yyerrflag cl_expr_errflag +#define yyss cl_expr_ss +#define yyssp cl_expr_ssp +#define yyvs cl_expr_vs +#define yyvsp cl_expr_vsp +#define yylhs cl_expr_lhs +#define yylen cl_expr_len +#define yydefred cl_expr_defred +#define yydgoto cl_expr_dgoto +#define yysindex cl_expr_sindex +#define yyrindex cl_expr_rindex +#define yygindex cl_expr_gindex +#define yytable cl_expr_table +#define yycheck cl_expr_check +#define yyname cl_expr_name +#define yyrule cl_expr_rule +#define YYPREFIX "cl_expr_" + +/* Copyright Eran Ifrah(c)*/ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "expression_result.h" + +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +void cl_expr_error(char *string); + +static ExpressionResult result; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_expr_text; +extern int cl_expr_lex(); +extern int cl_expr_parse(); +extern int cl_expr_lineno; +extern std::vector currentScope; +extern bool setExprLexerInput(const std::string &in); +extern void cl_expr_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_expr_lhs[] = { -1, + 0, 0, 3, 1, 1, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, + 7, 7, 2, 2, 2, 2, 2, 2, 2, 13, + 13, 14, 14, 11, 11, 11, 11, 15, 15, 16, + 16, 9, 10, 10, 10, 12, 12, 8, 8, 17, +}; +short cl_expr_len[] = { 2, + 0, 2, 0, 2, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 3, 4, + 4, 6, 6, 2, 3, 3, 6, 8, 5, 0, + 3, 0, 1, 1, 1, 1, 1, 0, 1, 0, + 2, 2, 0, 1, 1, 6, 3, 0, 2, 2, +}; +short cl_expr_defred[] = { 1, + 0, 5, 2, 0, 44, 45, 4, 0, 24, 34, + 35, 36, 37, 0, 0, 0, 0, 48, 0, 0, + 25, 26, 0, 49, 48, 0, 0, 40, 50, 0, + 0, 0, 40, 0, 47, 0, 0, 7, 48, 0, + 18, 33, 29, 0, 0, 0, 41, 39, 42, 27, + 0, 0, 31, 23, 0, 40, 13, 8, 11, 9, + 12, 10, 15, 14, 16, 0, 40, 19, 28, 46, + 0, 20, 21, 0, 22, +}; +short cl_expr_dgoto[] = { 1, + 3, 7, 4, 39, 67, 40, 41, 19, 35, 8, + 17, 20, 31, 43, 49, 36, 24, +}; +short cl_expr_sindex[] = { 0, + -254, 0, 0, 21, 0, 0, 0, -25, 0, 0, + 0, 0, 0, -17, -230, -274, -12, 0, -272, -4, + 0, 0, -60, 0, 0, 27, -57, 0, 0, -227, + 32, 12, 0, -227, 0, 29, -226, 0, 0, -34, + 0, 0, 0, 45, -219, -32, 0, 0, 0, 0, + -225, -227, 0, 0, 47, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -56, 0, 0, 0, 0, + -227, 0, 0, 13, 0, +}; +short cl_expr_rindex[] = { 0, + -33, 0, 0, -29, 0, 0, 0, -214, 0, 0, + 0, 0, 0, -214, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, -6, 0, 0, -38, + 5, 0, 0, -38, 0, -23, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -193, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -22, 0, 0, 0, 0, + -38, 0, 0, 0, 0, +}; +short cl_expr_gindex[] = { 0, + 0, 0, 0, 0, 0, -26, 38, 19, -14, 0, + 0, 44, 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 350 +short cl_expr_table[] = { 30, + 30, 2, 34, 71, 32, 17, 3, 46, 3, 52, + 43, 52, 43, 37, 14, 40, 15, 38, 45, 40, + 38, 40, 18, 17, 3, 3, 16, 53, 23, 56, + 27, 40, 57, 58, 40, 40, 28, 59, 38, 40, + 30, 70, 30, 60, 74, 38, 32, 25, 61, 62, + 63, 72, 73, 64, 65, 40, 52, 51, 30, 30, + 21, 26, 32, 32, 6, 6, 48, 33, 32, 6, + 47, 42, 22, 44, 75, 6, 50, 66, 6, 5, + 6, 6, 6, 55, 54, 6, 6, 69, 48, 68, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 6, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 6, 6, 6, 0, 0, + 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 30, 3, 0, 0, + 32, 43, 0, 0, 6, 9, 0, 29, 0, 3, + 29, 29, 0, 43, 0, 0, 0, 0, 0, 38, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 0, 0, 0, 32, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 32, 3, 3, + 3, 3, 43, 43, 43, 43, 10, 11, 12, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 30, 30, 30, 30, 32, 32, 32, 32, +}; +short cl_expr_check[] = { 60, + 0, 256, 60, 60, 0, 44, 40, 34, 42, 44, + 40, 44, 42, 28, 40, 38, 42, 41, 33, 42, + 44, 44, 40, 62, 58, 59, 8, 62, 303, 62, + 303, 38, 258, 259, 41, 42, 41, 263, 62, 62, + 40, 56, 42, 269, 71, 273, 42, 60, 274, 275, + 276, 66, 67, 279, 280, 62, 44, 39, 58, 59, + 291, 18, 58, 59, 258, 259, 38, 41, 25, 263, + 42, 40, 303, 62, 62, 269, 303, 303, 58, 59, + 274, 275, 276, 303, 40, 279, 280, 41, 303, 52, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 303, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, -1, + 269, -1, -1, -1, -1, 274, 275, 276, -1, -1, + 279, 280, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 256, 291, -1, -1, + 256, 291, -1, -1, 303, 291, -1, 328, -1, 303, + 328, 328, -1, 303, -1, -1, -1, -1, -1, 303, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 291, -1, -1, -1, 291, -1, -1, -1, -1, + -1, -1, -1, 303, -1, -1, -1, 303, 342, 343, + 344, 345, 342, 343, 344, 345, 342, 343, 344, 345, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 342, 343, 344, 345, 342, 343, 344, 345, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_expr_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'", +"'<'",0,"'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG", +"LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR", +"LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT", +"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT", +"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE", +"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC", +"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD", +"LE_TEMPLATE","LE_TYPENAME","LE_IDENTIFIER","LE_STRINGliteral", +"LE_FLOATINGconstant","LE_INTEGERconstant","LE_CHARACTERconstant", +"LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND","LE_CComment", +"LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname","LE_ARROW","LE_ICR", +"LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE","LE_ANDAND","LE_OROR", +"LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar","LE_MULTassign", +"LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign","LE_LSassign", +"LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign","LE_MACRO", +"LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST","LE_REINTERPRET_CAST", +}; +char *cl_expr_rule[] = { +"$accept : translation_unit", +"translation_unit :", +"translation_unit : translation_unit primary_expr", +"$$1 :", +"primary_expr : $$1 simple_expr", +"primary_expr : error", +"const_spec :", +"const_spec : LE_CONST", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"parameter_list :", +"parameter_list : template_parameter", +"parameter_list : parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +"simple_expr : stmnt_starter special_cast '<' cast_type '>' '('", +"simple_expr : stmnt_starter LE_THIS", +"simple_expr : stmnt_starter '*' LE_THIS", +"simple_expr : stmnt_starter '*' LE_IDENTIFIER", +"simple_expr : stmnt_starter '(' cast_type ')' special_star_amp LE_IDENTIFIER", +"simple_expr : stmnt_starter '(' '(' cast_type ')' special_star_amp LE_IDENTIFIER ')'", +"simple_expr : stmnt_starter nested_scope_specifier LE_IDENTIFIER optional_template_init_list optinal_postifx", +"optional_template_init_list :", +"optional_template_init_list : '<' parameter_list '>'", +"optinal_postifx :", +"optinal_postifx : '('", +"special_cast : LE_DYNAMIC_CAST", +"special_cast : LE_STATIC_CAST", +"special_cast : LE_CONST_CAST", +"special_cast : LE_REINTERPRET_CAST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"cast_type : nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp", +"cast_type : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + + +void expr_FuncArgList() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +void expr_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +void expr_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +ExpressionResult &parse_expression(const std::string &in) +{ + result.Reset(); + //provide the lexer with new input + if( !setExprLexerInput(in) ){ + return result; + } + + //printf("parsing...\n"); + cl_expr_parse(); + //do the lexer cleanup + cl_expr_lex_clean(); + + return result; +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 3: +{result.Reset();} +break; +case 5: +{ + yyclearin; /*clear lookahead token*/ + yyerrok; + /*fprintf(stderr, "CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_expr_text, cl_expr_lineno);*/ + /*fflush(stderr);*/ + expr_syncParser(); + } +break; +case 6: +{yyval = ""; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 10: +{ yyval = yyvsp[0]; } +break; +case 11: +{ yyval = yyvsp[0]; } +break; +case 12: +{ yyval = yyvsp[0]; } +break; +case 13: +{ yyval = yyvsp[0]; } +break; +case 14: +{ yyval = yyvsp[0]; } +break; +case 15: +{ yyval = yyvsp[0]; } +break; +case 16: +{ yyval = yyvsp[0]; } +break; +case 17: +{yyval = "";} +break; +case 18: +{yyval = yyvsp[0];} +break; +case 19: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 20: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 21: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 22: +{yyval = yyvsp[-5] + " " + yyvsp[-4] + " " + yyvsp[-3] +yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 23: +{ + expr_FuncArgList(); + yyval = yyvsp[-2]; + result.m_isaType = true; + result.m_name = yyvsp[-2]; + result.m_isFunc = false; + printf("Rule 1\n"); + /*result.Print();*/ + } +break; +case 24: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = true; + result.m_isPtr = true; + /*result.Print();*/ + } +break; +case 25: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = true; + /*result.Print();*/ + } +break; +case 26: +{ + yyval = yyvsp[0]; + result.m_isaType = false; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + result.m_isPtr = false; + /*result.Print();*/ + } +break; +case 27: +{ + yyval = yyvsp[-3]; + result.m_isaType = true; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + /*result.Print();*/ + } +break; +case 28: +{ + yyval = yyvsp[-4]; + result.m_isaType = true; + result.m_name = yyval; + result.m_isFunc = false; + result.m_isThis = false; + /*result.Print();*/ + } +break; +case 29: +{ + result.m_isaType = false; + result.m_name = yyvsp[-2]; + result.m_isThis = false; + yyvsp[-3].erase(yyvsp[-3].find_last_not_of(":")+1); + result.m_scope = yyvsp[-3]; + result.m_isTemplate = yyvsp[-1].empty() ? false : true; + result.m_templateInitList = yyvsp[-1]; + /*result.Print();*/ + } +break; +case 30: +{yyval = "";} +break; +case 31: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = "";} +break; +case 33: +{ + yyval = yyvsp[0]; + expr_FuncArgList(); + result.m_isFunc = true; + } +break; +case 34: +{yyval = yyvsp[0];} +break; +case 35: +{yyval = yyvsp[0];} +break; +case 36: +{yyval = yyvsp[0];} +break; +case 37: +{yyval = yyvsp[0];} +break; +case 38: +{yyval = ""; } +break; +case 39: +{ yyval = yyvsp[0]; } +break; +case 40: +{yyval = ""; } +break; +case 41: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 42: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 43: +{yyval = "";} +break; +case 44: +{ yyval = ";";} +break; +case 45: +{ yyval = ":";} +break; +case 46: +{ + yyval = yyvsp[-5] + yyvsp[-4]; + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + result.m_scope = yyvsp[-5]; + result.m_name = yyvsp[-4]; + result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);; + result.m_isTemplate = true; + result.m_templateInitList = yyvsp[-3] + yyvsp[-2] + yyvsp[-1]; + } +break; +case 47: +{ + yyval = yyvsp[-2] + yyvsp[-1]; + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + result.m_scope = yyvsp[-2]; + result.m_name = yyvsp[-1]; + result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);; + } +break; +case 48: +{yyval = "";} +break; +case 49: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 50: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CxxParser/cpp_func_parser.cpp b/CxxParser/cpp_func_parser.cpp new file mode 100644 index 0000000000..66c58a1bb0 --- /dev/null +++ b/CxxParser/cpp_func_parser.cpp @@ -0,0 +1,913 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_func_parse +#define yylex cl_func_lex +#define yyerror cl_func_error +#define yychar cl_func_char +#define yyval cl_func_val +#define yylval cl_func_lval +#define yydebug cl_func_debug +#define yynerrs cl_func_nerrs +#define yyerrflag cl_func_errflag +#define yyss cl_func_ss +#define yyssp cl_func_ssp +#define yyvs cl_func_vs +#define yyvsp cl_func_vsp +#define yylhs cl_func_lhs +#define yylen cl_func_len +#define yydefred cl_func_defred +#define yydgoto cl_func_dgoto +#define yysindex cl_func_sindex +#define yyrindex cl_func_rindex +#define yygindex cl_func_gindex +#define yytable cl_func_table +#define yycheck cl_func_check +#define yyname cl_func_name +#define yyrule cl_func_rule +#define YYPREFIX "cl_func_" + +/* Copyright Eran Ifrah(c)*/ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "function.h" + +#define YYDEBUG_LEXER_TEXT (cl_func_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +#ifdef yylex +#undef yylex +#define yylex cl_scope_lex +#endif + +int cl_func_parse(); +void cl_func_error(char *string); + +static FunctionList *g_funcs = NULL; +static clFunction curr_func; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_func_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern void cl_scope_lex_clean(); + + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_func_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 4, 2, 2, 5, 5, 7, 7, 6, 6, + 8, 8, 9, 9, 9, 10, 14, 14, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 19, + 3, 21, 21, 12, 12, 20, 20, 22, 23, 22, + 17, 17, 11, 11, 24, 24, 25, 25, 13, 16, + 16, 16, 18, 18, 18, +}; +short cl_func_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 0, 2, 1, 0, 2, 1, 3, 1, 1, + 0, 4, 0, 1, 3, 4, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 1, 1, 1, 0, + 12, 1, 1, 0, 2, 0, 2, 2, 0, 4, + 0, 1, 0, 1, 0, 1, 0, 2, 2, 0, + 1, 1, 3, 3, 6, +}; +short cl_func_defred[] = { 10, + 0, 14, 11, 0, 81, 82, 13, 0, 0, 0, + 0, 72, 0, 19, 20, 17, 0, 0, 74, 64, + 16, 0, 22, 0, 64, 18, 6, 1, 4, 2, + 5, 3, 8, 7, 9, 0, 77, 65, 0, 68, + 0, 84, 0, 83, 0, 0, 0, 0, 24, 64, + 0, 78, 76, 79, 57, 58, 45, 49, 50, 41, + 42, 51, 52, 53, 54, 43, 44, 48, 46, 59, + 39, 40, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 47, 0, 0, 28, 69, 60, 0, 77, + 0, 70, 55, 56, 0, 25, 85, 0, 0, 26, + 0, 0, 67, 62, 63, 61, +}; +short cl_func_dgoto[] = { 1, + 37, 3, 7, 4, 16, 17, 18, 10, 48, 49, + 50, 24, 42, 47, 86, 8, 13, 25, 95, 102, + 106, 38, 51, 54, 43, +}; +short cl_func_sindex[] = { 0, + -219, 0, 0, -27, 0, 0, 0, -263, -16, -243, + -212, 0, -211, 0, 0, 0, -236, 4, 0, 0, + 0, -212, 0, -163, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -59, 0, 0, -221, 0, + -211, 0, 59, 0, -33, -58, 29, 13, 0, 0, + -254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 36, -4, 0, 0, 0, -211, 0, + -209, 0, 0, 0, -211, 0, 0, -58, 38, 0, + -201, -51, 0, 0, 0, 0, +}; +short cl_func_rindex[] = { 0, + -39, 0, 0, -233, 0, 0, 0, -224, 0, -171, + 16, 0, -138, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -21, 0, 0, 0, 0, + -29, 0, -38, 0, 0, 70, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -189, 0, + 0, 0, 0, 0, -43, 0, 0, 21, -37, 0, + 0, 0, 0, 0, 0, 0, +}; +short cl_func_gindex[] = { 0, + 0, 0, 0, 0, 93, 0, 0, 0, 0, 30, + -10, 3, -14, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 299 +short cl_func_table[] = { 82, + 41, 87, 20, 77, 79, 75, 84, 105, 75, 73, + 70, 74, 83, 76, 23, 73, 77, 73, 12, 12, + 77, 66, 44, 75, 80, 80, 71, 39, 72, 80, + 6, 5, 23, 21, 21, 80, 2, 9, 21, 80, + 80, 80, 80, 11, 21, 80, 80, 22, 21, 21, + 21, 21, 91, 12, 21, 21, 89, 85, 77, 15, + 78, 19, 77, 80, 77, 23, 21, 80, 88, 80, + 45, 104, 21, 92, 90, 97, 93, 15, 21, 73, + 14, 46, 77, 100, 99, 66, 71, 71, 94, 15, + 80, 71, 81, 98, 27, 28, 53, 71, 101, 29, + 52, 71, 71, 71, 71, 30, 103, 71, 71, 27, + 31, 32, 33, 73, 26, 34, 35, 0, 96, 73, + 73, 0, 0, 0, 73, 0, 0, 0, 0, 0, + 73, 71, 0, 0, 0, 73, 73, 73, 0, 36, + 73, 73, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, + 0, 0, 0, 12, 0, 0, 0, 0, 0, 12, + 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 75, 0, 55, 56, 12, 0, 0, + 0, 12, 0, 12, 75, 0, 0, 0, 40, 40, + 77, 0, 0, 73, 0, 0, 0, 0, 0, 0, + 0, 77, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 0, 68, 69, 0, 69, +}; +short cl_func_check[] = { 33, + 60, 60, 13, 37, 38, 44, 40, 59, 42, 43, + 44, 45, 46, 47, 44, 59, 38, 61, 58, 59, + 42, 59, 37, 62, 258, 259, 60, 25, 62, 263, + 58, 59, 62, 258, 259, 269, 256, 301, 263, 273, + 274, 275, 276, 60, 269, 279, 280, 44, 273, 274, + 275, 276, 50, 297, 279, 280, 44, 91, 38, 44, + 94, 273, 42, 297, 44, 62, 303, 301, 40, 303, + 292, 123, 297, 328, 62, 90, 41, 62, 303, 123, + 293, 303, 62, 98, 95, 123, 258, 259, 93, 302, + 124, 263, 126, 303, 258, 259, 38, 269, 61, 263, + 42, 273, 274, 275, 276, 269, 308, 279, 280, 40, + 274, 275, 276, 303, 22, 279, 280, -1, 89, 258, + 259, -1, -1, -1, 263, -1, -1, -1, -1, -1, + 269, 303, -1, -1, -1, 274, 275, 276, -1, 303, + 279, 280, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 303, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 258, 259, + -1, -1, -1, 263, -1, -1, -1, -1, -1, 269, + -1, -1, -1, 273, 274, 275, 276, -1, -1, 279, + 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 292, -1, 289, 290, 297, -1, -1, + -1, 301, -1, 303, 303, -1, -1, -1, 328, 328, + 292, -1, -1, 303, -1, -1, -1, -1, -1, -1, + -1, 303, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, -1, -1, 329, 330, -1, 328, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_func_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,0, +0,0,0,0,0,0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,"'{'","'|'",0,"'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE", +"LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE", +"LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN","LE_RETURN", +"LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED","LE_CONTINUE", +"LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF","LE_VOLATILE", +"LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE","LE_THIS", +"LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL", +"LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME", +"LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant", +"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND", +"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname", +"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE", +"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar", +"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign", +"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign", +"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST", +"LE_REINTERPRET_CAST", +}; +char *cl_func_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"$$1 :", +"external_decl : $$1 function_decl", +"external_decl : error", +"template_arg :", +"template_arg : template_specifiter LE_IDENTIFIER", +"template_arg_list : template_arg", +"template_arg_list : template_arg_list ',' template_arg", +"template_specifiter : LE_CLASS", +"template_specifiter : LE_TYPENAME", +"opt_template_qualifier :", +"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'", +"template_parameter_list :", +"template_parameter_list : template_parameter", +"template_parameter_list : template_parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"func_name : LE_IDENTIFIER", +"func_name : LE_OPERATOR any_operator", +"any_operator : '+'", +"any_operator : '-'", +"any_operator : '*'", +"any_operator : '/'", +"any_operator : '%'", +"any_operator : '^'", +"any_operator : '&'", +"any_operator : '|'", +"any_operator : '~'", +"any_operator : '!'", +"any_operator : '<'", +"any_operator : '>'", +"any_operator : LE_LS", +"any_operator : LE_RS", +"any_operator : LE_ANDAND", +"any_operator : LE_OROR", +"any_operator : LE_ARROW", +"any_operator : LE_ARROWstar", +"any_operator : '.'", +"any_operator : LE_DOTstar", +"any_operator : LE_ICR", +"any_operator : LE_DECR", +"any_operator : LE_LE", +"any_operator : LE_GE", +"any_operator : LE_EQ", +"any_operator : LE_NE", +"any_operator : '(' ')'", +"any_operator : '[' ']'", +"any_operator : LE_NEW", +"any_operator : LE_DELETE", +"any_operator : ','", +"$$2 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$2 const_spec opt_pure_virtual func_postfix", +"func_postfix : '{'", +"func_postfix : ';'", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"opt_pure_virtual :", +"opt_pure_virtual : '=' LE_OCTALconstant", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"$$3 :", +"scope_specifier : LE_IDENTIFIER '<' $$3 LE_CLCL", +"virtual_spec :", +"virtual_spec : LE_VIRTUAL", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"variable_decl : nested_scope_specifier basic_type_name special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + +void func_consumeFuncArgList() +{ + curr_func.m_signature = "("; + + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch == 0) + { + break; + } + + curr_func.m_signature += cl_func_lval; + curr_func.m_signature += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void func_consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void func_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +void get_functions(const std::string &in, FunctionList &li, const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ) + { + return; + } + + g_funcs = &li; + + //call tghe main parsing routine + cl_func_parse(); + g_funcs = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 12: +{curr_func.Reset();} +break; +case 14: +{ + /*printf("CodeLite: syntax error, unexpected token '%s' found\n", cl_func_lval.c_str());*/ + } +break; +case 15: +{ yyval = "";} +break; +case 16: +{yyval = yyvsp[-1] + " " + yyvsp[0];} +break; +case 17: +{ yyval = yyvsp[0]; } +break; +case 18: +{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; } +break; +case 19: +{ yyval = yyvsp[0]; } +break; +case 20: +{ yyval = yyvsp[0]; } +break; +case 22: +{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 23: +{yyval = "";} +break; +case 24: +{yyval = yyvsp[0];} +break; +case 25: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 26: +{yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];} +break; +case 27: +{yyval = yyvsp[0];} +break; +case 28: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 60: +{func_consumeFuncArgList();} +break; +case 61: +{ + /*trim down trailing '::' from scope name*/ + yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1); + curr_func.m_name = yyvsp[-5]; + curr_func.m_scope = yyvsp[-6]; + curr_func.m_retrunValusConst = yyvsp[-8]; + curr_func.m_lineno = cl_scope_lineno; + if(g_funcs) + { + g_funcs->push_back(curr_func); + } + curr_func.Reset(); + } +break; +case 64: +{yyval = "";} +break; +case 65: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 68: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; +case 69: +{func_consumeTemplateDecl();} +break; +case 70: +{yyval = yyvsp[-3] + yyvsp[0];} +break; +case 71: +{yyval = ""; } +break; +case 72: +{ yyval = yyvsp[0]; } +break; +case 73: +{yyval = ""; } +break; +case 74: +{ yyval = yyvsp[0]; } +break; +case 75: +{yyval = ""; } +break; +case 76: +{ yyval = yyvsp[0]; } +break; +case 77: +{yyval = ""; } +break; +case 78: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 79: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 80: +{yyval = "";} +break; +case 81: +{ yyval = ";";} +break; +case 82: +{ yyval = ":";} +break; +case 83: +{ + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-1]; + curr_func.m_returnValue.m_typeScope = yyvsp[-2]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0]; + } +break; +case 84: +{ + yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-1]; + curr_func.m_returnValue.m_typeScope = yyvsp[-2]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ; + } +break; +case 85: +{ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = yyvsp[-4]; + curr_func.m_returnValue.m_typeScope = yyvsp[-5]; + curr_func.m_returnValue.m_starAmp = yyvsp[0]; + curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1); + curr_func.m_returnValue.m_isTemplate = true; + curr_func.m_returnValue.m_templateDecl = yyvsp[-2]; + yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ; + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CxxParser/cpp_func_parser.y b/CxxParser/cpp_func_parser.y new file mode 100644 index 0000000000..49cb2b605c --- /dev/null +++ b/CxxParser/cpp_func_parser.y @@ -0,0 +1,378 @@ +%{ +// Copyright Eran Ifrah(c) +%} + +%{ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "function.h" + +#define YYDEBUG_LEXER_TEXT (cl_func_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +#ifdef yylex +#undef yylex +#define yylex cl_scope_lex +#endif + +int cl_func_parse(); +void cl_func_error(char *string); + +static FunctionList *g_funcs = NULL; +static clFunction curr_func; + +//--------------------------------------------- +// externs defined in the lexer +//--------------------------------------------- +extern char *cl_func_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern void cl_scope_lex_clean(); + + +/*************** Standard ytab.c continues here *********************/ +%} + +/*************************************************************************/ + +/* This group is used by the C/C++ language parser */ +%token LE_AUTO LE_DOUBLE LE_INT LE_STRUCT +%token LE_BREAK LE_ELSE LE_LONG LE_SWITCH +%token LE_CASE LE_ENUM LE_REGISTER LE_TYPEDEF +%token LE_CHAR LE_EXTERN LE_RETURN LE_UNION +%token LE_CONST LE_FLOAT LE_SHORT LE_UNSIGNED +%token LE_CONTINUE LE_FOR LE_SIGNED LE_VOID +%token LE_DEFAULT LE_GOTO LE_SIZEOF LE_VOLATILE +%token LE_DO LE_IF LE_STATIC LE_WHILE + +/* The following are used in C++ only. ANSI C would call these IDENTIFIERs */ +%token LE_NEW LE_DELETE +%token LE_THIS +%token LE_OPERATOR +%token LE_CLASS +%token LE_PUBLIC LE_PROTECTED LE_PRIVATE +%token LE_VIRTUAL LE_FRIEND +%token LE_INLINE LE_OVERLOAD +%token LE_TEMPLATE LE_TYPENAME + +/* ANSI C Grammar suggestions */ +%token LE_IDENTIFIER LE_STRINGliteral +%token LE_FLOATINGconstant LE_INTEGERconstant LE_CHARACTERconstant +%token LE_OCTALconstant LE_HEXconstant +%token LE_POUNDPOUND LE_CComment LE_CPPComment LE_NAMESPACE LE_USING + +/* New Lexical element, whereas ANSI C suggested non-terminal */ +%token LE_TYPEDEFname + +/* Multi-Character operators */ +%token LE_ARROW /* -> */ +%token LE_ICR LE_DECR /* ++ -- */ +%token LE_LS LE_RS /* << >> */ +%token LE_LE LE_GE LE_EQ LE_NE /* <= >= == != */ +%token LE_ANDAND LE_OROR /* && || */ +%token LE_ELLIPSIS /* ... */ + /* Following are used in C++, not ANSI C */ +%token LE_CLCL /* :: */ +%token LE_DOTstar LE_ARROWstar /* .* ->* */ + +/* modifying assignment operators */ +%token LE_MULTassign LE_DIVassign LE_MODassign /* *= /= %= */ +%token LE_PLUSassign LE_MINUSassign /* += -= */ +%token LE_LSassign LE_RSassign /* <<= >>= */ +%token LE_ANDassign LE_ERassign LE_ORassign /* &= ^= |= */ +%token LE_MACRO +%token LE_DYNAMIC_CAST +%token LE_STATIC_CAST +%token LE_CONST_CAST +%token LE_REINTERPRET_CAST + +%start translation_unit + +%% +/* Costants */ +basic_type_name: + LE_INT { $$ = $1; } + | LE_CHAR { $$ = $1; } + | LE_SHORT { $$ = $1; } + | LE_LONG { $$ = $1; } + | LE_FLOAT { $$ = $1; } + | LE_DOUBLE { $$ = $1; } + | LE_SIGNED { $$ = $1; } + | LE_UNSIGNED { $$ = $1; } + | LE_VOID { $$ = $1; } + ; + + +/* ========================================================================*/ +/* find declarations */ +/* ========================================================================*/ + +translation_unit : /*empty*/ + | translation_unit external_decl + ; + +external_decl : {curr_func.Reset();} function_decl + | error { + //printf("CodeLite: syntax error, unexpected token '%s' found\n", cl_func_lval.c_str()); + } + ; + +/*templates*/ +template_arg : /* empty */ { $$ = "";} + | template_specifiter LE_IDENTIFIER {$$ = $1 + " " + $2;} + ; + +template_arg_list : template_arg { $$ = $1; } + | template_arg_list ',' template_arg { $$ = $1 + " " + $2 + " " + $3; } + ; + +template_specifiter : LE_CLASS { $$ = $1; } + | LE_TYPENAME { $$ = $1; } + ; + +opt_template_qualifier : /*empty*/ + | LE_TEMPLATE '<' template_arg_list '>' { $$ = $1 + $2 + $3 + $4;} + ; + +/* the following rules are for template parameters no declarations! */ +template_parameter_list : /* empty */ {$$ = "";} + | template_parameter {$$ = $1;} + | template_parameter_list ',' template_parameter {$$ = $1 + $2 + $3;} + ; + +template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp {$$ = $1 + $2 + $3 +$4;} + ; + +func_name: LE_IDENTIFIER {$$ = $1;} + | LE_OPERATOR any_operator {$$ = $1 + $2;} + ; + +any_operator: + '+' + | '-' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '<' + | '>' + | LE_LS + | LE_RS + | LE_ANDAND + | LE_OROR + | LE_ARROW + | LE_ARROWstar + | '.' + | LE_DOTstar + | LE_ICR + | LE_DECR + | LE_LE + | LE_GE + | LE_EQ + | LE_NE + | '(' ')' + | '[' ']' + | LE_NEW + | LE_DELETE + | ',' + ; + +/* functions */ +function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' {func_consumeFuncArgList();} const_spec opt_pure_virtual func_postfix + { + //trim down trailing '::' from scope name + $6.erase($6.find_last_not_of(":")+1); + curr_func.m_name = $7; + curr_func.m_scope = $6; + curr_func.m_retrunValusConst = $4; + curr_func.m_lineno = cl_scope_lineno; + if(g_funcs) + { + g_funcs->push_back(curr_func); + } + curr_func.Reset(); + } + ; + +func_postfix: '{' + | ';' + ; + +nested_scope_specifier : /*empty*/ {$$ = "";} + | nested_scope_specifier scope_specifier { $$ = $1 + $2;} + ; + +opt_pure_virtual : /*empty*/ + | '=' LE_OCTALconstant + ; + +scope_specifier : LE_IDENTIFIER LE_CLCL {$$ = $1+ $2;} + | LE_IDENTIFIER '<' {func_consumeTemplateDecl();} LE_CLCL {$$ = $1 + $4;} + ; + +virtual_spec : /* empty */ {$$ = ""; } + | LE_VIRTUAL { $$ = $1; } + ; + +const_spec : /* empty */ {$$ = ""; } + | LE_CONST { $$ = $1; } + ; + +amp_item : /*empty*/ {$$ = ""; } + | '&' { $$ = $1; } + ; + +star_list : /*empty*/ {$$ = ""; } + | star_list '*' {$$ = $1 + $2;} + ; + +special_star_amp : star_list amp_item { $$ = $1 + $2; } + ; + +stmnt_starter : /*empty*/ {$$ = "";} + | ';' { $$ = ";";} + | ':' { $$ = ":";} //e.g. private: std::string m_name; + ; + +/** Variables **/ +variable_decl : nested_scope_specifier basic_type_name special_star_amp + { + $1.erase($1.find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = $2; + curr_func.m_returnValue.m_typeScope = $1; + curr_func.m_returnValue.m_starAmp = $3; + curr_func.m_returnValue.m_isPtr = ($3.find("*") != (size_t)-1); + $$ = $1 + $2 + $3; + } + | nested_scope_specifier LE_IDENTIFIER special_star_amp + { + $1.erase($1.find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = $2; + curr_func.m_returnValue.m_typeScope = $1; + curr_func.m_returnValue.m_starAmp = $3; + curr_func.m_returnValue.m_isPtr = ($3.find("*") != (size_t)-1); + $$ = $1 + $2 + $3 ; + } + | nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp + { + $1.erase($1.find_last_not_of(":")+1); + curr_func.m_returnValue.m_type = $2; + curr_func.m_returnValue.m_typeScope = $1; + curr_func.m_returnValue.m_starAmp = $6; + curr_func.m_returnValue.m_isPtr = ($6.find("*") != (size_t)-1); + curr_func.m_returnValue.m_isTemplate = true; + curr_func.m_returnValue.m_templateDecl = $4; + $$ = $1 + $2 + $3 + $4 + $5 + $6 ; + } + ; +%% +void yyerror(char *s) {} + +void func_consumeFuncArgList() +{ + curr_func.m_signature = "("; + + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch == 0) + { + break; + } + + curr_func.m_signature += cl_func_lval; + curr_func.m_signature += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void func_consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void func_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +void get_functions(const std::string &in, FunctionList &li, const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ) + { + return; + } + + g_funcs = &li; + + //call tghe main parsing routine + cl_func_parse(); + g_funcs = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} diff --git a/CxxParser/cpp_lexer.cpp b/CxxParser/cpp_lexer.cpp new file mode 100644 index 0000000000..481f26aa18 --- /dev/null +++ b/CxxParser/cpp_lexer.cpp @@ -0,0 +1,2711 @@ +#define yy_create_buffer cl_scope__create_buffer +#define yy_delete_buffer cl_scope__delete_buffer +#define yy_scan_buffer cl_scope__scan_buffer +#define yy_scan_string cl_scope__scan_string +#define yy_scan_bytes cl_scope__scan_bytes +#define yy_flex_debug cl_scope__flex_debug +#define yy_init_buffer cl_scope__init_buffer +#define yy_flush_buffer cl_scope__flush_buffer +#define yy_load_buffer_state cl_scope__load_buffer_state +#define yy_switch_to_buffer cl_scope__switch_to_buffer +#define yyin cl_scope_in +#define yyleng cl_scope_leng +#define yylex cl_scope_lex +#define yyout cl_scope_out +#define yyrestart cl_scope_restart +#define yytext cl_scope_text +#define yylineno cl_scope_lineno +#define yywrap cl_scope_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 139 +#define YY_END_OF_BUFFER 140 +static yyconst short int yy_acclist[592] = + { 0, + 140, 126, 139, 3, 126, 139, 5, 139, 4, 126, + 139, 90, 126, 139, 126, 139, 92, 126, 139, 85, + 126, 139, 126, 139, 76, 126, 139, 77, 126, 139, + 86, 126, 139, 87, 126, 139, 78, 126, 139, 88, + 126, 139, 84, 126, 139, 91, 126, 139, 71, 126, + 139, 70, 126, 139, 98, 126, 139, 99, 126, 139, + 93, 126, 139, 100, 126, 139, 94, 126, 139, 97, + 126, 139, 69, 126, 139, 69, 126, 139, 82, 126, + 139, 83, 126, 139, 95, 126, 139, 69, 126, 139, + 69, 126, 139, 69, 126, 139, 69, 126, 139, 69, + + 126, 139, 69, 126, 139, 69, 126, 139, 69, 126, + 139, 69, 126, 139, 69, 126, 139, 69, 126, 139, + 69, 126, 139, 69, 126, 139, 69, 126, 139, 69, + 126, 139, 69, 126, 139, 69, 126, 139, 69, 126, + 139, 80, 126, 139, 96, 126, 139, 81, 126, 139, + 89, 126, 139, 3, 126, 139, 79, 126, 139, 134, + 139, 127, 139, 132, 134, 139, 128, 134, 139, 132, + 134, 139, 133, 139, 130, 139, 131, 133, 139, 136, + 139, 135, 139, 138, 139, 139, 138, 139, 3, 5, + 4, 112, 75, 117, 113, 122, 115, 105, 118, 106, + + 119, 103, 101, 73, 1, 2, 116, 73, 71, 71, + 71, 70, 70, 70, 102, 107, 109, 111, 110, 108, + 69, 123, 69, 69, 69, 69, 69, 69, 69, 15, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 26, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 124, 114, 3, 79, 132, 132, + 131, 137, 74, 104, 125, 73, 73, 71, 72, 70, + 120, 121, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 24, + + 69, 69, 69, 69, 69, 69, 69, 30, 69, 69, + 69, 69, 54, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 132, 73, 72, 72, 6, 69, 69, 8, 69, 9, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 17, + 69, 18, 69, 69, 20, 69, 69, 69, 69, 69, + 25, 69, 69, 69, 69, 69, 31, 69, 32, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 60, 69, 69, + + 69, 69, 69, 69, 69, 46, 69, 69, 69, 132, + 72, 7, 69, 49, 69, 10, 69, 69, 69, 69, + 69, 69, 69, 19, 69, 21, 69, 69, 23, 69, + 69, 27, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 36, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 43, 69, 44, 69, + 69, 68, 69, 69, 69, 48, 69, 132, 69, 69, + 69, 13, 69, 51, 69, 16, 69, 69, 22, 69, + 52, 69, 28, 69, 69, 53, 69, 69, 69, 69, + 33, 69, 69, 69, 59, 69, 69, 69, 35, 69, + + 37, 69, 38, 69, 39, 69, 40, 69, 41, 69, + 69, 69, 69, 69, 69, 69, 129, 132, 69, 69, + 12, 69, 14, 69, 69, 29, 69, 69, 69, 69, + 58, 69, 69, 69, 69, 69, 69, 42, 69, 69, + 69, 61, 69, 69, 69, 11, 69, 69, 69, 55, + 69, 56, 69, 69, 34, 69, 69, 69, 62, 69, + 63, 69, 45, 69, 47, 69, 69, 69, 50, 69, + 57, 69, 69, 69, 66, 69, 69, 69, 69, 69, + 69, 65, 69, 64, 69, 69, 69, 69, 69, 67, + 69 + + } ; + +static yyconst short int yy_accept[446] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 7, 9, 12, 15, 17, 20, 23, + 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, + 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, + 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, + 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 160, 162, 164, 167, 170, + 173, 175, 177, 180, 182, 184, 186, 187, 189, 190, + 191, 191, 192, 193, 193, 194, 194, 195, 196, 197, + 197, 197, 198, 199, 200, 201, 202, 203, 204, 204, + + 205, 206, 207, 208, 209, 210, 210, 210, 211, 212, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 222, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 273, 273, 274, 274, 274, 275, 276, 276, + 277, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + + 296, 297, 298, 299, 300, 302, 303, 304, 305, 306, + 307, 308, 310, 311, 312, 313, 315, 316, 317, 318, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 342, 342, 342, 342, 342, 343, + 344, 345, 347, 348, 350, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 362, 364, 365, 367, 368, 369, + 370, 371, 373, 374, 375, 376, 377, 379, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 400, 401, 402, 403, + + 404, 405, 406, 408, 409, 410, 411, 411, 411, 411, + 411, 412, 414, 416, 418, 419, 420, 421, 422, 423, + 424, 426, 428, 429, 431, 432, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 449, 450, 451, 452, 453, 454, 455, 456, 457, 459, + 461, 462, 464, 465, 466, 468, 469, 470, 471, 472, + 474, 476, 478, 479, 481, 483, 485, 486, 488, 489, + 490, 491, 493, 494, 495, 497, 498, 499, 501, 503, + 505, 507, 509, 511, 512, 513, 514, 515, 516, 517, + 519, 520, 521, 523, 525, 526, 528, 529, 530, 531, + + 533, 534, 535, 536, 537, 538, 540, 541, 542, 544, + 545, 546, 548, 549, 550, 552, 554, 555, 557, 558, + 559, 561, 563, 565, 567, 568, 569, 571, 573, 574, + 575, 577, 578, 579, 580, 581, 582, 584, 586, 587, + 588, 589, 590, 592, 592 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 8, 9, 10, 1, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, + 23, 23, 23, 23, 23, 24, 24, 25, 26, 27, + 28, 29, 30, 1, 31, 31, 31, 31, 32, 33, + 34, 34, 34, 34, 34, 35, 34, 34, 34, 34, + 34, 34, 34, 34, 36, 34, 34, 37, 34, 34, + 38, 39, 40, 41, 42, 1, 43, 44, 45, 46, + + 47, 48, 49, 50, 51, 34, 52, 53, 54, 55, + 56, 57, 34, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[71] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 5, 6, 1, 1, 1, 1, 1, 3, + 6, 6, 6, 7, 7, 7, 7, 1, 3, 1, + 1, 7, 5, 5, 6, 6, 6, 5, 7, 7, + 7, 7, 7, 7, 8, 7, 7, 8, 7, 8, + 7, 8, 7, 8, 7, 7, 1, 1, 1, 1 + } ; + +static yyconst short int yy_base[457] = + { 0, + 0, 69, 79, 0, 149, 0, 810, 809, 217, 218, + 811, 814, 220, 814, 233, 782, 219, 781, 217, 769, + 814, 814, 779, 213, 814, 223, 233, 238, 247, 240, + 781, 814, 45, 777, 46, 814, 0, 234, 814, 814, + 776, 742, 744, 235, 221, 249, 239, 745, 225, 247, + 201, 248, 238, 753, 264, 269, 191, 261, 749, 814, + 253, 814, 814, 326, 814, 814, 814, 0, 814, 751, + 814, 814, 0, 814, 814, 814, 814, 776, 335, 814, + 341, 347, 814, 222, 814, 300, 814, 814, 814, 296, + 303, 814, 814, 814, 814, 814, 780, 814, 775, 333, + + 814, 814, 814, 337, 369, 351, 389, 229, 323, 0, + 397, 326, 342, 814, 766, 814, 814, 814, 765, 0, + 370, 753, 814, 731, 743, 730, 745, 744, 731, 346, + 724, 729, 337, 228, 725, 722, 725, 722, 728, 718, + 368, 365, 722, 721, 721, 711, 726, 725, 383, 727, + 386, 714, 358, 320, 718, 714, 716, 709, 390, 714, + 706, 267, 712, 814, 814, 449, 814, 0, 714, 0, + 814, 438, 0, 814, 444, 0, 814, 814, 446, 814, + 449, 452, 814, 443, 814, 814, 814, 705, 717, 712, + 700, 698, 18, 397, 709, 711, 711, 705, 705, 700, + + 696, 693, 701, 704, 0, 699, 689, 697, 697, 689, + 690, 0, 693, 690, 691, 0, 679, 678, 686, 672, + 673, 679, 680, 675, 668, 670, 672, 679, 665, 663, + 663, 665, 662, 673, 672, 662, 666, 661, 655, 668, + 670, 659, 660, 471, 502, 468, 538, 475, 479, 366, + 347, 0, 658, 0, 0, 650, 648, 656, 645, 650, + 644, 650, 648, 0, 0, 653, 0, 642, 641, 638, + 642, 0, 648, 648, 633, 638, 0, 0, 633, 648, + 637, 635, 645, 640, 635, 626, 624, 625, 622, 634, + 624, 628, 633, 632, 623, 0, 440, 627, 619, 624, + + 623, 610, 0, 610, 622, 613, 406, 0, 425, 0, + 814, 0, 0, 625, 611, 612, 617, 616, 615, 610, + 0, 0, 605, 0, 613, 0, 610, 611, 609, 598, + 594, 597, 609, 591, 605, 604, 581, 593, 580, 0, + 588, 566, 567, 544, 530, 536, 531, 533, 0, 0, + 520, 0, 531, 522, 0, 525, 523, 506, 506, 519, + 0, 0, 519, 0, 0, 0, 516, 0, 516, 502, + 514, 0, 509, 495, 0, 507, 495, 0, 0, 0, + 510, 0, 0, 484, 495, 488, 493, 486, 485, 0, + 494, 489, 0, 0, 489, 0, 485, 471, 482, 0, + + 476, 464, 464, 475, 472, 0, 471, 471, 0, 469, + 456, 0, 468, 462, 0, 0, 462, 0, 448, 449, + 0, 0, 0, 0, 429, 445, 0, 0, 437, 423, + 0, 403, 383, 382, 371, 386, 0, 0, 358, 354, + 247, 172, 0, 814, 586, 594, 602, 610, 614, 618, + 622, 628, 634, 638, 640, 642 + } ; + +static yyconst short int yy_def[457] = + { 0, + 444, 1, 444, 3, 444, 5, 445, 445, 446, 446, + 444, 444, 444, 444, 444, 444, 447, 444, 444, 448, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 449, 449, 444, 444, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 444, + 444, 444, 444, 444, 444, 444, 444, 450, 444, 450, + 444, 444, 451, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 447, 444, 452, 444, 444, 444, 448, + 453, 444, 444, 444, 444, 444, 444, 444, 444, 444, + + 444, 444, 444, 444, 444, 444, 444, 444, 444, 454, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 449, + 447, 448, 444, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 444, 444, 444, 444, 450, 450, 451, + 444, 447, 455, 444, 448, 456, 444, 444, 444, 444, + 444, 444, 444, 454, 444, 444, 444, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 450, 447, 447, 448, 448, 444, 444, 444, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 450, 447, 245, 448, 247, + 444, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 450, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 450, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 449, 0, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444 + } ; + +static yyconst short int yy_nxt[885] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 12, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, + 37, 37, 37, 37, 38, 37, 37, 39, 12, 40, + 41, 37, 42, 43, 44, 45, 46, 47, 48, 37, + 49, 37, 50, 37, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 37, 37, 37, 60, 61, 62, 63, + 64, 115, 116, 118, 119, 64, 257, 258, 65, 66, + 66, 67, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + + 66, 66, 66, 66, 66, 66, 66, 66, 66, 68, + 68, 68, 68, 68, 68, 68, 66, 69, 66, 66, + 68, 68, 68, 68, 70, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 66, 66, 66, 66, 71, + 71, 72, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 73, + 73, 73, 73, 73, 73, 73, 71, 71, 71, 71, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 71, 71, 71, 71, 77, + 77, 79, 80, 81, 81, 81, 79, 85, 88, 93, + 85, 443, 78, 78, 81, 80, 82, 82, 82, 81, + 94, 95, 121, 145, 89, 159, 122, 146, 98, 160, + 96, 97, 99, 101, 100, 100, 100, 86, 102, 104, + 86, 111, 111, 111, 183, 103, 104, 130, 105, 105, + 106, 107, 141, 200, 112, 113, 131, 126, 107, 142, + 164, 108, 109, 110, 127, 132, 107, 128, 201, 183, + 129, 137, 112, 107, 138, 149, 139, 143, 150, 108, + + 113, 133, 144, 134, 147, 442, 135, 109, 174, 148, + 110, 161, 136, 152, 153, 156, 162, 240, 157, 241, + 165, 172, 172, 154, 175, 175, 155, 166, 80, 81, + 81, 81, 166, 158, 91, 167, 79, 80, 81, 81, + 81, 79, 81, 80, 81, 81, 81, 81, 81, 80, + 82, 82, 82, 81, 100, 100, 100, 183, 100, 100, + 100, 185, 229, 173, 179, 180, 176, 180, 179, 180, + 104, 180, 106, 106, 106, 183, 185, 230, 85, 179, + 180, 311, 107, 179, 180, 180, 185, 198, 104, 180, + 105, 105, 106, 194, 185, 199, 441, 107, 195, 311, + + 107, 311, 440, 108, 109, 181, 227, 181, 86, 210, + 182, 182, 182, 208, 85, 107, 104, 211, 111, 111, + 111, 108, 209, 228, 212, 219, 311, 439, 107, 109, + 438, 112, 113, 220, 223, 235, 224, 174, 221, 259, + 236, 437, 436, 107, 86, 225, 85, 260, 237, 112, + 166, 80, 81, 81, 81, 166, 174, 113, 167, 244, + 244, 435, 248, 91, 248, 246, 246, 249, 249, 249, + 182, 182, 182, 182, 182, 182, 86, 250, 251, 85, + 174, 434, 91, 433, 180, 347, 180, 432, 431, 309, + 309, 430, 307, 307, 348, 250, 249, 249, 249, 180, + + 249, 249, 249, 251, 180, 429, 91, 428, 427, 86, + 85, 180, 426, 180, 425, 424, 423, 422, 421, 420, + 419, 418, 417, 308, 308, 308, 180, 416, 415, 414, + 413, 180, 308, 308, 308, 412, 411, 410, 409, 408, + 86, 407, 406, 405, 308, 308, 308, 308, 308, 308, + 174, 404, 403, 402, 401, 400, 399, 398, 397, 310, + 310, 310, 396, 395, 394, 393, 392, 391, 310, 310, + 310, 390, 389, 388, 387, 386, 91, 385, 384, 383, + 310, 310, 310, 310, 310, 310, 74, 74, 74, 74, + 74, 74, 74, 74, 76, 76, 76, 76, 76, 76, + + 76, 76, 84, 382, 84, 84, 84, 84, 84, 84, + 90, 381, 90, 380, 90, 90, 90, 90, 120, 120, + 120, 120, 168, 168, 168, 168, 170, 170, 170, 170, + 84, 84, 84, 379, 378, 84, 90, 90, 90, 377, + 376, 90, 184, 184, 245, 245, 247, 247, 375, 374, + 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, + 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, + 353, 352, 351, 350, 349, 346, 345, 344, 343, 342, + 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, + 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, + + 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, + 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, + 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, + 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, + 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, + 266, 265, 264, 263, 262, 261, 256, 255, 254, 253, + 252, 243, 242, 239, 238, 234, 233, 232, 231, 226, + 222, 218, 217, 216, 215, 214, 213, 207, 206, 205, + 204, 203, 202, 197, 196, 193, 192, 191, 190, 189, + 188, 91, 187, 186, 178, 177, 171, 169, 163, 151, + + 140, 125, 124, 123, 117, 114, 92, 91, 87, 83, + 444, 75, 75, 11, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444 + } ; + +static yyconst short int yy_chk[885] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 33, 33, 35, 35, 2, 193, 193, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, + 10, 13, 13, 13, 13, 13, 13, 17, 19, 24, + 84, 442, 9, 10, 15, 15, 15, 15, 15, 15, + 24, 26, 38, 51, 19, 57, 38, 51, 27, 57, + 26, 26, 27, 28, 27, 27, 27, 17, 28, 30, + 84, 30, 30, 30, 108, 28, 29, 45, 29, 29, + 29, 30, 49, 134, 30, 30, 45, 44, 29, 49, + 61, 29, 29, 29, 44, 45, 30, 44, 134, 108, + 44, 47, 30, 29, 47, 53, 47, 50, 53, 29, + + 30, 46, 50, 46, 52, 441, 46, 29, 90, 52, + 29, 58, 46, 55, 55, 56, 58, 162, 56, 162, + 61, 86, 86, 55, 91, 91, 55, 64, 64, 64, + 64, 64, 64, 56, 90, 64, 79, 79, 79, 79, + 79, 79, 81, 81, 81, 81, 81, 81, 82, 82, + 82, 82, 82, 82, 100, 100, 100, 109, 104, 104, + 104, 112, 154, 86, 100, 100, 91, 100, 104, 104, + 106, 104, 106, 106, 106, 109, 113, 154, 121, 100, + 100, 251, 106, 104, 104, 100, 112, 133, 105, 104, + 105, 105, 105, 130, 113, 133, 440, 106, 130, 251, + + 105, 250, 439, 105, 105, 107, 153, 107, 121, 142, + 107, 107, 107, 141, 307, 105, 111, 142, 111, 111, + 111, 105, 141, 153, 142, 149, 250, 436, 111, 105, + 435, 111, 111, 149, 151, 159, 151, 309, 149, 194, + 159, 434, 433, 111, 307, 151, 172, 194, 159, 111, + 166, 166, 166, 166, 166, 166, 175, 111, 166, 172, + 172, 432, 179, 309, 179, 175, 175, 179, 179, 179, + 181, 181, 181, 182, 182, 182, 172, 184, 184, 244, + 246, 430, 175, 429, 182, 297, 182, 426, 425, 246, + 246, 420, 244, 244, 297, 184, 248, 248, 248, 182, + + 249, 249, 249, 184, 182, 419, 246, 417, 414, 244, + 245, 249, 413, 249, 411, 410, 408, 407, 405, 404, + 403, 402, 401, 245, 245, 245, 249, 399, 398, 397, + 395, 249, 245, 245, 245, 392, 391, 389, 388, 387, + 245, 386, 385, 384, 245, 245, 245, 245, 245, 245, + 247, 381, 377, 376, 374, 373, 371, 370, 369, 247, + 247, 247, 367, 363, 360, 359, 358, 357, 247, 247, + 247, 356, 354, 353, 351, 348, 247, 347, 346, 345, + 247, 247, 247, 247, 247, 247, 445, 445, 445, 445, + 445, 445, 445, 445, 446, 446, 446, 446, 446, 446, + + 446, 446, 447, 344, 447, 447, 447, 447, 447, 447, + 448, 343, 448, 342, 448, 448, 448, 448, 449, 449, + 449, 449, 450, 450, 450, 450, 451, 451, 451, 451, + 452, 452, 452, 341, 339, 452, 453, 453, 453, 338, + 337, 453, 454, 454, 455, 455, 456, 456, 336, 335, + 334, 333, 332, 331, 330, 329, 328, 327, 325, 323, + 320, 319, 318, 317, 316, 315, 314, 306, 305, 304, + 302, 301, 300, 299, 298, 295, 294, 293, 292, 291, + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 276, 275, 274, 273, 271, 270, 269, 268, + + 266, 263, 262, 261, 260, 259, 258, 257, 256, 253, + 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, + 223, 222, 221, 220, 219, 218, 217, 215, 214, 213, + 211, 210, 209, 208, 207, 206, 204, 203, 202, 201, + 200, 199, 198, 197, 196, 195, 192, 191, 190, 189, + 188, 169, 163, 161, 160, 158, 157, 156, 155, 152, + 150, 148, 147, 146, 145, 144, 143, 140, 139, 138, + 137, 136, 135, 132, 131, 129, 128, 127, 126, 125, + 124, 122, 119, 115, 99, 97, 78, 70, 59, 54, + + 48, 43, 42, 41, 34, 31, 23, 20, 18, 16, + 11, 8, 7, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 444 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_scope_lval; +extern std::string cl_var_lval; +extern std::string cl_func_lval; + +std::vector currentScope; + +bool setLexerInput(const std::string &in, const std::map &ignoreTokens); + +std::string getCurrentScope(); +void printScopeName(); +void cl_scope_lex_clean(); +void cl_scope_less(int count); + +//we keep a very primitive map with only symbol name +//that we encountered so far +std::map g_symbols; +std::map g_macros; + +static std::map g_ignoreList; + +bool isaTYPE(char *string); +bool isaMACRO(char *string); +bool isignoredToken(char *string); + +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(isaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(isaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else if(isignoredToken(yytext)){\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_scope_lval = yytext;\ + cl_var_lval = yytext;\ + cl_func_lval = yytext;\ + return(x);} + +#define PREPR 1 + +#define WRAP_PREP 2 + +#define CPP_COMMENT 3 + +#define C_COMMENT 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 814 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + BEGIN C_COMMENT; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{ + BEGIN CPP_COMMENT; + } + YY_BREAK +case 3: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 4: +YY_RULE_SETUP +{ + WHITE_RETURN(' '); + } + YY_BREAK +case 5: +YY_RULE_SETUP +{ + WHITE_RETURN('\n'); + } + YY_BREAK +case 6: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_AUTO);} + YY_BREAK +case 7: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_BREAK);} + YY_BREAK +case 8: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CASE);} + YY_BREAK +case 9: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CHAR);} + YY_BREAK +case 10: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONST);} + YY_BREAK +case 11: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_CONTINUE);} + YY_BREAK +case 12: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DEFAULT);} + YY_BREAK +case 13: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_DEFINE);} + YY_BREAK +case 14: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_OPDEFINED);} + YY_BREAK +case 15: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DO);} + YY_BREAK +case 16: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_DOUBLE);} + YY_BREAK +case 17: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ELIF);} + YY_BREAK +case 18: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_ELSE);} + YY_BREAK +case 19: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ENDIF);} + YY_BREAK +case 20: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_ENUM);} + YY_BREAK +case 21: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_ERROR);} + YY_BREAK +case 22: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_EXTERN);} + YY_BREAK +case 23: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FLOAT);} + YY_BREAK +case 24: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_FOR);} + YY_BREAK +case 25: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_GOTO);} + YY_BREAK +case 26: +YY_RULE_SETUP +{PPPA_KEYWORD_RETURN(LE_IF);} + YY_BREAK +case 27: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFDEF);} + YY_BREAK +case 28: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_IFNDEF);} + YY_BREAK +case 29: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_INCLUDE); } + YY_BREAK +case 30: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_INT);} + YY_BREAK +case 31: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_LINE);} + YY_BREAK +case 32: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_LONG);} + YY_BREAK +case 33: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_PRAGMA);} + YY_BREAK +case 34: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_REGISTER);} + YY_BREAK +case 35: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_RETURN);} + YY_BREAK +case 36: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SHORT);} + YY_BREAK +case 37: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIGNED);} + YY_BREAK +case 38: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SIZEOF);} + YY_BREAK +case 39: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STATIC);} + YY_BREAK +case 40: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_STRUCT);} + YY_BREAK +case 41: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_SWITCH);} + YY_BREAK +case 42: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_TYPEDEF);} + YY_BREAK +case 43: +YY_RULE_SETUP +{PP_KEYWORD_RETURN(LE_UNDEF);} + YY_BREAK +case 44: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNION);} + YY_BREAK +case 45: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_UNSIGNED);} + YY_BREAK +case 46: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOID);} + YY_BREAK +case 47: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_VOLATILE);} + YY_BREAK +case 48: +YY_RULE_SETUP +{PA_KEYWORD_RETURN(LE_WHILE);} + YY_BREAK +case 49: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CLASS);} + YY_BREAK +case 50: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NAMESPACE);} + YY_BREAK +case 51: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DELETE);} + YY_BREAK +case 52: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_FRIEND);} + YY_BREAK +case 53: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_INLINE);} + YY_BREAK +case 54: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_NEW);} + YY_BREAK +case 55: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OPERATOR);} + YY_BREAK +case 56: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_OVERLOAD);} + YY_BREAK +case 57: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PROTECTED);} + YY_BREAK +case 58: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PRIVATE);} + YY_BREAK +case 59: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_PUBLIC);} + YY_BREAK +case 60: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_THIS);} + YY_BREAK +case 61: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_VIRTUAL);} + YY_BREAK +case 62: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TEMPLATE);} + YY_BREAK +case 63: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_TYPENAME);} + YY_BREAK +case 64: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} + YY_BREAK +case 65: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_STATIC_CAST);} + YY_BREAK +case 66: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_CONST_CAST);} + YY_BREAK +case 67: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} + YY_BREAK +case 68: +YY_RULE_SETUP +{CPP_KEYWORD_RETURN(LE_USING);} + YY_BREAK +case 69: +YY_RULE_SETUP +{IDENTIFIER_RETURN();} + YY_BREAK +case 70: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_INTEGERconstant);} + YY_BREAK +case 71: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_OCTALconstant);} + YY_BREAK +case 72: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_HEXconstant);} + YY_BREAK +case 73: +YY_RULE_SETUP +{NUMERICAL_RETURN(LE_FLOATINGconstant);} + YY_BREAK +case 74: +YY_RULE_SETUP +{ + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + YY_BREAK +case 75: +YY_RULE_SETUP +{ + LITERAL_RETURN(LE_STRINGliteral);} + YY_BREAK +case 76: +YY_RULE_SETUP +{PPOP_RETURN(LE_LP);} + YY_BREAK +case 77: +YY_RULE_SETUP +{PPOP_RETURN(LE_RP);} + YY_BREAK +case 78: +YY_RULE_SETUP +{PPOP_RETURN(LE_COMMA);} + YY_BREAK +case 79: +YY_RULE_SETUP +{BEGIN PREPR;} + YY_BREAK +case 80: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LC);} + YY_BREAK +case 81: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RC);} + YY_BREAK +case 82: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LB);} + YY_BREAK +case 83: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_RB);} + YY_BREAK +case 84: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DOT);} + YY_BREAK +case 85: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_AND);} + YY_BREAK +case 86: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_STAR);} + YY_BREAK +case 87: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PLUS);} + YY_BREAK +case 88: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MINUS);} + YY_BREAK +case 89: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NEGATE);} + YY_BREAK +case 90: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_NOT);} + YY_BREAK +case 91: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_DIV);} + YY_BREAK +case 92: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_MOD);} + YY_BREAK +case 93: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_LT);} + YY_BREAK +case 94: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_GT);} + YY_BREAK +case 95: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_XOR);} + YY_BREAK +case 96: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_PIPE);} + YY_BREAK +case 97: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_QUESTION);} + YY_BREAK +case 98: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_COLON);} + YY_BREAK +case 99: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_SEMICOLON);} + YY_BREAK +case 100: +YY_RULE_SETUP +{ASCIIOP_RETURN(LE_ASSIGN);} + YY_BREAK +case 101: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DOTstar);} + YY_BREAK +case 102: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_CLCL);} + YY_BREAK +case 103: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROW);} + YY_BREAK +case 104: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ARROWstar);} + YY_BREAK +case 105: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ICR);} + YY_BREAK +case 106: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DECR);} + YY_BREAK +case 107: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LS);} + YY_BREAK +case 108: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RS);} + YY_BREAK +case 109: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LE);} + YY_BREAK +case 110: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_GE);} + YY_BREAK +case 111: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_EQ);} + YY_BREAK +case 112: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_NE);} + YY_BREAK +case 113: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDAND);} + YY_BREAK +case 114: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_OROR);} + YY_BREAK +case 115: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MULTassign);} + YY_BREAK +case 116: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_DIVassign);} + YY_BREAK +case 117: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MODassign);} + YY_BREAK +case 118: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_PLUSassign);} + YY_BREAK +case 119: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_MINUSassign);} + YY_BREAK +case 120: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_LSassign);} + YY_BREAK +case 121: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_RSassign);} + YY_BREAK +case 122: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ANDassign);} + YY_BREAK +case 123: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ERassign);} + YY_BREAK +case 124: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ORassign);} + YY_BREAK +case 125: +YY_RULE_SETUP +{NAMEDOP_RETURN(LE_ELLIPSIS);} + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(PREPR): +case YY_STATE_EOF(WRAP_PREP): +case YY_STATE_EOF(CPP_COMMENT): +case YY_STATE_EOF(C_COMMENT): +{ + //reset lexer + yyterminate(); + } + YY_BREAK +case 126: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 127: +YY_RULE_SETUP +{ + defineFound = false; + cl_scope_lineno++; + BEGIN INITIAL; + } + YY_BREAK +case 128: +YY_RULE_SETUP +{ + BEGIN WRAP_PREP; + } + YY_BREAK +case 129: +YY_RULE_SETUP +{ + defineFound = true; + } + YY_BREAK +case 130: +YY_RULE_SETUP +{ + cl_scope_lineno++; + BEGIN PREPR; + } + YY_BREAK +case 131: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } + YY_BREAK +case 132: +YY_RULE_SETUP +{ + if(defineFound) + { + defineFound = false; + g_macros[yytext] = true; + } + } + YY_BREAK +case 133: +YY_RULE_SETUP +{} + YY_BREAK +case 134: +YY_RULE_SETUP +{} + YY_BREAK +case 135: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 136: +YY_RULE_SETUP +{} + YY_BREAK +case 137: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 138: +YY_RULE_SETUP +{} + YY_BREAK +case 139: +YY_RULE_SETUP +ECHO; + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 445 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 444); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +bool isaTYPE(char *string) +{ + return g_symbols.find(string) != g_symbols.end(); +} + +bool isignoredToken(char *string) +{ + return g_ignoreList.find(string) != g_ignoreList.end(); +} + +bool isaMACRO(char *string) +{ + return g_macros.find(string) != g_macros.end(); +} + +void cl_scope_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_scope_lineno = 1; + currentScope.clear(); + g_symbols.clear(); + g_macros.clear(); +} + +/** + * scope util functions + */ +void printScopeName() +{ + /* + if(currentScope.empty()) + { + printf("%d: current scope is global scope\n", cl_scope_lineno ); + } + else + { + printf("%d: current scope is %s\n", cl_scope_lineno, getCurrentScope().c_str()); + } + */ +} + +void increaseScope() +{ + static int value = 0; + std::string scopeName("__anon_"); + + char buf[100]; + sprintf(buf, "%d", value++); + scopeName += buf; + currentScope.push_back(scopeName); +} + +std::string getCurrentScope() +{ + //format scope name + std::string scope; + if(currentScope.empty()){ + return ""; + } + + std::vector tmpscope(currentScope); + + while( tmpscope.empty() == false ){ + std::string _scope = tmpscope.front(); + tmpscope.erase(tmpscope.begin()); + + if(_scope.find("__anon_") == (size_t)-1 && _scope.empty() == false){ + scope += _scope; + scope += "::"; + } + } + + //remove the trailing '::' + scope.erase(scope.find_last_not_of(":")+1); + return scope; +} + +/*******************************************************************/ +bool setLexerInput(const std::string &in, const std::map &ignoreTokens) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + g_ignoreList = ignoreTokens; + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} + +void cl_scope_less(int count){ + yyless(count); +} diff --git a/CxxParser/cpp_lexer.h b/CxxParser/cpp_lexer.h new file mode 100644 index 0000000000..bc0d97a2cf --- /dev/null +++ b/CxxParser/cpp_lexer.h @@ -0,0 +1,89 @@ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 diff --git a/CxxParser/cpp_scope_grammar.y b/CxxParser/cpp_scope_grammar.y new file mode 100644 index 0000000000..68bc8d07e0 --- /dev/null +++ b/CxxParser/cpp_scope_grammar.y @@ -0,0 +1,539 @@ + %{ +// Copyright Eran Ifrah(c) +%} + +%{ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" + +#define YYDEBUG_LEXER_TEXT (cl_scope_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +int cl_scope_parse(); +void cl_scope_error(char *string); +void syncParser(); + +static std::vector gs_additionlNS; + +//--------------------------------------------- +// externs defined in the lexer +//--------------------------------------------- +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern void printScopeName(); //print the current scope name +extern void increaseScope(); //increase scope with anonymouse value +extern std::string getCurrentScope(); +extern void cl_scope_lex_clean(); +extern void cl_scope_less(int count); + +/*************** Standard ytab.c continues here *********************/ +%} + +/*************************************************************************/ + +/* This group is used by the C/C++ language parser */ +%token LE_AUTO LE_DOUBLE LE_INT LE_STRUCT +%token LE_BREAK LE_ELSE LE_LONG LE_SWITCH +%token LE_CASE LE_ENUM LE_REGISTER LE_TYPEDEF +%token LE_CHAR LE_EXTERN LE_RETURN LE_UNION +%token LE_CONST LE_FLOAT LE_SHORT LE_UNSIGNED +%token LE_CONTINUE LE_FOR LE_SIGNED LE_VOID +%token LE_DEFAULT LE_GOTO LE_SIZEOF LE_VOLATILE +%token LE_DO LE_IF LE_STATIC LE_WHILE + +/* The following are used in C++ only. ANSI C would call these IDENTIFIERs */ +%token LE_NEW LE_DELETE +%token LE_THIS +%token LE_OPERATOR +%token LE_CLASS +%token LE_PUBLIC LE_PROTECTED LE_PRIVATE +%token LE_VIRTUAL LE_FRIEND +%token LE_INLINE LE_OVERLOAD +%token LE_TEMPLATE LE_TYPENAME + +/* ANSI C Grammar suggestions */ +%token LE_IDENTIFIER LE_STRINGliteral +%token LE_FLOATINGconstant LE_INTEGERconstant LE_CHARACTERconstant +%token LE_OCTALconstant LE_HEXconstant +%token LE_POUNDPOUND LE_CComment LE_CPPComment LE_NAMESPACE LE_USING + +/* New Lexical element, whereas ANSI C suggested non-terminal */ +%token LE_TYPEDEFname + +/* Multi-Character operators */ +%token LE_ARROW /* -> */ +%token LE_ICR LE_DECR /* ++ -- */ +%token LE_LS LE_RS /* << >> */ +%token LE_LE LE_GE LE_EQ LE_NE /* <= >= == != */ +%token LE_ANDAND LE_OROR /* && || */ +%token LE_ELLIPSIS /* ... */ + /* Following are used in C++, not ANSI C */ +%token LE_CLCL /* :: */ +%token LE_DOTstar LE_ARROWstar /* .* ->* */ + +/* modifying assignment operators */ +%token LE_MULTassign LE_DIVassign LE_MODassign /* *= /= %= */ +%token LE_PLUSassign LE_MINUSassign /* += -= */ +%token LE_LSassign LE_RSassign /* <<= >>= */ +%token LE_ANDassign LE_ERassign LE_ORassign /* &= ^= |= */ +%token LE_MACRO +%token LE_DYNAMIC_CAST +%token LE_STATIC_CAST +%token LE_CONST_CAST +%token LE_REINTERPRET_CAST + +%start translation_unit + +%% +/* Costants */ +basic_type_name: + LE_INT { $$ = $1; } + | LE_CHAR { $$ = $1; } + | LE_SHORT { $$ = $1; } + | LE_LONG { $$ = $1; } + | LE_FLOAT { $$ = $1; } + | LE_DOUBLE { $$ = $1; } + | LE_SIGNED { $$ = $1; } + | LE_UNSIGNED { $$ = $1; } + | LE_VOID { $$ = $1; } + ; + + +/* ========================================================================*/ +/* find declarations */ +/* ========================================================================*/ + +translation_unit : /*empty*/ + | translation_unit external_decl + ; + +external_decl : class_decl + | enum_decl + | union_decl + | function_decl + | namespace_decl + | using_namespace + | scope_reducer + | scope_increaer + | error { + //printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_scope_text, cl_scope_lineno); + syncParser(); + } + ; + + +/*templates*/ +template_arg : /* empty */ { $$ = "";} + | template_specifiter LE_IDENTIFIER {$$ = $1 + " " + $2;} + ; + +template_arg_list : template_arg { $$ = $1; } + | template_arg_list ',' template_arg { $$ = $1 + " " + $2 + " " + $3; } + ; + +template_specifiter : LE_CLASS { $$ = $1; } + | LE_TYPENAME { $$ = $1; } + ; + +opt_template_qualifier : /*empty*/ + | LE_TEMPLATE '<' template_arg_list '>' { $$ = $1 + $2 + $3 + $4;} + ; +/*inheritance*/ +derivation_list : /*empty*/ {$$ = "";} + | parent_class {$$ = $1;} + | derivation_list ',' parent_class {$$ = $1 + $2 + $3;} + ; + +parent_class : access_specifier LE_IDENTIFIER opt_template_specifier {$$ = $1 + " " + $2 + $3;} + ; + +opt_template_specifier : /*empty*/ {$$ = "";} + | '<' template_parameter_list '>' {$$ = $1 + $2 + $3;} + ; + +access_specifier : /*empty*/ {$$ = "";} + | LE_PUBLIC {$$ = $1;} + | LE_PRIVATE {$$ = $1;} + | LE_PROTECTED {$$ = $1;} + ; + +/* the following rules are for template parameters no declarations! */ +template_parameter_list : /* empty */ {$$ = "";} + | template_parameter {$$ = $1;} + | template_parameter_list ',' template_parameter {$$ = $1 + $2 + $3;} + ; + +template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp {$$ = $1 + $2 + $3 +$4;} + ; + +using_namespace: LE_USING LE_NAMESPACE LE_IDENTIFIER ';' + { + //printf("Found using namespace %s\n", $3.c_str()); + gs_additionlNS.push_back($3); + } + ; + +/* namespace */ +namespace_decl : stmnt_starter LE_NAMESPACE LE_IDENTIFIER '{' + { + currentScope.push_back($3); + printScopeName(); + } + | stmnt_starter LE_NAMESPACE '{' + { + //anonymouse namespace + increaseScope(); + printScopeName(); + } + ; +opt_class_qualifier : /*empty*/{$$ = "";} + | LE_MACRO {$$ = $1;} + ; + +/* the class rule itself */ +class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER '{' + { + //increase the scope level + currentScope.push_back($5); + printScopeName(); + } + + | stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER ':' derivation_list '{' + { + //increase the scope level + currentScope.push_back($5); + printScopeName(); + } + ; + +scope_reducer : '}' { + if(currentScope.empty()) + { + //fatal error! + //printf("CodeLite: fatal error - cant go beyond global scope!\n"); + } + else + { + currentScope.pop_back(); + printScopeName(); + } + } + ; +scope_increaer : '{' { + //increase random scope + increaseScope(); + printScopeName(); + } + +class_keyword: LE_CLASS {$$ = $1;} + | LE_STRUCT {$$ = $1;} + ; + +func_name: LE_IDENTIFIER {$$ = $1;} + | LE_OPERATOR any_operator {$$ = $1;} + ; + +any_operator: + '+' + | '=' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '<' + | '>' + | LE_LS + | LE_RS + | LE_ANDAND + | LE_OROR + | LE_ARROW + | LE_ARROWstar + | '.' + | LE_DOTstar + | LE_ICR + | LE_DECR + | LE_LE + | LE_GE + | LE_EQ + | LE_NE + | '(' ')' + | '[' ']' + | LE_NEW + | LE_DELETE + | ',' + | LE_MULTassign + | LE_DIVassign + | LE_MODassign + | LE_PLUSassign + | LE_MINUSassign + | LE_LSassign + | LE_RSassign + | LE_ANDassign + | LE_ERassign + | LE_ORassign + ; + +optional_initialization_list: /* empty */ + | ':' {consumeInitializationList();} + ; + +/* functions */ +function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' {consumeFuncArgList();} const_spec '{' + { + //trim down trailing '::' from scope name + if($6.find_last_not_of(":") != std::string::npos){ + $6.erase($6.find_last_not_of(":")+1); + } + currentScope.push_back($6); + printScopeName(); + } + | stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier func_name '(' {consumeFuncArgList();} optional_initialization_list '{' + { + + //trim down trailing '::' from scope name + if($5.find_last_not_of(":") != std::string::npos){ + $5.erase($5.find_last_not_of(":")+1); + } + currentScope.push_back($5); + printScopeName(); + } + | stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier '~' func_name '(' {consumeFuncArgList();} const_spec '{' + { + + //trim down trailing '::' from scope name + if($5.find_last_not_of(":") != std::string::npos){ + $5.erase($5.find_last_not_of(":")+1); + } + currentScope.push_back($5); + printScopeName(); + } + ; + +/* +applicable for C++, for cases where a function is declared as +void scope::foo(){ ... } +*/ +nested_scope_specifier : /*empty*/ {$$ = "";} + | nested_scope_specifier scope_specifier { $$ = $1 + $2;} + ; + +scope_specifier : LE_IDENTIFIER LE_CLCL {$$ = $1+ $2;} + | LE_IDENTIFIER '<' {consumeTemplateDecl();} LE_CLCL {$$ = $1 + $4;} + ; + +virtual_spec : /* empty */ {$$ = ""; } + | LE_VIRTUAL { $$ = $1; } + ; + +const_spec : /* empty */ {$$ = ""; } + | LE_CONST { $$ = $1; } + ; + +amp_item : /*empty*/ {$$ = ""; } + | '&' { $$ = $1; } + ; + +star_list : /*empty*/ {$$ = ""; } + | star_list '*' {$$ = $1 + $2;} + ; + +special_star_amp : star_list amp_item { $$ = $1 + $2; } + ; + +stmnt_starter : /*empty*/ {$$ = "";} + | ';' { $$ = ";";} + | ':' { $$ = ":";} //e.g. private: std::string m_name; + ; + +/** Variables **/ +variable_decl : nested_scope_specifier basic_type_name special_star_amp + {$$ = $1 + $2 + $3 ;} + | nested_scope_specifier LE_IDENTIFIER special_star_amp + {$$ = $1 + $2 + $3 ;} + | nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp + {$$ = $1 + $2 + $3 + $4 + $5 + $6 ;} + ; + +enum_decl : stmnt_starter LE_ENUM LE_IDENTIFIER '{' {currentScope.push_back($3); printScopeName();} enum_arg_list '}' + { + currentScope.pop_back();//reduce the scope + printScopeName(); + //printf("found enum: %s, args are: %s\n", $2.c_str(), $5.c_str()); + } + ; + +enum_optional_assign : /*empty*/ {$$ = "";} + | '=' LE_HEXconstant {$$ = $1 + $2;} + | '=' LE_OCTALconstant {$$ = $1 + $2;} + | '=' LE_INTEGERconstant {$$ = $1 + $2;} + ; + +enum_argument : LE_IDENTIFIER enum_optional_assign {$$ = $1 + $2;} + ; +enum_arg_list : /*empty*/ {$$ = "";} + | enum_argument {$$ = $1;} + | enum_arg_list ',' enum_argument {$$ = $1 + $2 + $3;} + ; + +union_decl : stmnt_starter LE_UNION LE_IDENTIFIER '{' + { + currentScope.push_back($3); + printScopeName(); + consumeDecl(); + printScopeName(); + } + ; +%% +void yyerror(char *s) {} + +void syncParser(){ + //move lexer to the next ';' line or scope opening '{' + //int ch = cl_scope_lex(); +} + +//swallow all tokens up to the first '{' +void consumeInitializationList(){ + while( true ){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + //keep the function signature + if(ch == '{'){ + cl_scope_less(0); + break; + } + } +} + +//swallow all tokens up to the first '{' +void consumeBody (){ + std::string cs = "{"; + int depth = 1; + while( true ) { + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + cs += cl_scope_text; + cs += " "; + + if(ch == '{'){ + depth++; + }else if(ch == '}'){ + depth--; + if(depth == 0){ + cl_scope_less(0); + break; + } + } + } + printf("Consumed body: [%s]\n", cs.c_str()); +} + +void consumeFuncArgList(){ + int depth = 1; + while(depth > 0){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + if(ch == ')'){ + depth--; + continue; + } + else if(ch == '('){ + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + if(depth == 0) currentScope.pop_back();//reduce the scope + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +std::string get_scope_name( const std::string &in, + std::vector &additionalNS, + const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ){ + return ""; + } + + //call tghe main parsing routine + cl_scope_parse(); + std::string scope = getCurrentScope(); + //do the lexer cleanup + cl_scope_lex_clean(); + + for(size_t i=0; i gs_names; + +Variable curr_var; +std::string temdecl; + +//--------------------------------------------- +// externs defined in the lexer +//--------------------------------------------- +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern bool setLexerInput(const std::string &in, const std::map &ignoreMap); +extern void cl_scope_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +%} + +/*************************************************************************/ + +/* This group is used by the C/C++ language parser */ +%token LE_AUTO LE_DOUBLE LE_INT LE_STRUCT +%token LE_BREAK LE_ELSE LE_LONG LE_SWITCH +%token LE_CASE LE_ENUM LE_REGISTER LE_TYPEDEF +%token LE_CHAR LE_EXTERN LE_RETURN LE_UNION +%token LE_CONST LE_FLOAT LE_SHORT LE_UNSIGNED +%token LE_CONTINUE LE_FOR LE_SIGNED LE_VOID +%token LE_DEFAULT LE_GOTO LE_SIZEOF LE_VOLATILE +%token LE_DO LE_IF LE_STATIC LE_WHILE + +/* The following are used in C++ only. ANSI C would call these IDENTIFIERs */ +%token LE_NEW LE_DELETE +%token LE_THIS +%token LE_OPERATOR +%token LE_CLASS +%token LE_PUBLIC LE_PROTECTED LE_PRIVATE +%token LE_VIRTUAL LE_FRIEND +%token LE_INLINE LE_OVERLOAD +%token LE_TEMPLATE LE_TYPENAME + +/* ANSI C Grammar suggestions */ +%token LE_IDENTIFIER LE_STRINGliteral +%token LE_FLOATINGconstant LE_INTEGERconstant LE_CHARACTERconstant +%token LE_OCTALconstant LE_HEXconstant +%token LE_POUNDPOUND LE_CComment LE_CPPComment LE_NAMESPACE LE_USING + +/* New Lexical element, whereas ANSI C suggested non-terminal */ +%token LE_TYPEDEFname + +/* Multi-Character operators */ +%token LE_ARROW /* -> */ +%token LE_ICR LE_DECR /* ++ -- */ +%token LE_LS LE_RS /* << >> */ +%token LE_LE LE_GE LE_EQ LE_NE /* <= >= == != */ +%token LE_ANDAND LE_OROR /* && || */ +%token LE_ELLIPSIS /* ... */ + /* Following are used in C++, not ANSI C */ +%token LE_CLCL /* :: */ +%token LE_DOTstar LE_ARROWstar /* .* ->* */ + +/* modifying assignment operators */ +%token LE_MULTassign LE_DIVassign LE_MODassign /* *= /= %= */ +%token LE_PLUSassign LE_MINUSassign /* += -= */ +%token LE_LSassign LE_RSassign /* <<= >>= */ +%token LE_ANDassign LE_ERassign LE_ORassign /* &= ^= |= */ +%token LE_MACRO +%token LE_DYNAMIC_CAST +%token LE_STATIC_CAST +%token LE_CONST_CAST +%token LE_REINTERPRET_CAST + +%start translation_unit + +%% +/* Costants */ +basic_type_name: + LE_INT { $$ = $1; } + | LE_CHAR { $$ = $1; } + | LE_SHORT { $$ = $1; } + | LE_LONG { $$ = $1; } + | LE_FLOAT { $$ = $1; } + | LE_DOUBLE { $$ = $1; } + | LE_SIGNED { $$ = $1; } + | LE_UNSIGNED { $$ = $1; } + | LE_VOID { $$ = $1; } + ; + + +/* ========================================================================*/ +/* find declarations */ +/* ========================================================================*/ + +translation_unit : /*empty*/ + | translation_unit external_decl + ; + +external_decl : {curr_var.Reset(); gs_names.clear();} variables + | error { + yyclearin; //clear lookahead token + yyerrok; + //printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_var_lval.c_str(), cl_scope_lineno); + var_syncParser(); + } + ; + +/* the following rules are for template parameters no declarations! */ +parameter_list : /* empty */ {$$ = "";} + | template_parameter {$$ = $1;} + | parameter_list ',' template_parameter {$$ = $1 + $2 + $3;} + ; + +template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp + {$$ = $1 + " " + $2 + " " + $3 +$4;} + | const_spec nested_scope_specifier basic_type_name special_star_amp + {$$ = $1 + " " + $2 + " " + $3 +$4;} + | const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' + {$$ = $1 + " " + $2 + " " + $3 +$4 + $5 + $6;} + ; + +//the main rule for finding variables +//in the code. if this rule succeeded, the variables +//is added to the gs_vars vriable +variables : stmnt_starter variable_decl special_star_amp variable_name_list postfix + { + if(gs_vars) + { + Variable var; + std::string pattern; + curr_var.m_pattern = "/^"; + curr_var.m_pattern += $1 + " " + $2 + " " + $3 + " " + $4 + "$/"; + curr_var.m_isPtr = ($3.find("*") != (size_t)-1); + curr_var.m_starAmp = $3; + curr_var.m_lineno = cl_scope_lineno; + for(size_t i=0; i< gs_names.size(); i++) + { + //create new variable for every variable name found + var = curr_var; + var.m_name = gs_names.at(i); + gs_vars->push_back(var); + } + curr_var.Reset(); + gs_names.clear(); + } + } + ; + +variable_name_list: LE_IDENTIFIER {gs_names.push_back($1);} + /*| variable_name_list ',' LE_IDENTIFIER + { + //collect all the names + gs_names.push_back($3); + $$ = $1 + $2 + " " + $3; + }*/ + ; +postfix: ';' + | '=' + | ')' + | ',' + | '(' { $$ = $1 + var_consumeFuncArgList();} + ; +/* +applicable for C++, for cases where a function is declared as +void scope::foo(){ ... } +*/ +scope_specifier : LE_IDENTIFIER LE_CLCL {$$ = $1+ $2; } + | LE_IDENTIFIER '<' parameter_list '>' LE_CLCL {$$ = $1 + $2 + $3 + $4 + $5;} + ; + +nested_scope_specifier: /*empty*/ {$$ = "";} + | nested_scope_specifier scope_specifier { $$ = $1 + $2;} + ; + +const_spec : /* empty */ {$$ = ""; } + | LE_CONST { $$ = $1; } + ; + +amp_item : /*empty*/ {$$ = ""; } + | '&' { $$ = $1; } + ; + +star_list : /*empty*/ {$$ = ""; } + | star_list '*' {$$ = $1 + $2;} + ; + +special_star_amp : star_list amp_item { $$ = $1 + $2; } + ; + +stmnt_starter : /*empty*/ {$$ = "";} + | ';' { $$ = ";";} + | '{' { $$ = "{";} + | '(' { $$ = "(";} + | '}' { $$ = "}";} + | ':' { $$ = ":";} //e.g. private: std::string m_name; + | '=' { $$ = "=";} + ; + +/** Variables **/ +variable_decl : const_spec basic_type_name + { + $$ = $1 + " " + $2; + $2.erase($2.find_last_not_of(":")+1); + curr_var.m_type = $2; + } + | const_spec nested_scope_specifier LE_IDENTIFIER + { + $$ = $1 + " " + $2 + $3; + $2.erase($2.find_last_not_of(":")+1); + curr_var.m_typeScope = $2; + curr_var.m_type = $3; + } + | const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' + { + $$ = $1 + " " + $2 + $3 + " " + $4 + $5 + $6; + $2.erase($2.find_last_not_of(":")+1); + curr_var.m_typeScope = $2; + curr_var.m_type = $3; + curr_var.m_isTemplate = true; + curr_var.m_templateDecl = $4 +$5 +$6; + } + ; + +%% +void yyerror(char *s) {} + + +std::string var_consumeFuncArgList() +{ + std::string consumedData; + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + consumedData += cl_scope_text; + consumedData += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } + return consumedData; +} + +void var_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +void get_variables(const std::string &in, VariableList &li, const std::map &ignoreMap) +{ + //provide the lexer with new input + if( !setLexerInput(in, ignoreMap) ) + { + return; + } + + //set the parser local output to our variable list + gs_vars = &li; + + //call tghe main parsing routine + cl_var_parse(); + gs_vars = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} diff --git a/CxxParser/expr_grammar.y b/CxxParser/expr_grammar.y new file mode 100644 index 0000000000..4c759a553a --- /dev/null +++ b/CxxParser/expr_grammar.y @@ -0,0 +1,343 @@ +%{ +// Copyright Eran Ifrah(c) +%} + +%{ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "expression_result.h" + +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +void cl_expr_error(char *string); + +static ExpressionResult result; + +//--------------------------------------------- +// externs defined in the lexer +//--------------------------------------------- +extern char *cl_expr_text; +extern int cl_expr_lex(); +extern int cl_expr_parse(); +extern int cl_expr_lineno; +extern std::vector currentScope; +extern bool setExprLexerInput(const std::string &in); +extern void cl_expr_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +%} + +/*************************************************************************/ + +/* This group is used by the C/C++ language parser */ +%token LE_AUTO LE_DOUBLE LE_INT LE_STRUCT +%token LE_BREAK LE_ELSE LE_LONG LE_SWITCH +%token LE_CASE LE_ENUM LE_REGISTER LE_TYPEDEF +%token LE_CHAR LE_EXTERN LE_RETURN LE_UNION +%token LE_CONST LE_FLOAT LE_SHORT LE_UNSIGNED +%token LE_CONTINUE LE_FOR LE_SIGNED LE_VOID +%token LE_DEFAULT LE_GOTO LE_SIZEOF LE_VOLATILE +%token LE_DO LE_IF LE_STATIC LE_WHILE + +/* The following are used in C++ only. ANSI C would call these IDENTIFIERs */ +%token LE_NEW LE_DELETE +%token LE_THIS +%token LE_OPERATOR +%token LE_CLASS +%token LE_PUBLIC LE_PROTECTED LE_PRIVATE +%token LE_VIRTUAL LE_FRIEND +%token LE_INLINE LE_OVERLOAD +%token LE_TEMPLATE LE_TYPENAME + +/* ANSI C Grammar suggestions */ +%token LE_IDENTIFIER LE_STRINGliteral +%token LE_FLOATINGconstant LE_INTEGERconstant LE_CHARACTERconstant +%token LE_OCTALconstant LE_HEXconstant +%token LE_POUNDPOUND LE_CComment LE_CPPComment LE_NAMESPACE LE_USING + +/* New Lexical element, whereas ANSI C suggested non-terminal */ +%token LE_TYPEDEFname + +/* Multi-Character operators */ +%token LE_ARROW /* -> */ +%token LE_ICR LE_DECR /* ++ -- */ +%token LE_LS LE_RS /* << >> */ +%token LE_LE LE_GE LE_EQ LE_NE /* <= >= == != */ +%token LE_ANDAND LE_OROR /* && || */ +%token LE_ELLIPSIS /* ... */ + /* Following are used in C++, not ANSI C */ +%token LE_CLCL /* :: */ +%token LE_DOTstar LE_ARROWstar /* .* ->* */ + +/* modifying assignment operators */ +%token LE_MULTassign LE_DIVassign LE_MODassign /* *= /= %= */ +%token LE_PLUSassign LE_MINUSassign /* += -= */ +%token LE_LSassign LE_RSassign /* <<= >>= */ +%token LE_ANDassign LE_ERassign LE_ORassign /* &= ^= |= */ +%token LE_MACRO +%token LE_DYNAMIC_CAST +%token LE_STATIC_CAST +%token LE_CONST_CAST +%token LE_REINTERPRET_CAST + +%start translation_unit + +%% +/* ========================================================================*/ +/* find declarations */ +/* ========================================================================*/ + +translation_unit : /*empty*/ + | translation_unit primary_expr + ; + +primary_expr : {result.Reset();} simple_expr + | error { + yyclearin; //clear lookahead token + yyerrok; + //fprintf(stderr, "CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_expr_text, cl_expr_lineno); + //fflush(stderr); + expr_syncParser(); + } + ; + +const_spec : /* empty */ {$$ = ""; } + | LE_CONST { $$ = $1; } + ; + +basic_type_name: + LE_INT { $$ = $1; } + | LE_CHAR { $$ = $1; } + | LE_SHORT { $$ = $1; } + | LE_LONG { $$ = $1; } + | LE_FLOAT { $$ = $1; } + | LE_DOUBLE { $$ = $1; } + | LE_SIGNED { $$ = $1; } + | LE_UNSIGNED { $$ = $1; } + | LE_VOID { $$ = $1; } + ; + +parameter_list : /* empty */ {$$ = "";} + | template_parameter {$$ = $1;} + | parameter_list ',' template_parameter {$$ = $1 + $2 + $3;} + ; + +template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp + {$$ = $1 + " " + $2 + " " + $3 +$4;} + | const_spec nested_scope_specifier basic_type_name special_star_amp + {$$ = $1 + " " + $2 + " " + $3 +$4;} + | const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' + {$$ = $1 + " " + $2 + " " + $3 +$4 + $5 + $6;} + ; + +simple_expr : stmnt_starter special_cast '<' cast_type '>' '(' + { + expr_FuncArgList(); + $$ = $4; + result.m_isaType = true; + result.m_name = $4; + result.m_isFunc = false; + printf("Rule 1\n"); + //result.Print(); + } + | stmnt_starter LE_THIS + { + $$ = $2; + result.m_isaType = false; + result.m_name = $$; + result.m_isFunc = false; + result.m_isThis = true; + result.m_isPtr = true; + //result.Print(); + } + | stmnt_starter '*' LE_THIS + { + $$ = $3; + result.m_isaType = false; + result.m_name = $$; + result.m_isFunc = false; + result.m_isThis = true; + //result.Print(); + } + | stmnt_starter '*' LE_IDENTIFIER + { + $$ = $3; + result.m_isaType = false; + result.m_name = $$; + result.m_isFunc = false; + result.m_isThis = false; + result.m_isPtr = false; + //result.Print(); + } + | stmnt_starter '(' cast_type ')' special_star_amp LE_IDENTIFIER + { + $$ = $3; + result.m_isaType = true; + result.m_name = $$; + result.m_isFunc = false; + result.m_isThis = false; + //result.Print(); + } + | stmnt_starter '(' '(' cast_type ')' special_star_amp LE_IDENTIFIER ')' + { + $$ = $4; + result.m_isaType = true; + result.m_name = $$; + result.m_isFunc = false; + result.m_isThis = false; + //result.Print(); + } + | stmnt_starter nested_scope_specifier LE_IDENTIFIER optional_template_init_list optinal_postifx + { + result.m_isaType = false; + result.m_name = $3; + result.m_isThis = false; + $2.erase($2.find_last_not_of(":")+1); + result.m_scope = $2; + result.m_isTemplate = $4.empty() ? false : true; + result.m_templateInitList = $4; + //result.Print(); + } + ; + +optional_template_init_list: /*empty*/ {$$ = "";} + | '<' parameter_list '>' {$$ = $1 + $2 + $3;} + ; + +optinal_postifx: /*empty*/ {$$ = "";} + | '(' + { + $$ = $1; + expr_FuncArgList(); + result.m_isFunc = true; + } + ; + +special_cast : LE_DYNAMIC_CAST {$$ = $1;} + | LE_STATIC_CAST {$$ = $1;} + | LE_CONST_CAST {$$ = $1;} + | LE_REINTERPRET_CAST {$$ = $1;} + ; + +amp_item : /*empty*/ {$$ = ""; } + | '&' { $$ = $1; } + ; + +star_list : /*empty*/ {$$ = ""; } + | star_list '*' {$$ = $1 + $2;} + ; + +special_star_amp : star_list amp_item { $$ = $1 + $2; } + ; + +stmnt_starter : /*empty*/ {$$ = "";} + | ';' { $$ = ";";} + | ':' { $$ = ":";} //e.g. private: std::string m_name; + ; + +cast_type: nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp + { + $$ = $1 + $2; + $1.erase($1.find_last_not_of(":")+1); + result.m_scope = $1; + result.m_name = $2; + result.m_isPtr = ($6.find("*") != (size_t)-1);; + result.m_isTemplate = true; + result.m_templateInitList = $3 + $4 + $5; + } + | nested_scope_specifier LE_IDENTIFIER special_star_amp + { + $$ = $1 + $2; + $1.erase($1.find_last_not_of(":")+1); + result.m_scope = $1; + result.m_name = $2; + result.m_isPtr = ($3.find("*") != (size_t)-1);; + } + ; + +nested_scope_specifier : /*empty*/ {$$ = "";} + | nested_scope_specifier scope_specifier { $$ = $1 + $2;} + ; + +scope_specifier : LE_IDENTIFIER LE_CLCL {$$ = $1+ $2;} + ; + +%% +void yyerror(char *s) {} + + +void expr_FuncArgList() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } +} + +void expr_consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_expr_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +void expr_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +ExpressionResult &parse_expression(const std::string &in) +{ + result.Reset(); + //provide the lexer with new input + if( !setExprLexerInput(in) ){ + return result; + } + + //printf("parsing...\n"); + cl_expr_parse(); + //do the lexer cleanup + cl_expr_lex_clean(); + + return result; +} diff --git a/CxxParser/expr_lexer.l b/CxxParser/expr_lexer.l new file mode 100644 index 0000000000..56ba97862d --- /dev/null +++ b/CxxParser/expr_lexer.l @@ -0,0 +1,316 @@ +%{ +/* Included code before lex code */ +/*************** Includes and Defines *****************************/ + + +#include "map" +#include "cpp_lexer.h" // YACC generated definitions based on C++ grammar +#include "errno.h" + +#define YYSTYPE std::string + +#include "string" +#include +#include +#include + +extern std::string cl_expr_lval; +extern std::string cl_var_lval; + +bool setExprLexerInput(const std::string &in); +void cl_expr_lex_clean(); + +bool exprIsaTYPE(char *string); +bool exprIsaMACRO(char *string); +static bool defineFound = false; + +/* Prototypes */ +#define WHITE_RETURN(x) /* do nothing */ + +#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */ +#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */ +#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */ +#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN() + +#define IDENTIFIER_RETURN(){\ + if(exprIsaTYPE(yytext)){\ + RETURN_VAL(LE_TYPEDEFname);\ + }else if(exprIsaMACRO(yytext)){\ + RETURN_VAL(LE_MACRO);\ + }else{ RETURN_VAL(LE_IDENTIFIER);}\ + } + + +#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */ +#define NAMED_PPOP_RETURN(x) RETURN_VAL(x) +#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */ +#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */ + +#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */ +#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */ +#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */ +#define RETURN_VAL(x) {\ + cl_expr_lval = yytext;\ + return(x);} +%} + +%option yylineno + +identifier [a-zA-Z_][0-9a-zA-Z_]* + +exponent_part [eE][-+]?[0-9]+ +fractional_constant ([0-9]*"."[0-9]+)|([0-9]+".") +floating_constant (({fractional_constant}{exponent_part}?)|([0-9]+{exponent_part}))[FfLl]? + +integer_suffix_opt ([uU]?[lL]?)|([lL][uU]) +decimal_constant [1-9][0-9]*{integer_suffix_opt} +octal_constant "0"[0-7]*{integer_suffix_opt} +hex_constant "0"[xX][0-9a-fA-F]+{integer_suffix_opt} + +simple_escape [abfnrtv'"?\\] +octal_escape [0-7]{1,3} +hex_escape "x"[0-9a-fA-F]+ + +escape_sequence [\\]({simple_escape}|{octal_escape}|{hex_escape}) +c_char [^'\\\n]|{escape_sequence} +s_char [^"\\\n]|{escape_sequence} + +h_tab [\011] +form_feed [\014] +v_tab [\013] +c_return [\015] + +horizontal_white [ ]|{h_tab} + +%x PREPR +%x WRAP_PREP +%x CPP_COMMENT +%x C_COMMENT + +%% + +"/*" { + BEGIN C_COMMENT; + } + +"//" { + BEGIN CPP_COMMENT; + } + +{horizontal_white}+ { + WHITE_RETURN(' '); + } + +({v_tab}|{c_return}|{form_feed})+ { + WHITE_RETURN(' '); + } + + +({horizontal_white}|{v_tab}|{c_return}|{form_feed})*"\n" { + WHITE_RETURN('\n'); + } + +auto {PA_KEYWORD_RETURN(LE_AUTO);} +break {PA_KEYWORD_RETURN(LE_BREAK);} +case {PA_KEYWORD_RETURN(LE_CASE);} +char {PA_KEYWORD_RETURN(LE_CHAR);} +const {PA_KEYWORD_RETURN(LE_CONST);} +continue {PA_KEYWORD_RETURN(LE_CONTINUE);} +default {PA_KEYWORD_RETURN(LE_DEFAULT);} +define {PP_KEYWORD_RETURN(LE_DEFINE);} +defined {PP_KEYWORD_RETURN(LE_OPDEFINED);} +do {PA_KEYWORD_RETURN(LE_DO);} +double {PA_KEYWORD_RETURN(LE_DOUBLE);} +elif {PP_KEYWORD_RETURN(LE_ELIF);} +else {PPPA_KEYWORD_RETURN(LE_ELSE);} +endif {PP_KEYWORD_RETURN(LE_ENDIF);} +enum {PA_KEYWORD_RETURN(LE_ENUM);} +error {PP_KEYWORD_RETURN(LE_ERROR);} +extern {PA_KEYWORD_RETURN(LE_EXTERN);} +float {PA_KEYWORD_RETURN(LE_FLOAT);} +for {PA_KEYWORD_RETURN(LE_FOR);} +goto {PA_KEYWORD_RETURN(LE_GOTO);} +if {PPPA_KEYWORD_RETURN(LE_IF);} +ifdef {PP_KEYWORD_RETURN(LE_IFDEF);} +ifndef {PP_KEYWORD_RETURN(LE_IFNDEF);} +include {PP_KEYWORD_RETURN(LE_INCLUDE); } +int {PA_KEYWORD_RETURN(LE_INT);} +line {PP_KEYWORD_RETURN(LE_LINE);} +long {PA_KEYWORD_RETURN(LE_LONG);} +pragma {PP_KEYWORD_RETURN(LE_PRAGMA);} +register {PA_KEYWORD_RETURN(LE_REGISTER);} +return {PA_KEYWORD_RETURN(LE_RETURN);} +short {PA_KEYWORD_RETURN(LE_SHORT);} +signed {PA_KEYWORD_RETURN(LE_SIGNED);} +sizeof {PA_KEYWORD_RETURN(LE_SIZEOF);} +static {PA_KEYWORD_RETURN(LE_STATIC);} +struct {PA_KEYWORD_RETURN(LE_STRUCT);} +switch {PA_KEYWORD_RETURN(LE_SWITCH);} +typedef {PA_KEYWORD_RETURN(LE_TYPEDEF);} +undef {PP_KEYWORD_RETURN(LE_UNDEF);} +union {PA_KEYWORD_RETURN(LE_UNION);} +unsigned {PA_KEYWORD_RETURN(LE_UNSIGNED);} +void {PA_KEYWORD_RETURN(LE_VOID);} +volatile {PA_KEYWORD_RETURN(LE_VOLATILE);} +while {PA_KEYWORD_RETURN(LE_WHILE);} + + +class {CPP_KEYWORD_RETURN(LE_CLASS);} +namespace {CPP_KEYWORD_RETURN(LE_NAMESPACE);} +delete {CPP_KEYWORD_RETURN(LE_DELETE);} +friend {CPP_KEYWORD_RETURN(LE_FRIEND);} +inline {CPP_KEYWORD_RETURN(LE_INLINE);} +new {CPP_KEYWORD_RETURN(LE_NEW);} +operator {CPP_KEYWORD_RETURN(LE_OPERATOR);} +overload {CPP_KEYWORD_RETURN(LE_OVERLOAD);} +protected {CPP_KEYWORD_RETURN(LE_PROTECTED);} +private {CPP_KEYWORD_RETURN(LE_PRIVATE);} +public {CPP_KEYWORD_RETURN(LE_PUBLIC);} +this {CPP_KEYWORD_RETURN(LE_THIS);} +virtual {CPP_KEYWORD_RETURN(LE_VIRTUAL);} +template {CPP_KEYWORD_RETURN(LE_TEMPLATE);} +typename {CPP_KEYWORD_RETURN(LE_TYPENAME);} +dynamic_cast {CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);} +static_cast {CPP_KEYWORD_RETURN(LE_STATIC_CAST);} +const_cast {CPP_KEYWORD_RETURN(LE_CONST_CAST);} +reinterpret_cast {CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);} + +{identifier} {IDENTIFIER_RETURN();} + +{decimal_constant} {NUMERICAL_RETURN(LE_INTEGERconstant);} +{octal_constant} {NUMERICAL_RETURN(LE_OCTALconstant);} +{hex_constant} {NUMERICAL_RETURN(LE_HEXconstant);} +{floating_constant} {NUMERICAL_RETURN(LE_FLOATINGconstant);} + + +"L"?[']{c_char}+['] { + NUMERICAL_RETURN(LE_CHARACTERconstant); + } + + +"L"?["]{s_char}*["] { + LITERAL_RETURN(LE_STRINGliteral);} + + + + +"(" {PPOP_RETURN(LE_LP);} +")" {PPOP_RETURN(LE_RP);} +"," {PPOP_RETURN(LE_COMMA);} +^"#" {BEGIN PREPR;} +"{" {ASCIIOP_RETURN(LE_LC);} +"}" {ASCIIOP_RETURN(LE_RC);} +"[" {ASCIIOP_RETURN(LE_LB);} +"]" {ASCIIOP_RETURN(LE_RB);} +"." {ASCIIOP_RETURN(LE_DOT);} +"&" {ASCIIOP_RETURN(LE_AND);} +"*" {ASCIIOP_RETURN(LE_STAR);} +"+" {ASCIIOP_RETURN(LE_PLUS);} +"-" {ASCIIOP_RETURN(LE_MINUS);} +"~" {ASCIIOP_RETURN(LE_NEGATE);} +"!" {ASCIIOP_RETURN(LE_NOT);} +"/" {ASCIIOP_RETURN(LE_DIV);} +"%" {ASCIIOP_RETURN(LE_MOD);} +"<" {ASCIIOP_RETURN(LE_LT);} +">" {ASCIIOP_RETURN(LE_GT);} +"^" {ASCIIOP_RETURN(LE_XOR);} +"|" {ASCIIOP_RETURN(LE_PIPE);} +"?" {ASCIIOP_RETURN(LE_QUESTION);} +":" {ASCIIOP_RETURN(LE_COLON);} +";" {ASCIIOP_RETURN(LE_SEMICOLON);} +"=" {ASCIIOP_RETURN(LE_ASSIGN);} + +".*" {NAMEDOP_RETURN(LE_DOTstar);} +"::" {NAMEDOP_RETURN(LE_CLCL);} +"->" {NAMEDOP_RETURN(LE_ARROW);} +"->*" {NAMEDOP_RETURN(LE_ARROWstar);} +"++" {NAMEDOP_RETURN(LE_ICR);} +"--" {NAMEDOP_RETURN(LE_DECR);} +"<<" {NAMEDOP_RETURN(LE_LS);} +">>" {NAMEDOP_RETURN(LE_RS);} +"<=" {NAMEDOP_RETURN(LE_LE);} +">=" {NAMEDOP_RETURN(LE_GE);} +"==" {NAMEDOP_RETURN(LE_EQ);} +"!=" {NAMEDOP_RETURN(LE_NE);} +"&&" {NAMEDOP_RETURN(LE_ANDAND);} +"||" {NAMEDOP_RETURN(LE_OROR);} +"*=" {NAMEDOP_RETURN(LE_MULTassign);} +"/=" {NAMEDOP_RETURN(LE_DIVassign);} +"%=" {NAMEDOP_RETURN(LE_MODassign);} +"+=" {NAMEDOP_RETURN(LE_PLUSassign);} +"-=" {NAMEDOP_RETURN(LE_MINUSassign);} +"<<=" {NAMEDOP_RETURN(LE_LSassign);} +">>=" {NAMEDOP_RETURN(LE_RSassign);} +"&=" {NAMEDOP_RETURN(LE_ANDassign);} +"^=" {NAMEDOP_RETURN(LE_ERassign);} +"|=" {NAMEDOP_RETURN(LE_ORassign);} +"..." {NAMEDOP_RETURN(LE_ELLIPSIS);} +<> { + //reset lexer + yyterminate(); + } +. {return yytext[0];} +\n { + defineFound = false; + BEGIN INITIAL; + } +\\ { + BEGIN WRAP_PREP; + } +define { + defineFound = true; + } +\n { + BEGIN PREPR; + } +{identifier} { + if(defineFound) + { + defineFound = false; + } + } +{identifier} { + if(defineFound) + { + defineFound = false; + } + } +. {} +. {} +\n {BEGIN INITIAL;} +. {} +"*/" {BEGIN INITIAL;} +. {} +%% + +bool exprIsaTYPE(char *string) +{ + return false; +} + +bool exprIsaMACRO(char *string) +{ + return false; +} + +void cl_expr_lex_clean() +{ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + cl_expr_lineno = 1; +} + +/*******************************************************************/ +bool setExprLexerInput(const std::string &in) +{ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap() +{ + return 1; +} diff --git a/CxxParser/expression_result.cpp b/CxxParser/expression_result.cpp new file mode 100644 index 0000000000..da13f39690 --- /dev/null +++ b/CxxParser/expression_result.cpp @@ -0,0 +1,44 @@ +#include "expression_result.h" + +#define BOOL_TO_STR(b) b ? "true" : "false" + +ExpressionResult::ExpressionResult() +{ + Reset(); +} + +ExpressionResult::~ExpressionResult() +{ +} + +void ExpressionResult::Print() +{ + printf("%s\n", ToString().c_str()); +} + +std::string ExpressionResult::ToString() const +{ + char tmp[256]; + sprintf(tmp, "{m_name:%s, m_isFunc:%s, m_isTemplate:%s, m_isThis:%s, m_isaType:%s, m_isPtr:%s, m_scope:%s, m_templateInitList:%s}", + m_name.c_str(), + BOOL_TO_STR(m_isFunc), + BOOL_TO_STR(m_isTemplate), + BOOL_TO_STR(m_isThis), + BOOL_TO_STR(m_isaType), + BOOL_TO_STR(m_isPtr), + m_scope.c_str(), + m_templateInitList.c_str()); + return tmp; +} + +void ExpressionResult::Reset() +{ + m_isFunc = false; + m_name = ""; + m_isThis = false; + m_isaType = false; + m_isPtr = false; + m_scope = ""; + m_isTemplate = false; + m_templateInitList = ""; +} diff --git a/CxxParser/expression_result.h b/CxxParser/expression_result.h new file mode 100644 index 0000000000..b6e6a9221d --- /dev/null +++ b/CxxParser/expression_result.h @@ -0,0 +1,25 @@ +#ifndef EXPRESSION_RESULT_H +#define EXPRESSION_RESULT_H + +#include "string" + +class ExpressionResult +{ +public: + + bool m_isFunc; + std::string m_name; + bool m_isThis; + bool m_isaType; + bool m_isPtr; + std::string m_scope; + bool m_isTemplate; + std::string m_templateInitList; +public: + ExpressionResult(); + virtual ~ExpressionResult(); + void Reset(); + void Print(); + std::string ToString() const; +}; +#endif //EXPRESSION_RESULT_H diff --git a/CxxParser/function.cpp b/CxxParser/function.cpp new file mode 100644 index 0000000000..e4e5855566 --- /dev/null +++ b/CxxParser/function.cpp @@ -0,0 +1,31 @@ +#include "function.h" + +clFunction::clFunction() +{ + Reset(); +} + +clFunction::~clFunction() +{ +} + +void clFunction::Reset() +{ + m_name = ""; + m_scope = ""; + m_returnValue.Reset(); + m_name = ""; + m_signature = ""; + m_lineno = 0; + m_retrunValusConst = ""; +} + +void clFunction::Print() +{ + fprintf( stdout, "{m_name=%s, m_lineno=%d, m_scope=%s, m_signature=%s, m_retrunValusConst=%s\nm_returnValue=", + m_name.c_str(), m_lineno, m_scope.c_str(), m_signature.c_str(), m_retrunValusConst.c_str()); + m_returnValue.Print(); + fprintf( stdout, "}\n"); + fflush(stdout); +} + diff --git a/CxxParser/function.h b/CxxParser/function.h new file mode 100644 index 0000000000..024de41093 --- /dev/null +++ b/CxxParser/function.h @@ -0,0 +1,30 @@ +#ifndef FUNCTION_H +#define FUNCTION_H + +#include "string" +#include "list" +#include "variable.h" + +class clFunction +{ +public: + std::string m_name; + std::string m_scope; //functions' scope + std::string m_retrunValusConst; // is the return value a const? + std::string m_signature; + Variable m_returnValue; + int m_lineno; + +public: + clFunction(); + virtual ~clFunction(); + + //clear the class content + void Reset(); + + //print the variable to stdout + void Print(); +}; + +typedef std::list FunctionList; +#endif //FUNCTION_H diff --git a/CxxParser/main.cpp b/CxxParser/main.cpp new file mode 100644 index 0000000000..0137556528 --- /dev/null +++ b/CxxParser/main.cpp @@ -0,0 +1,130 @@ +//test the parser +#include "windows.h" +#include "stdio.h" +#include "errno.h" +#include "string.h" +#include "vector" +#include "string" +#include "variable.h" +#include "function.h" +#include "expression_result.h" +#include "map" + +extern std::string get_scope_name(const std::string &in, + std::vector &additionlNS, + const std::map &ignoreTokens); + +extern void get_variables(const std::string &in, VariableList &li, const std::map &ignoreTokens); +extern ExpressionResult &parse_expression(const std::string &in); +extern void get_functions(const std::string &in, FunctionList &li, const std::map &ignoreTokens); + +void testScopeParser(char *buf); +void testVarParser(char *buf); +void testExprParser(char *buf); +void testFuncParser(char *buf); +char *loadFile(const char *fileName); + +int main(){ + char *buf = loadFile("test.h"); + //print the scope name + //testScopeParser(buf); + //testVarParser(buf); + testExprParser(buf); + //testFuncParser(buf); + free(buf); + Sleep(100000); +} + +void testFuncParser(char *buf){ + printf("===== Testing function parser ======\n"); +// time_t start = GetTickCount(); + FunctionList li; + //fflush(stdout); + std::map ignoreTokens; + get_functions(buf, li, ignoreTokens); +// time_t end = GetTickCount(); + for(FunctionList::iterator iter = li.begin(); iter != li.end(); iter++) + { + //test the var parser on the function argument list: + clFunction f = (*iter); + f.Print(); + //testVarParser((char*)f.m_signature.c_str()); + } + +// printf("total time: %d\n", end-start); + printf("matches found: %d\n", li.size()); +} + +void testExprParser(char *buf){ + printf("===== Testing expression parser ======\n"); + ExpressionResult res = parse_expression(buf); + res.Print(); +} + + +void testScopeParser(char *buf){ + printf("===== Testing Scope parser ======\n"); +// time_t start = GetTickCount(); + std::vector additionNS; + std::map ignoreTokens; + + ignoreTokens["wxT"] = true; + std::string scope = get_scope_name(buf, additionNS, ignoreTokens); +// time_t end = GetTickCount(); +// printf("total time: %d\n", end-start); + printf("scope name=%s\n", scope.c_str()); + for(size_t i=0; i ignoreTokens; + get_variables(buf, li, ignoreTokens); +// time_t end = GetTickCount(); + for(VariableList::iterator iter = li.begin(); iter != li.end(); iter++){ + (*iter).Print(); + } +// printf("total time: %d\n", end-start); + printf("matches found: %d\n", li.size()); +} + +//------------------------------------------------------- +// Help function +//------------------------------------------------------- +char *loadFile(const char *fileName){ + FILE *fp; + long len; + char *buf = NULL; + + fp = fopen(fileName, "rb"); + if(!fp){ + printf("failed to open file 'test.h': %s\n", strerror(errno)); + return NULL; + } + + //read the whole file + fseek(fp, 0, SEEK_END); //go to end + len = ftell(fp); //get position at end (length) + fseek(fp, 0, SEEK_SET); //go to begining + buf = (char *)malloc(len+1); //malloc buffer + + //read into buffer + long bytes = fread(buf, sizeof(char), len, fp); + printf("read: %ld\n", bytes); + if(bytes != len){ + fclose(fp); + printf("failed to read from file 'test.h': %s\n", strerror(errno)); + return NULL; + } + + buf[len] = 0; // make it null terminated string + fclose(fp); + return buf; +} diff --git a/CxxParser/scope_parser.cpp b/CxxParser/scope_parser.cpp new file mode 100644 index 0000000000..5bbec0dc98 --- /dev/null +++ b/CxxParser/scope_parser.cpp @@ -0,0 +1,1187 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_scope_parse +#define yylex cl_scope_lex +#define yyerror cl_scope_error +#define yychar cl_scope_char +#define yyval cl_scope_val +#define yylval cl_scope_lval +#define yydebug cl_scope_debug +#define yynerrs cl_scope_nerrs +#define yyerrflag cl_scope_errflag +#define yyss cl_scope_ss +#define yyssp cl_scope_ssp +#define yyvs cl_scope_vs +#define yyvsp cl_scope_vsp +#define yylhs cl_scope_lhs +#define yylen cl_scope_len +#define yydefred cl_scope_defred +#define yydgoto cl_scope_dgoto +#define yysindex cl_scope_sindex +#define yyrindex cl_scope_rindex +#define yygindex cl_scope_gindex +#define yytable cl_scope_table +#define yycheck cl_scope_check +#define yyname cl_scope_name +#define yyrule cl_scope_rule +#define YYPREFIX "cl_scope_" +/* Copyright Eran Ifrah(c) */ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" + +#define YYDEBUG_LEXER_TEXT (cl_scope_lval) +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +int cl_scope_parse(); +void cl_scope_error(char *string); +void syncParser(); + +static std::vector gs_additionlNS; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern bool setLexerInput(const std::string &in, const std::map &ignoreTokens); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern void printScopeName(); /*print the current scope name*/ +extern void increaseScope(); /*increase scope with anonymouse value*/ +extern std::string getCurrentScope(); +extern void cl_scope_lex_clean(); +extern void cl_scope_less(int count); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_scope_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 11, 11, 13, 13, 12, 12, 14, 14, 15, 15, + 15, 16, 18, 18, 17, 17, 17, 17, 19, 19, + 19, 20, 8, 7, 7, 25, 25, 3, 3, 9, + 10, 26, 26, 27, 27, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 29, 29, 32, 6, + 33, 6, 34, 6, 22, 22, 35, 36, 35, 30, + 30, 21, 21, 37, 37, 38, 38, 23, 24, 24, + 24, 31, 31, 31, 40, 4, 41, 41, 41, 41, + 42, 39, 39, 39, 5, +}; +short cl_scope_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 2, 1, 3, 1, 1, 0, 4, 0, 1, + 3, 3, 0, 3, 0, 1, 1, 1, 0, 1, + 3, 4, 4, 4, 3, 0, 1, 6, 8, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 0, 11, + 0, 10, 0, 11, 0, 2, 2, 0, 4, 0, + 1, 0, 1, 0, 1, 0, 2, 2, 0, 1, + 1, 3, 3, 6, 0, 7, 0, 2, 2, 2, + 2, 0, 1, 3, 4, +}; +short cl_scope_defred[] = { 10, + 0, 20, 0, 120, 51, 121, 50, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 53, + 52, 111, 0, 0, 43, 125, 135, 25, 26, 23, + 0, 0, 44, 47, 0, 113, 105, 0, 22, 0, + 28, 0, 0, 105, 0, 0, 133, 24, 48, 0, + 6, 1, 4, 2, 5, 3, 8, 7, 9, 0, + 0, 0, 116, 0, 106, 0, 0, 131, 0, 126, + 36, 38, 37, 0, 30, 0, 84, 85, 72, 76, + 77, 68, 69, 78, 79, 80, 81, 70, 71, 75, + 73, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 86, 66, 67, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 74, 0, 0, 55, 107, 0, + 123, 0, 54, 0, 122, 101, 0, 0, 130, 129, + 128, 134, 0, 49, 0, 82, 83, 0, 40, 105, + 0, 117, 115, 118, 103, 0, 108, 99, 31, 0, + 32, 0, 116, 0, 109, 0, 98, 0, 0, 0, + 41, 124, 0, 0, 102, 0, 34, 42, 104, 100, +}; +short cl_scope_dgoto[] = { 1, + 73, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 40, 41, 42, 23, 84, 85, 86, 161, 148, 149, + 150, 53, 131, 17, 45, 33, 74, 128, 168, 34, + 54, 169, 156, 166, 75, 151, 154, 132, 56, 48, + 78, 57, +}; +short cl_scope_sindex[] = { 0, + -19, 0, -288, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -234, -259, -254, -246, + 12, -108, -227, 19, -50, -43, -239, -42, 0, 0, + 0, 0, -255, -186, 0, 0, 0, 0, 0, 0, + -214, -7, 0, 0, -213, 0, 0, -209, 0, -239, + 0, -35, -31, 0, 31, -22, 0, 0, 0, -211, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -33, + -59, -244, 0, 56, 0, -241, -232, 0, -209, 0, + 0, 0, 0, -10, 0, -206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 57, 7, 0, 0, -186, + 0, 14, 0, 59, 0, 0, -58, 61, 0, 0, + 0, 0, -211, 0, 42, 0, 0, -2, 0, 0, + -223, 0, 0, 0, 0, 49, 0, 0, 0, -186, + 0, -186, 0, -194, 0, -186, 0, -6, -186, 2, + 0, 0, -58, -4, 0, -3, 0, 0, 0, 0, +}; +short cl_scope_rindex[] = { 0, + -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -83, 0, 0, 0, + 0, 0, -57, 0, 0, 0, 6, 0, 0, 0, + 0, 0, -193, 55, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -14, 0, 6, + 0, 0, 0, 0, -13, 0, 0, 0, 0, -41, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, + 0, -38, 0, 0, 0, 0, 74, 0, 0, 0, + 0, 0, -182, 0, -8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, -36, + 0, -181, 0, 0, 0, 4, 0, 0, 4, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, +}; +short cl_scope_gindex[] = { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 0, 0, 0, 0, -17, 0, 0, -32, -37, + -18, -34, -55, 0, 0, 0, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 50, +}; +#define YYTABLESIZE 358 +short cl_scope_table[] = { 124, + 130, 157, 29, 119, 121, 114, 126, 39, 117, 115, + 112, 119, 125, 118, 29, 47, 116, 135, 54, 76, + 116, 79, 60, 114, 18, 39, 113, 116, 114, 132, + 127, 19, 30, 143, 39, 33, 50, 20, 6, 4, + 116, 162, 27, 24, 116, 162, 116, 70, 25, 21, + 70, 153, 39, 38, 51, 152, 26, 127, 133, 163, + 120, 137, 39, 177, 116, 31, 21, 21, 110, 32, + 134, 27, 36, 139, 138, 140, 141, 35, 22, 37, + 43, 29, 81, 82, 83, 44, 46, 59, 49, 52, + 122, 77, 123, 55, 72, 136, 145, 146, 155, 147, + 158, 160, 80, 5, 165, 7, 167, 172, 173, 46, + 132, 127, 144, 54, 33, 164, 175, 178, 179, 180, + 35, 112, 58, 97, 171, 159, 112, 170, 142, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 119, 119, 119, 0, 174, 119, 0, + 176, 119, 0, 0, 119, 0, 0, 119, 119, 119, + 119, 119, 0, 0, 119, 119, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 27, 27, 119, 119, 27, + 112, 0, 119, 0, 0, 27, 119, 0, 119, 27, + 27, 27, 27, 0, 28, 27, 27, 0, 119, 0, + 110, 110, 0, 0, 0, 110, 0, 0, 27, 27, + 0, 110, 0, 27, 0, 110, 110, 110, 110, 27, + 0, 110, 110, 0, 0, 0, 61, 62, 0, 0, + 0, 63, 0, 0, 110, 0, 2, 64, 0, 0, + 0, 0, 65, 66, 67, 110, 0, 68, 69, 0, + 0, 0, 0, 114, 0, 87, 88, 0, 0, 0, + 70, 35, 0, 0, 114, 0, 112, 0, 129, 129, + 116, 71, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 116, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 112, 3, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 0, 0, 0, + 0, 0, 112, 112, 0, 0, 0, 112, 108, 0, + 0, 0, 0, 112, 0, 0, 0, 0, 112, 112, + 112, 0, 0, 112, 112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 112, +}; +short cl_scope_check[] = { 33, + 60, 60, 44, 37, 38, 44, 40, 44, 42, 43, + 44, 126, 46, 47, 123, 34, 38, 73, 40, 54, + 42, 44, 58, 62, 313, 62, 60, 61, 62, 44, + 44, 266, 260, 44, 44, 44, 44, 272, 58, 59, + 38, 44, 126, 303, 42, 44, 44, 292, 303, 44, + 292, 38, 62, 293, 62, 42, 303, 91, 303, 62, + 94, 303, 302, 62, 62, 293, 301, 62, 126, 297, + 72, 60, 123, 306, 76, 308, 309, 59, 313, 123, + 123, 123, 294, 295, 296, 341, 273, 123, 303, 303, + 124, 61, 126, 303, 126, 40, 303, 41, 40, 93, + 40, 60, 125, 123, 328, 125, 58, 163, 303, 303, + 125, 125, 123, 40, 123, 150, 123, 173, 123, 123, + 303, 303, 50, 123, 162, 143, 123, 160, 79, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 258, 259, 260, -1, 166, 263, -1, + 169, 266, -1, -1, 269, -1, -1, 272, 273, 274, + 275, 276, -1, -1, 279, 280, -1, -1, -1, -1, + -1, -1, -1, -1, 258, 259, 260, 292, 293, 263, + 126, -1, 297, -1, -1, 269, 301, -1, 303, 273, + 274, 275, 276, -1, 303, 279, 280, -1, 313, -1, + 258, 259, -1, -1, -1, 263, -1, -1, 292, 293, + -1, 269, -1, 297, -1, 273, 274, 275, 276, 303, + -1, 279, 280, -1, -1, -1, 258, 259, -1, -1, + -1, 263, -1, -1, 292, -1, 256, 269, -1, -1, + -1, -1, 274, 275, 276, 303, -1, 279, 280, -1, + -1, -1, -1, 292, -1, 289, 290, -1, -1, -1, + 292, 303, -1, -1, 303, -1, 303, -1, 328, 328, + 292, 303, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 303, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 303, 314, 329, 330, 331, 332, 333, + 334, 335, 336, 337, 338, 339, 340, -1, -1, -1, + -1, -1, 258, 259, -1, -1, -1, 263, 328, -1, + -1, -1, -1, 269, -1, -1, -1, -1, 274, 275, + 276, -1, -1, 279, 280, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 292, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 303, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_scope_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','",0,"'.'","'/'",0,0,0,0,0, +0,0,0,0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,"'{'","'|'","'}'","'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE", +"LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE", +"LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN","LE_RETURN", +"LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED","LE_CONTINUE", +"LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF","LE_VOLATILE", +"LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE","LE_THIS", +"LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL", +"LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME", +"LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant", +"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND", +"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname", +"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE", +"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar", +"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign", +"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign", +"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST", +"LE_REINTERPRET_CAST", +}; +char *cl_scope_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"external_decl : class_decl", +"external_decl : enum_decl", +"external_decl : union_decl", +"external_decl : function_decl", +"external_decl : namespace_decl", +"external_decl : using_namespace", +"external_decl : scope_reducer", +"external_decl : scope_increaer", +"external_decl : error", +"template_arg :", +"template_arg : template_specifiter LE_IDENTIFIER", +"template_arg_list : template_arg", +"template_arg_list : template_arg_list ',' template_arg", +"template_specifiter : LE_CLASS", +"template_specifiter : LE_TYPENAME", +"opt_template_qualifier :", +"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'", +"derivation_list :", +"derivation_list : parent_class", +"derivation_list : derivation_list ',' parent_class", +"parent_class : access_specifier LE_IDENTIFIER opt_template_specifier", +"opt_template_specifier :", +"opt_template_specifier : '<' template_parameter_list '>'", +"access_specifier :", +"access_specifier : LE_PUBLIC", +"access_specifier : LE_PRIVATE", +"access_specifier : LE_PROTECTED", +"template_parameter_list :", +"template_parameter_list : template_parameter", +"template_parameter_list : template_parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"using_namespace : LE_USING LE_NAMESPACE LE_IDENTIFIER ';'", +"namespace_decl : stmnt_starter LE_NAMESPACE LE_IDENTIFIER '{'", +"namespace_decl : stmnt_starter LE_NAMESPACE '{'", +"opt_class_qualifier :", +"opt_class_qualifier : LE_MACRO", +"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER '{'", +"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER ':' derivation_list '{'", +"scope_reducer : '}'", +"scope_increaer : '{'", +"class_keyword : LE_CLASS", +"class_keyword : LE_STRUCT", +"func_name : LE_IDENTIFIER", +"func_name : LE_OPERATOR any_operator", +"any_operator : '+'", +"any_operator : '='", +"any_operator : '*'", +"any_operator : '/'", +"any_operator : '%'", +"any_operator : '^'", +"any_operator : '&'", +"any_operator : '|'", +"any_operator : '~'", +"any_operator : '!'", +"any_operator : '<'", +"any_operator : '>'", +"any_operator : LE_LS", +"any_operator : LE_RS", +"any_operator : LE_ANDAND", +"any_operator : LE_OROR", +"any_operator : LE_ARROW", +"any_operator : LE_ARROWstar", +"any_operator : '.'", +"any_operator : LE_DOTstar", +"any_operator : LE_ICR", +"any_operator : LE_DECR", +"any_operator : LE_LE", +"any_operator : LE_GE", +"any_operator : LE_EQ", +"any_operator : LE_NE", +"any_operator : '(' ')'", +"any_operator : '[' ']'", +"any_operator : LE_NEW", +"any_operator : LE_DELETE", +"any_operator : ','", +"any_operator : LE_MULTassign", +"any_operator : LE_DIVassign", +"any_operator : LE_MODassign", +"any_operator : LE_PLUSassign", +"any_operator : LE_MINUSassign", +"any_operator : LE_LSassign", +"any_operator : LE_RSassign", +"any_operator : LE_ANDassign", +"any_operator : LE_ERassign", +"any_operator : LE_ORassign", +"optional_initialization_list :", +"optional_initialization_list : ':'", +"$$1 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$1 const_spec '{'", +"$$2 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier func_name '(' $$2 optional_initialization_list '{'", +"$$3 :", +"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier '~' func_name '(' $$3 const_spec '{'", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"$$4 :", +"scope_specifier : LE_IDENTIFIER '<' $$4 LE_CLCL", +"virtual_spec :", +"virtual_spec : LE_VIRTUAL", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : ':'", +"variable_decl : nested_scope_specifier basic_type_name special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp", +"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp", +"$$5 :", +"enum_decl : stmnt_starter LE_ENUM LE_IDENTIFIER '{' $$5 enum_arg_list '}'", +"enum_optional_assign :", +"enum_optional_assign : '=' LE_HEXconstant", +"enum_optional_assign : '=' LE_OCTALconstant", +"enum_optional_assign : '=' LE_INTEGERconstant", +"enum_argument : LE_IDENTIFIER enum_optional_assign", +"enum_arg_list :", +"enum_arg_list : enum_argument", +"enum_arg_list : enum_arg_list ',' enum_argument", +"union_decl : stmnt_starter LE_UNION LE_IDENTIFIER '{'", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + +void syncParser(){ + //move lexer to the next ';' line or scope opening '{' + //int ch = cl_scope_lex(); +} + +//swallow all tokens up to the first '{' +void consumeInitializationList(){ + while( true ){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + //keep the function signature + if(ch == '{'){ + cl_scope_less(0); + break; + } + } +} + +//swallow all tokens up to the first '{' +void consumeBody (){ + std::string cs = "{"; + int depth = 1; + while( true ) { + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + cs += cl_scope_text; + cs += " "; + + if(ch == '{'){ + depth++; + }else if(ch == '}'){ + depth--; + if(depth == 0){ + cl_scope_less(0); + break; + } + } + } + printf("Consumed body: [%s]\n", cs.c_str()); +} + +void consumeFuncArgList(){ + int depth = 1; + while(depth > 0){ + int ch = cl_scope_lex(); + if(ch == 0){ + break; + } + + if(ch == ')'){ + depth--; + continue; + } + else if(ch == '('){ + depth ++ ; + continue; + } + } +} + +/** + * consume all token until matching closing brace is found + */ +void consumeDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + if(ch ==0) + { + break; + } + if(ch == '}') + { + depth--; + if(depth == 0) currentScope.pop_back();//reduce the scope + continue; + } + else if(ch == '{') + { + depth ++ ; + continue; + } + } + +} + +void consumeTemplateDecl() +{ + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + fflush(stdout); + if(ch ==0){ + break; + } + + if(ch == '>') + { + depth--; + continue; + } + else if(ch == '<') + { + depth ++ ; + continue; + } + } +} + +// return the scope name at the end of the input string +std::string get_scope_name( const std::string &in, + std::vector &additionalNS, + const std::map &ignoreTokens) +{ + if( !setLexerInput(in, ignoreTokens) ){ + return ""; + } + + //call tghe main parsing routine + cl_scope_parse(); + std::string scope = getCurrentScope(); + //do the lexer cleanup + cl_scope_lex_clean(); + + for(size_t i=0; i= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 20: +{ + /*printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_scope_text, cl_scope_lineno);*/ + syncParser(); + } +break; +case 21: +{ yyval = "";} +break; +case 22: +{yyval = yyvsp[-1] + " " + yyvsp[0];} +break; +case 23: +{ yyval = yyvsp[0]; } +break; +case 24: +{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; } +break; +case 25: +{ yyval = yyvsp[0]; } +break; +case 26: +{ yyval = yyvsp[0]; } +break; +case 28: +{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 29: +{yyval = "";} +break; +case 30: +{yyval = yyvsp[0];} +break; +case 31: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0];} +break; +case 33: +{yyval = "";} +break; +case 34: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 35: +{yyval = "";} +break; +case 36: +{yyval = yyvsp[0];} +break; +case 37: +{yyval = yyvsp[0];} +break; +case 38: +{yyval = yyvsp[0];} +break; +case 39: +{yyval = "";} +break; +case 40: +{yyval = yyvsp[0];} +break; +case 41: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 42: +{yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];} +break; +case 43: +{ + /*printf("Found using namespace %s\n", $3.c_str());*/ + gs_additionlNS.push_back(yyvsp[-1]); + } +break; +case 44: +{ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + } +break; +case 45: +{ + /*anonymouse namespace*/ + increaseScope(); + printScopeName(); + } +break; +case 46: +{yyval = "";} +break; +case 47: +{yyval = yyvsp[0];} +break; +case 48: +{ + /*increase the scope level*/ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + } +break; +case 49: +{ + /*increase the scope level*/ + currentScope.push_back(yyvsp[-3]); + printScopeName(); + } +break; +case 50: +{ + if(currentScope.empty()) + { + /*fatal error!*/ + /*printf("CodeLite: fatal error - cant go beyond global scope!\n");*/ + } + else + { + currentScope.pop_back(); + printScopeName(); + } + } +break; +case 51: +{ + /*increase random scope*/ + increaseScope(); + printScopeName(); + } +break; +case 52: +{yyval = yyvsp[0];} +break; +case 53: +{yyval = yyvsp[0];} +break; +case 54: +{yyval = yyvsp[0];} +break; +case 55: +{yyval = yyvsp[-1];} +break; +case 98: +{consumeInitializationList();} +break; +case 99: +{consumeFuncArgList();} +break; +case 100: +{ + /*trim down trailing '::' from scope name*/ + if(yyvsp[-5].find_last_not_of(":") != std::string::npos){ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-5]); + printScopeName(); + } +break; +case 101: +{consumeFuncArgList();} +break; +case 102: +{ + + /*trim down trailing '::' from scope name*/ + if(yyvsp[-5].find_last_not_of(":") != std::string::npos){ + yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-5]); + printScopeName(); + } +break; +case 103: +{consumeFuncArgList();} +break; +case 104: +{ + + /*trim down trailing '::' from scope name*/ + if(yyvsp[-6].find_last_not_of(":") != std::string::npos){ + yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1); + } + currentScope.push_back(yyvsp[-6]); + printScopeName(); + } +break; +case 105: +{yyval = "";} +break; +case 106: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 107: +{yyval = yyvsp[-1]+ yyvsp[0];} +break; +case 108: +{consumeTemplateDecl();} +break; +case 109: +{yyval = yyvsp[-3] + yyvsp[0];} +break; +case 110: +{yyval = ""; } +break; +case 111: +{ yyval = yyvsp[0]; } +break; +case 112: +{yyval = ""; } +break; +case 113: +{ yyval = yyvsp[0]; } +break; +case 114: +{yyval = ""; } +break; +case 115: +{ yyval = yyvsp[0]; } +break; +case 116: +{yyval = ""; } +break; +case 117: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 118: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 119: +{yyval = "";} +break; +case 120: +{ yyval = ";";} +break; +case 121: +{ yyval = ":";} +break; +case 122: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 123: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 124: +{yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;} +break; +case 125: +{currentScope.push_back(yyvsp[-1]); printScopeName();} +break; +case 126: +{ + currentScope.pop_back();/*reduce the scope*/ + printScopeName(); + /*printf("found enum: %s, args are: %s\n", $2.c_str(), $5.c_str());*/ + } +break; +case 127: +{yyval = "";} +break; +case 128: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 129: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 130: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 131: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 132: +{yyval = "";} +break; +case 133: +{yyval = yyvsp[0];} +break; +case 134: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 135: +{ + currentScope.push_back(yyvsp[-1]); + printScopeName(); + consumeDecl(); + printScopeName(); + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CxxParser/var_parser.cpp b/CxxParser/var_parser.cpp new file mode 100644 index 0000000000..f70f1e3a6a --- /dev/null +++ b/CxxParser/var_parser.cpp @@ -0,0 +1,793 @@ +#ifndef lint +static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define yyclearin (yychar=(-1)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING (yyerrflag!=0) +#define yyparse cl_var_parse +#define yylex cl_var_lex +#define yyerror cl_var_error +#define yychar cl_var_char +#define yyval cl_var_val +#define yylval cl_var_lval +#define yydebug cl_var_debug +#define yynerrs cl_var_nerrs +#define yyerrflag cl_var_errflag +#define yyss cl_var_ss +#define yyssp cl_var_ssp +#define yyvs cl_var_vs +#define yyvsp cl_var_vsp +#define yylhs cl_var_lhs +#define yylen cl_var_len +#define yydefred cl_var_defred +#define yydgoto cl_var_dgoto +#define yysindex cl_var_sindex +#define yyrindex cl_var_rindex +#define yygindex cl_var_gindex +#define yytable cl_var_table +#define yycheck cl_var_check +#define yyname cl_var_name +#define yyrule cl_var_rule +#define YYPREFIX "cl_var_" + +/* Copyright Eran Ifrah(c) */ +/*************** Includes and Defines *****************************/ +#include "string" +#include "vector" +#include "stdio.h" +#include "map" +#include "variable.h" + +#ifdef yylex +#undef yylex +#define yylex cl_scope_lex +#endif + +#define YYSTYPE std::string +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ + +void cl_scope_error(char *string); +int cl_var_parse(); +void syncParser(); + +static VariableList *gs_vars = NULL; +static std::vector gs_names; + +Variable curr_var; +std::string temdecl; + +/*---------------------------------------------*/ +/* externs defined in the lexer*/ +/*---------------------------------------------*/ +extern char *cl_scope_text; +extern int cl_scope_lex(); +extern int cl_scope_lineno; +extern std::vector currentScope; +extern bool setLexerInput(const std::string &in, const std::map &ignoreMap); +extern void cl_scope_lex_clean(); + +/*************** Standard ytab.c continues here *********************/ +#define LE_AUTO 257 +#define LE_DOUBLE 258 +#define LE_INT 259 +#define LE_STRUCT 260 +#define LE_BREAK 261 +#define LE_ELSE 262 +#define LE_LONG 263 +#define LE_SWITCH 264 +#define LE_CASE 265 +#define LE_ENUM 266 +#define LE_REGISTER 267 +#define LE_TYPEDEF 268 +#define LE_CHAR 269 +#define LE_EXTERN 270 +#define LE_RETURN 271 +#define LE_UNION 272 +#define LE_CONST 273 +#define LE_FLOAT 274 +#define LE_SHORT 275 +#define LE_UNSIGNED 276 +#define LE_CONTINUE 277 +#define LE_FOR 278 +#define LE_SIGNED 279 +#define LE_VOID 280 +#define LE_DEFAULT 281 +#define LE_GOTO 282 +#define LE_SIZEOF 283 +#define LE_VOLATILE 284 +#define LE_DO 285 +#define LE_IF 286 +#define LE_STATIC 287 +#define LE_WHILE 288 +#define LE_NEW 289 +#define LE_DELETE 290 +#define LE_THIS 291 +#define LE_OPERATOR 292 +#define LE_CLASS 293 +#define LE_PUBLIC 294 +#define LE_PROTECTED 295 +#define LE_PRIVATE 296 +#define LE_VIRTUAL 297 +#define LE_FRIEND 298 +#define LE_INLINE 299 +#define LE_OVERLOAD 300 +#define LE_TEMPLATE 301 +#define LE_TYPENAME 302 +#define LE_IDENTIFIER 303 +#define LE_STRINGliteral 304 +#define LE_FLOATINGconstant 305 +#define LE_INTEGERconstant 306 +#define LE_CHARACTERconstant 307 +#define LE_OCTALconstant 308 +#define LE_HEXconstant 309 +#define LE_POUNDPOUND 310 +#define LE_CComment 311 +#define LE_CPPComment 312 +#define LE_NAMESPACE 313 +#define LE_USING 314 +#define LE_TYPEDEFname 315 +#define LE_ARROW 316 +#define LE_ICR 317 +#define LE_DECR 318 +#define LE_LS 319 +#define LE_RS 320 +#define LE_LE 321 +#define LE_GE 322 +#define LE_EQ 323 +#define LE_NE 324 +#define LE_ANDAND 325 +#define LE_OROR 326 +#define LE_ELLIPSIS 327 +#define LE_CLCL 328 +#define LE_DOTstar 329 +#define LE_ARROWstar 330 +#define LE_MULTassign 331 +#define LE_DIVassign 332 +#define LE_MODassign 333 +#define LE_PLUSassign 334 +#define LE_MINUSassign 335 +#define LE_LSassign 336 +#define LE_RSassign 337 +#define LE_ANDassign 338 +#define LE_ERassign 339 +#define LE_ORassign 340 +#define LE_MACRO 341 +#define LE_DYNAMIC_CAST 342 +#define LE_STATIC_CAST 343 +#define LE_CONST_CAST 344 +#define LE_REINTERPRET_CAST 345 +#define YYERRCODE 256 +short cl_var_lhs[] = { -1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 4, 2, 2, 5, 5, 5, 6, 6, 6, + 3, 12, 13, 13, 13, 13, 13, 14, 14, 8, + 8, 7, 7, 15, 15, 16, 16, 9, 10, 10, + 10, 10, 10, 10, 10, 11, 11, 11, +}; +short cl_var_len[] = { 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 2, 0, 2, 1, 0, 1, 3, 4, 4, 6, + 5, 1, 1, 1, 1, 1, 1, 2, 5, 0, + 2, 0, 1, 0, 1, 0, 2, 2, 0, 1, + 1, 1, 1, 1, 1, 2, 3, 6, +}; +short cl_var_defred[] = { 10, + 0, 14, 11, 0, 40, 45, 42, 41, 43, 44, + 13, 0, 33, 0, 36, 6, 1, 4, 2, 5, + 3, 8, 7, 9, 46, 0, 0, 0, 0, 31, + 22, 0, 35, 37, 38, 28, 0, 26, 23, 24, + 25, 27, 21, 0, 16, 30, 0, 0, 0, 17, + 29, 0, 36, 0, 18, 19, 0, 0, +}; +short cl_var_dgoto[] = { 1, + 25, 3, 11, 4, 44, 45, 46, 26, 27, 12, + 15, 32, 43, 30, 35, 28, +}; +short cl_var_sindex[] = { 0, + -249, 0, 0, -30, 0, 0, 0, 0, 0, 0, + 0, -262, 0, -169, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -289, -287, -34, -60, 0, + 0, 68, 0, 0, 0, 0, -262, 0, 0, 0, + 0, 0, 0, -26, 0, 0, -262, -301, -216, 0, + 0, -59, 0, -262, 0, 0, -24, -301, +}; +short cl_var_rindex[] = { 0, + -37, 0, 0, -224, 0, 0, 0, 0, 0, 0, + 0, -178, 0, -271, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -32, -36, 0, + 0, 0, 0, 0, 0, 0, -29, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -178, -33, 0, 0, + 0, -25, 0, -29, 0, 0, 0, -21, +}; +short cl_var_gindex[] = { 0, + -9, 0, 0, 0, -10, -1, 36, 8, -27, 0, + 0, 0, 0, 0, 0, 0, +}; +#define YYTABLESIZE 274 +short cl_var_table[] = { 37, + 54, 47, 12, 33, 48, 47, 2, 34, 48, 7, + 13, 34, 36, 29, 15, 31, 36, 47, 36, 47, + 12, 12, 20, 12, 55, 56, 51, 10, 5, 34, + 6, 30, 15, 39, 39, 48, 36, 58, 39, 53, + 20, 16, 17, 57, 39, 50, 18, 14, 39, 39, + 39, 39, 19, 49, 39, 39, 0, 20, 21, 22, + 0, 0, 23, 24, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 39, 32, + 32, 0, 0, 0, 32, 12, 52, 12, 16, 17, + 32, 0, 8, 18, 9, 32, 32, 32, 0, 19, + 32, 32, 0, 0, 20, 21, 22, 42, 41, 23, + 24, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32, 0, 39, 0, 40, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 12, 0, 0, 0, 12, 0, 0, 32, 32, + 0, 12, 0, 32, 0, 12, 12, 12, 12, 32, + 0, 12, 12, 0, 32, 32, 32, 0, 0, 32, + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 12, 47, 36, 36, 48, + 34, 0, 0, 32, +}; +short cl_var_check[] = { 60, + 60, 38, 40, 38, 38, 42, 256, 42, 42, 40, + 273, 44, 38, 303, 44, 303, 42, 44, 44, 44, + 58, 59, 44, 61, 52, 53, 328, 58, 59, 62, + 61, 303, 62, 258, 259, 62, 62, 62, 263, 49, + 62, 258, 259, 54, 269, 47, 263, 12, 273, 274, + 275, 276, 269, 46, 279, 280, -1, 274, 275, 276, + -1, -1, 279, 280, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 303, 258, + 259, -1, -1, -1, 263, 123, 303, 125, 258, 259, + 269, -1, 123, 263, 125, 274, 275, 276, -1, 269, + 279, 280, -1, -1, 274, 275, 276, 40, 41, 279, + 280, 44, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 303, -1, 59, -1, 61, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 258, 259, -1, -1, -1, 263, -1, -1, 258, 259, + -1, 269, -1, 263, -1, 273, 274, 275, 276, 269, + -1, 279, 280, -1, 274, 275, 276, -1, -1, 279, + 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 303, 303, 328, 328, 303, + 303, -1, -1, 303, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 1 +#endif +#define YYMAXTOKEN 345 +#if YYDEBUG +char *cl_var_name[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'", +"'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE", +"LE_LONG","LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR", +"LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT", +"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT", +"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE", +"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC", +"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD", +"LE_TEMPLATE","LE_TYPENAME","LE_IDENTIFIER","LE_STRINGliteral", +"LE_FLOATINGconstant","LE_INTEGERconstant","LE_CHARACTERconstant", +"LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND","LE_CComment", +"LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname","LE_ARROW","LE_ICR", +"LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE","LE_ANDAND","LE_OROR", +"LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar","LE_MULTassign", +"LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign","LE_LSassign", +"LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign","LE_MACRO", +"LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST","LE_REINTERPRET_CAST", +}; +char *cl_var_rule[] = { +"$accept : translation_unit", +"basic_type_name : LE_INT", +"basic_type_name : LE_CHAR", +"basic_type_name : LE_SHORT", +"basic_type_name : LE_LONG", +"basic_type_name : LE_FLOAT", +"basic_type_name : LE_DOUBLE", +"basic_type_name : LE_SIGNED", +"basic_type_name : LE_UNSIGNED", +"basic_type_name : LE_VOID", +"translation_unit :", +"translation_unit : translation_unit external_decl", +"$$1 :", +"external_decl : $$1 variables", +"external_decl : error", +"parameter_list :", +"parameter_list : template_parameter", +"parameter_list : parameter_list ',' template_parameter", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp", +"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp", +"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +"variables : stmnt_starter variable_decl special_star_amp variable_name_list postfix", +"variable_name_list : LE_IDENTIFIER", +"postfix : ';'", +"postfix : '='", +"postfix : ')'", +"postfix : ','", +"postfix : '('", +"scope_specifier : LE_IDENTIFIER LE_CLCL", +"scope_specifier : LE_IDENTIFIER '<' parameter_list '>' LE_CLCL", +"nested_scope_specifier :", +"nested_scope_specifier : nested_scope_specifier scope_specifier", +"const_spec :", +"const_spec : LE_CONST", +"amp_item :", +"amp_item : '&'", +"star_list :", +"star_list : star_list '*'", +"special_star_amp : star_list amp_item", +"stmnt_starter :", +"stmnt_starter : ';'", +"stmnt_starter : '{'", +"stmnt_starter : '('", +"stmnt_starter : '}'", +"stmnt_starter : ':'", +"stmnt_starter : '='", +"variable_decl : const_spec basic_type_name", +"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER", +"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'", +}; +#endif +#ifndef YYSTYPE +typedef int YYSTYPE; +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short yyss[YYSTACKSIZE]; +YYSTYPE yyvs[YYSTACKSIZE]; +#define yystacksize YYSTACKSIZE +void yyerror(char *s) {} + + +std::string var_consumeFuncArgList() +{ + std::string consumedData; + int depth = 1; + while(depth > 0) + { + int ch = cl_scope_lex(); + //printf("ch=%d\n", ch); + //fflush(stdout); + if(ch ==0){ + break; + } + + consumedData += cl_scope_text; + consumedData += " "; + if(ch == ')') + { + depth--; + continue; + } + else if(ch == '(') + { + depth ++ ; + continue; + } + } + return consumedData; +} + +void var_syncParser(){ + //dont do anything, a hook to allow us to implement some + //nice error recovery if needed +} + +// return the scope name at the end of the input string +void get_variables(const std::string &in, VariableList &li, const std::map &ignoreMap) +{ + //provide the lexer with new input + if( !setLexerInput(in, ignoreMap) ) + { + return; + } + + //set the parser local output to our variable list + gs_vars = &li; + + //call tghe main parsing routine + cl_var_parse(); + gs_vars = NULL; + + //do the lexer cleanup + cl_scope_lex_clean(); +} +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse() +{ + register int yym, yyn, yystate; +#if YYDEBUG + register char *yys; + extern char *getenv(); + + if (yys = getenv("YYDEBUG")) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if (yyn = yydefred[yystate]) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#ifdef lint + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#ifdef lint + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +{ yyval = yyvsp[0]; } +break; +case 2: +{ yyval = yyvsp[0]; } +break; +case 3: +{ yyval = yyvsp[0]; } +break; +case 4: +{ yyval = yyvsp[0]; } +break; +case 5: +{ yyval = yyvsp[0]; } +break; +case 6: +{ yyval = yyvsp[0]; } +break; +case 7: +{ yyval = yyvsp[0]; } +break; +case 8: +{ yyval = yyvsp[0]; } +break; +case 9: +{ yyval = yyvsp[0]; } +break; +case 12: +{curr_var.Reset(); gs_names.clear();} +break; +case 14: +{ + yyclearin; /*clear lookahead token*/ + yyerrok; + /*printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_var_lval.c_str(), cl_scope_lineno);*/ + var_syncParser(); + } +break; +case 15: +{yyval = "";} +break; +case 16: +{yyval = yyvsp[0];} +break; +case 17: +{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 18: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 19: +{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];} +break; +case 20: +{yyval = yyvsp[-5] + " " + yyvsp[-4] + " " + yyvsp[-3] +yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 21: +{ + if(gs_vars) + { + Variable var; + std::string pattern; + curr_var.m_pattern = "/^"; + curr_var.m_pattern += yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + "$/"; + curr_var.m_isPtr = (yyvsp[-2].find("*") != (size_t)-1); + curr_var.m_starAmp = yyvsp[-2]; + curr_var.m_lineno = cl_scope_lineno; + for(size_t i=0; i< gs_names.size(); i++) + { + /*create new variable for every variable name found*/ + var = curr_var; + var.m_name = gs_names.at(i); + gs_vars->push_back(var); + } + curr_var.Reset(); + gs_names.clear(); + } + } +break; +case 22: +{gs_names.push_back(yyvsp[0]);} +break; +case 27: +{ yyval = yyvsp[0] + var_consumeFuncArgList();} +break; +case 28: +{yyval = yyvsp[-1]+ yyvsp[0]; } +break; +case 29: +{yyval = yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];} +break; +case 30: +{yyval = "";} +break; +case 31: +{ yyval = yyvsp[-1] + yyvsp[0];} +break; +case 32: +{yyval = ""; } +break; +case 33: +{ yyval = yyvsp[0]; } +break; +case 34: +{yyval = ""; } +break; +case 35: +{ yyval = yyvsp[0]; } +break; +case 36: +{yyval = ""; } +break; +case 37: +{yyval = yyvsp[-1] + yyvsp[0];} +break; +case 38: +{ yyval = yyvsp[-1] + yyvsp[0]; } +break; +case 39: +{yyval = "";} +break; +case 40: +{ yyval = ";";} +break; +case 41: +{ yyval = "{";} +break; +case 42: +{ yyval = "(";} +break; +case 43: +{ yyval = "}";} +break; +case 44: +{ yyval = ":";} +break; +case 45: +{ yyval = "=";} +break; +case 46: +{ + yyval = yyvsp[-1] + " " + yyvsp[0]; + yyvsp[0].erase(yyvsp[0].find_last_not_of(":")+1); + curr_var.m_type = yyvsp[0]; + } +break; +case 47: +{ + yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0]; + yyvsp[-1].erase(yyvsp[-1].find_last_not_of(":")+1); + curr_var.m_typeScope = yyvsp[-1]; + curr_var.m_type = yyvsp[0]; + } +break; +case 48: +{ + yyval = yyvsp[-5] + " " + yyvsp[-4] + yyvsp[-3] + " " + yyvsp[-2] + yyvsp[-1] + yyvsp[0]; + yyvsp[-4].erase(yyvsp[-4].find_last_not_of(":")+1); + curr_var.m_typeScope = yyvsp[-4]; + curr_var.m_type = yyvsp[-3]; + curr_var.m_isTemplate = true; + curr_var.m_templateDecl = yyvsp[-2] +yyvsp[-1] +yyvsp[0]; + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yyss + yystacksize - 1) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/CxxParser/variable.cpp b/CxxParser/variable.cpp new file mode 100644 index 0000000000..b2fadf0089 --- /dev/null +++ b/CxxParser/variable.cpp @@ -0,0 +1,52 @@ +#include "variable.h" + +Variable::Variable() +{ + Reset(); +} + +Variable::~Variable() +{ +} + +Variable::Variable(const Variable &src) +{ + *this = src; +} + +Variable & Variable::operator =(const Variable &src) +{ + m_type = src.m_type; + m_templateDecl = src.m_templateDecl; + m_name = src.m_name; + m_isTemplate = src.m_isTemplate; + m_isPtr = src.m_isPtr; + m_typeScope = src.m_typeScope; + m_pattern = src.m_pattern; + m_starAmp = src.m_starAmp; + m_lineno = src.m_lineno; + return *this; +} + +void Variable::Reset() +{ + m_type = ""; + m_templateDecl = ""; + m_name = ""; + m_isTemplate = false; + m_isPtr = false; + m_typeScope = ""; + m_pattern = ""; + m_starAmp = ""; + m_lineno = 0; +} + +void Variable::Print() +{ + fprintf( stdout, "{m_name=%s, m_lineno=%d, m_starAmp=%s, m_type=%s, m_typeScope=%s, m_templateDecl=%s, m_isPtr=%s, m_isTemplate=%s }\n", + m_name.c_str(), m_lineno, m_starAmp.c_str(), m_type.c_str(), m_typeScope.c_str(), m_templateDecl.c_str(), + m_isPtr ? "true" : "false", + m_isTemplate ? "true" : "false"); + fprintf( stdout, "Pattern: %s\n", m_pattern.c_str()); + fflush(stdout); +} diff --git a/CxxParser/variable.h b/CxxParser/variable.h new file mode 100644 index 0000000000..0300ff5b09 --- /dev/null +++ b/CxxParser/variable.h @@ -0,0 +1,38 @@ +#ifndef VARIABLE_H +#define VARIABLE_H + +#include "string" +#include "list" + +class Variable +{ +public: + std::string m_name; + bool m_isTemplate; + std::string m_templateDecl; + bool m_isPtr; + std::string m_type; //as in 'int a;' -> type=int + std::string m_typeScope;//as in 'std::string a;' -> typeScope = std, type=string + std::string m_pattern; + std::string m_starAmp; + int m_lineno; + +public: + Variable(); + virtual ~Variable(); + + //copy ctor + Variable(const Variable& src); + + //operator = + Variable& operator=(const Variable& src); + + //clear the class content + void Reset(); + + //print the variable to stdout + void Print(); +}; + +typedef std::list VariableList; +#endif //VARIABLE_H diff --git a/Debugger/Debugger.vcproj b/Debugger/Debugger.vcproj new file mode 100644 index 0000000000..ebeb52cc1a --- /dev/null +++ b/Debugger/Debugger.vcproj @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Debugger/DebuggerGDB.project b/Debugger/DebuggerGDB.project new file mode 100644 index 0000000000..4a684d7f87 --- /dev/null +++ b/Debugger/DebuggerGDB.project @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Debugger/dbgcmd.cpp b/Debugger/dbgcmd.cpp new file mode 100644 index 0000000000..6418b3cb59 --- /dev/null +++ b/Debugger/dbgcmd.cpp @@ -0,0 +1,488 @@ +#include "dbgcmd.h" +#include "wx/tokenzr.h" +#include "debuggergdb.h" +#include "gdblexer.h" +#include "precompiled_header.h" + +#define GDB_LEX()\ + {\ + currentToken = "";\ + type = le_gdb_lex();\ + if(type == LE_GDB_STRING_LITERAL){\ + currentToken = le_gdb_string_word;\ + }else{\ + currentToken = le_gdb_text;\ + }\ + } +#define GDB_BREAK(ch)\ + if(type != (int)ch){\ + break;\ + } + +static wxString NextValue(wxString &line, wxString &key) +{ + //extract the key name first + if (line.StartsWith(wxT(","))) { + line.Remove(0, 1); + } + + key = line.BeforeFirst(wxT('=')); + line = line.AfterFirst(wxT('"')); + wxString token; + bool cont(true); + + while (!line.IsEmpty() && cont) { + wxChar ch = line.GetChar(0); + line.Remove(0, 1); + + if (ch == wxT('"')) { + cont = false; + } else { + token << ch; + } + } + return token; +} + +static void ParseStackEntry(const wxString &line, StackEntry &entry) +{ + wxString tmp(line); + wxString key, value; + + value = NextValue(tmp, key); + while ( value.IsEmpty() == false ) { + if (key == wxT("level")) { + entry.level = value; + } else if (key == wxT("addr")) { + entry.address = value; + } else if (key == wxT("func")) { + entry.function = value; + } else if (key == wxT("file")) { + entry.file = value; + } else if (key == wxT("line")) { + entry.line = value; + } else if (key == wxT("fullname")) { + entry.file = value; + } + value = NextValue(tmp, key); + } +} + +bool DbgCmdHandlerGetLine::ProcessOutput(const wxString &line) +{ +#if defined (__WXMSW__) || defined (__WXGTK__) + //^done,line="36",file="a.cpp",fullname="C:/testbug1/a.cpp" + wxString strLine, fileName; + wxStringTokenizer tkz(line, wxT(",")); + if (tkz.HasMoreTokens()) { + //skip first + tkz.NextToken(); + } + if (tkz.HasMoreTokens()) { + strLine = tkz.NextToken(); + } else { + return false; + } + if (tkz.HasMoreTokens()) { + tkz.NextToken();//skip + } + if (tkz.HasMoreTokens()) { + fileName = tkz.NextToken(); + } else { + return false; + } + + //line="36" + strLine = strLine.AfterFirst(wxT('"')); + strLine = strLine.BeforeLast(wxT('"')); + long lineno; + strLine.ToLong(&lineno); + + //remove quotes + fileName = fileName.AfterFirst(wxT('"')); + fileName = fileName.BeforeLast(wxT('"')); + + m_observer->UpdateFileLine(fileName, lineno); +#else + // On Mac we use the stack info the + // get the current file and line from the debugger + wxString tmpLine(line); + line.StartsWith(wxT("^done,stack=["), &tmpLine); + + tmpLine = tmpLine.Trim().Trim(false); + tmpLine.RemoveLast(); + + //-------------------------------------------------------- + //tmpLine contains now string with the following format: + //frame={name="Value",...},frame={name="Value",...} + wxString remainder(tmpLine); + tmpLine = tmpLine.AfterFirst(wxT('{')); + if (tmpLine.IsEmpty()) { + return false; + } + + remainder = tmpLine.AfterFirst(wxT('}')); + tmpLine = tmpLine.BeforeFirst(wxT('}')); + + StackEntry entry; + ParseStackEntry(tmpLine, entry); + + long line_number; + entry.line.ToLong(&line_number); + m_observer->UpdateFileLine(entry.file, line_number); +#endif + return true; +} + +bool DbgCmdHandlerAsyncCmd::ProcessOutput(const wxString &line) +{ + wxString reason; + //*stopped,reason="end-stepping-range",thread-id="1",frame={addr="0x0040156b",func="main",args=[{name="argc",value="1"},{name="argv",value="0x3e2c50"}],file="a.cpp",line="46"} + //when reason is "end-stepping-range", it means that one of the following command was + //completed: + //-exec-step, -exec-stepi + //-exec-next, -exec-nexti + wxStringTokenizer tkz(line, wxT(",")); + if (tkz.HasMoreTokens()) { + tkz.NextToken();//skip *stopped + } else { + return false; + } + //get the reason + if (tkz.HasMoreTokens()) { + reason = tkz.NextToken(); + reason = reason.AfterFirst(wxT('"')); + reason = reason.BeforeLast(wxT('"')); + } else { + return false; + } + + //Note: + //This might look like a stupid if-else, since all taking + //the same action at the end - return control to program, but this is done + //for future use to allow different handling for every case + if (reason == wxT("end-stepping-range")) { + //just notify the container that we got control back from debugger + m_observer->UpdateGotControl(DBG_END_STEPPING); + } else if (reason == wxT("breakpoint-hit")) { + //just notify the container that we got control back from debugger + m_observer->UpdateGotControl(DBG_BP_HIT); + } else if (reason == wxT("signal-received")) { + //got signal + //which signal? + wxString signame; + int where = line.Find(wxT("signal-name")); + if (where != wxNOT_FOUND) { + signame = line.Mid(where); + signame = signame.AfterFirst(wxT('"')); + signame = signame.BeforeFirst(wxT('"')); + } + + if (signame == wxT("SIGSEGV")) { + m_observer->UpdateGotControl(DBG_RECV_SIGNAL_SIGSEGV); + } else if(signame == wxT("EXC_BAD_ACCESS")){ + m_observer->UpdateGotControl(DBG_RECV_SIGNAL_EXC_BAD_ACCESS); + } else { + //default + m_observer->UpdateGotControl(DBG_RECV_SIGNAL); + } + } else if (reason == wxT("exited-normally")) { + m_observer->UpdateAddLine(wxT("Program exited normally.")); + + //debugee program exit normally + m_observer->UpdateGotControl(DBG_EXITED_NORMALLY); + } else if (reason == wxT("function-finished")) { + wxString message; + int where = line.Find(wxT("return-value")); + if (where != wxNOT_FOUND) { + message = line.Mid(where+12); + message = message.AfterFirst(wxT('"')); + message = message.BeforeFirst(wxT('"')); + message.Prepend(wxT("Function returned with value: ")); + m_observer->UpdateAddLine(message); + } + + //debugee program exit normally + m_observer->UpdateGotControl(DBG_FUNC_FINISHED); + } else { + //by default return control to program + m_observer->UpdateGotControl(DBG_UNKNOWN); + } + return true; +} + +bool DbgCmdHandlerBp::ProcessOutput(const wxString &line) +{ + //parse the line, incase we got error, keep this breakpoint in the queue + if (line.StartsWith(wxT("^done"))) { + //remove this breakpoint from the breakpoint list + for (size_t i=0; i< m_bplist->size(); i++) { + BreakpointInfo bp = m_bplist->at(i); + if (bp.file == m_bp.file && bp.lineno == m_bp.lineno) { + m_bplist->erase(m_bplist->begin()+i); + break; + } + } + } + wxString msg; + msg << wxT("Successfully set breakpoint at: ") << m_bp.file << wxT(":") << m_bp.lineno; + m_observer->UpdateAddLine(msg); + m_observer->UpdateBpAdded(); + return true; +} + +bool DbgCmdHandlerLocals::ProcessOutput(const wxString &line) +{ + NodeData data; + bool bEvalExpr(false); + switch (m_evaluateExpression) { + case EvaluateExpression: + data.name = wxT("Quick Watch"); + bEvalExpr = true; + break; + case Locals: + data.name = wxT("Locals"); + break; + case This: + data.name = wxT("*this"); + break; + } + + wxString strline(line), tmpline; + TreeNode *tree = new TreeNode(data.name, data); + + if (m_evaluateExpression == Locals) { + strline = strline.AfterFirst(wxT('[')); + strline = strline.BeforeLast(wxT(']')); + if (strline.StartsWith(wxT("^done,locals=["), &tmpline)) { + strline = tmpline; + } + + if (strline.EndsWith(wxT("]"))) { + strline = strline.RemoveLast(); + } + } else { + // + //EvaluateExpression || This + if (strline.StartsWith(wxT("^done,value="), &tmpline)) { + strline = tmpline; + wxString prestr; + prestr << wxT("name=\\\"") << m_expression << wxT("\\\",value="); + strline.Prepend(prestr); + } + } + + const wxCharBuffer scannerText = _C(strline); + le_gdb_set_input(scannerText.data()); + MakeTree(tree); + le_gdb_lex_clean(); + + if (m_evaluateExpression == Locals || m_evaluateExpression == This) { + m_observer->UpdateLocals(tree); + } else { + m_observer->UpdateQuickWatch(m_expression, tree); + } + return true; +} + +void DbgCmdHandlerLocals::MakeTree(TreeNode *parent) +{ + wxString displayLine; + std::string currentToken; + int type(0); + + //remove prefix + GDB_LEX(); + while (type != 0) { + //pattern is *always* name="somename",value="somevalue" + //however, value can be a sub tree value="{....}" + if (type != LE_GDB_NAME) { + GDB_LEX(); + continue; + } + + //wait for the '=' + GDB_LEX(); + GDB_BREAK('='); + + GDB_LEX(); + if (type != LE_GDB_WORD && type != LE_GDB_STRING_LITERAL) { + break; + } + displayLine << _U(currentToken.c_str()); + + //comma + GDB_LEX(); + GDB_BREAK(','); + //value + GDB_LEX(); + if (type != LE_GDB_VALUE) { + break; + } + GDB_LEX(); + GDB_BREAK('='); + + GDB_LEX(); + if (type == (int)'{') { + if (displayLine.IsEmpty() == false) { + //open a new node for the tree + NodeData data; + data.name = displayLine; + TreeNode *child = parent->AddChild(data.name, data); + MakeSubTree(child); + } + } else if (type == (int)'(') { + //we encountered an expression of: + //(class wxFlatNotebook *) 0xffeedd00 + displayLine << wxT(" = "); + while ( type != (int)'}') { + displayLine << _U(currentToken.c_str()) << wxT(" "); + GDB_LEX(); + } + NodeData data; + data.name = displayLine; + parent->AddChild(data.name, data); + } else { + //simple case of name = value + displayLine << wxT(" = "); + wxString val(wxEmptyString); + while (type == LE_GDB_CHAR_LITERAL || type == LE_GDB_STRING_LITERAL || type == LE_GDB_WORD || currentToken == "-") { + if (type == LE_GDB_STRING_LITERAL) { + val << wxT("\"") << _U(currentToken.c_str()) << wxT("\" "); + } else { + val << _U(currentToken.c_str()) << wxT(" "); + } + GDB_LEX(); + } + + if (val.IsEmpty()) { + val = wxT("\"\""); + } + displayLine << val; + NodeData data; + data.name = displayLine; + data.name.Replace(wxT("\\\\\\\\"), wxT("\\")); + data.name.Replace(wxT("\\\\"), wxT("\\")); + parent->AddChild(data.name, data); + } + displayLine.Empty(); + } +} + +void DbgCmdHandlerLocals::MakeSubTree(TreeNode *parent) +{ + //the pattern here should be + //key = value, .... + //where value can be a complex value: + //key = {...} + wxString displayLine; + wxString name, value; + std::string currentToken; + int type(0); + + + GDB_LEX(); + while (type != 0) { + switch (type) { + case LE_GDB_WORD: + case LE_GDB_STRING_LITERAL: + displayLine << _U(currentToken.c_str()) << wxT(" "); + break; + case (int)'=': + displayLine << wxT("= "); + break; + case (int)'{': { + //create the new child node + wxString tmpValue; + if (displayLine.EndsWith(wxT(" = "), &tmpValue)) { + displayLine = tmpValue; + } + + if (displayLine.IsEmpty() == false) { + //make a sub node + NodeData data; + data.name = displayLine; + TreeNode *child = parent->AddChild(data.name, data); + MakeSubTree(child); + displayLine.Empty(); + } + } + break; + case (int)',': + if (displayLine.IsEmpty() == false) { + NodeData nodeData; + nodeData.name = displayLine; + parent->AddChild(nodeData.name, nodeData); + displayLine = wxEmptyString; + } + break; + case (int)'}': + if (displayLine.IsEmpty() == false) { + NodeData nodeData; + nodeData.name = displayLine; + parent->AddChild(nodeData.name, nodeData); + displayLine = wxEmptyString; + } + return; + } + GDB_LEX(); + } +} + +bool DbgCmdHandlerVarCreator::ProcessOutput(const wxString &line) +{ + wxUnusedVar(line); + return true; +} + +bool DbgCmdHandlerEvalExpr::ProcessOutput(const wxString &line) +{ + //remove the ^done + wxString tmpLine(line); + line.StartsWith(wxT("^done,value=\""), &tmpLine); + tmpLine.RemoveLast(); + tmpLine.Replace(wxT("\\\""), wxT("\"")); + m_observer->UpdateExpression(m_expression, tmpLine); + return true; +} + +bool DbgCmdStackList::ProcessOutput(const wxString &line) +{ + wxString tmpLine(line); + line.StartsWith(wxT("^done,stack=["), &tmpLine); + + tmpLine = tmpLine.Trim(); + tmpLine = tmpLine.Trim(false); + + tmpLine.RemoveLast(); + //-------------------------------------------------------- + //tmpLine contains now string with the following format: + //frame={name="Value",...},frame={name="Value",...} + wxString remainder(tmpLine); + StackEntryArray stackArray; + while (true) { + tmpLine = tmpLine.AfterFirst(wxT('{')); + if (tmpLine.IsEmpty()) { + break; + } + + remainder = tmpLine.AfterFirst(wxT('}')); + tmpLine = tmpLine.BeforeFirst(wxT('}')); + + StackEntry entry; + ParseStackEntry(tmpLine, entry); + stackArray.push_back(entry); + + tmpLine = remainder; + } + + m_observer->UpdateStackList(stackArray); + return true; +} + +bool DbgCmdSelectFrame::ProcessOutput(const wxString &line) +{ + wxUnusedVar(line); + m_observer->UpdateGotControl(DBG_END_STEPPING); + return true; +} diff --git a/Debugger/dbgcmd.h b/Debugger/dbgcmd.h new file mode 100644 index 0000000000..aa38065b1f --- /dev/null +++ b/Debugger/dbgcmd.h @@ -0,0 +1,129 @@ +#ifndef DBGCMD_H +#define DBGCMD_H + +#include "wx/string.h" +#include "wx/event.h" +#include "gdbinfolexer.h" +#include "debuggerobserver.h" +#include "debugger.h" + +class IDebugger; + +class DbgCmdHandler { +protected: + IDebuggerObserver *m_observer; + +public: + DbgCmdHandler(IDebuggerObserver *observer) : m_observer(observer){} + virtual ~DbgCmdHandler(){} + + virtual bool ProcessOutput(const wxString &line) = 0; +}; + +/** + * handles the + * -file-list-exec-source-file command + */ +class DbgCmdHandlerGetLine : public DbgCmdHandler { +public: + DbgCmdHandlerGetLine(IDebuggerObserver *observer) : DbgCmdHandler(observer){} + virtual ~DbgCmdHandlerGetLine(){} + + virtual bool ProcessOutput(const wxString &line); +}; + +/** + * this handler, handles the following commands: + * -exec-run + * -exec-continue + * -exec-step + * -exec-next + * -exec-finish + */ +class DbgCmdHandlerAsyncCmd : public DbgCmdHandler { +public: + DbgCmdHandlerAsyncCmd(IDebuggerObserver *observer) : DbgCmdHandler(observer){} + virtual ~DbgCmdHandlerAsyncCmd(){} + + virtual bool ProcessOutput(const wxString &line); +}; + +class DbgCmdHandlerBp : public DbgCmdHandler { + BreakpointInfo m_bp; + std::vector< BreakpointInfo > *m_bplist; + +public: + DbgCmdHandlerBp(IDebuggerObserver *observer, BreakpointInfo bp, std::vector< BreakpointInfo > *bplist) + : DbgCmdHandler(observer) + , m_bp(bp) + , m_bplist(bplist) + {} + + virtual ~DbgCmdHandlerBp(){} + virtual bool ProcessOutput(const wxString &line); +}; + +class DbgCmdHandlerLocals : public DbgCmdHandler { +public: + enum { + EvaluateExpression, + Locals, + This + }; + +protected: + void MakeTree(TreeNode *parent); + void MakeSubTree(TreeNode *parent); + int m_evaluateExpression; + wxString m_expression; + +public: + DbgCmdHandlerLocals(IDebuggerObserver *observer, int kind = Locals, const wxString &expr = wxEmptyString) + : DbgCmdHandler(observer) + , m_evaluateExpression(kind) + , m_expression(expr) + {} + + virtual ~DbgCmdHandlerLocals(){} + + virtual bool ProcessOutput(const wxString &line); +}; + +// A Void Handler, which is here simply to ignore a reply from the debugger +class DbgCmdHandlerVarCreator : public DbgCmdHandler { +public: + DbgCmdHandlerVarCreator(IDebuggerObserver *observer) : DbgCmdHandler(observer){} + virtual ~DbgCmdHandlerVarCreator(){} + virtual bool ProcessOutput(const wxString & line); +}; + +class DbgCmdHandlerEvalExpr : public DbgCmdHandler { + wxString m_expression; +public: + DbgCmdHandlerEvalExpr(IDebuggerObserver *observer, const wxString &expression) + : DbgCmdHandler(observer) + , m_expression(expression) + {} + + virtual ~DbgCmdHandlerEvalExpr(){} + virtual bool ProcessOutput(const wxString & line); + virtual const wxString & GetExpression() const {return m_expression;} +}; + +// handler -list-stack-frames command +class DbgCmdStackList : public DbgCmdHandler { +public: + DbgCmdStackList(IDebuggerObserver *observer) : DbgCmdHandler(observer){} + virtual ~DbgCmdStackList(){} + virtual bool ProcessOutput(const wxString & line); +}; + +// handler -list-stack-frames command +class DbgCmdSelectFrame : public DbgCmdHandler { +public: + DbgCmdSelectFrame(IDebuggerObserver *observer) : DbgCmdHandler(observer){} + virtual ~DbgCmdSelectFrame(){} + virtual bool ProcessOutput(const wxString & line); +}; +#endif //DBGCMD_H + diff --git a/Debugger/debuggerdll.def b/Debugger/debuggerdll.def new file mode 100644 index 0000000000..c3e2aa7f7d --- /dev/null +++ b/Debugger/debuggerdll.def @@ -0,0 +1,4 @@ +LIBRARY Debugger +EXPORTS + CreateDebuggerGDB + GetDebuggerInfo \ No newline at end of file diff --git a/Debugger/debuggergdb.cpp b/Debugger/debuggergdb.cpp new file mode 100644 index 0000000000..85d6a1fae6 --- /dev/null +++ b/Debugger/debuggergdb.cpp @@ -0,0 +1,756 @@ +#include "debuggergdb.h" +#include "dirkeeper.h" +#include "dbgcmd.h" +#include "wx/regex.h" +#include "debuggerobserver.h" +#include "wx/filename.h" +#include "procutils.h" +#include "wx/tokenzr.h" + +#ifdef __WXMSW__ +#include "windows.h" +#endif +#ifdef __WXGTK__ +#include +#include +#endif + +//Using the running image of child Thread 46912568064384 (LWP 7051). +static wxRegEx reInfoProgram1(wxT("\\(LWP[ \t]([0-9]+)\\)")); +//Using the running image of child process 10011. +static wxRegEx reInfoProgram2(wxT("child process ([0-9]+)")); +//Using the running image of child thread 4124.0x117c +static wxRegEx reInfoProgram3(wxT("Using the running image of child thread ([0-9]+)")); + +DebuggerInfo GetDebuggerInfo() +{ + DebuggerInfo info = { + wxT("GNU gdb debugger"), + wxT("CreateDebuggerGDB"), + wxT("v1.0"), + wxT("Eran Ifrah") + }; + return info; +} + +IDebugger *CreateDebuggerGDB() +{ + static DbgGdb theGdbDebugger; + return &theGdbDebugger; +} + +// Removes MI additional characters from string +static void StipString(wxString &string) +{ + string = string.AfterFirst(wxT('"')); + string = string.BeforeLast(wxT('"')); + + //replace \\n with nothing + string.Replace(wxT("\\n"), wxEmptyString); + string.Replace(wxT("\\t"), wxEmptyString); + string.Replace(wxT("\\\""), wxT("\"")); +} + +static wxString MakeId() +{ + static size_t counter(0); + wxString newId; + newId.Printf(wxT("%08d"), ++counter); + return newId; +} + +DbgGdb::DbgGdb() + : m_debuggeePid(wxNOT_FOUND) +{ +} + +DbgGdb::~DbgGdb() +{ +} + +void DbgGdb::RegisterHandler(const wxString &id, DbgCmdHandler *cmd) +{ + m_handlers[id] = cmd; +} + +DbgCmdHandler *DbgGdb::PopHandler(const wxString &id) +{ + HandlersMap::iterator it = m_handlers.find(id); + if (it == m_handlers.end()) { + return NULL; + } + DbgCmdHandler *cmd = it->second; + m_handlers.erase(it); + return cmd; +} + +void DbgGdb::EmptyQueue() +{ + HandlersMap::iterator iter = m_handlers.begin(); + while (iter != m_handlers.end()) { + delete iter->second; + iter++; + } + m_handlers.clear(); +} + +bool DbgGdb::Start(const wxString &debuggerPath, const wxString & exeName, int pid, const std::vector &bpList) +{ + if (IsBusy()) { + //dont allow second instance of the debugger + return false; + } + SetBusy(true); + wxString cmd; + + wxString dbgExeName(debuggerPath); + if (dbgExeName.IsEmpty()) { + dbgExeName = wxT("gdb"); + } + +#if defined (__WXGTK__) + //On GTK and other platforms, open a new terminal and direct all + //debugee process into it + wxString ptyName; + if (!m_consoleFinder.FindConsole(wxT("CodeLite: gdb"), ptyName)) { + SetBusy(false); + wxLogMessage(wxT("Failed to allocate console for debugger")); + return false; + } + cmd << dbgExeName << wxT(" --tty=") << ptyName << wxT(" --interpreter=mi "); +#elif defined (__WXMAC__) + cmd << dbgExeName << wxT(" --interpreter=mi "); +#else + cmd << dbgExeName << wxT(" --interpreter=mi "); + cmd << ProcUtils::GetProcessNameByPid(pid) << wxT(" "); +#endif + + m_debuggeePid = pid; + cmd << wxT(" --pid=") << m_debuggeePid; + wxLogMessage(cmd); + + //m_proc will be deleted upon termination + m_proc = new PipedProcess(wxNewId(), cmd); + if (m_proc) { + if (m_proc->Start() == 0) { + //failed to start the debugger + delete m_proc; + SetBusy(false); + return false; + } + + Connect(wxEVT_TIMER, wxTimerEventHandler(DbgGdb::OnTimer), NULL, this); + m_proc->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(DbgGdb::OnProcessEnd), NULL, this); + m_canUse = true; + m_timer->Start(10); + wxWakeUpIdle(); + //place breakpoint at first line +#ifdef __WXMSW__ + ExecuteCmd(wxT("set new-console on")); +#endif + ExecuteCmd(wxT("set unwindonsignal on")); + //dont wrap lines + ExecuteCmd(wxT("set width 0")); + // no pagination + ExecuteCmd(wxT("set height 0")); + + if(m_info.enablePendingBreakpoints) { + //a workaround for the MI pending breakpoint +#if defined (__WXGTK__) || defined (__WXMAC__) + ExecuteCmd(wxT("set breakpoint pending on")); +#else + // Mac & Windows + ExecuteCmd(wxT("set auto-solib-add on")); + ExecuteCmd(wxT("set stop-on-solib-events 1")); +#endif + } + + //keep the list of breakpoints + m_bpList = bpList; + SetBreakpoints(); + + if (m_info.breakAtWinMain) { + //try also to set breakpoint at WinMain + WriteCommand(wxT("-break-insert main"), NULL); + } + + m_observer->UpdateGotControl(DBG_END_STEPPING); + return true; + } + return false; +} + +bool DbgGdb::Start(const wxString &debuggerPath, const wxString &exeName, const wxString &cwd, const std::vector &bpList) +{ + if (IsBusy()) { + //dont allow second instance of the debugger + return false; + } + + SetBusy(true); + wxString cmd; + + wxString dbgExeName(debuggerPath); + if (dbgExeName.IsEmpty()) { + dbgExeName = wxT("gdb"); + } +#if defined (__WXGTK__) + //On GTK and other platforms, open a new terminal and direct all + //debugee process into it + wxString ptyName; + if (!m_consoleFinder.FindConsole(exeName, ptyName)) { + SetBusy(false); + wxLogMessage(wxT("Failed to allocate console for debugger")); + return false; + } + cmd << dbgExeName << wxT(" --tty=") << ptyName << wxT(" --interpreter=mi ") << exeName; +#elif defined(__WXMAC__) + cmd << dbgExeName << wxT(" --interpreter=mi ") << exeName; +#else + cmd << dbgExeName << wxT(" --interpreter=mi ") << exeName; +#endif + + m_debuggeePid = wxNOT_FOUND; + //m_proc will be deleted upon termination + m_proc = new PipedProcess(wxNewId(), cmd); + if (m_proc) { + //change directory to the debugger working directory as set in the + //project settings + DirKeeper keeper; + wxSetWorkingDirectory(cwd); + if (m_proc->Start() == 0) { + //failed to start the debugger + delete m_proc; + SetBusy(false); + return false; + } + + Connect(wxEVT_TIMER, wxTimerEventHandler(DbgGdb::OnTimer), NULL, this); + m_proc->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(DbgGdb::OnProcessEnd), NULL, this); + m_canUse = true; + m_timer->Start(10); + wxWakeUpIdle(); + //place breakpoint at first line +#ifdef __WXMSW__ + ExecuteCmd(wxT("set new-console on")); +#endif + ExecuteCmd(wxT("set unwindonsignal on")); + + if(m_info.enablePendingBreakpoints) { + //a workaround for the MI pending breakpoint +#if defined (__WXGTK__) || defined (__WXMAC__) + ExecuteCmd(wxT("set breakpoint pending on")); +#else + // Mac & Windows + ExecuteCmd(wxT("set auto-solib-add on")); + ExecuteCmd(wxT("set stop-on-solib-events 1")); +#endif + } + + //dont wrap lines + ExecuteCmd(wxT("set width 0")); + // no pagination + ExecuteCmd(wxT("set height 0")); + + //keep the list of breakpoints + m_bpList = bpList; + SetBreakpoints(); + + if (m_info.breakAtWinMain) { + //try also to set breakpoint at WinMain + WriteCommand(wxT("-break-insert main"), NULL); + } + return true; + } + return false; +} + +bool DbgGdb::WriteCommand(const wxString &command, DbgCmdHandler *handler) +{ + wxString cmd; + wxString id = MakeId( ); + cmd << id << command; + if (!Write(cmd)) { + return false; + } + RegisterHandler(id, handler); + return true; +} + +bool DbgGdb::Start(const wxString &exeName, const wxString &cwd, const std::vector &bpList) +{ + return Start(wxT("gdb"), exeName, cwd, bpList); +} + +bool DbgGdb::Run(const wxString &args) +{ + //add handler for this command + return WriteCommand(wxT("-exec-run ") + args, new DbgCmdHandlerAsyncCmd(m_observer)); +} + +bool DbgGdb::Stop() +{ + if (IsBusy()) { + Disconnect(wxEVT_TIMER, wxTimerEventHandler(DbgGdb::OnTimer), NULL, this); + m_proc->Disconnect(wxEVT_END_PROCESS, wxProcessEventHandler(DbgGdb::OnProcessEnd), NULL, this); + + InteractiveProcess::StopProcess(); + SetBusy(false); + + //free allocated console for this session + m_consoleFinder.FreeConsole(); + + //return control to the program + m_observer->UpdateGotControl(DBG_DBGR_KILLED); + EmptyQueue(); + + m_bpList.empty(); + } + return true; +} + +bool DbgGdb::Next() +{ + return WriteCommand(wxT("-exec-next"), new DbgCmdHandlerAsyncCmd(m_observer)); +} + +void DbgGdb::SetBreakpoints() +{ + for (size_t i=0; i< m_bpList.size(); i++) { + BreakpointInfo bpinfo = m_bpList.at(i); + Break(bpinfo.file, bpinfo.lineno); + } +} + +bool DbgGdb::Break(const wxString &fileName, long lineno) +{ + wxFileName fn(fileName); + BreakpointInfo bp; + bp.file = fileName; + bp.lineno = lineno; + + wxString tmpfileName(fn.GetFullPath()); + tmpfileName.Replace(wxT("\\"), wxT("/")); + + wxString command; +#if defined (__WXGTK__) || defined (__WXMAC__) + if (m_info.enablePendingBreakpoints) { + //On GTK however, it works pretty well. + command = wxT("break "); + } else { + command = wxT("-break-insert "); + } +#else + // Mac & Windows + command = wxT("-break-insert "); +#endif + + command << tmpfileName << wxT(":") << lineno; + return WriteCommand(command, new DbgCmdHandlerBp(m_observer, bp, &m_bpList)); +} + +bool DbgGdb::Continue() +{ + return WriteCommand(wxT("-exec-continue"), new DbgCmdHandlerAsyncCmd(m_observer)); +} + +bool DbgGdb::StepIn() +{ + return WriteCommand(wxT("-exec-step"), new DbgCmdHandlerAsyncCmd(m_observer)); +} + +bool DbgGdb::StepOut() +{ + return WriteCommand(wxT("-exec-finish"), new DbgCmdHandlerAsyncCmd(m_observer)); +} + +bool DbgGdb::IsRunning() +{ + return IsBusy(); +} + +bool DbgGdb::Interrupt() +{ + if (m_debuggeePid > 0) { +#ifdef __WXMSW__ + HANDLE process = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)m_debuggeePid); + BOOL res = DebugBreakProcess(process); + return res == TRUE; +#else + m_observer->UpdateAddLine(wxT("Interrupting debugee process")); + kill(m_debuggeePid, SIGINT); +#endif + } + return true; +} + +bool DbgGdb::QueryFileLine() +{ +#if defined (__WXMSW__) || defined (__WXGTK__) + return WriteCommand(wxT("-file-list-exec-source-file"), new DbgCmdHandlerGetLine(m_observer)); +#else + //Mac + return WriteCommand(wxT("-stack-list-frames 0 0"), new DbgCmdHandlerGetLine(m_observer)); +#endif +} + +bool DbgGdb::QueryLocals() +{ + //the order of the commands here is important + if(!WriteCommand(wxT("-data-evaluate-expression *this"), new DbgCmdHandlerLocals(m_observer, DbgCmdHandlerLocals::This, wxT("*this")))){ + return false; + } + return WriteCommand(wxT("-stack-list-locals --all-values"), new DbgCmdHandlerLocals(m_observer)); +} + +bool DbgGdb::ExecuteCmd(const wxString &cmd) +{ + return Write(cmd); +} + +bool DbgGdb::ExecSyncCmd(const wxString &command, wxString &output) +{ + wxString cmd; + wxString id = MakeId( ); + cmd << id << command; + //send the command to gdb + if (!Write(cmd)) { + return false; + } + + //read all output until we found 'XXXXXXXX^done' + static wxRegEx reCommand(wxT("^([0-9]{8})")); + const int maxPeeks(100); + wxString line; + int counter(0); + for ( ;; ) { + //try to read a line from the debugger + line.Empty(); + ReadLine(line, 1); + line = line.Trim().Trim(false); + + if(line.IsEmpty()){ + if(counter < maxPeeks){ + counter++; + continue; + }else{ + break; + } + } + counter = 0; + if(reCommand.Matches(line)){ + //not a gdb message, get the command associated with the message + wxString cmd_id = reCommand.GetMatch(line, 1); + if(cmd_id != id){ + long expcId(0), recvId(0); + cmd_id.ToLong(&recvId); + id.ToLong(&expcId); + + if(expcId > recvId){ + //we can keep waiting for our ID + continue; + } + return false; + } + + //remove trailing new line + output = output.Trim().Trim(false); + return true; + + }else{ + StipString(line); + if(!line.Contains(command)){ + output << line << wxT("\n"); + } + } + } + return false; +} + +bool DbgGdb::RemoveAllBreaks() +{ + return ExecuteCmd(wxT("delete")); +} + +bool DbgGdb::RemoveBreak(int bid) +{ + wxString command; + command << wxT("-break-delete ") << bid; + return WriteCommand(command, NULL); +} + +bool DbgGdb::RemoveBreak(const wxString &fileName, long lineno) +{ + wxString command; + wxString fileName_(fileName); + fileName_.Replace(wxT("\\"), wxT("/")); + command << wxT("clear ") << fileName_ << wxT(":") << lineno; + return WriteCommand(command, NULL); +} + +bool DbgGdb::FilterMessage(const wxString &msg) +{ + if (msg.Contains(wxT("Variable object not found"))) { + return true; + } + + if (msg.Contains(wxT("mi_cmd_var_create: unable to create variable object"))) { + return true; + } + + if (msg.Contains(wxT("Variable object not found"))) { + return true; + } + + if (msg.Contains(wxT("No symbol \"this\" in current context"))){ + return true; + } + return false; +} + +void DbgGdb::Poke() +{ + static wxRegEx reCommand(wxT("^([0-9]{8})")); + //poll the debugger output + wxString line; + + if (m_debuggeePid == wxNOT_FOUND) { + std::vector children; + ProcUtils::GetChildren(m_proc->GetPid(), children); + std::sort(children.begin(), children.end()); + if(children.empty() == false){ + m_debuggeePid = children.at(0); + } + + if (m_debuggeePid != wxNOT_FOUND) { + wxString msg; + msg << wxT("Debuggee process ID: ") << m_debuggeePid; + m_observer->UpdateAddLine(msg); + } + } + + int lineRead(0); + for ( ;; ) { + line.Empty(); + + //did we reach the maximum reads per interval? + //if the answer is yes, give up the CPU and wait for another chance + if (lineRead == 5) { + break; + } + + //try to read a line from the debugger + ReadLine(line, 1); + + line = line.Trim(); + line = line.Trim(false); + + if (m_info.enableDebugLog) { + //Is logging enabled? + if (line.IsEmpty() == false) { + wxString strdebug(wxT("DEBUG>>")); + strdebug << line; + m_observer->UpdateAddLine(strdebug); + } + } + + line.Replace(wxT("(gdb)"), wxEmptyString); + if (line.IsEmpty()) { + break; + } + lineRead++; + + + + if (line.StartsWith(wxT("~")) || line.StartsWith(wxT("&"))) { + //just an informative line, + StipString(line); + //filter out some gdb error lines... + if (FilterMessage(line)) { + continue; + } + m_observer->UpdateAddLine(line); + + } else if (reCommand.Matches(line)) { + + //not a gdb message, get the command associated with the message + wxString id = reCommand.GetMatch(line, 1); + + //strip the id from the line + line = line.Mid(8); + DoProcessAsyncCommand(line, id); + + } else if (line.StartsWith(wxT("^done")) || line.StartsWith(wxT("*stopped"))) { + //Unregistered command, use the default AsyncCommand handler to process the line + DbgCmdHandlerAsyncCmd cmd(m_observer); + cmd.ProcessOutput(line); + } else { + //Unknow format, just log it + m_observer->UpdateAddLine(line); + } + } +} + +void DbgGdb::DoProcessAsyncCommand(wxString &line, wxString &id) +{ + if (line.StartsWith(wxT("^error"))) { + //the command was error, for example: + //finish in the outer most frame + //print the error message and remove the command from the queue + DbgCmdHandler *handler = PopHandler(id); + if (handler) { + delete handler; + } + StipString(line); + //We also need to pass the control back to the program + m_observer->UpdateGotControl(DBG_CMD_ERROR); + + if (!FilterMessage(line)) { + m_observer->UpdateAddLine(line); + } + + } else if (line.StartsWith(wxT("^done"))) { + //The synchronous operation was successful, results are the return values. + DbgCmdHandler *handler = PopHandler(id); + if (handler) { + handler->ProcessOutput(line); + delete handler; + } + + } else if (line.StartsWith(wxT("^running"))) { + //asynchronous command was executed + //send event that we dont have the control anymore + m_observer->UpdateLostControl(); + } else if (line.StartsWith(wxT("*stopped"))) { + //get the stop reason, + if (line == wxT("*stopped")) { + if(m_bpList.empty()){ + + ExecuteCmd(wxT("set auto-solib-add off")); + ExecuteCmd(wxT("set stop-on-solib-events 0")); + + } else { + + //no reason for the failure, this means that we stopped due to + //hitting a loading of shared library + //try to place all breakpoints which previously failed + SetBreakpoints(); + } + + Continue(); + + } else { + //GDB/MI Out-of-band Records + //caused by async command, this line indicates that we have the control back + DbgCmdHandler *handler = PopHandler(id); + if (handler) { + handler->ProcessOutput(line); + delete handler; + } + } + } +} + +bool DbgGdb::EvaluateExpressionToString(const wxString &expression) +{ + static int counter(0); + wxString watchName(wxT("watch_num_")); + watchName << ++counter; + + wxString command; + command << wxT("-var-create ") << watchName << wxT(" 0 ") << expression; + //first create the expression + bool res = WriteCommand(command, new DbgCmdHandlerVarCreator(m_observer)); + if (!res) { + //probably gdb is down + return false; + } + + command.Clear(); + //execute the watch command + command << wxT("-var-evaluate-expression ") << watchName; + res = WriteCommand(command, new DbgCmdHandlerEvalExpr(m_observer, expression)); + if (!res) { + //probably gdb is down + return false; + } + + //and make sure we delete this variable + command.Clear(); + //execute the watch command + command << wxT("-var-delete ") << watchName; + + //we register NULL handler, which means this line can be safely ignored + return WriteCommand(command, NULL); +} + +bool DbgGdb::EvaluateExpressionToTree(const wxString &expression) +{ + wxString command; + wxString tmp(expression); + + tmp = tmp.Trim().Trim(false); + command << wxT("-data-evaluate-expression ") << expression; + + //first create the expression + return WriteCommand(command, new DbgCmdHandlerLocals(m_observer, DbgCmdHandlerLocals::EvaluateExpression, expression)); +} + +bool DbgGdb::ListFrames() +{ + return WriteCommand(wxT("-stack-list-frames"), new DbgCmdStackList(m_observer)); +} + +bool DbgGdb::SetFrame(int frame) +{ + wxString command; + command << wxT("frame ") << frame; + return WriteCommand(command, new DbgCmdSelectFrame(m_observer)); +} + +bool DbgGdb::ListThreads(ThreadEntryArray &threads) +{ + static wxRegEx reCommand(wxT("^([0-9]{8})")); + wxString output; + if(!ExecSyncCmd(wxT("info threads"), output)){ + return false; + } + + //parse the debugger output + wxStringTokenizer tok(output, wxT("\n"), wxTOKEN_STRTOK); + while(tok.HasMoreTokens()){ + ThreadEntry entry; + wxString line = tok.NextToken(); + line.Replace(wxT("\t"), wxT(" ")); + line = line.Trim().Trim(false); + + + if(reCommand.Matches(line)){ + //this is the ack line, ignore it + continue; + } + + wxString tmpline(line); + if(tmpline.StartsWith(wxT("*"), &line)){ + //active thread + entry.active = true; + }else{ + entry.active = false; + } + + line = line.Trim().Trim(false); + line.ToLong(&entry.dbgid); + entry.more = line.AfterFirst(wxT(' ')); + threads.push_back(entry); + } + return true; +} + +bool DbgGdb::SelectThread(long threadId) +{ + wxString command; + command << wxT("-thread-select ") << threadId; + return WriteCommand(command, NULL); +} + + diff --git a/Debugger/debuggergdb.h b/Debugger/debuggergdb.h new file mode 100644 index 0000000000..ad97ca4e84 --- /dev/null +++ b/Debugger/debuggergdb.h @@ -0,0 +1,82 @@ +#ifndef DBGINTERFACE_H +#define DBGINTERFACE_H + +#include "wx/string.h" +#include "wx/event.h" +#include "interactiveprocess.h" +#include "list" +#include "debugger.h" +#include +#include "consolefinder.h" + +#ifdef MSVC_VER +//declare the debugger function creation +extern "C++" IDebugger *CreateDebuggerGDB(); +//declare the function that will be called by host application +//to retrieve the debugger initialization function +extern "C++" DebuggerInfo GetDebuggerInfo(); +#else +//declare the debugger function creation +extern "C" IDebugger *CreateDebuggerGDB(); +//declare the function that will be called by host application +//to retrieve the debugger initialization function +extern "C" DebuggerInfo GetDebuggerInfo(); +#endif + +class DbgCmdHandler; +WX_DECLARE_STRING_HASH_MAP(DbgCmdHandler*, HandlersMap); + +class DbgGdb : public InteractiveProcess, public IDebugger +{ + HandlersMap m_handlers; + long m_debuggeePid; + ConsoleFinder m_consoleFinder; + std::vector m_bpList; + +protected: + void RegisterHandler(const wxString &id, DbgCmdHandler *cmd); + DbgCmdHandler *PopHandler(const wxString &id); + void EmptyQueue(); + bool FilterMessage(const wxString &msg); + + //wrapper for convinience + bool WriteCommand(const wxString &command, DbgCmdHandler *cmd); + int StartConsole(); + void DoProcessAsyncCommand(wxString &line, wxString &id); + void SetBreakpoints(); + +public: + DbgGdb(); + virtual ~DbgGdb(); + + virtual bool Start(const wxString &exeName, const wxString &cwd, const std::vector &bpList); + virtual bool ExecSyncCmd(const wxString &command, wxString &output); + virtual bool Start(const wxString &debuggerPath, const wxString &exeName, const wxString &cwd, const std::vector &bpList); + //start debugger, but this time, attach to process + virtual bool Start(const wxString &debuggerPath, const wxString &exeName, int pid, const std::vector &bpList); + virtual bool Run(const wxString &args); + virtual bool Stop(); + virtual bool Break(const wxString &fileName, long lineno); + virtual bool RemoveBreak(int bid); + virtual bool RemoveBreak(const wxString &fileName, long lineno); + virtual bool RemoveAllBreaks(); + virtual bool StepIn(); + virtual bool StepOut(); + virtual bool Next(); + virtual bool Continue(); + virtual bool QueryFileLine(); + virtual bool Interrupt(); + virtual bool IsRunning(); + virtual bool ExecuteCmd(const wxString &cmd); + virtual bool EvaluateExpressionToTree(const wxString &expression); + virtual bool EvaluateExpressionToString(const wxString &expression); + virtual bool QueryLocals(); + virtual bool ListFrames(); + virtual bool ListThreads(ThreadEntryArray &threads); + virtual bool SelectThread(long threadId); + virtual bool SetFrame(int frame); + virtual void Poke(); +}; +#endif //DBGINTERFACE_H + + diff --git a/Debugger/dirkeeper.h b/Debugger/dirkeeper.h new file mode 100644 index 0000000000..1b626f235e --- /dev/null +++ b/Debugger/dirkeeper.h @@ -0,0 +1,19 @@ +#ifndef DIRKEEPER_H +#define DIRKEEPER_H + +#include "wx/string.h" + +class DirKeeper +{ + wxString m_curDir; +public: + DirKeeper(){ + m_curDir = wxGetCwd(); + } + + virtual ~DirKeeper(){ + wxSetWorkingDirectory(m_curDir); + } +}; + +#endif //DIRKEEPER_H diff --git a/Debugger/gdb_lexer.cpp b/Debugger/gdb_lexer.cpp new file mode 100644 index 0000000000..388ffca2a8 --- /dev/null +++ b/Debugger/gdb_lexer.cpp @@ -0,0 +1,1796 @@ +#define yy_create_buffer le_gdb__create_buffer +#define yy_delete_buffer le_gdb__delete_buffer +#define yy_scan_buffer le_gdb__scan_buffer +#define yy_scan_string le_gdb__scan_string +#define yy_scan_bytes le_gdb__scan_bytes +#define yy_flex_debug le_gdb__flex_debug +#define yy_init_buffer le_gdb__init_buffer +#define yy_flush_buffer le_gdb__flush_buffer +#define yy_load_buffer_state le_gdb__load_buffer_state +#define yy_switch_to_buffer le_gdb__switch_to_buffer +#define yyin le_gdb_in +#define yyleng le_gdb_leng +#define yylex le_gdb_lex +#define yyout le_gdb_out +#define yyrestart le_gdb_restart +#define yytext le_gdb_text +#define yylineno le_gdb_lineno +#define yywrap le_gdb_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 31 +#define YY_END_OF_BUFFER 32 +static yyconst short int yy_acclist[105] = + { 0, + 15, 15, 32, 21, 31, 16, 21, 31, 18, 31, + 17, 21, 31, 3, 21, 31, 5, 21, 31, 6, + 21, 31, 10, 21, 31, 15, 21, 31, 1, 21, + 31, 9, 21, 31, 7, 21, 31, 21, 31, 8, + 21, 31, 21, 31, 15, 21, 31, 15, 21, 31, + 15, 21, 31, 2, 21, 31, 4, 21, 31, 23, + 31, 31, 23, 31, 27, 31, 26, 27, 31, 27, + 31, 30, 31, 28, 30, 31, 29, 30, 31, 16, + 18, 17, 15, 19, 20, 15, 15, 15, 22, 25, + 15, 15, 15, 24, 15, 12, 15, 15, 11, 15, + + 13, 15, 14, 15 + } ; + +static yyconst short int yy_accept[70] = + { 0, + 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 4, 6, 9, 11, 14, 17, 20, 23, 26, + 29, 32, 35, 38, 40, 43, 45, 48, 51, 54, + 57, 60, 62, 63, 65, 67, 70, 72, 74, 77, + 80, 81, 82, 82, 83, 84, 85, 86, 86, 87, + 88, 89, 90, 91, 91, 91, 92, 93, 94, 95, + 95, 96, 98, 99, 100, 101, 103, 105, 105 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 1, 8, 1, 1, 1, 1, 1, 9, + 10, 1, 1, 11, 1, 1, 1, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 1, 1, 13, + 14, 15, 1, 1, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 16, 17, 18, 19, 12, 1, 20, 12, 21, 22, + + 23, 12, 12, 12, 12, 12, 12, 24, 25, 26, + 27, 12, 12, 12, 28, 12, 29, 30, 12, 12, + 12, 12, 31, 1, 32, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[33] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1 + } ; + +static yyconst short int yy_base[74] = + { 0, + 0, 0, 30, 31, 32, 33, 38, 39, 0, 0, + 94, 95, 53, 95, 59, 95, 95, 95, 95, 0, + 95, 95, 95, 59, 95, 71, 65, 71, 70, 95, + 95, 95, 95, 81, 95, 95, 60, 95, 95, 95, + 0, 95, 36, 0, 0, 95, 95, 61, 66, 61, + 51, 95, 95, 66, 47, 52, 48, 41, 95, 46, + 20, 0, 17, 95, 11, 0, 0, 95, 77, 79, + 81, 83, 35 + } ; + +static yyconst short int yy_def[74] = + { 0, + 68, 1, 69, 69, 70, 70, 71, 71, 72, 72, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 73, + 68, 68, 68, 68, 68, 68, 73, 73, 73, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 13, 68, 13, 15, 73, 68, 68, 68, 73, 73, + 73, 68, 68, 68, 68, 73, 73, 73, 68, 68, + 73, 73, 73, 68, 73, 73, 73, 0, 68, 68, + 68, 68, 68 + } ; + +static yyconst short int yy_nxt[128] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 18, + 19, 20, 21, 22, 12, 23, 24, 25, 26, 20, + 20, 20, 20, 27, 20, 28, 20, 20, 20, 29, + 30, 31, 33, 33, 33, 33, 45, 43, 67, 66, + 33, 33, 43, 65, 36, 36, 34, 34, 37, 37, + 39, 39, 40, 40, 41, 42, 43, 43, 43, 41, + 43, 42, 44, 44, 44, 43, 46, 53, 64, 63, + 62, 61, 60, 59, 58, 47, 54, 32, 32, 35, + 35, 38, 38, 33, 33, 57, 56, 55, 52, 51, + 50, 49, 48, 68, 11, 68, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68 + } ; + +static yyconst short int yy_chk[128] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 4, 5, 6, 73, 43, 65, 63, + 7, 8, 43, 61, 5, 6, 3, 4, 5, 6, + 7, 8, 7, 8, 13, 13, 13, 13, 13, 13, + 15, 15, 15, 15, 15, 15, 24, 37, 60, 58, + 57, 56, 55, 54, 51, 24, 37, 69, 69, 70, + 70, 71, 71, 72, 72, 50, 49, 48, 34, 29, + 28, 27, 26, 11, 68, 68, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/*************** Includes and Defines *****************************/ + +#include "gdblexer.h" +#include "errno.h" +#include "string" +#include +#include + +#define YYSTYPE std::string + + +std::string le_gdb_string_word; +static int angleDepth(0); + + + +#define STATE_INITIAL 1 +#define STATE_ESCAPE 2 +#define STATE_STRING 3 + +#define RESUME_STATE(x)\ + if(stateToReturn == STATE_INITIAL){\ + BEGIN INITIAL;\ + }else if(stateToReturn == STATE_ESCAPE){\ + BEGIN ESCAPE;\ + }else if(stateToReturn == STATE_STRING){\ + BEGIN STRING;\ + } + +static int stateToReturn(STATE_INITIAL); +static bool needReset(true); + +bool le_gdb_set_input(const YYSTYPE &in); +void le_gdb_lex_clean(); +#define ESCAPE 1 + +#define STRING 2 + +#define DEPTH_ANGLE 3 + +#define DEPTH_ANGLE1 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 95 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + angleDepth = 1; + BEGIN DEPTH_ANGLE; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + + le_gdb_string_word += yytext[0]; + stateToReturn = STATE_INITIAL; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{return (int)'{';} + YY_BREAK +case 3: +YY_RULE_SETUP +{} + YY_BREAK +case 4: +YY_RULE_SETUP +{return (int)'}';} + YY_BREAK +case 5: +YY_RULE_SETUP +{return (int)'(';} + YY_BREAK +case 6: +YY_RULE_SETUP +{return (int)')';} + YY_BREAK +case 7: +YY_RULE_SETUP +{return (int)'[';} + YY_BREAK +case 8: +YY_RULE_SETUP +{return (int)']';} + YY_BREAK +case 9: +YY_RULE_SETUP +{return (int)'=';} + YY_BREAK +case 10: +YY_RULE_SETUP +{return (int)',';} + YY_BREAK +case 11: +YY_RULE_SETUP +{return LE_GDB_DONE;} + YY_BREAK +case 12: +YY_RULE_SETUP +{return LE_GDB_NAME;} + YY_BREAK +case 13: +YY_RULE_SETUP +{return LE_GDB_VALUE;} + YY_BREAK +case 14: +YY_RULE_SETUP +{return LE_GDB_LOCALS;} + YY_BREAK +case 15: +YY_RULE_SETUP +{return LE_GDB_WORD;} + YY_BREAK +case 16: +YY_RULE_SETUP +{} + YY_BREAK +case 17: +YY_RULE_SETUP +{} + YY_BREAK +case 18: +YY_RULE_SETUP +{} + YY_BREAK +case 19: +YY_RULE_SETUP +{BEGIN STRING; le_gdb_string_word = "";} + YY_BREAK +case 20: +YY_RULE_SETUP +{BEGIN ESCAPE;} + YY_BREAK +case 21: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 22: +YY_RULE_SETUP +{BEGIN INITIAL; return (int)'"';} + YY_BREAK +case 23: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 24: +YY_RULE_SETUP +{ + le_gdb_string_word += "\\\""; + } + YY_BREAK +case 25: +YY_RULE_SETUP +{BEGIN INITIAL; return LE_GDB_STRING_LITERAL;} + YY_BREAK +case 26: +YY_RULE_SETUP +{ + angleDepth = 1; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + le_gdb_string_word += yytext[0]; + BEGIN DEPTH_ANGLE; + stateToReturn = STATE_STRING; + } + YY_BREAK +case 27: +YY_RULE_SETUP +{le_gdb_string_word += yytext[0];} + YY_BREAK +case 28: +YY_RULE_SETUP +{ + angleDepth++; + le_gdb_string_word += yytext[0]; + } + YY_BREAK +case 29: +YY_RULE_SETUP +{ + angleDepth--; + le_gdb_string_word += yytext[0]; + if(angleDepth == 0){ + RESUME_STATE(stateToReturn); + needReset = true; + return LE_GDB_STRING_LITERAL; + } + } + YY_BREAK +case 30: +YY_RULE_SETUP +{le_gdb_string_word += yytext[0];} + YY_BREAK +case 31: +YY_RULE_SETUP +ECHO; + YY_BREAK + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(ESCAPE): + case YY_STATE_EOF(STRING): + case YY_STATE_EOF(DEPTH_ANGLE): + case YY_STATE_EOF(DEPTH_ANGLE1): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 68); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +void le_gdb_lex_clean(){ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + le_gdb_lineno = 1; +} + +bool le_gdb_set_input(const YYSTYPE &in){ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} diff --git a/Debugger/gdbinfolexer.cpp b/Debugger/gdbinfolexer.cpp new file mode 100644 index 0000000000..6088dc5c3d --- /dev/null +++ b/Debugger/gdbinfolexer.cpp @@ -0,0 +1,90 @@ +#include "gdbinfolexer.h" + +GdbInfoLexer::GdbInfoLexer(const wxString &input) +: m_input(input) +{ + m_input = m_input.Trim(); + m_input = m_input.Trim(false); +} + +GdbInfoLexer::~GdbInfoLexer() +{ +} + +int GdbInfoLexer::Lex(wxString &word) +{ + word.Empty(); + if(m_input.IsEmpty()){ + return GdbEof; + } + + while(m_input.Length() > 0){ + //Skip whitespaces + wxChar ch = m_input.GetChar(0); + m_input = m_input.Remove(0, 1); + + switch(ch){ + case wxT('{'): + word = word.Trim(); + if(word.IsEmpty() == false){ + //put back this char into the input string + m_input.Prepend(wxT("{")); + return GdbWord; + }else{ + word = ch; + return GdbOpenBrace; + } + case wxT('}'): + word = word.Trim(); + if(word.IsEmpty() == false){ + //put back this char into the input string + m_input.Prepend(wxT("}")); + return GdbWord; + }else{ + word = ch; + return GdbCloseBrace; + } + case wxT('='): + word = word.Trim(); + if(word.IsEmpty() == false){ + //put back this char into the input string + m_input.Prepend(wxT("=")); + return GdbWord; + }else{ + word = ch; + return GdbEqualSign; + } + case wxT(','): + word = word.Trim(); + if(word.IsEmpty() == false){ + //put back this char into the input string + m_input.Prepend(wxT(",")); + return GdbWord; + }else{ + word = ch; + return GdbComma; + } + case wxT('\n'): + case wxT('\t'): + case wxT('\v'): + case wxT('\r'): + //whitespaces + break; + case wxT(' '): + word = word.Trim(); + if(word.IsEmpty() == false){ + return GdbWord; + } + break; + default: + word.Append(ch); + break; + } + } + + word = word.Trim(); + if(word.IsEmpty() == false){ + return GdbWord; + } + return GdbEof; +} diff --git a/Debugger/gdbinfolexer.h b/Debugger/gdbinfolexer.h new file mode 100644 index 0000000000..29877633e6 --- /dev/null +++ b/Debugger/gdbinfolexer.h @@ -0,0 +1,26 @@ +#ifndef GDBINFOLEXER_H +#define GDBINFOLEXER_H + +#include "wx/string.h" + +enum { + GdbEof = 0, + GdbOpenBrace, + GdbCloseBrace, + GdbComma, + GdbEqualSign, + GdbWord +}; + +class GdbInfoLexer +{ + wxString m_input; +public: + GdbInfoLexer(const wxString &input); + virtual ~GdbInfoLexer(); + + int Lex(wxString &word); +}; + +#endif //GDBINFOLEXER_H + diff --git a/Debugger/gdblexer.h b/Debugger/gdblexer.h new file mode 100644 index 0000000000..4cefcddfe4 --- /dev/null +++ b/Debugger/gdblexer.h @@ -0,0 +1,22 @@ +#ifndef GDBLEXER_H +#define GDBLEXER_H + +#include + +#define LE_GDB_WHITE 257 +#define LE_GDB_WORD 258 +#define LE_GDB_DONE 259 +#define LE_GDB_NAME 260 +#define LE_GDB_VALUE 261 +#define LE_GDB_LOCALS 263 +#define LE_GDB_STRING_LITERAL 264 +#define LE_GDB_CHAR_LITERAL 265 + +extern int le_gdb_lex(); +extern bool le_gdb_set_input(const std::string &in); +extern std::string le_gdb_string_word; +extern char *le_gdb_text; +extern void le_gdb_lex_clean(); +#endif //GDBLEXER_H + + diff --git a/Debugger/makefile b/Debugger/makefile new file mode 100644 index 0000000000..4945c48408 --- /dev/null +++ b/Debugger/makefile @@ -0,0 +1,84 @@ +## Author: Eran Ifrah + + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +ifeq ($(type), release) +WXCFG=--unicode=no --debug=no +EXT= +OBJ_DIR=Release_gcc +OPT=-O3 +DEBUG= +endif + +SOFLAG=-shared +OSNAME=$(shell uname -s) +ifeq ($(OSNAME), Darwin) +SOFLAG=-dynamiclib +endif + +ifeq ($(type), release_unicode) +WXCFG=--unicode=yes --debug=no +EXT=u +OBJ_DIR=Release_gcc_unicode +OPT=-O3 -DREGEXP_UNICODE +DEBUG= +endif + +ifeq ($(type), debug_unicode) +WXCFG=--unicode=yes --debug=yes +EXT=ud +OBJ_DIR=Debug_gcc_unicode +DEBUG= -g +OPT=-DREGEXP_UNICODE +endif + +WXVER=26 +OUTPUT_DIR=../lib + +#PROFILER= -pg +## +## Define variables, using wx-config tool +## +CMP=g++ $(DEBUG) $(OPT) + +CCFLAGS= -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 +LINK_FLAGS=$(shell wx-config --libs $(WXCFG)) -L../lib -lplugin$(EXT) -lcodelite$(EXT) +SQLITE_INCLUDE= -I../sdk/wxsqlite3/include -I../sdk/wxsqlite3/sqlite3/include +INCLUDES = -I. -I../Interfaces -I../CodeLite -I../Plugin + +## +## Define the object files +## +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.cpp))))) +lib_c_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.c))))) + +## our main build target +build : pre_build Plugin + +Plugin: $(lib_cpp_objects) $(lib_c_objects) + $(CMP) $(SOFLAG) -o $(OUTPUT_DIR)/Debugger.so $(lib_cpp_objects) $(lib_c_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: %.cpp + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +$(OBJ_DIR)/%.o: %.c + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + +clean: + $(RM) Debug_gcc/*.o Release_gcc/*.o Release_gcc_unicode/*. Debug_gcc_unicode/*.o lib/*.o $(OUTPUT_DIR)/Debugger.so + $(RM) -R Debug_gcc Release_gcc Release_gcc_unicode Debug_gcc_unicode diff --git a/Gizmos/Gizmos.project b/Gizmos/Gizmos.project new file mode 100644 index 0000000000..d867bee618 --- /dev/null +++ b/Gizmos/Gizmos.project @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gizmos/gizmos.cpp b/Gizmos/gizmos.cpp new file mode 100644 index 0000000000..015c4f3a65 --- /dev/null +++ b/Gizmos/gizmos.cpp @@ -0,0 +1,512 @@ +#include "gizmos.h" +#include +#include "pluginwizard.h" +#include "globals.h" +#include "dirsaver.h" +#include "workspace.h" +#include "wx/ffile.h" +#include "newclassdlg.h" +#include "newwxprojectdlg.h" + +static GizmosPlugin* theGismos = NULL; + +//Define the plugin entry point +extern "C" EXPORT IPlugin *CreatePlugin(IManager *manager) +{ + if (theGismos == 0) { + theGismos = new GizmosPlugin(manager); + } + return theGismos; +} + +//------------------------------------- +// helper methods +//------------------------------------- +static void ExpandVariables(wxString &content, const NewWxProjectInfo &info) +{ + content.Replace(wxT("$(ProjectName)"), info.GetName()); + wxString projname = info.GetName(); + projname.MakeLower(); + + wxString appfilename = projname + wxT("_app"); + wxString framefilename = projname + wxT("_frame"); + content.Replace(wxT("$(MainFrameFile)"), framefilename); + content.Replace(wxT("$(AppFile)"), appfilename); + content.Replace(wxT("$(Unicode)"), info.GetFlags() & wxWidgetsUnicode ? wxT("yes") : wxT("no")); + content.Replace(wxT("$(MWindowsFlag)"), info.GetFlags() & wxWidgetsSetMWindows ? wxT("-mwindows") : wxEmptyString); + content.Replace(wxT("$(MainFile)"), projname); + + //create the application class name + wxString initial = appfilename.Mid(0, 1); + initial.MakeUpper(); + appfilename.SetChar(0, initial.GetChar(0)); + + //create the main frame class name + wxString framename(projname); + wxString appname(projname); + + framename << wxT("Frame"); + appname << wxT("App"); + + initial = framename.Mid(0, 1); + initial.MakeUpper(); + framename.SetChar(0, initial.GetChar(0)); + + initial = appname.Mid(0, 1); + initial.MakeUpper(); + appname.SetChar(0, initial.GetChar(0)); + + content.Replace(wxT("$(AppName)"), appname); + content.Replace(wxT("$(MainFrameName)"), framename); +} + +static void WriteFile(const wxString &fileName, const wxString &content) +{ + wxFFile file; + if (!file.Open(fileName, wxT("w+b"))) { + return; + } + + file.Write(content); + file.Close(); +} + +GizmosPlugin::GizmosPlugin(IManager *manager) + : IPlugin(manager) +{ + m_longName = wxT("Gizmos Plugin - a collection of useful utils for C++"); + m_shortName = wxT("Gizmos"); +} + +GizmosPlugin::~GizmosPlugin() +{ +} + +wxToolBar *GizmosPlugin::CreateToolBar(wxWindow *parent) +{ + wxToolBar *tb = new wxToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + + tb->AddTool(XRCID("new_plugin"), wxT("New CodeLite Plugin Project"), wxXmlResource::Get()->LoadBitmap(wxT("plugin24")), wxT("New Plugin Wizard...")); + tb->AddTool(XRCID("new_class"), wxT("Create New Class"), wxXmlResource::Get()->LoadBitmap(wxT("class24")), wxT("New Class...")); + + tb->AddTool(XRCID("new_wx_project"), wxT("New wxWidget Project"), wxXmlResource::Get()->LoadBitmap(wxT("new_wx_project")), wxT("New wxWidget Project")); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + tb->Realize(); + + //Connect the events to us + parent->Connect(XRCID("new_plugin"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(GizmosPlugin::OnNewPlugin), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("new_plugin"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GizmosPlugin::OnNewPluginUI), NULL, (wxEvtHandler*)this); + + + parent->Connect(XRCID("new_class"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(GizmosPlugin::OnNewClass), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("new_class"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GizmosPlugin::OnNewClassUI), NULL, (wxEvtHandler*)this); + + parent->Connect(XRCID("new_wx_project"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(GizmosPlugin::OnNewWxProject), NULL, (wxEvtHandler*)this); + parent->Connect(XRCID("new_wx_project"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GizmosPlugin::OnNewWxProjectUI), NULL, (wxEvtHandler*)this); + return tb; +} + +void GizmosPlugin::CreatePluginMenu(wxMenu *pluginsMenu) +{ + //TODO:: create the menu for the 'Plugin' menu entry in the + //menu bar +} + +void GizmosPlugin::HookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeFileView_Folder) { + //Create the popup menu for the virtual folders + wxMenuItem *item(NULL); + + item = new wxMenuItem(menu, wxID_SEPARATOR); + menu->Prepend(item); + m_vdDynItems.push_back(item); + + item = new wxMenuItem(menu, XRCID("new_class"), wxT("&New Class..."), wxEmptyString, wxITEM_NORMAL); + menu->Prepend(item); + m_vdDynItems.push_back(item); + } +} + +void GizmosPlugin::UnHookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeFileView_Folder) { + std::vector::iterator iter = m_vdDynItems.begin(); + for (; iter != m_vdDynItems.end(); iter++) { + menu->Destroy(*iter); + } + m_vdDynItems.clear(); + } +} + +void GizmosPlugin::UnPlug() +{ + //TODO:: perform the unplug action of this plugin +} + +void GizmosPlugin::OnNewPlugin(wxCommandEvent &e) +{ + wxUnusedVar(e); + //Load the wizard + PluginWizard *wiz = new PluginWizard(NULL, wxID_ANY); + PluginData data; + if (wiz->Run(data)) { + //load the template file and replace all variables with the + //actual values provided by user + wxString filename(m_mgr->GetStartupDirectory() + wxT("/templates/liteeditor-plugin.project.wizard")); + wxString content; + if (!ReadFileWithConversion(filename, content)) { + return; + } + //convert the paths provided by user to relative paths + DirSaver ds; + wxSetWorkingDirectory(data.GetProjectPath()); + wxFileName fn(data.GetCodelitePath()); + + if (!fn.MakeRelativeTo(wxGetCwd())) { + wxLogMessage(wxT("Warning: Failed to convert paths to relative path.")); + } +#ifdef __WXMSW__ + wxString dllExt(wxT("dll")); +#else + wxString dllExt(wxT("so")); +#endif + wxString clpath = fn.GetFullPath(); + + content.Replace(wxT("$(CodeLitePath)"), clpath); + content.Replace(wxT("$(DllExt)"), dllExt); + content.Replace(wxT("$(PluginName)"), data.GetPluginName()); + wxString baseFileName = data.GetPluginName(); + baseFileName.MakeLower(); + content.Replace(wxT("$(BaseFileName)"), baseFileName); + content.Replace(wxT("$(ProjectName)"), data.GetPluginName()); + + //save the file to the disk + wxString projectFileName; + projectFileName << data.GetProjectPath() << wxT("/") << data.GetPluginName() << wxT(".project"); + wxFFile file; + if (!file.Open(projectFileName, wxT("w+b"))) { + return; + } + + file.Write(content); + file.Close(); + + //Create the plugin source and header files + wxString srcFile(baseFileName + wxT(".cpp")); + wxString headerFile(baseFileName + wxT(".h")); + + //--------------------------------------------------------------- + //write the content of the file based on the file template + //--------------------------------------------------------------- + + //Generate the source files + filename = m_mgr->GetStartupDirectory() + wxT("/templates/plugin.cpp.wizard"); + content.Clear(); + if (!ReadFileWithConversion(filename, content)) { + wxMessageBox(wxT("Failed to load wizard's file 'plugin.cpp.wizard'"), wxT("CodeLite"), wxICON_WARNING | wxOK); + return; + } + + // Expand macros + content.Replace(wxT("$(PluginName)"), data.GetPluginName()); + content.Replace(wxT("$(BaseFileName)"), baseFileName); + content.Replace(wxT("$(PluginShortName)"), data.GetPluginName()); + content.Replace(wxT("$(PluginLongName)"), data.GetPluginDescription()); + + file.Open(srcFile, wxT("w+b")); + file.Write(content); + file.Close(); + + //create the header file + filename = m_mgr->GetStartupDirectory() + wxT("/templates/plugin.h.wizard"); + content.Clear(); + if (!ReadFileWithConversion(filename, content)) { + wxMessageBox(wxT("Failed to load wizard's file 'plugin.h.wizard'"), wxT("CodeLite"), wxICON_WARNING | wxOK); + return; + } + + // Expand macros + content.Replace(wxT("$(PluginName)"), data.GetPluginName()); + content.Replace(wxT("$(BaseFileName)"), baseFileName); + content.Replace(wxT("$(PluginShortName)"), data.GetPluginName()); + content.Replace(wxT("$(PluginLongName)"), data.GetPluginDescription()); + + file.Open(headerFile, wxT("w+b")); + file.Write(content); + file.Close(); + + //add the new project to the workspace + wxString errMsg; + + //convert the path to be full path as required by the + //workspace manager + m_mgr->AddProject(projectFileName); + } + wiz->Destroy(); +} + +void GizmosPlugin::OnNewPluginUI(wxUpdateUIEvent &e) +{ + //we enable the button only when workspace is opened + e.Enable(m_mgr->IsWorkspaceOpen()); +} + +void GizmosPlugin::OnNewClassUI(wxUpdateUIEvent &e) +{ + //we enable the button only when workspace is opened + e.Enable(m_mgr->IsWorkspaceOpen()); +} + +void GizmosPlugin::OnNewClass(wxCommandEvent &e) +{ + NewClassDlg *dlg = new NewClassDlg(NULL, m_mgr); + if (dlg->ShowModal() == wxID_OK) { + //do something with the information here + NewClassInfo info; + dlg->GetNewClassInfo(info); + + CreateClass(info); + } + dlg->Destroy(); +} + +void GizmosPlugin::CreateClass(const NewClassInfo &info) +{ + wxString macro(info.name); + macro.MakeLower(); + + //create cpp + h file + wxString cpp; + wxString header; + + //---------------------------------------------------- + // header file + //---------------------------------------------------- + header << wxT("#ifndef __") << macro << wxT("__\n"); + header << wxT("#define __") << macro << wxT("__\n"); + header << wxT("\n"); + header << wxT("class ") << info.name; + + if (info.parents.empty() == false) { + header << wxT(" : "); + for (size_t i=0; i< info.parents.size(); i++) { + ClassParentInfo pi = info.parents.at(i); + header << pi.access << wxT(" ") << pi.name << wxT(", "); + } + header = header.BeforeLast(wxT(',')); + } + header << wxT(" {\n\n"); + + if (info.isSingleton) { + header << wxT("\tstatic ") << info.name << wxT("* ms_instance;\n\n"); + } + + if (info.isAssingable == false) { + //declare copy constructor & assingment operator as private + header << wxT("private:\n"); + header << wxT("\t") << info.name << wxT("(const ") << info.name << wxT("& rhs);\n"); + header << wxT("\t") << info.name << wxT("& operator=(const ") << info.name << wxT("& rhs);\n"); + header << wxT("\n"); + } + + if (info.isSingleton) { + header << wxT("public:\n"); + header << wxT("\tstatic ") << info.name << wxT("* Instance();\n"); + header << wxT("\tstatic void Release();\n\n"); + + header << wxT("private:\n"); + header << wxT("\t") << info.name << wxT("();\n"); + + if (info.isVirtualDtor) { + header << wxT("\tvirtual ~") << info.name << wxT("();\n\n"); + } else { + header << wxT("\t~") << info.name << wxT("();\n\n"); + } + } else { + header << wxT("public:\n"); + header << wxT("\t") << info.name << wxT("();\n"); + if (info.isVirtualDtor) { + header << wxT("\tvirtual ~") << info.name << wxT("();\n\n"); + } else { + header << wxT("\t~") << info.name << wxT("();\n\n"); + } + } + header << wxT("};\n"); + header << wxT("#endif // __") << macro << wxT("__\n"); + + //---------------------------------------------------- + // source file + //---------------------------------------------------- + cpp << wxT("#include \"") << macro << wxT(".h\"\n"); + if (info.isSingleton) { + cpp << info.name << wxT("* ") << info.name << wxT("::ms_instance = 0;\n\n"); + } + //ctor/dtor + cpp << info.name << wxT("::") << info.name << wxT("()\n"); + cpp << wxT("{\n}\n\n"); + cpp << info.name << wxT("::~") << info.name << wxT("()\n"); + cpp << wxT("{\n}\n\n"); + if (info.isSingleton) { + cpp << info.name << wxT("* ") << info.name << wxT("::Instance()\n"); + cpp << wxT("{\n"); + cpp << wxT("\tif(ms_instance == 0){\n"); + cpp << wxT("\t\tms_instance = new ") << info.name << wxT("();\n"); + cpp << wxT("\t}\n"); + cpp << wxT("\treturn ms_instance;\n"); + cpp << wxT("}\n\n"); + + cpp << wxT("void ") << info.name << wxT("::Release()\n"); + cpp << wxT("{\n"); + cpp << wxT("\tif(ms_instance){\n"); + cpp << wxT("\t\tdelete ms_instance;\n"); + cpp << wxT("\t}\n"); + cpp << wxT("\tms_instance = 0;\n"); + cpp << wxT("}\n\n"); + } + + wxFFile file; + wxString srcFile; + wxString hdrFile; + srcFile << info.path << wxT("/") << macro << wxT(".cpp"); + hdrFile << info.path << wxT("/") << macro << wxT(".h"); + + file.Open(srcFile, wxT("w+b")); + file.Write(cpp); + file.Close(); + + file.Open(hdrFile, wxT("w+b")); + file.Write(header); + file.Close(); + + //if we have a selected virtual folder, add the files to it + wxArrayString paths; + paths.Add(srcFile); + paths.Add(hdrFile); + + TreeItemInfo item = m_mgr->GetSelectedTreeItemInfo(TreeFileView); + if (item.m_item.IsOk()) { + if (m_mgr->AddFilesToVirtualFodler(item.m_item, paths) == false) { + //probably not a virtual folder + wxString msg; + msg << wxT("CodeLite created the class successfully, but was unable to add the generated files to any virtual folder (since non was selected)\n"); + msg << wxT("You can right click on virtual folder (in the 'Files' tab) and manually add them\n"); + msg << wxT("To avoid this error in the future, select the target virtual folder before creating the class"); + wxMessageBox(msg, wxT("CodeLite"), wxOK|wxICON_INFORMATION); + } + } +} + +void GizmosPlugin::OnNewWxProject(wxCommandEvent &e) +{ + NewWxProjectDlg *dlg = new NewWxProjectDlg(NULL, m_mgr); + if (dlg->ShowModal() == wxID_OK) { + //Create the project + NewWxProjectInfo info; + dlg->GetProjectInfo(info); + CreateWxProject(info); + } + dlg->Destroy(); +} + +void GizmosPlugin::OnNewWxProjectUI(wxUpdateUIEvent &e) +{ + //we enable the button only when workspace is opened + e.Enable(m_mgr->IsWorkspaceOpen()); +} + +void GizmosPlugin::CreateWxProject(NewWxProjectInfo &info) +{ + //TODO:: Implement this ... + //we first create the project files + if (info.GetType() == wxProjectTypeGUI) { + + //we are creating a project of type GUI + wxString basedir = m_mgr->GetStartupDirectory(); + + wxString projectConent; + wxString mainFrameCppContent; + wxString mainFrameHContent; + wxString appCppConent; + wxString apphConent; + + if (!ReadFileWithConversion(basedir + wxT("/templates/wxproject.project.wizard"), projectConent)) { + return; + } + if (!ReadFileWithConversion(basedir + wxT("/templates/mainframe.cpp.wizard"), mainFrameCppContent)) { + return; + } + if (!ReadFileWithConversion(basedir + wxT("/templates/mainframe.h.wizard"), mainFrameHContent)) { + return; + } + if (!ReadFileWithConversion(basedir + wxT("/templates/app.h.wizard"), apphConent)) { + return; + } + if (!ReadFileWithConversion(basedir + wxT("/templates/app.cpp.wizard"), appCppConent)) { + return; + } + + ExpandVariables(projectConent, info); + ExpandVariables(mainFrameCppContent, info); + ExpandVariables(mainFrameHContent, info); + ExpandVariables(apphConent, info); + ExpandVariables(appCppConent, info); + + //Write the files content into the project directory + DirSaver ds; + wxSetWorkingDirectory(info.GetPath()); + + wxString projname = info.GetName(); + projname.MakeLower(); + + wxString appfilename = projname + wxT("_app"); + wxString framefilename = projname + wxT("_frame"); + + WriteFile(framefilename + wxT(".cpp"), mainFrameCppContent); + WriteFile(framefilename + wxT(".h"), mainFrameHContent); + WriteFile(appfilename + wxT(".h"), apphConent); + WriteFile(appfilename+ wxT(".cpp"), appCppConent); + WriteFile(info.GetName() + wxT(".project"), projectConent); + + //If every this is OK, add the project as well + m_mgr->AddProject(info.GetName() + wxT(".project")); + } + else if (info.GetType() == wxProjectTypeSimpleMain) { + + //we are creating a project of type GUI + wxString basedir = m_mgr->GetStartupDirectory(); + + wxString projectConent; + wxString mainFrameCppContent; + wxString mainFrameHContent; + wxString appCppConent; + wxString apphConent; + + if (!ReadFileWithConversion(basedir + wxT("/templates/wxmain.project.wizard"), projectConent)) { + return; + } + if (!ReadFileWithConversion(basedir + wxT("/templates/main.cpp.wizard"), appCppConent)) { + return; + } + + ExpandVariables(projectConent, info); + ExpandVariables(appCppConent, info); + + //Write the files content into the project directory + DirSaver ds; + wxSetWorkingDirectory(info.GetPath()); + + wxString projname = info.GetName(); + projname.MakeLower(); + + wxString appfilename = projname; + WriteFile(appfilename+ wxT(".cpp"), appCppConent); + WriteFile(info.GetName() + wxT(".project"), projectConent); + + //If every this is OK, add the project as well + m_mgr->AddProject(info.GetName() + wxT(".project")); + } +} diff --git a/Gizmos/gizmos.h b/Gizmos/gizmos.h new file mode 100644 index 0000000000..29c3ce863c --- /dev/null +++ b/Gizmos/gizmos.h @@ -0,0 +1,40 @@ +#ifndef GIZMOS_H +#define GIZMOS_H + +#include "plugin.h" +#include "vector" +#include "newclassdlg.h" +#include "newwxprojectinfo.h" + +class GizmosPlugin : public IPlugin +{ + void CreateClass(const NewClassInfo &info); + std::vector m_vdDynItems; +protected: + void CreateWxProject(NewWxProjectInfo &info); + +public: + GizmosPlugin(IManager *manager); + ~GizmosPlugin(); + + //-------------------------------------------- + //Abstract methods + //-------------------------------------------- + virtual wxToolBar *CreateToolBar(wxWindow *parent); + virtual void CreatePluginMenu(wxMenu *pluginsMenu); + virtual void HookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnHookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnPlug(); + + //event handlers + virtual void OnNewPlugin(wxCommandEvent &e); + virtual void OnNewClass(wxCommandEvent &e); + virtual void OnNewClassUI(wxUpdateUIEvent &e); + virtual void OnNewPluginUI(wxUpdateUIEvent &e); + virtual void OnNewWxProject(wxCommandEvent &e); + virtual void OnNewWxProjectUI(wxUpdateUIEvent &e); + +}; + +#endif //GIZMOS_H + diff --git a/Gizmos/makefile b/Gizmos/makefile new file mode 100644 index 0000000000..3ebe34391a --- /dev/null +++ b/Gizmos/makefile @@ -0,0 +1,85 @@ +## Author: Eran Ifrah + +SOFLAG=-shared +OSNAME=$(shell uname -s) +ifeq ($(OSNAME), Darwin) +SOFLAG=-dynamiclib +endif + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +ifeq ($(type), release) +WXCFG=--unicode=no --debug=no +EXT= +OBJ_DIR=Release_gcc +OPT=-O3 +DEBUG= +endif + +ifeq ($(type), release_unicode) +WXCFG=--unicode=yes --debug=no +EXT=u +OBJ_DIR=Release_gcc_unicode +OPT=-O3 -DREGEXP_UNICODE +DEBUG= +endif + +ifeq ($(type), debug_unicode) +WXCFG=--unicode=yes --debug=yes +EXT=ud +OBJ_DIR=Debug_gcc_unicode +DEBUG= -g +OPT=-DREGEXP_UNICODE +endif + +WXVER=26 +OUTPUT_DIR=../lib + +#PROFILER= -pg +## +## Define variables, using wx-config tool +## +CMP=g++ $(DEBUG) $(OPT) + +CCFLAGS= -DASTYLE_LIB -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 + +SQLITE_INCLUDE= -I../sdk/wxsqlite3/include -I../sdk/wxsqlite3/sqlite3/include +INCLUDES = -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxflatnotebook/include $(SQLITE_INCLUDE) +LINK_FLAGS=$(shell wx-config --libs $(WXCFG)) -L../lib -lplugin$(EXT) -lcodelite$(EXT) -L../sdk/wxflatnotebook/lib -lwxflatnotebook$(EXT) -lwxsqlite3$(EXT) + +## +## Define the object files +## +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.cpp))))) + +## our main build target +build : pre_build Gizmos + +Gizmos: $(lib_cpp_objects) $(lib_c_objects) + $(CMP) $(SOFLAG) -o $(OUTPUT_DIR)/Gizmos.so $(lib_cpp_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: %.cpp %.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +%.o.d: + $(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM $(addsuffix .cpp, $(basename $(basename $(@F)))) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + +clean: + $(RM) -fR Release_gcc_unicode/ $(OUTPUT_DIR)/Gizmos.so + $(RM) -fR Debug_gcc_unicode/ + +-include $(OBJ_DIR)/*.d diff --git a/Gizmos/new_class.png b/Gizmos/new_class.png new file mode 100644 index 0000000000000000000000000000000000000000..67bb4ede45ced35673393fdec4b0b8c63c1a850f GIT binary patch literal 7960 zcmai(by!p3+s6+fjf5gyGL(`|rMsjNkd_<`qg%R57&SoYmXOgQD9sQl>2B##@*VzO ze%Jfodv}om|0=4!|R9dIqG9bEiu=I(fN(t*l*va)QB^NcG`A)y2Z}E|ks{Y;OVZ zofBXqk6_;&(R8$Q^)Pj@01TaO@4|8a4GxBw*_k3kU4Z(IFY!nj>rU1&b#VYYSOFcB z>)}WZ^FN<=b1}03PH%&E?!%-U?d>fbT!FJeXggBFxC_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TzK!EUBuD8YPj6|dQQM+Pn)76;I=%pVq26Bw|EN&>xF?S3e`0T8#%-C?i?G@ zYAoglqy|{sp4(Dmg-&bA+43 zpxRn#n%bJ~GWJ_qJt|XE*g}Q7y7U7z_M%A_d+~h|q)>7kYFZ zT7E>sV-2VG5gK&4;@EzDX3pp609~M&OcbOnGSR5L6Bzvx0oH}u>lT`3KrM(yIq^P_ z$?B<}JrHENv+ItrSetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_mainPanel->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + m_bmp = new wxStaticBitmap( m_mainPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_bmp, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 0 ); + + m_mainPanel->SetSizer( bSizer3 ); + m_mainPanel->Layout(); + bSizer3->Fit( m_mainPanel ); + bSizer2->Add( m_mainPanel, 1, wxALL|wxEXPAND, 0 ); + + bSizer1->Add( bSizer2, 0, wxEXPAND, 0 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline2, 0, wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL, 0 ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textClassName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textClassName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Class folder:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + fgSizer1->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPicker = new DirPicker(this, wxID_ANY); + fgSizer1->Add( m_dirPicker, 0, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( fgSizer1, 0, wxEXPAND, 5 ); + + m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Inherits:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + bSizer1->Add( m_staticText9, 0, wxALL, 5 ); + + wxBoxSizer* bSizer15; + bSizer15 = new wxBoxSizer( wxHORIZONTAL ); + + m_listCtrl1 = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES ); + bSizer15->Add( m_listCtrl1, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxVERTICAL ); + + m_buttonAddInheritance = new wxButton( this, ID_ADD_INHERITANCE, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer16->Add( m_buttonAddInheritance, 0, wxALL, 5 ); + + m_buttonDelInheritance = new wxButton( this, ID_DELETE_INHERITANCE, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer16->Add( m_buttonDelInheritance, 0, wxALL, 5 ); + + bSizer15->Add( bSizer16, 0, wxEXPAND, 5 ); + + bSizer1->Add( bSizer15, 1, wxEXPAND, 5 ); + + m_checkBox6 = new wxCheckBox( this, wxID_ANY, wxT("This is a singleton class"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer1->Add( m_checkBox6, 0, wxALL, 5 ); + + m_checkBoxVirtualDtor = new wxCheckBox( this, wxID_ANY, wxT("Virtual destructor"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer1->Add( m_checkBoxVirtualDtor, 0, wxALL, 5 ); + + m_checkBoxCopyable = new wxCheckBox( this, wxID_ANY, wxT("Declare this class as non-copyable class"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer1->Add( m_checkBoxCopyable, 0, wxALL, 5 ); + + m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* buttonSizer; + buttonSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK->SetDefault(); + buttonSizer->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( NewClassBaseDlg::OnListItemActivated ), NULL, this ); + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( NewClassBaseDlg::OnListItemDeSelected ), NULL, this ); + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( NewClassBaseDlg::OnListItemSelected ), NULL, this ); + m_buttonAddInheritance->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewClassBaseDlg::OnButtonAdd ), NULL, this ); + m_buttonDelInheritance->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewClassBaseDlg::OnButtonDelete ), NULL, this ); + m_buttonDelInheritance->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( NewClassBaseDlg::OnButtonDeleteUI ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewClassBaseDlg::OnButtonOK ), NULL, this ); +} diff --git a/Gizmos/newclassbasedlg.h b/Gizmos/newclassbasedlg.h new file mode 100644 index 0000000000..bfc9db0df8 --- /dev/null +++ b/Gizmos/newclassbasedlg.h @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __newclassbasedlg__ +#define __newclassbasedlg__ + +#include +#include +#include +#include +#include +#include +#include "dirpicker.h" +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define ID_ADD_INHERITANCE 1000 +#define ID_DELETE_INHERITANCE 1001 + +/////////////////////////////////////////////////////////////////////////////// +/// Class NewClassBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class NewClassBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_mainPanel; + wxStaticBitmap* m_bmp; + wxStaticLine* m_staticline2; + wxStaticText* m_staticText1; + wxTextCtrl* m_textClassName; + wxStaticText* m_staticText2; + DirPicker *m_dirPicker; + wxStaticLine* m_staticline6; + wxStaticText* m_staticText9; + wxListCtrl* m_listCtrl1; + wxButton* m_buttonAddInheritance; + wxButton* m_buttonDelInheritance; + wxCheckBox* m_checkBox6; + wxCheckBox* m_checkBoxVirtualDtor; + wxCheckBox* m_checkBoxCopyable; + wxStaticLine* m_staticline5; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnListItemActivated( wxListEvent& event ){ event.Skip(); } + virtual void OnListItemDeSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnListItemSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnButtonAdd( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonDelete( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonDeleteUI( wxUpdateUIEvent& event ){ event.Skip(); } + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + + + public: + NewClassBaseDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("New Class"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 690,631 ), int style = wxDEFAULT_DIALOG_STYLE); + +}; + +#endif //__newclassbasedlg__ diff --git a/Gizmos/newclassdlg.cpp b/Gizmos/newclassdlg.cpp new file mode 100644 index 0000000000..cdacd6dfc9 --- /dev/null +++ b/Gizmos/newclassdlg.cpp @@ -0,0 +1,144 @@ +#include "newclassdlg.h" +#include "wx/xrc/xmlres.h" +#include "newinheritancedlg.h" +#include "imanager.h" +#include "globals.h" +#include "wx/dir.h" +#include "workspace.h" + +NewClassDlg::NewClassDlg( wxWindow* parent, IManager *mgr ) + : NewClassBaseDlg( parent, wxID_ANY, wxT("New Class"), wxDefaultPosition, wxSize( 690,631 ), wxDEFAULT_DIALOG_STYLE) + , m_selectedItem(wxNOT_FOUND) + , m_mgr(mgr) +{ + m_bmp->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("new_class_title"))); + + //set two columns to our list + m_listCtrl1->InsertColumn(0, wxT("Name")); + m_listCtrl1->InsertColumn(1, wxT("Access")); + + TreeItemInfo item = mgr->GetSelectedTreeItemInfo(TreeFileView); + //set the class path to be the active project path + wxString errMsg; + if (m_mgr->GetWorkspace()) { + if (item.m_item.IsOk() && item.m_itemType == ProjectItem::TypeVirtualDirectory) { + m_dirPicker->SetPath(item.m_fileName.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR)); + } else { + wxString projname = m_mgr->GetWorkspace()->GetActiveProjectName(); + ProjectPtr proj = m_mgr->GetWorkspace()->FindProjectByName(projname, errMsg); + if (proj) { + m_dirPicker->SetPath(proj->GetFileName().GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR)); + } + } + } + GetSizer()->Layout(); +} + +void NewClassDlg::OnListItemActivated( wxListEvent& event ) +{ + m_selectedItem = event.m_itemIndex; + //open the inheritance dialog + wxString parentName = GetColumnText(m_listCtrl1, m_selectedItem, 0); + wxString access = GetColumnText(m_listCtrl1, m_selectedItem, 1); + NewIneritanceDlg *dlg = new NewIneritanceDlg(NULL, m_mgr, parentName, access); + if (dlg->ShowModal() == wxID_OK) { + //now set the text to this column + SetColumnText(m_listCtrl1, m_selectedItem, 0, dlg->GetParentName()); + SetColumnText(m_listCtrl1, m_selectedItem, 1, dlg->GetAccess()); + m_listCtrl1->Refresh(); + } + dlg->Destroy(); +} + +void NewClassDlg::OnListItemSelected( wxListEvent& event ) +{ + m_selectedItem = event.m_itemIndex; +} + +void NewClassDlg::OnButtonAdd( wxCommandEvent& event ) +{ + NewIneritanceDlg *dlg = new NewIneritanceDlg(this, m_mgr); + if (dlg->ShowModal() == wxID_OK) { + //add new parent to our class + //now set the text to this column + long item = AppendListCtrlRow(m_listCtrl1); + + SetColumnText(m_listCtrl1, item, 0, dlg->GetParentName()); + SetColumnText(m_listCtrl1, item, 1, dlg->GetAccess()); + m_listCtrl1->Refresh(); + } + dlg->Destroy(); +} + +void NewClassDlg::OnListItemDeSelected(wxListEvent &e) +{ + wxUnusedVar(e); + m_selectedItem = wxNOT_FOUND; +} + +void NewClassDlg::OnButtonDelete( wxCommandEvent& event ) +{ + wxUnusedVar(event); + m_listCtrl1->DeleteItem(m_selectedItem); + m_selectedItem = wxNOT_FOUND; +} + +void NewClassDlg::OnButtonDeleteUI( wxUpdateUIEvent& event ) +{ + event.Enable(m_selectedItem != wxNOT_FOUND); +} + +void NewClassDlg::GetInheritance(std::vector< ClassParentInfo > &inheritVec) +{ + long item = -1; + for ( ;; ) { + item = m_listCtrl1->GetNextItem(item); + if ( item == -1 ) + break; + + ClassParentInfo info; + info.name = GetColumnText(m_listCtrl1, item, 0); + info.access = GetColumnText(m_listCtrl1, item, 1); + inheritVec.push_back(info); + } +} + +void NewClassDlg::OnButtonOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + if (!ValidateInput()) { + return; + } + EndModal(wxID_OK); +} + +bool NewClassDlg::ValidateInput() +{ + //validate the class name + if (!IsValidCppIndetifier( m_textClassName->GetValue() )) { + wxString msg; + msg << wxT("'") << m_textClassName->GetValue() << wxT("' is not a valid C++ qualifier"); + wxMessageBox(msg, wxT("CodeLite"), wxOK | wxICON_WARNING); + return false; + } + + //validate the path of the class + wxString path(m_dirPicker->GetPath()); + if (!wxDir::Exists(path)) { + wxString msg; + msg << wxT("'") << path << wxT("': directory does not exist"); + wxMessageBox(msg, wxT("CodeLite"), wxOK | wxICON_WARNING); + return false; + } + return true; +} + +void NewClassDlg::GetNewClassInfo(NewClassInfo &info) +{ + info.isSingleton = this->IsSingleton(); + info.name = this->GetClassName(); + this->GetInheritance(info.parents); + info.path = this->GetClassPath(); + info.isAssingable = this->IsCopyableClass(); + info.isVirtualDtor = m_checkBoxVirtualDtor->IsChecked(); +} diff --git a/Gizmos/newclassdlg.h b/Gizmos/newclassdlg.h new file mode 100644 index 0000000000..3978e25a0a --- /dev/null +++ b/Gizmos/newclassdlg.h @@ -0,0 +1,56 @@ +#ifndef __newclassdlg__ +#define __newclassdlg__ + +/** +@file +Subclass of NewClassBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "newclassbasedlg.h" +#include "vector" + +class IManager; + +struct ClassParentInfo { + wxString name; + wxString access; +}; + +struct NewClassInfo { + wxString name; + wxString path; + bool isSingleton; + bool isAssingable; + bool isVirtualDtor; + std::vector< ClassParentInfo > parents; +}; + +/** Implementing NewClassBaseDlg */ +class NewClassDlg : public NewClassBaseDlg +{ + long m_selectedItem; + IManager *m_mgr; +protected: + // Handlers for NewClassBaseDlg events. + void OnListItemActivated( wxListEvent& event ); + void OnListItemSelected( wxListEvent& event ); + void OnButtonAdd( wxCommandEvent& event ); + void OnButtonDelete( wxCommandEvent& event ); + void OnButtonDeleteUI( wxUpdateUIEvent& event ); + void OnListItemDeSelected(wxListEvent &e); + void OnButtonOK(wxCommandEvent &e); + bool ValidateInput(); + +public: + /** Constructor */ + NewClassDlg( wxWindow* parent, IManager *mgr ); + void GetNewClassInfo(NewClassInfo &info); + + void GetInheritance(std::vector< ClassParentInfo > &inheritVec); + bool IsSingleton() {return m_checkBox6->GetValue();} + wxString GetClassName(){return m_textClassName->GetValue();} + wxString GetClassPath(){return m_dirPicker->GetPath();} + bool IsCopyableClass(){return !m_checkBoxCopyable->IsChecked();} +}; + +#endif // __newclassdlg__ diff --git a/Gizmos/newinheritancebasedlg.cpp b/Gizmos/newinheritancebasedlg.cpp new file mode 100644 index 0000000000..e95d047f48 --- /dev/null +++ b/Gizmos/newinheritancebasedlg.cpp @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "newinheritancebasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +NewIneritanceBaseDlg::NewIneritanceBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_staticText2 = new wxStaticText( m_panel1, wxID_ANY, wxT("Parent class:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer5->Add( m_staticText2, 0, wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlInhertiance = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_textCtrlInhertiance, 1, wxALL|wxEXPAND, 5 ); + + m_buttonMore = new wxButton( m_panel1, wxID_ANY, wxT("More..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizer2->Add( m_buttonMore, 0, wxALL, 5 ); + + bSizer5->Add( bSizer2, 0, wxEXPAND, 0 ); + + m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, wxT("Inheritance access:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer5->Add( m_staticText1, 0, wxALL, 5 ); + + wxString m_choiceAccessChoices[] = { wxT("public"), wxT("private"), wxT("protected") }; + int m_choiceAccessNChoices = sizeof( m_choiceAccessChoices ) / sizeof( wxString ); + m_choiceAccess = new wxChoice( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceAccessNChoices, m_choiceAccessChoices, 0 ); + bSizer5->Add( m_choiceAccess, 0, wxALL|wxEXPAND, 5 ); + + m_panel1->SetSizer( bSizer5 ); + m_panel1->Layout(); + bSizer5->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer3, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_buttonMore->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewIneritanceBaseDlg::OnButtonMore ), NULL, this ); +} diff --git a/Gizmos/newinheritancebasedlg.h b/Gizmos/newinheritancebasedlg.h new file mode 100644 index 0000000000..3a44e248e8 --- /dev/null +++ b/Gizmos/newinheritancebasedlg.h @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __newinheritancebasedlg__ +#define __newinheritancebasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class NewIneritanceBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class NewIneritanceBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_panel1; + wxStaticText* m_staticText2; + wxTextCtrl* m_textCtrlInhertiance; + wxButton* m_buttonMore; + wxStaticText* m_staticText1; + wxChoice* m_choiceAccess; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnButtonMore( wxCommandEvent& event ){ event.Skip(); } + + + public: + NewIneritanceBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("New Inheritance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 505,196 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__newinheritancebasedlg__ diff --git a/Gizmos/newinheritancedlg.cpp b/Gizmos/newinheritancedlg.cpp new file mode 100644 index 0000000000..40e5ecee1c --- /dev/null +++ b/Gizmos/newinheritancedlg.cpp @@ -0,0 +1,24 @@ +#include "newinheritancedlg.h" +#include "open_type_dlg.h" +#include "imanager.h" + +NewIneritanceDlg::NewIneritanceDlg( wxWindow* parent, IManager *mgr, const wxString &parentName, const wxString &access ) +: NewIneritanceBaseDlg( parent, wxID_ANY, wxT("New Inheritance"), wxDefaultPosition, wxSize( 505,196 ), wxDEFAULT_DIALOG_STYLE) +, m_mgr(mgr) +{ + //by default select 0 + m_choiceAccess->Select(0); + if(access.IsEmpty() == false){ + m_choiceAccess->SetStringSelection(access); + } + m_textCtrlInhertiance->SetValue(parentName); +} + +void NewIneritanceDlg::OnButtonMore( wxCommandEvent& event ) +{ + OpenTypeDlg *dlg = new OpenTypeDlg(this, m_mgr->GetTagsManager()); + if(dlg->ShowModal() == wxID_OK){ + m_textCtrlInhertiance->SetValue(dlg->GetSelectedTag()->GetName()); + } + dlg->Destroy(); +} diff --git a/Gizmos/newinheritancedlg.h b/Gizmos/newinheritancedlg.h new file mode 100644 index 0000000000..06266c045a --- /dev/null +++ b/Gizmos/newinheritancedlg.h @@ -0,0 +1,27 @@ +#ifndef __newinheritancedlg__ +#define __newinheritancedlg__ + +/** +@file +Subclass of NewIneritanceBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "newinheritancebasedlg.h" +class IManager; + +/** Implementing NewIneritanceBaseDlg */ +class NewIneritanceDlg : public NewIneritanceBaseDlg +{ + IManager *m_mgr; +protected: + // Handlers for NewIneritanceBaseDlg events. + void OnButtonMore( wxCommandEvent& event ); + +public: + /** Constructor */ + NewIneritanceDlg( wxWindow* parent, IManager *mgr, const wxString &parentName = wxEmptyString, const wxString &access = wxEmptyString ); + wxString GetParentName() {return m_textCtrlInhertiance->GetValue();} + wxString GetAccess() {return m_choiceAccess->GetStringSelection();} +}; + +#endif // __newinheritancedlg__ diff --git a/Gizmos/newwxprojectbasedlg.cpp b/Gizmos/newwxprojectbasedlg.cpp new file mode 100644 index 0000000000..7bfed04d41 --- /dev/null +++ b/Gizmos/newwxprojectbasedlg.cpp @@ -0,0 +1,133 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "newwxprojectbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +NewWxProjectBaseDlg::NewWxProjectBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_bitmapPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_bitmapPanel->SetBackgroundColour( wxColour( 255, 255, 255 ) ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_bitmap1 = new wxStaticBitmap( m_bitmapPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer7->Add( m_bitmap1, 0, wxEXPAND, 0 ); + + m_bitmapPanel->SetSizer( bSizer7 ); + m_bitmapPanel->Layout(); + bSizer7->Fit( m_bitmapPanel ); + bSizer1->Add( m_bitmapPanel, 0, wxEXPAND, 0 ); + + m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 ); + + m_flatNotebook1 = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFNB_NODRAG|wxFNB_NO_NAV_BUTTONS|wxFNB_NO_X_BUTTON); + m_flatNotebook1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + m_panel2 = new wxPanel( m_flatNotebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_panelBasicInfo = new wxPanel( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText1 = new wxStaticText( m_panelBasicInfo, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlName = new wxTextCtrl( m_panelBasicInfo, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( m_panelBasicInfo, wxID_ANY, wxT("Project Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + fgSizer1->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_dirPicker = new DirPicker(m_panelBasicInfo); + fgSizer1->Add( m_dirPicker, 0, wxALL|wxEXPAND, 5 ); + + m_staticText3 = new wxStaticText( m_panelBasicInfo, wxID_ANY, wxT("Application Type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_choiceApplicationTypeChoices[] = { wxT("GUI application with Main Frame"), wxT("Simple main with wxWidgets enabled") }; + int m_choiceApplicationTypeNChoices = sizeof( m_choiceApplicationTypeChoices ) / sizeof( wxString ); + m_choiceApplicationType = new wxChoice( m_panelBasicInfo, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceApplicationTypeNChoices, m_choiceApplicationTypeChoices, 0 ); + fgSizer1->Add( m_choiceApplicationType, 0, wxALL|wxEXPAND, 5 ); + + bSizer2->Add( fgSizer1, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText4 = new wxStaticText( m_panelBasicInfo, wxID_ANY, wxT("wxWidgets Settings:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizer4->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline2 = new wxStaticLine( m_panelBasicInfo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer4->Add( m_staticline2, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer2->Add( bSizer4, 0, wxEXPAND, 5 ); + + m_checkBoxUnicode = new wxCheckBox( m_panelBasicInfo, wxID_ANY, wxT("Use Unicode Build of wxWidgets"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxUnicode->SetValue(true); + + bSizer2->Add( m_checkBoxUnicode, 0, wxALL, 5 ); + + m_checkBoxMWindows = new wxCheckBox( m_panelBasicInfo, wxID_ANY, wxT("When creating GUI application, add flag -mwindows to avoid terminal console (Windows Only)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxMWindows->SetValue(true); + + bSizer2->Add( m_checkBoxMWindows, 0, wxALL, 5 ); + + m_panelBasicInfo->SetSizer( bSizer2 ); + m_panelBasicInfo->Layout(); + bSizer2->Fit( m_panelBasicInfo ); + bSizer5->Add( m_panelBasicInfo, 1, wxEXPAND | wxALL, 0 ); + + m_panel2->SetSizer( bSizer5 ); + m_panel2->Layout(); + bSizer5->Fit( m_panel2 ); + m_flatNotebook1->AddPage( m_panel2, wxT("Basics"), true ); + + bSizer1->Add( m_flatNotebook1, 1, wxALL|wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK->SetDefault(); + bSizer3->Add( m_buttonOK, 0, wxALL, 5 ); + + m_button2 = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_button2, 0, wxALL, 5 ); + + bSizer1->Add( bSizer3, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewWxProjectBaseDlg::OnButtonOK ), NULL, this ); + m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( NewWxProjectBaseDlg::OnButtonCancel ), NULL, this ); +} diff --git a/Gizmos/newwxprojectbasedlg.h b/Gizmos/newwxprojectbasedlg.h new file mode 100644 index 0000000000..f252533107 --- /dev/null +++ b/Gizmos/newwxprojectbasedlg.h @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __newwxprojectbasedlg__ +#define __newwxprojectbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dirpicker.h" +#include +#include +#include +#ifdef __VISUALC__ +#include +#endif //__VISUALC__ +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class NewWxProjectBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class NewWxProjectBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_bitmapPanel; + wxStaticBitmap* m_bitmap1; + wxStaticLine* m_staticline4; + wxFlatNotebook* m_flatNotebook1; + wxPanel* m_panel2; + wxPanel* m_panelBasicInfo; + wxStaticText* m_staticText1; + wxTextCtrl* m_textCtrlName; + wxStaticText* m_staticText2; + DirPicker *m_dirPicker; + wxStaticText* m_staticText3; + wxChoice* m_choiceApplicationType; + wxStaticText* m_staticText4; + wxStaticLine* m_staticline2; + wxCheckBox* m_checkBoxUnicode; + wxCheckBox* m_checkBoxMWindows; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_button2; + + // Virtual event handlers, overide them in your derived class + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + NewWxProjectBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("New wxWidgets Project"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 528,390 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__newwxprojectbasedlg__ diff --git a/Gizmos/newwxprojectdlg.cpp b/Gizmos/newwxprojectdlg.cpp new file mode 100644 index 0000000000..2b8366c193 --- /dev/null +++ b/Gizmos/newwxprojectdlg.cpp @@ -0,0 +1,81 @@ +#include "wx/xrc/xmlres.h" +#include "imanager.h" +#include "newwxprojectdlg.h" +#include "wx/msgdlg.h" +#include "workspace.h" + +NewWxProjectDlg::NewWxProjectDlg( wxWindow* parent, IManager *mgr ) +: NewWxProjectBaseDlg( parent ) +, m_mgr(mgr) +{ + m_bitmap1->SetBitmap(wxXmlResource::Get()->LoadBitmap(wxT("wx_project_header"))); + m_choiceApplicationType->SetSelection(wxProjectTypeGUI); + m_dirPicker->SetPath(m_mgr->GetWorkspace()->GetWorkspaceFileName().GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR)); + +//update the flatnotebook style + size_t flag = m_flatNotebook1->GetWindowStyleFlag(); + flag &= ~wxFNB_VC8; + flag |= wxFNB_FF2; + + m_flatNotebook1->SetWindowStyleFlag(flag); + +#if defined (__WXMSW__) + m_checkBoxMWindows->SetValue(true); +#else + m_checkBoxMWindows->SetValue(false); + m_checkBoxMWindows->Enable(false); +#endif + +} + +void NewWxProjectDlg::OnButtonCancel(wxCommandEvent &e) +{ + EndModal(wxID_CANCEL); +} + +void NewWxProjectDlg::OnButtonOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + if(ValidateInput()){ + EndModal(wxID_OK); + } +} + +bool NewWxProjectDlg::ValidateInput() +{ + if(m_textCtrlName->GetValue().IsEmpty()){ + wxString msg; + msg << wxT("Invalid project name '") << m_textCtrlName->GetValue() << wxT("'\n"); + msg << wxT("Valid characters for project name are [0-9A-Za-z_]"); + wxMessageBox(msg, wxT("CodeLite"), wxICON_WARNING|wxOK); + return false; + } + + if(m_textCtrlName->GetValue().find_first_not_of(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_")) != wxString::npos){ + wxString msg; + msg << wxT("Invalid project name '") << m_textCtrlName->GetValue() << wxT("'\n"); + msg << wxT("Valid characters for project name are [0-9A-Za-z_]"); + wxMessageBox(msg, wxT("CodeLite"), wxICON_WARNING|wxOK); + return false; + } + return true; +} + +void NewWxProjectDlg::GetProjectInfo(NewWxProjectInfo &info) +{ + size_t flag = 0; + + if(m_checkBoxMWindows->IsChecked()){ + flag |= wxWidgetsSetMWindows; + } + + if(m_checkBoxUnicode->IsChecked()){ + flag |= wxWidgetsUnicode; + } + + info.SetFlags(flag); + info.SetType(m_choiceApplicationType->GetSelection()); + info.SetName(m_textCtrlName->GetValue()); + info.SetPath(m_dirPicker->GetPath()); +} + diff --git a/Gizmos/newwxprojectdlg.h b/Gizmos/newwxprojectdlg.h new file mode 100644 index 0000000000..3bc9e5ab69 --- /dev/null +++ b/Gizmos/newwxprojectdlg.h @@ -0,0 +1,28 @@ +#ifndef __newwxprojectdlg__ +#define __newwxprojectdlg__ + +/** +@file +Subclass of NewWxProjectBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "newwxprojectbasedlg.h" +#include "newwxprojectinfo.h" + +class IManager; +/** Implementing NewWxProjectBaseDlg */ +class NewWxProjectDlg : public NewWxProjectBaseDlg +{ + IManager *m_mgr; +protected: + void OnButtonCancel(wxCommandEvent &e); + void OnButtonOK(wxCommandEvent &e); + bool ValidateInput(); + +public: + /** Constructor */ + NewWxProjectDlg( wxWindow* parent, IManager *mgr ); + void GetProjectInfo(NewWxProjectInfo &info); +}; + +#endif // __newwxprojectdlg__ diff --git a/Gizmos/newwxprojectinfo.cpp b/Gizmos/newwxprojectinfo.cpp new file mode 100644 index 0000000000..5320c5e9b5 --- /dev/null +++ b/Gizmos/newwxprojectinfo.cpp @@ -0,0 +1,15 @@ +#include "newwxprojectinfo.h" +NewWxProjectInfo::NewWxProjectInfo() +{ + size_t flags(0); +#if defined (__WXMSW__) + flags |= wxWidgetsSetMWindows; +#endif + flags |= wxWidgetsUnicode; + SetFlags(flags); +} + +NewWxProjectInfo::~NewWxProjectInfo() +{ +} + diff --git a/Gizmos/newwxprojectinfo.h b/Gizmos/newwxprojectinfo.h new file mode 100644 index 0000000000..7194ee0bf2 --- /dev/null +++ b/Gizmos/newwxprojectinfo.h @@ -0,0 +1,42 @@ +#ifndef __newwxprojectinfo__ +#define __newwxprojectinfo__ + +#include "wx/string.h" + +//wxWidgets settings +enum { + wxWidgetsSetMWindows = 0x00000001, + wxWidgetsUnicode = 0x00000002 +}; + +//Project types +enum { + wxProjectTypeGUI = 0, + wxProjectTypeSimpleMain +}; + +class NewWxProjectInfo { + + wxString m_name; + wxString m_path; + size_t m_flags; + int m_type; + +public: + NewWxProjectInfo(); + ~NewWxProjectInfo(); + + //Setters + void SetFlags(const size_t& flags) {this->m_flags = flags;} + void SetName(const wxString& name) {this->m_name = name;} + void SetPath(const wxString& path) {this->m_path = path;} + void SetType(const int& type) {this->m_type = type;} + + //Getters + const size_t& GetFlags() const {return m_flags;} + const wxString& GetName() const {return m_name;} + const wxString& GetPath() const {return m_path;} + const int& GetType() const {return m_type;} + +}; +#endif // __newwxprojectinfo__ diff --git a/Gizmos/plugindata.cpp b/Gizmos/plugindata.cpp new file mode 100644 index 0000000000..f6c011e9c6 --- /dev/null +++ b/Gizmos/plugindata.cpp @@ -0,0 +1,9 @@ +#include "plugindata.h" + +PluginData::PluginData() +{ +} + +PluginData::~PluginData() +{ +} diff --git a/Gizmos/plugindata.h b/Gizmos/plugindata.h new file mode 100644 index 0000000000..d997293065 --- /dev/null +++ b/Gizmos/plugindata.h @@ -0,0 +1,28 @@ +#ifndef PLUGIN_DATA_H +#define PLUGIN_DATA_H + +#include "wx/string.h" + +class PluginData +{ + wxString m_projectPath; + wxString m_pluginName; + wxString m_codelitePath; + wxString m_pluginDescription; +public: + PluginData(); + ~PluginData(); + + //Setters + void SetCodelitePath(const wxString& codelitePath) {this->m_codelitePath = codelitePath;} + void SetPluginDescription(const wxString& pluginDescription) {this->m_pluginDescription = pluginDescription;} + void SetPluginName(const wxString& pluginName) {this->m_pluginName = pluginName;} + void SetProjectPath(const wxString& projectPath) {this->m_projectPath = projectPath;} + //Getters + const wxString& GetCodelitePath() const {return m_codelitePath;} + const wxString& GetPluginDescription() const {return m_pluginDescription;} + const wxString& GetPluginName() const {return m_pluginName;} + const wxString& GetProjectPath() const {return m_projectPath;} + +}; +#endif //PLUGIN_DATA_H diff --git a/Gizmos/pluginwizard.cpp b/Gizmos/pluginwizard.cpp new file mode 100644 index 0000000000..f51ca9fdde --- /dev/null +++ b/Gizmos/pluginwizard.cpp @@ -0,0 +1,46 @@ +#include "pluginwizard.h" +#include +#include "pluginwizard_pag2.h" +#include "pluginwizard_page1.h" +#include "plugindata.h" + +PluginWizard::PluginWizard(wxWindow *parent, wxWindowID id) +{ + wxBitmap bmp = wxXmlResource::Get()->LoadBitmap(wxT("new_plugin_wiz_bmp")); + wxWizard::Create(parent, id, wxT("New Plugin Wizard"), bmp); + + //create the pages + m_page1 = new PluginWizardPage1(this); + m_page2 = new PluginWizardPage2(this); + + //chain the pages + wxWizardPageSimple::Chain(m_page1, m_page2); +} + +PluginWizard::~PluginWizard() +{ +} + +bool PluginWizard::Run(PluginData &data) +{ + wxSize sz1 = m_page1->GetSizer()->CalcMin(); + wxSize sz2 = m_page2->GetSizer()->CalcMin(); + + wxSize maxSize = sz1; + if(maxSize.GetWidth() < sz2.GetWidth()) maxSize = sz2; + if(maxSize.GetWidth() < 400){ + maxSize.SetWidth(400); + } + + SetPageSize(maxSize); + if(RunWizard(m_page1)){ + data.SetPluginName(((PluginWizardPage1*) m_page1)->GetName()); + data.SetPluginDescription(((PluginWizardPage1*) m_page1)->GetDescription()); + data.SetProjectPath(((PluginWizardPage2*) m_page2)->GetProjectPath()); + data.SetCodelitePath(((PluginWizardPage2*) m_page2)->GetCodelitePath()); + return true; + } + return false; +} + + diff --git a/Gizmos/pluginwizard.h b/Gizmos/pluginwizard.h new file mode 100644 index 0000000000..31fa4ac063 --- /dev/null +++ b/Gizmos/pluginwizard.h @@ -0,0 +1,17 @@ +#ifndef PLUGINWIZARD_H +#define PLUGINWIZARD_H + +#include "wx/wizard.h" +#include "plugindata.h" + +class PluginWizard : public wxWizard +{ + wxWizardPageSimple *m_page1; + wxWizardPageSimple *m_page2; +public: + PluginWizard(wxWindow *parent, wxWindowID id); + ~PluginWizard(); + bool Run(PluginData &data); +}; + +#endif //PLUGINWIZARD_H diff --git a/Gizmos/pluginwizard_pag2.cpp b/Gizmos/pluginwizard_pag2.cpp new file mode 100644 index 0000000000..809c64c3e4 --- /dev/null +++ b/Gizmos/pluginwizard_pag2.cpp @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "pluginwizard_pag2.h" + +/////////////////////////////////////////////////////////////////////////// + +PluginWizardPage2::PluginWizardPage2( wxWizard* parent) +: wxWizardPageSimple( parent ) +{ + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Build Information:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer2->Add( m_staticText1, 0, wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer2->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Project Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + bSizer2->Add( m_staticText3, 0, wxALL, 5 ); + + m_dirPicker = new DirPicker(this); + bSizer2->Add( m_dirPicker, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("Select the root path of CodeLite source files:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizer2->Add( m_staticText4, 0, wxALL, 5 ); + + m_rootPath = new DirPicker(this); + bSizer2->Add( m_rootPath, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bSizer2 ); + this->Layout(); +} diff --git a/Gizmos/pluginwizard_pag2.h b/Gizmos/pluginwizard_pag2.h new file mode 100644 index 0000000000..2a0d8b880c --- /dev/null +++ b/Gizmos/pluginwizard_pag2.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __pluginwizard_pag2__ +#define __pluginwizard_pag2__ + +#include +#include +#include +#include +#include +#include +#include +#include "dirpicker.h" +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class PluginWizardPage2 +/////////////////////////////////////////////////////////////////////////////// +class PluginWizardPage2 : public wxWizardPageSimple { +private: + +protected: + wxStaticText* m_staticText1; + wxStaticLine* m_staticline1; + wxStaticText* m_staticText3; + DirPicker *m_dirPicker; + wxStaticText* m_staticText4; + DirPicker *m_rootPath; + +public: + PluginWizardPage2( wxWizard* parent); + wxString GetProjectPath() const{return m_dirPicker->GetPath();} + wxString GetCodelitePath() const{return m_rootPath->GetPath();} +}; + +#endif //__pluginwizard_pag2__ diff --git a/Gizmos/pluginwizard_page1.cpp b/Gizmos/pluginwizard_page1.cpp new file mode 100644 index 0000000000..19cc55301e --- /dev/null +++ b/Gizmos/pluginwizard_page1.cpp @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "pluginwizard_page1.h" +#include "wx/msgdlg.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE(PluginWizardPage1, wxWizardPageSimple) +EVT_WIZARD_PAGE_CHANGING(wxID_ANY, PluginWizardPage1::OnValidate) +END_EVENT_TABLE() + +PluginWizardPage1::PluginWizardPage1( wxWizard* parent) +: wxWizardPageSimple(parent) +{ + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("General Information:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bSizer1->Add( m_staticText5, 0, wxALL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Plugin Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlPluginName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1->Add( m_textCtrlPluginName, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Description:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + bSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlDescription = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer1->Add( m_textCtrlDescription, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} + +void PluginWizardPage1::OnValidate(wxWizardEvent &event) +{ + wxString name = GetName(); + name = name.Trim().Trim(false); + + //we dont accept empty plugin names + if(name.IsEmpty()){ + wxMessageBox(wxT("Missing plugin name"), wxT("CodeLite"), wxOK | wxICON_WARNING); + event.Veto(); + return; + } + //a valid name must contains only + //[A-Za-z_] + if(name.find_first_not_of(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_")) != wxString::npos){ + wxMessageBox(wxT("Invalid characters in plugin name\nonly [A-Za-z_] are allowed"), wxT("CodeLite"), wxOK | wxICON_WARNING); + event.Veto(); + return; + } + event.Skip(); +} diff --git a/Gizmos/pluginwizard_page1.h b/Gizmos/pluginwizard_page1.h new file mode 100644 index 0000000000..19cd8aaffd --- /dev/null +++ b/Gizmos/pluginwizard_page1.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __pluginwizard_page1__ +#define __pluginwizard_page1__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class PluginWizardPage1 +/////////////////////////////////////////////////////////////////////////////// +class PluginWizardPage1 : public wxWizardPageSimple { +protected: + void OnValidate(wxWizardEvent &event); +protected: + wxStaticText* m_staticText5; + wxStaticLine* m_staticline2; + wxStaticText* m_staticText1; + wxTextCtrl* m_textCtrlPluginName; + wxStaticText* m_staticText3; + wxTextCtrl* m_textCtrlDescription; + +public: + PluginWizardPage1( wxWizard* parent); + + wxString GetName() const{return m_textCtrlPluginName->GetValue();} + wxString GetDescription() const{return m_textCtrlDescription->GetValue();} + + DECLARE_EVENT_TABLE() +}; + +#endif //__pluginwizard_page1__ + diff --git a/InnoSetup/box_software.ico b/InnoSetup/box_software.ico new file mode 100644 index 0000000000000000000000000000000000000000..ddc12a648db6ffaa061c7906cc1e1484dae4fb1a GIT binary patch literal 26694 zcmeHv2Y6QH+5eql(W3q8#9H~(*6~qk>uS~3fo)y2R;(=!1O#OTLIz}SvPlSJlD#+C zd+$ItAwVE|=gr=4cJki;-*esskYR1>_aE2)d#>w#&wI{!#{H~&KZi(#?x4HxCh5BG z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8xXR`$1h+*$?4OGez=0O1K-IKYlmfLa4qKO@W6JglbfDl{O7UwZc9W*$2=Ag7_>bgFxV#| zEUY0vJ$9-6Tn^>|_>WX@UP|OtOl{B!NDO9xwyH1?C#;|79SOI4*lBp k&)4$*PYJAPBoROKKXF<&i|cB~QV`Eqt_8UNF5|TR7f2#mng9R* literal 0 HcmV?d00001 diff --git a/InnoSetup/license.txt b/InnoSetup/license.txt new file mode 100644 index 0000000000..82fa1daad4 --- /dev/null +++ b/InnoSetup/license.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/InnoSetup/lite_editor.iss b/InnoSetup/lite_editor.iss new file mode 100644 index 0000000000..49d9095bcb --- /dev/null +++ b/InnoSetup/lite_editor.iss @@ -0,0 +1,93 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +[Setup] +AppName=CodeLite +AppVerName=CodeLite +AppPublisherURL=http://codelite.sourceforge.net +AppSupportURL=http://codelite.sourceforge.net +AppUpdatesURL=http://codelite.sourceforge.net +DefaultDirName={pf}\CodeLite +DefaultGroupName=CodeLite +LicenseFile=license.txt +OutputDir=output +OutputBaseFilename=CodeLite +ChangesEnvironment=yes +FlatComponentsList=yes +SetupIconFile=box_software.ico +Compression=lzma/ultra +SolidCompression=true +InternalCompressLevel=ultra + +[Languages] +Name: "eng"; MessagesFile: "compiler:Default.isl" + +[Components] +Name: "Editor"; Description: "CodeLite: An open source C/C++ IDE"; Types: full compact custom; Flags: fixed + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "C:\Development\C++\codelite\Runtime\CodeLite.exe"; DestDir: "{app}"; AfterInstall: MyAfterInstall() ; Flags: ignoreversion; Components: Editor +Source: "C:\wxWidgets-2.8.4\lib\gcc_dll\wxmsw28u_gcc_custom.dll"; DestDir: "{app}"; AfterInstall: MyAfterInstall() ; Flags: ignoreversion; Components: Editor +Source: "C:\Development\C++\codelite\InnoSetup\license.txt"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\Program Files\CodeLite\common.tags"; DestDir: "{app}"; Components: Editor +Source: "C:\Development\C++\codelite\\sdk\wxconfig\wx-config.exe"; DestDir: "{app}"; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\config\liteeditor.xml.sample"; DestDir: "{app}\config"; DestName: liteeditor.xml; Components: Editor; +Source: "C:\Development\C++\codelite\Runtime\config\debuggers.xml"; DestDir: "{app}\config"; Components: Editor; +Source: "C:\Development\C++\codelite\Runtime\config\build_settings.xml"; DestDir: "{app}\config"; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\rc\*"; DestDir: "{app}\rc"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\astyle.sample"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\templates\*"; DestDir: "{app}\templates"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\lexers\*"; DestDir: "{app}\lexers"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\debuggers\Debugger.dll"; DestDir: "{app}\debuggers"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\plugins\*.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\bin\ctags-le.exe"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\index.html"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\Development\C++\codelite\Runtime\images\*"; DestDir: "{app}\images"; Flags: ignoreversion ; Components: Editor +Source: "C:\MinGW\bin\mingwm10.dll"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\MinGW\bin\which.exe"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +Source: "C:\MinGW\bin\rm.exe"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor + +;Source: "C:\windows\system32\msvcp71.dll"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +;Source: "C:\Development\C++\codelite\Runtime\sqlite3.dll"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +;Source: "C:\windows\system32\msvcr71.dll"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +;Source: "c:\windows\system32\MSVCRT.DLL"; DestDir: "{app}"; Flags: ignoreversion ; Components: Editor +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\CodeLite "; Filename: "{app}\CodeLite.exe"; WorkingDir: "{app}" +Name: "{group}\{cm:UninstallProgram, CodeLite}"; Filename: "{uninstallexe}" +Name: "{userdesktop}\CodeLite "; Filename: "{app}\CodeLite.exe"; WorkingDir: "{app}" ;Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\CodeLite "; WorkingDir: "{app}"; Filename: "{app}\CodeLite.exe"; Tasks: quicklaunchicon + +[Run] +Filename: "{app}\CodeLite.exe"; Description: "{cm:LaunchProgram,CodeLite }"; Flags: nowait postinstall skipifsilent + +[Registry] +Root: HKCU ; Subkey: "Software\LiteEditor\LiteEditor\"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}" + +[Code] +var + PathStr: String; + Index: Integer; + NewPath: String; +procedure MyAfterInstall(); +begin + // Add {app} to path + if RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', + 'Path', PathStr) then + begin + NewPath := ';' + ExpandConstant('{app}') ; + // Seacrh for the string 'C:\Eran Is Here\;' + index := Pos(NewPath, PathStr); + if index = 0 then begin + PathStr := PathStr + ';' + ExpandConstant('{app}'); + RegWriteStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path', PathStr ); + end; + end; +end; + + diff --git a/Interfaces/Interfaces.project b/Interfaces/Interfaces.project new file mode 100644 index 0000000000..9cc786083b --- /dev/null +++ b/Interfaces/Interfaces.project @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Interfaces/Interfaces.vcproj b/Interfaces/Interfaces.vcproj new file mode 100644 index 0000000000..43d08dd197 --- /dev/null +++ b/Interfaces/Interfaces.vcproj @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Interfaces/debugger.h b/Interfaces/debugger.h new file mode 100644 index 0000000000..92f967f64b --- /dev/null +++ b/Interfaces/debugger.h @@ -0,0 +1,144 @@ +#ifndef DEBUGGER_H +#define DEBUGGER_H + +#include "wx/string.h" +#include "wx/arrstr.h" +#include "wx/event.h" +#include "vector" + +enum DebuggerCommands +{ + DBG_PAUSE = 0, + DBG_NEXT, + DBG_STEPIN, + DBG_STEPOUT +}; + +//------------------------------------------------------- +// Data structures used by the debugger +//------------------------------------------------------- +struct DebuggerInfo { + wxString name; + wxString initFuncName; + wxString version; + wxString author; +}; + +struct StackEntry { + wxString level; + wxString address; + wxString function; + wxString file; + wxString line; +}; + +struct ThreadEntry { + bool active; + long dbgid; + wxString more; +}; + +typedef std::vector StackEntryArray; +typedef std::vector ThreadEntryArray; + +struct BreakpointInfo +{ + wxString file; + int lineno; +}; + +class DebuggerInformation { +public: + wxString name; + wxString path; + bool enableDebugLog; + bool enablePendingBreakpoints; + bool breakAtWinMain; + +public: + DebuggerInformation() + : name(wxEmptyString) + , path(wxEmptyString) + , enableDebugLog(false) + , enablePendingBreakpoints(true) +#ifdef __WXMAC__ + , breakAtWinMain(true) +#else + , breakAtWinMain(false) +#endif + {} + + ~DebuggerInformation() + {} +}; + + +class IDebuggerObserver; + +//------------------------------------------------------- +// The debugger interface +//------------------------------------------------------- +/** + * \ingroup Interfaces + * Defines the debugger interface + * + * \version 1.0 + * first version + * + * \date 08-22-2007 + * + * \author Eran + * + */ +class IDebugger +{ +protected: + IDebuggerObserver *m_observer; + DebuggerInformation m_info; +public: + IDebugger(){}; + virtual ~IDebugger(){}; + virtual void AddObserver(IDebuggerObserver *observer) { m_observer = observer; } + virtual IDebuggerObserver *GetObserver(){return m_observer;} + + // Debugger operations + virtual bool Start(const wxString &debuggerPath, const wxString &exeName, const wxString &cwd, const std::vector &bpList) = 0; + virtual bool Start(const wxString &exeName, const wxString &cwd, const std::vector &bpList) = 0; + virtual bool Start(const wxString &debuggerPath, const wxString &exeName, int pid, const std::vector &bpList) = 0; + virtual bool Run(const wxString &args) = 0; + virtual bool Stop() = 0; + virtual bool Interrupt() = 0; + virtual bool IsRunning() = 0; + virtual bool Next() = 0; + virtual bool Continue() = 0; + virtual bool StepIn() = 0; + virtual bool StepOut() = 0; + virtual bool Break(const wxString &file, long lineno) = 0; + virtual bool RemoveBreak(const wxString &file, long lineno) = 0; + virtual bool RemoveBreak(int bid) = 0; + virtual bool RemoveAllBreaks() = 0; + virtual bool QueryFileLine() = 0; + virtual bool ExecuteCmd(const wxString &cmd) = 0; + virtual bool ExecSyncCmd(const wxString &command, wxString &output) = 0; + virtual bool QueryLocals() = 0; + virtual bool ListFrames() = 0; + virtual bool SetFrame(int frame) = 0; + virtual void SetDebuggerInformation(const DebuggerInformation& info){m_info = info;} + virtual bool ListThreads(ThreadEntryArray &threads) = 0; + virtual bool SelectThread(long threadId) = 0; + virtual void Poke() = 0; + //We provide two ways of evulating an expressions: + //The short one, which returns a string, and long one + //which returns a tree of the result + virtual bool EvaluateExpressionToString(const wxString &expression) = 0; + virtual bool EvaluateExpressionToTree(const wxString &expression) = 0; +}; + + +//----------------------------------------------------------- +// Each debugger module must implement these two functions +//----------------------------------------------------------- +typedef IDebugger* (*GET_DBG_CREATE_FUNC)(); +typedef DebuggerInfo (*GET_DBG_INFO_FUNC)(); + +#endif //DEBUGGER_H diff --git a/Interfaces/debuggerobserver.h b/Interfaces/debuggerobserver.h new file mode 100644 index 0000000000..a3601a6260 --- /dev/null +++ b/Interfaces/debuggerobserver.h @@ -0,0 +1,59 @@ +#ifndef DEBUGGER_OBSERVER_H +#define DEBUGGER_OBSERVER_H + +#include "wx/treectrl.h" +#include "tree_node.h" +#include "debugger.h" + +struct NodeData +{ + wxString name; + wxTreeItemId itemId; +}; + +enum DebuggerReasons +{ + DBG_BP_HIT, + DBG_RECV_SIGNAL, + DBG_RECV_SIGNAL_EXC_BAD_ACCESS, + DBG_RECV_SIGNAL_SIGSEGV, + DBG_END_STEPPING, + DBG_EXITED_NORMALLY, + DBG_DBGR_KILLED, + DBG_CMD_ERROR, + DBG_FUNC_FINISHED, + DBG_UNKNOWN +}; + +/** + * \ingroup Interfaces + * Defines the observer interface for classes who whishes to + * observer the debugger behavior + * \version 1.0 + * first version + * + * \date 09-17-2007 + * + * \author Eran + * + * + */ +class IDebuggerObserver +{ +public: + IDebuggerObserver(){}; + virtual ~IDebuggerObserver(){}; + + virtual void UpdateGotControl(DebuggerReasons reason) = 0; + virtual void UpdateLostControl() = 0; + virtual void UpdateFileLine(const wxString &file, int lineno) = 0; + virtual void UpdateAddLine(const wxString &line) = 0; + virtual void UpdateBpAdded() = 0; + virtual void UpdateStopped() = 0; + virtual void UpdateLocals(TreeNode *tree) = 0; + virtual void UpdateExpression(const wxString &expression, const wxString &evaluated) = 0; + virtual void UpdateQuickWatch(const wxString &expression, TreeNode *tree) = 0; + virtual void UpdateStackList(const StackEntryArray &stackArray) = 0; +}; + +#endif //DEBUGGER_OBSERVER_H diff --git a/Interfaces/iconfigtool.h b/Interfaces/iconfigtool.h new file mode 100644 index 0000000000..172995cdd6 --- /dev/null +++ b/Interfaces/iconfigtool.h @@ -0,0 +1,19 @@ +#ifndef ICONFIGTOOL_H +#define ICONFIGTOOL_H + +#include "wx/string.h" +#include "serialized_object.h" + +//------------------------------------------------------------------ +// The configuration tool interface +//------------------------------------------------------------------ +class IConfigTool { +public: + IConfigTool(){} + virtual ~IConfigTool(){} + + virtual bool ReadObject(const wxString &name, SerializedObject *obj) = 0; + virtual bool WriteObject(const wxString &name, SerializedObject *obj) = 0; +}; + +#endif //ICONFIGTOOL_H diff --git a/Interfaces/ieditor.h b/Interfaces/ieditor.h new file mode 100644 index 0000000000..59f4200b5d --- /dev/null +++ b/Interfaces/ieditor.h @@ -0,0 +1,26 @@ +#ifndef IEDITOR_H +#define IEDITOR_H + +#include "wx/filename.h" +#include "wx/string.h" + +//------------------------------------------------------------------ +// Defines the interface to the editor control +//------------------------------------------------------------------ +class IEditor { +public: + IEditor(){} + virtual ~IEditor(){} + + virtual wxString GetEditorText() = 0; + virtual void SetEditorText(const wxString &text) = 0; + virtual void SetCaretAt(long pos) = 0; + virtual void ReloadFile() = 0; + virtual long GetCurrentPosition() = 0; + virtual const wxFileName &GetFileName() const = 0; + virtual const wxString &GetProjectName() const = 0; +}; + +#endif //IEDITOR_H + + diff --git a/Interfaces/imanager.h b/Interfaces/imanager.h new file mode 100644 index 0000000000..b220e1ef98 --- /dev/null +++ b/Interfaces/imanager.h @@ -0,0 +1,55 @@ +#ifndef IMANAGER_H +#define IMANAGER_H + +#include "ieditor.h" +#include "iconfigtool.h" +#include "wx/treectrl.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" + +class TagsManager; +class Workspace; + +//-------------------------- +//Auxulary class +//-------------------------- +class TreeItemInfo { +public: + wxTreeItemId m_item; + wxFileName m_fileName; //< FileName where available (FileView & File Explorer trees) + wxString m_text; //< Tree item text (all) + int m_itemType; //< For FileView items (FileView only) +}; + +//--------------------------- +// List of availabla trees +//--------------------------- +enum TreeType { + TreeFileView = 0, + TreeFileExplorer, +}; + +//------------------------------------------------------------------ +// Defines the interface of the manager +//------------------------------------------------------------------ +class IManager { +public: + IManager(){} + virtual ~IManager(){} + + //return the current editor + virtual IEditor *GetActiveEditor() = 0; + virtual void OpenFile(const wxString &fileName, const wxString &projectName, int lineno = wxNOT_FOUND) = 0; + virtual IConfigTool *GetConfigTool() = 0; + virtual TreeItemInfo GetSelectedTreeItemInfo(TreeType type) = 0; + virtual wxTreeCtrl *GetTree(TreeType type) = 0; + virtual wxFlatNotebook *GetOutputPaneNotebook() = 0; + virtual wxString GetStartupDirectory() const = 0; + virtual void AddProject(const wxString & path) = 0; + virtual bool IsWorkspaceOpen() const = 0; + virtual TagsManager *GetTagsManager() = 0; + virtual Workspace *GetWorkspace() = 0; + virtual bool AddFilesToVirtualFodler(wxTreeItemId &item, wxArrayString &paths) = 0; +}; + +#endif //IMANAGER_H + diff --git a/Interfaces/plugin.h b/Interfaces/plugin.h new file mode 100644 index 0000000000..215945aa40 --- /dev/null +++ b/Interfaces/plugin.h @@ -0,0 +1,105 @@ +#ifndef PLUGIN_H +#define PLUGIN_H + +#include "imanager.h" +#include "wx/toolbar.h" +#include "wx/event.h" + +#ifdef _WIN32 +#define STDCALL __stdcall +#define EXPORT __declspec(dllexport) +#else +#define STDCALL +#define EXPORT +#endif + +class IManager; + +/** + * Possible popup menu + */ +enum MenuType { + MenuTypeFileExplorer = 0, + MenuTypeFileView_Workspace, + MenuTypeFileView_Project, + MenuTypeFileView_Folder, + MenuTypeFileView_File, + MenuTypeEditor +}; + +// +//Plugins events +// +#define wxEVT_FILE_SAVED 3450 +#define wxEVT_FILE_EXP_REFRESHED 3451 +#define wxEVT_WORKSPACE_LOADED 3452 +//Initialization of the file explorer tree is now completed +#define wxEVT_FILE_EXP_INIT_DONE 3453 +#define wxEVT_PROJ_FILE_ADDED 3454 + +//The application initialization has ended +#define wxEVT_INIT_DONE 3455 + +//------------------------------------------------------------------ +//each plugin must implement this interface +//------------------------------------------------------------------ +class IPlugin : public wxEvtHandler { +protected: + wxString m_shortName; + wxString m_longName; + IManager *m_mgr; + +public: + IPlugin(IManager *manager) : m_mgr(manager){} + virtual ~IPlugin(){} + + //----------------------------------------------- + //The interface + //----------------------------------------------- + virtual const wxString &GetShortName() const{return m_shortName;} + virtual const wxString &GetLongName() const{return m_longName;} + + /** + * When LiteEditor loads all the plugins, this function is called. If toolbar + * is provided by the plugin, the Plugin Manager will palce it in the appropriate + * place on the toolbar pane. + * \param parent toolbar parent, usually this is the main frame + * \return toolbar or NULL + */ + virtual wxToolBar *CreateToolBar(wxWindow *parent) = 0; + + /** + * Every plugin can place a sub menu in the 'Plugins' Menu at the menu bar + * \param pluginsMenu + */ + virtual void CreatePluginMenu(wxMenu *pluginsMenu) = 0; + + /** + * \brief Call the plugin "shutdown" function + */ + virtual void UnPlug() = 0; + + /** + * Override this method to allow the plugin to + * hook the popup menu by adding its entries. + * \param menu menu to hook + * \param type menu type, can be one of: + * -# MenuTypeFileExplorer + * -# MenuTypeFileView + * -# MenuTypeEditor + */ + virtual void HookPopupMenu(wxMenu *menu, MenuType type){ + wxUnusedVar(type); + wxUnusedVar(menu); + }; + + virtual void UnHookPopupMenu(wxMenu *menu, MenuType type){ + wxUnusedVar(type); + wxUnusedVar(menu); + }; +}; + +//Every dll must contain at least this function +typedef IPlugin* (*GET_PLUGIN_CREATE_FUNC)(IManager*); + +#endif //PLUGIN_H diff --git a/LiteEditor.workspace b/LiteEditor.workspace new file mode 100644 index 0000000000..75b918af53 --- /dev/null +++ b/LiteEditor.workspace @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LiteEditor/LiteEditor.cbp b/LiteEditor/LiteEditor.cbp new file mode 100644 index 0000000000..b2706309e3 --- /dev/null +++ b/LiteEditor/LiteEditor.cbp @@ -0,0 +1,224 @@ + + + + + + \ No newline at end of file diff --git a/LiteEditor/LiteEditor.project b/LiteEditor/LiteEditor.project new file mode 100644 index 0000000000..919b4b8fad --- /dev/null +++ b/LiteEditor/LiteEditor.project @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cd .. && make type=debug_unicode clean + cd .. && make type=debug_unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cd .. && make type=release_unicode clean + cd .. && make type=release_unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mingw32-make -f LiteEditor_wsp.mk type=ReleaseANSI clean + mingw32-make -f LiteEditor_wsp.mk type=ReleaseANSI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + autorev . + + + + mingw32-make -f LiteEditor_wsp.mk type=ReleaseANSI clean + mingw32-make -f LiteEditor_wsp.mk type=ReleaseANSI + + + + resources.cpp +resources.cpp: resources.xrc + wxrc /c /v /o resources.cpp resources.xrc + + + + + + + + + + + + + + + + + diff --git a/LiteEditor/LiteEditor.vcproj b/LiteEditor/LiteEditor.vcproj new file mode 100644 index 0000000000..a56db21e38 --- /dev/null +++ b/LiteEditor/LiteEditor.vcproj @@ -0,0 +1,807 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LiteEditor/add_option_dialog.cpp b/LiteEditor/add_option_dialog.cpp new file mode 100644 index 0000000000..396bd7a0c8 --- /dev/null +++ b/LiteEditor/add_option_dialog.cpp @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "add_option_dialog.h" +#include "wx/tokenzr.h" +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +AddOptionDlg::AddOptionDlg( wxWindow* parent, wxString value, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + m_text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB ); + bSizer23->Add( m_text, 1, wxALL|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer23->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer23->Add( bSizer24, 0, wxALIGN_RIGHT, 5 ); + + wxStringTokenizer tkz(value, wxT(";")); + while(tkz.HasMoreTokens()){ + wxString token = tkz.GetNextToken(); + token = token.Trim(); + token = token.Trim(false); + m_text->AppendText(token + wxT("\n")); + } + + this->SetSizer( bSizer23 ); + this->Layout(); +} + +wxString AddOptionDlg::GetValue() const +{ + wxStringInputStream input(m_text->GetValue()); + wxTextInputStream text(input); + + wxString value; + while( !input.Eof() ){ + + // Read the next line + value += text.ReadLine(); + value += wxT(";"); + } + return value.BeforeLast(wxT(';')); +} diff --git a/LiteEditor/add_option_dialog.h b/LiteEditor/add_option_dialog.h new file mode 100644 index 0000000000..5b79a0ed32 --- /dev/null +++ b/LiteEditor/add_option_dialog.h @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __add_option_dialog__ +#define __add_option_dialog__ + +#include + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class MyDialog2 +/////////////////////////////////////////////////////////////////////////////// +class AddOptionDlg : public wxDialog +{ +private: + +protected: + wxTextCtrl* m_text; + wxStaticLine* m_staticline9; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + +public: + AddOptionDlg( wxWindow* parent, wxString value = wxEmptyString, int id = wxID_ANY, wxString title = wxT("Edit"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 481,299 ), int style = wxDEFAULT_DIALOG_STYLE ); + wxString GetValue() const; +}; + +#endif //__add_option_dialog__ diff --git a/LiteEditor/addincludefiledlg.cpp b/LiteEditor/addincludefiledlg.cpp new file mode 100644 index 0000000000..5617fa0103 --- /dev/null +++ b/LiteEditor/addincludefiledlg.cpp @@ -0,0 +1,141 @@ +#include "addincludefiledlg.h" +#include "wx/filename.h" +#include "wx/regex.h" + +wxArrayString AddIncludeFileDlg::m_includePath; + +AddIncludeFileDlg::AddIncludeFileDlg( wxWindow* parent, const wxString &fullpath, const wxString &text, int lineNo ) + : + AddIncludeFileDlgBase( parent ) + , m_fullpath(fullpath) + , m_text(text) + , m_line(lineNo) +{ + UpdateLineToAdd(); + + //initialise the preview window + //--------------------------------------------------------- + wxFont font(10, wxFONTFAMILY_TELETYPE, wxNORMAL, wxNORMAL); + m_textCtrlPreview->MarkerDefine(0x7, wxSCI_MARK_ARROW); + m_textCtrlPreview->MarkerSetBackground(0x7, wxT("YELLOW GREEN")); + m_textCtrlPreview->StyleSetFont(0, font); + + + //set the initial text + m_textCtrlPreview->SetReadOnly(false); + m_textCtrlPreview->AddText(m_text); + m_textCtrlPreview->EmptyUndoBuffer(); + SetAndMarkLine(); +} + +void AddIncludeFileDlg::UpdateLineToAdd() +{ + wxString line; + wxFileName fn(m_fullpath); + m_textCtrlFullPath->SetValue(fn.GetFullPath()); + + //try to get a match in the include path for this file + wxString pp = fn.GetFullPath(); + pp.Replace(wxT("\\"), wxT("/")); + + wxString rest; + for(size_t i=0; i< m_includePath.GetCount(); i++){ + if(pp.StartsWith( m_includePath.Item(i) , &rest )){ + break; + } + } + + if(rest.IsEmpty()){ + rest = fn.GetFullName(); + } + + line << wxT("#include \"") << rest << wxT("\""); + m_textCtrlLineToAdd->SetValue(line); + +} + +void AddIncludeFileDlg::SetAndMarkLine() +{ + wxString line = m_textCtrlLineToAdd->GetValue(); + m_textCtrlPreview->SetReadOnly(false); + if (m_textCtrlPreview->CanUndo()) { + m_textCtrlPreview->Undo(); + } + + m_textCtrlPreview->BeginUndoAction(); + if (m_line == wxNOT_FOUND) { + m_line = 0; + } + m_textCtrlPreview->MarkerDeleteAll(0x7); + long pos = m_textCtrlPreview->PositionFromLine(m_line); + m_textCtrlPreview->InsertText(pos, line + wxT("\n")); + m_textCtrlPreview->MarkerAdd(m_line, 0x7); + m_textCtrlPreview->SetCurrentPos(pos); + m_textCtrlPreview->SetSelectionStart(pos); + m_textCtrlPreview->SetSelectionEnd(pos); + m_textCtrlPreview->EnsureCaretVisible(); + m_textCtrlPreview->EndUndoAction(); + m_textCtrlPreview->SetReadOnly(true); +} + +void AddIncludeFileDlg::OnTextUpdated(wxCommandEvent &e) +{ + wxUnusedVar(e); + SetAndMarkLine(); +} + +void AddIncludeFileDlg::OnButtonDown(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_line+2 >= m_textCtrlPreview->GetLineCount()) { + return; + } + m_line++; + SetAndMarkLine(); +} + +void AddIncludeFileDlg::OnButtonUp(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_line-1 < 0) { + return; + } + m_line--; + SetAndMarkLine(); +} + +void AddIncludeFileDlg::OnButtonOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + //get the include file to add + wxString fullpath = m_textCtrlFullPath->GetValue(); + static wxRegEx reIncludeFile(wxT("include *[\\\"\\<]{1}([a-zA-Z0-9_/\\.]*)")); + wxString relativePath; + + if (reIncludeFile.Matches(m_textCtrlLineToAdd->GetValue())) { + relativePath = reIncludeFile.GetMatch(m_textCtrlLineToAdd->GetValue(), 1); + } + + fullpath.Replace(wxT("\\"), wxT("/")); + relativePath.Replace(wxT("\\"), wxT("/")); + wxFileName fn(fullpath); + + wxString inclPath; + if (fullpath.EndsWith(relativePath, &inclPath) && + fullpath != relativePath && //dont save the '.' path this is done by default + fn.GetFullName() != relativePath) //if the relative path is only file name, nothing to cache + { + m_includePath.Add(inclPath); + } + EndModal(wxID_OK); +} + +void AddIncludeFileDlg::OnClearCachedPaths(wxCommandEvent &e) +{ + wxUnusedVar(e); + m_includePath.Clear(); + UpdateLineToAdd(); + SetAndMarkLine(); +} + + diff --git a/LiteEditor/addincludefiledlg.h b/LiteEditor/addincludefiledlg.h new file mode 100644 index 0000000000..3057606332 --- /dev/null +++ b/LiteEditor/addincludefiledlg.h @@ -0,0 +1,35 @@ +#ifndef __addincludefiledlg__ +#define __addincludefiledlg__ + +/** +@file +Subclass of AddIncludeFileDlgBase, which is generated by wxFormBuilder. +*/ + +#include "addincludefiledlgbase.h" + +/** Implementing AddIncludeFileDlgBase */ +class AddIncludeFileDlg : public AddIncludeFileDlgBase +{ + wxString m_fullpath; + wxString m_text; + int m_line; + static wxArrayString m_includePath; + +protected: + void SetAndMarkLine(); + void OnTextUpdated(wxCommandEvent &e); + void OnButtonDown(wxCommandEvent &event); + void OnButtonUp(wxCommandEvent &event); + void OnButtonOK(wxCommandEvent &e); + void OnClearCachedPaths(wxCommandEvent &e); + void UpdateLineToAdd(); + +public: + /** Constructor */ + AddIncludeFileDlg( wxWindow* parent, const wxString &fullpath, const wxString &text, int lineNo ); + wxString GetLineToAdd() const {return m_textCtrlLineToAdd->GetValue();} + int GetLine() const {return m_line;} +}; + +#endif // __addincludefiledlg__ diff --git a/LiteEditor/addincludefiledlgbase.cpp b/LiteEditor/addincludefiledlgbase.cpp new file mode 100644 index 0000000000..e849a3a95d --- /dev/null +++ b/LiteEditor/addincludefiledlgbase.cpp @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "addincludefiledlgbase.h" + +/////////////////////////////////////////////////////////////////////////// + +AddIncludeFileDlgBase::AddIncludeFileDlgBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxSize( 250,-1 ), wxDefaultSize ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_mainPanel->SetMinSize( wxSize( 200,-1 ) ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + + m_staticText4 = new wxStaticText( m_mainPanel, wxID_ANY, wxT("Line that will be added:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizer9->Add( m_staticText4, 0, wxTOP|wxRIGHT, 5 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlLineToAdd = new wxTextCtrl( m_mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_textCtrlLineToAdd, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_buttonClearCachedPaths = new wxButton( m_mainPanel, wxID_ANY, wxT("Clear Cached Paths"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_buttonClearCachedPaths, 0, wxALL, 5 ); + + bSizer9->Add( bSizer6, 0, wxEXPAND, 5 ); + + m_staticText5 = new wxStaticText( m_mainPanel, wxID_ANY, wxT("File's full path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bSizer9->Add( m_staticText5, 0, wxTOP|wxRIGHT, 5 ); + + m_textCtrlFullPath = new wxTextCtrl( m_mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + bSizer9->Add( m_textCtrlFullPath, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + m_staticText6 = new wxStaticText( m_mainPanel, wxID_ANY, wxT("Preview:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6->Wrap( -1 ); + bSizer9->Add( m_staticText6, 0, wxTOP|wxRIGHT, 5 ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlPreview = new wxScintilla( m_mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString ); + m_textCtrlPreview->SetUseTabs( true ); + m_textCtrlPreview->SetTabWidth( 4 ); + m_textCtrlPreview->SetIndent( 4 ); + m_textCtrlPreview->SetTabIndents( true ); + m_textCtrlPreview->SetBackSpaceUnIndents( true ); + m_textCtrlPreview->SetViewEOL( false ); + m_textCtrlPreview->SetViewWhiteSpace( false ); + m_textCtrlPreview->SetMarginWidth( 2, 0 ); + m_textCtrlPreview->SetIndentationGuides( false ); + m_textCtrlPreview->SetMarginWidth( 1, 0 ); + m_textCtrlPreview->SetMarginType( 0, wxSCI_MARGIN_NUMBER ); + m_textCtrlPreview->SetMarginWidth( 0, m_textCtrlPreview->TextWidth( wxSCI_STYLE_LINENUMBER, wxT("_99999") ) ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDER, wxSCI_MARK_BOXPLUS ); + m_textCtrlPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) ); + m_textCtrlPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_BOXMINUS ); + m_textCtrlPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) ); + m_textCtrlPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_EMPTY ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_BOXPLUS ); + m_textCtrlPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) ); + m_textCtrlPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_BOXMINUS ); + m_textCtrlPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) ); + m_textCtrlPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_EMPTY ); + m_textCtrlPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_EMPTY ); + m_textCtrlPreview->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); + m_textCtrlPreview->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); + bSizer12->Add( m_textCtrlPreview, 1, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxVERTICAL ); + + m_buttonUp = new wxButton( m_mainPanel, wxID_ANY, wxT("&Up"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer11->Add( m_buttonUp, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonDown = new wxButton( m_mainPanel, wxID_ANY, wxT("&Down"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer11->Add( m_buttonDown, 0, wxTOP|wxBOTTOM|wxLEFT, 5 ); + + bSizer12->Add( bSizer11, 0, wxEXPAND, 0 ); + + bSizer9->Add( bSizer12, 1, wxEXPAND, 5 ); + + m_mainPanel->SetSizer( bSizer9 ); + m_mainPanel->Layout(); + bSizer9->Fit( m_mainPanel ); + bSizer7->Add( m_mainPanel, 1, wxEXPAND | wxALL, 5 ); + + m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer7->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK->SetDefault(); + bSizer8->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer7->Add( bSizer8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer7 ); + this->Layout(); + + // Connect Events + m_textCtrlLineToAdd->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( AddIncludeFileDlgBase::OnTextUpdated ), NULL, this ); + m_buttonClearCachedPaths->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AddIncludeFileDlgBase::OnClearCachedPaths ), NULL, this ); + m_buttonUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AddIncludeFileDlgBase::OnButtonUp ), NULL, this ); + m_buttonDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AddIncludeFileDlgBase::OnButtonDown ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AddIncludeFileDlgBase::OnButtonOK ), NULL, this ); +} diff --git a/LiteEditor/addincludefiledlgbase.h b/LiteEditor/addincludefiledlgbase.h new file mode 100644 index 0000000000..a119f0d0e1 --- /dev/null +++ b/LiteEditor/addincludefiledlgbase.h @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __addincludefiledlgbase__ +#define __addincludefiledlgbase__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef __VISUALC__ +#include +#endif //__VISUALC__ +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class AddIncludeFileDlgBase +/////////////////////////////////////////////////////////////////////////////// +class AddIncludeFileDlgBase : public wxDialog +{ + private: + + protected: + wxPanel* m_mainPanel; + wxStaticText* m_staticText4; + wxTextCtrl* m_textCtrlLineToAdd; + wxButton* m_buttonClearCachedPaths; + wxStaticText* m_staticText5; + wxTextCtrl* m_textCtrlFullPath; + wxStaticText* m_staticText6; + wxScintilla* m_textCtrlPreview; + wxButton* m_buttonUp; + wxButton* m_buttonDown; + wxStaticLine* m_staticline5; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnTextUpdated( wxCommandEvent& event ){ event.Skip(); } + virtual void OnClearCachedPaths( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonUp( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonDown( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + + + public: + AddIncludeFileDlgBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Add Include File:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 626,479 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__addincludefiledlgbase__ diff --git a/LiteEditor/advanced_settings.cpp b/LiteEditor/advanced_settings.cpp new file mode 100644 index 0000000000..a19c53baa5 --- /dev/null +++ b/LiteEditor/advanced_settings.cpp @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP +#include "macros.h" + +#include "advanced_settings.h" +#include "manager.h" +#include "compiler_page.h" +#include "editor_config.h" +#include +#include "build_settings_config.h" +#include "build_page.h" + +BEGIN_EVENT_TABLE(AdvancedDlg, wxDialog) +EVT_MENU(XRCID("delete_compiler"), AdvancedDlg::OnDeleteCompiler) +END_EVENT_TABLE() + +/////////////////////////////////////////////////////////////////////////// + +AdvancedDlg::AdvancedDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style | wxRESIZE_BORDER ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_notebook = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize); + m_notebook->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + m_compilersPage = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText1 = new wxStaticText( m_compilersPage, wxID_ANY, wxT("Create New Compiler:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_staticText1, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_buttonNewCompiler = new wxButton( m_compilersPage, wxID_ANY, wxT("New..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonNewCompiler, 0, wxALL|wxALIGN_RIGHT, 5 ); + + bSizer5->Add( bSizer4, 0, wxALIGN_RIGHT|wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( m_compilersPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer5->Add( m_staticline2, 0, wxEXPAND | wxRIGHT | wxLEFT, 5 ); + + m_compilersNotebook = new wxFlatNotebook(m_compilersPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFNB_BACKGROUND_GRADIENT|wxFNB_DROPDOWN_TABS_LIST|wxFNB_NO_NAV_BUTTONS|wxFNB_NO_X_BUTTON|wxFNB_FF2); + m_compilersNotebook->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); + + bSizer5->Add( m_compilersNotebook, 1, wxEXPAND | wxALL, 5 ); + + m_compilersPage->SetSizer( bSizer5 ); + m_compilersPage->Layout(); + bSizer5->Fit( m_compilersPage ); + m_notebook->AddPage( m_compilersPage, wxT("Compilers"), true ); + + mainSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 ); + + m_staticline10 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline10, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + + m_buildPage = new BuildPage(m_notebook); + m_notebook->AddPage(m_buildPage, wxT("Build Systems"), false); + + this->SetSizer( mainSizer ); + this->Layout(); + + m_compilersNotebook->SetRightClickMenu(wxXmlResource::Get()->LoadMenu(wxT("delete_compiler_menu"))); + + LoadCompilers(); + ConnectButton(m_buttonNewCompiler, AdvancedDlg::OnButtonNewClicked); + ConnectButton(m_buttonOK, AdvancedDlg::OnButtonOKClicked); +} + +void AdvancedDlg::LoadCompilers() +{ + m_compilersNotebook->Freeze(); + m_compilersNotebook->DeleteAllPages(); + + BuildSettingsConfigCookie cookie; + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetFirstCompiler(cookie); + while(cmp){ + m_compilersNotebook->AddPage(new CompilerPage(m_compilersNotebook, cmp->GetName()), cmp->GetName()); + cmp = BuildSettingsConfigST::Get()->GetNextCompiler(cookie); + } + m_compilersNotebook->Thaw(); +} + +void AdvancedDlg::OnButtonNewClicked(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, wxT("Enter New Compiler Name:"), wxT("New Compiler")); + if(dlg->ShowModal() == wxID_OK){ + wxString name = dlg->GetValue(); + TrimString(name); + if(name.IsEmpty() == false){ + ManagerST::Get()->CreateDefaultNewCompiler(name); + LoadCompilers(); + } + } + dlg->Destroy(); +} + +void AdvancedDlg::OnButtonOKClicked(wxCommandEvent &event) +{ + wxUnusedVar(event); + //save all compiler pages + int count = m_compilersNotebook->GetPageCount(); + for(int i=0; i( m_compilersNotebook->GetPage((size_t)i)); + if(page){ + page->Save(); + } + } + //save the build page + m_buildPage->Save(); + + EndModal(wxID_OK); +} + +void AdvancedDlg::OnDeleteCompiler(wxCommandEvent & event) +{ + wxUnusedVar(event); + int sel = m_compilersNotebook->GetSelection(); + + if(sel != wxNOT_FOUND){ + wxString name = m_compilersNotebook->GetPageText((size_t)sel); + if(ManagerST::Get()->DeleteCompiler(name)){ + m_compilersNotebook->DeletePage((size_t)sel); + } + } +} diff --git a/LiteEditor/advanced_settings.h b/LiteEditor/advanced_settings.h new file mode 100644 index 0000000000..81c8a17882 --- /dev/null +++ b/LiteEditor/advanced_settings.h @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __advanced_settings__ +#define __advanced_settings__ + +#include + +#include +#include +#include +#include "wx/treebook.h" +#include +#include "build_page.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class AdvancedDlg +/////////////////////////////////////////////////////////////////////////////// +class AdvancedDlg : public wxDialog +{ + DECLARE_EVENT_TABLE(); + +protected: + wxTreebook* m_notebook; + wxPanel* m_compilersPage; + wxStaticText* m_staticText1; + wxButton* m_buttonNewCompiler; + wxStaticLine* m_staticline2; + wxFlatNotebook* m_compilersNotebook; + wxStaticLine* m_staticline10; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + BuildPage *m_buildPage; + + void OnButtonNewClicked(wxCommandEvent &); + void OnButtonOKClicked(wxCommandEvent &); + void OnDeleteCompiler(wxCommandEvent &); + void LoadCompilers(); + +public: + AdvancedDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Advanced"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize(800, 600), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__advanced_settings__ diff --git a/LiteEditor/app.cpp b/LiteEditor/app.cpp new file mode 100644 index 0000000000..ef1d8bb283 --- /dev/null +++ b/LiteEditor/app.cpp @@ -0,0 +1,270 @@ +#include "app.h" +#include + +#include +#include +#include "manager.h" +#include "macros.h" +#include "wx/txtstrm.h" +#include "wx/wfstream.h" +#include "stack_walker.h" +#include +#include "procutils.h" +#include "globals.h" +#include "wx/tokenzr.h" +#include "wx/dir.h" +#include "splashscreen.h" +#include + +#ifdef __WXMSW__ +#include //registry keys +#endif + +extern char *SvnRevision; + +static const wxCmdLineEntryDesc cmdLineDesc[] = { + {wxCMD_LINE_SWITCH, wxT("v"), wxT("version"), wxT("Print current version"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + {wxCMD_LINE_OPTION, wxT("b"), wxT("basedir"), wxT("The base directory of CodeLite"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + {wxCMD_LINE_PARAM, NULL, NULL, wxT("input file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL }, + {wxCMD_LINE_NONE } +}; + +static void massCopy(const wxString &sourceDir, const wxString &spec, const wxString &destDir) +{ + wxArrayString files; + wxDir::GetAllFiles(sourceDir, &files, spec, wxDIR_FILES); + for ( size_t i=0; iInitAllHandlers(); + wxImage::AddHandler( new wxPNGHandler ); + wxImage::AddHandler( new wxCURHandler ); + wxImage::AddHandler( new wxICOHandler ); + wxImage::AddHandler( new wxXPMHandler ); + wxImage::AddHandler( new wxGIFHandler ); + InitXmlResource(); + //wxLog::EnableLogging(false); + wxString homeDir(wxEmptyString); + + //parse command line + wxCmdLineParser parser; + parser.SetDesc(cmdLineDesc); + parser.SetCmdLine(wxAppBase::argc, wxAppBase::argv); + if (parser.Parse() != 0) { + return false; + } + + wxString newBaseDir(wxEmptyString); + if (parser.Found(wxT("b"), &newBaseDir)) { + homeDir = newBaseDir; + } + +#if defined (__WXGTK__) || defined (__WXMAC__) + SetAppName(wxT("codelite")); + homeDir = wxStandardPaths::Get().GetUserDataDir(); // ~/Library/Application Support/codelite or ~/.codelite + + //Create the directory structure + wxMkDir(homeDir.ToAscii(), 0777); + wxMkDir((homeDir + wxT("/plugins/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/debuggers/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/lexers/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/rc/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/images/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/templates/")).ToAscii(), 0777); + wxMkDir((homeDir + wxT("/config/")).ToAscii(), 0777); + + //copy the settings from the global location if needed + CopySettings(homeDir); + +#else //__WXMSW__ + if (homeDir.IsEmpty()) { //did we got a basedir from user? + // On windows, we use the InstallPath from the registry + wxRegKey *regKey = new wxRegKey(wxT("HKEY_CURRENT_USER\\Software\\LiteEditor\\LiteEditor")); + if (regKey->Exists()) { + regKey->QueryValue(wxT("InstallPath"), homeDir); + regKey->Close(); + } + delete regKey; + + if (homeDir.IsEmpty()) { + homeDir = ::wxGetCwd(); + } + } +#endif + + wxString curdir = wxGetCwd(); + ::wxSetWorkingDirectory(homeDir); + // Load all of the XRC files that will be used. You can put everything + // into one giant XRC file if you wanted, but then they become more + // diffcult to manage, and harder to reuse in later projects. + // The menubar + if (!wxXmlResource::Get()->Load(wxT("rc/menu.xrc"))) + return false; + + // keep the startup directory + ManagerST::Get()->SetStarupDirectory(::wxGetCwd()); + Manager *mgr = ManagerST::Get(); + + //show splashscreen here + long style = wxSIMPLE_BORDER; +#if defined (__WXMSW__) || defined (__WXGTK__) + style |= wxSTAY_ON_TOP; + style |= wxFRAME_NO_TASKBAR; +#endif + + wxBitmap bitmap; + wxString splashName(mgr->GetStarupDirectory() + wxT("/images/splashscreen.png")); + if (bitmap.LoadFile(splashName, wxBITMAP_TYPE_PNG)) { + wxString mainTitle; + mainTitle << wxT("CodeLite - SVN build, Revision: ") << _U(SvnRevision); + m_splash = new SplashScreen(bitmap, mainTitle, wxT("For the Windows(R) & Linux environments"), + wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_NO_TIMEOUT, + 6000, NULL, -1, wxDefaultPosition, wxDefaultSize, + style); + } + wxYield(); + + + // Create the main application window (a dialog in this case) + // NOTE: Vertical dimension comprises the caption bar. + // Horizontal dimension has to take into account the thin + // hilighting border around the dialog (2 points in + // Win 95). + m_pMainFrame = Frame::Get(); + + // Center the dialog when first shown + m_pMainFrame->Centre(); + + //if the application started with a given file name, + //which is not a workspace + //hide the output &workspace panes + if (parser.GetParamCount() > 0) { + ManagerST::Get()->HidePane(wxT("Debugger")); + ManagerST::Get()->HidePane(wxT("Workspace")); + ManagerST::Get()->HidePane(wxT("Output")); + } + + m_pMainFrame->Show(TRUE); + SetTopWindow(m_pMainFrame); + + m_splash->Close(true); + m_splash->Destroy(); + + for (size_t i=0; i< parser.GetParamCount(); i++) { + wxString argument = parser.GetParam(i); + + //convert to full path and open it + wxFileName fn(argument); + fn.MakeAbsolute(curdir); + ManagerST::Get()->OpenFile(fn.GetFullPath(), wxEmptyString); + } + + return TRUE; +} + +int App::OnExit() +{ + return 0; +} + +void App::CopySettings(const wxString &destDir) +{ + if (!wxFileName::FileExists( destDir + wxT("/config/liteeditor.xml") )) { + // + // copy new settings from the global installation location which is currently located at + // /usr/local/share/codelite/ (Linux) or at codelite.app/Contents/SharedSupport + // + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/plugins/"), wxT("*.so"), destDir + wxT("/plugins/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/templates/"), wxT("*.wizard"), destDir + wxT("/templates/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/templates/"), wxT("*.project"), destDir + wxT("/templates/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/templates/"), wxT("*.xml"), destDir + wxT("/templates/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/lexers/"), wxT("*.xml"), destDir + wxT("/lexers/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/images/"), wxT("*.png"), destDir + wxT("/images/")); + massCopy( wxStandardPaths::Get().GetDataDir() + wxT("/"), wxT("*.tags"), destDir + wxT("/")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/config/build_settings.xml"), destDir + wxT("/config/build_settings.xml")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/config/liteeditor.xml"), destDir + wxT("/config/liteeditor.xml")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/config/debuggers.xml"), destDir + wxT("/config/debuggers.xml")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/rc/menu.xrc"), destDir + wxT("/rc/menu.xrc")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/debuggers/Debugger.so"), destDir + wxT("/debuggers/Debugger.so")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/index.html"), destDir + wxT("/index.html")); + wxCopyFile(wxStandardPaths::Get().GetDataDir() + wxT("/astyle.sample"), destDir + wxT("/astyle.sample")); + } +} + +void App::OnFatalException() +{ +#if wxUSE_STACKWALKER + Manager *mgr = ManagerST::Get(); + wxString startdir = mgr->GetStarupDirectory(); + startdir << wxT("/crash.log"); + + wxFileOutputStream outfile(startdir); + wxTextOutputStream out(outfile); + out.WriteString(wxDateTime::Now().FormatTime() + wxT("\n")); + StackWalker walker(&out); + walker.Walk(); + wxAppBase::ExitMainLoop(); +#endif +} + +void App::OnIdle(wxIdleEvent &e) +{ + //delegate the event to the manager class + Frame::Get()->ProcessEvent(e); + e.Skip(); +} + +bool App::ReadControlFile(wxString &installPath, long &installRev) +{ + wxString content; + if (!ReadFileWithConversion(wxT("/usr/local/share/codelite/codelite.control"), content)) { + return false; + } + + wxStringTokenizer tkz(content, wxT("\n"), wxTOKEN_STRTOK); + wxString revName = tkz.NextToken(); + wxString tmprev; + if (revName.StartsWith(wxT("Revision:"), &tmprev)) { + revName = tmprev; + } + revName.ToLong( &installRev ); + installPath = tkz.NextToken(); + return true; +} + +void App::OnHideSplash(wxCommandEvent &e) +{ + m_splash->Close(true); + m_splash->Destroy(); + e.Skip(); +} + diff --git a/LiteEditor/app.h b/LiteEditor/app.h new file mode 100644 index 0000000000..32ea8d0d7d --- /dev/null +++ b/LiteEditor/app.h @@ -0,0 +1,30 @@ +#ifndef LITEEDITOR_APP_H +#define LITEEDITOR_APP_H + +#include "frame.h" +class SplashScreen; + +class App : public wxApp +{ +private: + SplashScreen* m_splash; + Frame *m_pMainFrame; + bool ReadControlFile(wxString &installPath, long &installRev); + void CopySettings(const wxString &installPath); + +public: + App(void); + virtual ~App(void); + +protected: + virtual bool OnInit(); + virtual int OnExit(); + virtual void OnFatalException(); + +private: + DECLARE_EVENT_TABLE() + void OnIdle(wxIdleEvent &e); + void OnHideSplash(wxCommandEvent &e); +}; + +#endif // LITEEDITOR_APP_H diff --git a/LiteEditor/attachdbgprocbasedlg.cpp b/LiteEditor/attachdbgprocbasedlg.cpp new file mode 100644 index 0000000000..15ca089f25 --- /dev/null +++ b/LiteEditor/attachdbgprocbasedlg.cpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "attachdbgprocbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +AttachDbgProcBaseDlg::AttachDbgProcBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Debugger to use:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceDebuggerChoices; + m_choiceDebugger = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDebuggerChoices, 0 ); + fgSizer1->Add( m_choiceDebugger, 0, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( fgSizer1, 0, wxEXPAND, 5 ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("Processes:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizer1->Add( m_staticText4, 0, wxALL, 5 ); + + m_listCtrlProcesses = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT ); + bSizer1->Add( m_listCtrlProcesses, 1, wxALL|wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOk = new wxButton( this, wxID_OK, wxT("&Attach"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOk, 0, wxALL, 5 ); + + m_button2 = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_button2, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_listCtrlProcesses->Connect( wxEVT_COMMAND_LIST_COL_CLICK, wxListEventHandler( AttachDbgProcBaseDlg::OnSortColumn ), NULL, this ); + m_listCtrlProcesses->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( AttachDbgProcBaseDlg::OnItemActivated ), NULL, this ); + m_listCtrlProcesses->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( AttachDbgProcBaseDlg::OnItemDeselected ), NULL, this ); + m_listCtrlProcesses->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( AttachDbgProcBaseDlg::OnItemSelected ), NULL, this ); + m_buttonOk->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( AttachDbgProcBaseDlg::OnBtnAttachUI ), NULL, this ); +} diff --git a/LiteEditor/attachdbgprocbasedlg.h b/LiteEditor/attachdbgprocbasedlg.h new file mode 100644 index 0000000000..bef3231017 --- /dev/null +++ b/LiteEditor/attachdbgprocbasedlg.h @@ -0,0 +1,56 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __attachdbgprocbasedlg__ +#define __attachdbgprocbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class AttachDbgProcBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class AttachDbgProcBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText3; + wxChoice* m_choiceDebugger; + wxStaticText* m_staticText4; + wxListCtrl* m_listCtrlProcesses; + wxStaticLine* m_staticline1; + wxButton* m_buttonOk; + wxButton* m_button2; + + // Virtual event handlers, overide them in your derived class + virtual void OnSortColumn( wxListEvent& event ){ event.Skip(); } + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + virtual void OnItemDeselected( wxListEvent& event ){ event.Skip(); } + virtual void OnItemSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnBtnAttachUI( wxUpdateUIEvent& event ){ event.Skip(); } + + + public: + AttachDbgProcBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Attach debugger to process:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 445,471 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__attachdbgprocbasedlg__ diff --git a/LiteEditor/attachdbgprocdlg.cpp b/LiteEditor/attachdbgprocdlg.cpp new file mode 100644 index 0000000000..890feddba0 --- /dev/null +++ b/LiteEditor/attachdbgprocdlg.cpp @@ -0,0 +1,113 @@ +#include "attachdbgprocdlg.h" +#include "debuggermanager.h" +#include "globals.h" +#include "procutils.h" +#include + +/// Ascending sorting function +struct PIDSorter +{ + bool operator()(const ProcessEntry &rStart, const ProcessEntry &rEnd) + { + return rEnd.pid < rStart.pid; + } +}; + +struct NameSorter +{ + bool operator()(const ProcessEntry &rStart, const ProcessEntry &rEnd) + { + return rEnd.name.CmpNoCase(rStart.name) < 0; + } +}; + +AttachDbgProcDlg::AttachDbgProcDlg( wxWindow* parent ) +: +AttachDbgProcBaseDlg( parent ) +, m_selectedItem(wxNOT_FOUND) +{ + wxArrayString choices = DebuggerMgr::Get().GetAvailableDebuggers(); + m_choiceDebugger->Append(choices); + + if(choices.IsEmpty() == false){ + m_choiceDebugger->SetSelection(0); + } + + m_listCtrlProcesses->InsertColumn(0, wxT("PID")); + m_listCtrlProcesses->InsertColumn(1, wxT("Name")); + + RefreshProcessesList(); +} + +void AttachDbgProcDlg::RefreshProcessesList(int colToSort) +{ + m_listCtrlProcesses->Freeze(); + m_listCtrlProcesses->DeleteAllItems(); + + //Populate the list with list of processes + std::vector proclist; + ProcUtils::GetProcessList(proclist); + + if(colToSort == 0){//sort by PID + std::sort(proclist.begin(), proclist.end(), PIDSorter()); + }else if(colToSort == 1){//sort by name + std::sort(proclist.begin(), proclist.end(), NameSorter()); + } + + for(size_t i=0; iSetColumnWidth(0, wxLIST_AUTOSIZE); + m_listCtrlProcesses->SetColumnWidth(1, wxLIST_AUTOSIZE); + m_listCtrlProcesses->Thaw(); +} + +wxString AttachDbgProcDlg::GetExeName() const +{ + if(m_selectedItem != wxNOT_FOUND){ + return GetColumnText(m_listCtrlProcesses, m_selectedItem, 1); + } + return wxEmptyString; +} + +wxString AttachDbgProcDlg::GetProcessId() const +{ + if(m_selectedItem != wxNOT_FOUND){ + return GetColumnText(m_listCtrlProcesses, m_selectedItem, 0); + } + return wxEmptyString; +} + + +void AttachDbgProcDlg::OnSortColumn( wxListEvent& event ) +{ + RefreshProcessesList( event.m_col ); +} + +void AttachDbgProcDlg::OnItemActivated( wxListEvent& event ) +{ + m_selectedItem = event.m_itemIndex; + EndModal(wxID_OK); +} + +void AttachDbgProcDlg::OnItemDeselected( wxListEvent& event ) +{ + m_selectedItem = wxNOT_FOUND; + wxUnusedVar(event); +} + +void AttachDbgProcDlg::OnItemSelected( wxListEvent& event ) +{ + m_selectedItem = event.m_itemIndex; + wxUnusedVar(event); +} + +void AttachDbgProcDlg::OnBtnAttachUI( wxUpdateUIEvent& event ) +{ + event.Enable(m_selectedItem != wxNOT_FOUND); +} diff --git a/LiteEditor/attachdbgprocdlg.h b/LiteEditor/attachdbgprocdlg.h new file mode 100644 index 0000000000..b0730e5744 --- /dev/null +++ b/LiteEditor/attachdbgprocdlg.h @@ -0,0 +1,33 @@ +#ifndef __attachdbgprocdlg__ +#define __attachdbgprocdlg__ + +/** +@file +Subclass of AttachDbgProcBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "attachdbgprocbasedlg.h" + +/** Implementing AttachDbgProcBaseDlg */ +class AttachDbgProcDlg : public AttachDbgProcBaseDlg +{ + long m_selectedItem; + +public: + void RefreshProcessesList(int colToSort = -1); + + /** Constructor */ + AttachDbgProcDlg( wxWindow* parent ); + wxString GetProcessId() const; + wxString GetExeName() const; + wxString GetDebugger() const{return m_choiceDebugger->GetStringSelection();} + + //events + virtual void OnSortColumn( wxListEvent& event ); + virtual void OnItemActivated( wxListEvent& event ); + virtual void OnItemDeselected( wxListEvent& event ); + virtual void OnItemSelected( wxListEvent& event ); + virtual void OnBtnAttachUI( wxUpdateUIEvent& event ); +}; + +#endif // __attachdbgprocdlg__ diff --git a/LiteEditor/autorev.exe b/LiteEditor/autorev.exe new file mode 100644 index 0000000000000000000000000000000000000000..c0477e611a4b324bae93e69cfb6e4d02db8958a7 GIT binary patch literal 215705 zcmce<3w#vS6+gb4Y+!-lED$s*mQbSwADC3E1f%A`0#$-R2p|{{6?`Ee%m!4V8)sLT zj%%YrYb#W!k76H+79&Q4JTOZvYQzUoP@{s*xM_`#VhEJ{zu$XjHk*J|`}_TWd^9_A z@44rmbMCq4o_p?Nie^^2l3gyB2mg0=x?G#_%YS*|?|=UjMD}q*tB-SS>htQb&F+b> z4x4(zjY~2XEnay2;yJfuTsvpMf`w|vHFGl-2Nq=9xFBQfWm7V4S$N&tk^TGk&9qS$ z`(3Vy?&Dn1pI$WHm7C=1*T>~*arJihb0>{zC*~kC!PU`raB6ib&4PHKZAX)I`a%D(Z7GN3tvw!5vMz_n`OFsU;{5w*eyG%ue!w=#Q2_mmuOyI@k zx*GqDyl##<2hW?BK;FT#>j+=E{^hw`H6s^Gz@0fr&j8#Q=HoZvUmgTE@|q<}n6xe* zf3EJH&vgC^65ovypO6h?G-#fe`=6V`U<+kAtmXYY!c>jos)t; zO~|Lr#~uUj-17+L+Atq~T9Cg0zn2^XZq)e%bIm#qe~M8lWw`kmaKFeVnCrYj_;WSj z((t?E7;xvGOEA}H=$|VHxW4$^dknbIzaW_Fa%NQm4*$76JqBEkr0?Fb$X^GbariZl z0hgUM8ab}KRQzcJ9QheZq}~1!t06-hLybD?!c*`Qco~S;2eJ?7D(c9x>$nMZ{MpXxY>NH< z!ruTm_J&=nX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int_dlg_base.cpp b/LiteEditor/breakpoint_dlg_base.cpp new file mode 100644 index 0000000000..157cf47154 --- /dev/null +++ b/LiteEditor/breakpoint_dlg_base.cpp @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "breakpoint_dlg_base.h" + +/////////////////////////////////////////////////////////////////////////// + +BreakpointDlgBase::BreakpointDlgBase( wxWindow* parent, int id, wxPoint pos, wxSize size, int style ) +: wxPanel( parent, id, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer19; + bSizer19 = new wxBoxSizer( wxHORIZONTAL ); + + m_listBreakpoints = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer19->Add( m_listBreakpoints, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxVERTICAL ); + + m_buttonDelete = new wxButton( this, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer20->Add( m_buttonDelete, 0, wxALL, 5 ); + + m_buttonDeleteAll = new wxButton( this, wxID_ANY, wxT("Delete &All"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer20->Add( m_buttonDeleteAll, 0, wxALL, 5 ); + + bSizer19->Add( bSizer20, 0, wxEXPAND, 5 ); + bSizer16->Add( bSizer19, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer16 ); + this->Layout(); +} diff --git a/LiteEditor/breakpoint_dlg_base.h b/LiteEditor/breakpoint_dlg_base.h new file mode 100644 index 0000000000..a17a18b09b --- /dev/null +++ b/LiteEditor/breakpoint_dlg_base.h @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __breakpoint_dlg_base__ +#define __breakpoint_dlg_base__ + +#include + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class BreakpointDlgBase +/////////////////////////////////////////////////////////////////////////////// +class BreakpointDlgBase : public wxPanel +{ + private: + + protected: + wxListBox* m_listBreakpoints; + wxButton* m_buttonDelete; + wxButton* m_buttonDeleteAll; + wxStaticLine* m_staticline10; + wxButton* m_button27; + + public: + BreakpointDlgBase( wxWindow* parent, int id = wxID_ANY, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 352,285 ), int style = 0 ); +}; + +#endif //__breakpoint_dlg_base__ diff --git a/LiteEditor/breakpointdlg.cpp b/LiteEditor/breakpointdlg.cpp new file mode 100644 index 0000000000..9995bf5729 --- /dev/null +++ b/LiteEditor/breakpointdlg.cpp @@ -0,0 +1,71 @@ +#include "breakpointdlg.h" +#include "debuggermanager.h" +#include "manager.h" +#include "macros.h" + +BreakpointDlg::BreakpointDlg( wxWindow* parent ) +: +BreakpointDlgBase( parent ) +{ + Initialize(); + ConnectButton(m_buttonDelete, BreakpointDlg::OnDelete); + ConnectButton(m_buttonDeleteAll, BreakpointDlg::OnDeleteAll); + +} + +void BreakpointDlg::Initialize() +{ + m_listBreakpoints->Clear(); + m_listBreakpoints->Freeze(); + + std::vector bps, pbps; + DebuggerMgr::Get().GetBreakpoints(bps); + std::vector::iterator iter = bps.begin(); + for(; iter != bps.end(); iter++) + { + wxString entry; + entry << iter->file << wxT("|") << iter->lineno; + m_listBreakpoints->Append(entry); + } + iter = pbps.begin(); + for(; iter != pbps.end(); iter++) + { + wxString entry; + entry << iter->file << wxT("|") << iter->lineno; + m_listBreakpoints->Append(entry); + } + if(m_listBreakpoints->GetCount() > 0){ + m_listBreakpoints->Select(0); + } + + m_listBreakpoints->Thaw(); +} + +void BreakpointDlg::OnDelete(wxCommandEvent &e) +{ + wxUnusedVar(e); + if(m_listBreakpoints->GetCount() > 0){ + int where = m_listBreakpoints->GetSelection(); + if(where != wxNOT_FOUND){ + wxString sel = m_listBreakpoints->GetStringSelection(); + //get the file name + wxString fileName = sel.BeforeFirst(wxT('|')); + wxString strLine = sel.AfterFirst(wxT('|')); + long lineno; + strLine.ToLong(&lineno); + + BreakpointInfo bp; + bp.file = fileName; + bp.lineno = lineno; + ManagerST::Get()->DbgDeleteBreakpoint(bp); + m_listBreakpoints->Delete((unsigned int)where); + } + } +} + +void BreakpointDlg::OnDeleteAll(wxCommandEvent &e) +{ + wxUnusedVar(e); + ManagerST::Get()->DbgDeleteAllBreakpoints(); + m_listBreakpoints->Clear(); +} diff --git a/LiteEditor/breakpointdlg.h b/LiteEditor/breakpointdlg.h new file mode 100644 index 0000000000..b516f9317b --- /dev/null +++ b/LiteEditor/breakpointdlg.h @@ -0,0 +1,25 @@ +#ifndef __breakpointdlg__ +#define __breakpointdlg__ + +/** +@file +Subclass of BreakpointDlgBase, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "breakpoint_dlg_base.h" + +/** Implementing BreakpointDlgBase */ +class BreakpointDlg : public BreakpointDlgBase +{ +protected: + void OnDelete(wxCommandEvent &e); + void OnDeleteAll(wxCommandEvent &e); + +public: + /** Constructor */ + BreakpointDlg( wxWindow* parent ); + void Initialize(); +}; + +#endif // __breakpointdlg__ diff --git a/LiteEditor/browse_record.h b/LiteEditor/browse_record.h new file mode 100644 index 0000000000..0bb81bdc4d --- /dev/null +++ b/LiteEditor/browse_record.h @@ -0,0 +1,31 @@ +#ifndef BROWSE_HISTORY_H +#define BROWSE_HISTORY_H + +#include "wx/string.h" + +#ifndef WXDLLIMPEXP_LE + #ifdef WXMAKINGDLL + # define WXDLLIMPEXP_LE WXEXPORT + #elif defined(WXUSINGDLL) + # define WXDLLIMPEXP_LE WXIMPORT + #else + # define WXDLLIMPEXP_LE + #endif // WXDLLIMPEXP_LE +#endif + +class BrowseRecord +{ +public: + wxString filename; + wxString project; + int lineno; + int position; +public: + BrowseRecord() : filename(wxEmptyString), project(wxEmptyString), lineno(wxNOT_FOUND), position(wxNOT_FOUND) + {} + + ~BrowseRecord() + {} +}; + +#endif //BROWSE_HISTORY_H diff --git a/LiteEditor/build_page.cpp b/LiteEditor/build_page.cpp new file mode 100644 index 0000000000..c67bbc9252 --- /dev/null +++ b/LiteEditor/build_page.cpp @@ -0,0 +1,125 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "build_page.h" +#include "build_settings_config.h" +#include "buildmanager.h" + +/////////////////////////////////////////////////////////////////////////// + +BuildPage::BuildPage( wxWindow* parent, int id, wxPoint pos, wxSize size, int style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText = new wxStaticText( this, wxID_ANY, wxT("Available Build Systems:"), wxDefaultPosition, wxDefaultSize, 0 ); + mainSizer->Add( m_staticText, 0, wxALL, 5 ); + + m_bookBuildSystems = new wxChoicebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT ); + mainSizer->Add( m_bookBuildSystems, 1, wxEXPAND | wxALL, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + CustomInit(); +} + +void BuildPage::CustomInit() +{ + std::list builders; + BuildManagerST::Get()->GetBuilders(builders); + + std::list::iterator iter = builders.begin(); + for(; iter != builders.end(); iter++){ + m_bookBuildSystems->AddPage(CreateBuildSystemPage(*iter), *iter); + } +} + +wxPanel *BuildPage::CreateBuildSystemPage(const wxString &name) +{ + return new BuildSystemPage(m_bookBuildSystems, name); +} + +void BuildPage::Save() +{ + int count = (int)m_bookBuildSystems->GetPageCount(); + for(int i=0; i(m_bookBuildSystems->GetPage(i)); + if(page){ + page->Save(); + } + } +} + +//--------------------------------------------------------------- +// Build system page +//--------------------------------------------------------------- +BuildSystemPage::BuildSystemPage(wxWindow *parent, wxString name) +: wxPanel(parent) +, m_name(name) +{ + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer4->AddGrowableCol( 1 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText17 = new wxStaticText( this, wxID_ANY, wxT("Build Tool:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_staticText17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_filePicker = new FilePicker(this); + fgSizer4->Add( m_filePicker, 1, wxALL|wxEXPAND, 5 ); + + m_staticText18 = new wxStaticText( this, wxID_ANY, wxT("Build Tool Switches:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_staticText18, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textBuildToolOptions = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textBuildToolOptions, 0, wxALL|wxEXPAND, 5 ); + + bSizer6->Add( fgSizer4, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer6 ); + this->Layout(); + + //set the default build tool path + m_filePicker->SetPath(BuildManagerST::Get()->GetBuilder(name)->GetBuildToolName()); + m_textBuildToolOptions->SetValue(BuildManagerST::Get()->GetBuilder(name)->GetBuildToolOptions()); +} + +void BuildSystemPage::Save() +{ + //update cached builders + BuilderPtr builder = BuildManagerST::Get()->GetBuilder(m_name); + builder->SetBuildTool(m_filePicker->GetPath()); + builder->SetBuildToolOptions(m_textBuildToolOptions->GetValue()); + BuildManagerST::Get()->AddBuilder(builder); + + //update configuration file + BuildSystemPtr bsptr = BuildSettingsConfigST::Get()->GetBuildSystem(m_name); + if(!bsptr){ + bsptr = new BuildSystem(NULL); + bsptr->SetName(m_name); + + } + bsptr->SetToolPath(m_filePicker->GetPath()); + bsptr->SetToolOptions(m_textBuildToolOptions->GetValue()); + BuildSettingsConfigST::Get()->SetBuildSystem(bsptr); +} diff --git a/LiteEditor/build_page.h b/LiteEditor/build_page.h new file mode 100644 index 0000000000..ee134e882c --- /dev/null +++ b/LiteEditor/build_page.h @@ -0,0 +1,52 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __build_page__ +#define __build_page__ + +#include + +#include +#include "wx/panel.h" +#include "filepicker.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class BuildPage +/////////////////////////////////////////////////////////////////////////////// +class BuildPage : public wxPanel +{ +private: + +protected: + wxStaticText* m_staticText; + wxChoicebook* m_bookBuildSystems; + + + void CustomInit(); + wxPanel *CreateBuildSystemPage(const wxString &name); + +public: + BuildPage( wxWindow* parent, int id = wxID_ANY, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 500,300 ), int style = wxTAB_TRAVERSAL ); + void Save(); +}; + +class BuildSystemPage : public wxPanel { + wxStaticText* m_staticText17; + FilePicker* m_filePicker; + wxStaticText* m_staticText18; + wxTextCtrl* m_textBuildToolOptions; + wxString m_name; +public: + BuildSystemPage(wxWindow *parent, wxString name); + virtual ~BuildSystemPage(){} + + void Save(); +}; +#endif //__build_page__ diff --git a/LiteEditor/checkdirtreectrl.cpp b/LiteEditor/checkdirtreectrl.cpp new file mode 100644 index 0000000000..0fb82ae1cf --- /dev/null +++ b/LiteEditor/checkdirtreectrl.cpp @@ -0,0 +1,158 @@ +#include "checkdirtreectrl.h" +#include "wx/dir.h" +#include "wx/filename.h" + +BEGIN_EVENT_TABLE(CheckDirTreeCtrl, wxCheckTreeCtrl) +EVT_TREE_ITEM_EXPANDED(wxID_ANY, CheckDirTreeCtrl::OnItemExpading) +EVT_CHECKTREE_ITEM_UNSELECTED(wxID_ANY, CheckDirTreeCtrl::OnItemUnchecked) +EVT_CHECKTREE_ITEM_SELECTED(wxID_ANY, CheckDirTreeCtrl::OnItemChecked) +END_EVENT_TABLE() + +CheckDirTreeCtrl::CheckDirTreeCtrl(wxWindow *parent, const wxString &rootPath, wxWindowID id) +: wxCheckTreeCtrl(parent, id) +{ + BuildTree(rootPath); +} + +void CheckDirTreeCtrl::BuildTree(const wxString &rootPath) +{ + m_root = rootPath; + DeleteAllItems(); + if(m_root.IsEmpty()){ + return; + } + + wxFileName filename(m_root, wxEmptyString); + wxTreeItemId item = AddRoot(filename.GetPath(), false, new DirTreeData(filename)); + AddChildren(item); + Expand(item); +} + +void CheckDirTreeCtrl::AddChildren(const wxTreeItemId &item) +{ + DirTreeData *data = dynamic_cast(GetItemData(item)); + if(data){ + wxString path = data->GetDir().GetPath(); + wxDir dir(path); + if(wxDir::Exists(path)){ + wxFileName filename(path, wxEmptyString); + GetChildren(item, dir, filename.GetFullPath()); + } + } +} + +CheckDirTreeCtrl::~CheckDirTreeCtrl() +{ +} + +void CheckDirTreeCtrl::OnItemUnchecked(wxCheckTreeCtrlEvent &event) +{ +// RecursiveCheck(event.GetItem(), false); + Check(event.GetItem(), false); + event.Skip(); +} + +void CheckDirTreeCtrl::OnItemChecked(wxCheckTreeCtrlEvent &event) +{ +// RecursiveCheck(event.GetItem()); + Check(event.GetItem(), true); + event.Skip(); +} + +void CheckDirTreeCtrl::GetChildren(const wxTreeItemId &parent, const wxDir &dir, const wxString &path) +{ + wxString filename; + if(!dir.IsOpened()){ + return; + } + + //enumerate all directories + bool cont = dir.GetFirst(&filename, wxEmptyString, wxDIR_DIRS); + + //add siblings + while(cont){ + wxFileName dirname(path + wxT("/") + filename, wxEmptyString); + wxTreeItemId item = AppendItem(parent, filename, IsChecked(parent), new DirTreeData(dirname)); + + wxDir child(dirname.GetFullPath()); + if(child.IsOpened() && child.HasSubDirs()){ + //add dummy item under this node with the parent path + AppendItem(item, wxT(""), IsChecked(item), new DirTreeData(dirname)); + } + cont = dir.GetNext(&filename); + } +} + +void CheckDirTreeCtrl::OnItemExpading(wxTreeEvent &event) +{ + wxTreeItemId item = event.GetItem(); + if(item.IsOk()){ + //get the item data + DirTreeData *data = dynamic_cast(GetItemData(item)); + if(data){ + wxFileName filename = data->GetDir(); + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild(item, cookie); + if(child.IsOk()){ + wxString text = GetItemText(child); + if(text == wxT("")){ + //we have a dummy node, remove it and replace it with actual nodes + Delete(child); + //add all children of the parent dir + AddChildren(item); + Expand(item); + } + } + } + } + event.Skip(); +} + +void CheckDirTreeCtrl::GetUnselectedDirs(wxArrayString &arr) +{ + //go over all loaded items, and return full path of the + //unselected items + std::list items; + GetItemChildrenRecursive(GetRootItem(), items); + + std::list::iterator iter = items.begin(); + for(; iter != items.end(); iter++){ + wxTreeItemId item = *iter; + if(!IsChecked(item)){ + //get the tree item data + DirTreeData *data = dynamic_cast(GetItemData(item)); + if(data){ + wxString text = GetItemText(item); + //skip the dummy items insertd into the tree + if(item != wxT("")){ + arr.Add(data->GetDir().GetPath()); + } + } + } + } +} + +void CheckDirTreeCtrl::GetSelectedDirs(wxArrayString &arr) +{ + //go over all loaded items, and return full path of the + //selected items + std::list items; + GetItemChildrenRecursive(GetRootItem(), items); + + std::list::iterator iter = items.begin(); + for(; iter != items.end(); iter++){ + wxTreeItemId item = *iter; + if(IsChecked(item)){ + //get the tree item data + DirTreeData *data = dynamic_cast(GetItemData(item)); + if(data){ + wxString text = GetItemText(item); + //skip the dummy items insertd into the tree + if(item != wxT("")){ + arr.Add(data->GetDir().GetPath()); + } + } + } + } +} + diff --git a/LiteEditor/checkdirtreectrl.h b/LiteEditor/checkdirtreectrl.h new file mode 100644 index 0000000000..4d4cae9961 --- /dev/null +++ b/LiteEditor/checkdirtreectrl.h @@ -0,0 +1,39 @@ +#ifndef CHECKDIRCTRL_H +#define CHECKDIRCTRL_H + +#include "checktreectrl.h" +#include "wx/dir.h" +#include "wx/filename.h" + +class DirTreeData : public wxTreeItemData +{ + wxFileName m_dirname; +public: + DirTreeData(const wxFileName &dir) : m_dirname(dir){} + virtual ~DirTreeData(){} + + const wxFileName& GetDir() const {return m_dirname;} +}; + + +class CheckDirTreeCtrl : public wxCheckTreeCtrl +{ + wxString m_root; +public: + CheckDirTreeCtrl(wxWindow *parent, const wxString &rootPath, wxWindowID id = wxID_ANY); + virtual ~CheckDirTreeCtrl(); + void GetUnselectedDirs(wxArrayString &arr); + void GetSelectedDirs(wxArrayString &arr); + void BuildTree(const wxString &rootPath); + + DECLARE_EVENT_TABLE(); + void OnItemExpading(wxTreeEvent &event); + void OnItemUnchecked(wxCheckTreeCtrlEvent &event); + void OnItemChecked(wxCheckTreeCtrlEvent &event); + +private: + void GetChildren(const wxTreeItemId &parent, const wxDir &dir, const wxString &path); + void AddChildren(const wxTreeItemId &item); +}; + +#endif //CHECKDIRCTRL_H diff --git a/LiteEditor/checktreectrl.cpp b/LiteEditor/checktreectrl.cpp new file mode 100644 index 0000000000..5d2ce41471 --- /dev/null +++ b/LiteEditor/checktreectrl.cpp @@ -0,0 +1,202 @@ +#include "checktreectrl.h" +#include +#include +#include +#include + +// Images used by the checktreectrl + +/* XPM */ +static char *Checkbox_off_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 11 1", +"$ c #F7F7F7", +"% c #FFFFFF", +". c #E7E7DE", +" c #185284", +"X c #DEDEDE", +"o c #E7E7DE", +"@ c #E7E7E7", +"O c #EFEFE7", +"+ c #EFEFEF", +"# c #F7F7EF", +"& c None", +/* pixels */ +"&&&&&&&&&&&&&&&&", +" ", +" ......XooOO+.. ", +" ....XXo@O++#.. ", +" ...XXo@O+++#.. ", +" ..Xoo@@++#$$.. ", +" ..Xo@O++#+$$.. ", +" .oo@@+++$$$$.. ", +" .o@O++#+$$%%.. ", +" .oO+++$$$$%%.. ", +" .O++#$#$$%%%.. ", +" .O++$$$$%%%%.. ", +" .+#$#$$%%%%%.. ", +" .............. ", +" ", +"&&&&&&&&&&&&&&&&" +}; + + +/* XPM */ +static char *Checkbox_on_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 10 1", +"# c #F7F7F7", +"$ c #FFFFFF", +"@ c #21A521", +" c #185284", +". c #E7E7DE", +"X c #E7E7E7", +"o c #EFEFE7", +"O c #EFEFEF", +"+ c #F7F7EF", +"& c None", +/* pixels */ +"&&&&&&&&&&&&&&&&", +" ", +" .......XooO+.. ", +" .....XXooO+O.. ", +" ....XXXOO@+#.. ", +" ...XXXoO@@##.. ", +" ...@XOO@@@##.. ", +" ..X@@O@@@##$.. ", +" .Xo@@@@@##$#.. ", +" .ooO@@@##$$$.. ", +" .oO+O@##$#$$.. ", +" .O+O###$$$$$.. ", +" .++###$$#$$$.. ", +" .............. ", +" ", +"&&&&&&&&&&&&&&&&" +}; + + +//----------------------------------------------------------- +// wxCheckTreeCtrl +//----------------------------------------------------------- + +DEFINE_EVENT_TYPE(wxEVT_CKTR_ITEM_SELECTED) +DEFINE_EVENT_TYPE(wxEVT_CKTR_ITEM_UNSELECTED) + +BEGIN_EVENT_TABLE(wxCheckTreeCtrl, wxTreeCtrl) +EVT_LEFT_DOWN(wxCheckTreeCtrl::OnLeftDown) +EVT_LEFT_DCLICK(wxCheckTreeCtrl::OnLeftDown) +END_EVENT_TABLE() + +wxCheckTreeCtrl::wxCheckTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) +: m_checkedBmp(16, 16) +, m_uncheckedBmp(16, 16) +{ + Create(parent, id, pos, size, style | wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, validator, name); + //create images + m_checkedBmp = wxBitmap(Checkbox_on_xpm); + m_uncheckedBmp = wxBitmap(Checkbox_off_xpm); + + //create an image list and assign it + wxImageList *il = new wxImageList(16, 16, true); + il->Add(m_checkedBmp); //0 + il->Add(m_uncheckedBmp); //1 + + //will be owned by the control + AssignImageList(il); +} + +wxCheckTreeCtrl::~wxCheckTreeCtrl() +{ +} + +wxTreeItemId wxCheckTreeCtrl::AddRoot(const wxString& text, bool checked, wxTreeItemData* data) +{ + return wxTreeCtrl::AddRoot(text, checked ? 0 : 1, checked ? 0 : 1, data); +} + +wxTreeItemId wxCheckTreeCtrl::AppendItem(const wxTreeItemId& parent, const wxString& text, bool checked, wxTreeItemData* data) +{ + return wxTreeCtrl::AppendItem(parent, text, checked ? 0 : 1, checked ? 0 : 1, data); +} + +void wxCheckTreeCtrl::OnLeftDown(wxMouseEvent &event) +{ + int flags; + wxTreeItemId item = wxTreeCtrl::HitTest(event.GetPosition(), flags); + if(item.IsOk() && flags & wxTREE_HITTEST_ONITEMICON){ + if(IsChecked(item)){ + //fire unselect event + wxCheckTreeCtrlEvent e(wxEVT_CKTR_ITEM_UNSELECTED, GetId()); + e.SetItem(item); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); + + //Veto? + if(!e.IsAllowed()){ + return; + } + Check(item, false); + + }else{ + //fire select event + wxCheckTreeCtrlEvent e(wxEVT_CKTR_ITEM_SELECTED, GetId()); + e.SetItem(item); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); + + //Veto? + if(!e.IsAllowed()){ + return; + } + Check(item, true); + } + return; + } + event.Skip(); +} + +bool wxCheckTreeCtrl::IsChecked(const wxTreeItemId &item) const +{ + int imgId = GetItemImage(item); + return imgId == 0; +} + +void wxCheckTreeCtrl::Check(const wxTreeItemId &item, bool check) +{ + if(check){ + SetItemImage(item, 0); + SetItemImage(item, 0, wxTreeItemIcon_Selected); + }else{ + SetItemImage(item, 1); + SetItemImage(item, 1, wxTreeItemIcon_Selected); + } +} + +void wxCheckTreeCtrl::GetItemChildrenRecursive(const wxTreeItemId &parent, std::list &children) +{ + //delete the item's children + wxTreeItemIdValue cookie; + children.push_back(parent); + wxTreeItemId child = GetFirstChild(parent, cookie); + while(child.IsOk()) + { + if(ItemHasChildren(child)){ + GetItemChildrenRecursive(child, children); + }else{ + children.push_back(child); + } + child = GetNextChild(parent, cookie); + } +} + +void wxCheckTreeCtrl::RecursiveCheck(const wxTreeItemId &item, bool check) +{ + std::list children; + GetItemChildrenRecursive(item, children); + + std::list::iterator iter = children.begin(); + for(; iter != children.end(); iter++) + { + Check((*iter), check); + } +} diff --git a/LiteEditor/checktreectrl.h b/LiteEditor/checktreectrl.h new file mode 100644 index 0000000000..bb431d71d4 --- /dev/null +++ b/LiteEditor/checktreectrl.h @@ -0,0 +1,72 @@ +#ifndef CHECKTREECTRL_H +#define CHECKTREECTRL_H + +#include +#include +#include "list" + +class wxCheckTreeCtrl : public wxTreeCtrl +{ + wxBitmap m_checkedBmp; + wxBitmap m_uncheckedBmp; + +protected: + void GetItemChildrenRecursive(const wxTreeItemId &parent, std::list &children); + +public: + wxCheckTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxT("treeCtrl")); + virtual ~wxCheckTreeCtrl(); + + //override item managements functions + wxTreeItemId AddRoot(const wxString& text, bool checked, wxTreeItemData* data = NULL); + wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, bool checked, wxTreeItemData* data = NULL); + + bool IsChecked(const wxTreeItemId& item) const; + void Check(const wxTreeItemId& item, bool check = true); + void RecursiveCheck(const wxTreeItemId &item, bool check = true); + + DECLARE_EVENT_TABLE(); + virtual void OnLeftDown(wxMouseEvent &event); +}; + +/** + * \brief Holds information about events associated with wxCheckTreeCtrl objects + * This event is fired when an item is (un)selected. use the: + * \code + * EVT_CHECKTREE_ITEM_SELECTED() //wxEVT_CKTR_ITEM_SELECTED + * EVT_CHECKTREE_ITEM_UNSELECTED() //wxEVT_CKTR_ITEM_UNSELECTED + * \code + * macros to handle them. + */ +class wxCheckTreeCtrlEvent : public wxNotifyEvent +{ + wxTreeItemId m_item; + +public: + /** + * \param commandType - event type + * \param winid - window ID + */ + wxCheckTreeCtrlEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) : wxNotifyEvent(commandType, winid){} + virtual ~wxCheckTreeCtrlEvent(){} + + void SetItem(const wxTreeItemId &item) { m_item = item; } + const wxTreeItemId& GetItem() const{ return m_item; } +}; + +extern const wxEventType wxEVT_CKTR_ITEM_UNSELECTED; +extern const wxEventType wxEVT_CKTR_ITEM_SELECTED; + +typedef void (wxEvtHandler::*wxCheckTreeCtrlEventFunction)(wxCheckTreeCtrlEvent&); + +#define wxCheckTreeCtrlEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCheckTreeCtrlEventFunction, &func) + +#define EVT_CHECKTREE_ITEM_SELECTED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_CKTR_ITEM_SELECTED, winid, wxCheckTreeCtrlEventHandler(fn)) + +#define EVT_CHECKTREE_ITEM_UNSELECTED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_CKTR_ITEM_UNSELECTED, winid, wxCheckTreeCtrlEventHandler(fn)) + +#endif //CHECKTREECTRL_H + diff --git a/LiteEditor/close_all_dlg.cpp b/LiteEditor/close_all_dlg.cpp new file mode 100644 index 0000000000..53dc8fac56 --- /dev/null +++ b/LiteEditor/close_all_dlg.cpp @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "close_all_dlg.h" +#include "macros.h" + +/////////////////////////////////////////////////////////////////////////// + +CloseAllDialog::CloseAllDialog( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* panelSizer; + panelSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticMsg = new wxStaticText( m_mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + panelSizer->Add( m_staticMsg, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + wxBoxSizer* buttonSizer; + buttonSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonSave = new wxButton( m_mainPanel, wxID_ANY, wxT("Ask me for each file"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonSave, 0, wxALL, 5 ); + + m_buttonSaveAllFiles = new wxButton( m_mainPanel, wxID_ANY, wxT("Save all files"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonSaveAllFiles, 0, wxALL, 5 ); + + m_buttonDiscardChangesForAllFiles = new wxButton( m_mainPanel, wxID_ANY, wxT("Discard changes for all files"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonDiscardChangesForAllFiles, 0, wxALL, 5 ); + + panelSizer->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + m_mainPanel->SetSizer( panelSizer ); + m_mainPanel->Layout(); + panelSizer->Fit( m_mainPanel ); + mainSizer->Add( m_mainPanel, 1, wxEXPAND | wxALL, 5 ); + + m_staticMsg->SetLabel(wxT("Some of the files are modified, what action should CodeLite take?")); + this->SetSizer( mainSizer ); + this->Layout(); + mainSizer->Fit(this); + + ConnectButton(m_buttonDiscardChangesForAllFiles, CloseAllDialog::OnDiscardAllClicked); + ConnectButton(m_buttonSaveAllFiles, CloseAllDialog::OnSaveAll); + ConnectButton(m_buttonSave, CloseAllDialog::OnAskForEachFile); +} + +void CloseAllDialog::OnDiscardAllClicked(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(CLOSEALL_DISCARDALL); +} + +void CloseAllDialog::OnSaveAll(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(CLOSEALL_SAVEALL); +} + +void CloseAllDialog::OnAskForEachFile(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(CLOSEALL_ASKFOREACHFILE); +} diff --git a/LiteEditor/close_all_dlg.h b/LiteEditor/close_all_dlg.h new file mode 100644 index 0000000000..ead6001c21 --- /dev/null +++ b/LiteEditor/close_all_dlg.h @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __close_all_dlg__ +#define __close_all_dlg__ + +#include + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +enum { + CLOSEALL_SAVEALL, + CLOSEALL_DISCARDALL, + CLOSEALL_ASKFOREACHFILE +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class CloseAllDialog +/////////////////////////////////////////////////////////////////////////////// +class CloseAllDialog : public wxDialog +{ +private: + +protected: + wxPanel* m_mainPanel; + wxStaticText* m_staticMsg; + wxButton* m_buttonSave; + wxButton* m_buttonSaveAllFiles; + wxButton* m_buttonDiscardChangesForAllFiles; + + void OnDiscardAllClicked(wxCommandEvent &event); + void OnSaveAll(wxCommandEvent &event); + void OnAskForEachFile(wxCommandEvent &event); + +public: + CloseAllDialog( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Close All"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 424,127 ), int style = wxDEFAULT_DIALOG_STYLE ); +}; + +#endif //__close_all_dlg__ diff --git a/LiteEditor/code_parser.rc b/LiteEditor/code_parser.rc new file mode 100644 index 0000000000..2b667a48e5 --- /dev/null +++ b/LiteEditor/code_parser.rc @@ -0,0 +1,49 @@ +aaaaa ICON "res/cubes.ico" + + + +#include "wx/msw/rcdefs.h" + + +////////////////////////////////////////////////////////////////////////////// +// +// Manifest file for Windows XP +// + +#if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) +#if !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130 + +// see "about isolated applications" topic in MSDN +#ifdef ISOLATION_AWARE_ENABLED +#define wxMANIFEST_ID 2 +#else +#define wxMANIFEST_ID 1 +#endif + +#if defined(WX_CPU_AMD64) +wxMANIFEST_ID 24 "wx/msw/amd64.manifest" +#elif defined(WX_CPU_IA64) +wxMANIFEST_ID 24 "wx/msw/ia64.manifest" +#elif defined(WX_CPU_X86) +wxMANIFEST_ID 24 "wx/msw/wx.manifest" +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// Standard wxWindows Cursors +// +WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur" +WXCURSOR_BULLSEYE CURSOR DISCARDABLE "wx/msw/bullseye.cur" +WXCURSOR_PENCIL CURSOR DISCARDABLE "wx/msw/pencil.cur" +WXCURSOR_MAGNIFIER CURSOR DISCARDABLE "wx/msw/magnif1.cur" +WXCURSOR_ROLLER CURSOR DISCARDABLE "wx/msw/roller.cur" +WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur" +WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur" +WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur" +WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur" +WXCURSOR_RIGHT_ARROW CURSOR DISCARDABLE "wx/msw/rightarr.cur" +WXCURSOR_CROSS CURSOR DISCARDABLE "wx/msw/cross.cur" + +#endif // !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130 +#endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) + diff --git a/LiteEditor/compiler_page.cpp b/LiteEditor/compiler_page.cpp new file mode 100644 index 0000000000..abd1560231 --- /dev/null +++ b/LiteEditor/compiler_page.cpp @@ -0,0 +1,297 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "compiler_page.h" +#include "macros.h" +#include "editor_config.h" +#include "build_settings_config.h" + +CompilerPage::CompilerPage( wxWindow* parent, wxString name, int id, wxPoint pos, wxSize size, int style ) +: wxScrolledWindow( parent, id, pos, size, style ) +, m_cmpname(name) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sbSizer5; + sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("Compiler Error Pattern:") ), wxVERTICAL ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("Regex Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + sbSizer5->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textErrorPattern = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer5->Add( m_textErrorPattern, 0, wxEXPAND|wxALL, 5 ); + + m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("File Index in Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6->Wrap( -1 ); + sbSizer5->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textErrorFileIndex = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer5->Add( m_textErrorFileIndex, 0, wxEXPAND|wxALL, 5 ); + + m_staticText7 = new wxStaticText( this, wxID_ANY, wxT("Line Number in Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7->Wrap( -1 ); + sbSizer5->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textErrorLineNumber = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer5->Add( m_textErrorLineNumber, 0, wxEXPAND|wxALL, 5 ); + + bSizer11->Add( sbSizer5, 1, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer4; + sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("Compiler Warning Pattern:") ), wxVERTICAL ); + + m_staticText51 = new wxStaticText( this, wxID_ANY, wxT("Regex Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText51->Wrap( -1 ); + sbSizer4->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textWarnPattern = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer4->Add( m_textWarnPattern, 0, wxEXPAND|wxALL, 5 ); + + m_staticText61 = new wxStaticText( this, wxID_ANY, wxT("File Index in Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText61->Wrap( -1 ); + sbSizer4->Add( m_staticText61, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textWarnFileIndex = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer4->Add( m_textWarnFileIndex, 0, wxEXPAND|wxALL, 5 ); + + m_staticText71 = new wxStaticText( this, wxID_ANY, wxT("Line Number in Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText71->Wrap( -1 ); + sbSizer4->Add( m_staticText71, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textWarnLineNumber = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer4->Add( m_textWarnLineNumber, 0, wxEXPAND|wxALL, 5 ); + + bSizer11->Add( sbSizer4, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); + + mainSizer->Add( bSizer11, 0, wxALL|wxEXPAND, 0 ); + + wxStaticBoxSizer* sbSizer41; + sbSizer41 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("Tools:") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 3, 4, 0, 0 ); + fgSizer4->AddGrowableCol( 1 ); + fgSizer4->AddGrowableCol( 3 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, wxT("Compiler Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizer4->Add( m_staticText9, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCompilerName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textCompilerName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText11 = new wxStaticText( this, wxID_ANY, wxT("Linker Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + fgSizer4->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textLinkerName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textLinkerName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("Shared Object Linker:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + fgSizer4->Add( m_staticText12, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textSOLinker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textSOLinker, 0, wxALL|wxEXPAND, 5 ); + + m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("Archive Tool:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + fgSizer4->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textArchiveTool = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textArchiveTool, 0, wxALL|wxEXPAND, 5 ); + + m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("Resource Compiler:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText14->Wrap( -1 ); + fgSizer4->Add( m_staticText14, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textResourceCmp = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textResourceCmp, 0, wxALL|wxEXPAND, 5 ); + + sbSizer41->Add( fgSizer4, 1, wxEXPAND, 5 ); + + mainSizer->Add( sbSizer41, 0, wxALL|wxEXPAND, 5 ); + + m_staticText8 = new wxStaticText( this, wxID_ANY, wxT("Switches:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( -1 ); + mainSizer->Add( m_staticText8, 0, wxALL, 5 ); + + m_listSwitches = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT ); + mainSizer->Add( m_listSwitches, 1, wxEXPAND|wxALL, 5 ); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Object extesion:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textObjectExtension = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_textObjectExtension, 1, wxALL|wxEXPAND, 5 ); + + mainSizer->Add( fgSizer2, 0, wxALL|wxEXPAND, 0 ); + + this->SetSizer( mainSizer ); + this->Layout(); + CustomInitialize(); +} + +void CompilerPage::CustomInitialize() +{ + //load the compiler from the configuration file + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(m_cmpname); + m_textObjectExtension->SetValue(cmp->GetObjectSuffix()); + m_textErrorPattern->SetValue(cmp->GetErrPattern()); + m_textErrorFileIndex->SetValue(cmp->GetErrFileNameIndex()); + m_textErrorLineNumber->SetValue(cmp->GetErrLineNumberIndex()); + m_textWarnPattern->SetValue(cmp->GetWarnPattern()); + m_textWarnFileIndex->SetValue(cmp->GetWarnFileNameIndex()); + m_textWarnLineNumber->SetValue(cmp->GetWarnLineNumberIndex()); + m_textArchiveTool->SetValue(cmp->GetTool(wxT("ArchiveTool"))); + m_textCompilerName->SetValue(cmp->GetTool(wxT("CompilerName"))); + m_textLinkerName->SetValue(cmp->GetTool(wxT("LinkerName"))); + m_textSOLinker->SetValue(cmp->GetTool(wxT("SharedObjectLinkerName"))); + m_textResourceCmp->SetValue(cmp->GetTool(wxT("ResourceCompiler"))); + InitSwitches(); + ConnectEvents(); +} + +void CompilerPage::Save() +{ + //load the compiler from the configuration file + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(m_cmpname); + cmp->SetErrPattern(m_textErrorPattern->GetValue()); + cmp->SetErrFileNameIndex(m_textErrorFileIndex->GetValue()); + cmp->SetErrLineNumberIndex(m_textErrorLineNumber->GetValue()); + cmp->SetWarnPattern(m_textWarnPattern->GetValue()); + cmp->SetWarnFileNameIndex(m_textWarnFileIndex->GetValue()); + cmp->SetWarnLineNumberIndex(m_textWarnLineNumber->GetValue()); + cmp->SetObjectSuffix(m_textObjectExtension->GetValue()); + cmp->SetTool(wxT("ArchiveTool"), m_textArchiveTool->GetValue()); + cmp->SetTool(wxT("CompilerName"), m_textCompilerName->GetValue()); + cmp->SetTool(wxT("LinkerName"), m_textLinkerName->GetValue()); + cmp->SetTool(wxT("SharedObjectLinkerName"), m_textSOLinker->GetValue()); + cmp->SetTool(wxT("ResourceCompiler"), m_textResourceCmp->GetValue()); + BuildSettingsConfigST::Get()->SetCompiler(cmp);//save changes +} + +void CompilerPage::AddSwitch(const wxString &name, const wxString &value, bool choose) +{ + wxListItem info; + info.SetText(name); + info.SetColumn(0); + if(choose == true){ + info.SetState(wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED); + m_selSwitchName = name; + m_selSwitchValue = value; + } + long item = m_listSwitches->InsertItem(info); + + info.SetColumn(1); + info.SetId(item); + info.SetText(value); + info.SetState(0); + m_listSwitches->SetItem(info); +} + +void CompilerPage::ConnectEvents() +{ + ConnectListCtrlItemActivated(m_listSwitches, CompilerPage::OnItemActivated); + ConnectListCtrlItemSelected(m_listSwitches, CompilerPage::OnItemSelected); +} + +void CompilerPage::OnItemActivated(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listSwitches->GetItem(info) ){ + m_selSwitchName = info.m_text; + } + + info.m_col = 1;//value + if( m_listSwitches->GetItem(info)){ + m_selSwitchValue = info.m_text; + } + EditSwitch(); +} + +void CompilerPage::OnItemSelected(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listSwitches->GetItem(info) ){ + m_selSwitchName = info.m_text; + } + + info.m_col = 1;//value + if( m_listSwitches->GetItem(info)){ + m_selSwitchValue = info.m_text; + } +} + +void CompilerPage::InitSwitches() +{ + //insert columns: + m_listSwitches->Freeze(); + m_listSwitches->ClearAll(); + m_listSwitches->InsertColumn(0, wxT("Name")); + m_listSwitches->InsertColumn(1, wxT("Value")); + + //populate the list control + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(m_cmpname); + Compiler::ConstIterator iter = cmp->SwitchesBegin(); + for(; iter != cmp->SwitchesEnd(); iter++){ + AddSwitch(iter->first, iter->second, iter == cmp->SwitchesBegin()); + } + m_listSwitches->Thaw(); +} + +void CompilerPage::EditSwitch() +{ + wxString message; + message << m_selSwitchName << wxT(" switch:"); + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, message, wxT("Edit"), m_selSwitchValue); + if(dlg->ShowModal() == wxID_OK){ + wxString newVal = dlg->GetValue(); + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(m_cmpname); + cmp->SetSwitch(m_selSwitchName, dlg->GetValue()); + BuildSettingsConfigST::Get()->SetCompiler(cmp); + InitSwitches(); + } + dlg->Destroy(); +} + diff --git a/LiteEditor/compiler_page.h b/LiteEditor/compiler_page.h new file mode 100644 index 0000000000..dd72c48ae3 --- /dev/null +++ b/LiteEditor/compiler_page.h @@ -0,0 +1,72 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __compiler_page__ +#define __compiler_page__ + +#include + +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class CompilerPage +/////////////////////////////////////////////////////////////////////////////// +class CompilerPage : public wxScrolledWindow +{ +protected: + wxStaticText* m_staticText5; + wxTextCtrl* m_textErrorPattern; + wxStaticText* m_staticText6; + wxTextCtrl* m_textErrorFileIndex; + wxStaticText* m_staticText7; + wxTextCtrl* m_textErrorLineNumber; + wxStaticText* m_staticText51; + wxTextCtrl* m_textWarnPattern; + wxStaticText* m_staticText61; + wxTextCtrl* m_textWarnFileIndex; + wxStaticText* m_staticText71; + wxTextCtrl* m_textWarnLineNumber; + wxStaticText* m_staticText9; + wxTextCtrl* m_textCompilerName; + wxStaticText* m_staticText11; + wxTextCtrl* m_textLinkerName; + wxStaticText* m_staticText12; + wxTextCtrl* m_textSOLinker; + wxStaticText* m_staticText10; + wxTextCtrl* m_textArchiveTool; + wxStaticText* m_staticText14; + wxTextCtrl* m_textResourceCmp; + wxStaticText* m_staticText8; + wxListCtrl* m_listSwitches; + wxStaticText* m_staticText3; + wxTextCtrl* m_textObjectExtension; + + wxString m_selSwitchName ; + wxString m_selSwitchValue; + wxString m_cmpname; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemActivated( wxListEvent& event ); + virtual void OnItemSelected( wxListEvent& event ); + + void EditSwitch(); + void InitSwitches(); + void CustomInitialize(); + void ConnectEvents(); + void AddSwitch(const wxString &name, const wxString &value, bool choose); + + +public: + CompilerPage( wxWindow* parent, wxString name, int id = wxID_ANY, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 732,409 ), int style = wxTAB_TRAVERSAL ); + void Save(); + +}; + +#endif //__compiler_page__ diff --git a/LiteEditor/configuration_manager_base_dlg.cpp b/LiteEditor/configuration_manager_base_dlg.cpp new file mode 100644 index 0000000000..9487d8c1fb --- /dev/null +++ b/LiteEditor/configuration_manager_base_dlg.cpp @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "configuration_manager_base_dlg.h" + +/////////////////////////////////////////////////////////////////////////// + +ConfigManagerBaseDlg::ConfigManagerBaseDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Workspace Configuration:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer6->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceConfigurationsChoices; + m_choiceConfigurations = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceConfigurationsChoices, 0 ); + bSizer6->Add( m_choiceConfigurations, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( bSizer6, 0, wxEXPAND, 5 ); + + m_staticline6 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline6, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_staticText20 = new wxStaticText( this, wxID_ANY, wxT("Available project configurations:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20->Wrap( -1 ); + bSizer1->Add( m_staticText20, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxEmptyString ), wxVERTICAL ); + + m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxVSCROLL|wxWANTS_CHARS ); + m_scrolledWindow->SetScrollRate( 5, 5 ); + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 100, 2, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_scrolledWindow->SetSizer( fgSizer2 ); + m_scrolledWindow->Layout(); + fgSizer2->Fit( m_scrolledWindow ); + sbSizer2->Add( m_scrolledWindow, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( sbSizer2, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer4->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonCancel, 0, wxALL, 5 ); + + m_buttonApply = new wxButton( this, wxID_ANY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonApply, 0, wxALL, 5 ); + + bSizer1->Add( bSizer4, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} diff --git a/LiteEditor/configuration_manager_base_dlg.h b/LiteEditor/configuration_manager_base_dlg.h new file mode 100644 index 0000000000..2edd226572 --- /dev/null +++ b/LiteEditor/configuration_manager_base_dlg.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __configuration_manager_base_dlg__ +#define __configuration_manager_base_dlg__ + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ConfigManagerBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class ConfigManagerBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText2; + wxChoice* m_choiceConfigurations; + wxStaticLine* m_staticline6; + wxStaticText* m_staticText20; + wxScrolledWindow* m_scrolledWindow; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + wxButton* m_buttonApply; + + public: + ConfigManagerBaseDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Configuration Manager"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 726,425 ), int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + +}; + +#endif //__configuration_manager_base_dlg__ diff --git a/LiteEditor/configuration_manager_dlg.cpp b/LiteEditor/configuration_manager_dlg.cpp new file mode 100644 index 0000000000..6ede067513 --- /dev/null +++ b/LiteEditor/configuration_manager_dlg.cpp @@ -0,0 +1,307 @@ +#include "configuration_manager_dlg.h" +#include "manager.h" +#include "new_configuration_dlg.h" +#include "edit_configuration.h" +#include "edit_workspace_conf_dlg.h" +#include "macros.h" + +//---------------------------------------------------------------------------- +// Configuration Manager +//---------------------------------------------------------------------------- + + +ConfigurationManagerDlg::ConfigurationManagerDlg( wxWindow* parent ) +: +ConfigManagerBaseDlg( parent ) +{ + PopulateConfigurations(); + InitDialog(); +} + + +void ConfigurationManagerDlg::AddEntry(const wxString &projectName, const wxString &selectedConf) +{ + wxFlexGridSizer *mainSizer = dynamic_cast(m_scrolledWindow->GetSizer()); + if(!mainSizer) return; + + wxArrayString choices; + wxChoice *choiceConfig = new wxChoice( m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices, 0 ); + + // Get all configuration of the project + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(projectName); + if(settings){ + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); + while(bldConf){ + choiceConfig->Append(bldConf->GetName()); + bldConf = settings->GetNextBuildConfiguration(cookie); + } + } + choiceConfig->Append(clCMD_NEW); + choiceConfig->Append(clCMD_EDIT); + ConnectChoice(choiceConfig, ConfigurationManagerDlg::OnConfigSelected); + wxStaticText *text = new wxStaticText( m_scrolledWindow, wxID_ANY, projectName, wxDefaultPosition, wxDefaultSize, 0 ); + + int where = choiceConfig->FindString(selectedConf); + if(where == wxNOT_FOUND){ + where = 0; + } + choiceConfig->SetSelection(where); + mainSizer->Add(text, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5); + mainSizer->Add(choiceConfig, 1, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + + ConfigEntry entry; + entry.project = projectName; + entry.projectSettings = settings; + entry.choiceControl = choiceConfig; + + m_projSettingsMap[choiceConfig->GetId()] = entry; +} + +void ConfigurationManagerDlg::PopulateConfigurations() +{ + //popuplate the configurations + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + if(!matrix){ + return; + } + + wxFlexGridSizer *mainSizer = dynamic_cast(m_scrolledWindow->GetSizer()); + if(!mainSizer) return; + + Freeze(); + // remove old entries from the configuration table + wxSizerItemList list = mainSizer->GetChildren(); + for ( wxSizerItemList::Node *node = list.GetFirst(); node; node = node->GetNext() ){ + wxSizerItem *current = node->GetData(); + current->GetWindow()->Destroy(); + } + m_projSettingsMap.clear(); + + std::list configs = matrix->GetConfigurations(); + std::list::iterator iter = configs.begin(); + + m_choiceConfigurations->Clear(); + for(; iter != configs.end(); iter++){ + m_choiceConfigurations->Append((*iter)->GetName()); + } + + // append the 'New' & 'Delete' commands + m_choiceConfigurations->Append(clCMD_NEW); + m_choiceConfigurations->Append(clCMD_EDIT); + + int sel = m_choiceConfigurations->FindString(matrix->GetSelectedConfigurationName()); + if(sel != wxNOT_FOUND){ + m_choiceConfigurations->SetSelection(sel); + }else if(m_choiceConfigurations->GetCount() > 2){ + m_choiceConfigurations->SetSelection(2); + }else{ + m_choiceConfigurations->Append(wxT("Debug")); + m_choiceConfigurations->SetSelection(2); + } + + wxArrayString projects; + ManagerST::Get()->GetProjectList(projects); + + for(size_t i=0; iGetProjectSelectedConf(matrix->GetSelectedConfigurationName(), projects.Item(i)); + AddEntry(projects.Item(i), selConf); + } + + mainSizer->Fit(m_scrolledWindow); + Layout(); + Thaw(); +} + +void ConfigurationManagerDlg::LoadWorkspaceConfiguration(const wxString &confName) +{ + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + if(!matrix){ + return; + } + + m_choiceConfigurations->SetStringSelection(confName); + std::map::iterator iter = m_projSettingsMap.begin(); + for(; iter != m_projSettingsMap.end(); iter++){ + wxString selConf = matrix->GetProjectSelectedConf(confName, iter->second.project); + iter->second.choiceControl->SetStringSelection(selConf); + } +} + +void ConfigurationManagerDlg::LoadProjectConfiguration(const wxString &projectName) +{ + std::map::iterator iter = m_projSettingsMap.begin(); + for(; iter != m_projSettingsMap.end(); iter++){ + if(iter->second.project == projectName){ + iter->second.choiceControl->Clear(); + + ProjectSettingsPtr proSet = ManagerST::Get()->GetProjectSettings(projectName); + if(proSet){ + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = proSet->GetFirstBuildConfiguration(cookie); + while(bldConf){ + iter->second.choiceControl->Append(bldConf->GetName()); + bldConf = proSet->GetNextBuildConfiguration(cookie); + } + + //append the EDIT & NEW commands + iter->second.choiceControl->Append(clCMD_EDIT); + iter->second.choiceControl->Append(clCMD_NEW); + + //select the build configuration according to the build matrix + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + if(!matrix){ + return; + } + + wxString configName = matrix->GetProjectSelectedConf(m_choiceConfigurations->GetStringSelection(), projectName); + int match = iter->second.choiceControl->FindString(configName); + if(match != wxNOT_FOUND){ + iter->second.choiceControl->SetStringSelection(configName); + }else{ + iter->second.choiceControl->SetSelection(0); + } + + return; + } + } + } +} + +void ConfigurationManagerDlg::InitDialog() +{ + // Connect events + ConnectButton(m_buttonOK, ConfigurationManagerDlg::OnButtonOK); + ConnectButton(m_buttonApply, ConfigurationManagerDlg::OnButtonApply); + ConnectChoice(m_choiceConfigurations, ConfigurationManagerDlg::OnWorkspaceConfigSelected); +} + +void ConfigurationManagerDlg::OnWorkspaceConfigSelected(wxCommandEvent &event) +{ + if(event.GetString() == clCMD_NEW){ + OnButtonNew(event); + }else if(event.GetString() == clCMD_EDIT){ + //popup the delete dialog for configurations + EditWorkspaceConfDlg *dlg = new EditWorkspaceConfDlg(this); + dlg->ShowModal(); + dlg->Destroy(); + + //once done, restore dialog + PopulateConfigurations(); + }else{ + LoadWorkspaceConfiguration(event.GetString()); + } +} + +void ConfigurationManagerDlg::OnConfigSelected(wxCommandEvent &event) +{ + std::map::iterator iter = m_projSettingsMap.find(event.GetId()); + if(iter == m_projSettingsMap.end()) + return; + + wxString selection = event.GetString(); + if(selection == clCMD_NEW){ + // popup the 'New Configuration' dialog + NewConfigurationDlg *dlg = new NewConfigurationDlg(this, iter->second.project); + dlg->ShowModal(); + dlg->Destroy(); + + // repopulate the configurations + LoadProjectConfiguration(iter->second.project); + + }else if(selection == clCMD_EDIT){ + EditConfigurationDialog *dlg = new EditConfigurationDialog(this, iter->second.project); + dlg->ShowModal(); + dlg->Destroy(); + + // repopulate the configurations + LoadProjectConfiguration(iter->second.project); + + }else{ + // do nothing + } +} + +void ConfigurationManagerDlg::OnButtonNew(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, wxT("Enter New Configuration Name:"), wxT("New Configuration")); + if(dlg->ShowModal() == wxID_OK){ + wxString value = dlg->GetValue(); + TrimString(value); + if(value.IsEmpty() == false){ + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + if(!matrix){ + return; + } + + WorkspaceConfigurationPtr conf(new WorkspaceConfiguration(NULL)); + conf->SetName(value); + conf->SetConfigMappingList(GetCurrentSettings()); + matrix->SetConfiguration(conf); + //save changes + ManagerST::Get()->SetWorkspaceBuildMatrix(matrix); + } + } + PopulateConfigurations(); + dlg->Destroy(); +} + +void ConfigurationManagerDlg::OnButtonApply(wxCommandEvent &event) +{ + wxUnusedVar(event); + SaveCurrentSettings(); + ManagerST::Get()->DoUpdateConfigChoiceControl(); +} + + +WorkspaceConfiguration::ConfigMappingList ConfigurationManagerDlg::GetCurrentSettings() +{ + //return the current settings as described by the dialog + WorkspaceConfiguration::ConfigMappingList list; + + std::map::iterator iter = m_projSettingsMap.begin(); + for(; iter != m_projSettingsMap.end(); iter++){ + + wxString value = iter->second.choiceControl->GetStringSelection(); + if(value != clCMD_NEW && value != clCMD_EDIT){ + ConfigMappingEntry entry(iter->second.project, value); + list.push_back(entry); + } + } + return list; +} + +void ConfigurationManagerDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + SaveCurrentSettings(); + ManagerST::Get()->DoUpdateConfigChoiceControl(); + EndModal(wxID_OK); +} + +void ConfigurationManagerDlg::SaveCurrentSettings() +{ + wxString sel = m_choiceConfigurations->GetStringSelection(); + TrimString(sel); + + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + if(!matrix){ + return; + } + + matrix->SetSelectedConfigurationName(sel); + + WorkspaceConfigurationPtr conf = matrix->GetConfigurationByName(sel); + if(!conf){ + //create new configuration + conf = new WorkspaceConfiguration(NULL); + conf->SetName(sel); + matrix->SetConfiguration(conf); + } + + conf->SetConfigMappingList(GetCurrentSettings()); + + //save changes + ManagerST::Get()->SetWorkspaceBuildMatrix(matrix); +} diff --git a/LiteEditor/configuration_manager_dlg.h b/LiteEditor/configuration_manager_dlg.h new file mode 100644 index 0000000000..2caa68e71a --- /dev/null +++ b/LiteEditor/configuration_manager_dlg.h @@ -0,0 +1,52 @@ +#ifndef __configuration_manager_dlg__ +#define __configuration_manager_dlg__ + +/** +@file +Subclass of ConfigManagerBaseDlg, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "configuration_manager_base_dlg.h" +#include "smart_ptr.h" +#include +#include "project_settings.h" +#include "configuration_mapping.h" + +class ConfigEntry { +public: + ProjectSettingsPtr projectSettings; + wxString project; + wxChoice *choiceControl; +}; + +/** Implementing ConfigManagerBaseDlg */ +class ConfigurationManagerDlg : public ConfigManagerBaseDlg +{ + std::map m_projSettingsMap; + +protected: + void InitDialog(); + + //---------------------------------- + // Events + //---------------------------------- + void OnButtonNew(wxCommandEvent &event); + void OnButtonOK(wxCommandEvent &event); + void OnConfigSelected(wxCommandEvent &event); + void OnWorkspaceConfigSelected(wxCommandEvent &event); + void OnButtonApply(wxCommandEvent &event); + void LoadWorkspaceConfiguration(const wxString &confName); + void LoadProjectConfiguration(const wxString &projectName); + + void PopulateConfigurations(); + void AddEntry(const wxString &projectName, const wxString &selectedConf); + WorkspaceConfiguration::ConfigMappingList GetCurrentSettings(); + void SaveCurrentSettings(); + +public: + /** Constructor */ + ConfigurationManagerDlg( wxWindow* parent ); +}; + +#endif // __configuration_manager_dlg__ diff --git a/LiteEditor/context_base.cpp b/LiteEditor/context_base.cpp new file mode 100644 index 0000000000..415f093556 --- /dev/null +++ b/LiteEditor/context_base.cpp @@ -0,0 +1,39 @@ +#include "context_base.h" +#include +#include "editor_config.h" +#include "editor.h" + +ContextBase::ContextBase(LEditor *container) +: m_container(container) +, m_name(wxEmptyString) +{ +} + +ContextBase::ContextBase(const wxString &name) +: m_name(name) +{ +} + +ContextBase::~ContextBase() +{ +} + +//provide basic indentation +void ContextBase::AutoIndent(const wxChar &ch){ + if(ch == wxT('\n')){ + //just copy the previous line indentation + LEditor &rCtrl = GetCtrl(); + int indentSize = rCtrl.GetIndent(); + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPos()); + int prevLine = line - 1; + //take the previous line indentation size + int prevLineIndet = rCtrl.GetLineIndentation(prevLine); + rCtrl.SetLineIndentation(line, prevLineIndet); + //place the caret at the end of the line + int dummy = rCtrl.GetLineIndentation(line); + if(rCtrl.GetTabIndents()){ + dummy = dummy / indentSize; + } + rCtrl.SetCaretAt(rCtrl.GetCurrentPos() + dummy); + } +} diff --git a/LiteEditor/context_base.h b/LiteEditor/context_base.h new file mode 100644 index 0000000000..04b3084d21 --- /dev/null +++ b/LiteEditor/context_base.h @@ -0,0 +1,76 @@ +#ifndef CONTEXT_BASE_H +#define CONTEXT_BASE_H + +#include "wx/string.h" +#include "wx/wxscintilla.h" +#include "smart_ptr.h" +#include "wx/filename.h" + +class LEditor; + +/** + * \ingroup LiteEditor + * \brief This class defines the language context of the editor + * + * \version 1.0 + * first version + * + * \date 04-30-2007 + * + * \author Eran + * + */ +class ContextBase : public wxEvtHandler +{ +protected: + LEditor *m_container; + wxString m_name; + +protected: + void SetName(const wxString &name){m_name = name;} + +public: + + // ctor-dtor + ContextBase(LEditor *container); + ContextBase(const wxString &name); + virtual ~ContextBase(); + + /** + * Return the context parent control + */ + LEditor &GetCtrl() { return *m_container; } + + /** + * Return the context name + */ + const wxString &GetName() const { return m_name; } + + virtual void AutoIndent(const wxChar&); + // every Context derived class must implement the following methods + virtual ContextBase *NewInstance(LEditor *container) = 0; + virtual void CompleteWord() = 0; + virtual void CodeComplete() = 0; + virtual void GotoDefinition() = 0; + virtual void GotoPreviousDefintion() = 0; + virtual void CallTipCancel() = 0; + virtual bool IsCommentOrString(long WXUNUSED(pos)) = 0; + virtual void OnCallTipClick(wxScintillaEvent& WXUNUSED(event)) = 0; + + //a functions with default implementation: + virtual void OnDwellEnd(wxScintillaEvent & event){event.Skip();} + virtual void OnDbgDwellEnd(wxScintillaEvent & event){event.Skip();} + virtual void OnDwellStart(wxScintillaEvent & event){event.Skip();} + virtual void OnDbgDwellStart(wxScintillaEvent & event){event.Skip();} + virtual void OnKeyDown(wxKeyEvent &event) {event.Skip();} + virtual void AddMenuDynamicContent(wxMenu *WXUNUSED(menu)) {}; + virtual void RemoveMenuDynamicContent(wxMenu *WXUNUSED(menu)) {}; + virtual void OnSciUpdateUI(wxScintillaEvent& WXUNUSED(event)){} + + //override this method if you wish to provide context based right click menu + virtual wxMenu *GetMenu() {return NULL;} +}; + +typedef SmartPtr ContextBasePtr; +#endif // CONTEXT_BASE_H + diff --git a/LiteEditor/context_cpp.cpp b/LiteEditor/context_cpp.cpp new file mode 100644 index 0000000000..e05e2b9790 --- /dev/null +++ b/LiteEditor/context_cpp.cpp @@ -0,0 +1,1707 @@ +#include "precompiled_header.h" +#include "movefuncimpldlg.h" +#include "context_cpp.h" +#include "editor.h" +#include "ctags_manager.h" +#include "manager.h" +#include "symbols_dialog.h" +#include "editor_config.h" +#include "wx/xrc/xmlres.h" +#include "algorithm" +#include "language.h" +#include "browse_record.h" +#include "wx/tokenzr.h" +#include "setters_getters_dlg.h" +#include "navigationmanager.h" +#include "wx/regex.h" +#include +#include "frame.h" +#include "debuggermanager.h" +#include "addincludefiledlg.h" + +static bool IsSource(const wxString &ext) +{ + wxString e(ext); + e = e.MakeLower(); + return e == wxT("cpp") || e == wxT("cxx") || e == wxT("c") || e == wxT("c++") || e == wxT("cc"); +} + +static bool IsHeader(const wxString &ext) +{ + wxString e(ext); + e = e.MakeLower(); + return e == wxT("hpp") || e == wxT("h") || e == wxT("hxx"); +} + +#define VALIDATE_PROJECT(ctrl)\ + if(ctrl.GetProject().IsEmpty())\ + {\ + return;\ + } + +struct SFileSort { + bool operator()(const wxFileName &one, const wxFileName &two) { + return two.GetFullName().Cmp(one.GetFullName()) > 0; + } +}; + +//Images initialization +wxBitmap ContextCpp::m_classBmp = wxNullBitmap; +wxBitmap ContextCpp::m_structBmp = wxNullBitmap; +wxBitmap ContextCpp::m_namespaceBmp = wxNullBitmap; +wxBitmap ContextCpp::m_variableBmp = wxNullBitmap; +wxBitmap ContextCpp::m_tpyedefBmp = wxNullBitmap; +wxBitmap ContextCpp::m_memberPrivateBmp = wxNullBitmap; +wxBitmap ContextCpp::m_memberPublicBmp = wxNullBitmap; +wxBitmap ContextCpp::m_memberProtectedeBmp = wxNullBitmap; +wxBitmap ContextCpp::m_functionPrivateBmp = wxNullBitmap; +wxBitmap ContextCpp::m_functionPublicBmp = wxNullBitmap; +wxBitmap ContextCpp::m_functionProtectedeBmp = wxNullBitmap; +wxBitmap ContextCpp::m_macroBmp = wxNullBitmap; +wxBitmap ContextCpp::m_enumBmp = wxNullBitmap; +wxBitmap ContextCpp::m_enumeratorBmp = wxNullBitmap; +wxBitmap ContextCpp::m_cppFileBmp = wxNullBitmap; +wxBitmap ContextCpp::m_hFileBmp = wxNullBitmap; +wxBitmap ContextCpp::m_otherFileBmp = wxNullBitmap; + +BEGIN_EVENT_TABLE(ContextCpp, wxEvtHandler) + EVT_UPDATE_UI(XRCID("find_decl"), ContextCpp::OnUpdateUI) + EVT_UPDATE_UI(XRCID("find_impl"), ContextCpp::OnUpdateUI) + EVT_UPDATE_UI(XRCID("insert_doxy_comment"), ContextCpp::OnUpdateUI) + EVT_UPDATE_UI(XRCID("setters_getters"), ContextCpp::OnUpdateUI) + EVT_UPDATE_UI(XRCID("move_impl"), ContextCpp::OnUpdateUI) +END_EVENT_TABLE() + +ContextCpp::ContextCpp(LEditor *container) + : ContextBase(container) + , m_tipKind(TipNone) + , m_rclickMenu(NULL) +{ + //----------------------------------------------- + // Load laguage settings from configuration file + //----------------------------------------------- + SetName(wxT("C++")); + + // Set the key words and the lexer + std::list styles; + LexerConfPtr lexPtr; + // Read the configuration file + if (EditorConfigST::Get()->IsOk()) { + lexPtr = EditorConfigST::Get()->GetLexer(wxT("C++")); + } + + // Update the control + LEditor &rCtrl = GetCtrl(); + rCtrl.SetLexer(lexPtr->GetLexerId()); + + wxString keyWords = lexPtr->GetKeyWords(); + keyWords.Replace(wxT("\n"), wxT(" ")); + keyWords.Replace(wxT("\r"), wxT(" ")); + rCtrl.SetKeyWords(0, keyWords); + rCtrl.StyleClearAll(); + + styles = lexPtr->GetProperties(); + std::list::iterator iter = styles.begin(); + for (; iter != styles.end(); iter++) { + StyleProperty st = (*iter); + int size = st.GetFontSize(); + wxString face = st.GetFaceName(); + bool bold = st.IsBold(); + + wxFont font; + if (st.GetId() == wxSCI_STYLE_CALLTIP) { + font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + } else { + font = wxFont(size, wxFONTFAMILY_TELETYPE, wxNORMAL, bold ? wxBOLD : wxNORMAL, false, face); + } + + if (st.GetId() == 0) { //default + rCtrl.StyleSetFont(wxSCI_STYLE_DEFAULT, font); + rCtrl.StyleSetSize(wxSCI_STYLE_DEFAULT, (*iter).GetFontSize()); + rCtrl.StyleSetForeground(wxSCI_STYLE_DEFAULT, (*iter).GetFgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_DEFAULT, (*iter).GetBgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_LINENUMBER, (*iter).GetBgColour()); + rCtrl.StyleSetSize(wxSCI_STYLE_LINENUMBER, (*iter).GetFontSize()); + rCtrl.SetFoldMarginColour(true, (*iter).GetBgColour()); + rCtrl.SetFoldMarginHiColour(true, (*iter).GetBgColour()); + } + + rCtrl.StyleSetFont(st.GetId(), font); + rCtrl.StyleSetSize(st.GetId(), (*iter).GetFontSize()); + rCtrl.StyleSetForeground(st.GetId(), (*iter).GetFgColour()); + rCtrl.StyleSetBackground(st.GetId(), (*iter).GetBgColour()); + } + + //create all images used by the cpp context + wxImage img; + if (m_classBmp.IsOk() == false) { + m_classBmp = wxXmlResource::Get()->LoadBitmap(wxT("class")); + m_structBmp = wxXmlResource::Get()->LoadBitmap(wxT("struct")); + m_namespaceBmp = wxXmlResource::Get()->LoadBitmap(wxT("namespace")); + m_variableBmp = wxXmlResource::Get()->LoadBitmap(wxT("member_public")); + m_tpyedefBmp = wxXmlResource::Get()->LoadBitmap(wxT("typedef")); + m_tpyedefBmp.SetMask(new wxMask(m_tpyedefBmp, wxColor(0, 128, 128))); + + m_memberPrivateBmp = wxXmlResource::Get()->LoadBitmap(wxT("member_private")); + m_memberPublicBmp = wxXmlResource::Get()->LoadBitmap(wxT("member_public")); + m_memberProtectedeBmp = wxXmlResource::Get()->LoadBitmap(wxT("member_protected")); + m_functionPrivateBmp = wxXmlResource::Get()->LoadBitmap(wxT("func_private")); + m_functionPublicBmp = wxXmlResource::Get()->LoadBitmap(wxT("func_public")); + m_functionProtectedeBmp = wxXmlResource::Get()->LoadBitmap(wxT("func_protected")); + m_macroBmp = wxXmlResource::Get()->LoadBitmap(wxT("typedef")); + m_macroBmp.SetMask(new wxMask(m_macroBmp, wxColor(0, 128, 128))); + + m_enumBmp = wxXmlResource::Get()->LoadBitmap(wxT("enum")); + m_enumBmp.SetMask(new wxMask(m_enumBmp, wxColor(0, 128, 128))); + + m_enumeratorBmp = wxXmlResource::Get()->LoadBitmap(wxT("enumerator")); + + //Initialise the file bitmaps + m_cppFileBmp = wxXmlResource::Get()->LoadBitmap(wxT("page_white_cplusplus")); + m_hFileBmp = wxXmlResource::Get()->LoadBitmap(wxT("page_white_h")); + m_otherFileBmp = wxXmlResource::Get()->LoadBitmap(wxT("page_white_text")); + } + + //register the images + rCtrl.ClearRegisteredImages(); + rCtrl.RegisterImage(1, m_classBmp); + rCtrl.RegisterImage(2, m_structBmp); + rCtrl.RegisterImage(3, m_namespaceBmp); + rCtrl.RegisterImage(4, m_variableBmp); + rCtrl.RegisterImage(5, m_tpyedefBmp); + rCtrl.RegisterImage(6, m_memberPrivateBmp); + rCtrl.RegisterImage(7, m_memberPublicBmp); + rCtrl.RegisterImage(8, m_memberProtectedeBmp); + rCtrl.RegisterImage(9, m_functionPrivateBmp); + rCtrl.RegisterImage(10, m_functionPublicBmp); + rCtrl.RegisterImage(11, m_functionProtectedeBmp); + rCtrl.RegisterImage(12, m_macroBmp); + rCtrl.RegisterImage(13, m_enumBmp); + rCtrl.RegisterImage(14, m_enumeratorBmp); + rCtrl.RegisterImage(15, m_cppFileBmp); + rCtrl.RegisterImage(16, m_hFileBmp); + rCtrl.RegisterImage(17, m_otherFileBmp); + + //load the context menu from the resource manager + m_rclickMenu = wxXmlResource::Get()->LoadMenu(wxT("editor_right_click")); + m_rclickMenu->Connect(XRCID("swap_files"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnSwapFiles), NULL, this); + m_rclickMenu->Connect(XRCID("insert_doxy_comment"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnInsertDoxyComment), NULL, this); + m_rclickMenu->Connect(XRCID("comment_selection"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnCommentSelection), NULL, this); + m_rclickMenu->Connect(XRCID("comment_line"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnCommentLine), NULL, this); + m_rclickMenu->Connect(XRCID("setters_getters"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnGenerateSettersGetters), NULL, this); + m_rclickMenu->Connect(XRCID("find_decl"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnFindDecl), NULL, this); + m_rclickMenu->Connect(XRCID("find_impl"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnFindImpl), NULL, this); + m_rclickMenu->Connect(XRCID("move_impl"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnMoveImpl), NULL, this); + m_rclickMenu->Connect(XRCID("add_impl"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ContextCpp::OnAddImpl), NULL, this); +} + +ContextCpp::ContextCpp() + : ContextBase(wxT("C++")) + , m_rclickMenu(NULL) +{ +} + +ContextCpp::~ContextCpp() +{ + if (m_rclickMenu) { + delete m_rclickMenu; + m_rclickMenu = NULL; + } +} + +ContextBase *ContextCpp::NewInstance(LEditor *container) +{ + return new ContextCpp(container); +} + +void ContextCpp::OnDwellEnd(wxScintillaEvent &event) +{ + LEditor &rCtrl = GetCtrl(); + rCtrl.CallTipCancel(); + m_tipKind = TipNone; + event.Skip(); +} + +void ContextCpp::OnDwellStart(wxScintillaEvent &event) +{ + LEditor &rCtrl = GetCtrl(); + + VALIDATE_PROJECT(rCtrl); + + //before we start, make sure we are the visible window + Manager *mgr = ManagerST::Get(); + if (mgr->GetActiveEditor() != &rCtrl) { + event.Skip(); + return; + } + + long pos = event.GetPosition(); + int end = rCtrl.WordEndPosition(pos, true); + int word_start = rCtrl.WordStartPosition(pos, true); + + // get the expression we are standing on it + if ( IsCommentOrString( pos ) ) + return; + + // get the token + wxString word = rCtrl.GetTextRange(word_start, end); + if (word.IsEmpty()) { + return; + } + + //get the expression we are hovering over + wxString expr = GetExpression(end); + // get the full text of the current page + wxString text = rCtrl.GetTextRange(0, pos); + // now we are ready to process the scope and build our tips + std::vector tips; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->GetHoverTip(rCtrl.GetFileName(), line, expr, word, text, tips); + + // display a tooltip + wxString tooltip; + if (tips.size() > 0) { + tooltip << tips[0]; + for ( size_t i=1; iPrev()); + break; + case ArrowDown: + rCtrl.CallTipCancel(); + rCtrl.CallTipShow(rCtrl.GetCurrentPos(), m_ct->Next()); + break; + case Elsewhere: + break; + } +} + +//============================================================================= +// >>>>>>>>>>>>>>>>>>>>>>>> CodeCompletion API - START +//============================================================================= + +//user pressed ., -> or :: +void ContextCpp::CodeComplete() +{ + LEditor &rCtrl = GetCtrl(); + + VALIDATE_PROJECT(rCtrl); + + long pos = rCtrl.GetCurrentPos(); + bool showFuncProto = false; + + wxChar ch; + + // Make sure we are not on a comment section + if (IsCommentOrString(pos)) + return; + + // Search for first non-whitespace wxChar + int pos1, pos2, end; + ch = rCtrl.PreviousChar(pos, pos1); + bool showFullDecl(false); + + switch (ch) { + case '.': + // Class / Struct completion + rCtrl.PreviousChar(pos1, end); + break; + case '>': + // Check previous character if is '-' + // We open drop box as well + if (rCtrl.PreviousChar(pos1, pos2) == '-') { + rCtrl.PreviousChar(pos2, end); + } else { + return; + } + break; + case ':': + // Check previous character if is ':' + // We open drop box as well + if (rCtrl.PreviousChar(pos1, pos2) == wxT(':')) { + rCtrl.PreviousChar(pos2, end); + showFullDecl = true; + } else { + return; + } + break; + case '(': + showFuncProto = true; + //is this setting is on? + if (!(TagsManagerST::Get()->GetCtagsOptions().GetFlags() & CC_DISP_FUNC_CALLTIP)) { + return; + } + rCtrl.PreviousChar(pos1, end); + break; + default: + return; + } + + //get expression + wxString expr = GetExpression(rCtrl.GetCurrentPos()); + + // get the scope + wxString text = rCtrl.GetTextRange(0, rCtrl.GetCurrentPos()); + + std::vector candidates; + if ( showFuncProto ) { + //for function prototype, the last char entered was '(', this will break + //the logic of the Getexpression() method to workaround this, we search for + //expression one char before the current position + expr = GetExpression(rCtrl.PositionBefore(rCtrl.GetCurrentPos())); + + //display function tooltip + int word_end = rCtrl.WordEndPosition(end, true); + int word_start = rCtrl.WordStartPosition(end, true); + + // get the token + wxString word = rCtrl.GetTextRange(word_start, word_end); + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + m_ct = TagsManagerST::Get()->GetFunctionTip(rCtrl.GetFileName(), line, expr, text, word); + if (m_ct && m_ct->Count() > 0) { + rCtrl.CallTipCancel(); + rCtrl.CallTipShow(rCtrl.GetCurrentPos(), m_ct->All()); + m_tipKind = TipFuncProto; + } + } else { + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + if (TagsManagerST::Get()->AutoCompleteCandidates(rCtrl.GetFileName(), line, expr, text, candidates)) { + DisplayCompletionBox(candidates, wxEmptyString, showFullDecl); + } + } +} + +void ContextCpp::RemoveDuplicates(std::vector& src, std::vector& target) +{ + for (size_t i=0; iGetName() != target.at(target.size()-1)->GetName()) { + target.push_back(src.at(i)); + } + } + } +} + +wxString ContextCpp::GetExpression(long pos) +{ + bool cont(true); + int depth(0); + LEditor &rCtrl = GetCtrl(); + + int position( pos ); + int at(position); + bool prevGt(false); + while (cont) { + wxChar ch = rCtrl.PreviousChar(position, at, true); + position = at; + //Eof? + if (ch == 0) { + at = 0; + break; + } + + //Comment? + if (IsCommentOrString(at)) + continue; + + switch (ch) { + case wxT('-'): + if (prevGt) { + prevGt = false; + //if previous char was '>', we found an arrow so reduce the depth + //which was increased + depth--; + } else { + if (depth <= 0) { + //dont include this token + at = rCtrl.PositionAfter(at); + cont = false; + } + } + break; + case wxT(' '): + case wxT('\n'): + case wxT('\v'): + case wxT('\t'): + case wxT('\r'): + prevGt = false; + if (depth <= 0) { + cont = false; + break; + } + break; + case wxT('{'): + case wxT('='): + case wxT(';'): + prevGt = false; + cont = false; + break; + case wxT('('): + case wxT('['): + depth--; + prevGt = false; + if (depth < 0) { + //dont include this token + at = rCtrl.PositionAfter(at); + cont = false; + break; + } + break; + case wxT(','): + case wxT('*'): + case wxT('&'): + case wxT('!'): + case wxT('~'): + case wxT('+'): + case wxT('^'): + case wxT('|'): + case wxT('%'): + prevGt = false; + if (depth <= 0) { + + //dont include this token + at = rCtrl.PositionAfter(at); + cont = false; + } + break; + case wxT('>'): + prevGt = true; + depth++; + break; + case wxT('<'): + prevGt = true; + depth--; + break; + case wxT(')'): + case wxT(']'): + prevGt = false; + depth++; + break; + default: + prevGt = false; + break; + } + } + + if (at < 0) at = 0; + wxString expr = rCtrl.GetTextRange(at, pos); + + //remove comments from it + CppScanner sc; + sc.SetText(_C(expr)); + wxString expression; + int type=0; + while ( (type = sc.yylex()) != 0 ) { + wxString token = _U(sc.YYText()); + expression += token; + expression += wxT(" "); + } + return expression; +} + +wxString ContextCpp::GetWordUnderCaret() +{ + LEditor &rCtrl = GetCtrl(); + // Get the partial word that we have + long pos = rCtrl.GetCurrentPos(); + long start = rCtrl.WordStartPosition(pos, true); + long end = rCtrl.WordEndPosition(pos, true); + return rCtrl.GetTextRange(start, end); +} + +void ContextCpp::OnContextOpenDocument(wxCommandEvent &event) +{ + + wxUnusedVar(event); + + wxFileName fileName(m_selectedWord); + wxString tmpName(m_selectedWord); + tmpName.Replace(wxT("\\"), wxT("/")); + + std::vector files, files2; + TagsManagerST::Get()->GetFiles(fileName.GetFullName(), files); + //filter out the all files that does not have an exact match + for (size_t i=0; i 1) { + wxArrayString choices; + for (size_t i=0; iOpenFile(fileToOpen, wxEmptyString); + + // Keep the current position as well + NavMgr::Get()->Push(rCtrl.CreateBrowseRecord()); + } +} + +void ContextCpp::RemoveMenuDynamicContent(wxMenu *menu) +{ + std::vector::iterator iter = m_dynItems.begin(); + for (; iter != m_dynItems.end(); iter++) { + menu->Destroy((*iter)); + } + m_dynItems.clear(); + m_selectedWord.Empty(); +} + +void ContextCpp::AddMenuDynamicContent(wxMenu *menu) +{ + //if we are placed over an include statement, + //add an option in the menu to open it + wxString fileName; + + LEditor &rCtrl = GetCtrl(); + VALIDATE_PROJECT(rCtrl); + + wxString menuItemText; + wxString line = rCtrl.GetCurLine(); + menuItemText.Clear(); + + if (IsIncludeStatement(line, &fileName)) { + + PrependMenuItemSeparator(menu); + menuItemText << wxT("Open Workspace File \"") << fileName << wxT("\""); + + PrependMenuItem(menu, menuItemText, wxCommandEventHandler(ContextCpp::OnContextOpenDocument)); + m_selectedWord = fileName; + + } else { + int pos = rCtrl.GetCurrentPos(); + if (IsCommentOrString(pos)) { + return; + } + + wxString word = rCtrl.GetWordAtCaret(); + if (word.IsEmpty() == false) { + PrependMenuItemSeparator(menu); + menuItemText << wxT("Add Include File for \"") << word << wxT("\""); + PrependMenuItem(menu, menuItemText, wxCommandEventHandler(ContextCpp::OnAddIncludeFile)); + m_selectedWord = word; + } + } +} + +void ContextCpp::PrependMenuItem(wxMenu *menu, const wxString &text, wxObjectEventFunction func) +{ + wxMenuItem *item; + wxString menuItemText; + item = new wxMenuItem(menu, wxNewId(), text); + menu->Prepend(item); + menu->Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, func, NULL, this); + m_dynItems.push_back(item); +} + +void ContextCpp::PrependMenuItemSeparator(wxMenu *menu) +{ + wxMenuItem *item; + item = new wxMenuItem(menu, wxID_SEPARATOR); + menu->Prepend(item); + m_dynItems.push_back(item); +} + +void ContextCpp::OnAddIncludeFile(wxCommandEvent &e) +{ + wxUnusedVar(e); + LEditor &rCtrl = GetCtrl(); + VALIDATE_PROJECT(rCtrl); + + //get expression + int pos = rCtrl.GetCurrentPos(); + + if (IsCommentOrString(pos)) + return; + + int word_end = rCtrl.WordEndPosition(pos, true); + wxString expr = GetExpression(word_end); + + // get the scope + wxString text = rCtrl.GetTextRange(0, word_end); + + if (m_selectedWord.IsEmpty()) + return; + + std::vector tags; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->FindImplDecl(rCtrl.GetFileName(), line, expr, m_selectedWord, text, tags, false); + if (tags.empty()) + return; + + std::map tmpmap; + + wxArrayString options; + + //remove duplicate file entries + for (std::vector::size_type i=0; i< tags.size(); i++) { + tmpmap[tags.at(i)->GetFile()] = true; + } + + //convert the map to wxArrayString + std::map::iterator iter = tmpmap.begin(); + for (; iter != tmpmap.end(); iter++) { + options.Add(iter->first); + } + + //we now got list of tags that matches 'word' + wxString choice; + if (options.GetCount() > 1) { + //multiple matches + choice = wxGetSingleChoice(wxT("Select File to Include:"), wxT("Add Include File"), options); + } else { + choice = options.Item(0); + } + + if (choice.IsEmpty()) { + return; + } + + AddIncludeFileDlg *dlg = new AddIncludeFileDlg(NULL, choice, rCtrl.GetText(), FindLineToAddInclude()); + if (dlg->ShowModal() == wxID_OK) { + //add the line to the current document + wxString lineToAdd = dlg->GetLineToAdd(); + int line = dlg->GetLine(); + + long pos = rCtrl.PositionFromLine(line); + rCtrl.InsertText(pos, lineToAdd + wxT("\n")); + } + dlg->Destroy(); +} + +bool ContextCpp::IsIncludeStatement(const wxString &line, wxString *fileName) +{ + wxString tmpLine(line); + wxString tmpLine1(line); + + //If we are on an include statement, popup a file list + //completion list + tmpLine = tmpLine.Trim(); + tmpLine = tmpLine.Trim(false); + tmpLine.Replace(wxT("\t"), wxT(" ")); + + static wxRegEx reIncludeFile(wxT("include *[\\\"\\<]{1}([a-zA-Z0-9_/\\.]*)")); + if (tmpLine.StartsWith(wxT("#"), &tmpLine1)) { + if (reIncludeFile.Matches(tmpLine1)) { + if (fileName) { + *fileName = reIncludeFile.GetMatch(tmpLine1, 1); + } + return true; + } + } + return false; +} + +void ContextCpp::CompleteWord() +{ + LEditor &rCtrl = GetCtrl(); + + VALIDATE_PROJECT(rCtrl); + + std::vector tags; + wxString scope; + wxString scopeName; + wxString word; + wxString fileName; + + wxString line = rCtrl.GetCurLine(); + if (IsIncludeStatement(line, &fileName)) { + DisplayFilesCompletionBox(fileName); + return; + } + + // Make sure we are not on a comment section + if (IsCommentOrString(rCtrl.GetCurrentPos())) + return; + + // get the word under the cursor + word = GetWordUnderCaret(); + + if (word.IsEmpty()) + return; + + TagsManager *mgr = TagsManagerST::Get(); + + //get the current expression + wxString expr = GetExpression(rCtrl.GetCurrentPos()); + + std::vector candidates; + //get the full text of the current page + wxString text = rCtrl.GetTextRange(0, rCtrl.GetCurrentPos()); + int lineNum = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + if (mgr->WordCompletionCandidates(rCtrl.GetFileName(), lineNum, expr, text, word, candidates)) { + DisplayCompletionBox(candidates, word, false); + } +} + +void ContextCpp::DisplayCompletionBox(const std::vector &tags, const wxString &word, bool showFullDecl) +{ + LEditor &rCtrl = GetCtrl(); + wxString list; + size_t i=0; + //Assumption (which is always true..): the tags are sorted + wxString lastName; + if (tags.empty() == false) { + for (; iGetName()) { + list.Append(tags.at(i)->GetName() + GetImageString(*tags.at(i)) + wxT("@")); + lastName = tags.at(i)->GetName(); + } + if (showFullDecl) { + //collect only declarations + if (tags.at(i)->GetKind() == wxT("prototype")) { + list.Append(tags.at(i)->GetName() + tags.at(i)->GetSignature() + GetImageString(*tags[i]) + wxT("@")); + } + } + } + + if (lastName != tags.at(i)->GetName()) { + list.Append(tags.at(i)->GetName() + GetImageString(*tags.at(i)) + wxT("@")); + } + list = list.BeforeLast(wxT('@')); + + rCtrl.AutoCompSetSeparator((int)('@')); // set the separator to be non valid language wxChar + rCtrl.AutoCompSetChooseSingle(true); // If only one match, insert it automatically + rCtrl.AutoCompSetIgnoreCase(false); + rCtrl.AutoCompSetDropRestOfWord(true); + rCtrl.AutoCompSetAutoHide(false); + rCtrl.AutoCompShow((int)word.Length(), list); + rCtrl.AutoCompSetFillUps(wxT("<( \t")); + } +} + +void ContextCpp::DisplayFilesCompletionBox(const wxString &word) +{ + LEditor &rCtrl = GetCtrl(); + wxString list; + size_t i=0; + + wxString fileName(word); + fileName.Replace(wxT("\\"), wxT("/")); + fileName = fileName.AfterLast(wxT('/')); + + std::vector files; + TagsManagerST::Get()->GetFiles(fileName, files); + std::sort(files.begin(), files.end(), SFileSort()); + + if ( files.empty() == false ) { + for (; i\" \t")); + } +} + +//============================================================================= +// <<<<<<<<<<<<<<<<<<<<<<<<<<< CodeCompletion API - END +//============================================================================= + +void ContextCpp::GotoPreviousDefintion() +{ + if (!NavMgr::Get()->CanPrev()) + return; + + // Get the last tag visited + BrowseRecord record = NavMgr::Get()->Prev(); + + wxString msg; + msg << wxT("GotoPreviousDefintion ") << record.filename << wxT(" ") << record.lineno; + ManagerST::Get()->OpenFile(record); +} + +void ContextCpp::GotoDefinition() +{ + LEditor &rCtrl = GetCtrl(); + + VALIDATE_PROJECT(rCtrl); + + std::vector tags; + + // Make sure we are not on a comment section + if (IsCommentOrString(rCtrl.GetCurrentPos())) + return; + + // Get the word under the cursor OR the selected word + wxString word = rCtrl.GetSelectedText(); + if (word.IsEmpty()) { + // No selection, try to find the word under the cursor + long pos = rCtrl.GetCurrentPos(); + long end = rCtrl.WordEndPosition(pos, true); + long start = rCtrl.WordStartPosition(pos, true); + + // Get the word + word = rCtrl.GetTextRange(start, end); + if (word.IsEmpty()) + return; + } + + // get all tags that matches the name (we use exact match) + TagsManagerST::Get()->FindSymbol(word, tags); + if (tags.empty()) + return; + + DoGotoSymbol(tags); +} + +void ContextCpp::DoGotoSymbol(const std::vector &tags) +{ + LEditor &rCtrl = GetCtrl(); + // Keep the current position as well + NavMgr::Get()->Push(rCtrl.CreateBrowseRecord()); + + // Did we get a single match? + if (tags.size() == 1) { + // Just open the file and set the cursor on the match we found + wxString projectName = ManagerST::Get()->GetProjectNameByFile(tags[0]->GetFile()); + ManagerST::Get()->OpenFile(tags[0]->GetFile(), projectName, tags[0]->GetLine()-1); + } else { + // popup a dialog offering the results to the user + SymbolsDialog *dlg = new SymbolsDialog(&GetCtrl()); + dlg->AddSymbols( tags, 0 ); + if (dlg->ShowModal() == wxID_OK) { + ManagerST::Get()->OpenFile(dlg->GetFile(), dlg->GetProject(), dlg->GetLine()-1); + } + dlg->Destroy(); + } +} + + +void ContextCpp::SwapFiles(const wxFileName &fileName) +{ + wxFileName otherFile(fileName); + wxString ext = fileName.GetExt(); + wxArrayString exts; + + //replace the file extension + if (IsSource(ext)) { + //try to find a header file + exts.Add(wxT("h")); + exts.Add(wxT("hpp")); + exts.Add(wxT("hxx")); + } else { + //try to find a implementation file + exts.Add(wxT("cpp")); + exts.Add(wxT("cxx")); + exts.Add(wxT("cc")); + exts.Add(wxT("c")); + } + + for (size_t i=0; iPush(GetCtrl().CreateBrowseRecord()); + return; + } + } +} + +bool ContextCpp::FindSwappedFile(const wxFileName &rhs, wxString &lhs) +{ + wxFileName otherFile(rhs); + wxString ext = rhs.GetExt(); + wxArrayString exts; + + //replace the file extension + if (IsSource(ext)) { + //try to find a header file + exts.Add(wxT("h")); + exts.Add(wxT("hpp")); + exts.Add(wxT("hxx")); + } else { + //try to find a implementation file + exts.Add(wxT("cpp")); + exts.Add(wxT("cxx")); + exts.Add(wxT("cc")); + exts.Add(wxT("c")); + } + + + std::vector files; + ManagerST::Get()->GetWorkspaceFiles(files, true); + + for (size_t j=0; jGetProjectNameByFile(fileName.GetFullPath()); + ManagerST::Get()->OpenFile(fileName.GetFullPath(), proj); + return true; + } + + //ok, the file does not exist in the current directory, try to find elsewhere + //whithin the workspace files + std::vector files; + ManagerST::Get()->GetWorkspaceFiles(files, true); + + for (size_t i=0; iGetProjectNameByFile(files.at(i).GetFullPath()); + ManagerST::Get()->OpenFile(files.at(i).GetFullPath(), proj); + } + } + return false; +} + +//----------------------------------------------- +// Menu event handlers +//----------------------------------------------- +void ContextCpp::OnSwapFiles(wxCommandEvent &event) +{ + wxUnusedVar(event); + SwapFiles(GetCtrl().GetFileName()); +} + +void ContextCpp::OnInsertDoxyComment(wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor &editor = GetCtrl(); + + VALIDATE_PROJECT(editor); + + //get the current line text + int lineno = editor.LineFromPosition(editor.GetCurrentPos()); + + //get doxygen comment based on file and line + TagsManager *mgr = TagsManagerST::Get(); + wxString comment = mgr->GenerateDoxygenComment(editor.GetFileName().GetFullPath(), lineno); + //do we have a comment? + if (comment.IsEmpty()) + return; + + editor.InsertTextWithIndentation(comment, lineno); + + //since we just inserted a text to the document, we force a save on the + //document, or else the parser will lose sync with the database + //but avoid saving it, if it not part of the workspace + wxString project = ManagerST::Get()->GetProjectNameByFile(editor.GetFileName().GetFullPath()); + if (project.IsEmpty() == false) { + editor.SaveFile(); + } +} + +void ContextCpp::OnCommentSelection(wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor &editor = GetCtrl(); + int start = editor.GetSelectionStart(); + int end = editor.GetSelectionEnd(); + + if (start == end) + return; + + //createa C block comment + editor.BeginUndoAction(); + editor.InsertText(start, wxT("/*")); + editor.InsertText(editor.PositionAfter(editor.PositionAfter(end)), wxT("*/")); + editor.EndUndoAction(); +} + +void ContextCpp::OnCommentLine(wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor &editor = GetCtrl(); + + int lineno = editor.LineFromPosition(editor.GetCurrentPos()); + int start = editor.PositionFromLine(lineno); + + //createa C block comment + editor.BeginUndoAction(); + editor.InsertText(start, wxT("//")); + editor.EndUndoAction(); +} + +void ContextCpp::OnGenerateSettersGetters(wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor &editor = GetCtrl(); + + VALIDATE_PROJECT(editor); + long pos = editor.GetCurrentPos(); + + if (IsCommentOrString(pos)) { + return; + } + + TagsManager *tagmgr = TagsManagerST::Get(); + std::vector tags; + //get the scope name that the caret is currently at + + wxString text = editor.GetTextRange(0, pos); + wxString scopeName = tagmgr->GetScopeName(text); + tagmgr->TagsByScope(scopeName, wxT("member"), tags); + if (tags.empty()) { + return; + } + + std::vector classtags; + tagmgr->FindByPath(scopeName, classtags); + if (classtags.empty() || classtags.size() > 1) + return; + + TagEntryPtr tag = classtags.at(0); + if (tag->GetFile() != editor.GetFileName().GetFullPath()) { + wxString msg; + msg << wxT("This file does not seem to contain the declaration for '") << tag->GetName() << wxT("'\n"); + msg << wxT("The declaration of '") << tag->GetName() << wxT("' is located at '") << tag->GetFile() << wxT("'\n"); + msg << wxT("Would you like CodeLite to open this file for you?"); + + if (wxMessageBox(msg, wxT("CodeLite"), wxYES_NO) == wxYES) { + wxString projectName = ManagerST::Get()->GetProjectNameByFile(tag->GetFile()); + ManagerST::Get()->OpenFile(tag->GetFile(), projectName, tag->GetLine()); + } + return; + } + + int lineno = editor.LineFromPosition(editor.GetCurrentPos()) + 1; + + //get the file name and line where to insert the setters getters + static SettersGettersDlg *s_dlg = NULL; + if (!s_dlg) { + s_dlg = new SettersGettersDlg(ManagerST::Get()->GetMainFrame()); + } + + s_dlg->Init(tags, tag->GetFile(), lineno); + if (s_dlg->ShowModal() == wxID_OK) { + wxString code = s_dlg->GetGenCode(); + if (code.IsEmpty() == false) { + editor.InsertTextWithIndentation(code, lineno); + } + } +} + +void ContextCpp::OnKeyDown(wxKeyEvent &event) +{ + //validate project is open for the container editor + if (GetCtrl().GetProject().IsEmpty()) { + event.Skip(); + return; + } + + if (m_tipKind == TipFuncProto && GetCtrl().CallTipActive() && m_ct) { + if (event.GetKeyCode() == WXK_DOWN) { + GetCtrl().CallTipCancel(); + GetCtrl().CallTipShow(GetCtrl().GetCurrentPos(), m_ct->Next()); + return; + } else if (event.GetKeyCode() == WXK_UP) { + GetCtrl().CallTipCancel(); + GetCtrl().CallTipShow(GetCtrl().GetCurrentPos(), m_ct->Prev()); + return; + } + } + event.Skip(); +} + +void ContextCpp::OnFindImpl(wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor &rCtrl = GetCtrl(); + VALIDATE_PROJECT(rCtrl); + + //get expression + int pos = rCtrl.GetCurrentPos(); + int word_end = rCtrl.WordEndPosition(pos, true); + int word_start = rCtrl.WordStartPosition(pos, true); + wxString expr = GetExpression(word_end); + + // get the scope + wxString text = rCtrl.GetTextRange(0, word_end); + + //the word + + wxString word = rCtrl.GetTextRange(word_start, word_end); + + if (word.IsEmpty()) + return; + + std::vector tags; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->FindImplDecl(rCtrl.GetFileName(), line, expr, word, text, tags, true); + if (tags.empty()) + return; + + DoGotoSymbol(tags); + +} + +void ContextCpp::OnFindDecl(wxCommandEvent &event) +{ + + wxUnusedVar(event); + LEditor &rCtrl = GetCtrl(); + VALIDATE_PROJECT(rCtrl); + + //get expression + //get expression + int pos = rCtrl.GetCurrentPos(); + int word_end = rCtrl.WordEndPosition(pos, true); + int word_start = rCtrl.WordStartPosition(pos, true); + wxString expr = GetExpression(word_end); + + // get the scope + wxString text = rCtrl.GetTextRange(0, word_end); + + //the word + wxString word = rCtrl.GetTextRange(word_start, word_end); + + if (word.IsEmpty()) + return; + + std::vector tags; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->FindImplDecl(rCtrl.GetFileName(), line, expr, word, text, tags, false); + if (tags.empty()) + return; + + DoGotoSymbol(tags); +} + +void ContextCpp::OnUpdateUI(wxUpdateUIEvent &event) +{ + + LEditor &ctrl = GetCtrl(); + if (event.GetId() == XRCID("insert_doxy_comment")) { + event.Enable(ctrl.GetProject().IsEmpty() == false); + } else + if (event.GetId() == XRCID("setters_getters")) { + event.Enable(ctrl.GetProject().IsEmpty() == false); + } else + if (event.GetId() == XRCID("find_decl")) { + event.Enable(ctrl.GetProject().IsEmpty() == false); + } else + if (event.GetId() == XRCID("find_impl")) { + event.Enable(ctrl.GetProject().IsEmpty() == false); + } else + if (event.GetId() == XRCID("move_impl")) { + event.Enable(ctrl.GetProject().IsEmpty() == false && ctrl.GetSelectedText().IsEmpty() == false ); + } else { + event.Skip(); + } +} + +void ContextCpp::OnSciUpdateUI(wxScintillaEvent &event) +{ + wxUnusedVar(event); + + //update the navigation toolbar only if the toolbar is visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Navigation Toolbar")); + if (!info.IsOk() || !info.IsShown()) { + return; + } + + LEditor &ctrl = GetCtrl(); + + static long lastPos(wxNOT_FOUND); + static long lastLine(wxNOT_FOUND); + + //get the current position + long curpos = ctrl.GetCurrentPos(); + if (curpos != lastPos) { + lastPos = curpos; + //position has changed, compare line numbers + if (ctrl.LineFromPosition(curpos) != lastLine) { + lastLine = ctrl.LineFromPosition(curpos); + //we need to update the navigation bar of the main frame + TagsManager *tags = TagsManagerST::Get(); + Frame::Get()->GetMainBook()->UpdateScope(tags->FunctionFromFileLine(ctrl.GetFileName(), lastLine+1)); + } + } +} + +void ContextCpp::OnDbgDwellEnd(wxScintillaEvent &event) +{ + wxUnusedVar(event); + Manager *mgr = ManagerST::Get(); + mgr->DbgCancelQuickWatchTip(); +} + +void ContextCpp::OnDbgDwellStart(wxScintillaEvent & event) +{ + static wxRegEx reCppIndentifier(wxT("[a-zA-Z_][a-zA-Z0-9_]*")); + wxPoint pt; + wxString word; + pt.x = event.GetX(); + pt.y = event.GetY(); + LEditor &ctrl = GetCtrl(); + int pos = event.GetPosition(); + if (pos != wxNOT_FOUND) { + + if (IsCommentOrString(pos)) { + return; + } + + long start = ctrl.WordStartPosition(pos, true); + long end = ctrl.WordEndPosition(pos, true); + word = ctrl.GetTextRange(start, end); + if (word.IsEmpty()) { + return; + } + + //make sure that this is indeed a variable name + if (!reCppIndentifier.Matches(word)) { + return; + } + } else { + return; + } + + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + wxString cmd; + wxString output; + cmd << wxT("print ") << word; + if (dbgr && dbgr->ExecSyncCmd(cmd, output)) { + // cancel any old calltip and display the new one + ctrl.CallTipCancel(); + + // GDB HACK BEGIN:: + //gdb displays the variable name as $, + //we simply replace it with the actual string + output = output.Trim().Trim(false); + static wxRegEx reGdbVar(wxT("^\\$[0-9]+")); + reGdbVar.ReplaceFirst(&output, word); + // GDB HACK END:: + + ctrl.CallTipShow(event.GetPosition(), output); + m_tipKind = TipHover; + } +} + +int ContextCpp::FindLineToAddInclude() +{ + LEditor &ctrl = GetCtrl(); + + int maxLineToScan = ctrl.GetLineCount(); + if (maxLineToScan > 100) { + maxLineToScan = 100; + } + + for (int i=0; i tags; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->FindSymbol(word, tags); + if (tags.empty()) + return; + + clFunction foo; + TagEntryPtr tag; + bool match(false); + for (std::vector< TagEntryPtr >::size_type i=0; i< tags.size(); i++) { + if (tags.at(i)->GetName() == word && tags.at(i)->GetLine() == line && tags.at(i)->GetKind() == wxT("function")) { + //we got a match + tag = tags.at(i); + LanguageST::Get()->FunctionFromPattern(tags.at(i)->GetPattern(), foo); + match = true; + break; + } + } + + if (match) { + + long curPos = word_end; + long blockEndPos(wxNOT_FOUND); + long blockStartPos(wxNOT_FOUND); + wxString content; + + if (DoGetFunctionBody(curPos, blockEndPos, blockStartPos, content)) { + + //create the functions body + wxString body; + blockEndPos = rCtrl.PositionAfter(blockEndPos); + + if (foo.m_retrunValusConst.empty() == false) { + body << _U(foo.m_retrunValusConst.c_str()) << wxT(" "); + } + + if (foo.m_returnValue.m_typeScope.empty() == false) { + body << _U(foo.m_returnValue.m_typeScope.c_str()) << wxT("::"); + body << _U(foo.m_returnValue.m_templateDecl.c_str()); + } + + body << _U(foo.m_returnValue.m_type.c_str()) + << _U(foo.m_returnValue.m_starAmp.c_str()) + << wxT(" ") << tag->GetScope() << wxT("::") << tag->GetName() << tag->GetSignature(); + body << wxT("\n"); + body << content; + body << wxT("\n"); + body << wxT("\n"); + + wxString targetFile; + FindSwappedFile(rCtrl.GetFileName(), targetFile); + MoveFuncImplDlg *dlg = new MoveFuncImplDlg(NULL, body, targetFile); + if (dlg->ShowModal() == wxID_OK) { + //get the updated data + targetFile = dlg->GetFileName(); + body = dlg->GetText(); + if (ManagerST::Get()->OpenFileAndAppend(targetFile, body)) { + //remove the current body and replace it with ';' + rCtrl.SetTargetEnd(blockEndPos); + rCtrl.SetTargetStart(blockStartPos); + rCtrl.ReplaceTarget(wxT(";")); + } + } + dlg->Destroy(); + } + } +} + +bool ContextCpp::DoGetFunctionBody(long curPos, long &blockStartPos, long &blockEndPos, wxString &content) +{ + LEditor &rCtrl = GetCtrl(); + blockStartPos = wxNOT_FOUND; + blockEndPos = wxNOT_FOUND; + + //scan for the functions' start block + while ( true ) { + curPos = rCtrl.PositionAfter(curPos); + + //eof? + if (curPos == rCtrl.GetLength()) { + break; + } + + //comment? + if (IsCommentOrString(curPos)) { + continue; + } + + //valid character + wxChar ch = rCtrl.GetCharAt(curPos); + if (ch == wxT(';')) { + //no implementation to move + break; + } + + if (ch == wxT('{')) { + blockStartPos = curPos; + break; + } + } + + //collect the functions' block + if (blockStartPos != wxNOT_FOUND) { + int depth(1); + content << wxT("{"); + while (depth > 0) { + curPos = rCtrl.PositionAfter(curPos); + //eof? + if (curPos == rCtrl.GetLength()) { + break; + } + + //comment? + wxChar ch = rCtrl.GetCharAt(curPos); + if (IsCommentOrString(curPos)) { + content << ch; + continue; + } + + switch (ch) { + case wxT('{'): + depth++; + break; + case wxT('}'): + depth--; + break; + } + content << ch; + } + + if (depth == 0) { + blockEndPos = curPos; + } + } + + return (blockEndPos > blockStartPos) && + (blockEndPos != wxNOT_FOUND) && + (blockStartPos != wxNOT_FOUND); +} + +void ContextCpp::OnAddImpl(wxCommandEvent &e) +{ + wxUnusedVar(e); + LEditor &rCtrl = GetCtrl(); + VALIDATE_PROJECT(rCtrl); + + //get expression + int pos = rCtrl.GetCurrentPos(); + int word_end = rCtrl.WordEndPosition(pos, true); + int word_start = rCtrl.WordStartPosition(pos, true); + + // get the scope + wxString word = rCtrl.GetTextRange(word_start, word_end); + + if (word.IsEmpty()) + return; + + std::vector tags; + int line = rCtrl.LineFromPosition(rCtrl.GetCurrentPosition())+1; + TagsManagerST::Get()->FindSymbol(word, tags); + if (tags.empty()) + return; + + clFunction foo; + TagEntryPtr tag; + bool match(false); + for (std::vector< TagEntryPtr >::size_type i=0; i< tags.size(); i++) { + if (tags.at(i)->GetName() == word && tags.at(i)->GetLine() == line && tags.at(i)->GetKind() == wxT("prototype")) { + //we got a match + tag = tags.at(i); + LanguageST::Get()->FunctionFromPattern(tags.at(i)->GetPattern(), foo); + match = true; + break; + } + } + + if (match) { + + long curPos = word_end; + long blockEndPos(wxNOT_FOUND); + long blockStartPos(wxNOT_FOUND); + wxString content; + + if (DoGetFunctionBody(curPos, blockEndPos, blockStartPos, content)) { + //function already has body ... + wxMessageBox(wxT("Function '") + tag->GetName() + wxT("' already has a body"), wxT("CodeLite"), wxICON_WARNING|wxOK); + return; + } + //create the functions body + wxString body; + blockEndPos = rCtrl.PositionAfter(blockEndPos); + + if (foo.m_retrunValusConst.empty() == false) { + body << _U(foo.m_retrunValusConst.c_str()) << wxT(" "); + } + + if (foo.m_returnValue.m_typeScope.empty() == false) { + body << _U(foo.m_returnValue.m_typeScope.c_str()) << wxT("::"); + body << _U(foo.m_returnValue.m_templateDecl.c_str()); + } + + body << _U(foo.m_returnValue.m_type.c_str()) + << _U(foo.m_returnValue.m_starAmp.c_str()) + << wxT(" ") << tag->GetScope() << wxT("::") << tag->GetName() << tag->GetSignature(); + body << wxT("\n{\n}\n"); + + wxString targetFile; + FindSwappedFile(rCtrl.GetFileName(), targetFile); + MoveFuncImplDlg *dlg = new MoveFuncImplDlg(NULL, body, targetFile); + if (dlg->ShowModal() == wxID_OK) { + //get the updated data + targetFile = dlg->GetFileName(); + body = dlg->GetText(); + ManagerST::Get()->OpenFileAndAppend(targetFile, body); + } + dlg->Destroy(); + } +} diff --git a/LiteEditor/context_cpp.h b/LiteEditor/context_cpp.h new file mode 100644 index 0000000000..4c7e95f51a --- /dev/null +++ b/LiteEditor/context_cpp.h @@ -0,0 +1,126 @@ +#ifndef CONTEXT_CPP_H +#define CONTEXT_CPP_H + +#include "context_base.h" +#include "calltip.h" +#include +#include "entry.h" + +class ContextCpp : public ContextBase { + clCallTipPtr m_ct; + std::map m_propertyInt; + std::vector m_dynItems; + wxString m_selectedWord; + + enum TipKind + { + TipNone = -1, + TipHover, + TipFuncProto + }; + + enum CalltipClickPos + { + Elsewhere = 0, + ArrowUp , + ArrowDown + }; + + TipKind m_tipKind; + wxMenu *m_rclickMenu; + + //images used by the C++ context + static wxBitmap m_classBmp; + static wxBitmap m_structBmp; + static wxBitmap m_namespaceBmp; + static wxBitmap m_variableBmp; + static wxBitmap m_tpyedefBmp; + static wxBitmap m_memberPrivateBmp; + static wxBitmap m_memberPublicBmp; + static wxBitmap m_memberProtectedeBmp; + static wxBitmap m_functionPrivateBmp; + static wxBitmap m_functionPublicBmp; + static wxBitmap m_functionProtectedeBmp; + static wxBitmap m_macroBmp; + static wxBitmap m_enumBmp; + static wxBitmap m_enumeratorBmp; + static wxBitmap m_cppFileBmp; + static wxBitmap m_hFileBmp; + static wxBitmap m_otherFileBmp; + +private: + bool TryOpenFile(const wxFileName &fileName); + void DisplayCompletionBox(const std::vector &tags, const wxString &word, bool showFullDecl); + void DisplayFilesCompletionBox(const wxString &word); + bool DoGetFunctionBody(long curPos, long &blockStartPos, long &blockEndPos, wxString &content); + +public: + ContextCpp(LEditor *container); + virtual ~ContextCpp(); + ContextCpp(); + virtual ContextBase *NewInstance(LEditor *container); + + virtual void CompleteWord(); + virtual void CodeComplete(); + virtual void GotoDefinition(); + virtual void GotoPreviousDefintion(); + virtual void AutoIndent(const wxChar&); + virtual void CallTipCancel(); + virtual bool IsCommentOrString(long pos); + virtual void AddMenuDynamicContent(wxMenu *menu); + virtual void RemoveMenuDynamicContent(wxMenu *menu); + + //override swapfiles features + virtual void SwapFiles(const wxFileName &fileName); + + //Event handlers + virtual void OnDwellEnd(wxScintillaEvent &event); + virtual void OnDwellStart(wxScintillaEvent &event); + virtual void OnDbgDwellEnd(wxScintillaEvent &event); + virtual void OnDbgDwellStart(wxScintillaEvent &event); + virtual void OnCallTipClick(wxScintillaEvent &event); + virtual void OnSciUpdateUI(wxScintillaEvent &event); + + //Capture menu events + //return this context specific right click menu + virtual wxMenu *GetMenu(){return m_rclickMenu;} + virtual void OnSwapFiles(wxCommandEvent &event); + virtual void OnInsertDoxyComment(wxCommandEvent &event); + virtual void OnCommentSelection(wxCommandEvent &event); + virtual void OnCommentLine(wxCommandEvent &event); + virtual void OnGenerateSettersGetters(wxCommandEvent &event); + virtual void OnFindImpl(wxCommandEvent &event); + virtual void OnFindDecl(wxCommandEvent &event); + virtual void OnKeyDown(wxKeyEvent &event); + virtual void OnUpdateUI(wxUpdateUIEvent &event); + virtual void OnContextOpenDocument(wxCommandEvent &event); + virtual void OnAddIncludeFile(wxCommandEvent &e); + virtual void OnMoveImpl(wxCommandEvent &e); + virtual void OnAddImpl(wxCommandEvent &e); + + DECLARE_EVENT_TABLE(); +private: + wxString GetWordUnderCaret(); + wxString GetFileImageString(const wxString &ext); + wxString GetImageString(const TagEntry &entry); + wxString GetExpression(long pos); + void DoGotoSymbol(const std::vector &tags); + bool IsIncludeStatement(const wxString &line, wxString *fileName = NULL); + void RemoveDuplicates(std::vector& src, std::vector& target); + void PrependMenuItem(wxMenu* menu, const wxString &text, wxObjectEventFunction func); + void PrependMenuItemSeparator(wxMenu* menu); + int FindLineToAddInclude(); + + /** + * \brief try to find a swapped file for this rhs. The logic is based on the C++ coding conventions + * a swapped file for a.cpp will be a.h or a.hpp + * \param rhs input + * \param lhs output + * \return true if such sibling file exist, false otherwise + */ + bool FindSwappedFile(const wxFileName &rhs, wxString &lhs); +}; + +#endif // CONTEXT_CPP_H + + diff --git a/LiteEditor/context_manager.cpp b/LiteEditor/context_manager.cpp new file mode 100644 index 0000000000..d40af9e969 --- /dev/null +++ b/LiteEditor/context_manager.cpp @@ -0,0 +1,39 @@ +#include "context_manager.h" +#include "context_cpp.h" +#include "context_text.h" +#include "context_base.h" +#include "generic_context.h" +#include "editor_config.h" + +ContextManager::ContextManager() +{ + // register available context + m_contextPool[wxT("C++")] = ContextBasePtr( new ContextCpp() ); + m_contextPool[wxT("Text")] = ContextBasePtr( new ContextText() ); + + // load generic lexers + EditorConfig::ConstIterator iter = EditorConfigST::Get()->LexerBegin(); + for(; iter != EditorConfigST::Get()->LexerEnd(); iter++){ + LexerConfPtr lex = iter->second; + //skip hardcoded lexers + if(lex->GetName() != wxT("C++") && lex->GetName() != wxT("Text")){ + std::pair entry(lex->GetName(), new ContextGeneric(lex->GetName())); + m_contextPool.insert(entry); + } + } +} + +ContextManager::~ContextManager() +{ +} + +ContextBasePtr ContextManager::NewContext(wxWindow *parent, const wxString &lexerName) +{ + // this function is actually a big switch .... + std::map::iterator iter = m_contextPool.find(lexerName); + if( iter == m_contextPool.end()){ + return m_contextPool[wxT("Text")]->NewInstance((LEditor*)parent); + } + + return iter->second->NewInstance((LEditor*)parent); +} diff --git a/LiteEditor/context_manager.h b/LiteEditor/context_manager.h new file mode 100644 index 0000000000..c34b8edead --- /dev/null +++ b/LiteEditor/context_manager.h @@ -0,0 +1,29 @@ +#ifndef CONTEXT_MANAGER_H +#define CONTEXT_MANAGER_H + +#include "singleton.h" +#include "wx/string.h" +#include "map" +#include "context_base.h" +#include "wx/window.h" + +class ContextManager; + +class ContextManager : public Singleton { + friend class Singleton; + std::map m_contextPool; + +public: + /** + * Return new context by name + * \param lexerName the lexer name + * \param parent the context parent + * \return + */ + ContextBasePtr NewContext(wxWindow *parent, const wxString &lexerName); + +private: + ContextManager(); + virtual ~ContextManager(); +}; +#endif // CONTEXT_MANAGER_H diff --git a/LiteEditor/context_text.cpp b/LiteEditor/context_text.cpp new file mode 100644 index 0000000000..fa850a8f0a --- /dev/null +++ b/LiteEditor/context_text.cpp @@ -0,0 +1,97 @@ +#include "context_text.h" +#include +#include "editor_config.h" +#include "editor.h" + +ContextText::ContextText(LEditor *container) +: ContextBase(container) +{ + // Initialise default style settings + SetName(wxT("Text")); + + //----------------------------------------------- + // Load laguage settings from configuration file + //----------------------------------------------- + + // Set the key words and the lexer + wxString keyWords; + std::list styles; + + // Read the configuration file + if(EditorConfigST::Get()->IsOk()){ + styles = EditorConfigST::Get()->GetLexer(wxT("Text"))->GetProperties(); + } + + // Update the control + LEditor &rCtrl = GetCtrl(); + rCtrl.SetLexer(wxSCI_LEX_NULL); + rCtrl.StyleClearAll(); + + std::list::iterator iter = styles.begin(); + for(iter != styles.end(); iter != styles.end(); iter++) + { + int size = (*iter).GetFontSize(); + wxString face = (*iter).GetFaceName(); + bool bold = (*iter).IsBold(); + + wxFont font; + if((*iter).GetId() == wxSCI_STYLE_CALLTIP){ + font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + } else { + font = wxFont(size, wxFONTFAMILY_TELETYPE, wxNORMAL, bold ? wxBOLD : wxNORMAL, false, face); + } + + if((*iter).GetId() == 0){ //default + rCtrl.StyleSetFont(wxSCI_STYLE_DEFAULT, font); + rCtrl.StyleSetSize(wxSCI_STYLE_DEFAULT, (*iter).GetFontSize()); + rCtrl.StyleSetForeground(wxSCI_STYLE_DEFAULT, (*iter).GetFgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_DEFAULT, (*iter).GetBgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_LINENUMBER, (*iter).GetBgColour()); + rCtrl.StyleSetSize(wxSCI_STYLE_LINENUMBER, (*iter).GetFontSize()); + } + + rCtrl.StyleSetFont((*iter).GetId(), font); + rCtrl.StyleSetSize((*iter).GetId(), (*iter).GetFontSize()); + rCtrl.StyleSetForeground((*iter).GetId(), (*iter).GetFgColour()); + rCtrl.StyleSetBackground((*iter).GetId(), (*iter).GetBgColour()); + } +} + +ContextText::~ContextText() +{ +} + +ContextBase *ContextText::NewInstance(LEditor *container){ + return new ContextText(container); +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextText::AutoIndent(const wxChar &nChar) +{ + ContextBase::AutoIndent(nChar); +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextText::CodeComplete() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextText::CompleteWord() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextText::GotoDefinition() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextText::GotoPreviousDefintion() +{ +} diff --git a/LiteEditor/context_text.h b/LiteEditor/context_text.h new file mode 100644 index 0000000000..eeb1e9472a --- /dev/null +++ b/LiteEditor/context_text.h @@ -0,0 +1,53 @@ +#ifndef CONTEXT_TEXT_H +#define CONTEXT_TEXT_H + +#include "wx/string.h" +#include "wx/wxscintilla.h" +#include "smart_ptr.h" +#include "context_base.h" + +class LEditor; + +/** + * \ingroup LiteEditor + * \brief the basic editor from which complicated editors derives from (e.g. ContextCpp) + * + * \version 1.0 + * first version + * + * \date 04-30-2007 + * + * \author Eran + * + * + */ +class ContextText : public ContextBase { +public: + //--------------------------------------- + // ctors-dtor + //--------------------------------------- + ContextText(LEditor *container); + ContextText() : ContextBase(wxT("Text")) {}; + virtual ~ContextText(); + LEditor &GetCtrl() { return *m_container; } + virtual ContextBase *NewInstance(LEditor *container); + + //--------------------------------------- + // Operations + //--------------------------------------- + virtual void CompleteWord(); + virtual void CodeComplete(); + virtual void GotoDefinition(); + virtual void GotoPreviousDefintion(); + virtual void AutoIndent(const wxChar&); + virtual void CallTipCancel(){}; + + virtual bool IsCommentOrString(long WXUNUSED(pos)){ return false; } + + // event handlers + virtual void OnDwellEnd(wxScintillaEvent & WXUNUSED(event)) {}; + virtual void OnCallTipClick(wxScintillaEvent& WXUNUSED(event)) {}; + virtual void OnDwellStart(wxScintillaEvent & WXUNUSED(event)) {}; +}; +#endif // CONTEXT_TEXT_H + diff --git a/LiteEditor/cpp_symbol_tree.cpp b/LiteEditor/cpp_symbol_tree.cpp new file mode 100644 index 0000000000..18c032d549 --- /dev/null +++ b/LiteEditor/cpp_symbol_tree.cpp @@ -0,0 +1,185 @@ +#include "precompiled_header.h" + +#include "cpp_symbol_tree.h" +#include "manager.h" +#include +#include + +IMPLEMENT_DYNAMIC_CLASS(CppSymbolTree, SymbolTree) + +//---------------------------------------------------------------- +// accessory function +//---------------------------------------------------------------- +wxImageList* CreateSymbolTreeImages() +{ + wxImageList *images = new wxImageList(16, 16, true); + + images->Add(wxXmlResource::Get()->LoadBitmap(_T("project"))); // 0 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("namespace"))); // 1 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("globals"))); // 2 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("class"))); // 3 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("struct"))); // 4 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("func_public"))); // 5 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("func_protected"))); // 6 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("func_private"))); // 7 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("member_public"))); // 8 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("member_protected")));// 9 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("member_private"))); // 10 + + wxBitmap bmp; + + // typedef + bmp = wxXmlResource::Get()->LoadBitmap(_T("typedef")); // 11 + bmp.SetMask(new wxMask(bmp, wxColor(0, 128, 128))); + images->Add(bmp); + + // macro (same icon as typedef) + bmp = wxXmlResource::Get()->LoadBitmap(_T("typedef")); // 12 + bmp.SetMask(new wxMask(bmp, wxColor(0, 128, 128))); + images->Add(bmp); + + bmp = wxXmlResource::Get()->LoadBitmap(_T("enum")); // 13 + bmp.SetMask(new wxMask(bmp, wxColor(0, 128, 128))); + images->Add(bmp); + + bmp = wxXmlResource::Get()->LoadBitmap(wxT("enumerator")); //14 + images->Add(bmp); + + bmp = wxXmlResource::Get()->LoadBitmap(wxT("class_view")); //15 + images->Add(bmp); + return images; +} + +CppSymbolTree::CppSymbolTree() +{ +} + +CppSymbolTree::CppSymbolTree(wxWindow *parent, const wxWindowID id, const wxPoint &pos, const wxSize &size, long style) +: SymbolTree(parent, id, pos, size, style) +{ + Connect(GetId(), wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEventHandler(CppSymbolTree::OnMouseRightUp)); + Connect(GetId(), wxEVT_LEFT_DCLICK, wxMouseEventHandler(CppSymbolTree::OnMouseDblClick)); + Connect(GetId(), wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEventHandler(CppSymbolTree::OnItemActivated)); +} + +void CppSymbolTree::OnMouseRightUp(wxTreeEvent &event) +{ + wxTreeItemId item = event.GetItem(); + if(item.IsOk()){ + SelectItem(item, true); + } +} + +void CppSymbolTree::OnMouseDblClick(wxMouseEvent& event) +{ + //----------------------------------------------------- + // We override the doubleclick on item event + // to demonstrate how to access the tag information + // stored in the symbol tree + //----------------------------------------------------- + + wxTreeItemId treeItem = GetSelection(); + if(!treeItem) + { + event.Skip(); + return; + } + + // Make sure the double click was done on an actual item + int flags = wxTREE_HITTEST_ONITEMLABEL; + if(HitTest(event.GetPosition(), flags) != treeItem) + { + event.Skip(); + return; + } + + DoItemActivated(treeItem, event); +} + +bool CppSymbolTree::ActivateSelectedItem() +{ + wxTreeItemId item = GetSelection(); + wxTreeEvent dummy; + return DoItemActivated(item, dummy); +} + +bool CppSymbolTree::DoItemActivated(wxTreeItemId item, wxEvent &event) +{ + //----------------------------------------------------- + // Each tree items, keeps a private user data that + // holds the key for searching the its corresponding + // node in the m_tree data structure + //----------------------------------------------------- + if(item.IsOk() == false) + return false; + + MyTreeItemData* itemData = static_cast(GetItemData(item)); + if( !itemData ){ + event.Skip(); + return false; + } + + wxString filename = itemData->GetFileName(); + wxString project = ManagerST::Get()->GetProjectNameByFile(filename); + int lineno = itemData->GetLineno()-1; + + // Open the file and set the cursor to line number + ManagerST::Get()->OpenFile(filename, project, lineno); + return true; +} + +void CppSymbolTree::OnItemActivated(wxTreeEvent &event) +{ + if(event.GetKeyCode() == WXK_RETURN){ + wxTreeItemId item = GetSelection(); + DoItemActivated(item, event); + }else{ + event.Skip(); + } +} + +void CppSymbolTree::AdvanceSelection(bool forward){ + wxTreeItemId item = GetSelection(); + if (!item.IsOk()){ + return; + } + + wxTreeItemId nextItem; + if(forward){ + //Item is visible, scroll to it to make sure GetNextVisible() wont + //fail + ScrollTo(item); + nextItem = GetNextVisible(item); + }else{ + nextItem = TryGetPrevItem(item); + } + + if(nextItem.IsOk()){ + SelectItem(nextItem); + } +} + +wxTreeItemId CppSymbolTree::TryGetPrevItem(wxTreeItemId item) +{ + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); + + // find out the starting point + wxTreeItemId prevItem = GetPrevSibling(item); + if ( !prevItem.IsOk() ) + { + prevItem = GetItemParent(item); + } + + // from there we must be able to navigate until this item + while ( prevItem.IsOk() ) + { + ScrollTo(prevItem); + const wxTreeItemId nextItem = GetNextVisible(prevItem); + if ( !nextItem.IsOk() || nextItem == item ) + return prevItem; + + prevItem = nextItem; + } + + return wxTreeItemId(); +} diff --git a/LiteEditor/cpp_symbol_tree.h b/LiteEditor/cpp_symbol_tree.h new file mode 100644 index 0000000000..8aff178773 --- /dev/null +++ b/LiteEditor/cpp_symbol_tree.h @@ -0,0 +1,44 @@ +#ifndef LITEEDITOR_CPP_SYMBOL_TREE_H +#define LITEEDITOR_CPP_SYMBOL_TREE_H + +#include "symbol_tree.h" +#include "stack" + +/// This class represents the GUI tree for the C++ symbols +class CppSymbolTree : public SymbolTree +{ + std::stack m_itemsStack; + +public: + + CppSymbolTree(); + + /// Nothing special here, just call our parent constructor + CppSymbolTree(wxWindow *parent, const wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS); + + + /// destructor + virtual ~CppSymbolTree() + {}; + + //activate the selected item. + //If there is no selection, retun false, + //else try to open the file associated with the + //selected item + //return true on successfull operation false otherwise + bool ActivateSelectedItem(); + + //advance the selection to next item (if possible) + void AdvanceSelection(bool forward = true); + +protected: + virtual void OnMouseDblClick(wxMouseEvent& event); + virtual void OnMouseRightUp(wxTreeEvent& event); + virtual void OnItemActivated(wxTreeEvent &event); + bool DoItemActivated(wxTreeItemId item, wxEvent &event); + wxTreeItemId TryGetPrevItem(wxTreeItemId item); + + DECLARE_DYNAMIC_CLASS(CppSymbolTree) +}; + +#endif // LITEEDITOR_CPP_SYMBOL_TREE_H diff --git a/LiteEditor/dbgcommandbasedlg.cpp b/LiteEditor/dbgcommandbasedlg.cpp new file mode 100644 index 0000000000..d5c6957d71 --- /dev/null +++ b/LiteEditor/dbgcommandbasedlg.cpp @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dbgcommandbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +DbgCommandBaseDlg::DbgCommandBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + fgSizer1->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Command:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlCommand = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlCommand, 0, wxALL|wxEXPAND, 5 ); + + bSizer7->Add( fgSizer1, 1, wxEXPAND, 5 ); + + m_checkBox1 = new wxCheckBox( this, wxID_ANY, wxT("Add this command as a sub menu item of the editor's context menu"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer7->Add( m_checkBox1, 0, wxALL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer7->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOk = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_buttonOk, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer7->Add( bSizer8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer7 ); + this->Layout(); +} diff --git a/LiteEditor/dbgcommandbasedlg.h b/LiteEditor/dbgcommandbasedlg.h new file mode 100644 index 0000000000..dac9db06df --- /dev/null +++ b/LiteEditor/dbgcommandbasedlg.h @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dbgcommandbasedlg__ +#define __dbgcommandbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DbgCommandBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class DbgCommandBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText2; + wxTextCtrl* m_textCtrlName; + wxStaticText* m_staticText3; + wxTextCtrl* m_textCtrlCommand; + wxCheckBox* m_checkBox1; + wxStaticLine* m_staticline2; + wxButton* m_buttonOk; + wxButton* m_buttonCancel; + + public: + DbgCommandBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Debugger Command:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 456,160 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__dbgcommandbasedlg__ diff --git a/LiteEditor/dbgcommanddlg.cpp b/LiteEditor/dbgcommanddlg.cpp new file mode 100644 index 0000000000..936bb171ee --- /dev/null +++ b/LiteEditor/dbgcommanddlg.cpp @@ -0,0 +1,6 @@ +#include "dbgcommanddlg.h" + +DbgCommandDlg::DbgCommandDlg( wxWindow* parent ) +: DbgCommandBaseDlg( parent, wxID_ANY, wxT("Debugger Command:"), wxDefaultPosition, wxSize( 456,160 ), wxDEFAULT_DIALOG_STYLE) +{ +} diff --git a/LiteEditor/dbgcommanddlg.h b/LiteEditor/dbgcommanddlg.h new file mode 100644 index 0000000000..99fa86ae1f --- /dev/null +++ b/LiteEditor/dbgcommanddlg.h @@ -0,0 +1,25 @@ +#ifndef __dbgcommanddlg__ +#define __dbgcommanddlg__ + +/** +@file +Subclass of DbgCommandBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "dbgcommandbasedlg.h" + +/** Implementing DbgCommandBaseDlg */ +class DbgCommandDlg : public DbgCommandBaseDlg +{ +public: + /** Constructor */ + DbgCommandDlg( wxWindow* parent ); + wxString GetCommand(){return m_textCtrlCommand->GetValue();} + wxString GetName(){return m_textCtrlName->GetValue();} + void SetName(const wxString &name){m_textCtrlName->SetValue(name);} + void SetCommand(const wxString &cmd){m_textCtrlCommand->SetValue(cmd);} + bool IsSubMenu(){return m_checkBox1->GetValue();} + void SetAsSubMenu(bool b){m_checkBox1->SetValue(b);} +}; + +#endif // __dbgcommanddlg__ diff --git a/LiteEditor/debuggerpane.cpp b/LiteEditor/debuggerpane.cpp new file mode 100644 index 0000000000..39c5a52c34 --- /dev/null +++ b/LiteEditor/debuggerpane.cpp @@ -0,0 +1,88 @@ +#include "debuggerpane.h" +#include "localvarstree.h" +#include "simpletable.h" +#include "listctrlpanel.h" +#include "wx/xrc/xmlres.h" +#include "manager.h" +#include "breakpointdlg.h" +#include "threadlistpanel.h" + +const wxString DebuggerPane::LOCALS = wxT("Locals"); +const wxString DebuggerPane::WATCHES = wxT("Watches"); +const wxString DebuggerPane::FRAMES = wxT("Stack"); +const wxString DebuggerPane::BREAKPOINTS = wxT("Breakpoints"); +const wxString DebuggerPane::THREADS = wxT("Threads"); + +DebuggerPane::DebuggerPane(wxWindow *parent, const wxString &caption) +: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 300)) +, m_caption(caption) +{ + CreateGUIControls(); + m_book->Connect(m_book->GetId(), wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED, wxFlatNotebookEventHandler(DebuggerPane::OnPageChanged), NULL, this); +} + +DebuggerPane::~DebuggerPane() +{ + m_book->DeleteAllPages(); +} + +void DebuggerPane::OnPageChanged(wxFlatNotebookEvent &event) +{ + wxUnusedVar(event); + ManagerST::Get()->UpdateDebuggerPane(); +} + +void DebuggerPane::CreateGUIControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + + m_imageList.Add(wxXmlResource::Get()->LoadBitmap(wxT("frames"))); //frames + m_imageList.Add(wxXmlResource::Get()->LoadBitmap(wxT("watches"))); //watches + m_imageList.Add(wxXmlResource::Get()->LoadBitmap(wxT("locals_view"))); //locals + m_imageList.Add(wxXmlResource::Get()->LoadBitmap(wxT("breakpoint"))); //breakpoint + m_imageList.Add(wxXmlResource::Get()->LoadBitmap(wxT("threads"))); //threads + + long bookStyle = wxFNB_BOTTOM | wxFNB_NO_X_BUTTON | wxFNB_NO_NAV_BUTTONS | wxFNB_DROPDOWN_TABS_LIST | wxFNB_FF2 | wxFNB_BACKGROUND_GRADIENT | wxFNB_CUSTOM_DLG | wxFNB_TABS_BORDER_SIMPLE; + m_book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, bookStyle); + m_book->SetImageList(&m_imageList); + m_book->SetCustomizeOptions(wxFNB_CUSTOM_LOCAL_DRAG | wxFNB_CUSTOM_ORIENTATION | wxFNB_CUSTOM_TAB_LOOK); + + mainSizer->Add(m_book, 1, wxEXPAND); + m_localsTree = new LocalVarsTree(m_book, wxID_ANY); + m_book->AddPage(m_localsTree, LOCALS, true, 2); + + //add the watches view + m_watchesTable = new SimpleTable(m_book); + m_book->AddPage(m_watchesTable, WATCHES, false, 1); + + m_frameList = new ListCtrlPanel(m_book); + m_book->AddPage(m_frameList, FRAMES, false, 0); + + m_breakpoints = new BreakpointDlg(m_book); + m_book->AddPage(m_breakpoints, BREAKPOINTS, false, 3); + + m_threads = new ThreadListPanel(m_book); + m_book->AddPage(m_threads, THREADS, false, 4); +} + +void DebuggerPane::SelectTab(const wxString &tabName) +{ + for(size_t i=0; i< (size_t)m_book->GetPageCount(); i++){ + if(m_book->GetPageText(i) == tabName){ + m_book->SetSelection(i); + break; + } + } +} + +void DebuggerPane::Clear() +{ + GetLocalsTree()->Clear(); + GetWatchesTable()->Clear(); + GetFrameListView()->Clear(); + GetThreadsView()->Clear(); +} + + + diff --git a/LiteEditor/debuggerpane.h b/LiteEditor/debuggerpane.h new file mode 100644 index 0000000000..629f6fbaff --- /dev/null +++ b/LiteEditor/debuggerpane.h @@ -0,0 +1,54 @@ +#ifndef DEBUGGERPANE_H +#define DEBUGGERPANE_H + +#include "wx/panel.h" +#include +#include + +class ListCtrlPanel; +class LocalVarsTree; +class SimpleTable; +class BreakpointDlg; +class ThreadListPanel; + +class DebuggerPane : public wxPanel +{ +public: + static const wxString LOCALS; + static const wxString WATCHES; + static const wxString FRAMES; + static const wxString BREAKPOINTS; + static const wxString THREADS; + +private: + wxFlatNotebook *m_book; + LocalVarsTree *m_localsTree; + wxString m_caption; + SimpleTable *m_watchesTable; + ListCtrlPanel *m_frameList; + wxFlatNotebookImageList m_imageList; + BreakpointDlg *m_breakpoints; + ThreadListPanel *m_threads; + +private: + void CreateGUIControls(); + void OnPageChanged(wxFlatNotebookEvent &event); + +public: + DebuggerPane(wxWindow *parent, const wxString &caption); + virtual ~DebuggerPane(); + + //setters/getters + const wxString &GetCaption() const{return m_caption;} + LocalVarsTree *GetLocalsTree() {return m_localsTree;} + SimpleTable *GetWatchesTable(){return m_watchesTable;} + ListCtrlPanel *GetFrameListView(){return m_frameList;} + BreakpointDlg *GetBreakpointView(){return m_breakpoints;} + ThreadListPanel *GetThreadsView(){return m_threads;} + wxFlatNotebook *GetNotebook(){return m_book;} + void SelectTab(const wxString &tabName); + void Clear(); +}; + +#endif //DEBUGGERPANE_H + diff --git a/LiteEditor/debuggersettingsbasedlg.cpp b/LiteEditor/debuggersettingsbasedlg.cpp new file mode 100644 index 0000000000..ab2165963d --- /dev/null +++ b/LiteEditor/debuggersettingsbasedlg.cpp @@ -0,0 +1,105 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "debuggersettingsbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +DebuggerSettingsBaseDlg::DebuggerSettingsBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + long bookStyle = wxFNB_FF2 | wxFNB_BACKGROUND_GRADIENT | wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON; + m_notebook2 = new wxFlatNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, bookStyle); + m_panel2 = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + + m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT ); + bSizer5->Add( m_listCtrl1, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + m_buttonNewType = new wxButton( m_panel2, wxID_ANY, wxT("&New..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_buttonNewType, 0, wxALL, 5 ); + + m_buttonEdit = new wxButton( m_panel2, wxID_ANY, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_buttonEdit, 0, wxALL, 5 ); + + m_buttonDelete = new wxButton( m_panel2, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_buttonDelete, 0, wxALL, 5 ); + + bSizer5->Add( bSizer6, 0, wxEXPAND, 5 ); + + bSizer4->Add( bSizer5, 1, wxEXPAND, 5 ); + + m_panel2->SetSizer( bSizer4 ); + m_panel2->Layout(); + bSizer4->Fit( m_panel2 ); + m_notebook2->AddPage( m_panel2, wxT("Shortcuts"), true ); + m_panel1 = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + //remove the raident from the inner panel + bookStyle &= ~(wxFNB_BACKGROUND_GRADIENT); + m_book = new wxFlatNotebook( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, bookStyle); + + bSizer3->Add( m_book, 1, wxEXPAND | wxALL, 5 ); + + m_panel1->SetSizer( bSizer3 ); + m_panel1->Layout(); + bSizer3->Fit( m_panel1 ); + m_notebook2->AddPage( m_panel1, wxT("Loaded Debuggers"), false ); + + bSizer1->Add( m_notebook2, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemActivated ), NULL, this ); + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemDeselected ), NULL, this ); + m_listCtrl1->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DebuggerSettingsBaseDlg::OnItemSelected ), NULL, this ); + m_buttonNewType->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnNewShortcut ), NULL, this ); + m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnEditShortcut ), NULL, this ); + m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnDeleteShortcut ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DebuggerSettingsBaseDlg::OnButtonCancel ), NULL, this ); +} diff --git a/LiteEditor/debuggersettingsbasedlg.h b/LiteEditor/debuggersettingsbasedlg.h new file mode 100644 index 0000000000..5f7ea8a749 --- /dev/null +++ b/LiteEditor/debuggersettingsbasedlg.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __debuggersettingsbasedlg__ +#define __debuggersettingsbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DebuggerSettingsBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class DebuggerSettingsBaseDlg : public wxDialog +{ + private: + + protected: + wxFlatNotebook* m_notebook2; + wxPanel* m_panel2; + wxListCtrl* m_listCtrl1; + wxButton* m_buttonNewType; + wxButton* m_buttonEdit; + wxButton* m_buttonDelete; + wxPanel* m_panel1; + wxFlatNotebook* m_book; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + virtual void OnItemDeselected( wxListEvent& event ){ event.Skip(); } + virtual void OnItemSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnNewShortcut( wxCommandEvent& event ){ event.Skip(); } + virtual void OnEditShortcut( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDeleteShortcut( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + DebuggerSettingsBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Debugger Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 537,451 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__debuggersettingsbasedlg__ diff --git a/LiteEditor/debuggersettingsdlg.cpp b/LiteEditor/debuggersettingsdlg.cpp new file mode 100644 index 0000000000..16182a1687 --- /dev/null +++ b/LiteEditor/debuggersettingsdlg.cpp @@ -0,0 +1,273 @@ +#include "debuggersettingsdlg.h" +#include "debuggermanager.h" +#include "macros.h" +#include "manager.h" +#include "globals.h" +#include "dbgcommanddlg.h" +#include "debuggerconfigtool.h" + +//------------------------------------------------------------------- +DebuggerPage::DebuggerPage(wxWindow *parent, wxString title) + : wxPanel(parent) + , m_title(title) +{ + wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); + SetSizer(sz); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); + + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + sz->Add(fgSizer2, 0, wxEXPAND|wxALL); + + wxStaticText *m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Debugger Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + fgSizer2->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_filePicker = new FilePicker( this ); + fgSizer2->Add( m_filePicker, 0, wxALL|wxEXPAND, 5 ); + + m_checkBoxEnableLog = new wxCheckBox( this, wxID_ANY, wxT("Enable full debugger logging"), wxDefaultPosition, wxDefaultSize, 0 ); + sz->Add(m_checkBoxEnableLog, 0, wxEXPAND|wxALL, 5); + + m_checkBoxEnablePendingBreakpoints = new wxCheckBox(this, wxID_ANY, wxT("Enable pending breakpoint"), wxDefaultPosition, wxDefaultSize, 0 ); + sz->Add(m_checkBoxEnablePendingBreakpoints, 0, wxEXPAND|wxALL, 5); + + m_checkBreakAtWinMain = new wxCheckBox(this, wxID_ANY, wxT("Automatically set breakpoint at main"), wxDefaultPosition, wxDefaultSize, 0 ); + sz->Add(m_checkBreakAtWinMain, 0, wxEXPAND|wxALL, 5); + sz->Layout(); + + DebuggerInformation info; + if(DebuggerMgr::Get().GetDebuggerInformation(m_title, info)){ + m_filePicker->SetPath(info.path); + m_checkBoxEnableLog->SetValue(info.enableDebugLog); + m_checkBoxEnablePendingBreakpoints->SetValue(info.enablePendingBreakpoints); + m_checkBreakAtWinMain->SetValue(info.breakAtWinMain); + } +} + +DebuggerPage::~DebuggerPage() +{ +} + +//------------------------------------------------------------------- + +DebuggerSettingsDlg::DebuggerSettingsDlg( wxWindow* parent ) + :DebuggerSettingsBaseDlg( parent ) + , m_selectedItem(wxNOT_FOUND) +{ + //fill the notebook with the available debuggers + Initialize(); + ConnectButton(m_buttonOK, DebuggerSettingsDlg::OnOk); +} + +void DebuggerSettingsDlg::Initialize() +{ + DebuggerMgr &mgr = DebuggerMgr::Get(); + wxArrayString debuggers = mgr.GetAvailableDebuggers(); + for (size_t i=0; iAddPage(new DebuggerPage(m_book, debuggers.Item(i)), debuggers.Item(i), true); + } + + m_listCtrl1->InsertColumn(0, wxT("Name")); + m_listCtrl1->InsertColumn(1, wxT("Command")); + m_listCtrl1->InsertColumn(2, wxT("Sub Menu?")); + + //add items from the saved items + DebuggerConfigTool::Get()->ReadObject(wxT("DebuggerCommands"), &m_data); + + //Populate the list with the items from the configuration file + std::vector cmds = m_data.GetCmds(); + for (size_t i=0; iInsertItem(info); + + SetColumnText(m_listCtrl1, item, 0, cmd.GetName()); + SetColumnText(m_listCtrl1, item, 1, cmd.GetCommand()); + SetColumnText(m_listCtrl1, item, 2, subMenu); + } +} + +void DebuggerSettingsDlg::OnOk(wxCommandEvent &e) +{ + wxUnusedVar(e); + //go over the debuggers and set the debugger path + for (size_t i=0; i<(size_t)m_book->GetPageCount(); i++) { + DebuggerPage *page = (DebuggerPage *)m_book->GetPage(i); + + //find the debugger + DebuggerInformation info; + DebuggerMgr::Get().GetDebuggerInformation(page->m_title, info); + + //populate the information and save it + info.enableDebugLog = page->m_checkBoxEnableLog->GetValue(); + info.enablePendingBreakpoints = page->m_checkBoxEnablePendingBreakpoints->GetValue(); + info.path = page->m_filePicker->GetPath(); + info.name = page->m_title; + info.breakAtWinMain = page->m_checkBreakAtWinMain->GetValue(); + + DebuggerMgr::Get().SetDebuggerInformation(page->m_title, info); + } + + //copy the commands the serialized object m_data + int count = m_listCtrl1->GetItemCount(); + std::vector cmdArr; + for(int i=0; iWriteObject(wxT("DebuggerCommands"), &m_data); + EndModal(wxID_OK); +} + +void DebuggerSettingsDlg::OnButtonCancel(wxCommandEvent &e) +{ + wxUnusedVar(e); + EndModal(wxID_CANCEL); +} + +void DebuggerSettingsDlg::OnNewShortcut(wxCommandEvent &e) +{ + wxUnusedVar(e); + DbgCommandDlg *dlg = new DbgCommandDlg(this); + if (dlg->ShowModal() == wxID_OK) { + //add new command to the table + wxString name = dlg->GetName(); + wxString cmd = dlg->GetCommand(); + wxString subMenu; + if (dlg->IsSubMenu()) { + subMenu = wxT("Yes"); + } else { + subMenu = wxT("No"); + } + + long item; + wxListItem info; + + //make sure that the expression does not exist + int count = m_listCtrl1->GetItemCount(); + for(int i=0; iDestroy(); + wxString msg; + wxMessageBox(wxT("Debugger shortcut with the same name already exist"), wxT("CodeLite"), wxOK | wxICON_INFORMATION); + return; + } + } + + // Set the item display name + info.SetColumn(0); + item = m_listCtrl1->InsertItem(info); + + SetColumnText(m_listCtrl1, item, 0, name); + SetColumnText(m_listCtrl1, item, 1, cmd); + SetColumnText(m_listCtrl1, item, 2, subMenu); + + m_listCtrl1->SetColumnWidth(0, 100); + m_listCtrl1->SetColumnWidth(1, 400); + m_listCtrl1->SetColumnWidth(2, 100); + } + dlg->Destroy(); +} + +void DebuggerSettingsDlg::OnItemSelected(wxListEvent &e) +{ + m_selectedItem = e.m_itemIndex; +} + +void DebuggerSettingsDlg::OnItemDeselected(wxListEvent &e) +{ + + wxUnusedVar(e); + m_selectedItem = wxNOT_FOUND; +} + +void DebuggerSettingsDlg::OnEditShortcut(wxCommandEvent &e) +{ + wxUnusedVar(e); + DoEditItem(); +} + +void DebuggerSettingsDlg::OnDeleteShortcut(wxCommandEvent &e) +{ + wxUnusedVar(e); + DoDeleteItem(); +} + +void DebuggerSettingsDlg::OnItemActivated(wxListEvent &e) +{ + m_selectedItem = e.m_itemIndex; + DoEditItem(); +} + +void DebuggerSettingsDlg::DoEditItem() +{ + //Edit the selection + if (m_selectedItem == wxNOT_FOUND) { + return; + } + + //popup edit dialog + DbgCommandDlg *dlg = new DbgCommandDlg(this); + wxString name = GetColumnText(m_listCtrl1, m_selectedItem, 0); + wxString cmd = GetColumnText(m_listCtrl1, m_selectedItem, 1); + wxString sm = GetColumnText(m_listCtrl1, m_selectedItem, 2); + + bool subMenu(false); + if (sm == wxT("Yes")) { + subMenu = true; + } + + dlg->SetName(name); + dlg->SetCommand(cmd); + dlg->SetAsSubMenu(subMenu); + + if (dlg->ShowModal() == wxID_OK) { + //update the item + sm = wxT("No"); + if (dlg->IsSubMenu()) { + sm = wxT("Yes"); + } + + SetColumnText(m_listCtrl1, m_selectedItem, 0, dlg->GetName()); + SetColumnText(m_listCtrl1, m_selectedItem, 1, dlg->GetCommand()); + SetColumnText(m_listCtrl1, m_selectedItem, 2, sm); + } + + dlg->Destroy(); +} + +void DebuggerSettingsDlg::DoDeleteItem() +{ + if (m_selectedItem == wxNOT_FOUND) { + return; + } + m_listCtrl1->DeleteItem(m_selectedItem); + m_selectedItem = wxNOT_FOUND; +} diff --git a/LiteEditor/debuggersettingsdlg.h b/LiteEditor/debuggersettingsdlg.h new file mode 100644 index 0000000000..a8e6a76313 --- /dev/null +++ b/LiteEditor/debuggersettingsdlg.h @@ -0,0 +1,58 @@ +#ifndef __debuggersettingsdlg__ +#define __debuggersettingsdlg__ + +/** +@file +Subclass of DebuggerSettingsBaseDlg, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "debuggersettingsbasedlg.h" +#include "filepicker.h" +#include "debuggersettings.h" + +class DebuggerSettingsDlg; + +class DebuggerPage : public wxPanel +{ + friend class DebuggerSettingsDlg; + FilePicker *m_filePicker; + wxString m_title; + wxCheckBox *m_checkBoxEnablePendingBreakpoints; + wxCheckBox *m_checkBoxEnableLog; + wxCheckBox *m_checkBreakAtWinMain; + +public: + DebuggerPage(wxWindow *parent, wxString title); + virtual ~DebuggerPage(); +}; + + +/** Implementing DebuggerSettingsBaseDlg */ +class DebuggerSettingsDlg : public DebuggerSettingsBaseDlg +{ + long m_selectedItem; + DebuggerSettingsData m_data; + +protected: + void Initialize(); + void OnOk(wxCommandEvent &e); + void OnNewShortcut(wxCommandEvent &e); + void OnDeleteShortcut(wxCommandEvent &e); + void OnEditShortcut(wxCommandEvent &e); + void OnItemSelected(wxListEvent &e); + void OnItemDeselected(wxListEvent &e); + void OnItemActivated(wxListEvent &e); + void OnButtonCancel(wxCommandEvent &e); + +private: + void DoEditItem(); + void DoDeleteItem(); + +public: + /** Constructor */ + DebuggerSettingsDlg( wxWindow* parent ); + +}; + +#endif // __debuggersettingsdlg__ diff --git a/LiteEditor/debuggertip.cpp b/LiteEditor/debuggertip.cpp new file mode 100644 index 0000000000..d2fd4953d6 --- /dev/null +++ b/LiteEditor/debuggertip.cpp @@ -0,0 +1,66 @@ +#if 0 +#include "debuggertip.h" +#include "tiptree.h" +#include "wx/stattext.h" +#include "wx/statline.h" +#include "wx/dcbuffer.h" +#include "manager.h" +#include "editor.h" + +DebuggerTip::DebuggerTip(wxWindow *parent, const wxString &expression, TreeNode *tree, long pos) +: wxPopupWindow(parent) +{ + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); + Initialize(expression, tree, pos); +} + +DebuggerTip::~DebuggerTip() +{ +} + +void DebuggerTip::Initialize(const wxString &expression, TreeNode *tree, long pos) +{ + wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(topSizer); + + wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); + wxPanel *mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER ); + mainPanel->SetSizer(sz); + + wxBoxSizer *hsz = new wxBoxSizer(wxHORIZONTAL); + + wxStaticText *text = new wxStaticText(mainPanel, wxID_ANY, wxT("Expression: ")); + wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + font.SetWeight(wxBOLD); + + text->SetFont(font); + hsz->Add(text, 0, wxEXPAND|wxALL, 5); + + wxStaticText *expr = new wxStaticText(mainPanel, wxID_ANY, expression); + hsz->Add(expr, 0, wxEXPAND|wxALL, 5); + sz->Add(hsz, 0, wxEXPAND); + + wxStaticLine *staticline = new wxStaticLine(mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL); + sz->Add(staticline, 0, wxEXPAND|wxALL, 5); + + m_localVarsTree = new TipTree(mainPanel, wxID_ANY, wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT | wxTR_HIDE_ROOT | wxNO_BORDER); + m_localVarsTree->BuildTree(tree); + sz->Add(m_localVarsTree, 1, wxALL|wxEXPAND, 5); + sz->SetMinSize(200, 200); + + topSizer->Add(sz, 1, wxEXPAND|wxALL, 1); + sz->Fit(mainPanel); + topSizer->Fit(this); + + //set the tip window at the caret place + Manager *mgr = ManagerST::Get(); + LEditor *editor = mgr->GetActiveEditor(); + if(editor){ + wxPoint pt = editor->PointFromPosition(pos); + //pt is in wxScintilla coordinates, need to convert them into + //the screen coordinates + wxPoint displayPt = editor->ClientToScreen(pt); + this->Position(displayPt, wxSize(0, 0)); + } +} +#endif diff --git a/LiteEditor/debuggertip.h b/LiteEditor/debuggertip.h new file mode 100644 index 0000000000..7aeb4459ba --- /dev/null +++ b/LiteEditor/debuggertip.h @@ -0,0 +1,28 @@ +#ifndef DEBUGGERTIP_H +#define DEBUGGERTIP_H + +#if 0 +#include "wx/popupwin.h" +#include "tree_node.h" +#include "debuggerobserver.h" + +class TipTree; + +class DebuggerTip : public wxPopupWindow +{ + TipTree *m_localVarsTree; +protected: + void OnTreeSized(wxCommandEvent &event); + +public: + DebuggerTip(wxWindow *parent, const wxString &expression, TreeNode *tree, long pos); + ~DebuggerTip(); + + void Initialize(const wxString &expression, TreeNode *tree, long pos); +}; + +#endif //DEBUGGERTIP_H + + +#endif + diff --git a/LiteEditor/depend_dlg_page.cpp b/LiteEditor/depend_dlg_page.cpp new file mode 100644 index 0000000000..6cf025b153 --- /dev/null +++ b/LiteEditor/depend_dlg_page.cpp @@ -0,0 +1,177 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "depend_dlg_page.h" +#include "manager.h" +#include "macros.h" + +/////////////////////////////////////////////////////////////////////////// + +DependenciesPage::DependenciesPage( wxWindow* parent, const wxString &projectName, int id, wxPoint pos, wxSize size, int style ) +: wxPanel( parent, id, pos, size, style ) +, m_projectName(projectName) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Projects:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxArrayString m_checkListProjectListChoices; + m_checkListProjectList = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListProjectListChoices, 0 ); + bSizer3->Add( m_checkListProjectList, 1, wxALL|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Build Order:"), wxDefaultPosition, wxDefaultSize, 0 ); + + wxBoxSizer *sz = new wxBoxSizer(wxHORIZONTAL); + bSizer3->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + bSizer3->Add(sz, 1, wxALL|wxEXPAND); + wxBoxSizer *btnSizer = new wxBoxSizer(wxVERTICAL); + + m_listBoxBuildOrder = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sz->Add(m_listBoxBuildOrder, 1, wxALL|wxEXPAND, 5); + sz->Add(btnSizer); + + wxButton *upBtn = new wxButton(this, wxID_ANY, wxT("Up")); + btnSizer->Add(upBtn, 0, wxALL | wxALIGN_TOP, 5); + ConnectButton(upBtn, DependenciesPage::OnMoveUp); + + wxButton *downBtn = new wxButton(this, wxID_ANY, wxT("Down")); + btnSizer->Add(downBtn, 0, wxALL, 5); + ConnectButton(downBtn, DependenciesPage::OnMoveDown); + + mainSizer->Add( bSizer3, 1, wxEXPAND, 5 ); + this->SetSizer( mainSizer ); + this->Layout(); + Init(); +} + +void DependenciesPage::Init() +{ + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(m_projectName, errMsg); + if(proj){ + //initialize the build order listbox + wxArrayString depArr = proj->GetDependencies(); + size_t i=0; + for(i=0; iAppend(item); + } + //initialize the project dependencies check list + wxArrayString projArr; + ManagerST::Get()->GetProjectList(projArr); + + for(i=0; iAppend(projArr.Item(i)); + m_checkListProjectList->Check(idx, depArr.Index(projArr.Item(i)) != wxNOT_FOUND); + } + } + + }else{ + wxMessageBox(errMsg, wxT("CodeLite")); + return; + } + + ConnectCheckList(m_checkListProjectList, DependenciesPage::OnCheckListItemToggled); +} + +void DependenciesPage::OnCheckListItemToggled(wxCommandEvent &event) +{ + int item = event.GetSelection(); + wxString name = m_checkListProjectList->GetString((unsigned int)item); + if(!m_checkListProjectList->IsChecked((unsigned int)item)){ + unsigned int buildOrderId = m_listBoxBuildOrder->FindString(name); + if(buildOrderId != (unsigned int)wxNOT_FOUND){ + m_listBoxBuildOrder->Delete(buildOrderId); + } + } else { + m_listBoxBuildOrder->Append(name); + } +} + +void DependenciesPage::Save() +{ + //create project dependencie list + ProjectPtr proj = ManagerST::Get()->GetProject(m_projectName); + + wxArrayString depsArr; + for(size_t i=0; iGetCount(); i++){ + depsArr.Add(m_listBoxBuildOrder->GetString((unsigned int)i)); + } + proj->SetDependencies(depsArr); +} + +void DependenciesPage::OnMoveUp(wxCommandEvent &event) +{ + wxUnusedVar(event); + OnUpCommand(m_listBoxBuildOrder); +} + +void DependenciesPage::OnMoveDown(wxCommandEvent &event) +{ + wxUnusedVar(event); + OnDownCommand(m_listBoxBuildOrder); +} + +void DependenciesPage::OnUpCommand(wxListBox *list) +{ + wxString selectedString = list->GetStringSelection(); + + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + + sel --; + if(sel < 0){ + return; + } + + // sel contains the new position we want to place the selection string + list->Delete(sel + 1); + list->Insert(selectedString, sel); + list->Select(sel); +} + +void DependenciesPage::OnDownCommand(wxListBox *list) +{ + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + + sel ++; + if(sel >= (int)list->GetCount()){ + return; + } + + // sel contains the new position we want to place the selection string + wxString oldStr = list->GetString(sel); + + list->Delete(sel); + list->Insert(oldStr, sel - 1); + list->Select(sel); +} diff --git a/LiteEditor/depend_dlg_page.h b/LiteEditor/depend_dlg_page.h new file mode 100644 index 0000000000..c7ba35e08a --- /dev/null +++ b/LiteEditor/depend_dlg_page.h @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __depend_dlg_page__ +#define __depend_dlg_page__ + +#include + +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DependenciesPage +/////////////////////////////////////////////////////////////////////////////// +class DependenciesPage : public wxPanel +{ +private: + +protected: + wxStaticText* m_staticText1; + wxCheckListBox* m_checkListProjectList; + wxStaticText* m_staticText2; + wxListBox* m_listBoxBuildOrder; + wxString m_projectName; + + void Init(); + void OnUpCommand(wxListBox *list); + void OnDownCommand(wxListBox *list); + + virtual void OnCheckListItemToggled(wxCommandEvent &event); + virtual void OnMoveUp(wxCommandEvent &event); + virtual void OnMoveDown(wxCommandEvent &event); + +public: + DependenciesPage( wxWindow* parent, const wxString &projName, int id = wxID_ANY, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 500,300 ), int style = wxTAB_TRAVERSAL ); + void Save(); + +}; + +#endif //__depend_dlg_page__ diff --git a/LiteEditor/depends_dlg.cpp b/LiteEditor/depends_dlg.cpp new file mode 100644 index 0000000000..eefaac7bf3 --- /dev/null +++ b/LiteEditor/depends_dlg.cpp @@ -0,0 +1,91 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "depends_dlg.h" +#include "depend_dlg_page.h" +#include "manager.h" +#include +#include "macros.h" + +/////////////////////////////////////////////////////////////////////////// + +DependenciesDlg::DependenciesDlg( wxWindow* parent, const wxString &projectName, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_projectName(projectName) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_book = new wxChoicebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT ); + mainSizer->Add( m_book, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_ANY, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + Init(); +} + +void DependenciesDlg::Init() +{ + //fill the pages of the choice book + wxArrayString projects; + ManagerST::Get()->GetProjectList(projects); + wxString activeProj = ManagerST::Get()->GetActiveProjectName(); + for(size_t i=0; iAddPage(new DependenciesPage(m_book, projects.Item(i)), projects.Item(i), m_projectName == projects.Item(i)); + } + + //connect events + ConnectButton(m_buttonOK, DependenciesDlg::OnButtonOK); + ConnectButton(m_buttonCancel, DependenciesDlg::OnButtonCancel); +} + +void DependenciesDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + for(size_t i=0; iGetPageCount(); i++){ + DependenciesPage *page = dynamic_cast( m_book->GetPage(i) ); + if(page){ + page->Save(); + } + } + EndModal(wxID_OK); +} + +void DependenciesDlg::OnButtonCancel(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_CANCEL); +} diff --git a/LiteEditor/depends_dlg.h b/LiteEditor/depends_dlg.h new file mode 100644 index 0000000000..4d806182fb --- /dev/null +++ b/LiteEditor/depends_dlg.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __depends_dlg__ +#define __depends_dlg__ + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DependenciesDlg +/////////////////////////////////////////////////////////////////////////////// +class DependenciesDlg : public wxDialog +{ +private: + +protected: + wxChoicebook* m_book; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + wxString m_projectName; + + void Init(); + virtual void OnButtonOK(wxCommandEvent &event); + virtual void OnButtonCancel(wxCommandEvent &event); + +public: + DependenciesDlg( wxWindow* parent, const wxString &projectName, int id = wxID_ANY, wxString title = wxT("Dependencies"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 532,361 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__depends_dlg__ diff --git a/LiteEditor/edit_configuration.cpp b/LiteEditor/edit_configuration.cpp new file mode 100644 index 0000000000..9db03a500b --- /dev/null +++ b/LiteEditor/edit_configuration.cpp @@ -0,0 +1,171 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "edit_configuration.h" +#include "manager.h" +#include "project_settings.h" +#include "macros.h" + +/////////////////////////////////////////////////////////////////////////// + +EditConfigurationDialog::EditConfigurationDialog( wxWindow* parent, const wxString &projectName, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_projectName(projectName) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer15; + bSizer15 = new wxBoxSizer( wxVERTICAL ); + + m_panel6 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer17; + bSizer17 = new wxBoxSizer( wxHORIZONTAL ); + + m_configurationsList = new wxListBox( m_panel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer17->Add( m_configurationsList, 1, wxALL|wxEXPAND, 5 ); + + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); + if(settings){ + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); + while(bldConf){ + m_configurationsList->Append(bldConf->GetName()); + bldConf = settings->GetNextBuildConfiguration(cookie); + } + } + if(m_configurationsList->GetCount() > 0) + m_configurationsList->SetSelection(0); + + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxVERTICAL ); + + m_buttonDelete = new wxButton( m_panel6, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer18->Add( m_buttonDelete, 0, wxALL, 5 ); + + m_buttonRename = new wxButton( m_panel6, wxID_ANY, wxT("&Rename"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer18->Add( m_buttonRename, 0, wxALL, 5 ); + bSizer17->Add( bSizer18, 0, wxEXPAND, 5 ); + + m_panel6->SetSizer( bSizer17 ); + m_panel6->Layout(); + bSizer17->Fit( m_panel6 ); + bSizer15->Add( m_panel6, 1, wxALL|wxEXPAND, 5 ); + + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer15->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonClose = new wxButton( this, wxID_OK, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer16->Add( m_buttonClose, 0, wxALL, 5 ); + + bSizer15->Add( bSizer16, 0, wxALIGN_CENTER, 5 ); + + this->SetSizer( bSizer15 ); + this->Layout(); + + ConnectListBoxDClick(m_configurationsList, EditConfigurationDialog::OnItemDclick); + ConnectButton(m_buttonClose, EditConfigurationDialog::OnButtonClose); + ConnectButton(m_buttonRename, EditConfigurationDialog::OnButtonRename); + ConnectButton(m_buttonDelete, EditConfigurationDialog::OnButtonDelete); +} + +void EditConfigurationDialog::RenameConfiguration(const wxString &oldName, const wxString &newName) +{ + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); + if(settings){ + BuildConfigPtr bldConf = settings->GetBuildConfiguration(oldName); + if(bldConf){ + settings->RemoveConfiguration(oldName); + bldConf->SetName(newName); + settings->SetBuildConfiguration(bldConf); + //save changes + ManagerST::Get()->SetProjectSettings(m_projectName, settings); + + //update the control + m_configurationsList->Clear(); + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); + while(bldConf){ + m_configurationsList->Append(bldConf->GetName()); + bldConf = settings->GetNextBuildConfiguration(cookie); + } + if(m_configurationsList->GetCount()>0) + m_configurationsList->SetSelection(0); + } + } +} + +void EditConfigurationDialog::OnItemDclick(wxCommandEvent &event) +{ + wxString oldName = event.GetString(); + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, wxT("Enter New Name:"), wxT("Rename"), oldName); + dlg->SetTextValidator(wxFILTER_ALPHANUMERIC); + + if(dlg->ShowModal() == wxID_OK){ + wxString newName = dlg->GetValue(); + RenameConfiguration(oldName, newName); + } +} + +void EditConfigurationDialog::OnButtonClose(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_OK); +} + +void EditConfigurationDialog::OnButtonRename(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString oldName = m_configurationsList->GetStringSelection(); + if(oldName.IsEmpty()){ + return; + } + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, wxT("Enter New Name:"), wxT("Rename"), oldName); + dlg->SetTextValidator(wxFILTER_ALPHANUMERIC); + + if(dlg->ShowModal() == wxID_OK){ + wxString newName = dlg->GetValue(); + RenameConfiguration(oldName, newName); + } +} + +void EditConfigurationDialog::OnButtonDelete(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString selection = m_configurationsList->GetStringSelection() ; + if(selection.IsEmpty()){ + return; + } + wxString msg(wxT("Remove configuration '")); + msg << selection << wxT("' ?"); + if(wxMessageBox(msg, wxT("Confirm"), wxYES_NO | wxCANCEL | wxICON_QUESTION) == wxYES){ + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); + if(settings){ + settings->RemoveConfiguration(selection); + m_configurationsList->Delete(m_configurationsList->GetSelection()); + if(m_configurationsList->GetCount()>0) + m_configurationsList->SetSelection(0); + + //save changes + ManagerST::Get()->SetProjectSettings(m_projectName, settings); + } + } +} diff --git a/LiteEditor/edit_configuration.h b/LiteEditor/edit_configuration.h new file mode 100644 index 0000000000..b9e7489873 --- /dev/null +++ b/LiteEditor/edit_configuration.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __edit_configuration__ +#define __edit_configuration__ + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class EditConfigurationDialog +/////////////////////////////////////////////////////////////////////////////// +class EditConfigurationDialog : public wxDialog +{ +private: + +protected: + wxPanel* m_panel6; + wxListBox* m_configurationsList; + wxButton* m_buttonDelete; + wxButton* m_buttonRename; + wxStaticLine* m_staticline9; + wxButton* m_buttonClose; + wxString m_projectName; + + void OnItemDclick(wxCommandEvent &event); + void OnButtonClose(wxCommandEvent &event); + void OnButtonRename(wxCommandEvent &event); + void OnButtonDelete(wxCommandEvent &event); + + void RenameConfiguration(const wxString &oldName, const wxString &newName); + +public: + EditConfigurationDialog( wxWindow* parent, const wxString &projectName, int id = wxID_ANY, wxString title = wxT("Edit Configurations"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 338,199 ), int style = wxDEFAULT_DIALOG_STYLE ); +}; + +#endif //__edit_configuration__ diff --git a/LiteEditor/edit_workspace_conf_dlg.cpp b/LiteEditor/edit_workspace_conf_dlg.cpp new file mode 100644 index 0000000000..96000ee032 --- /dev/null +++ b/LiteEditor/edit_workspace_conf_dlg.cpp @@ -0,0 +1,148 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "edit_workspace_conf_dlg.h" +#include "macros.h" +#include "manager.h" + +/////////////////////////////////////////////////////////////////////////// + +EditWorkspaceConfDlg::EditWorkspaceConfDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_wspConfList = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + mainSizer->Add( m_wspConfList, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxVERTICAL ); + + m_buttonRename = new wxButton( this, wxID_ANY, wxT("&Rename"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonRename, 0, wxALL, 5 ); + + m_buttonDelete = new wxButton( this, wxID_ANY, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonDelete, 0, wxALL, 5 ); + + m_buttonClose = new wxButton( this, wxID_CANCEL, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonClose, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxEXPAND, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + CustomInit(); +} + +void EditWorkspaceConfDlg::OnListBoxDClick(wxCommandEvent &event) +{ + DoRename(event.GetString()); +} + +void EditWorkspaceConfDlg::CustomInit() +{ + //fill the list box + FillList(); + + ConnectButton(m_buttonDelete, EditWorkspaceConfDlg::OnDelete); + ConnectButton(m_buttonRename, EditWorkspaceConfDlg::OnRename); + ConnectListBoxDClick(m_wspConfList, EditWorkspaceConfDlg::OnRename); +} + +void EditWorkspaceConfDlg::FillList() +{ + m_wspConfList->Clear(); + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + std::list confs; + + confs = matrix->GetConfigurations(); + std::list::iterator iter = confs.begin(); + + for(; iter != confs.end(); iter++){ + m_wspConfList->Append((*iter)->GetName()); + m_wspConfList->SetSelection(0); + } +} + +void EditWorkspaceConfDlg::OnDelete(wxCommandEvent &event) +{ + wxUnusedVar(event); + if(m_wspConfList->GetCount() == 0){ + return; + } + wxString delMe = m_wspConfList->GetStringSelection(); + if(delMe.IsEmpty()){ + return; + } + + //remove the requested workspace build configuration + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + wxString msg; + msg << wxT("Remove workspace configuration '") << delMe << wxT("' ?"); + if(wxMessageBox(msg, wxT("CodeLite"), wxICON_QUESTION | wxYES_NO | wxCANCEL) == wxYES){ + matrix->RemoveConfiguration(delMe); + //apply changes + ManagerST::Get()->SetWorkspaceBuildMatrix(matrix); + + //refresh list + FillList(); + } +} + +void EditWorkspaceConfDlg::DoRename(const wxString &selItem) +{ + wxTextEntryDialog *dlg = new wxTextEntryDialog(this, wxT("New Configuration Name:"), wxT("Rename"), selItem); + if(dlg->ShowModal() == wxID_OK){ + wxString newName = dlg->GetValue(); + TrimString(newName); + if(!newName.IsEmpty()){ + BuildMatrixPtr matrix = ManagerST::Get()->GetWorkspaceBuildMatrix(); + WorkspaceConfigurationPtr conf = matrix->GetConfigurationByName(selItem); + //rename the configuration + conf->SetName(newName); + matrix->SetConfiguration(conf); + matrix->RemoveConfiguration(selItem); + + //apply changes + ManagerST::Get()->SetWorkspaceBuildMatrix(matrix); + //refresh list + FillList(); + } + } + dlg->Destroy(); +} + +void EditWorkspaceConfDlg::OnRename(wxCommandEvent &event) +{ + wxString changeMe; + wxUnusedVar(event); + if(m_wspConfList->GetCount() == 0){ + return; + } + + changeMe = m_wspConfList->GetStringSelection(); + if(changeMe.IsEmpty()){ + return; + } + + DoRename(changeMe); +} diff --git a/LiteEditor/edit_workspace_conf_dlg.h b/LiteEditor/edit_workspace_conf_dlg.h new file mode 100644 index 0000000000..b84819fa3a --- /dev/null +++ b/LiteEditor/edit_workspace_conf_dlg.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __edit_workspace_conf_dlg__ +#define __edit_workspace_conf_dlg__ + +#include + +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class EditWorkspaceConfDlg +/////////////////////////////////////////////////////////////////////////////// +class EditWorkspaceConfDlg : public wxDialog +{ +private: + void CustomInit(); + void FillList(); + void DoRename(const wxString &selItem); + +protected: + wxListBox* m_wspConfList; + wxButton* m_buttonRename; + wxButton* m_buttonDelete; + wxButton* m_buttonClose; + +protected: + //event handlers + void OnDelete(wxCommandEvent &event); + void OnRename(wxCommandEvent &event); + void OnListBoxDClick(wxCommandEvent &event); + +public: + EditWorkspaceConfDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Edit Workspace Configuration"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 362,261 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__edit_workspace_conf_dlg__ diff --git a/LiteEditor/editor.cpp b/LiteEditor/editor.cpp new file mode 100644 index 0000000000..95cb14bd60 --- /dev/null +++ b/LiteEditor/editor.cpp @@ -0,0 +1,1685 @@ +#include "editor.h" +#include "precompiled_header.h" +#include +#include +#include +#include +#include "parse_thread.h" +#include "ctags_manager.h" +#include "manager.h" +#include "menumanager.h" +#include +#include "findreplacedlg.h" +#include +#include "context_manager.h" +#include "editor_config.h" +#include "filedroptarget.h" +#include "fileutils.h" +#include "wx/tokenzr.h" +#include "simpletable.h" +#include "debuggerpane.h" +#include "frame.h" +#include "pluginmanager.h" +#include "breakpointdlg.h" +#include +#include +#include "debuggersettings.h" +#include "globals.h" +#include "threebuttondlg.h" +#include "debuggerconfigtool.h" +#include "addincludefiledlg.h" + +// fix bug in wxscintilla.h +#ifdef EVT_SCI_CALLTIP_CLICK +#undef EVT_SCI_CALLTIP_CLICK +#define EVT_SCI_CALLTIP_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CALLTIP_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#endif + +#define NUMBER_MARGIN_ID 0 +#define SEP_MARGIN_ID 1 +#define SYMBOLS_MARGIN_ID 2 +#define FOLD_MARGIN_ID 3 + +//debugger line marker xpm +extern char *arrow_right_green_xpm[]; +extern char *stop_xpm[]; + +BEGIN_EVENT_TABLE(LEditor, wxScintilla) + EVT_SCI_CHARADDED(wxID_ANY, LEditor::OnCharAdded) + EVT_SCI_MARGINCLICK(wxID_ANY, LEditor::OnMarginClick) + EVT_SCI_DWELLSTART(wxID_ANY, LEditor::OnDwellStart) + EVT_SCI_CALLTIP_CLICK(wxID_ANY, LEditor::OnCallTipClick) + EVT_SCI_DWELLEND(wxID_ANY, LEditor::OnDwellEnd) + EVT_SCI_MODIFIED(wxID_ANY, LEditor::OnModified) + EVT_SCI_UPDATEUI(wxID_ANY, LEditor::OnSciUpdateUI) + EVT_CONTEXT_MENU(LEditor::OnContextMenu) + EVT_KEY_DOWN(LEditor::OnKeyDown) + EVT_LEFT_DOWN(LEditor::OnLeftDown) + + //C++ contex menu update UI events + EVT_UPDATE_UI(XRCID("insert_doxy_comment"), LEditor::OnPopupMenuUpdateUI) + EVT_UPDATE_UI(XRCID("setters_getters"), LEditor::OnPopupMenuUpdateUI) + EVT_UPDATE_UI(XRCID("find_decl"), LEditor::OnPopupMenuUpdateUI) + EVT_UPDATE_UI(XRCID("find_impl"), LEditor::OnPopupMenuUpdateUI) +// EVT_UPDATE_UI(XRCID("move_impl"), LEditor::OnPopupMenuUpdateUI) + + // Find and replace dialog + EVT_COMMAND(wxID_ANY, wxEVT_FRD_FIND_NEXT, LEditor::OnFindDialog) + EVT_COMMAND(wxID_ANY, wxEVT_FRD_REPLACE, LEditor::OnFindDialog) + EVT_COMMAND(wxID_ANY, wxEVT_FRD_REPLACEALL, LEditor::OnFindDialog) + EVT_COMMAND(wxID_ANY, wxEVT_FRD_BOOKMARKALL, LEditor::OnFindDialog) + EVT_COMMAND(wxID_ANY, wxEVT_FRD_CLOSE, LEditor::OnFindDialog) +END_EVENT_TABLE() + +// Instantiate statics +FindReplaceDialog* LEditor::m_findReplaceDlg = NULL; +FindReplaceData LEditor::m_findReplaceData; +std::map LEditor::ms_bookmarkShapes; + +time_t GetFileModificationTime(const wxString &filename) +{ + struct stat buff; + const wxCharBuffer cname = _C(filename); + if (stat(cname.data(), &buff) < 0) { + return 0; + } + return buff.st_mtime; +} + +LEditor::LEditor(wxWindow* parent, wxWindowID id, const wxSize& size, const wxString& fileName, const wxString& project, bool hidden) + : wxScintilla(parent, id, wxDefaultPosition, size) + , m_fileName(fileName) + , m_project(project) + , m_rightClickMenu(NULL) + , m_lastMatchPos(0) + , m_popupIsOn(false) + , m_modifyTime(0) +{ + Show(!hidden); + ms_bookmarkShapes[wxT("Small Rectangle")] = wxSCI_MARK_SMALLRECT; + ms_bookmarkShapes[wxT("Rounded Rectangle")] = wxSCI_MARK_ROUNDRECT; + ms_bookmarkShapes[wxT("Small Arrow")] = wxSCI_MARK_ARROW; + ms_bookmarkShapes[wxT("Circle")] = wxSCI_MARK_CIRCLE; + + RestoreDefaults(); + m_fileName.MakeAbsolute(); + + // If file name is provided, open it + wxString tmpFilename(m_fileName.GetName()); + if ( !tmpFilename.IsEmpty() ) { + OpenFile(m_fileName.GetFullPath(), m_project); + } + SetDropTarget(new FileDropTarget()); +} + +void LEditor::RestoreDefaults() +{ + //the order is important, SetSyntaxHighlight must be called before SetProperties + //do not change it + SetSyntaxHighlight(); + SetProperties(); +} + +void LEditor::SetSyntaxHighlight() +{ + m_context = ManagerST::Get()->NewContextByFileName(m_fileName, this); +} + +LEditor::~LEditor() +{ +} + +void LEditor::SetCaretAt(long pos) +{ + SetCurrentPos(pos); + SetSelectionStart(pos); + SetSelectionEnd(pos); + EnsureCaretVisible(); +} + +/// Setup some scintilla properties +void LEditor::SetProperties() +{ + m_rightClickMenu = m_context->GetMenu(); + OptionsConfigPtr options = EditorConfigST::Get()->GetOptions(); + CallTipUseStyle(1); + + SetMouseDwellTime(250); + SetProperty(wxT("fold"), wxT("1")); + SetProperty(wxT("fold.html"), wxT("1")); + SetProperty(wxT("styling.within.preprocessor"), wxT("1")); + + // Fold and comments as well + SetProperty(wxT("fold.comment"), wxT("1")); + SetModEventMask (wxSCI_MOD_DELETETEXT | wxSCI_MOD_INSERTTEXT | wxSCI_PERFORMED_UNDO | wxSCI_PERFORMED_REDO ); + + int caretSlop = 1; + int caretZone = 20; + int caretStrict = 0; + int caretEven = 0; + int caretJumps = 0; + + SetXCaretPolicy(caretStrict | caretSlop | caretEven | caretJumps, caretZone); + + caretSlop = 1; + caretZone = 1; + caretStrict = 4; + caretEven = 8; + caretJumps = 0; + SetYCaretPolicy(caretStrict | caretSlop | caretEven | caretJumps, caretZone); + SetCaretWidth(1); + SetMarginLeft(1); + SetMarginRight(0); + + // Mark current line + SetCaretLineVisible(options->GetHighlightCaretLine()); + SetCaretLineBackground(options->GetCaretLineColour()); + +#ifdef __WXMSW__ + SetCaretLineBackgroundAlpha(30); +#endif + + SetFoldFlags(options->GetUnderlineFoldLine() ? 16 : 0); + + //------------------------------------------ + // Margin settings + //------------------------------------------ + // symbol margin + SetMarginType(SYMBOLS_MARGIN_ID, wxSCI_MARGIN_SYMBOL); + // Line numbes + SetMarginType(NUMBER_MARGIN_ID, wxSCI_MARGIN_NUMBER); + + // line number margin displays every thing but folding, bookmarks (256) and breakpoint (512) + SetMarginMask(NUMBER_MARGIN_ID, ~(256 | 512 | 128 | wxSCI_MASK_FOLDERS)); + + // Separators + SetMarginType(SEP_MARGIN_ID, wxSCI_MARGIN_FORE); + SetMarginMask(SEP_MARGIN_ID, 0); + + // Fold margin - allow only folder symbols to display + SetMarginMask(FOLD_MARGIN_ID, wxSCI_MASK_FOLDERS); + + // Set margins' width + SetMarginWidth(SYMBOLS_MARGIN_ID, options->GetDisplayBookmarkMargin() ? 16 : 0); // Symbol margin + // allow everything except for the folding symbols + SetMarginMask(SYMBOLS_MARGIN_ID, ~(wxSCI_MASK_FOLDERS)); + + //sets the caret colour + SetCaretForeground(options->GetCaretColour()); + + // Line number margin + int pixelWidth = 4 + 5*TextWidth(wxSCI_STYLE_LINENUMBER, wxT("9")); + SetMarginWidth(NUMBER_MARGIN_ID, options->GetDisplayLineNumbers() ? pixelWidth : 0); + + SetMarginWidth(SEP_MARGIN_ID, 1); // Symbol margin which acts as separator + + int ww = options->GetDisplayFoldMargin() ? 16 : 0; + SetMarginWidth(FOLD_MARGIN_ID, ww); // Fold margin + StyleSetForeground(wxSCI_STYLE_DEFAULT, wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); + + // Mark fold margin & symbols margins as sensetive + SetMarginSensitive(FOLD_MARGIN_ID, true); + SetMarginSensitive(SYMBOLS_MARGIN_ID, true); + + //--------------------------------------------------- + // Fold settings + //--------------------------------------------------- + // Define the folding style to be square + if ( options->GetFoldStyle() == wxT("Flatten Tree Square Headers") ) { + + DefineMarker(wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_BOXMINUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDER, wxSCI_MARK_BOXPLUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_VLINE, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_LCORNER, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_BOXPLUSCONNECTED, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_BOXMINUSCONNECTED, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_TCORNER, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + + } else if ( options->GetFoldStyle() == wxT("Flatten Tree Circular Headers") ) { + + DefineMarker(wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_CIRCLEMINUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDER, wxSCI_MARK_CIRCLEPLUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_VLINE, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_LCORNERCURVE, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_CIRCLEPLUSCONNECTED, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_CIRCLEMINUSCONNECTED, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_TCORNER, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + + } else if ( options->GetFoldStyle() == wxT("Simple") ) { + + DefineMarker(wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_MINUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDER, wxSCI_MARK_PLUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_PLUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_MINUS, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + + } else if ( options->GetFoldStyle() == wxT("Arrows") ) { + + DefineMarker(wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_ARROWDOWN, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDER, wxSCI_MARK_ARROW, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_ARROW, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_ARROWDOWN, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + DefineMarker(wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_BACKGROUND, wxColor(0xff, 0xff, 0xff), wxColor(0x80, 0x80, 0x80)); + + } + + // Bookmark + int marker = wxSCI_MARK_ARROW; + std::map::iterator iter = ms_bookmarkShapes.find(options->GetBookmarkShape()); + if ( iter != ms_bookmarkShapes.end() ) { + marker = iter->second; + } + + MarkerDefine(0x7, marker); + MarkerSetBackground(0x7, options->GetBookmarkBgColour()); + MarkerSetForeground(0x7, options->GetBookmarkFgColour()); + + wxImage imgbp(stop_xpm); + wxBitmap bmpbp(imgbp); + MarkerDefineBitmap(0x8, bmpbp); + + //debugger line marker + wxImage img(arrow_right_green_xpm); + wxBitmap bmp(img); + MarkerDefineBitmap(0x9, bmp); + MarkerSetBackground(0x9, wxT("LIME GREEN")); + MarkerSetForeground(0x9, wxT("BLACK")); + + // calltip settings +/* CallTipUseStyle(1); + wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + StyleSetFont(wxSCI_STYLE_CALLTIP, font);*/ + + CallTipSetBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); + CallTipSetForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT)); + + SetTabWidth(4); + SetIndent(4); + SetTabIndents(true); + SetBackSpaceUnIndents (true); + SetUseTabs (true); + SetLayoutCache(wxSCI_CACHE_DOCUMENT); + + size_t frame_flags = Frame::Get()->GetFrameGeneralInfo().GetFlags(); + int eolMode (wxSCI_EOL_LF); //default it to unix + if (frame_flags & CL_USE_EOL_CR) { + eolMode = wxSCI_EOL_CR; + } else if(frame_flags & CL_USE_EOL_CRLF) { + eolMode = wxSCI_EOL_CRLF; + } + + SetEOLMode(eolMode); + SetViewEOL(frame_flags & CL_SHOW_EOL ? true : false); + + //if no right click menu is provided by the context, use scintilla default + //right click menu + UsePopUp(m_rightClickMenu ? false : true); + StyleSetForeground(wxSCI_STYLE_LINENUMBER, wxColour(0, 63, 125)); + SetIndentationGuides(options->GetShowIndentationGuidelines()); + + SetFoldMarginColour (true, wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); +} + +void LEditor::SetDirty(bool dirty) +{ + if ( dirty ) { + if ( !ManagerST::Get()->GetPageTitle(this).StartsWith(wxT("*")) ) { + ManagerST::Get()->SetPageTitle(this, wxT("*") + ManagerST::Get()->GetPageTitle(this)); + } + } else { + ManagerST::Get()->SetPageTitle(this, GetFileName().GetFullName()); + } +} + +void LEditor::OnCharAdded(wxScintillaEvent& event) +{ + // set the page title as dirty + SetDirty(true); + + // make sure line is visible + int curLine = LineFromPosition(GetCurrentPos()); + if ( !GetFoldExpanded(curLine) ) { + ToggleFold(curLine); + } + + // Always do auto-indentation + if (event.GetKey() == ':' || event.GetKey() == '}' || event.GetKey() == '\n') + m_context->AutoIndent(event.GetKey()); + + if (false == GetProjectName().IsEmpty()) { + switch ( event.GetKey() ) { + case ':': + case '.': + case '>': + case '(': + CodeComplete(); + break; + case ')': { + m_context->CallTipCancel(); + break; + } + case '\n': { + // incase we are typing in a folded line, make sure it is visible + int nLineNumber = LineFromPosition(GetCurrentPos()); + EnsureVisible(nLineNumber+1); + break; + } + default: + break; + } + } + event.Skip(); +} + +void LEditor::OnSciUpdateUI(wxScintillaEvent &event) +{ + // Get current position + long pos = GetCurrentPos(); + + if ((GetCharAt(pos) == '{' || + GetCharAt(pos) == '[' || + GetCharAt(pos) == '<' || + GetCharAt(pos) == '(') + && !m_context->IsCommentOrString(pos)) { + BraceMatch((long)pos); + } else + if ((GetCharAt(PositionBefore(pos)) == '{' || + GetCharAt(PositionBefore(pos)) == '<' || + GetCharAt(PositionBefore(pos)) == '[' || + GetCharAt(PositionBefore(pos)) == '(') && !m_context->IsCommentOrString(PositionBefore(pos))) { + BraceMatch((long)PositionBefore(pos)); + } else + if ((GetCharAt(pos) == '}' || + GetCharAt(pos) == ']' || + GetCharAt(pos) == '>' || + GetCharAt(pos) == ')') && !m_context->IsCommentOrString(pos)) { + BraceMatch((long)pos); + } else + if ((GetCharAt(PositionBefore(pos)) == '}' || + GetCharAt(PositionBefore(pos)) == '>' || + GetCharAt(PositionBefore(pos)) == ']' || + GetCharAt(PositionBefore(pos)) == ')') && !m_context->IsCommentOrString(PositionBefore(pos))) { + BraceMatch((long)PositionBefore(pos)); + } else { + wxScintilla::BraceHighlight(wxSCI_INVALID_POSITION, wxSCI_INVALID_POSITION); + } + //update line number + wxString message; + message << wxT("Ln ") << LineFromPosition(pos)+1 << wxT(" Col ") << GetColumn(pos) << wxT(" Pos ") << pos; + ManagerST::Get()->SetStatusMessage(message, 3); + + //let the context handle this as well + m_context->OnSciUpdateUI(event); +} + +void LEditor::OnMarginClick(wxScintillaEvent& event) +{ + switch (event.GetMargin()) { + case SYMBOLS_MARGIN_ID: + //symbols / breakpoints margin + { + int lineno = LineFromPosition(event.GetPosition()); + BreakpointInfo bp; + bp.file = GetFileName().GetFullPath(); + bp.lineno = lineno+1; + ToggleBreakpoint(bp); + } + break; + case FOLD_MARGIN_ID: + //fold margin + { + int nLine = LineFromPosition(event.GetPosition()); + ToggleFold(nLine); + } + break; + default: + break; + } +} + +void LEditor::DefineMarker(int marker, int markerType, wxColor fore, wxColor back) +{ + MarkerDefine(marker, markerType); + MarkerSetForeground(marker, fore); + MarkerSetBackground(marker, back); +} + +bool LEditor::SaveFile() +{ + if (this->GetModify()) { + if (GetFileName().GetFullName().Find(wxT("Untitled")) != -1 || GetFileName().GetFullName().IsEmpty()) { + return SaveFileAs(); + } + + // first save the file content + if ( !SaveToFile(m_fileName) ) + return false; + + if ( GetProjectName().IsEmpty() ) + return true; + + //------------------------------------------------------------------- + // Using the CodeParser library, enforces us to notify the parsing + // thread once the file is saved. ctags accepts file name, so we + // notify him once the file on the disk is changed, there is no + // point in notifying the parsing thread on, for example, OnCharAdded + // event, since the actual file on the disk was not modified + //------------------------------------------------------------------- + if (TagsManagerST::Get()->IsValidCtagsFile(m_fileName)) { + ParseRequest *req = new ParseRequest(); + // Put a request on the parsing thread to update the GUI tree for this file + wxFileName fn = TagsManagerST::Get()->GetDatabase()->GetDatabaseFileName(); + req->dbfile = fn.GetFullPath(); + // Construct an absolute file name for ctags + wxFileName absFile( m_fileName); + absFile.MakeAbsolute(); + req->file = absFile.GetFullPath(); + + //convert the file to tags + TagsManager *tagmgr = TagsManagerST::Get(); +#if defined (__WXMAC__) + //use the version that uses popen and calls ctags + tagmgr->SourceToTags2(absFile, req->tags); +#else + tagmgr->SourceToTags(absFile, req->tags, NULL); +#endif + //the previous call 'stole' the focus from us... + //SetActive(); + ParseThreadST::Get()->Add(req); + } + } + return true; +} + +bool LEditor::SaveFileAs() +{ + // Prompt the user for a new file name + const wxString ALL(wxT("All Files (*)|*")); + wxFileDialog *dlg = new wxFileDialog(this, wxT("Save As"), m_fileName.GetPath(), m_fileName.GetFullName(), ALL, + wxFD_SAVE | wxFD_OVERWRITE_PROMPT , + wxDefaultPosition); + + if (dlg->ShowModal() == wxID_OK) { + // get the path + wxFileName name(dlg->GetPath()); + if ( !SaveToFile(name) ) { + wxMessageBox(wxT("Failed to save file"), wxT("Error"), wxOK | wxICON_ERROR); + return false; + } + m_fileName = name; + delete dlg; + return true; + } + + delete dlg; + return false; +} + +// an internal function that does the actual file writing to disk +bool LEditor::SaveToFile(const wxFileName &fileName) +{ + wxFFile file(fileName.GetFullPath().GetData(), wxT("wb")); + if (file.IsOpened() == false) { + // Nothing to be done + wxString msg = wxString::Format(wxT("Failed to open file %s"), fileName.GetFullPath().GetData()); + wxMessageBox( msg ); + return false; + } + + file.Write(GetText()); + file.Close(); + + //update the modification time of the file + m_modifyTime = GetFileModificationTime(fileName.GetFullPath()); + SetSavePoint(); + + //fire a wxEVT_FILE_SAVED event + wxCommandEvent event(wxEVT_FILE_SAVED, GetId()); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); + + // update the file name (remove the star from the file name) + ManagerST::Get()->SetPageTitle(this, fileName.GetFullName()); + + // Update context if needed + if (fileName.GetExt() != m_fileName.GetExt()) { + // new context is required + ClearDocumentStyle(); + m_context = ManagerST::Get()->NewContextByFileName(fileName, this); + Colourise(0, wxSCI_INVALID_POSITION); + SetProperties(); + } + return true; +} + +void LEditor::SetSyntaxHighlight(const wxString &lexerName) +{ + ClearDocumentStyle(); + m_context = ContextManager::Get()->NewContext(this, lexerName); + Colourise(0, wxSCI_INVALID_POSITION); + SetProperties(); +} + +void LEditor::OpenFile(const wxString &fileName, const wxString &project) +{ + if (fileName.IsEmpty() == true) + return; + + wxString text; + ReadFileWithConversion(fileName, text); + SetText( text ); + + //get the modification time of the file + m_modifyTime = GetFileModificationTime(fileName); + + // make sure user can not undo this operation + EmptyUndoBuffer(); + + // Keep the file name and the project + m_fileName = fileName; + m_project = project; + + //update breakpoints + UpdateBreakpoints(); + SetCaretAt(0); +} + +//this function is called before the debugger startup +void LEditor::UpdateBreakpoints() +{ + //remove all break points associated with this file + DebuggerMgr::Get().DelBreakpoints(GetFileName().GetFullPath()); + + //collect the actual breakpoint according to the markers set + int mask(0); + mask |= 256; + int lineno = MarkerNext(0, mask); + while (lineno >= 0) { + BreakpointInfo bp; + bp.file = GetFileName().GetFullPath(); + bp.lineno = lineno + 1; + DebuggerMgr::Get().AddBreakpoint(bp); + + lineno = MarkerNext(lineno+1, mask); + } + Frame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize(); +} + +void LEditor::DoSetBreakpoint(const BreakpointInfo &bp) +{ + if (!DebuggerMgr::Get().AddBreakpoint(bp)) { + wxMessageBox(wxT("Failed to insert breakpoint")); + return; + } + if (bp.lineno-1 < 0) { + return; + } + SetBreakpointMarker(bp.lineno-1); + Frame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize(); +} + +wxString LEditor::GetWordAtCaret() +{ + // Get the partial word that we have + long pos = GetCurrentPos(); + long start = WordStartPosition(pos, true); + long end = WordEndPosition(pos, true); + return GetTextRange(start, end); +} + +//--------------------------------------------------------------------------- +// Most of the functionality for this functionality +// is done in the Language & TagsManager objects, however, +// as you can see below, much work still needs to be done in the application +// layer (outside of the library) to provide the input arguments for +// the CodeParser library +//--------------------------------------------------------------------------- +void LEditor::CompleteWord() +{ + m_context->CompleteWord(); +} + +//------------------------------------------------------------------ +// AutoCompletion, by far the nicest feature of a modern IDE +// This function attempts to resolve the string to the left of +// the '.', '->' operator and to display a popup menu with +// list of possible matches +//------------------------------------------------------------------ +void LEditor::CodeComplete() +{ + m_context->CodeComplete(); +} + + +//---------------------------------------------------------------- +// Demonstrate how to achieve symbol browsing using the CodeLite +// library, in addition we implements here a memory for allowing +// user to go back and forward +//---------------------------------------------------------------- +void LEditor::GotoDefinition() +{ + m_context->GotoDefinition(); +} + +void LEditor::GotoPreviousDefintion() +{ + m_context->GotoPreviousDefintion(); +} + +void LEditor::OnDwellStart(wxScintillaEvent & event) +{ + Manager *mgr = ManagerST::Get(); + if(mgr->DbgCanInteract()){ + //debugger is running and responsive, query it about the current token + if (!IsContextMenuOn()) { + m_context->OnDbgDwellStart(event); + } + }else{ + if (TagsManagerST::Get()->GetCtagsOptions().GetFlags() & CC_DISP_TYPE_INFO) { + //if context menu is on, dont allow it + if (!IsContextMenuOn()) { + m_context->OnDwellStart(event); + } + } + } +} + +void LEditor::OnDwellEnd(wxScintillaEvent & event) +{ + m_context->OnDwellEnd(event); + m_context->OnDbgDwellEnd(event); +} + +void LEditor::OnCallTipClick(wxScintillaEvent& event) +{ + m_context->OnCallTipClick(event); +} + +void LEditor::OnModified(wxScintillaEvent& event) +{ + if (event.GetModificationType() & wxSCI_MOD_INSERTTEXT) { + SetDirty(true); + } + + if (event.GetModificationType() & wxSCI_MOD_DELETETEXT) { + SetDirty(true); + } + + if (event.GetModificationType() & wxSCI_PERFORMED_UNDO) { + if (GetModify() == false) { + SetDirty(false); + } + } + + if (event.GetModificationType() & wxSCI_PERFORMED_REDO) { + SetDirty(true); + } +} + +void LEditor::OnMenuCommand(wxCommandEvent &event) +{ + MenuEventHandlerPtr handler = MenuManager::Get()->GetHandler(event.GetId()); + + if ( handler ) { + handler->ProcessCommandEvent(this, event); + } +} + +void LEditor::OnUpdateUI(wxUpdateUIEvent &event) +{ + MenuEventHandlerPtr handler = MenuManager::Get()->GetHandler(event.GetId()); + + if ( handler ) { + handler->ProcessUpdateUIEvent(this, event); + } +} + +//----------------------------------------------------------------------- +// Misc functions +//----------------------------------------------------------------------- + +wxChar LEditor::PreviousChar(const int& pos, int &foundPos, bool wantWhitespace) +{ + wxChar ch = 0; + long curpos = PositionBefore( pos ); + if (curpos == 0) { + foundPos = curpos; + return ch; + } + + while ( true ) { + ch = GetCharAt( curpos ); + if (ch == wxT('\t') || ch == wxT(' ') || ch == wxT('\r') || ch == wxT('\v') || ch == wxT('\n')) { + //if the caller is intrested in whitepsaces, + //simply return it + if (wantWhitespace) { + foundPos = curpos; + return ch; + } + + long tmpPos = curpos; + curpos = PositionBefore( curpos ); + if (curpos == 0 && tmpPos == curpos) + break; + } else { + foundPos = curpos; + return ch; + } + } + foundPos = -1; + return ch; +} + +wxChar LEditor::NextChar( const int &pos, int &foundPos ) +{ + wxChar ch = 0; + long nextpos = pos; + while ( true ) { + if ( nextpos == GetLength() ) + break; // eof + ch = GetCharAt( nextpos ); + if (ch == wxT('\t') || ch == wxT(' ') || ch == wxT('\r') || ch == wxT('\v') || ch == wxT('\n')) { + nextpos = PositionAfter( nextpos ); + continue; + } else { + foundPos = nextpos; + return ch; + } + } + foundPos = -1; + return ch; +} + + +int LEditor::FindString (const wxString &str, int flags, const bool down, long pos) +{ + // initialize direction + if ( down ) { + SetTargetStart (pos); + SetTargetEnd(GetLength()); + } else { + SetTargetStart (pos); + SetTargetEnd(0); + } + SetSearchFlags(flags); + + // search string + int _pos = SearchInTarget(str); + if (_pos >= 0) return _pos; + else return -1; +} + +bool LEditor::MatchBraceBack(const wxChar& chCloseBrace, const long &pos, long &matchedPos) +{ + if (pos<=0) + return false; + + wxChar chOpenBrace; + + switch (chCloseBrace) { + case '}': + chOpenBrace = '{'; + break; + case ')': + chOpenBrace = '('; + break; + case ']': + chOpenBrace = '['; + break; + case '>': + chOpenBrace = '<'; + break; + default: + return false; + } + + long nPrevPos = pos; + wxChar ch; + int depth = 1; + + // We go backward + while (true) { + if (nPrevPos == 0) + break; + nPrevPos = PositionBefore(nPrevPos); + + // Make sure we are not in a comment + if (m_context->IsCommentOrString(nPrevPos)) + continue; + + ch = GetCharAt(nPrevPos); + if (ch == chOpenBrace) { + // Dec the depth level + depth--; + if (depth == 0) { + matchedPos = nPrevPos; + return true; + } + } else if (ch == chCloseBrace) { + // Inc depth level + depth++; + } + } + return false; +} + +//-------------------------------------------------------- +// Brace match +//-------------------------------------------------------- +void LEditor::MatchBraceAndSelect(bool selRegion) +{ + // Get current position + long pos = GetCurrentPos(); + + if (GetCharAt(pos) == '{' && !m_context->IsCommentOrString(pos)) { + BraceMatch(selRegion); + return; + } + + if (GetCharAt(PositionBefore(pos)) == '{' && !m_context->IsCommentOrString(PositionBefore(pos))) { + SetCurrentPos(PositionBefore(pos)); + BraceMatch(selRegion); + return; + } + + if (GetCharAt(pos) == '}' && !m_context->IsCommentOrString(pos)) { + BraceMatch(selRegion); + return; + } + + if (GetCharAt(PositionBefore(pos)) == '}' && !m_context->IsCommentOrString(PositionBefore(pos))) { + SetCurrentPos(PositionBefore(pos)); + BraceMatch(selRegion); + return; + } +} + +void LEditor::BraceMatch(long pos) +{ + // Check if we have a match + long endPos = wxScintilla::BraceMatch(pos); + if (endPos != wxSCI_INVALID_POSITION) { + // Highlight indent guide if exist + wxScintilla::BraceHighlight(pos, endPos); + } else { + wxScintilla::BraceBadLight(pos); + } +} + +void LEditor::BraceMatch(const bool& bSelRegion) +{ + // Check if we have a match + long endPos = wxScintilla::BraceMatch(GetCurrentPos()); + if (endPos != wxSCI_INVALID_POSITION) { + // Highlight indent guide if exist + long startPos = GetCurrentPos(); + if (bSelRegion) { + // Select the range + if (endPos > startPos) { + SetSelectionEnd(PositionAfter(endPos)); + SetSelectionStart(startPos); + } else { + SetSelectionEnd(PositionAfter(startPos)); + SetSelectionStart(endPos); + } + } else { + SetSelectionEnd(endPos); + SetSelectionStart(endPos); + SetCurrentPos(endPos); + } + EnsureCaretVisible(); + } +} + +void LEditor::SetActive() +{ + // if the find and replace dialog is opened, set ourself + // as the event owners + if ( m_findReplaceDlg ) { + m_findReplaceDlg->SetEventOwner(GetEventHandler()); + } + + SetFocus(); +} + +// Popup a Find/Replace dialog +void LEditor::DoFindAndReplace(bool isReplaceDlg) +{ + if ( m_findReplaceDlg == NULL ) { + // Create the dialog + m_findReplaceDlg = new FindReplaceDialog(ManagerST::Get()->GetMainFrame(), m_findReplaceData); + m_findReplaceDlg->SetEventOwner(this->GetEventHandler()); + } + + if ( m_findReplaceDlg->IsShown() ) { + // make sure that dialog has focus and that this instace + // of LEditor is the owner for the events + m_findReplaceDlg->SetEventOwner(this->GetEventHandler()); + m_findReplaceDlg->SetFocus(); + return; + } + + // the search always starts from the current line + m_lastMatchPos = GetCurrentPos(); + //if there is a selection, set it + if (GetSelectedText().IsEmpty() == false) { + //if this string does not exist in the array add it + m_findReplaceDlg->GetData().SetFindString(GetSelectedText()); + } + m_findReplaceDlg->Show(isReplaceDlg ? REPLACE_DLG : FIND_DLG); +} + +void LEditor::OnFindDialog(wxCommandEvent& event) +{ + EditorConfig *conf = EditorConfigST::Get(); + wxEventType type = event.GetEventType(); + bool dirDown = ! (m_findReplaceDlg->GetData().GetFlags() & wxFRD_SEARCHUP ? true : false); + + if ( type == wxEVT_FRD_FIND_NEXT ) { + FindNext(m_findReplaceDlg->GetData()); + } else if ( type == wxEVT_FRD_REPLACE ) { + if ( !Replace() ) { + if (dirDown) { + long res; + if (!conf->GetLongValue(wxT("ReplaceWrapAroundAnswer"), res)) { + ThreeButtonDlg *dlg = new ThreeButtonDlg(NULL, + wxT("CodeLite reached the end of the document, Search again from the start?"), + wxT("CodeLite")); + res = dlg->ShowModal(); + if (dlg->GetDontAskMeAgain()) { + //save this answer + conf->SaveLongValue(wxT("ReplaceWrapAroundAnswer"), res); + } + dlg->Destroy(); + } + + } else { + long res; + if (!conf->GetLongValue(wxT("ReplaceWrapAroundAnswer"), res)) { + ThreeButtonDlg *dlg = new ThreeButtonDlg(NULL, + wxT("CodeLite reached the end of the document, Search again from the start?"), + wxT("CodeLite")); + res = dlg->ShowModal(); + if (dlg->GetDontAskMeAgain()) { + //save this answer + conf->SaveLongValue(wxT("ReplaceWrapAroundAnswer"), res); + } + dlg->Destroy(); + } + + if (res == wxID_OK) { + Replace(); + } + } + } + } + + else if (type == wxEVT_FRD_REPLACEALL) { + ReplaceAll(); + } else if (type == wxEVT_FRD_BOOKMARKALL) { + MarkAll(); + } + event.Skip(); +} + +void LEditor::FindNext(const FindReplaceData &data) +{ + EditorConfig *conf = EditorConfigST::Get(); + + bool dirDown = ! (data.GetFlags() & wxFRD_SEARCHUP ? true : false); + if ( !FindAndSelect(data) ) { + if (dirDown) { + long res; + if (!conf->GetLongValue(wxT("FindNextWrapAroundAnswer"), res)) { + ThreeButtonDlg *dlg = new ThreeButtonDlg(NULL, + wxT("CodeLite reached the end of the document, Search again from the start?"), + wxT("CodeLite")); + res = dlg->ShowModal(); + if (dlg->GetDontAskMeAgain()) { + //save this answer + conf->SaveLongValue(wxT("FindNextWrapAroundAnswer"), res); + } + dlg->Destroy(); + } + if (res == wxID_OK) { + FindAndSelect(data); + } + } else { + long res; + if (!conf->GetLongValue(wxT("FindNextWrapAroundAnswer"), res)) { + ThreeButtonDlg *dlg = new ThreeButtonDlg(NULL, + wxT("CodeLite reached the end of the document, Search again from the start?"), + wxT("CodeLite")); + res = dlg->ShowModal(); + if (dlg->GetDontAskMeAgain()) { + //save this answer + conf->SaveLongValue(wxT("FindNextWrapAroundAnswer"), res); + } + dlg->Destroy(); + } + if (res == wxID_OK) { + FindAndSelect(data); + } + } + } +} + +bool LEditor::Replace() +{ + return Replace(m_findReplaceDlg->GetData()); +} + +bool LEditor::FindAndSelect() +{ + return FindAndSelect(m_findReplaceDlg->GetData()); +} + +bool LEditor::FindAndSelect(const FindReplaceData &data) +{ + bool dirDown = ! (data.GetFlags() & wxFRD_SEARCHUP ? true : false); + int flags = GetSciSearchFlag(data); + int pos = FindString(data.GetFindString(), flags, dirDown, m_lastMatchPos); + if (pos >= 0) { + EnsureCaretVisible(); + SetSelection (pos, pos + (int)data.GetFindString().Length()); + + if ( dirDown ) { + m_lastMatchPos = PositionAfter(pos); + } else { + m_lastMatchPos = PositionBefore(pos); + } + //adjust the dialog position + if(m_findReplaceDlg && m_findReplaceDlg->IsShown()){ + wxPoint pt = PointFromPosition(pos); + //pt is in wxScintilla coordinates, need to convert them into + //the frame coordinates + wxPoint displayPt = ClientToScreen(pt); + + //check if this point is placed inside the dialog area + wxRect rr = m_findReplaceDlg->GetScreenRect(); + if(rr.Contains(displayPt)){ + //move the dialog a bit upward + m_findReplaceDlg->Move(rr.x, displayPt.y - rr.GetHeight()); + } + } + return true; + } else { + // No match was found + if ( dirDown ) { + m_lastMatchPos = 0; + } else { + m_lastMatchPos = GetLength(); + } + return false; + } +} + +bool LEditor::Replace(const FindReplaceData &data) +{ + wxString replaceString = data.GetReplaceString(); + wxString findString = data.GetFindString(); + wxString selection = GetSelectedText(); + + SetSearchFlags( GetSciSearchFlag(data)); + TargetFromSelection(); + + if (SearchInTarget( findString ) != -1) { + // the selection contains the searched string + // do the replace + ReplaceTarget( replaceString ); + } + + // and find another match in the document + return FindAndSelect(); +} + +int LEditor::GetSciSearchFlag(const FindReplaceData &data) +{ + size_t flags = 0; + size_t wxflags = data.GetFlags(); + wxflags & wxFRD_MATCHWHOLEWORD ? flags |= wxSCI_FIND_WHOLEWORD : flags = flags; + wxflags & wxFRD_MATCHCASE ? flags |= wxSCI_FIND_MATCHCASE : flags = flags; + wxflags & wxFRD_REGULAREXPRESSION ? flags |= wxSCI_FIND_REGEXP : flags = flags; + return static_cast(flags); +} + +//---------------------------------------------- +// Bookmarks +//---------------------------------------------- +void LEditor::AddMarker() +{ + int nPos = GetCurrentPos(); + int nLine = LineFromPosition(nPos); + MarkerAdd(nLine, 0x7); +} + +void LEditor::DelMarker() +{ + int nPos = GetCurrentPos(); + int nLine = LineFromPosition(nPos); + MarkerDelete(nLine, 0x7); +} + +void LEditor::ToggleMarker() +{ + // Add/Remove marker + // First we check if we already have a marker + int nPos = GetCurrentPos(); + int nLine = LineFromPosition(nPos); + int nBits = MarkerGet(nLine); + bool bHasMraker = nBits & 128 ? true : false; + + if ( !bHasMraker ) + //Delete it + AddMarker(); + else + //Add one + DelMarker(); +} + +void LEditor::DelAllMarkers() +{ + // Delete all markers from the view + MarkerDeleteAll(0x7); +} + +void LEditor::FindNextMarker() +{ + int nPos = GetCurrentPos(); + int nLine = LineFromPosition(nPos); + int mask = 128; + int nFoundLine = MarkerNext(nLine + 1, mask); + if (nFoundLine >= 0) { + // mark this place before jumping to next marker + GotoLine(nFoundLine); + } else { + //We reached the last marker, try again from top + int nLine = LineFromPosition(0); + int nFoundLine = MarkerNext(nLine, mask); + if (nFoundLine >= 0) { + GotoLine(nFoundLine); + } + } +} + +void LEditor::FindPrevMarker() +{ + int nPos = GetCurrentPos(); + int nLine = LineFromPosition(nPos); + int mask = 128; + int nFoundLine = MarkerPrevious(nLine - 1, mask); + if (nFoundLine >= 0) { + GotoLine(nFoundLine); + } else { + //We reached first marker, try again from button + int nFileSize = GetLength(); + int nLine = LineFromPosition(nFileSize); + int nFoundLine = MarkerPrevious(nLine, mask); + if (nFoundLine >= 0) { + GotoLine(nFoundLine); + } + } +} + +bool LEditor::ReplaceAll() +{ + int occur = 0; + wxString findWhat = m_findReplaceDlg->GetData().GetFindString(); + wxString replaceWith = m_findReplaceDlg->GetData().GetReplaceString(); + int flags = GetSciSearchFlag(m_findReplaceDlg->GetData()); + + if (findWhat.IsEmpty()) { + return false; + } + + BeginUndoAction(); + long pos = 0; + + // Save the caret position + long savedPos = GetCurrentPos(); + + SetCaretAt(0); + while ((pos = FindString(findWhat, flags, true, pos)) >= 0) { + occur++; + ReplaceTarget (replaceWith); + pos += (int)replaceWith.Length(); + SetCaretAt(pos); + } + + // Restore the caret + SetCaretAt(savedPos); + + EndUndoAction(); + + wxString message; + message << wxT("Replacements: ") << occur; + m_findReplaceDlg->SetReplacementsMessage(message); + return occur > 0; +} + +bool LEditor::MarkAll() +{ + long pos = wxSCI_INVALID_POSITION; + long savedPos = GetCurrentPos(); + wxString findWhat = m_findReplaceDlg->GetData().GetFindString(); + int flags = GetSciSearchFlag(m_findReplaceDlg->GetData()); + + if (findWhat.IsEmpty()) + return false; + + // Set the cursor to start + SetCaretAt(0); + + while ((pos = FindString (findWhat, flags, true, pos)) >= 0) { + MarkerAdd(LineFromPosition(pos), 0x7); + pos = PositionAfter(pos); + SetCaretAt(pos); + } + + // Resttore the caret + SetCaretAt(savedPos); + return true; +} + +void LEditor::ReloadFile() +{ + if (m_fileName.GetFullPath().IsEmpty() == true || m_fileName.GetFullPath().StartsWith(wxT("Untitled"))) + return; + + wxString text; + ReadFileWithConversion(m_fileName.GetFullPath(), text); + SetText( text ); + + m_modifyTime = GetFileModificationTime(m_fileName.GetFullPath()); + SetDirty(false); + SetSavePoint(); + EmptyUndoBuffer(); + + //update breakpoints + UpdateBreakpoints(); +} + +void LEditor::SetEditorText(const wxString &text) +{ + SetText( text ); + SetDirty(true); + + //update breakpoints + UpdateBreakpoints(); +} + +void LEditor::Create(const wxString &project, const wxFileName &fileName) +{ + // set the file name + SetFileName(fileName); + // set the project name + SetProject(project); + // let the editor choose the syntax highlight to use according to file extension + // and set the editor properties to default + RestoreDefaults(); + // reload the file from disk + ReloadFile(); + // mark this editor as non-modified to avoid non-needed confirm dialogs + SetSavePoint(); + EmptyUndoBuffer(); +} + +void LEditor::InsertTextWithIndentation(const wxString &text, int lineno) +{ + //keep the page idnetation level + wxString textToInsert(text); + int lineStartPos = PositionFromLine(lineno); + int indentSize = GetIndent(); + int indent = GetLineIndentation(lineno); + if (GetTabIndents()) { + indent = indent / indentSize; + } + + wxStringTokenizer tkz(textToInsert, wxT("\n")); + textToInsert.Clear(); + while (tkz.HasMoreTokens()) { + for (int i=0; i selEnd) { + //cursor is not over the selected text, unselect and re-position caret + SetCaretAt(closePos); + } + } else { + //no selection, just place the caret + SetCaretAt(closePos); + } + } + + //Let the context add it dynamic content + m_context->AddMenuDynamicContent(m_rightClickMenu); + + //add the debugger (if currently running) to add its dynamic content + IDebugger *debugger = DebuggerMgr::Get().GetActiveDebugger(); + if (debugger && debugger->IsRunning()) { + AddDebuggerContextMenu(m_rightClickMenu); + } + + //turn the popupIsOn value to avoid annoying + //calltips from firing while our menu is popped + m_popupIsOn = true; + + //let the plugins hook their content + PluginManager::Get()->HookPopupMenu(m_rightClickMenu, MenuTypeEditor); + + //Popup the menu + PopupMenu(m_rightClickMenu); + + //let the plugins remove their hooked content + PluginManager::Get()->UnHookPopupMenu(m_rightClickMenu, MenuTypeEditor); + + m_popupIsOn = false; + + //Let the context remove the dynamic content + m_context->RemoveMenuDynamicContent(m_rightClickMenu); + RemoveDebuggerContextMenu(m_rightClickMenu); + } + event.Skip(); +} + +void LEditor::OnKeyDown(wxKeyEvent &event) +{ + //let the context process it as well + m_context->OnKeyDown(event); + if(event.GetKeyCode() == WXK_NUMPAD_DELETE) + { + event.Skip(false); + } +} + +void LEditor::OnLeftDown(wxMouseEvent &event) +{ + //emulate here VS like selection with mouse and ctrl key + if (event.m_controlDown) { + long pos = PositionFromPointClose(event.GetX(), event.GetY()); + if (pos == wxSCI_INVALID_POSITION) { + event.Skip(); + return; + } + + long start = WordStartPosition(pos, true); + long end = WordEndPosition(pos, true); + if (start == end) { + //pass it on + event.Skip(); + return; + } + //select the word + SetSelectionStart(start); + SetSelectionEnd(end); + //make the caret visible (if not, scroll to it) + EnsureCaretVisible(); + return; + } + event.Skip(); +} + +void LEditor::OnPopupMenuUpdateUI(wxUpdateUIEvent &event) +{ + //pass it to the context + m_context->ProcessEvent(event); +} + +BrowseRecord LEditor::CreateBrowseRecord() +{ + // Remember this position before skipping to the next one + BrowseRecord record; + record.lineno = LineFromPosition(GetCurrentPos())+1; // scintilla counts from zero, while tagentry from 1 + record.filename = GetFileName().GetFullPath(); + record.project = GetProject(); + + //if the file is part of the workspace set the project name + //else, open it with empty project + record.position = GetCurrentPos(); + return record; +} + +void LEditor::DelBreakpoint(const BreakpointInfo &bp) +{ + if (DebuggerMgr::Get().DelBreakpoint(bp)) { + DelBreakpointMarker(bp.lineno-1); + } + Frame::Get()->GetDebuggerPane()->GetBreakpointView()->Initialize(); +} + +void LEditor::DelBreakpoint() +{ + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning() && !ManagerST::Get()->DbgCanInteract()) { + return; + } + + BreakpointInfo bp; + bp.file = GetFileName().GetFullPath(); + bp.lineno = LineFromPosition(GetCurrentPos())+1; + DelBreakpoint(bp); +} + +void LEditor::SetBreakpointMarker(int lineno) +{ + MarkerAdd(lineno, 0x8); +} + +void LEditor::DelBreakpointMarker(int lineno) +{ + MarkerDelete(lineno, 0x8); +} + +void LEditor::DelAllBreakpointMarkers() +{ + int mask(0); + mask |= 256; + int lineno = MarkerNext(0, mask); + while (lineno >= 0) { + MarkerDelete(lineno, 0x8); + long startPos = PositionFromLine(lineno); + long endPos = GetLineEndPosition(lineno); + Colourise(startPos, endPos); + lineno = MarkerNext(0, mask); + } +} + +void LEditor::HighlightLine(int lineno) +{ + int sci_line = lineno - 1; + if(GetLineCount() < sci_line -1){ + sci_line = GetLineCount() - 1; + } + MarkerAdd(sci_line, 0x9); +} + +void LEditor::UnHighlightAll() +{ + MarkerDeleteAll(0x9); +} + +void LEditor::ToggleBreakpoint() +{ + BreakpointInfo bp; + bp.file = GetFileName().GetFullPath(); + bp.lineno = LineFromPosition(GetCurrentPos())+1; + ToggleBreakpoint(bp); +} + +void LEditor::ToggleBreakpoint(const BreakpointInfo &bp) +{ + bool contIsNeeded(false); + + Manager *mgr = ManagerST::Get(); + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning() && !mgr->DbgCanInteract()) { + mgr->DbgDoSimpleCommand(DBG_PAUSE); + contIsNeeded = true; + } + + //we are assuming that this call is made from a caller, + //so the line numbers needs to be adjusted (reduce by 1) + int mask = MarkerGet(bp.lineno-1); + if (mask & 256) { + //we have breakpoint + DelBreakpoint(bp); + } else { + //no breakpoint at this line, add one + DoSetBreakpoint(bp); + } + + if(contIsNeeded){ + //resume execution of the debugger + mgr->DbgStart(); + } +} + +void LEditor::AddDebuggerContextMenu(wxMenu *menu) +{ + if (!ManagerST::Get()->DbgCanInteract()) { + return; + } + + wxString word = GetSelectedText(); + if (word.IsEmpty()) { + word = GetWordAtCaret(); + if (word.IsEmpty()) { + return; + } + } + + m_customCmds.clear(); + + wxMenuItem *item; + item = new wxMenuItem(menu, wxID_SEPARATOR); + menu->Prepend(item); + m_dynItems.push_back(item); + + + wxString menuItemText; + + menuItemText.Clear(); + menuItemText << wxT("Quick Watch '") << word << wxT("'"); + item = new wxMenuItem(menu, wxNewId(), menuItemText); + menu->Prepend(item); + menu->Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(LEditor::OnDbgQuickWatch), NULL, this); + m_dynItems.push_back(item); + + menuItemText.Clear(); + menuItemText << wxT("Add Watch '") << word << wxT("'"); + item = new wxMenuItem(menu, wxNewId(), menuItemText); + menu->Prepend(item); + menu->Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(LEditor::OnDbgAddWatch), NULL, this); + m_dynItems.push_back(item); + + //--------------------------------------------- + //add custom commands + //--------------------------------------------- + DebuggerSettingsData data; + DebuggerConfigTool::Get()->ReadObject(wxT("DebuggerCommands"), &data); + std::vector cmds = data.GetCmds(); + + for (size_t i=0; iPrepend(item); + m_dynItems.push_back(item); + } + + DebuggerCmdData cmd = cmds.at(i); + menuItemText.Clear(); + menuItemText << wxT("Watch '") << word << wxT("' as '") << cmd.GetName() << wxT("'"); + item = new wxMenuItem(menu, wxNewId(), menuItemText); + menu->Prepend(item); + menu->Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(LEditor::OnDbgCustomWatch), NULL, this); + m_dynItems.push_back(item); + m_customCmds[item->GetId()] = cmd.GetCommand(); + } +} + +void LEditor::RemoveDebuggerContextMenu(wxMenu *menu) +{ + std::vector::iterator iter = m_dynItems.begin(); + for (; iter != m_dynItems.end(); iter++) { + menu->Destroy(*iter); + } + m_dynItems.clear(); + m_customCmds.clear(); +} + +void LEditor::OnDbgQuickWatch(wxCommandEvent &event) +{ + wxUnusedVar(event); + + wxString word = GetSelectedText(); + if (word.IsEmpty()) { + word = GetWordAtCaret(); + if (word.IsEmpty()) { + return; + } + } + ManagerST::Get()->DbgQuickWatch(word); +} + +void LEditor::OnDbgAddWatch(wxCommandEvent &event) +{ + wxUnusedVar(event); + + wxString word = GetSelectedText(); + if (word.IsEmpty()) { + word = GetWordAtCaret(); + if (word.IsEmpty()) { + return; + } + } + Frame::Get()->GetDebuggerPane()->GetWatchesTable()->AddExpression(word); + Frame::Get()->GetDebuggerPane()->SelectTab(DebuggerPane::WATCHES); + Frame::Get()->GetDebuggerPane()->GetWatchesTable()->RefreshValues(); +} + +void LEditor::OnDbgCustomWatch(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString word = GetSelectedText(); + if (word.IsEmpty()) { + word = GetWordAtCaret(); + if (word.IsEmpty()) { + return; + } + } + + //find the custom command to run + std::map::iterator iter = m_customCmds.find(event.GetId()); + if (iter != m_customCmds.end()) { + //Replace $(Variable) with the actual string + wxString command = iter->second; + command.Replace(wxT("$(Variable)"), word); + + Frame::Get()->GetDebuggerPane()->GetWatchesTable()->AddExpression(command); + Frame::Get()->GetDebuggerPane()->SelectTab(DebuggerPane::WATCHES); + Frame::Get()->GetDebuggerPane()->GetWatchesTable()->RefreshValues(); + } +} diff --git a/LiteEditor/editor.h b/LiteEditor/editor.h new file mode 100644 index 0000000000..4c70cfe9c8 --- /dev/null +++ b/LiteEditor/editor.h @@ -0,0 +1,315 @@ +#ifndef LITEEDITOR_EDITOR_H +#define LITEEDITOR_EDITOR_H + +#include +#include +#include +#include "entry.h" +#include "calltip.h" +#include "wx/filename.h" +#include "findreplacedlg.h" +#include +#include "context_base.h" +#include "wx/menu.h" +#include "browse_record.h" +#include "navigationmanager.h" +#include "debuggermanager.h" +#include "plugin.h" + +class wxFindReplaceDialog; + +//incase we are using DLL build of wxWdigets, we need to make this class to export its +//classes +#ifndef WXDLLIMPEXP_LE + #ifdef WXMAKINGDLL + # define WXDLLIMPEXP_LE WXEXPORT + #elif defined(WXUSINGDLL) + # define WXDLLIMPEXP_LE WXIMPORT + #else + # define WXDLLIMPEXP_LE + #endif // WXDLLIMPEXP_LE +#endif + +/** + * \ingroup LiteEditor + * LEditor CodeLite editing component based on Scintilla + * LEditor provides most of the C++/C editing capablities including: + * -# Auto Completion + * -# Find and replace + * -# Bookmarks + * -# Folding + * -# Find definition of a symbol + * and many many more + * + * \version 1.0 + * first version + * + * \date 04-21-2007 + * + * \author Eran + * + */ +class LEditor : public wxScintilla, public IEditor +{ + wxFileName m_fileName; + wxString m_project; + wxStopWatch m_watch; + ContextBasePtr m_context; + wxMenu *m_rightClickMenu; + std::vector m_dynItems; + + // static cache among editors to keep track of jumping between editors + static FindReplaceDialog *m_findReplaceDlg; + static FindReplaceData m_findReplaceData; + int m_lastMatchPos; + static std::map ms_bookmarkShapes; + bool m_popupIsOn; + time_t m_modifyTime; + std::map m_customCmds; + +public: + static FindReplaceData &GetFindReplaceData(){return m_findReplaceData;} + +public: + /// Construct a LEditor object + LEditor(wxWindow* parent, wxWindowID id, const wxSize& size, const wxString& fileName, const wxString& project, bool hidden = false); + + /// Default destructor + virtual ~LEditor(); + + // Save the editor data into file + virtual bool SaveFile(); + + // Save content of the editor to a given file (Save As...) + // this function prompts the user for selecting file name + bool SaveFileAs(); + + void CompleteWord(); + + // set this editor file name + void SetFileName(const wxFileName &name) { m_fileName = name; } + + // Return the project name + const wxString &GetProject() const { return m_project; } + // Set the project name + void SetProject(const wxString &proj) { m_project = proj; } + + // Attempt to display a list of members + // after a '.' or '->' operator has been inserted into + // the code + void CodeComplete(); + + // User clicked Ctrl+. + void GotoDefinition(); + + // User clicked Ctrl+, + void GotoPreviousDefintion(); + + /** + * Return true if editor definition contains more + * on its stack + */ + bool CanGotoPreviousDefintion() { return NavMgr::Get()->CanPrev(); } + + // Load a file + void OpenFile(const wxString& fileName, const wxString& project); + + // Callback function for UI events + void OnUpdateUI(wxUpdateUIEvent &event); + + // Callback function for menu command events + void OnMenuCommand(wxCommandEvent &event); + + // try to match a brace from the current caret pos and select the region + void MatchBraceAndSelect(bool selRegion); + + // Popup a find/replace dialog + void DoFindAndReplace(bool isReplaceDlg); + + // set this page as active, this usually happened when user changed the notebook + // page to this one + virtual void SetActive(); + + // Perform FindNext operation based on the data stored in the FindReplaceData class + void FindNext(const FindReplaceData &data); + + /** + * Change the document's syntax highlight + * \param lexerName the syntax highlight's lexer name (as appear in the liteeditor.xml file) + */ + virtual void SetSyntaxHighlight(const wxString &lexerName); + + /** + * Change the document's syntax highlight - use the file name to determine lexer name + */ + virtual void SetSyntaxHighlight(); + + /** + * Reset the editor to its default state: + * -# Syntax highlight is set according to file extension + * -# Setproperties() is called + */ + void RestoreDefaults(); + + /** + * Return the document context object + */ + ContextBasePtr GetContext() const { return m_context; } + + // Bookmark API + //----------------------------------------- + + // Toggle marker at the current line + void ToggleMarker(); + // Delete all markers from the current document + void DelAllMarkers(); + // Find next marker and move cursor to that line + void FindNextMarker(); + // Find previous marker and move cursor to that line + void FindPrevMarker(); + // Replace all + bool ReplaceAll(); + // mark all occurances + bool MarkAll(); + + static FindReplaceDialog* GetFindReplaceDialog() { return m_findReplaceDlg; } + + // Util function + wxChar PreviousChar(const int& pos, int &foundPos, bool wantWhitespace = false); + wxChar NextChar(const int& pos, int &foundPos); + int FindString (const wxString &str, int flags, const bool down, long pos); + void SetDirty(bool dirty); + + bool FindAndSelect(); + bool FindAndSelect(const FindReplaceData &data); + + bool Replace(); + bool Replace(const FindReplaceData &data); + + /** + * Add marker to the current line + */ + void AddMarker(); + + /** + * Delete a marker from the current line + */ + void DelMarker(); + + /** + * Attempt to match brace backward + * \param chCloseBrace the closing brace character (can be one of: '}' ')' ']') + * \param pos position to start the match + * \param matchedPos output, the position of the matched brace + * \return true on match false otherwise + */ + bool MatchBraceBack(const wxChar& chCloseBrace, const long &pos, long &matchedPos); + + /** + * Open file and clear the undo buffer + */ + virtual void Create(const wxString &project, const wxFileName &fileName); + + /** + * Insert text to the editor and keeping the page indentation + * \param text text to enter + * \param pos position to insert the text + */ + void InsertTextWithIndentation(const wxString &text, int pos); + + /** + * \brief create browsing crecord from the editor's current position + * \return browsing record + */ + BrowseRecord CreateBrowseRecord(); + bool IsContextMenuOn() const {return m_popupIsOn;} + + /** + * toggle break point at the current line & file + * the second version is using BreakpointInfo + */ + void ToggleBreakpoint(); + void ToggleBreakpoint(const BreakpointInfo &bp); + + /** + * remove breakpoint from current file and + * from the carte line number + */ + void DelBreakpoint(); + + /** + * remove breakpoint from current file and + * from the carte line number + */ + virtual void DelBreakpoint(const BreakpointInfo &bp); + virtual void UpdateBreakpoints(); + + //-------------------------------- + // breakpoint visualisation + //-------------------------------- + void SetBreakpointMarker(int lineno); + virtual void DelBreakpointMarker(int lineno); + virtual void DelAllBreakpointMarkers(); + + virtual void HighlightLine(int lineno); + virtual void UnHighlightAll(); + + //---------------------------------- + //File modifications + //---------------------------------- + + /** + * return/set the last modification time that was made by the editor + */ + time_t GetEditorLastModifiedTime() const {return m_modifyTime;} + void SetEditorLastModifiedTime(time_t modificationTime) {m_modifyTime = modificationTime;} + + /** + *-------------------------------------------------- + * Implemetation for IEditor interace + *-------------------------------------------------- + */ + virtual wxString GetEditorText() {return GetText();} + virtual void SetEditorText(const wxString &text); + virtual void ReloadFile(); + virtual void SetCaretAt(long pos); + virtual long GetCurrentPosition(){return GetCurrentPos();} + virtual const wxFileName& GetFileName() const { return m_fileName; } + virtual const wxString &GetProjectName() const { return m_project; } + virtual wxString GetWordAtCaret() ; + +private: + void DoSetBreakpoint(const BreakpointInfo &bp); + void SetProperties(); + void DefineMarker(int marker, int markerType, wxColor fore, wxColor back); + void SetLineNumberWidth(); + bool SaveToFile(const wxFileName &fileName); + void BraceMatch(const bool& bSelRegion); + void BraceMatch(long pos); + + // Conevert FindReplaceDialog flags to wxSCI flags + int GetSciSearchFlag(const FindReplaceData &data); + + void AddDebuggerContextMenu(wxMenu *menu); + void RemoveDebuggerContextMenu(wxMenu *menu); + + DECLARE_EVENT_TABLE() + void OnCharAdded(wxScintillaEvent& event); + void OnMarginClick(wxScintillaEvent& event); + void OnChange(wxScintillaEvent& event); + void OnDwellStart(wxScintillaEvent& event); + void OnDwellEnd(wxScintillaEvent& event); + void OnCallTipClick(wxScintillaEvent& event); + void OnModified(wxScintillaEvent& event); + void OnSciUpdateUI(wxScintillaEvent &event); + void OnFindDialog(wxCommandEvent &event); + void OnContextMenu(wxContextMenuEvent &event); + void OnKeyDown(wxKeyEvent &event); + void OnLeftDown(wxMouseEvent &event); + void OnPopupMenuUpdateUI(wxUpdateUIEvent &event); + void OnDbgQuickWatch(wxCommandEvent &event); + void OnDbgAddWatch(wxCommandEvent &event); + void OnDbgCustomWatch(wxCommandEvent &event); +}; + +#endif // LITEEDITOR_EDITOR_H diff --git a/LiteEditor/editor_creator.cpp b/LiteEditor/editor_creator.cpp new file mode 100644 index 0000000000..4f811c940f --- /dev/null +++ b/LiteEditor/editor_creator.cpp @@ -0,0 +1,35 @@ +#include "editor_creator.h" +#include "editor.h" +#include "wx/window.h" +#include "frame.h" + + +EditorCreator::EditorCreator() +: m_parent(NULL) +{ +} + + +EditorCreator::~EditorCreator() +{ +} + +void EditorCreator::SetParent(wxWindow *parent) +{ + m_parent = parent; +} + +LEditor *EditorCreator::NewInstance() +{ + return new LEditor(Frame::Get()->GetNotebook(), wxID_ANY, wxSize(1, 1), wxEmptyString, wxEmptyString, false); +} + +void EditorCreator::Add(LEditor *editor) +{ + m_queue.push_back(editor); +} + +size_t EditorCreator::GetQueueCount() +{ + return m_queue.size(); +} diff --git a/LiteEditor/editor_creator.h b/LiteEditor/editor_creator.h new file mode 100644 index 0000000000..36de33e4ca --- /dev/null +++ b/LiteEditor/editor_creator.h @@ -0,0 +1,32 @@ +#ifndef EDITOR_CREATOR_H +#define EDITOR_CREATOR_H + +#include "singleton.h" +#include "wx/string.h" +#include "deque" + +class LEditor; +class wxWindow; + +/** + * Under GTK, a creation of Scintilla object is slow, the creator runs a background thread + * the always creates scintilla objects and keep them in a pool + */ +class EditorCreator { + friend class Singleton; + std::deque m_queue; + wxWindow *m_parent; + +public: + EditorCreator(); + virtual ~EditorCreator(); + + LEditor *NewInstance(); + void SetParent(wxWindow *parent); + void Add(LEditor *editor); + size_t GetQueueCount(); +}; + +typedef Singleton EditorCreatorST; + +#endif // EDITOR_CREATOR_H diff --git a/LiteEditor/envvar_dlg.cpp b/LiteEditor/envvar_dlg.cpp new file mode 100644 index 0000000000..94a5b60859 --- /dev/null +++ b/LiteEditor/envvar_dlg.cpp @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "envvar_dlg.h" + +/////////////////////////////////////////////////////////////////////////// + +EnvVarDlg::EnvVarDlg( wxWindow* parent, wxString name, wxString value, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText4 = new wxStaticText( m_panel1, wxID_ANY, wxT("Variable Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textName = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_textName, 1, wxALL|wxEXPAND, 5 ); + m_textName->SetValue(name); + + m_staticText3 = new wxStaticText( m_panel1, wxID_ANY, wxT("Variable Value:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textValue = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_textValue, 1, wxALL|wxEXPAND, 5 ); + m_textValue->SetValue(value); + + m_panel1->SetSizer( fgSizer2 ); + m_panel1->Layout(); + fgSizer2->Fit( m_panel1 ); + bSizer4->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); + + m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer4->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer11->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCacnel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer11->Add( m_buttonCacnel, 0, wxALL, 5 ); + + bSizer4->Add( bSizer11, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer4 ); + this->Layout(); +} diff --git a/LiteEditor/envvar_dlg.h b/LiteEditor/envvar_dlg.h new file mode 100644 index 0000000000..bf079a38a4 --- /dev/null +++ b/LiteEditor/envvar_dlg.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __envvar_dlg__ +#define __envvar_dlg__ + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class EnvVarDlg +/////////////////////////////////////////////////////////////////////////////// +class EnvVarDlg : public wxDialog +{ +private: + +protected: + wxPanel* m_panel1; + wxStaticText* m_staticText3; + wxTextCtrl* m_textValue; + wxStaticText* m_staticText4; + wxTextCtrl* m_textName; + wxStaticLine* m_staticline3; + wxButton* m_buttonOK; + wxButton* m_buttonCacnel; +public: + EnvVarDlg( wxWindow* parent, wxString name = wxEmptyString, wxString value = wxEmptyString, int id = wxID_ANY, wxString title = wxT("Environment Variable"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 320,152 ), int style = wxDEFAULT_DIALOG_STYLE); + + wxString GetName() const { return m_textName->GetValue(); } + wxString GetValue() const { return m_textValue->GetValue(); } +}; + +#endif //__envvar_dlg__ diff --git a/LiteEditor/envvar_table.cpp b/LiteEditor/envvar_table.cpp new file mode 100644 index 0000000000..6e34523a53 --- /dev/null +++ b/LiteEditor/envvar_table.cpp @@ -0,0 +1,168 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "envvar_table.h" +#include "manager.h" +#include "macros.h" +#include "envvar_dlg.h" +#include "globals.h" + +/////////////////////////////////////////////////////////////////////////// + +EnvVarsTableDlg::EnvVarsTableDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxVERTICAL ); + + m_listVarsTable = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL ); + bSizer12->Add( m_listVarsTable, 1, wxALL|wxEXPAND, 5 ); + InitVars(); + + m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer12->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer13; + bSizer13 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonNew = new wxButton( this, wxID_ANY, wxT("New..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer13->Add( m_buttonNew, 0, wxALL, 5 ); + + m_buttonDelete = new wxButton( this, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer13->Add( m_buttonDelete, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer13->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer12->Add( bSizer13, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer12 ); + this->Layout(); + + ConnectEvents(); +} + +void EnvVarsTableDlg::ConnectEvents() +{ + ConnectButton(m_buttonDelete, EnvVarsTableDlg::OnDeleteVar); + ConnectButton(m_buttonNew, EnvVarsTableDlg::OnNewVar); + ConnectListCtrlItemSelected(m_listVarsTable, EnvVarsTableDlg::OnItemSelected); + ConnectListCtrlItemActivated(m_listVarsTable, EnvVarsTableDlg::OnItemActivated); +} + +void EnvVarsTableDlg::InitVars() +{ + m_listVarsTable->ClearAll(); + m_listVarsTable->Freeze(); + EnvironmentVarieblesPtr env = ManagerST::Get()->GetEnvironmentVariables(); + //add two columns to the list ctrl + m_listVarsTable->InsertColumn(0, wxT("Name")); + m_listVarsTable->InsertColumn(1, wxT("Value")); + + EnvironmentVariebles::ConstIterator iter = env->Begin(); + for (; iter != env->End(); iter++) { + long item = AppendListCtrlRow(m_listVarsTable); + SetColumnText(m_listVarsTable, item, 0, iter->first); + SetColumnText(m_listVarsTable, item, 1, iter->second); + } + + m_listVarsTable->SetColumnWidth(0, wxLIST_AUTOSIZE); + m_listVarsTable->SetColumnWidth(1, wxLIST_AUTOSIZE); + m_listVarsTable->Thaw(); +} + +void EnvVarsTableDlg::OnEditVar(wxCommandEvent &event) +{ + wxUnusedVar(event); + EnvVarDlg *dlg = new EnvVarDlg(this, m_selectedVarName, m_selectedVarValue); + if(dlg->ShowModal() == wxID_OK){ + EnvironmentVarieblesPtr env = ManagerST::Get()->GetEnvironmentVariables(); + env->SetEnv(dlg->GetName(), dlg->GetValue()); + ManagerST::Get()->SetEnvironmentVariables(env); + InitVars(); + } + dlg->Destroy(); +} + +void EnvVarsTableDlg::OnNewVar(wxCommandEvent &event) +{ + wxUnusedVar(event); + EnvVarDlg *dlg = new EnvVarDlg(this); + if(dlg->ShowModal() == wxID_OK){ + EnvironmentVarieblesPtr env = ManagerST::Get()->GetEnvironmentVariables(); + env->SetEnv(dlg->GetName(), dlg->GetValue()); + ManagerST::Get()->SetEnvironmentVariables(env); + InitVars(); + } + dlg->Destroy(); +} + +void EnvVarsTableDlg::OnDeleteVar(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString msg; + msg << wxT("Delete environment variable '") << m_selectedVarName << wxT("'?"); + if(wxMessageBox(msg, wxT("CodeLite"), wxYES_NO | wxICON_QUESTION) == wxYES){ + EnvironmentVarieblesPtr env = ManagerST::Get()->GetEnvironmentVariables(); + env->DeleteEnv(m_selectedVarName); + ManagerST::Get()->SetEnvironmentVariables(env); + InitVars(); + } +} + +void EnvVarsTableDlg::OnItemSelected(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listVarsTable->GetItem(info) ){ + m_selectedVarName = info.m_text; + } + + info.m_col = 1;//value + if( m_listVarsTable->GetItem(info)){ + m_selectedVarValue = info.m_text; + } +} + +void EnvVarsTableDlg::OnItemActivated(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listVarsTable->GetItem(info) ){ + m_selectedVarName = info.m_text; + } + + info.m_col = 1;//value + if( m_listVarsTable->GetItem(info)){ + m_selectedVarValue = info.m_text; + } + + wxCommandEvent dummy; + OnEditVar(dummy); +} diff --git a/LiteEditor/envvar_table.h b/LiteEditor/envvar_table.h new file mode 100644 index 0000000000..0478f4616f --- /dev/null +++ b/LiteEditor/envvar_table.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __envvar_table__ +#define __envvar_table__ + +#include + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class EnvVarsTableDlg +/////////////////////////////////////////////////////////////////////////////// +class EnvVarsTableDlg : public wxDialog +{ +private: + void InitVars(); + void ConnectEvents(); + +protected: + void OnNewVar(wxCommandEvent &event); + void OnEditVar(wxCommandEvent &event); + void OnDeleteVar(wxCommandEvent &event); + void OnItemSelected(wxListEvent &event); + void OnItemActivated(wxListEvent &event); + +protected: + wxListCtrl* m_listVarsTable; + wxStaticLine* m_staticline4; + wxButton* m_buttonDelete; + wxButton* m_buttonCancel; + wxButton* m_buttonNew; + wxString m_selectedVarName; + wxString m_selectedVarValue; + +public: + EnvVarsTableDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Environment Variables"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 552,330 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__envvar_table__ diff --git a/LiteEditor/exports.h b/LiteEditor/exports.h new file mode 100644 index 0000000000..b3fbbf3dc5 --- /dev/null +++ b/LiteEditor/exports.h @@ -0,0 +1,18 @@ +#ifndef EXPORTS_H +#define EXPORTS_H + +#ifdef WXDLLIMPEXP_LE +#undef WXDLLIMPEXP_LE +#endif + +#ifdef WXMAKINGDLL_LE +# define WXDLLIMPEXP_LE WXEXPORT +#elif defined(WXUSINGDLL_LE) +# define WXDLLIMPEXP_LE WXIMPORT +#else +# define WXDLLIMPEXP_LE +#endif // WXDLLIMPEXP_LE + + +#endif //EXPORTS_H + diff --git a/LiteEditor/ext_db_page1.cpp b/LiteEditor/ext_db_page1.cpp new file mode 100644 index 0000000000..8be7c2f0ba --- /dev/null +++ b/LiteEditor/ext_db_page1.cpp @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "ext_db_page1.h" +#include "ext_db_page2.h" +#include "wx/filename.h" + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE(ExtDbPage1, wxWizardPageSimple) + EVT_WIZARD_PAGE_CHANGING(wxID_ANY, ExtDbPage1::OnValidate) +END_EVENT_TABLE() + +ExtDbPage1::ExtDbPage1(wxWizard* parent) + : wxWizardPageSimple(parent) +{ + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Please select the root path to your include files:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer1->Add( m_staticText1, 0, wxALL|wxEXPAND, 5 ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_dirPicker = new DirPicker(m_panel1); + bSizer2->Add( m_dirPicker, 0, wxALL|wxEXPAND, 5 ); + + m_panel1->SetSizer( bSizer2 ); + m_panel1->Layout(); + bSizer2->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 0 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxEmptyString ), wxVERTICAL ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("CodeLite searches this path for files that matches\nthe file type pattern as provided in the ctags options dialog\n"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + sbSizer1->Add( m_staticText3, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( sbSizer1, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} + +void ExtDbPage1::OnValidate(wxWizardEvent &event) +{ + //validate that there is a valid name to the database + wxFileName path(m_dirPicker->GetPath()); + if (!path.DirExists()){ + wxMessageBox(wxT("Invalid input directory")); + event.Veto(); + return; + } + + ExtDbPage2* nextPage = (ExtDbPage2*)GetNext(); + nextPage->BuildTree(m_dirPicker->GetPath()); +} diff --git a/LiteEditor/ext_db_page1.h b/LiteEditor/ext_db_page1.h new file mode 100644 index 0000000000..53773ca6a4 --- /dev/null +++ b/LiteEditor/ext_db_page1.h @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __ext_db_page1__ +#define __ext_db_page1__ + +#include + +#include +#include +#include +#include "dirpicker.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ExtDbPage1 +/////////////////////////////////////////////////////////////////////////////// +class ExtDbPage1 : public wxWizardPageSimple +{ + private: + + protected: + wxStaticText* m_staticText1; + wxPanel* m_panel1; + DirPicker* m_dirPicker; + wxStaticText* m_staticText3; + void OnValidate(wxWizardEvent &event); + + public: + ExtDbPage1(wxWizard* parent); + wxString GetPath() const { return m_dirPicker->GetPath(); } + + DECLARE_EVENT_TABLE(); + +}; + +#endif //__ext_db_page1__ diff --git a/LiteEditor/ext_db_page2.cpp b/LiteEditor/ext_db_page2.cpp new file mode 100644 index 0000000000..fbb71f3701 --- /dev/null +++ b/LiteEditor/ext_db_page2.cpp @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "ext_db_page2.h" +#include "macros.h" +#include "checkdirtreectrl.h" + +/////////////////////////////////////////////////////////////////////////// + +ExtDbPage2::ExtDbPage2(wxWizard* parent) +: wxWizardPageSimple(parent) +{ + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Select the directories to be parsed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer1->Add( m_staticText1, 0, wxALL|wxEXPAND, 5 ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_includeDirs = new CheckDirTreeCtrl( m_panel1, wxEmptyString, wxID_ANY); + bSizer2->Add(m_includeDirs, 1, wxEXPAND | wxALL, 5 ); + + m_panel1->SetSizer( bSizer2 ); + m_panel1->Layout(); + bSizer2->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 0 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxEmptyString ), wxVERTICAL ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("TIP: To make the database as small as possible (i.e. better performance),\nSelect only the directories that contains your symbols"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + sbSizer1->Add( m_staticText3, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( sbSizer1, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + +} + +void ExtDbPage2::GetIncludeDirs(wxArrayString &arr) +{ + m_includeDirs->GetSelectedDirs(arr); +} + +void ExtDbPage2::BuildTree(const wxString &path) +{ + m_includeDirs->BuildTree(path); +} diff --git a/LiteEditor/ext_db_page2.h b/LiteEditor/ext_db_page2.h new file mode 100644 index 0000000000..e076e3cc09 --- /dev/null +++ b/LiteEditor/ext_db_page2.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __ext_db_page2__ +#define __ext_db_page2__ + +#include + +#include +#include +#include + +class CheckDirTreeCtrl; + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class ExtDbPage2 +/////////////////////////////////////////////////////////////////////////////// +class ExtDbPage2 : public wxWizardPageSimple +{ + private: + + protected: + wxStaticText* m_staticText1; + wxPanel* m_panel1; + wxStaticText* m_staticText3; + CheckDirTreeCtrl *m_includeDirs; + + public: + ExtDbPage2( wxWizard* parent); + void BuildTree(const wxString &path); + void GetIncludeDirs(wxArrayString &arr); +}; + +#endif //__ext_db_page2__ diff --git a/LiteEditor/ext_db_page3.cpp b/LiteEditor/ext_db_page3.cpp new file mode 100644 index 0000000000..c41e843d23 --- /dev/null +++ b/LiteEditor/ext_db_page3.cpp @@ -0,0 +1,97 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP +#include "macros.h" +#include "ext_db_page3.h" +#include "manager.h" +#include "wx/dir.h" + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE(ExtDbPage3, wxWizardPageSimple) +EVT_WIZARD_PAGE_CHANGING(wxID_ANY, ExtDbPage3::OnValidate) +END_EVENT_TABLE() + +ExtDbPage3::ExtDbPage3(wxWizard* parent) +: wxWizardPageSimple(parent) +{ + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Please enter a name for the symbol database:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer1->Add( m_staticText1, 0, wxALL|wxEXPAND, 5 ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + //Populate the combo box with an existing tags database files + wxArrayString files; + wxArrayString shortNames; + wxString fileSpec( wxT( "*.tags" ) ); + wxDir::GetAllFiles( ManagerST::Get()->GetStarupDirectory(), &files, fileSpec, wxDIR_FILES ); + + for(size_t i=0; iGetExtDatabase()->GetDatabaseFileName().GetFullName(); + m_comboDbName = new wxComboBox(m_panel1, wxID_ANY, selection, wxDefaultPosition, wxDefaultSize, shortNames); + + bSizer2->Add( m_comboDbName, 0, wxALL|wxEXPAND, 5 ); + + m_checkSetAsActive = new wxCheckBox(m_panel1, wxID_ANY, wxT("Attach the database when completed")); + m_checkSetAsActive->SetValue(true); + bSizer2->Add( m_checkSetAsActive, 0, wxALL, 5 ); + + m_panel1->SetSizer( bSizer2 ); + m_panel1->Layout(); + bSizer2->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 0 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxEmptyString ), wxVERTICAL ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Parsed symbols are stored into this database.\nIf a database with this name already exist, the new symbols are appended"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + sbSizer1->Add( m_staticText3, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( sbSizer1, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} + +void ExtDbPage3::OnValidate(wxWizardEvent &event) +{ + //validate that there is a valid name to the database + wxString dbname(m_comboDbName->GetValue()); + TrimString(dbname); + if(dbname.IsEmpty() && event.GetDirection()){ + wxMessageBox(wxT("Database name can not be empty")); + event.Veto(); + return; + } + + if(!dbname.EndsWith(wxT(".tags"))){ + dbname << wxT(".tags"); + } + m_comboDbName->SetValue(dbname); +} + diff --git a/LiteEditor/ext_db_page3.h b/LiteEditor/ext_db_page3.h new file mode 100644 index 0000000000..e840a89353 --- /dev/null +++ b/LiteEditor/ext_db_page3.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __ext_db_page3__ +#define __ext_db_page3__ + +#include + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ExtDbPage3 +/////////////////////////////////////////////////////////////////////////////// +class ExtDbPage3 : public wxWizardPageSimple +{ + private: + + protected: + wxStaticText* m_staticText1; + wxPanel* m_panel1; + wxComboBox* m_comboDbName; + wxStaticText* m_staticText3; + wxCheckBox *m_checkSetAsActive; + void OnValidate(wxWizardEvent &event); + + public: + ExtDbPage3(wxWizard* parent); + wxString GetDbName() const {return m_comboDbName->GetValue();} + bool AttachDb() const {return m_checkSetAsActive->GetValue();} + DECLARE_EVENT_TABLE(); +}; + +#endif //__ext_db_page3__ + diff --git a/LiteEditor/extdbwizard.cpp b/LiteEditor/extdbwizard.cpp new file mode 100644 index 0000000000..bc3aaad4fd --- /dev/null +++ b/LiteEditor/extdbwizard.cpp @@ -0,0 +1,43 @@ +#include "extdbwizard.h" +#include + +ExtDbWizard::ExtDbWizard(wxWindow *parent, wxWindowID id) +{ + wxBitmap bmp = wxXmlResource::Get()->LoadBitmap(wxT("sym_wiz_bmp")); + wxWizard::Create(parent, id, wxT("Create Symbols Database"), bmp); + + //create the pages + m_page1 = new ExtDbPage1(this); + m_page2 = new ExtDbPage2(this); + m_page3 = new ExtDbPage3(this); + + //chain the pages + wxWizardPageSimple::Chain(m_page1, m_page2); + wxWizardPageSimple::Chain(m_page2, m_page3); +} + +ExtDbWizard::~ExtDbWizard() +{ +} + +bool ExtDbWizard::Run(ExtDbData &data) +{ + wxSize sz1 = m_page1->GetSizer()->CalcMin(); + wxSize sz2 = m_page2->GetSizer()->CalcMin(); + wxSize sz3 = m_page3->GetSizer()->CalcMin(); + + wxSize maxSize = sz1; + + if(maxSize.GetWidth() < sz2.GetWidth()) maxSize = sz2; + if(maxSize.GetWidth() < sz3.GetWidth()) maxSize = sz3; + + SetPageSize(maxSize); + bool res = RunWizard(m_page1); + if(res){ + data.rootPath = ((ExtDbPage1*)m_page1)->GetPath(); + data.dbName = ((ExtDbPage3*)m_page3)->GetDbName(); + data.attachDb = ((ExtDbPage3*)m_page3)->AttachDb(); + ((ExtDbPage2*)m_page2)->GetIncludeDirs(data.includeDirs); + } + return res; +} diff --git a/LiteEditor/extdbwizard.h b/LiteEditor/extdbwizard.h new file mode 100644 index 0000000000..10eea47d0f --- /dev/null +++ b/LiteEditor/extdbwizard.h @@ -0,0 +1,27 @@ +#ifndef EXTDBWIZARD_H +#define EXTDBWIZARD_H +#include +#include "ext_db_page1.h" +#include "ext_db_page2.h" +#include "ext_db_page3.h" +#include "extdbdata.h" + +class ExtDbWizard : public wxWizard +{ + wxWizardPageSimple *m_page1; + wxWizardPageSimple *m_page2; + wxWizardPageSimple *m_page3; + +public: + ExtDbWizard(wxWindow *parent, wxWindowID id); + virtual ~ExtDbWizard(); + + /** + * Start the wizard + * \param info if the wizard succeeded, info will contain the data collected from user + * \return true on successfull run, false otherwise + */ + bool Run(ExtDbData &info); +}; + +#endif //EXTDBWIZARD_H diff --git a/LiteEditor/file.xpm b/LiteEditor/file.xpm new file mode 100644 index 0000000000..b0b3d63c55 --- /dev/null +++ b/LiteEditor/file.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char *xpm_file[] = { +"16 16 16 2", +"00 c black", +"01 c #848484", +"02 c #D6D6CE", +"03 c gray100", +"04 c none", +"05 c gray100", +"06 c gray100", +"07 c gray100", +"08 c gray100", +"09 c gray100", +"10 c gray100", +"11 c gray100", +"12 c gray100", +"13 c gray100", +"14 c gray100", +"15 c gray100", +"04040404040404040404040404040404", +"04040101010101010101010104040404", +"04040103030303030303030001040404", +"04040103030303030303030002010404", +"04040103030000000000030000000004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030303030303030303030004", +"04040000000000000000000000000004" +}; diff --git a/LiteEditor/filedroptarget.cpp b/LiteEditor/filedroptarget.cpp new file mode 100644 index 0000000000..87eddae275 --- /dev/null +++ b/LiteEditor/filedroptarget.cpp @@ -0,0 +1,22 @@ +#include "filedroptarget.h" +#include "manager.h" + +FileDropTarget::FileDropTarget() +: wxFileDropTarget() +{ +} + +FileDropTarget::~FileDropTarget() +{ +} + +bool FileDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames) +{ + wxUnusedVar(x); + wxUnusedVar(y); + for(size_t i=0; iOpenFile(filenames.Item(i), wxEmptyString); + } + return true; +} + diff --git a/LiteEditor/filedroptarget.h b/LiteEditor/filedroptarget.h new file mode 100644 index 0000000000..192c654a28 --- /dev/null +++ b/LiteEditor/filedroptarget.h @@ -0,0 +1,11 @@ +#ifndef DROPFILETARGET_H +#define DROPFILETARGET_H + +#include +class FileDropTarget : public wxFileDropTarget { +public: + FileDropTarget(); + virtual ~FileDropTarget(); + virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames); +}; +#endif //DROPFILETARGET_H diff --git a/LiteEditor/fileexplorer.cpp b/LiteEditor/fileexplorer.cpp new file mode 100644 index 0000000000..f8ca8c7a5e --- /dev/null +++ b/LiteEditor/fileexplorer.cpp @@ -0,0 +1,104 @@ +#include "fileexplorer.h" +#include "fileexplorertree.h" +#include "wx/sizer.h" +#include "wx/tokenzr.h" + +#include "macros.h" +#include "globals.h" +#include "plugin.h" + +FileExplorer::FileExplorer(wxWindow *parent, const wxString &caption) +: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(250, 300)) +, m_caption(caption) +#ifdef __WXMSW__ +, m_thread(this) +#endif +{ + CreateGUIControls(); +} + +FileExplorer::~FileExplorer() +{ +} + +void FileExplorer::CreateGUIControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + +#ifdef __WXMSW__ + wxArrayString volumes; + Connect(wxEVT_THREAD_VOLUME_COMPLETED, wxCommandEventHandler(FileExplorer::OnVolumes), NULL, this); + + m_thread.Create(); + m_thread.Run(); + + m_volumes = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, volumes, 0 ); + mainSizer->Add(m_volumes, 0, wxEXPAND|wxALL, 1); +#endif + + m_fileTree = new FileExplorerTree(this, wxID_ANY); + mainSizer->Add(m_fileTree, 1, wxEXPAND|wxALL, 1); + mainSizer->Layout(); + +#ifdef __WXMSW__ + m_fileTree->Connect(wxVDTC_ROOT_CHANGED, wxCommandEventHandler(FileExplorer::OnRootChanged), NULL, this); + ConnectChoice(m_volumes, FileExplorer::OnVolumeChanged); +#endif +} + +void FileExplorer::Scan() +{ + wxString cwd = wxGetCwd(); + cwd << wxT("/"); + wxFileName fn(cwd); + if(fn.HasVolume()){ + wxString root; + root << fn.GetVolume() << wxT(":\\"); + m_fileTree->SetRootPath(root, false, wxVDTC_DEFAULT); +#ifdef __WXMSW__ + if(m_volumes->FindString(fn.GetVolume() + wxT(":\\")) == wxNOT_FOUND) { + m_volumes->AppendString(fn.GetVolume() + wxT(":\\")); + } + m_volumes->SetStringSelection(fn.GetVolume() + wxT(":\\")); +#endif + }else{ + m_fileTree->SetRootPath(wxT("/"), false, wxVDTC_DEFAULT); + } + + m_fileTree->ExpandToPath(fn); + SendCmdEvent(wxEVT_FILE_EXP_INIT_DONE); +} + +#ifdef __WXMSW__ +void FileExplorer::OnVolumeChanged(wxCommandEvent &e) +{ + wxUnusedVar(e); + //Get the selection + wxString newRoot = m_volumes->GetStringSelection(); + m_fileTree->SetRootPath(newRoot); +} + +void FileExplorer::OnRootChanged(wxCommandEvent &e) +{ + wxTreeItemId root = m_fileTree->GetRootItem(); + if(root.IsOk()){ + wxString vol = m_fileTree->GetItemText(root); + this->m_volumes->SetStringSelection(vol); + } + e.Skip(); +} + +void FileExplorer::OnVolumes(wxCommandEvent &e) +{ + wxString curvol = m_volumes->GetStringSelection(); + wxArrayString volumes = wxStringTokenize(e.GetString(), wxT(";"), wxTOKEN_STRTOK); + int where = volumes.Index(curvol); + if(where != wxNOT_FOUND){ + volumes.RemoveAt((size_t)where); + } + m_volumes->Append(volumes); +} + +#endif + diff --git a/LiteEditor/fileexplorer.h b/LiteEditor/fileexplorer.h new file mode 100644 index 0000000000..2818e09b9a --- /dev/null +++ b/LiteEditor/fileexplorer.h @@ -0,0 +1,40 @@ +#ifndef FILEEXPLORER_H +#define FILEEXPLORER_H + +#include "wx/panel.h" +#include "wx/choice.h" +#include "volumelocatorthread.h" + +class FileExplorerTree; + +class FileExplorer : public wxPanel +{ +private: + FileExplorerTree *m_fileTree; + wxString m_caption; + +#ifdef __WXMSW__ + wxChoice *m_volumes; + VolumeLocatorThread m_thread; +#endif + +private: + void CreateGUIControls(); +#ifdef __WXMSW__ + void OnVolumeChanged(wxCommandEvent &e); + void OnRootChanged(wxCommandEvent &e); + void OnVolumes(wxCommandEvent &e); +#endif + +public: + FileExplorer(wxWindow *parent, const wxString &caption); + virtual ~FileExplorer(); + + //setters/getters + const wxString &GetCaption() const{return m_caption;} + FileExplorerTree *GetFileTree() {return m_fileTree;} + void Scan(); +}; + +#endif //FILEEXPLORER_H + diff --git a/LiteEditor/fileexplorertree.cpp b/LiteEditor/fileexplorertree.cpp new file mode 100644 index 0000000000..edd26fc2ea --- /dev/null +++ b/LiteEditor/fileexplorertree.cpp @@ -0,0 +1,214 @@ +#include "fileexplorertree.h" +#include "manager.h" +#include "wx/xrc/xmlres.h" +#include "pluginmanager.h" +#include "globals.h" +#include "dirsaver.h" +#include "procutils.h" + +BEGIN_EVENT_TABLE(FileExplorerTree, wxVirtualDirTreeCtrl) + EVT_TREE_ITEM_MENU(wxID_ANY, FileExplorerTree::OnContextMenu) + EVT_TREE_ITEM_ACTIVATED(wxID_ANY, FileExplorerTree::OnItemActivated) +END_EVENT_TABLE() + +FileExplorerTree::FileExplorerTree(wxWindow *parent, wxWindowID id) + : wxVirtualDirTreeCtrl(parent, id) + , m_rclickMenu(NULL) +{ + m_rclickMenu = wxXmlResource::Get()->LoadMenu(wxT("file_explorer_menu")); + Connect(XRCID("open_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FileExplorerTree::OnOpenFile), NULL, this); + Connect(XRCID("open_file_in_text_editor"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FileExplorerTree::OnOpenFileInTextEditor), NULL, this); + Connect(XRCID("refresh_node"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FileExplorerTree::OnRefreshNode), NULL, this); + Connect(XRCID("delete_node"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FileExplorerTree::OnDeleteNode), NULL, this); + Connect(XRCID("open_shell"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(FileExplorerTree::OnOpenShell), NULL, this); + Connect(GetId(), wxEVT_LEFT_DCLICK, wxMouseEventHandler( FileExplorerTree::OnMouseDblClick ) ); + Connect(GetId(), wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEventHandler(FileExplorerTree::OnKeyDown)); +} + +FileExplorerTree::~FileExplorerTree() +{ + if (m_rclickMenu) { + delete m_rclickMenu; + m_rclickMenu = NULL; + } +} + +void FileExplorerTree::OnKeyDown(wxTreeEvent &e) +{ + if(e.GetKeyCode() == WXK_RETURN || e.GetKeyCode() == WXK_NUMPAD_ENTER){ + wxTreeItemId item = GetSelection(); + DoItemActivated(item); + }else if(e.GetKeyCode() == WXK_DELETE || e.GetKeyCode() == WXK_NUMPAD_DELETE){ + wxCommandEvent dummy; + OnDeleteNode(dummy); + }else{ + e.Skip(); + } +} + +void FileExplorerTree::OnDeleteNode(wxCommandEvent &e) +{ + wxTreeItemId item = GetSelection(); + bool needRefresh = false; + + if (item.IsOk()) { + wxString fp = GetFullPath(item).GetFullPath(); + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(item); + if (b && b->IsDir()) { + wxString msg; + msg << wxT("'") << GetItemText(item) << wxT("' is a directory. Are you sure you want to remove it and its content?"); + if (wxMessageBox(msg, wxT("Remove Directory"), wxICON_WARNING|wxYES_NO|wxCANCEL) == wxYES) { + if (!RemoveDirectory(fp)) { + wxMessageBox(wxT("Failed to remove directory"), wxT("Remove Directory"), wxICON_ERROR | wxOK); + }else{ + needRefresh = true; + } + } + } else { + if (wxRemoveFile(fp)) { + needRefresh = true; + } + } + if (needRefresh) { + wxTreeItemId parent = GetItemParent(item); + if(parent.IsOk()){ + //select the parent, and call refresh. + //by making the parent the selected item, + //we force the refresh to take place on the parent node + SelectItem(parent); + wxCommandEvent dummy; + OnRefreshNode(dummy); + } + } + } + + e.Skip(); +} + +void FileExplorerTree::OnContextMenu(wxTreeEvent &event) +{ + wxTreeItemId item = event.GetItem(); + if (item.IsOk()) { + SelectItem(item); + if (m_rclickMenu) { + //let the plugins hook their content + PluginManager::Get()->HookPopupMenu(m_rclickMenu, MenuTypeFileExplorer); + PopupMenu(m_rclickMenu); + //let the plugins remove their hooked content + PluginManager::Get()->UnHookPopupMenu(m_rclickMenu, MenuTypeFileExplorer); + } + } +} + +void FileExplorerTree::DoOpenItem(const wxTreeItemId &item) +{ + if (item.IsOk()) { + wxFileName fn = GetFullPath(item); + if (fn.GetExt() == wxT("workspace")) { + //open workspace + ManagerST::Get()->OpenWorkspace(fn.GetFullPath()); + } else { + ManagerST::Get()->OpenFile(fn.GetFullPath(), wxEmptyString); + } + } +} + +void FileExplorerTree::DoOpenItemInTextEditor(const wxTreeItemId &item) +{ + if (item.IsOk()) { + wxFileName fn = GetFullPath(item); + ManagerST::Get()->OpenFile(fn.GetFullPath(), wxEmptyString); + } +} + +void FileExplorerTree::OnMouseDblClick( wxMouseEvent &event ) { + wxTreeItemId item = GetSelection(); + // Make sure the double click was done on an actual item + int flags = wxTREE_HITTEST_ONITEMLABEL; + + if (HitTest( event.GetPosition(), flags ) == item) { + DoItemActivated( item ); + return; + } + event.Skip(); +} + +void FileExplorerTree::DoItemActivated(const wxTreeItemId &item) +{ + if (item.IsOk()) { + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(item); + if (b && b->IsDir()) { + Freeze(); + if(IsExpanded(item)){ + Collapse(item); + }else{ + Expand(item); + } + Thaw(); + } else { + DoOpenItem(item); + } + } +} + +void FileExplorerTree::OnItemActivated(wxTreeEvent &event) +{ + DoItemActivated(event.GetItem()); + event.Skip(); +} + +void FileExplorerTree::OnOpenFile(wxCommandEvent &e) +{ + //Get the selected item + wxUnusedVar(e); + wxTreeItemId item = GetSelection(); + DoOpenItem(item); +} + +void FileExplorerTree::OnOpenFileInTextEditor(wxCommandEvent &e) +{ + wxUnusedVar(e); + wxTreeItemId item = GetSelection(); + DoOpenItemInTextEditor(item); +} + +TreeItemInfo FileExplorerTree::GetSelectedItemInfo() +{ + wxTreeItemId item = GetSelection(); + TreeItemInfo info; + info.m_item = item; + if ( item.IsOk() ) { + //set the text of the item + info.m_text = GetItemText( item ); + info.m_fileName = GetFullPath(item); + } + return info; +} + +void FileExplorerTree::OnRefreshNode(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxTreeItemId item = GetSelection(); + Freeze(); + DoReloadNode(item); + Thaw(); + + wxCommandEvent e(wxEVT_FILE_EXP_REFRESHED, GetId()); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); +} + +void FileExplorerTree::OnOpenShell(wxCommandEvent &event) +{ + DirSaver ds; + wxTreeItemId item = GetSelection(); + if(item.IsOk()){ + wxFileName fullpath = GetFullPath(item); + wxSetWorkingDirectory(fullpath.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR)); + if(!ProcUtils::Shell()){ + wxMessageBox(wxT("Failed to load shell terminal"), wxT("CodeLite"), wxICON_WARNING|wxOK); + return; + } + } +} + diff --git a/LiteEditor/fileexplorertree.h b/LiteEditor/fileexplorertree.h new file mode 100644 index 0000000000..74ee0e5fc2 --- /dev/null +++ b/LiteEditor/fileexplorertree.h @@ -0,0 +1,37 @@ +#ifndef FILEEXPLORERTREE_H +#define FILEEXPLORERTREE_H + +#include "virtualdirtreectrl.h" +#include "imanager.h" + +class wxMenu; + +class FileExplorerTree : public wxVirtualDirTreeCtrl +{ + wxMenu *m_rclickMenu; +private: + void DoOpenItem(const wxTreeItemId& item); + void DoOpenItemInTextEditor(const wxTreeItemId& item); + void DoItemActivated(const wxTreeItemId &item); + +public: + FileExplorerTree(wxWindow *parent, wxWindowID id = wxID_ANY); + virtual ~FileExplorerTree(); + TreeItemInfo GetSelectedItemInfo(); + +protected: + DECLARE_EVENT_TABLE() + virtual void OnContextMenu(wxTreeEvent &event); + virtual void OnItemActivated(wxTreeEvent &event); + virtual void OnOpenFile(wxCommandEvent &event); + virtual void OnOpenFileInTextEditor(wxCommandEvent &event); + virtual void OnRefreshNode(wxCommandEvent &event); + virtual void OnDeleteNode(wxCommandEvent &event); + virtual void OnMouseDblClick( wxMouseEvent &event ); + virtual void OnKeyDown( wxTreeEvent &event ); + virtual void OnOpenShell(wxCommandEvent &event); +}; + +#endif //FILEEXPLORERTREE_H + + diff --git a/LiteEditor/filehistory.cpp b/LiteEditor/filehistory.cpp new file mode 100644 index 0000000000..94c43c6b48 --- /dev/null +++ b/LiteEditor/filehistory.cpp @@ -0,0 +1,17 @@ +#include "filehistory.h" + +FileHistory::FileHistory() +{ +} + +FileHistory::~FileHistory() +{ +} + +void FileHistory::GetFiles(wxArrayString &files) +{ + for(size_t i=0; i +#include "wx/imaglist.h" +#include +#include +#include "new_item_dlg.h" +#include "project_settings_dlg.h" +#include "buildmanager.h" +#include "macros.h" +#include "pluginmanager.h" +#include "dirtraverser.h" +#include "ctags_manager.h" +#include + +IMPLEMENT_DYNAMIC_CLASS(FileViewTree, wxTreeCtrl) + +BEGIN_EVENT_TABLE( FileViewTree, wxTreeCtrl ) + EVT_TREE_BEGIN_DRAG( wxID_ANY, FileViewTree::OnItemBeginDrag ) + EVT_TREE_END_DRAG( wxID_ANY, FileViewTree::OnItemEndDrag ) +END_EVENT_TABLE() +FileViewTree::FileViewTree() +{ +} + +void FileViewTree::ConnectEvents() +{ + Connect( XRCID( "remove_project" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnRemoveProject ), NULL, this ); + Connect( XRCID( "set_as_active" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnSetActive ), NULL, this ); + Connect( XRCID( "new_item" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnNewItem ), NULL, this ); + Connect( XRCID( "add_existing_item" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnAddExistingItem ), NULL, this ); + Connect( XRCID( "new_virtual_folder" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnNewVirtualFolder ), NULL, this ); + Connect( XRCID( "remove_virtual_folder" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnRemoveVirtualFolder ), NULL, this ); + Connect( XRCID( "project_properties" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnProjectProperties ), NULL, this ); + Connect( XRCID( "sort_item" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnSortItem ), NULL, this ); + Connect( XRCID( "remove_item" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnRemoveItem ), NULL, this ); + Connect( XRCID( "export_makefile" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnExportMakefile ), NULL, this ); + Connect( XRCID( "save_as_template" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnSaveAsTemplate ), NULL, this ); + Connect( XRCID( "build_order" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnBuildOrder ), NULL, this ); + Connect( XRCID( "clean_project" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnClean ), NULL, this ); + Connect( XRCID( "build_project" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnBuild ), NULL, this ); + Connect( XRCID( "stop_build" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnStopBuild ), NULL, this ); + Connect( XRCID( "retag_project" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnRetagProject ), NULL, this ); + Connect( XRCID( "retag_workspace" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnRetagWorkspace ), NULL, this ); + Connect( XRCID( "build_project_only" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnBuildProjectOnly ), NULL, this ); + Connect( XRCID( "clean_project_only" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnCleanProjectOnly ), NULL, this ); + Connect( XRCID( "import_directory" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnImportDirectory ), NULL, this ); + Connect( XRCID( "compile_item" ), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( FileViewTree::OnCompileItem ), NULL, this ); + + Connect( XRCID( "remove_project" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "set_as_active" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "new_item" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "add_existing_item" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "new_virtual_folder" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "remove_virtual_folder" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "project_properties" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "sort_item" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "remove_item" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "export_makefile" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "save_as_template" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "build_order" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "clean_project" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "build_project" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "retag_project" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "retag_workspace" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "build_project_only" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "clean_project_only" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "import_directory" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); + Connect( XRCID( "compile_item" ), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( FileViewTree::OnBuildInProgress ), NULL, this ); +} + +void FileViewTree::OnBuildInProgress( wxUpdateUIEvent &event ) +{ + event.Enable( !ManagerST::Get()->IsBuildInProgress() ); +} + +FileViewTree::FileViewTree( wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) +{ + Create( parent, id, pos, size, style ); + + // Initialise images map + wxImageList *images = new wxImageList( 16, 16, true ); + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "project" ) ) ); //0 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "folder" ) ) ); //1 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "page_white_c" ) ) ); //2 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "page_white_cplusplus" ) ) ); //3 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "page_white_h" ) ) ); //4 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "page_white_text" ) ) ); //5 + images->Add( wxXmlResource::Get()->LoadBitmap( wxT( "workspace" ) ) ); //6 + AssignImageList( images ); + + Connect( GetId(), wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEventHandler( FileViewTree::OnPopupMenu ) ); + Connect( GetId(), wxEVT_LEFT_DCLICK, wxMouseEventHandler( FileViewTree::OnMouseDblClick ) ); + Connect( GetId(), wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEventHandler( FileViewTree::OnItemActivated ) ); +} + +FileViewTree::~FileViewTree() +{ + delete m_folderMenu; + delete m_projectMenu; + delete m_fileMenu; + delete m_workspaceMenu; +} + +void FileViewTree::Create( wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) +{ +#ifndef __WXGTK__ + style |= ( wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT ); +#else + style |= ( wxTR_HAS_BUTTONS ); +#endif + wxTreeCtrl::Create( parent, id, pos, size, style ); + + BuildTree(); + + // Load the popup menu + m_folderMenu = wxXmlResource::Get()->LoadMenu( wxT( "file_tree_folder" ) ); + m_projectMenu = wxXmlResource::Get()->LoadMenu( wxT( "file_tree_project" ) ); + m_fileMenu = wxXmlResource::Get()->LoadMenu( wxT( "file_tree_file" ) ); + m_workspaceMenu = wxXmlResource::Get()->LoadMenu( wxT( "workspace_popup_menu" ) ); + ConnectEvents(); +} + +void FileViewTree::BuildTree() +{ + DeleteAllItems(); + m_itemsToSort.clear(); + + if ( ManagerST::Get()->IsWorkspaceOpen() ) { + // Add an invisible tree root + ProjectItem data; + data.m_displayName = WorkspaceST::Get()->GetName(); + data.m_kind = ProjectItem::TypeWorkspace; + + wxTreeItemId root = AddRoot( data.m_displayName, 6, -1, new FilewViewTreeItemData( data ) ); + m_itemsToSort[root.m_pItem] = true; + + wxArrayString list; + ManagerST::Get()->GetProjectList( list ); + + Freeze(); + for ( size_t n=0; n::const_iterator iter = m_itemsToSort.begin(); + for (; iter != m_itemsToSort.end(); iter ++) { + wxTreeItemId item = iter->first; + SortItem(item); + } + m_itemsToSort.clear(); +} + +wxTreeItemId FileViewTree::GetSingleSelection() +{ + /* + wxArrayTreeItemIds items; + size_t num = GetSelections(items); + if(num >= 1){ + return items.Item(0); + } + return wxTreeItemId(); + */ + return GetSelection(); +} + +int FileViewTree::GetIconIndex( const ProjectItem &item ) +{ + int icondIndex( 5 ); + switch ( item.GetKind() ) { + case ProjectItem::TypeProject: + icondIndex = 0; + break; + case ProjectItem::TypeVirtualDirectory: + icondIndex = 1; // Folder + break; + case ProjectItem::TypeFile: { + wxFileName filename( item.GetFile() ); + if ( filename.GetExt().CmpNoCase( wxT( "cpp" ) ) == 0 ) { + icondIndex = 3; + } else if ( filename.GetExt().CmpNoCase( wxT( "cxx" ) ) == 0 ) { + icondIndex = 3; + } else if ( filename.GetExt().CmpNoCase( wxT( "c++" ) ) == 0 ) { + icondIndex = 3; + } else if ( filename.GetExt().CmpNoCase( wxT( "cc" ) ) == 0 ) { + icondIndex = 3; + } else if ( filename.GetExt().CmpNoCase( wxT( "c" ) ) == 0 ) { + icondIndex = 2; + } else if ( filename.GetExt().CmpNoCase( wxT( "h" ) ) == 0 ) { + icondIndex = 4; + } else if ( filename.GetExt().CmpNoCase( wxT( "hpp" ) ) == 0 ) { + icondIndex = 4; + } else { + icondIndex = 5; + } + break; + } + default: + icondIndex = 5; // Text file + break; + } + return icondIndex; +} + +void FileViewTree::BuildProjectNode( const wxString &projectName ) +{ + ProjectTreePtr tree = ManagerST::Get()->GetProjectFileViewTree( projectName ); + TreeWalker walker( tree->GetRoot() ); + + std::map items; + for ( ; !walker.End(); walker++ ) { + // Add the item to the tree + ProjectTreeNode* node = walker.GetNode(); + wxTreeItemId parentHti; + if ( node->IsRoot() ) { + parentHti = GetRootItem(); + } else { + wxString parentKey = node->GetParent()->GetKey(); + if ( items.find( parentKey ) == items.end() ) + continue; + parentHti = items.find( parentKey )->second; + } + + wxTreeItemId hti = AppendItem( parentHti, // parent + node->GetData().GetDisplayName(), // display name + GetIconIndex( node->GetData() ), // item image index + GetIconIndex( node->GetData() ), // selected item image + new FilewViewTreeItemData( node->GetData() ) ); + m_itemsToSort[parentHti.m_pItem] = true; + + // Set active project with bold + if ( parentHti == GetRootItem() && ManagerST::Get()->GetActiveProjectName() == node->GetData().GetDisplayName() ) { + SetItemBold( hti ); + } + + items[node->GetKey()] = hti; + } +} + +//----------------------------------------------- +// Event handlers +//----------------------------------------------- + +void FileViewTree::PopupContextMenu( wxMenu *menu, MenuType type ) +{ + PluginManager::Get()->HookPopupMenu( menu, type ); + PopupMenu( menu ); + //let the plugins remove their hooked content + PluginManager::Get()->UnHookPopupMenu( menu, type ); +} + +void FileViewTree::OnPopupMenu( wxTreeEvent &event ) +{ + if ( GetSingleSelection().IsOk() ) { + wxTreeItemId item = event.GetItem(); + if ( item.IsOk() ) { + SelectItem( item, true ); + + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + switch ( data->GetData().GetKind() ) { + case ProjectItem::TypeProject: + PopupContextMenu( m_projectMenu, MenuTypeFileView_Project ); + break; + case ProjectItem::TypeVirtualDirectory: + PopupContextMenu( m_folderMenu, MenuTypeFileView_Folder ); + break; + case ProjectItem::TypeFile: + PopupContextMenu( m_fileMenu, MenuTypeFileView_File ); + break; + case ProjectItem::TypeWorkspace: + PopupContextMenu( m_workspaceMenu, MenuTypeFileView_Workspace ); + break; + default: + break; + } + } + } +} + +TreeItemInfo FileViewTree::GetSelectedItemInfo() +{ + wxTreeItemId item = GetSingleSelection(); + TreeItemInfo info; + info.m_item = item; + if ( item.IsOk() ) { + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + + //set the text of the item + info.m_text = GetItemText( item ); + info.m_itemType = data->GetData().GetKind(); + info.m_fileName = data->GetData().GetFile(); + if(info.m_itemType == ProjectItem::TypeVirtualDirectory){ + //incase of virtual directories, set the file name to be the directory of + //the project + wxString path = GetItemPath(item); + wxString project = path.BeforeFirst(wxT(':')); + info.m_fileName = wxFileName(ManagerST::Get()->GetProjectCwd(project), wxEmptyString); + } + } + return info; +} + +void FileViewTree::OnMouseDblClick( wxMouseEvent &event ) +{ + wxArrayTreeItemIds items; + size_t num = GetMultiSelection( items ); + if ( num <= 0 ) { + event.Skip(); + return; + } + + // Make sure the double click was done on an actual item + int flags = wxTREE_HITTEST_ONITEMLABEL; + for ( size_t i=0; i( GetItemData( item ) ); + if ( !itemData ) { + event.Skip(); + return; + } + + //if file item was hit, open it + if ( itemData->GetData().GetKind() == ProjectItem::TypeFile ) { + wxString filename = itemData->GetData().GetFile(); + wxString project = itemData->GetData().Key().BeforeFirst( wxT( ':' ) ); + + // Convert the file name to be in absolute path + wxFileName fn( filename ); + fn.MakeAbsolute( ManagerST::Get()->GetProjectCwd( project ) ); + ManagerST::Get()->OpenFile( fn.GetFullPath(), project, -1 ); + return; + } else { // if(itemData->GetData().GetKind() == ProjectItem::TypeVirtualDirectory) + event.Skip(); + } +} + +void FileViewTree::OnExportMakefile( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName, errMsg; + //TODO:: make the builder name configurable + BuilderPtr builder = BuildManagerST::Get()->GetBuilder( wxT( "GNU makefile for g++/gcc" ) ); + projectName = GetItemText( item ); + if ( !builder->Export( projectName, false, errMsg ) ) { + wxMessageBox( errMsg, wxT( "CodeLite" ), wxICON_HAND ); + return; + } + } +} + +void FileViewTree::OnRemoveProject( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + if ( data->GetData().GetKind() == ProjectItem::TypeProject ) { + DoRemoveProject( data->GetData().GetDisplayName() ); + } + } +} + +void FileViewTree::OnSortItem( wxCommandEvent &WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + SortItem(item); +} + +bool FileViewTree::AddFilesToVirtualFodler(wxTreeItemId &item, wxArrayString &paths) +{ + if (item.IsOk() == false) + return false; + + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + switch ( data->GetData().GetKind() ) { + case ProjectItem::TypeVirtualDirectory: + //OK + break; + default: + return false; + } + + wxArrayString actualAdded; + wxString vdPath = GetItemPath( item ); + wxString project; + project = vdPath.BeforeFirst( wxT( ':' ) ); + ManagerST::Get()->AddFilesToProject( paths, vdPath, actualAdded ); + for ( size_t i=0; iGetProject( project ); + wxFileDialog *dlg = new wxFileDialog( this, wxT( "Add Existing Item" ), proj->GetFileName().GetPath(), wxEmptyString, ALL, wxFD_MULTIPLE | wxOPEN | wxFILE_MUST_EXIST , wxDefaultPosition ); + if ( dlg->ShowModal() == wxID_OK ) { + wxArrayString paths, actualAdded; + dlg->GetPaths( paths ); + AddFilesToVirtualFodler(item, paths); + } + + dlg->Destroy(); +} + +void FileViewTree::OnNewItem( wxCommandEvent & WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + if ( !item.IsOk() ) { + return; + } + + wxString path = GetItemPath( item ); + + // Project name + wxString projName = path.BeforeFirst( wxT( ':' ) ); + wxString projCwd = ManagerST::Get()->GetProjectCwd( projName ); + + NewItemDlg *dlg = new NewItemDlg( this, projCwd, wxID_ANY, wxT( "New Item" ) ); + + if ( dlg->ShowModal() == wxID_OK ) { + wxString filename = dlg->GetFileName().GetFullPath(); + ManagerST::Get()->AddNewFileToProject( filename, path ); + + // Add the tree node + wxFileName fnFileName( filename ); + path += wxT( ":" ); + path += fnFileName.GetFullName(); + ProjectItem projItem( path, fnFileName.GetFullName(), fnFileName.GetFullPath(), ProjectItem::TypeFile ); + + wxTreeItemId hti = AppendItem( item, // parent + projItem.GetDisplayName(), // display name + GetIconIndex( projItem ), // item image index + GetIconIndex( projItem ), // selected item image + new FilewViewTreeItemData( projItem ) ); + wxUnusedVar( hti ); + SortItem(item); + Expand( item ); + } + + dlg->Destroy(); +} + +void FileViewTree::OnSetActive( wxCommandEvent & WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + DoSetProjectActive( item ); +} + +void FileViewTree::DoSetProjectActive( wxTreeItemId &item ) +{ + if ( item.IsOk() ) { + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + if ( data->GetData().GetKind() == ProjectItem::TypeProject ) { + + wxString curActiveProj = ManagerST::Get()->GetActiveProjectName(); + + // find previous active project and remove its bold style + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild( GetRootItem(), cookie ); + while ( child.IsOk() ) { + FilewViewTreeItemData *childData = static_cast( GetItemData( child ) ); + if ( childData->GetData().GetDisplayName() == curActiveProj ) { + SetItemBold( child, false ); + break; + } + child = GetNextChild( GetRootItem(), cookie ); + } + + ManagerST::Get()->SetActiveProject( data->GetData().GetDisplayName() ); + SetItemBold( item ); + } + } + +} + +void FileViewTree::OnRemoveVirtualFolder( wxCommandEvent & WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + DoRemoveVirtualFolder( item ); +} + +void FileViewTree::OnRemoveItem( wxCommandEvent &WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + DoRemoveItem( item ); +} + +void FileViewTree::DoRemoveItem( wxTreeItemId &item ) +{ + wxString name = GetItemText( item ); + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + switch (data->GetData().GetKind()) { + case ProjectItem::TypeFile: { + wxString message; + message << wxT( "Are you sure you want remove '" ) << name << wxT( "' ?" ); + if ( wxMessageBox( message, wxT( "CodeLite" ), wxYES_NO | wxICON_QUESTION ) == wxYES ) { + wxTreeItemId parent = GetItemParent( item ); + if ( parent.IsOk() ) { + wxString path = GetItemPath( parent ); + ManagerST::Get()->RemoveFile( data->GetData().GetFile(), path ); + Delete( item ); + } + } + } + break; + case ProjectItem::TypeVirtualDirectory: + DoRemoveVirtualFolder(item); + break; + case ProjectItem::TypeProject: + DoRemoveProject(name); + break; + default: + break; + } +} + +void FileViewTree::DoRemoveVirtualFolder( wxTreeItemId &item ) +{ + wxString name = GetItemText( item ); + wxString message( wxT( "'" ) + name + wxT( "'" ) ); + message << wxT( " and all its content will be removed from the project." ); + + if ( wxMessageBox( message, wxT( "CodeLite" ), wxYES_NO|wxICON_WARNING ) == wxYES ) { + wxString path = GetItemPath( item ); + ManagerST::Get()->RemoveVirtualDirectory( path ); + DeleteChildren( item ); + Delete( item ); + } +} + +void FileViewTree::OnNewVirtualFolder( wxCommandEvent & WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + DoAddVirtualFolder( item ); +} + +void FileViewTree::DoAddVirtualFolder( wxTreeItemId &parent ) +{ + static int count = 0; + wxString defaultName( wxT( "NewDirectory" ) ); + defaultName << count++; + + wxTextEntryDialog *dlg = new wxTextEntryDialog( NULL, wxT( "Virtual Directory Name:" ), wxT( "New Virtual Directory" ), defaultName ); + dlg->Centre(); + if ( dlg->ShowModal() == wxID_OK ) { + wxString path = GetItemPath( parent ); + if ( dlg->GetValue().Trim().IsEmpty() ) + return; + + path += wxT( ":" ); + path += dlg->GetValue(); + ManagerST::Get()->AddVirtualDirectory( path ); + + ProjectItem itemData( path, dlg->GetValue(), wxEmptyString, ProjectItem::TypeVirtualDirectory ); + AppendItem( parent, // parent + itemData.GetDisplayName(), // display name + GetIconIndex( itemData ), // item image index + GetIconIndex( itemData ), // selected item image + new FilewViewTreeItemData( itemData ) ); + + SortItem( parent ); + Expand( parent ); + } + dlg->Destroy(); +} + +wxString FileViewTree::GetItemPath( wxTreeItemId &item ) +{ + std::deque queue; + wxString text = GetItemText( item ); + queue.push_front( text ); + + wxTreeItemId p = GetItemParent( item ); + while ( p.IsOk() && p != GetRootItem() ) { + + text = GetItemText( p ); + queue.push_front( text ); + p = GetItemParent( p ); + } + + wxString path; + size_t count = queue.size(); + for ( size_t i=0; iGetWorkspaceBuildMatrix(); + //find the project configuration name that matches the workspace selected configuration + ProjectSettingsDlg *dlg = new ProjectSettingsDlg( this, + matrix->GetProjectSelectedConf( matrix->GetSelectedConfigurationName(), projectName ), + projectName, + title ); + dlg->ShowModal(); + dlg->Destroy(); +} + +void FileViewTree::DoRemoveProject( const wxString &name ) +{ + wxString message ( wxT( "You are about to remove project '" ) ); + message << name << wxT( "' " ); + message << wxT( " from the workspace, click 'Yes' to proceed or 'No' to abort." ); + if ( wxMessageBox ( message, wxT( "Confirm" ), wxYES_NO ) == wxYES ) { + ManagerST::Get()->RemoveProject( name ); + } +} + +int FileViewTree::OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) +{ + // used for SortChildren, reroute to our sort routine + FilewViewTreeItemData *a = (FilewViewTreeItemData *)GetItemData(item1), + *b = (FilewViewTreeItemData *)GetItemData(item2); + if (a && b) + return OnCompareItems(a,b); + + return 0; +} + +int FileViewTree::OnCompareItems(const FilewViewTreeItemData *a, const FilewViewTreeItemData *b) +{ + // if dir and other is not, dir has preference + if (a->GetData().GetKind() == ProjectItem::TypeVirtualDirectory && + b->GetData().GetKind() == ProjectItem::TypeFile) + return -1; + else if (b->GetData().GetKind() == ProjectItem::TypeVirtualDirectory && + a->GetData().GetKind() == ProjectItem::TypeFile) + return 1; + + // else let ascii fight it out + return a->GetData().GetDisplayName().CmpNoCase(b->GetData().GetDisplayName()); +} + +void FileViewTree::OnSaveAsTemplate( wxCommandEvent & WXUNUSED( event ) ) +{ + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString name = GetItemText( item ); + ProjectPtr proj = ManagerST::Get()->GetProject( name ); + if ( proj ) { + wxTextEntryDialog *dlg = new wxTextEntryDialog( NULL, wxT( "New Template Name:" ), wxT( "Save As Template" ), name ); + if ( dlg->ShowModal() == wxID_OK ) { + wxString newName = dlg->GetValue(); + TrimString( newName ); + if ( newName.IsEmpty() == false ) { + ManagerST::Get()->SaveProjectTemplate( proj, newName ); + } + } + } + } +} + +void FileViewTree::OnBuildOrder( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName = GetItemText( item ); + ManagerST::Get()->PopupProjectDependsDlg( projectName ); + } +} + +void FileViewTree::OnClean( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName = GetItemText( item ); + ManagerST::Get()->CleanProject( projectName ); + } +} + +void FileViewTree::OnBuild( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName = GetItemText( item ); + ManagerST::Get()->BuildProject( projectName ); + } +} + +void FileViewTree::OnCompileItem(wxCommandEvent &e) +{ + wxUnusedVar( e ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + FilewViewTreeItemData *data = static_cast( GetItemData( item ) ); + if (data->GetData().GetKind() == ProjectItem::TypeFile) { + Manager *mgr = ManagerST::Get(); + wxTreeItemId parent = GetItemParent( item ); + if ( parent.IsOk() ) { + wxString logmsg; + wxString path = GetItemPath( parent ); + wxString proj = path.BeforeFirst(wxT(':')); + logmsg << wxT("Compiling file: ") << data->GetData().GetFile() << wxT(" of project ") << proj << wxT("\n"); + mgr->CompileFile(proj, data->GetData().GetFile()); + } + } + } +} + +void FileViewTree::OnStopBuild( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + ManagerST::Get()->StopBuild(); +} + +void FileViewTree::OnItemActivated( wxTreeEvent &event ) +{ + if ( event.GetKeyCode() == WXK_RETURN ) { + wxArrayTreeItemIds items; + size_t num = GetMultiSelection( items ); + if ( num > 0 ) { + for ( size_t i=0; i 0 ) { + for ( size_t i=0; iRetagProject( projectName ); + } +} + +void FileViewTree::OnRetagWorkspace( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + ManagerST::Get()->RetagWorkspace(); +} + +void FileViewTree::OnItemBeginDrag( wxTreeEvent &event ) +{ + if ( event.GetItem() != GetRootItem() ) { + m_draggedItem = event.GetItem(); + FilewViewTreeItemData *data = static_cast( GetItemData( m_draggedItem ) ); + if ( data->GetData().GetKind() == ProjectItem::TypeFile ) { + event.Allow(); + return; + } + } +} + +void FileViewTree::OnItemEndDrag( wxTreeEvent &event ) +{ + wxTreeItemId itemSrc = m_draggedItem, + itemDst = event.GetItem(); + + wxString targetVD, fromVD; + if ( itemDst.IsOk() ) { + FilewViewTreeItemData *data = static_cast( GetItemData( itemDst ) ); + if ( data->GetData().GetKind() == ProjectItem::TypeVirtualDirectory ) { + //we are only allowed items between virtual folders + wxTreeItemId target = itemDst; + if ( target.IsOk() ) { + targetVD = GetItemPath( target ); + } else { + return; + } + + wxTreeItemId fromItem = GetItemParent( itemSrc ); + if ( fromItem.IsOk() ) { + fromVD = GetItemPath( fromItem ); + } else { + return; + } + + //the file name to remove + FilewViewTreeItemData *srcData = static_cast( GetItemData( itemSrc ) ); + wxString filename = srcData->GetData().GetFile(); + + ProjectItem itemData = srcData->GetData(); + + //call the manager to remove them in the underlying project + if ( ManagerST::Get()->MoveFileToVD( filename, fromVD, targetVD ) ) { + //remove the item from its current node, and place it under the + //new parent node + AppendItem( target, // parent + itemData.GetDisplayName(), // display name + GetIconIndex( itemData ), // item image index + GetIconIndex( itemData ), // selected item image + new FilewViewTreeItemData( itemData ) ); + Delete( itemSrc ); + Expand( target ); + } + } + } +} + +void FileViewTree::OnBuildProjectOnly( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName = GetItemText( item ); + ManagerST::Get()->BuildProject( projectName, true ); + } +} + +void FileViewTree::OnCleanProjectOnly( wxCommandEvent &event ) +{ + wxUnusedVar( event ); + wxTreeItemId item = GetSingleSelection(); + if ( item.IsOk() ) { + wxString projectName = GetItemText( item ); + ManagerST::Get()->CleanProject( projectName, true ); + } +} + +void FileViewTree::ExpandToPath(const wxString &project, const wxFileName &fileName) +{ + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild(GetRootItem(), cookie); + while (child.IsOk()) { + FilewViewTreeItemData *childData = static_cast( GetItemData( child ) ); + if (childData->GetData().GetDisplayName() == project) { + wxTreeItemId fileItem = FindItemByPath(child, ManagerST::Get()->GetProjectCwd( project ), fileName.GetFullPath()); + if (fileItem.IsOk()) { + SelectItem(fileItem); + } else { + wxString message; + message << wxT("Failed to find file: ") << fileName.GetFullPath() << wxT(" in FileView."); + wxLogMessage(message); + } + break; + } + child = GetNextChild(GetRootItem(), cookie); + } +} + +wxTreeItemId FileViewTree::FindItemByPath(wxTreeItemId &parent, const wxString &projectPath, const wxString &fileName) +{ + if (!parent.IsOk()) + return wxTreeItemId(); + + if (!ItemHasChildren(parent)) + return wxTreeItemId(); + + wxTreeItemIdValue cookie; + wxTreeItemId child = GetFirstChild(parent, cookie); + while (child.IsOk()) { + FilewViewTreeItemData *childData = static_cast( GetItemData( child ) ); + wxFileName fn(childData->GetData().GetFile()); + fn.MakeAbsolute( projectPath ); + if (fn.GetFullPath() == fileName) { + return child; + } + + if (ItemHasChildren(child)) { + wxTreeItemId res = FindItemByPath(child, projectPath, fileName); + if (res.IsOk()) { + return res; + } + } + child = GetNextChild(parent, cookie); + } + return wxTreeItemId(); +} + +void FileViewTree::OnImportDirectory(wxCommandEvent &e) +{ + wxUnusedVar(e); + wxTreeItemId item = GetSingleSelection(); + if ( !item.IsOk() ) { + return; + } + + wxString message; + message << wxT("Select Directory to import:"); + + + wxString vdPath = GetItemPath( item ); + wxString project; + project = vdPath.BeforeFirst(wxT(':')); + + ProjectPtr proj = ManagerST::Get()->GetProject( project ); + + wxString path = wxDirSelector(wxT("Select directory to import:"), proj->GetFileName().GetPath()); + if (path.IsEmpty()) + return; + + wxFileName rootPath(path); + + //Collect all candidates files + wxArrayString files; + TagsManager *tg = TagsManagerST::Get(); + DirTraverser trv(tg->GetCtagsOptions().GetFileSpec(), tg->GetCtagsOptions().GetFlags() & CC_PARSE_EXT_LESS_FILES ? true : false); + wxDir dir(path); + + dir.Traverse(trv); + files = trv.GetFiles(); + + //loop over the files and construct for each file a record with + //the following information: + //-virtual directory (full path, starting from project level) + //-display name + //-full path of the file + proj->BeginTranscation(); + { + // Create a progress dialog + wxProgressDialog *prgDlg = new wxProgressDialog (wxT("Importing files ..."), wxT("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), (int)files.GetCount(), NULL, wxPD_APP_MODAL | wxPD_SMOOTH | wxPD_AUTO_HIDE); + prgDlg->GetSizer()->Fit(prgDlg); + prgDlg->Layout(); + prgDlg->Centre(); + + for (size_t i=0; iUpdate((int)i, msg); + } + m_itemsToSort.clear(); + prgDlg->Destroy(); + } + + //save the project file to disk + proj->CommitTranscation(); + + //reload the project + ManagerST::Get()->RemoveProject( proj->GetName() ); + ManagerST::Get()->AddProject(proj->GetFileName().GetFullPath()); +} + +void FileViewTree::DoAddItem(ProjectPtr proj, const FileViewItem &item) +{ + if (!proj) { + return; + } + + Manager *mgr = ManagerST::Get(); + //make sure that this file does not exist + wxString projName = mgr->GetProjectNameByFile(item.fullpath); + if (projName.IsEmpty()) { + //first add the virtual directory, if it already exist, + //this function does nothing + proj->CreateVirtualDir(item.virtualDir, true); + + //add the file. + //For performance reasons, we dont go through the Workspace API + //but directly through the project API + proj->AddFile(item.fullpath, item.virtualDir); + } +} diff --git a/LiteEditor/fileview.h b/LiteEditor/fileview.h new file mode 100644 index 0000000000..a003f33e27 --- /dev/null +++ b/LiteEditor/fileview.h @@ -0,0 +1,152 @@ +#ifndef FILE_VIEW_TREE_H +#define FILE_VIEW_TREE_H + +#include "wx/treectrl.h" +#include "project.h" +#include "pluginmanager.h" +#include "imanager.h" +#include "map" + +class wxMenu; + +struct FileViewItem { + wxString virtualDir; + wxString fullpath; + wxString displayName; +}; + +/** + * Class FilewViewTreeItemData, a user defined class which stores a node private information + * + * \date 12-04-2007 + * \author Eran + * + */ +class FilewViewTreeItemData : public wxTreeItemData +{ + ProjectItem m_item; +public: + FilewViewTreeItemData(const ProjectItem &item) : m_item(item) { } + const ProjectItem &GetData() const { return m_item; } +}; + +class FileViewTree : public wxTreeCtrl +{ + DECLARE_DYNAMIC_CLASS() + wxMenu *m_folderMenu; + wxMenu *m_projectMenu; + wxMenu *m_fileMenu; + wxMenu *m_workspaceMenu; + + std::map m_itemsToSort; + wxTreeItemId m_draggedItem; + +public: + /** + * Default cosntructor. + */ + FileViewTree(); + + /** + * Parameterized constructor. + * \param parent Tree parent window + * \param id Window id + * \param pos Window position + * \param size Window size + * \param style Window style + */ + FileViewTree(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + + /** + * Destructor . + */ + virtual ~FileViewTree(void); + + /** + * Create tree, usually called after constructing FileViewTree with default constructor. + * \param parent Tree parent window + * \param id Window id + * \param pos Window position + * \param size Window size + * \param style Window style + */ + virtual void Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + + // Build the actual tree from the workspace + void BuildTree(); + + + /** + * \brief return the current selected item information + */ + TreeItemInfo GetSelectedItemInfo(); + + /** + * Make sure that fileName under project is visible + * \param &project + * \param &fileName + */ + void ExpandToPath(const wxString &project, const wxFileName &fileName); + + bool AddFilesToVirtualFodler(wxTreeItemId &item, wxArrayString &paths); + +protected: + virtual void OnPopupMenu(wxTreeEvent &event); + virtual void OnItemActivated(wxTreeEvent &event); + virtual void OnMouseDblClick(wxMouseEvent &event); + virtual void OnRemoveProject(wxCommandEvent &event); + virtual void OnSetActive(wxCommandEvent &event); + virtual void OnNewItem(wxCommandEvent &event); + virtual void OnAddExistingItem(wxCommandEvent &event); + virtual void OnNewVirtualFolder(wxCommandEvent &event); + virtual void OnProjectProperties(wxCommandEvent &event); + virtual void OnSortItem(wxCommandEvent &event); + virtual void OnRemoveVirtualFolder(wxCommandEvent &event); + virtual void OnRemoveItem(wxCommandEvent &event); + virtual void OnExportMakefile(wxCommandEvent &event); + virtual void OnSaveAsTemplate(wxCommandEvent &event); + virtual void OnBuildOrder(wxCommandEvent &event); + virtual void OnClean(wxCommandEvent &event); + virtual void OnBuild(wxCommandEvent &event); + virtual void OnBuildProjectOnly(wxCommandEvent &event); + virtual void OnCleanProjectOnly(wxCommandEvent &event); + virtual void OnStopBuild(wxCommandEvent &event); + virtual void OnRetagProject(wxCommandEvent &event); + virtual void OnRetagWorkspace(wxCommandEvent &event); + virtual void OnBuildInProgress(wxUpdateUIEvent &event); + virtual void OnItemBeginDrag(wxTreeEvent &event); + virtual void OnItemEndDrag(wxTreeEvent &event); + virtual void OnImportDirectory(wxCommandEvent &e); + virtual void OnCompileItem(wxCommandEvent &e); + virtual void SortTree(); + virtual void SortItem(wxTreeItemId &item); + + // Tree sorting + virtual int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2); + int OnCompareItems(const FilewViewTreeItemData *a, const FilewViewTreeItemData *b); + + void PopupContextMenu(wxMenu *menu, MenuType type); + +private: + // Build project node + void BuildProjectNode(const wxString &projectName); + int GetIconIndex(const ProjectItem &item); + void ConnectEvents(); + wxString GetItemPath(wxTreeItemId &item); + + void DoRemoveProject(const wxString &name); + void DoSetProjectActive(wxTreeItemId &item); + void DoAddVirtualFolder(wxTreeItemId &parent); + void DoRemoveVirtualFolder(wxTreeItemId &parent); + void DoRemoveItem(wxTreeItemId &item); + void DoItemActivated(wxTreeItemId &item, wxEvent &event); + void DoAddItem(ProjectPtr proj, const FileViewItem &item); + + wxTreeItemId GetSingleSelection(); + size_t GetMultiSelection(wxArrayTreeItemIds &arr); + wxTreeItemId FindItemByPath(wxTreeItemId &parent, const wxString &projectPath, const wxString &fileName); + DECLARE_EVENT_TABLE(); +}; + +#endif // FILE_VIEW_TREE_H + diff --git a/LiteEditor/findinfilesdlg.cpp b/LiteEditor/findinfilesdlg.cpp new file mode 100644 index 0000000000..6f8d5f1e7c --- /dev/null +++ b/LiteEditor/findinfilesdlg.cpp @@ -0,0 +1,274 @@ +#include "findinfilesdlg.h" +#include +#include +#include +#include +#include "search_thread.h" +#include +#include +#include +#include "dirpicker.h" +#include "wx/sizer.h" +#include "macros.h" +#include "manager.h" + +DEFINE_EVENT_TYPE(wxEVT_FIF_FIND) +DEFINE_EVENT_TYPE(wxEVT_FIF_STOP) +DEFINE_EVENT_TYPE(wxEVT_FIF_CLOSE) + +BEGIN_EVENT_TABLE(FindInFilesDialog, wxDialog) +EVT_CLOSE(FindInFilesDialog::OnClose) +EVT_CHAR_HOOK(FindInFilesDialog::OnCharEvent) +END_EVENT_TABLE() + +FindInFilesDialog::FindInFilesDialog() +: wxDialog() +, m_owner(NULL) +{ +} + +FindInFilesDialog::FindInFilesDialog(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + Create(parent, data, id, caption, pos, size, style); +} + +bool FindInFilesDialog::Create(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + if( !wxDialog::Create(parent, id, caption, pos, size, style) ) + return false; + + m_data = data; + m_owner = NULL; + + CreateGUIControls(); + ConnectEvents(); + + GetSizer()->Fit(this); + GetSizer()->SetMinSize(wxSize(600, 300)); + GetSizer()->SetSizeHints(this); + Centre(); + m_findString->SetFocus(); + return true; +} + +FindInFilesDialog::~FindInFilesDialog() +{ +} + +void FindInFilesDialog::CreateGUIControls() +{ + wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + + wxStaticText* itemStaticText; + itemStaticText = new wxStaticText( this, wxID_STATIC, _("Find What:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + mainSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + m_findString = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, -1)); + mainSizer->Add(m_findString, 0, wxALL | wxEXPAND, 5 ); + + itemStaticText = new wxStaticText( this, wxID_STATIC, _("Look In:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + mainSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + m_dirPicker = new DirPicker(this, wxID_ANY, wxT("..."), wxEmptyString, wxT("Select a folder:"), wxDefaultPosition, wxDefaultSize, wxDP_USE_COMBOBOX); + mainSizer->Add(m_dirPicker, 0, wxEXPAND | wxALL, 5); + + wxArrayString choices; + choices.Add(SEARCH_IN_PROJECT); +//#ifdef __WXMSW__ + choices.Add(SEARCH_IN_WORKSPACE); +//#endif + m_dirPicker->SetValues(choices, 1); + + // Add the options + wxStaticBoxSizer *sz = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Options:")); + mainSizer->Add(sz, 1, wxEXPAND | wxALL, 5); + + m_matchCase = new wxCheckBox(this, wxID_ANY, wxT("&Match case")); + sz->Add(m_matchCase, 1, wxALL | wxEXPAND, 5 ); + + m_matchWholeWord = new wxCheckBox(this, wxID_ANY, wxT("Match &whole word")); + sz->Add(m_matchWholeWord, 1, wxALL | wxEXPAND, 5 ); + + m_regualrExpression = new wxCheckBox(this, wxID_ANY, wxT("Regular &expression")); + sz->Add(m_regualrExpression, 1, wxALL | wxEXPAND, 5 ); + + itemStaticText = new wxStaticText( this, wxID_STATIC, wxT("Look at these file &types:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + sz->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + wxString options [] = { + wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.hxx;*.hh;*.inl;*.inc"), + wxT("*.*") }; + + m_fileTypes = new wxComboBox(this, + wxID_ANY, + wxT("*.c;*.cpp;*.cxx;*.cc;*.h;*.hpp;*.hxx;*.hh;*.inl;*.inc"), + wxDefaultPosition, wxDefaultSize, + 2, options, wxCB_DROPDOWN); + sz->Add(m_fileTypes, 0, wxEXPAND | wxALL, 5); + + // Add the buttons + m_find = new wxButton(this, wxID_ANY, wxT("&Find")); + btnSizer->Add(m_find, 1, wxALL | wxEXPAND, 5 ); + + m_stop = new wxButton(this, wxID_ANY, wxT("&Stop Search")); + btnSizer->Add(m_stop, 1, wxALL | wxEXPAND, 5 ); + + m_cancel = new wxButton(this, wxID_ANY, wxT("Close")); + btnSizer->Add(m_cancel, 1, wxALL | wxEXPAND, 5 ); + + mainSizer->Add(new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL), 0, wxEXPAND ); + mainSizer->Add(btnSizer, 0, wxEXPAND|wxALL, 5); + + SetData(m_data); + m_findString->SetSelection(-1, -1); // select all + m_findString->SetFocus(); +} + +void FindInFilesDialog::SetData(FindReplaceData &data) +{ + //sets the previous values + m_findString->Clear(); + m_findString->Append(data.GetFindStringArr()); + m_findString->SetValue(data.GetFindString()); + m_matchCase->SetValue(data.GetFlags() & wxFRD_MATCHCASE ? true : false); + m_matchWholeWord->SetValue(data.GetFlags() & wxFRD_MATCHWHOLEWORD ? true : false); + m_regualrExpression->SetValue(data.GetFlags() & wxFRD_REGULAREXPRESSION ? true : false); +} + +void FindInFilesDialog::DoSearch() +{ + SearchData data; + wxString findStr(m_data.GetFindString()); + if(m_findString->GetValue().IsEmpty() == false){ + findStr = m_findString->GetValue(); + } + + data.SetFindString(findStr); + data.SetMatchCase( (m_data.GetFlags() & wxFRD_MATCHCASE) != 0); + data.SetMatchWholeWord((m_data.GetFlags() & wxFRD_MATCHWHOLEWORD) != 0); + data.SetRegularExpression((m_data.GetFlags() & wxFRD_REGULAREXPRESSION) != 0); + data.SetRootDir(m_dirPicker->GetPath()); + if(m_dirPicker->GetPath() == SEARCH_IN_WORKSPACE){ + + wxArrayString files; + ManagerST::Get()->GetWorkspaceFiles(files); + data.SetFiles(files); + + }else if(m_dirPicker->GetPath() == SEARCH_IN_PROJECT){ + wxArrayString files; + ManagerST::Get()->GetProjectFiles(ManagerST::Get()->GetActiveProjectName(), files); + data.SetFiles(files); + } + data.SetExtensions(m_fileTypes->GetValue()); + // Convert file types to array + SearchThreadST::Get()->PerformSearch(data); +} + +void FindInFilesDialog::OnClick(wxCommandEvent &event) +{ + wxObject *btnClicked = event.GetEventObject(); + size_t flags = m_data.GetFlags(); + m_data.SetFindString( m_findString->GetValue() ); + + if(btnClicked == m_stop){ + SearchThreadST::Get()->StopSearch(); + } else if(btnClicked == m_find){ + DoSearch(); + } else if(btnClicked == m_cancel){ + // Hide the dialog + Hide(); + } else if(btnClicked == m_matchCase){ + if(m_matchCase->IsChecked()) { + flags |= wxFRD_MATCHCASE; + } else { + flags &= ~(wxFRD_MATCHCASE); + } + } else if(btnClicked == m_matchWholeWord){ + if(m_matchWholeWord->IsChecked()) { + flags |= wxFRD_MATCHWHOLEWORD; + } else { + flags &= ~(wxFRD_MATCHWHOLEWORD); + } + } else if(btnClicked == m_regualrExpression){ + if(m_regualrExpression->IsChecked()) { + flags |= wxFRD_REGULAREXPRESSION; + } else { + flags &= ~(wxFRD_REGULAREXPRESSION); + } + } + + // Set the updated flags + m_data.SetFlags(flags); +} + +void FindInFilesDialog::OnClose(wxCloseEvent &event) +{ + wxUnusedVar(event); + + // Fire a close event + SendEvent(wxEVT_FRD_CLOSE); + Hide(); +} + +void FindInFilesDialog::ConnectEvents() +{ + // Connect buttons + m_find->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); + m_cancel->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); + m_stop->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); + + // connect options + m_matchCase->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); + m_matchWholeWord->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); + m_regualrExpression->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindInFilesDialog::OnClick), NULL, this); +} + +void FindInFilesDialog::OnCharEvent(wxKeyEvent &event) +{ + if(event.GetKeyCode() == WXK_ESCAPE){ + Hide(); + return; + } + else if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER){ + DoSearch(); + return; + } + event.Skip(); +} + +void FindInFilesDialog::SendEvent(wxEventType type) +{ + wxCommandEvent event(type, GetId()); + event.SetEventObject(this); + + if( GetEventOwner() == NULL ) + GetEventHandler()->ProcessEvent( event ); + else + // If an event owner was provided, pass it the event + GetEventOwner()->ProcessEvent( event ); +} + +bool FindInFilesDialog::Show() +{ + if( IsShown() ) + return true; + + SetData(m_data); + m_findString->SetSelection(-1, -1); // select all + m_findString->SetFocus(); + return wxDialog::Show(); +} diff --git a/LiteEditor/findinfilesdlg.h b/LiteEditor/findinfilesdlg.h new file mode 100644 index 0000000000..c911bd7bdd --- /dev/null +++ b/LiteEditor/findinfilesdlg.h @@ -0,0 +1,79 @@ +#ifndef FIND_IN_FILES_DLG_H +#define FIND_IN_FILES_DLG_H + +#include "wx/dialog.h" +#include "findreplacedlg.h" + +class wxTextCtrl; +class wxCheckBox; +class wxButton; +class wxStaticText; +class DirPicker; +class wxComboBox; + +extern const wxEventType wxEVT_FIF_FIND; +extern const wxEventType wxEVT_FIF_STOP; +extern const wxEventType wxEVT_FIF_CLOSE; + +class FindInFilesDialog : public wxDialog +{ + wxEvtHandler *m_owner; + + FindReplaceData m_data; + + // Options + wxComboBox *m_findString; + wxCheckBox *m_matchCase; + wxCheckBox *m_matchWholeWord; + wxCheckBox *m_regualrExpression; + DirPicker *m_dirPicker; + wxComboBox *m_fileTypes; + + // Buttons + wxButton *m_find; + wxButton *m_stop; + wxButton *m_cancel; + +public: + virtual ~FindInFilesDialog( ); + FindInFilesDialog(); + FindInFilesDialog( wxWindow* parent, + const FindReplaceData& data, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("Find In Files"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxSize(400, 200), + long style = wxDEFAULT_DIALOG_STYLE); + + // Creation + bool Create(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("Find In Files"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxSize(400, 200), + long style = wxDEFAULT_DIALOG_STYLE + ); + + // Return the data + FindReplaceData& GetData() { return m_data; } + void SetData(FindReplaceData &data); + + virtual bool Show(); + + void SetEventOwner(wxEvtHandler *owner) { m_owner = owner; } + wxEvtHandler *GetEventOwner() const { return m_owner; } + +protected: + void CreateGUIControls(); + void ConnectEvents(); + void OnClick(wxCommandEvent &event); + void SendEvent(wxEventType type); + void DoSearch(); + + DECLARE_EVENT_TABLE() + void OnClose(wxCloseEvent &event); + void OnCharEvent(wxKeyEvent &event); +}; + +#endif // FIND_IN_FILES_DLG_H diff --git a/LiteEditor/findreplacedlg.cpp b/LiteEditor/findreplacedlg.cpp new file mode 100644 index 0000000000..b565d1b057 --- /dev/null +++ b/LiteEditor/findreplacedlg.cpp @@ -0,0 +1,327 @@ +#include "findreplacedlg.h" +#include +#include +#include +#include +#include +#include +#include "macros.h" + +DEFINE_EVENT_TYPE(wxEVT_FRD_FIND_NEXT) +DEFINE_EVENT_TYPE(wxEVT_FRD_CLOSE) +DEFINE_EVENT_TYPE(wxEVT_FRD_REPLACE) +DEFINE_EVENT_TYPE(wxEVT_FRD_REPLACEALL) +DEFINE_EVENT_TYPE(wxEVT_FRD_BOOKMARKALL) + +BEGIN_EVENT_TABLE(FindReplaceDialog, wxDialog) + EVT_CLOSE(FindReplaceDialog::OnClose) + EVT_CHAR_HOOK(FindReplaceDialog::OnKeyDown) +END_EVENT_TABLE() + +FindReplaceDialog::FindReplaceDialog() + : wxDialog() + , m_owner(NULL) + , m_kind(FIND_DLG) +{ +} + +FindReplaceDialog::FindReplaceDialog(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + Create(parent, data, id, caption, pos, size, style | wxWANTS_CHARS); +} + +bool FindReplaceDialog::Create(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + m_kind = FIND_DLG; + if ( !wxDialog::Create(parent, id, caption, pos, size, style) ) + return false; + + m_data = data; + m_owner = NULL; + + CreateGUIControls(); + ConnectEvents(); + + GetSizer()->Fit(this); +// GetSizer()->SetSizeHints(this); + return true; +} + +FindReplaceDialog::~FindReplaceDialog() +{ +} + +void FindReplaceDialog::CreateGUIControls() +{ + wxBoxSizer *hMainSzier = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *btnSizer = new wxBoxSizer(wxVERTICAL); + gbSizer = new wxGridBagSizer(); + SetSizer(hMainSzier); + + hMainSzier->Add(gbSizer, 3, wxEXPAND | wxALL, 5); + hMainSzier->Add(btnSizer, 1, wxALL, 5); + + wxStaticText* itemStaticText; + itemStaticText = new wxStaticText( this, wxID_STATIC, wxT("Find What:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + gbSizer->Add(itemStaticText, wxGBPosition(0, 0), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + + m_findString = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, -1)); + gbSizer->Add(m_findString, wxGBPosition(0, 1), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + + m_replaceWithLabel = new wxStaticText( this, wxID_STATIC, wxT("Replace With:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + gbSizer->Add(m_replaceWithLabel, wxGBPosition(1, 0), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + + m_replaceString = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition); + gbSizer->Add(m_replaceString, wxGBPosition(1, 1), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + + sz = new wxStaticBoxSizer(wxVERTICAL, this, wxT("Options")); + gbSizer->Add(sz, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL | wxEXPAND, 5 ); + + m_matchCase = new wxCheckBox(this, wxID_ANY, wxT("&Match case")); + sz->Add(m_matchCase, 1, wxALL | wxEXPAND, 5 ); + + m_matchWholeWord = new wxCheckBox(this, wxID_ANY, wxT("Match &whole word")); + sz->Add(m_matchWholeWord, 1, wxALL | wxEXPAND, 5 ); + + m_regualrExpression = new wxCheckBox(this, wxID_ANY, wxT("Regular &expression")); + sz->Add(m_regualrExpression, 1, wxALL | wxEXPAND, 5 ); + + m_searchUp = new wxCheckBox(this, wxID_ANY, wxT("Search &up")); + sz->Add(m_searchUp, 1, wxALL | wxEXPAND, 5 ); + + // Add the buttons + + m_find = new wxButton(this, wxID_ANY, wxT("&Find Next")); + btnSizer->Add(m_find, 1, wxALL | wxEXPAND, 5 ); + + m_replace = new wxButton(this, wxID_ANY, wxT("&Replace")); + btnSizer->Add(m_replace, 1, wxALL | wxEXPAND, 5 ); + + m_replaceAll = new wxButton(this, wxID_ANY, wxT("Replace &All")); + btnSizer->Add(m_replaceAll, 1, wxALL | wxEXPAND, 5 ); + + m_markAll = new wxButton(this, wxID_ANY, wxT("&Bookmark All")); + btnSizer->Add(m_markAll, 1, wxALL | wxEXPAND, 5 ); + + m_cancel = new wxButton(this, wxID_ANY, wxT("Close")); + btnSizer->Add(m_cancel, 1, wxALL | wxEXPAND, 5 ); + + m_replacementsMsg = new wxStaticText(this, wxID_ANY, wxEmptyString); + btnSizer->Add(m_replacementsMsg, 1, wxALL | wxEXPAND, 5 ); + //gbSizer->Add(m_replacementsMsg, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALL | wxEXPAND, 5); + SetReplacementsMessage(wxT("Replacements: 0")); + + //set values + SetFindReplaceData(m_data); +} + +void FindReplaceDialog::SetFindReplaceData(FindReplaceData &data) +{ + m_findString->Clear(); + m_findString->Append(data.GetFindStringArr()); + m_findString->SetValue(data.GetFindString()); + + m_replaceString->Clear(); + m_replaceString->Append(data.GetReplaceStringArr()); + m_replaceString->SetValue(data.GetReplaceString()); + + m_matchCase->SetValue(data.GetFlags() & wxFRD_MATCHCASE ? true : false); + m_matchWholeWord->SetValue(data.GetFlags() & wxFRD_MATCHWHOLEWORD ? true : false); + m_regualrExpression->SetValue(data.GetFlags() & wxFRD_REGULAREXPRESSION ? true : false); + m_searchUp->SetValue(data.GetFlags() & wxFRD_SEARCHUP ? true : false); + + //set the focus to the find string text control + m_findString->SetFocus(); + m_findString->SetSelection(-1, -1); // select all +} + +void FindReplaceDialog::OnClick(wxCommandEvent &event) +{ + wxObject *btnClicked = event.GetEventObject(); + size_t flags = m_data.GetFlags(); + m_data.SetFindString( m_findString->GetValue() ); + m_data.SetReplaceString( m_replaceString->GetValue() ); + + if (btnClicked == m_find) { + SendEvent(wxEVT_FRD_FIND_NEXT); + } else if (btnClicked == m_replace) { + SendEvent(wxEVT_FRD_REPLACE); + } else if (btnClicked == m_replaceAll) { + SendEvent(wxEVT_FRD_REPLACEALL); + } else if (btnClicked == m_markAll) { + SendEvent(wxEVT_FRD_BOOKMARKALL); + } else if (btnClicked == m_cancel) { + // Fire a close event + SendEvent(wxEVT_FRD_CLOSE); + // Hide the dialog + Hide(); + } else if (btnClicked == m_matchCase) { + if (m_matchCase->IsChecked()) { + flags |= wxFRD_MATCHCASE; + } else { + flags &= ~(wxFRD_MATCHCASE); + } + } else if (btnClicked == m_matchWholeWord) { + if (m_matchWholeWord->IsChecked()) { + flags |= wxFRD_MATCHWHOLEWORD; + } else { + flags &= ~(wxFRD_MATCHWHOLEWORD); + } + } else if (btnClicked == m_regualrExpression) { + if (m_regualrExpression->IsChecked()) { + flags |= wxFRD_REGULAREXPRESSION; + } else { + flags &= ~(wxFRD_REGULAREXPRESSION); + } + } else if (btnClicked == m_searchUp) { + if (m_searchUp->IsChecked()) { + flags |= wxFRD_SEARCHUP; + } else { + flags &= ~(wxFRD_SEARCHUP); + } + } + + // Set the updated flags + m_data.SetFlags(flags); +} + +void FindReplaceDialog::OnClose(wxCloseEvent &event) +{ + wxUnusedVar(event); + + // Fire a close event + SendEvent(wxEVT_FRD_CLOSE); + Hide(); +} +void FindReplaceDialog::OnKeyDown(wxKeyEvent &event) +{ + if (event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) { + // start the search + size_t flags = m_data.GetFlags(); + m_data.SetFindString( m_findString->GetValue() ); + m_data.SetReplaceString( m_replaceString->GetValue() ); + SendEvent(wxEVT_FRD_FIND_NEXT); + // Set the updated flags + m_data.SetFlags(flags); + event.Skip(false); + return; + } // if(event.GetKeyCode() == WXK_RETURN) + + if (event.GetKeyCode() == WXK_ESCAPE) { + //hide the find/replace dialog + if (IsShown()) { + Hide(); + event.Skip(false); + return; + } + } // if(event.GetKeyCode() == WXK_ESCAPE) + event.Skip(); +} + +void FindReplaceDialog::ConnectEvents() +{ + // Connect buttons + m_find->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_replace->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_replaceAll->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_markAll->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_cancel->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + + // connect options + m_matchCase->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_matchWholeWord->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_regualrExpression->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); + m_searchUp->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler(FindReplaceDialog::OnClick), NULL, this); +} + +void FindReplaceDialog::SendEvent(wxEventType type) +{ + wxCommandEvent event(type, GetId()); + event.SetEventObject(this); + + if ( GetEventOwner() == NULL ) + GetEventHandler()->ProcessEvent( event ); + else + // If an event owner was provided, pass it the event + GetEventOwner()->ProcessEvent( event ); +} + +bool FindReplaceDialog::Show(int kind) +{ + if ( IsShown() ) { + if (m_kind == kind) { + return true; + } + //change the dialog + ShowReplaceControls(true); + return true; + } + + kind == FIND_DLG ? ShowReplaceControls(false) : ShowReplaceControls(true); + + SetFindReplaceData(m_data); + m_findString->SetSelection(-1, -1); // select all + m_findString->SetFocus(); + return wxDialog::Show(); +} + +void FindReplaceDialog::ShowReplaceControls(bool show) +{ + //detach the find string & its label from the gridbag sizer + bool isFindDlg(false); + isFindDlg = gbSizer->GetItemPosition(sz) == wxGBPosition(1, 0); + if (show == false) { + //is this dialog is already a 'Find' dialog? + if(isFindDlg){ + return; + } + + //remove 'Replace' dialog items + gbSizer->Detach(m_replaceWithLabel); + gbSizer->Detach(m_replaceString); + + //reposition the options static sizer + gbSizer->Detach(sz); + gbSizer->Add(sz, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL | wxEXPAND, 5 ); + + } else { + // is this dialog is already a 'Replace' dialog? + if(!isFindDlg){ + return; + } + + //remmove the 'Options' item frmo pos 1,0 + gbSizer->Detach(sz); + gbSizer->Add(m_replaceWithLabel, wxGBPosition(1, 0), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + gbSizer->Add(m_replaceString, wxGBPosition(1, 1), wxDefaultSpan, wxALL | wxEXPAND, 5 ); + gbSizer->Add(sz, wxGBPosition(2, 0), wxGBSpan(1, 2), wxALL | wxEXPAND, 5 ); + } + + wxString label = show ? wxT("Replace") : wxT("Find"); + m_replace->Show(show); + m_replaceAll->Show(show); + m_replaceString->Show(show); + m_replacementsMsg->Show(show); + m_replaceWithLabel->Show(show); + + SetLabel(label); + this->Fit(); + GetSizer()->Layout(); +} + +void FindReplaceDialog::SetReplacementsMessage(const wxString &msg) +{ + m_replacementsMsg->SetLabel(msg); +} diff --git a/LiteEditor/findreplacedlg.h b/LiteEditor/findreplacedlg.h new file mode 100644 index 0000000000..0c23f73192 --- /dev/null +++ b/LiteEditor/findreplacedlg.h @@ -0,0 +1,215 @@ +#ifndef FIND_REPLACE_DLG_H +#define FIND_REPLACE_DLG_H + +#include "wx/dialog.h" +#include "serialized_object.h" + +class wxTextCtrl; +class wxCheckBox; +class wxButton; +class wxStaticText; + +#define wxFRD_MATCHCASE 0x00000001 +#define wxFRD_MATCHWHOLEWORD 0x00000002 +#define wxFRD_REGULAREXPRESSION 0x00000004 +#define wxFRD_SEARCHUP 0x00000008 +#define wxFRD_WRAPSEARCH 0x00000010 + +#define FIND_DLG 0 +#define REPLACE_DLG 1 + +#ifndef WXDLLIMPEXP_LE + #ifdef WXMAKINGDLL + # define WXDLLIMPEXP_LE WXIMPORT + #elif defined(WXUSINGDLL) + # define WXDLLIMPEXP_LE WXEXPORT + #else + # define WXDLLIMPEXP_LE + #endif // WXDLLIMPEXP_LE +#endif + +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_FRD_FIND_NEXT, -1) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_FRD_CLOSE, -1) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_FRD_REPLACE, -1) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_FRD_REPLACEALL, -1) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_FRD_BOOKMARKALL, -1) + +class FindReplaceData : public SerializedObject +{ + wxArrayString m_replaceString; + wxArrayString m_findString; + size_t m_flags; + +public: + FindReplaceData() + : m_flags(0) + {} + + // Copy ctor + FindReplaceData(const FindReplaceData& src) + { + *this = src; + } + + // assignment operator + FindReplaceData& operator=(const FindReplaceData& src) + { + if(this == &src) + return *this; + + // Copy fields + m_replaceString = src.m_replaceString; + m_findString = src.m_findString; + m_flags = src.m_flags; + return *this; + } + + virtual ~FindReplaceData() + {} + + // Setters/Getters + const size_t GetFlags() const { return m_flags; } + void SetFlags(size_t flags) { m_flags = flags; } + + wxArrayString &GetFindStringArr() { return m_findString; } + wxArrayString &GetReplaceStringArr() { return m_replaceString; } + + /** + * \brief return the first find string on the array + */ + wxString GetFindString() const { + if(m_findString.IsEmpty()){ + return wxEmptyString; + }else{ + return m_findString.Item(0); + } + } + + /** + * \brief return the first replace string from the array + */ + wxString GetReplaceString() const{ + if(m_replaceString.IsEmpty()){ + return wxEmptyString; + }else{ + return m_replaceString.Item(0); + } + } + + /** + * \brief add find string to the array and make it first item on the array as well + * \param str find string to add + */ + void SetFindString(const wxString &str){ + int where = m_findString.Index(str); + if(where != wxNOT_FOUND){ + m_findString.RemoveAt(where); + } + m_findString.Insert(str, 0); + } + + /** + * \brief add replace string to the array and make it first item on the array as well + * \param str replace string to add + */ + void SetReplaceString(const wxString &str){ + int where = m_replaceString.Index(str); + if(where != wxNOT_FOUND){ + m_replaceString.RemoveAt(where); + } + m_replaceString.Insert(str, 0); + } + + + //implement the serialization API + void Serialize(Archive &arch){ + arch.Write(wxT("m_findString"), m_findString); + arch.Write(wxT("m_replaceString"), m_replaceString); + arch.Write(wxT("m_flags"), (long)m_flags); + } + + void DeSerialize(Archive &arch){ + arch.Read(wxT("m_findString"), m_findString); + arch.Read(wxT("m_replaceString"), m_replaceString); + arch.Read(wxT("m_flags"), (long&)m_flags); + } +}; + +class wxStaticText; +class wxComboBox; +class wxGridBagSizer; +class wxStaticBoxSizer; + +class FindReplaceDialog : public wxDialog +{ + wxEvtHandler *m_owner; + + FindReplaceData m_data; + + // Options + wxComboBox *m_findString; + wxComboBox *m_replaceString; + wxCheckBox *m_matchCase; + wxCheckBox *m_matchWholeWord; + wxCheckBox *m_regualrExpression; + wxCheckBox *m_searchUp; + + // Buttons + wxButton *m_find; + wxButton *m_replace; + wxButton *m_replaceAll; + wxButton *m_markAll; + wxButton *m_cancel; + wxStaticText *m_replacementsMsg; + wxStaticText *m_replaceWithLabel; + wxGridBagSizer *gbSizer; + wxStaticBoxSizer *sz; + int m_kind; + +public: + virtual ~FindReplaceDialog( ); + FindReplaceDialog(); + FindReplaceDialog( wxWindow* parent, + const FindReplaceData& data, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("Find / Replace"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); + + // Creation + bool Create(wxWindow* parent, + const FindReplaceData& data, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("Find / Replace"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE + ); + + // Return the data + FindReplaceData& GetData() { return m_data; } + + virtual bool Show(int kind); + + void SetEventOwner(wxEvtHandler *owner) { m_owner = owner; } + wxEvtHandler *GetEventOwner() const { return m_owner; } + + // Set the replacements message + void SetReplacementsMessage(const wxString &msg); + void SetFindReplaceData(FindReplaceData& data); + +protected: + void ShowReplaceControls(bool show); + void CreateGUIControls(); + void ConnectEvents(); + void OnClick(wxCommandEvent &event); + void SendEvent(wxEventType type); + + void OnKeyDown(wxKeyEvent &event); + DECLARE_EVENT_TABLE() + void OnClose(wxCloseEvent &event); + +}; + +#endif // FIND_REPLACE_DLG_H diff --git a/LiteEditor/frame.cpp b/LiteEditor/frame.cpp new file mode 100644 index 0000000000..42eac9f894 --- /dev/null +++ b/LiteEditor/frame.cpp @@ -0,0 +1,2266 @@ +#include "precompiled_header.h" + +#include "frame.h" +#include "splashscreen.h" +#include "wx/stdpaths.h" +#include +#include "symbol_tree.h" +#include +#include "cpp_symbol_tree.h" +#include "plugin.h" +#include "language.h" +#include "editor_config.h" +#include "manager.h" +#include "menumanager.h" +#include +#include "findinfilesdlg.h" +#include "search_thread.h" +#include "project.h" +#include "newdlg.h" +#include "fileview.h" +#include "wx/aui/framemanager.h" +#include "options_base_dlg.h" +#include "configuration_manager_dlg.h" +#include "filedroptarget.h" +#include "advanced_settings.h" +#include "build_settings_config.h" +#include "list" +#include "macros.h" +#include "editor_creator.h" +#include "async_executable_cmd.h" +#include "open_resouce_dlg.h" +#include "open_type_dlg.h" +#include "workspace_pane.h" +#include "extdbwizard.h" +#include "navigationmanager.h" +#include "keyvaluetabledlg.h" +#include "debuggermanager.h" +#include "breakpointdlg.h" +#include "generalinfo.h" +#include "debuggersettingsdlg.h" +#include "quickoutlinedlg.h" +#include "debuggerpane.h" +#include "wx/ffile.h" +#include "wx/wxFlatNotebook/renderer.h" +#include "sessionmanager.h" +#include "pluginmanager.h" +#include "wx/dir.h" +#include "exelocator.h" +#include "builder.h" +#include "buildmanager.h" +#include "debuggerconfigtool.h" +#include "openwindowspanel.h" +#include "workspace_pane.h" +#include "globals.h" +#include "fileexplorer.h" + +#ifdef __WXGTK20__ +#include +#endif + +extern char *SvnRevision; +extern char *cubes_xpm[]; +extern unsigned char cubes_alpha[]; +extern time_t GetFileModificationTime(const wxString &fileName); + +static int FrameTimerId = wxNewId(); + +//---------------------------------------------------------------- +// Our main frame +//---------------------------------------------------------------- +BEGIN_EVENT_TABLE(Frame, wxFrame) + EVT_IDLE(Frame::OnIdle) + EVT_ACTIVATE(Frame::OnAppActivated) + EVT_SYMBOLTREE_ADD_ITEM(wxID_ANY, Frame::OnAddSymbols) + EVT_SYMBOLTREE_DELETE_ITEM(wxID_ANY, Frame::OnDeleteSymbols) + EVT_SYMBOLTREE_UPDATE_ITEM(wxID_ANY, Frame::OnUpdateSymbols) + EVT_COMMAND(wxID_ANY, wxEVT_SEARCH_THREAD_MATCHFOUND, Frame::OnSearchThread) + EVT_COMMAND(wxID_ANY, wxEVT_SEARCH_THREAD_SEARCHCANCELED, Frame::OnSearchThread) + EVT_COMMAND(wxID_ANY, wxEVT_SEARCH_THREAD_SEARCHEND, Frame::OnSearchThread) + EVT_COMMAND(wxID_ANY, wxEVT_SEARCH_THREAD_SEARCHSTARTED, Frame::OnSearchThread) + + //build/debugger events + EVT_COMMAND(wxID_ANY, wxEVT_BUILD_ADDLINE, Frame::OnBuildEvent) + EVT_COMMAND(wxID_ANY, wxEVT_BUILD_STARTED, Frame::OnBuildEvent) + EVT_COMMAND(wxID_ANY, wxEVT_BUILD_ENDED, Frame::OnBuildEvent) + + EVT_MENU(XRCID("close_other_tabs"), Frame::OnCloseAllButThis) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_ADDLINE, Frame::OnOutputWindowEvent) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_STARTED, Frame::OnOutputWindowEvent) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_ENDED, Frame::OnOutputWindowEvent) + EVT_COMMAND(wxID_ANY, wxEVT_NEW_DLG_CREATE_LE, Frame::OnNewDlgCreate) + EVT_MENU(wxID_CLOSE_ALL, Frame::OnFileCloseAll) + EVT_MENU(XRCID("fix_ext_database"), Frame::OnFixDatabasePaths) + EVT_MENU(wxID_EXIT, Frame::OnQuit) + EVT_MENU(wxID_SAVE, Frame::OnSave) + EVT_MENU(wxID_SAVEAS, Frame::OnSaveAs) + EVT_MENU(XRCID("about"), Frame::OnAbout) + EVT_MENU(wxID_NEW, Frame::OnFileNew) + EVT_MENU(wxID_OPEN, Frame::OnFileOpen) + EVT_MENU(wxID_CLOSE, Frame::OnFileClose) + EVT_MENU(XRCID("save_all"), Frame::OnFileSaveAll) + EVT_MENU(wxID_CUT, Frame::DispatchCommandEvent) + EVT_MENU(wxID_COPY, Frame::DispatchCommandEvent) + EVT_MENU(wxID_PASTE, Frame::DispatchCommandEvent) + EVT_MENU(wxID_UNDO, Frame::DispatchCommandEvent) + EVT_MENU(wxID_REDO, Frame::DispatchCommandEvent) + EVT_MENU(wxID_SELECTALL, Frame::DispatchCommandEvent) + EVT_MENU(wxID_DUPLICATE, Frame::DispatchCommandEvent) + EVT_MENU(wxID_REFRESH, Frame::OnFileReload) + EVT_MENU(XRCID("select_to_brace"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("match_brace"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("find_next"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("find_previous"), Frame::DispatchCommandEvent) + EVT_MENU(wxID_FIND, Frame::DispatchCommandEvent) + EVT_MENU(wxID_REPLACE, Frame::DispatchCommandEvent) + EVT_MENU(XRCID("goto_linenumber"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("toggle_bookmark"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("next_bookmark"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("previous_bookmark"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("removeall_bookmarks"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("goto_definition"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("goto_previous_definition"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("find_in_files"), Frame::OnFindInFiles) + EVT_MENU(XRCID("new_workspace"), Frame::OnProjectNewWorkspace) + EVT_MENU(XRCID("new_project"), Frame::OnProjectNewProject) + EVT_MENU(XRCID("switch_to_workspace"), Frame::OnSwitchWorkspace) + EVT_MENU(XRCID("close_workspace"), Frame::OnCloseWorkspace) + EVT_MENU(XRCID("add_project"), Frame::OnProjectAddProject) + EVT_UPDATE_UI(XRCID("save_all"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(wxID_CUT, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_COPY, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_PASTE, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_UNDO, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_REDO, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_SELECTALL, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(wxID_DUPLICATE, Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(XRCID("select_to_brace"), Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(XRCID("match_brace"), Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(XRCID("find_next"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("find_previous"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("goto_linenumber"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(wxID_FIND, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(wxID_REPLACE, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("toggle_bookmark"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("next_bookmark"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(viewAsSubMenuID, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("previous_bookmark"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("removeall_bookmarks"), Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("new_project"), Frame::OnWorkspaceOpen) + EVT_UPDATE_UI(XRCID("close_workspace"), Frame::OnWorkspaceOpen) + EVT_UPDATE_UI(XRCID("add_project"), Frame::OnWorkspaceOpen) + EVT_UPDATE_UI(XRCID("view_as_menu"), Frame::OnFileExistUpdateUI) + EVT_MENU(XRCID("complete_word"), Frame::OnCompleteWord) + EVT_MENU(XRCID("tags_options"), Frame::OnCtagsOptions) + EVT_MENU_RANGE(viewAsMenuItemID, viewAsMenuItemMaxID, Frame::DispatchCommandEvent) + EVT_UPDATE_UI_RANGE(viewAsMenuItemID, viewAsMenuItemMaxID, Frame::DispatchUpdateUIEvent) + EVT_MENU(XRCID("options"), Frame::OnViewOptions) + EVT_UPDATE_UI(XRCID("word_wrap"), Frame::DispatchUpdateUIEvent) + EVT_MENU(XRCID("word_wrap"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("configuration_manager"), Frame::OnConfigurationManager) + EVT_UPDATE_UI(XRCID("configuration_manager"), Frame::OnWorkspaceOpen) + EVT_MENU(XRCID("toggle_panes"), Frame::OnTogglePanes) + EVT_UPDATE_UI(XRCID("add_envvar"), Frame::OnWorkspaceOpen) + EVT_MENU(XRCID("add_envvar"), Frame::OnAddEnvironmentVariable) + EVT_MENU(XRCID("advance_settings"), Frame::OnAdvanceSettings) + EVT_MENU(XRCID("build_active_project"), Frame::OnBuildProject) + EVT_MENU(XRCID("compile_active_file"), Frame::OnCompileFile) + EVT_MENU(XRCID("clean_active_project"), Frame::OnCleanProject) + EVT_MENU(XRCID("build_n_run_active_project"), Frame::OnBuildAndRunProject) + EVT_MENU(XRCID("rebuild_active_project"), Frame::OnRebuildProject) + EVT_MENU(XRCID("stop_active_project_build"), Frame::OnStopBuild) + EVT_MENU(XRCID("stop_executed_program"), Frame::OnStopExecutedProgram) + EVT_UPDATE_UI(XRCID("stop_active_project_build"), Frame::OnStopBuildUI) + EVT_UPDATE_UI(XRCID("stop_executed_program"), Frame::OnStopExecutedProgramUI) + EVT_UPDATE_UI(XRCID("clean_active_project"), Frame::OnCleanProjectUI) + EVT_MENU(XRCID("execute_no_debug"), Frame::OnExecuteNoDebug) + EVT_MENU(XRCID("next_error"), Frame::OnNextBuildError) + EVT_MENU(XRCID("create_ext_database"), Frame::OnBuildExternalDatabase) + EVT_MENU(XRCID("open_ext_database"), Frame::OnUseExternalDatabase) + EVT_MENU(XRCID("close_ext_database"), Frame::OnCloseExternalDatabase) + EVT_MENU(XRCID("find_resource"), Frame::OnFindResource) + EVT_MENU(XRCID("find_type"), Frame::OnFindType) + EVT_MENU(XRCID("find_symbol"), Frame::OnQuickOutline) + EVT_MENU(XRCID("attach_debugger"), Frame::OnDebugAttach) + EVT_MENU(XRCID("add_project"), Frame::OnProjectAddProject) + EVT_MENU(XRCID("import_from_makefile"), Frame::OnImportMakefile) + EVT_MENU(XRCID("import_from_msvs"), Frame::OnImportMSVS) + EVT_UPDATE_UI(XRCID("import_from_makefile"), Frame::OnImportMakefileUI) + EVT_CLOSE(Frame::OnClose) + EVT_TIMER(FrameTimerId, Frame::OnTimer) + EVT_MENU_RANGE(RecentFilesSubMenuID, RecentFilesSubMenuID + 10, Frame::OnRecentFile) + EVT_MENU_RANGE(RecentWorkspaceSubMenuID, RecentWorkspaceSubMenuID + 10, Frame::OnRecentWorkspace) + EVT_UPDATE_UI(wxID_FORWARD, Frame::OnBackwardForwardUI) + EVT_MENU(wxID_FORWARD, Frame::OnBackwardForward) + EVT_UPDATE_UI(wxID_BACKWARD, Frame::OnBackwardForwardUI) + EVT_MENU(wxID_BACKWARD, Frame::OnBackwardForward) + EVT_MENU(XRCID("start_debugger"), Frame::OnDebug) + EVT_MENU(XRCID("stop_debugger"), Frame::OnDebugStop) + EVT_MENU(XRCID("insert_breakpoint"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("delete_breakpoint"), Frame::DispatchCommandEvent) + EVT_MENU(XRCID("pause_debugger"), Frame::OnDebugCmd) + EVT_MENU(XRCID("dbg_stepin"), Frame::OnDebugCmd) + EVT_MENU(XRCID("dbg_stepout"), Frame::OnDebugCmd) + EVT_MENU(XRCID("dbg_next"), Frame::OnDebugCmd) + EVT_MENU(XRCID("debuger_settings"), Frame::OnDebuggerSettings) + EVT_UPDATE_UI(XRCID("pause_debugger"), Frame::OnDebugCmdUI) + EVT_UPDATE_UI(XRCID("stop_debugger"), Frame::OnDebugStopUI) + EVT_UPDATE_UI(XRCID("start_debugger"), Frame::OnDebugUI) + EVT_HTML_LINK_CLICKED(wxID_ANY, Frame::OnLinkClicked) + EVT_UPDATE_UI(XRCID("load_last_session"), Frame::OnLoadLastSessionUI) + EVT_MENU(XRCID("load_last_session"), Frame::OnLoadLastSession) + EVT_MENU(XRCID("view_welcome_page"), Frame::OnShowWelcomePage) + EVT_UPDATE_UI(XRCID("view_welcome_page"), Frame::OnShowWelcomePageUI) + EVT_MENU(XRCID("view_welcome_page_at_startup"), Frame::OnLoadWelcomePage) + EVT_UPDATE_UI(XRCID("view_welcome_page_at_startup"), Frame::OnLoadWelcomePageUI) + + EVT_MENU(XRCID("line_end_cr"), Frame::OnViewEolCR) + EVT_MENU(XRCID("line_end_lf"), Frame::OnViewEolLF) + EVT_MENU(XRCID("line_end_crlf"), Frame::OnViewEolCRLF) + EVT_UPDATE_UI(XRCID("line_end_cr"), Frame::OnViewEolCR_UI) + EVT_UPDATE_UI(XRCID("line_end_lf"), Frame::OnViewEolLF_UI) + EVT_UPDATE_UI(XRCID("line_end_crlf"), Frame::OnViewEolCRLF_UI) + EVT_UPDATE_UI(XRCID("line_end_chars_menu"), Frame::OnViewEolUI) + EVT_MENU(XRCID("convert_eol"), Frame::OnConvertEol) + EVT_UPDATE_UI(XRCID("convert_eol"), Frame::OnConvertEolUI) + EVT_MENU(XRCID("display_eol"), Frame::OnViewDisplayEOL) + EVT_UPDATE_UI(XRCID("display_eol"), Frame::OnViewDisplayEOL_UI) + +#if defined (__WXMSW__) || defined (__WXMAC__) + EVT_UPDATE_UI(wxID_SAVE, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("complete_word"), Frame::OnCompleteWordUpdateUI) + EVT_UPDATE_UI(XRCID("execute_no_debug"), Frame::OnExecuteNoDebugUI) + EVT_UPDATE_UI(XRCID("dbg_stepin"), Frame::OnDebugCmdUI) + EVT_UPDATE_UI(XRCID("dbg_stepout"), Frame::OnDebugCmdUI) + EVT_UPDATE_UI(XRCID("dbg_next"), Frame::OnDebugCmdUI) + EVT_UPDATE_UI(wxID_SAVEAS, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("build_active_project"), Frame::OnBuildProjectUI) + EVT_UPDATE_UI(XRCID("compile_active_file"), Frame::OnCompileFileUI) + EVT_UPDATE_UI(XRCID("build_n_run_active_project"), Frame::OnBuildProjectUI) + EVT_UPDATE_UI(XRCID("rebuild_active_project"), Frame::OnBuildProjectUI) + EVT_UPDATE_UI(wxID_REFRESH, Frame::OnFileExistUpdateUI) + EVT_UPDATE_UI(XRCID("find_type"), Frame::OnWorkspaceOpen) + EVT_UPDATE_UI(XRCID("find_symbol"), Frame::OnCompleteWordUpdateUI) + EVT_UPDATE_UI(XRCID("goto_definition"), Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(XRCID("goto_previous_definition"), Frame::DispatchUpdateUIEvent) + EVT_UPDATE_UI(XRCID("find_resource"), Frame::OnWorkspaceOpen) + EVT_UPDATE_UI(XRCID("insert_breakpoint"), Frame::OnDebugManageBreakpointsUI) + EVT_UPDATE_UI(XRCID("delete_breakpoint"), Frame::OnDebugManageBreakpointsUI) + EVT_UPDATE_UI(XRCID("next_error"), Frame::OnNextBuildErrorUI) + EVT_UPDATE_UI(wxID_CLOSE, Frame::OnFileCloseUI) +#endif + +END_EVENT_TABLE() +Frame* Frame::m_theFrame = NULL; + +Frame::Frame(wxWindow *pParent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) +: wxFrame(pParent, id, title, pos, size, style) +, m_findInFilesDlg(NULL) +, m_buildInRun(false) +, m_rebuild(false) +{ +#if defined(__WXGTK20__) + // A rather ugly hack here. GTK V2 insists that F10 should be the + // accelerator for the menu bar. We don't want that. There is + // no sane way to turn this off, but we *can* get the same effect + // by setting the "menu bar accelerator" property to the name of a + // function key that is apparently legal, but doesn't really exist. + // (Or if it does, it certainly isn't a key we use.) + gtk_settings_set_string_property (gtk_settings_get_default (), + "gtk-menu-bar-accel", "F15", "foo"); + +#endif + + CreateGUIControls(); + + ManagerST::Get(); // Dummy call + + //allow the main frame to receive files by drag and drop + SetDropTarget( new FileDropTarget() ); + + // Start the search thread + SearchThreadST::Get()->SetNotifyWindow(this); + SearchThreadST::Get()->Start(WXTHREAD_MIN_PRIORITY); + + //start the editor creator thread + EditorCreatorST::Get()->SetParent(GetNotebook()); + m_timer = new wxTimer(this, FrameTimerId); + m_timer->Start(100); +} + +Frame::~Frame(void) { + delete m_timer; + ManagerST::Free(); + // uninitialize AUI manager + m_mgr.UnInit(); + //#ifdef __WXMSW__ + // force exit! + // wxTheApp->ExitMainLoop(); + //#endif +} + +Frame* Frame::Get() { + if ( !m_theFrame ) { + //set the revision number in the frame title + wxString title(wxT("CodeLite - Revision: ")); + title << _U(SvnRevision); + //read the last frame size from the configuration file + // Initialise editor configuration files + EditorConfig *cfg = EditorConfigST::Get(); + cfg->Load(); + + GeneralInfo inf; + cfg->ReadObject(wxT("GeneralInfo"), &inf); + m_theFrame = new Frame( NULL, + wxID_ANY, + title, + inf.GetFramePosition(), + inf.GetFrameSize(), + wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); + + m_theFrame->m_frameGeneralInfo = inf; + m_theFrame->Maximize(m_theFrame->m_frameGeneralInfo.GetFlags() & CL_MAXIMIZE_FRAME ? true : false); + + // upgrade: change all .db files under the startup directory to be + // .tags + m_theFrame->UpgradeExternalDbExt(); + + //add the welcome page + if(m_theFrame->m_frameGeneralInfo.GetFlags() & CL_SHOW_WELCOME_PAGE){ + m_theFrame->CreateWelcomePage(); + } + + //plugins must be loaded before the file explorer + m_theFrame->LoadPlugins(); + + //time to create the file explorer + m_theFrame->GetFileExplorer()->Scan(); + + //load last session? + if (m_theFrame->m_frameGeneralInfo.GetFlags() & CL_LOAD_LAST_SESSION) { + m_theFrame->LoadSession(wxT("Default")); + } + } + return m_theFrame; +} + +void Frame::CreateGUIControls(void) { +#ifdef __WXMSW__ + SetIcon(wxICON(aaaaa)); +#else + wxImage img(cubes_xpm); + img.SetAlpha(cubes_alpha, true); + wxBitmap bmp(img); + wxIcon icon; + icon.CopyFromBitmap(bmp); + SetIcon(icon); +#endif + + // tell wxAuiManager to manage this frame + m_mgr.SetManagedWindow(this); + m_mgr.SetFlags(m_mgr.GetFlags() | wxAUI_MGR_TRANSPARENT_DRAG); + +#if defined (__WXGTK__) || defined (__WXMAC__) + m_mgr.SetFlags(m_mgr.GetFlags() | wxAUI_MGR_ALLOW_ACTIVE_PANE); +#else + m_mgr.GetArtProvider()->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR, wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION)); + m_mgr.GetArtProvider()->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR, wxSystemSettings::GetColour(wxSYS_COLOUR_GRADIENTACTIVECAPTION)); + m_mgr.GetArtProvider()->SetColor(wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR, wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); +#endif + + //initialize debugger configuration tool + DebuggerConfigTool::Get()->Load(ManagerST::Get()->GetStarupDirectory() + wxT("/config/debuggers.xml")); + m_mgr.SetFlags(m_mgr.GetFlags() | wxAUI_MGR_TRANSPARENT_DRAG); + +// On wx2.8.7, AUI dragging is broken but this happens only in debug build & on GTK +#if wxCHECK_VERSION(2, 8, 7) && defined (__WXGTK__) && defined (__WXDEBUG__) + m_mgr.SetFlags(wxAUI_MGR_ALLOW_FLOATING|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_RECTANGLE_HINT); +#endif + +#ifdef __WXGTK__ + m_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_VERTICAL); +#else + m_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_HORIZONTAL); +#endif + m_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE, 1); + m_mgr.GetArtProvider()->SetMetric(wxAUI_DOCKART_SASH_SIZE, 6); + + // Load the menubar from XRC and set this frame's menubar to it. + SetMenuBar(wxXmlResource::Get()->LoadMenuBar(wxT("main_menu"))); + + //--------------------------------------------- + // Add docking windows + //--------------------------------------------- + m_outputPane = new OutputPane(this, wxT("Output")); + wxAuiPaneInfo paneInfo; + m_mgr.AddPane(m_outputPane, paneInfo.Name(wxT("Output")).Caption(wxT("Output")).Bottom().Layer(1).Position(1).CloseButton(true).MinimizeButton()); + RegisterDockWindow(XRCID("output_pane"), wxT("Output")); + + // Add the explorer pane + m_workspacePane = new WorkspacePane(this, wxT("Workspace")); + m_mgr.AddPane(m_workspacePane, wxAuiPaneInfo(). + Name(m_workspacePane->GetCaption()).Caption(m_workspacePane->GetCaption()). + Left().Layer(1).Position(0).CloseButton(true)); + RegisterDockWindow(XRCID("workspace_pane"), wxT("Workspace")); + + //add the debugger locals tree, make it hidden by default + m_debuggerPane = new DebuggerPane(this, wxT("Debugger")); + m_mgr.AddPane(m_debuggerPane, + wxAuiPaneInfo().Name(m_debuggerPane->GetCaption()).Caption(m_debuggerPane->GetCaption()).Bottom().Layer(1).Position(1).CloseButton(true).Hide()); + RegisterDockWindow(XRCID("debugger_pane"), wxT("Debugger")); + + // Create the notebook for all the files + long style = + wxFNB_TABS_BORDER_SIMPLE | + wxFNB_NODRAG | + wxFNB_FF2 | + wxFNB_BACKGROUND_GRADIENT | + wxFNB_NO_X_BUTTON | + wxFNB_NO_NAV_BUTTONS | + wxFNB_DROPDOWN_TABS_LIST | + wxFNB_SMART_TABS | + wxFNB_X_ON_TAB | + wxFNB_CUSTOM_DLG; + + m_book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); + m_book->SetCustomizeOptions(wxFNB_CUSTOM_LOCAL_DRAG | wxFNB_CUSTOM_ORIENTATION | wxFNB_CUSTOM_TAB_LOOK | wxFNB_CUSTOM_CLOSE_BUTTON ); + + m_il.push_back(wxXmlResource::Get()->LoadBitmap(wxT("help_icon"))); + m_book->SetImageList(&m_il); + + m_mgr.AddPane(m_book, wxAuiPaneInfo().Name(wxT("Editor")). + CenterPane().PaneBorder(false)); + + // Connect the main notebook events + GetNotebook()->Connect(GetNotebook()->GetId(), wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED, wxFlatNotebookEventHandler(Frame::OnPageChanged), NULL, this); + GetNotebook()->Connect(GetNotebook()->GetId(), wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING, wxFlatNotebookEventHandler(Frame::OnFileClosing), NULL, this); + GetNotebook()->Connect(GetNotebook()->GetId(), wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED, wxFlatNotebookEventHandler(Frame::OnPageClosed), NULL, this); + + CreateViewAsSubMenu(); + CreateRecentlyOpenedFilesMenu(); + CreateRecentlyOpenedWorkspacesMenu(); + BuildSettingsConfigST::Get()->Load(); + //load dialog properties + EditorConfigST::Get()->ReadObject(wxT("FindInFilesData"), &m_data); + EditorConfigST::Get()->ReadObject(wxT("FindAndReplaceData"), &LEditor::GetFindReplaceData()); + EditorConfigST::Get()->ReadObject(wxT("m_tagsOptionsData"), &m_tagsOptionsData); + + TagsManager *tagsManager = TagsManagerST::Get(); +#if defined (__WXMSW__) || defined (__WXGTK__) + //start ctags process + tagsManager->StartCtagsProcess(); +#else + // On Mac OSX, search the ctags-le in the correct path + tagsManager->SetCtagsPath(wxStandardPaths::Get().GetDataDir()); +#endif + + //-------------------------------------------------------------------------------------- + // Start the parsing thread, the parsing thread and the SymbolTree (or its derived) + // Are connected. The constructor of SymbolTree, calls ParseThreadST::Get()->SetNotifyWindow(this) + // to allows it to receive events for gui changes. + // + // If you wish to connect another object for it, simply call ParseThreadST::Get()->SetNotifyWindow(this) + // with another object as 'this' + //-------------------------------------------------------------------------------------- + ParseThreadST::Get()->Start(); + + // Connect this tree to the parse thread + ParseThreadST::Get()->SetNotifyWindow( this ); + + // And finally create a status bar + wxStatusBar* statusBar = new wxStatusBar(this, wxID_ANY); + statusBar->SetFieldsCount(4); + SetStatusBar(statusBar); + + GetStatusBar()->SetStatusText(wxT("Ready")); + + + //update ctags options + TagsManagerST::Get()->SetCtagsOptions(m_tagsOptionsData); + + //load windows perspective + CreateToolbars(); + + // load notebooks style + long book_style = 0; + book_style = EditorConfigST::Get()->LoadNotebookStyle(wxT("Editor")); + if (book_style != wxNOT_FOUND) { + GetNotebook()->SetWindowStyleFlag(book_style); + } + + book_style = EditorConfigST::Get()->LoadNotebookStyle(wxT("OutputPane")); + if (book_style != wxNOT_FOUND) { + m_outputPane->GetNotebook()->SetWindowStyleFlag(book_style); + } + + book_style = EditorConfigST::Get()->LoadNotebookStyle(wxT("WorkspacePane")); + if (book_style != wxNOT_FOUND) { + m_workspacePane->GetNotebook()->SetWindowStyleFlag(book_style); + } + + book_style = EditorConfigST::Get()->LoadNotebookStyle(wxT("DebuggerPane")); + if (book_style != wxNOT_FOUND) { + m_debuggerPane->GetNotebook()->SetWindowStyleFlag(book_style); + } + + //load the tab right click menu + m_tabRightClickMenu = wxXmlResource::Get()->LoadMenu(wxT("editor_tab_right_click")); + GetNotebook()->SetRightClickMenu(m_tabRightClickMenu); + + m_mgr.Update(); + SetAutoLayout (true); + + //load debuggers + DebuggerMgr::Get().Initialize(this, ManagerST::Get()->GetStarupDirectory()); + DebuggerMgr::Get().LoadDebuggers(); + + wxString sessConfFile; + sessConfFile << ManagerST::Get()->GetStarupDirectory() << wxT("/config/sessions.xml"); + SessionManager::Get().Load(sessConfFile); + + //try to locate the build tools + /////////////////////////////////////////////////////// + + //TODO:: temporarly disable to automatic tools update + //due to bug in overriding user settings + ManagerST::Get()->UpdateBuildTools(); + + Layout(); +} + +void Frame::CreateViewAsSubMenu() { + //get the 'View As' menu + + int idx = GetMenuBar()->FindMenu(wxT("View")); + if (idx != wxNOT_FOUND) { + wxMenu *menu = GetMenuBar()->GetMenu(idx); + wxMenu *submenu = new wxMenu(); + + //create a view as sub menu and attach it + wxMenuItem *item(NULL); + + int minId = viewAsMenuItemID; + + //load all lexers + // load generic lexers + EditorConfig::ConstIterator iter = EditorConfigST::Get()->LexerBegin(); + for (; iter != EditorConfigST::Get()->LexerEnd(); iter++) { + LexerConfPtr lex = iter->second; + item = new wxMenuItem(submenu, minId, lex->GetName(), wxEmptyString, wxITEM_CHECK); + m_viewAsMap[minId] = lex->GetName(); + minId++; + submenu->Append(item); + } + menu->Append(viewAsSubMenuID, wxT("View As"), submenu); + } +} + +wxString Frame::GetViewAsLanguageById(int id) const { + if (m_viewAsMap.find(id) == m_viewAsMap.end()) { + return wxEmptyString; + } + return m_viewAsMap.find(id)->second; +} + +void Frame::CreateMenuBar() { + wxMenuBar *mb = new wxMenuBar(); + //File Menu + wxMenu *menu = new wxMenu(); + menu->Append(wxID_NEW); + menu->Append(wxID_OPEN); + menu->Append(wxID_REFRESH); + menu->AppendSeparator(); + menu->Append(wxID_SAVE); + menu->Append(wxID_SAVEAS); + mb->Append(menu, wxT("&File")); + + SetMenuBar(mb); +} + +void Frame::CreateToolbars() { + wxAuiPaneInfo info; + //---------------------------------------------- + //create the standard toolbar + //---------------------------------------------- + wxToolBar *tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + tb->AddTool(wxID_NEW, wxT("New"), wxXmlResource::Get()->LoadBitmap(wxT("page_new")), wxT("New File (Ctrl+N)")); + tb->AddTool(wxID_OPEN, wxT("Open"), wxXmlResource::Get()->LoadBitmap(wxT("folder24")), wxT("Open File (Ctrl+O)")); + tb->AddTool(wxID_REFRESH, wxT("Reload"), wxXmlResource::Get()->LoadBitmap(wxT("reload")), wxT("Reload File (Ctrl+R)")); + tb->AddSeparator(); + tb->AddTool(wxID_SAVE, wxT("Save"), wxXmlResource::Get()->LoadBitmap(wxT("page_save")), wxT("Save (Ctrl+S)")); + tb->AddTool(wxID_SAVEAS, wxT("Save As"), wxXmlResource::Get()->LoadBitmap(wxT("save_as")), wxT("Save As")); + tb->AddTool(XRCID("save_all"), wxT("Save All"), wxXmlResource::Get()->LoadBitmap(wxT("save_all")), wxT("Save All")); + tb->AddSeparator(); + tb->AddTool(wxID_CLOSE, wxT("Close"), wxXmlResource::Get()->LoadBitmap(wxT("page_close")), wxT("Close File (Ctrl+W)")); + tb->AddSeparator(); + tb->AddTool(wxID_CUT, wxT("Cut"), wxXmlResource::Get()->LoadBitmap(wxT("cut")), wxT("Cut (Ctrl+X)")); + tb->AddTool(wxID_COPY, wxT("Copy"), wxXmlResource::Get()->LoadBitmap(wxT("copy")), wxT("Copy (Ctrl+C)")); + tb->AddTool(wxID_PASTE, wxT("Paste"), wxXmlResource::Get()->LoadBitmap(wxT("paste")), wxT("Paste (Ctrl+V)")); + tb->AddSeparator(); + tb->AddTool(wxID_UNDO, wxT("Undo"), wxXmlResource::Get()->LoadBitmap(wxT("undo")), wxT("Undo (Ctrl+Z)")); + tb->AddTool(wxID_REDO, wxT("Redo"), wxXmlResource::Get()->LoadBitmap(wxT("redo")), wxT("Redo (Ctrl+Y)")); + tb->AddTool(wxID_BACKWARD, wxT("Backward"), wxXmlResource::Get()->LoadBitmap(wxT("arrow_back")), wxT("Backward (Ctrl+P)")); + tb->AddTool(wxID_FORWARD, wxT("Forward"), wxXmlResource::Get()->LoadBitmap(wxT("arrow_next")), wxT("Forward")); + tb->AddSeparator(); + tb->AddTool(XRCID("toggle_bookmark"), wxT("Toggle Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark")), wxT("Toggle Bookmark (Ctrl+B)")); +// tb->AddTool(XRCID("next_bookmark"), wxT("Next Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark_previous")), wxT("Next Bookmark (F2)")); +// tb->AddTool(XRCID("previous_bookmark"), wxT("Previous Bookmark"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark_next")), wxT("Previous Bookmark (Shift+F2)")); +// tb->AddTool(XRCID("removeall_bookmarks"), wxT("Remove All Bookmarks"), wxXmlResource::Get()->LoadBitmap(wxT("bookmark_remove_all")), wxT("Remove All Bookmarks")); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + + tb->Realize(); + m_mgr.AddPane(tb, wxAuiPaneInfo().Name(wxT("Standard Toolbar")).LeftDockable(true).RightDockable(true).Caption(wxT("Standard")).ToolbarPane().Top()); + + //---------------------------------------------- + //create the search toolbar + //---------------------------------------------- + info = wxAuiPaneInfo(); + tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + + tb->AddTool(wxID_FIND, wxT("Find"), wxXmlResource::Get()->LoadBitmap(wxT("find_and_replace")), wxT("Find (Ctrl+F)")); + tb->AddTool(wxID_REPLACE, wxT("Replace"), wxXmlResource::Get()->LoadBitmap(wxT("refresh")), wxT("Replace (Ctrl+H)")); + tb->AddTool(XRCID("find_in_files"), wxT("Find In Files"), wxXmlResource::Get()->LoadBitmap(wxT("find_in_files")), wxT("Find In Files (Ctrl+Shift+F)")); + tb->AddSeparator(); + tb->AddTool(XRCID("find_resource"), wxT("Find Resource In Workspace"), wxXmlResource::Get()->LoadBitmap(wxT("open_resource")), wxT("Find Resource In Workspace (Ctrl+Shift+R)")); + tb->AddTool(XRCID("find_type"), wxT("Find Type In Workspace"), wxXmlResource::Get()->LoadBitmap(wxT("open_type")), wxT("Find Type In Workspace (Ctrl+Shift+T)")); + tb->AddTool(XRCID("find_symbol"), wxT("Quick Outline"), wxXmlResource::Get()->LoadBitmap(wxT("outline")), wxT("Show Current File Outline (Ctrl+Shift+O)")); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + tb->Realize(); + m_mgr.AddPane(tb, info.Name(wxT("Search Toolbar")).LeftDockable(true).RightDockable(true).Caption(wxT("Search")).ToolbarPane().Top()); + + //---------------------------------------------- + //create the build toolbar + //---------------------------------------------- + tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + + tb->AddTool(XRCID("build_active_project"), wxEmptyString, wxXmlResource::Get()->LoadBitmap(wxT("build_active_project")), wxT("Build Active Project (F7)")); + tb->AddTool(XRCID("stop_active_project_build"), wxEmptyString, wxXmlResource::Get()->LoadBitmap(wxT("stop_build")), wxT("Stop Current Build")); + tb->AddTool(XRCID("clean_active_project"), wxEmptyString, wxXmlResource::Get()->LoadBitmap(wxT("clean")), wxT("Clean Active Project")); + tb->AddSeparator(); + tb->AddTool(XRCID("execute_no_debug"), wxEmptyString, wxXmlResource::Get()->LoadBitmap(wxT("execute")), wxT("Run Active Project (Ctrl+F5)")); + tb->AddTool(XRCID("stop_executed_program"), wxEmptyString, wxXmlResource::Get()->LoadBitmap(wxT("stop_executed_program")), wxT("Stop Running Program")); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + tb->Realize(); + info = wxAuiPaneInfo(); + m_mgr.AddPane(tb, info.Name(wxT("Build Toolbar")).LeftDockable(true).RightDockable(true).Caption(wxT("Build")).ToolbarPane().Top().Row(1)); + + //---------------------------------------------- + //create the debugger toolbar + //---------------------------------------------- + m_debuggerTb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + m_debuggerTb->SetToolBitmapSize(wxSize(24, 24)); + m_debuggerTb->AddTool(XRCID("start_debugger"), wxT("Start / Continue debugger"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_start")), wxT("Start / Continue debugger (F5)")); + m_debuggerTb->AddTool(XRCID("stop_debugger"), wxT("Stop debugger"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_stop")), wxT("Stop debugger")); + m_debuggerTb->AddTool(XRCID("pause_debugger"), wxT("Pause debugger"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_pause")), wxT("Pause debugger")); + m_debuggerTb->AddSeparator(); + m_debuggerTb->AddTool(XRCID("dbg_stepin"), wxT("Step Into"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_stepin")), wxT("Step In")); + m_debuggerTb->AddTool(XRCID("dbg_next"), wxT("Next"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_next")), wxT("Next")); + m_debuggerTb->AddTool(XRCID("dbg_stepout"), wxT("Step Out"), wxXmlResource::Get()->LoadBitmap(wxT("debugger_stepout")), wxT("Step Out")); +#if defined (__WXMAC__) + m_debuggerTb->AddSeparator(); +#endif + m_debuggerTb->Realize(); + info = wxAuiPaneInfo(); + m_mgr.AddPane(m_debuggerTb, info.Name(wxT("Debugger Toolbar")).LeftDockable(true).RightDockable(true).Caption(wxT("Debug")).ToolbarPane().Top().Row(1)); + + RegisterToolbar(XRCID("show_std_toolbar"), wxT("Standard Toolbar")); + RegisterToolbar(XRCID("show_search_toolbar"), wxT("Search Toolbar")); + RegisterToolbar(XRCID("show_build_toolbar"), wxT("Build Toolbar")); + RegisterToolbar(XRCID("show_debug_toolbar"), wxT("Debugger Toolbar")); + RegisterToolbar(XRCID("show_nav_toolbar"), wxT("Navigation Toolbar")); + + //---------------------------------------------- + //create the debugger toolbar + //---------------------------------------------- + tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(800, -1), wxTB_FLAT | wxTB_NODIVIDER); + tb->SetToolBitmapSize(wxSize(24, 24)); + wxArrayString chcs; + wxChoice *cbScope = new wxChoice(tb, wxID_ANY, wxDefaultPosition, wxSize(200, -1), chcs); + tb->AddControl(cbScope); + + wxChoice *cbFunc = new wxChoice(tb, wxID_ANY, wxDefaultPosition, wxSize(600, -1), chcs); + tb->AddControl(cbFunc); +#if defined (__WXMAC__) + tb->AddSeparator(); +#endif + tb->Realize(); + info = wxAuiPaneInfo(); + m_mgr.AddPane(tb, info.Name(wxT("Navigation Toolbar")).LeftDockable(false).RightDockable(false).Caption(wxT("Navigation Toolbar")).ToolbarPane().Top().Row(2)); + m_mainBook = new MainBook(cbFunc, cbScope); +} + +void Frame::OnQuit(wxCommandEvent& WXUNUSED(event)) { + Close(); +} + +void Frame::DispatchCommandEvent(wxCommandEvent &event) { + LEditor* editor = dynamic_cast(GetNotebook()->GetPage(GetNotebook()->GetSelection())); + if ( !editor ) { + return; + } + + if (event.GetId() >= viewAsMenuItemID && event.GetId() <= viewAsMenuItemMaxID) { + //keep the old id as int and override the value set in the event object + //to trick the event system + event.SetInt(event.GetId()); + event.SetId(viewAsMenuItemID); + } + editor->OnMenuCommand(event); +} + +void Frame::DispatchUpdateUIEvent(wxUpdateUIEvent &event) { + if ( GetNotebook()->GetPageCount() == 0 ) { + event.Enable(false); + return; + } + + LEditor* editor = dynamic_cast(GetNotebook()->GetPage(GetNotebook()->GetSelection())); + if ( !editor ) { + event.Enable(false); + return; + } + + if (event.GetId() >= viewAsMenuItemID && event.GetId() <= viewAsMenuItemMaxID) { + //keep the old id as int and override the value set in the event object + //to trick the event system + event.SetInt(event.GetId()); + event.SetId(viewAsMenuItemID); + } + editor->OnUpdateUI(event); +} + +void Frame::OnFileExistUpdateUI(wxUpdateUIEvent &event) { + LEditor* editor = dynamic_cast(GetNotebook()->GetPage(GetNotebook()->GetSelection())); + if ( !editor ) { + event.Enable(false); + } else { + event.Enable(true); + } +} + +void Frame::OnAbout(wxCommandEvent& WXUNUSED(event)) { + wxAboutDialogInfo info; + info.SetName(wxT("CodeLite")); + + wxString svnInfo; + svnInfo << wxT("SVN Build, Revision: ") << _U(SvnRevision); + info.SetVersion(svnInfo); + info.SetDescription(wxT("A lightweight cross-platform IDE for C/C++")); + info.SetCopyright(wxT("(C) 2007 By Eran Ifrah ")); + info.SetWebSite(wxT("http://codelite.sourceforge.net/")); + wxAboutBox(info); +} + +void Frame::OnClose(wxCloseEvent& event) { + // Stop the search thread + ManagerST::Get()->KillProgram(); + ManagerST::Get()->DbgStop(); + SearchThreadST::Get()->StopSearch(); + EditorConfigST::Get()->SavePerspective(wxT("Default"), m_mgr.SavePerspective()); + EditorConfigST::Get()->SaveNotebookStyle(wxT("Editor"), GetNotebook()->GetWindowStyleFlag()); + EditorConfigST::Get()->SaveNotebookStyle(wxT("OutputPane"), m_outputPane->GetNotebook()->GetWindowStyleFlag()); + EditorConfigST::Get()->SaveNotebookStyle(wxT("WorkspacePane"), m_workspacePane->GetNotebook()->GetWindowStyleFlag()); + EditorConfigST::Get()->SaveNotebookStyle(wxT("DebuggerPane"), m_debuggerPane->GetNotebook()->GetWindowStyleFlag()); + EditorConfigST::Get()->SaveLexers(); + + //save general information + m_frameGeneralInfo.SetFrameSize(this->GetSize()); + m_frameGeneralInfo.SetFramePosition(this->GetScreenPosition()); + + SetFrameFlag(IsMaximized(), CL_MAXIMIZE_FRAME); + EditorConfigST::Get()->WriteObject(wxT("GeneralInfo"), &m_frameGeneralInfo); + + //save the 'find and replace' information + if (m_findInFilesDlg) { + EditorConfigST::Get()->WriteObject(wxT("FindInFilesData"), &(m_findInFilesDlg->GetData())); + } + if (LEditor::GetFindReplaceDialog()) { + EditorConfigST::Get()->WriteObject(wxT("FindAndReplaceData"), &(LEditor::GetFindReplaceDialog()->GetData())); + } + + //save the current session before closing + SessionEntry session; + session.SetSelectedTab(GetNotebook()->GetSelection()); + session.SetWorkspaceName(WorkspaceST::Get()->GetWorkspaceFileName().GetFullPath()); + + //loop over the open editors, and get their file name + wxArrayString files; + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)i)); + if (editor) { + files.Add(editor->GetFileName().GetFullPath()); + } + } + + session.SetTabs(files); + SessionManager::Get().Save(wxT("Default"), session); + + //make sure there are no 'unsaved documents' + ManagerST::Get()->CloseAll(); + event.Skip(); +} + +void Frame::LoadSession(const wxString &sessionName) { + SessionEntry session; + if (!SessionManager::Get().FindSession(sessionName, session)) { + return; + } + + //load the workspace first (if any was opened) + wxString wspFile = session.GetWorkspaceName(); + if (wspFile.IsEmpty() == false) { + ManagerST::Get()->OpenWorkspace(wspFile); + } + + //restore notebook tabs + const wxArrayString &files = session.GetTabs(); + for (size_t i=0; iOpenFile(files.Item(i), wxEmptyString); + } + + //set selected tab + int selection = session.GetSelectedTab(); + if (selection >= 0 && selection < GetNotebook()->GetPageCount()) { + GetNotebook()->SetSelection(selection); + } +} + +void Frame::OnSave(wxCommandEvent& WXUNUSED(event)) { + if (!GetNotebook()->GetCurrentPage()) + return; + + LEditor* editor = dynamic_cast(GetNotebook()->GetCurrentPage()); + if ( !editor ) + return; + + // SaveFile contains the logic of "Untiltled" files + editor->SaveFile(); +} + +void Frame::OnSaveAs(wxCommandEvent& WXUNUSED(event)) { + if (!GetNotebook()->GetCurrentPage()) + return; + + LEditor* editor = dynamic_cast(GetNotebook()->GetCurrentPage()); + if ( !editor ) + return; + + editor->SaveFileAs(); +} + +void Frame::OnFileReload(wxCommandEvent &event) { + wxUnusedVar(event); + if (!GetNotebook()->GetCurrentPage()) + return; + + LEditor* editor = dynamic_cast(GetNotebook()->GetCurrentPage()); + if ( !editor ) + return; + + editor->ReloadFile(); +} + +void Frame::OnCloseWorkspace(wxCommandEvent &event) { + wxUnusedVar(event); + if (ManagerST::Get()->IsWorkspaceOpen()) { + ManagerST::Get()->CloseWorkspace(); + GetConfigChoice()->Enable(false); + } +} + +void Frame::OnSwitchWorkspace(wxCommandEvent &event) { + wxUnusedVar(event); + const wxString ALL(wxT("CodeLite Workspace files (*.workspace)|*.workspace|") + wxT("All Files (*)|*")); + wxFileDialog *dlg = new wxFileDialog(this, wxT("Open Workspace"), wxEmptyString, wxEmptyString, ALL, wxOPEN | wxFILE_MUST_EXIST | wxMULTIPLE , wxDefaultPosition); + if (dlg->ShowModal() == wxID_OK) { + ManagerST::Get()->OpenWorkspace(dlg->GetPath()); + } + dlg->Destroy(); +} + +//------------------------------------------------------ +// Complete word, complete a word from the current caret +// position. +// The list of words, is constructed from the database & +// from the local scope +//------------------------------------------------------ +void Frame::OnCompleteWord(wxCommandEvent& WXUNUSED(event)) { + LEditor* editor = dynamic_cast(GetNotebook()->GetCurrentPage()); + if ( !editor ) + return; + + editor->CompleteWord(); +} + +void Frame::OnBuildExternalDatabase(wxCommandEvent& WXUNUSED(event)) { + DoBuildExternalDatabase(); +} + +void Frame::DoBuildExternalDatabase() { + ExtDbData data; + ExtDbWizard *wiz = new ExtDbWizard(this, wxID_ANY); + if (wiz->Run(data)) { + // build the external database + wxFileName dbname(ManagerST::Get()->GetStarupDirectory() + PATH_SEP + data.dbName); + data.dbName = dbname.GetFullPath(); + TagsManagerST::Get()->BuildExternalDatabase(data); + + if (data.attachDb) { + ManagerST::Get()->SetExternalDatabase(dbname); + } + } + wiz->Destroy(); +} + +void Frame::OnCloseExternalDatabase(wxCommandEvent& WXUNUSED(event)) { + ManagerST::Get()->CloseExternalDatabase(); +} + +void Frame::OnUseExternalDatabase(wxCommandEvent& WXUNUSED(event)) { + const wxString ALL( wxT("Tags Database File (*.tags)|*.tags|") + wxT("All Files (*)|*")); + + //set the default current directory to the working directory of + //lite editor + wxFileDialog *dlg = new wxFileDialog(this, + wxT("Select an external database:"), + ManagerST::Get()->GetStarupDirectory(), + wxEmptyString, + ALL, + wxOPEN | wxFILE_MUST_EXIST | wxMULTIPLE , + wxDefaultPosition); + + if (dlg->ShowModal() == wxID_OK) { + // get the path + wxFileName dbname(dlg->GetPath()); + ManagerST::Get()->SetExternalDatabase(dbname); + } + dlg->Destroy(); +} + +// Open new file +void Frame::OnFileNew(wxCommandEvent &event) { + static int fileCounter = 0; + wxUnusedVar(event); + + wxString fileNameStr(wxT("Untitled")); + fileNameStr << ++fileCounter; + wxFileName fileName(fileNameStr); + + GetNotebook()->Freeze(); + //allocate new editor instance using the creator + //this is done due to low performance on GTK + LEditor *editor = EditorCreatorST::Get()->NewInstance(); + editor->SetFileName(fileName); + + GetNotebook()->AddPage(editor, fileName.GetFullName(), true); + GetNotebook()->Thaw(); + editor->Show(true); + editor->SetActive(); +} + +void Frame::OnFileOpen(wxCommandEvent & WXUNUSED(event)) { + const wxString ALL( wxT("All Files (*)|*")); + static wxString s_openPath(wxEmptyString); + + wxFileDialog *dlg = new wxFileDialog(this, wxT("Open File"), s_openPath, wxEmptyString, ALL, wxOPEN | wxFILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition); + if (dlg->ShowModal() == wxID_OK) { + wxArrayString paths; + dlg->GetPaths(paths); + for (size_t i=0; iOpenFile(paths.Item(i), wxEmptyString); + } + + if(paths.GetCount() > 0){ + wxFileName fn(paths.Item(0)); + s_openPath = fn.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR); + } + } + dlg->Destroy(); + GetOpenWindowsPane()->UpdateList(); +} + +void Frame::OnFileClose(wxCommandEvent &event) { + wxUnusedVar( event ); + LEditor* editor = dynamic_cast(GetNotebook()->GetCurrentPage()); + if ( editor ) { + bool veto; + ClosePage(editor, false, GetNotebook()->GetSelection(), true, veto); + } else { + GetNotebook()->DeletePage((size_t) GetNotebook()->GetSelection()); + } + GetOpenWindowsPane()->UpdateList(); +} + +void Frame::OnFileClosing(wxFlatNotebookEvent &event) { + // get the page that is now closing + LEditor* editor = dynamic_cast(GetNotebook()->GetPage(event.GetSelection())); + if ( !editor ) + return; + + bool veto; + ClosePage(editor, true, event.GetSelection(), false, veto); + if ( veto ) { + event.Veto(); + } else { + //update the symbol view + if (!editor->GetProject().IsEmpty()) { + GetWorkspacePane()->DeleteSymbolTree(editor->GetFileName()); + } + } + + //update the titlebar + wxString title(wxT("CodeLite - Revision: ")); + title << _U(SvnRevision); + SetTitle(title); + event.Skip(); +} + +void Frame::OnPageChanged(wxFlatNotebookEvent &event) { + // pass the event to the editor + wxString title(wxT("CodeLite - Revision: ")); + title << _U(SvnRevision); + + LEditor *editor = dynamic_cast( GetNotebook()->GetPage(event.GetSelection()) ); + if ( !editor ) { + SetTitle(title); + return; + } + + //update the symbol view as well in case we are in a workspace context + if (!editor->GetProject().IsEmpty()) { + GetWorkspacePane()->DisplaySymbolTree(editor->GetFileName()); + GetWorkspacePane()->GetFileViewTree()->ExpandToPath(editor->GetProject(), editor->GetFileName()); + } + + title << wxT(" - ") << editor->GetFileName().GetFullPath(); + SetTitle(title); + + editor->SetActive(); + GetOpenWindowsPane()->SyncSelection(); + event.Skip(); +} + +void Frame::OnPageClosed(wxFlatNotebookEvent &event) { + wxUnusedVar(event); + GetOpenWindowsPane()->UpdateList(); +} + +void Frame::OnFileSaveAll(wxCommandEvent &event) { + wxUnusedVar(event); + ManagerST::Get()->SaveAll(); +} + +void Frame::OnCompleteWordUpdateUI(wxUpdateUIEvent &event) { + LEditor* editor = dynamic_cast(GetNotebook()->GetPage(GetNotebook()->GetSelection())); + + // This menu item is enabled only if the current editor + // belongs to a project + event.Enable(editor && !editor->GetProjectName().IsEmpty()); +} + +void Frame::ClosePage(LEditor *editor, bool notify, int index, bool doDelete, bool &veto) { + veto = false; + if ( editor->GetModify() ) { + // prompt user to save file + wxString msg; + msg << wxT("Save changes to '") << editor->GetFileName().GetFullName() << wxT("' ?"); + int answer = wxMessageBox(msg, wxT("Confirm"),wxYES_NO | wxCANCEL); + switch ( answer ) { + case wxYES: { + // try to save the file, if an error occured, return without + // closing the tab + if ( !editor->SaveFile() ) { + //we faild in saving the file, dont allow the tab removal + //process to continue + veto = true; + return; + } else { + if ( doDelete ) { + GetWorkspacePane()->DeleteSymbolTree(editor->GetFileName()); + GetNotebook()->DeletePage(index, notify); + } + } + } + break; + case wxCANCEL: + veto = true; + return; // do nothing + case wxNO: + // just delete the tab without saving the changes + if ( doDelete ) { + GetWorkspacePane()->DeleteSymbolTree(editor->GetFileName()); + GetNotebook()->DeletePage(index, notify); + } + break; + } + } else { + // file is not modified, just remove the tab + if ( doDelete ) { + GetWorkspacePane()->DeleteSymbolTree(editor->GetFileName()); + GetNotebook()->DeletePage(index, notify); + } // if( doDelete ) + } +} + +void Frame::OnSearchThread(wxCommandEvent &event) { + // make sure that the output pane is visible and selection + // is set to the 'Find In Files' tab + ManagerST::Get()->ShowOutputPane(OutputPane::FIND_IN_FILES_WIN); + + m_outputPane->CanFocus(false); + if ( event.GetEventType() == wxEVT_SEARCH_THREAD_MATCHFOUND) { + SearchResultList *res = (SearchResultList*)event.GetClientData(); + SearchResultList::iterator iter = res->begin(); + + wxString msg; + for (; iter != res->end(); iter++) { + msg.Append((*iter).GetMessage() + wxT("\n")); + } + m_outputPane->AppendText(OutputPane::FIND_IN_FILES_WIN, msg); + delete res; + } else if (event.GetEventType() == wxEVT_SEARCH_THREAD_SEARCHCANCELED) { + m_outputPane->AppendText(OutputPane::FIND_IN_FILES_WIN, event.GetString() + wxT("\n")); + } else if (event.GetEventType() == wxEVT_SEARCH_THREAD_SEARCHSTARTED) { + m_outputPane->Clear(); + m_outputPane->AppendText(OutputPane::FIND_IN_FILES_WIN, event.GetString() + wxT("\n")); + } else if (event.GetEventType() == wxEVT_SEARCH_THREAD_SEARCHEND) { + SearchSummary *summary = (SearchSummary*)event.GetClientData(); + m_outputPane->AppendText(OutputPane::FIND_IN_FILES_WIN, summary->GetMessage() + wxT("\n")); + delete summary; + } + m_outputPane->CanFocus(true); +} + +void Frame::OnFindInFiles(wxCommandEvent &event) { + wxUnusedVar(event); + if ( m_findInFilesDlg == NULL ) { + m_findInFilesDlg = new FindInFilesDialog(this, m_data); + m_findInFilesDlg->SetEventOwner(GetEventHandler()); + } + + if ( m_findInFilesDlg->IsShown() ) { + // make sure that dialog has focus and that this instace + m_findInFilesDlg->SetFocus(); + return; + } + + //if we have an open editor, and a selected text, make this text + //the search string + if (GetNotebook()->GetPageCount() > 0) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)GetNotebook()->GetSelection())); + if (editor) { + wxString selText = editor->GetSelectedText(); + if (selText.IsEmpty() == false) { + m_findInFilesDlg->GetData().SetFindString(selText); + } + } + } + m_findInFilesDlg->Show(); +} + +void Frame::OnWorkspaceOpen(wxUpdateUIEvent &event) { + event.Enable(ManagerST::Get()->IsWorkspaceOpen()); +} + +// Project->New Workspace +void Frame::OnProjectNewWorkspace(wxCommandEvent &event) { + wxUnusedVar(event); + NewDlg *dlg = new NewDlg(this, NEW_DLG_WORKSPACE); + dlg->ShowModal(); + dlg->Destroy(); +} + +// Project->New Project +void Frame::OnProjectNewProject(wxCommandEvent &event) { + wxUnusedVar(event); + NewDlg *dlg = new NewDlg(this, NEW_DLG_PROJECT); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnProjectAddProject(wxCommandEvent &event) { + wxUnusedVar(event); + + // Prompt user for project path + const wxString ALL( wxT("CodeLite Projects (*.project)|*.project|") + wxT("All Files (*)|*")); + wxFileDialog *dlg = new wxFileDialog(this, wxT("Open Project"), wxEmptyString, wxEmptyString, ALL, wxOPEN | wxFILE_MUST_EXIST , wxDefaultPosition); + if (dlg->ShowModal() == wxID_OK) { + // Open it + ManagerST::Get()->AddProject(dlg->GetPath()); + } + dlg->Destroy(); +} + +// NewDlg->Create handler +void Frame::OnNewDlgCreate(wxCommandEvent &event) { + wxUnusedVar(event); + + NewDlg *dlg = dynamic_cast(event.GetEventObject()); + if ( dlg ) { + if ( dlg->GetSelection() == NEW_DLG_WORKSPACE ) { + WorkspaceData data = dlg->GetWorksapceData(); + ManagerST::Get()->CreateWorkspace(data.m_name, data.m_path); + } else if ( dlg->GetSelection() == NEW_DLG_PROJECT ) { + ProjectData data = dlg->GetProjectData(); + ManagerST::Get()->CreateProject(data); + } + } +} + +void Frame::OnCtagsOptions(wxCommandEvent &event) { + wxUnusedVar(event); + TagsOptionsDlg *dlg = new TagsOptionsDlg(this, m_tagsOptionsData); + if (dlg->ShowModal() == wxID_OK) { + TagsManager *tagsMgr = TagsManagerST::Get(); + m_tagsOptionsData = dlg->GetData(); + tagsMgr->SetCtagsOptions(m_tagsOptionsData); + EditorConfigST::Get()->WriteObject(wxT("m_tagsOptionsData"), &m_tagsOptionsData); + } + dlg->Destroy(); +} + +void Frame::RegisterToolbar(int menuItemId, const wxString &name) { + m_toolbars[menuItemId] = name; + Connect(menuItemId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(Frame::OnViewToolbar), NULL, this); + Connect(menuItemId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(Frame::OnViewToolbarUI), NULL, this); +} + +void Frame::RegisterDockWindow(int menuItemId, const wxString &name) +{ + m_panes[menuItemId] = name; + Connect(menuItemId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(Frame::OnViewPane), NULL, this); + Connect(menuItemId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(Frame::OnViewPaneUI), NULL, this); +} + +void Frame::OnViewToolbar(wxCommandEvent &event) { + std::map::iterator iter = m_toolbars.find(event.GetId()); + if (iter != m_toolbars.end()) { + ViewPane(iter->second, event); + } +} + +void Frame::OnViewToolbarUI(wxUpdateUIEvent &event) { + std::map::iterator iter = m_toolbars.find(event.GetId()); + if (iter != m_toolbars.end()) { + ViewPaneUI(iter->second, event); + } +} + +void Frame::OnViewPane(wxCommandEvent &event) { + std::map::iterator iter = m_panes.find(event.GetId()); + if (iter != m_panes.end()) { + ViewPane(iter->second, event); + } +} + +void Frame::OnViewPaneUI(wxUpdateUIEvent &event) { + std::map::iterator iter = m_panes.find(event.GetId()); + if (iter != m_panes.end()) { + ViewPaneUI(iter->second, event); + } +} + +void Frame::ViewPane(const wxString &paneName, wxCommandEvent &event) { + wxAuiPaneInfo &info = m_mgr.GetPane(paneName); + if (info.IsOk()) { + if ( event.IsChecked() ) { + info.Show(); + } else { + info.Hide(); + } + m_mgr.Update(); + } + +} + +void Frame::ViewPaneUI(const wxString &paneName, wxUpdateUIEvent &event) { + wxAuiPaneInfo &info = m_mgr.GetPane(paneName); + if (info.IsOk()) { + event.Check(info.IsShown()); + } +} + +void Frame::OnViewOptions(wxCommandEvent & WXUNUSED( event)) { + OptionsDlg *dlg = new OptionsDlg(this); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnConfigurationManager(wxCommandEvent &event) { + wxUnusedVar(event); + ConfigurationManagerDlg *dlg = new ConfigurationManagerDlg(this); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnTogglePanes(wxCommandEvent &event) { + wxUnusedVar(event); + ManagerST::Get()->TogglePanes(); +} + +void Frame::OnAddEnvironmentVariable(wxCommandEvent &event) { + wxUnusedVar(event); + EnvVarsTableDlg *dlg = new EnvVarsTableDlg(this); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnAdvanceSettings(wxCommandEvent &event) { + wxUnusedVar(event); + AdvancedDlg *dlg = new AdvancedDlg(this); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnBuildEvent(wxCommandEvent &event) { + // make sure that the output pane is visible and selection + // is set to the 'Find In Files' tab + m_outputPane->CanFocus(true); + if (event.GetEventType() == wxEVT_BUILD_STARTED) { + ManagerST::Get()->ShowOutputPane(OutputPane::BUILD_WIN); + m_outputPane->Clear(); + m_outputPane->AppendText(OutputPane::BUILD_WIN, BUILD_START_MSG); + } else if (event.GetEventType() == wxEVT_BUILD_ADDLINE) { + m_outputPane->AppendText(OutputPane::BUILD_WIN, event.GetString()); + } else if (event.GetEventType() == wxEVT_BUILD_ENDED) { + m_outputPane->AppendText(OutputPane::BUILD_WIN, BUILD_END_MSG); + + //If the build process was part of a 'Build and Run' command, check whether an erros + //occured during build process, if non, launch the output + if (m_buildInRun) { + m_buildInRun = false; + if (!ManagerST::Get()->IsBuildEndedSuccessfully()) { + //build ended with errors + if (wxMessageBox(wxT("Build ended with errors. Continue?"), wxT("Confirm"), wxYES_NO| wxICON_QUESTION) == wxYES) { + ManagerST::Get()->ExecuteNoDebug(ManagerST::Get()->GetActiveProjectName()); + } + } else { + //no errors, execute! + ManagerST::Get()->ExecuteNoDebug(ManagerST::Get()->GetActiveProjectName()); + } + } else if (m_rebuild) { + //are we rebuilding? + m_rebuild = false; + ManagerST::Get()->BuildProject(ManagerST::Get()->GetActiveProjectName()); + } + } +} + +void Frame::OnOutputWindowEvent(wxCommandEvent &event) { + // make sure that the output pane is visible and selection + // is set to the 'Find In Files' tab + m_outputPane->CanFocus(true); + ManagerST::Get()->ShowOutputPane(OutputPane::OUTPUT_WIN); + if (event.GetEventType() == wxEVT_ASYNC_PROC_STARTED) { + m_outputPane->Clear(); + m_outputPane->AppendText(OutputPane::OUTPUT_WIN, event.GetString()); + } else if (event.GetEventType() == wxEVT_ASYNC_PROC_ADDLINE) { + m_outputPane->AppendText(OutputPane::OUTPUT_WIN, event.GetString()); + } else if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + m_outputPane->AppendText(OutputPane::OUTPUT_WIN, event.GetString()); + } +} + +// Build operations +void Frame::OnBuildProject(wxCommandEvent &event) { + wxUnusedVar(event); + bool enable = !ManagerST::Get()->IsBuildInProgress() && !ManagerST::Get()->GetActiveProjectName().IsEmpty(); + if (enable) { + ManagerST::Get()->BuildProject(ManagerST::Get()->GetActiveProjectName()); + } +} + +void Frame::OnBuildAndRunProject(wxCommandEvent &event) { + wxUnusedVar(event); + bool enable = !ManagerST::Get()->IsBuildInProgress() && !ManagerST::Get()->GetActiveProjectName().IsEmpty(); + if (enable) { + m_buildInRun = true; + ManagerST::Get()->BuildProject(ManagerST::Get()->GetActiveProjectName()); + } +} + +void Frame::OnRebuildProject(wxCommandEvent &event) { + wxUnusedVar(event); + bool enable = !ManagerST::Get()->IsBuildInProgress() && !ManagerST::Get()->GetActiveProjectName().IsEmpty(); + if (enable) { + m_rebuild = true; + ManagerST::Get()->CleanProject(ManagerST::Get()->GetActiveProjectName()); + } +} + +void Frame::OnBuildProjectUI(wxUpdateUIEvent &event) { + bool enable = !ManagerST::Get()->IsBuildInProgress() && !ManagerST::Get()->GetActiveProjectName().IsEmpty(); + event.Enable(enable); +} + +void Frame::OnStopExecutedProgramUI(wxUpdateUIEvent &event) { + Manager *mgr = ManagerST::Get(); + bool enable = mgr->IsProgramRunning(); + event.Enable(enable); +} + +void Frame::OnStopBuildUI(wxUpdateUIEvent &event) { + Manager *mgr = ManagerST::Get(); + bool enable = mgr->IsBuildInProgress(); + event.Enable(enable); +} + +void Frame::OnStopBuild(wxCommandEvent &event) { + wxUnusedVar(event); + Manager *mgr = ManagerST::Get(); + if (mgr->IsBuildInProgress()) { + mgr->StopBuild(); + } +} + +void Frame::OnStopExecutedProgram(wxCommandEvent &event) { + wxUnusedVar(event); + Manager *mgr = ManagerST::Get(); + if (mgr->IsProgramRunning()) { + mgr->KillProgram(); + } +} + +void Frame::OnCleanProject(wxCommandEvent &event) { + wxUnusedVar(event); + ManagerST::Get()->CleanProject(ManagerST::Get()->GetActiveProjectName()); +} + +void Frame::OnCleanProjectUI(wxUpdateUIEvent &event) { + bool enable = !ManagerST::Get()->IsBuildInProgress() && !ManagerST::Get()->GetActiveProjectName().IsEmpty(); + event.Enable(enable); +} + +void Frame::OnExecuteNoDebug(wxCommandEvent &event) { + wxUnusedVar(event); + wxString projectName; + + projectName = ManagerST::Get()->GetActiveProjectName(); + if (projectName.IsEmpty() == false) { + ManagerST::Get()->ExecuteNoDebug(ManagerST::Get()->GetActiveProjectName()); + } +} + +void Frame::OnExecuteNoDebugUI(wxUpdateUIEvent &event) { + event.Enable(ManagerST::Get()->GetActiveProjectName().IsEmpty() == false + && + !ManagerST::Get()->IsBuildInProgress() + && + !ManagerST::Get()->IsProgramRunning()); +} + +void Frame::OnWorkspaceConfigChanged(wxCommandEvent &event) { + wxString selectionStr = event.GetString(); + //update the workspace configuration file + ManagerST::Get()->SetWorkspaceConfigurationName(selectionStr); +} + +void Frame::OnTimer(wxTimerEvent &event) { + static bool first(true); + //Attach external database symbol + if (first) { + first = false; + + if (m_tagsOptionsData.GetFlags() & CC_LOAD_EXT_DB) { + //load the recently opened external database + wxString tagDb = EditorConfigST::Get()->GetTagsDatabase(); + if (tagDb.IsEmpty() == false) { + wxFileName dbname(tagDb); + + //as part of the change from the .db to .tags, rename the entry in the + //configuratin file as well + if (dbname.GetExt() == wxT("db")) { + dbname.SetExt(wxT("tags")); + EditorConfigST::Get()->SetTagsDatabase(dbname.GetFullPath()); + } + + //if the database will be loaded to memory, display a busy dialog + ManagerST::Get()->SetExternalDatabase(dbname); + } + AutoLoadExternalDb(); + } + //send initialization end event + SendCmdEvent(wxEVT_INIT_DONE); + } + + //clear navigation queue + if (GetNotebook()->GetPageCount() == 0) { + NavMgr::Get()->Clear(); + } + event.Skip(); +} + +void Frame::OnFileCloseAll(wxCommandEvent &event) { + wxUnusedVar(event); + ManagerST::Get()->CloseAll(); + + //update the title bar + wxString title(wxT("CodeLite - Revision: ")); + title << _U(SvnRevision); + SetTitle(title); + + GetMainBook()->Clear(); + GetOpenWindowsPane()->UpdateList(); +} + +void Frame::OnQuickOutline(wxCommandEvent &event) { + wxUnusedVar(event); + if (ManagerST::Get()->IsWorkspaceOpen() == false) + return; + + if (!ManagerST::Get()->GetActiveEditor()) + return; + + if (ManagerST::Get()->GetActiveEditor()->GetProject().IsEmpty()) + return; + + QuickOutlineDlg *dlg = new QuickOutlineDlg(this, ManagerST::Get()->GetActiveEditor()->GetFileName().GetFullPath()); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnFindType(wxCommandEvent &event) { + wxUnusedVar(event); + if (ManagerST::Get()->IsWorkspaceOpen() == false) + return; + + OpenTypeDlg *dlg = new OpenTypeDlg(this, TagsManagerST::Get()); + if (dlg->ShowModal() == wxID_OK) { + TagEntryPtr tag = dlg->GetSelectedTag(); + if (tag && tag->IsOk()) { + wxString projectName = ManagerST::Get()->GetProjectNameByFile(tag->GetFile()); + ManagerST::Get()->OpenFile(tag->GetFile(), projectName, tag->GetLine()-1); + } + } + dlg->Destroy(); +} + +void Frame::OnFindResource(wxCommandEvent &event) { + wxUnusedVar(event); + if (ManagerST::Get()->IsWorkspaceOpen() == false) + return; + + OpenResourceDlg *dlg = new OpenResourceDlg(this); + if (dlg->ShowModal() == wxID_OK) { + wxString fileName = dlg->GetFileName(); + if (fileName.IsEmpty() == false) { + wxString projectName = ManagerST::Get()->GetProjectNameByFile(fileName); + ManagerST::Get()->OpenFile(fileName, projectName); + } + } + dlg->Destroy(); +} + +void Frame::OnImportMakefileUI(wxUpdateUIEvent &event) { + event.Enable(false); +} + +void Frame::OnImportMakefile(wxCommandEvent &event) { + wxUnusedVar(event); + const wxString ALL(wxT("Import makefile files (Makefile) |Makefile|") + wxT("All Files (*)|*")); + wxFileDialog *dlg = new wxFileDialog(this, wxT("Open Makefile"), wxEmptyString, wxEmptyString, ALL, wxOPEN | wxFILE_MUST_EXIST | wxMULTIPLE , wxDefaultPosition); + if (dlg->ShowModal() == wxID_OK) { + ManagerST::Get()->ImportFromMakefile(dlg->GetPath()); + } + dlg->Destroy(); +} + +void Frame::OnAddSymbols(SymbolTreeEvent &event) { + SymbolTree *tree = GetWorkspacePane()->GetSymbolTree(); + if (tree) + tree->AddSymbols(event); +} + +void Frame::OnDeleteSymbols(SymbolTreeEvent &event) { + SymbolTree *tree = GetWorkspacePane()->GetSymbolTree(); + if (tree) + tree->DeleteSymbols(event); +} + +void Frame::OnUpdateSymbols(SymbolTreeEvent &event) { + SymbolTree *tree = GetWorkspacePane()->GetSymbolTree(); + if (tree) + tree->UpdateSymbols(event); +} + +wxString Frame::CreateWorkspaceTable() { + wxString html; + wxArrayString files; + Manager *mgr = ManagerST::Get(); + mgr->GetRecentlyOpenedWorkspaces(files); + + wxColour bgclr = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + bgclr = wxFNBRenderer::LightColour(bgclr, 70); + + html << wxT(""); + if (files.GetCount() == 0) { + html << wxT(""); + } else { + for (size_t i=0; i"); + } + } + html << wxT("
"); + html << wxT("No workspaces found.") << wxT("
"); + html << wxT("") << files.Item(i) << wxT("
"); + return html; +} + +wxString Frame::CreateFilesTable() { + wxString html; + wxArrayString files; + Manager *mgr = ManagerST::Get(); + mgr->GetRecentlyOpenedFiles(files); + + wxColour bgclr = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + bgclr = wxFNBRenderer::LightColour(bgclr, 70); + html << wxT(""); + if (files.GetCount() == 0) { + html << wxT(""); + } else { + for (size_t i=0; i"); + } + } + html << wxT("
"); + html << wxT("No files found.") << wxT("
"); + html << wxT("") << files.Item(i) << wxT("
"); + return html; +} + +void Frame::CreateRecentlyOpenedFilesMenu() { + wxArrayString files; + Manager *mgr = ManagerST::Get(); + FileHistory &hs = mgr->GetRecentlyOpenedFilesClass(); + mgr->GetRecentlyOpenedFiles(files); + + int idx = GetMenuBar()->FindMenu(wxT("File")); + if (idx != wxNOT_FOUND) { + wxMenu *menu = GetMenuBar()->GetMenu(idx); + wxMenu *submenu = NULL; + wxMenuItem *item = menu->FindItem(XRCID("recent_files")); + if (item) { + submenu = item->GetSubMenu(); + } + + if (submenu) { + for (size_t i=0; iGetRecentlyOpenedWorkspacesClass(); + mgr->GetRecentlyOpenedWorkspaces(files); + + int idx = GetMenuBar()->FindMenu(wxT("File")); + if (idx != wxNOT_FOUND) { + wxMenu *menu = GetMenuBar()->GetMenu(idx); + wxMenu *submenu = NULL; + wxMenuItem *item = menu->FindItem(XRCID("recent_workspaces")); + if (item) { + submenu = item->GetSubMenu(); + } + + if (submenu) { + for (size_t i=0; iGetRecentlyOpenedFilesClass(); + + wxArrayString files; + fh.GetFiles(files); + + if (idx < files.GetCount()) { + wxString projectName = mgr->GetProjectNameByFile(files.Item(idx)); + mgr->OpenFile(files.Item(idx), projectName); + } +} + +void Frame::OnRecentWorkspace(wxCommandEvent &event) { + size_t idx = event.GetId() - (RecentWorkspaceSubMenuID+1); + Manager *mgr = ManagerST::Get(); + FileHistory &fh = mgr->GetRecentlyOpenedWorkspacesClass(); + + wxArrayString files; + fh.GetFiles(files); + + if (idx < files.GetCount()) { + mgr->OpenWorkspace(files.Item(idx)); + } +} + +void Frame::OnBackwardForward(wxCommandEvent &event) { + switch (event.GetId()) { + case wxID_FORWARD: { + BrowseRecord rec = NavMgr::Get()->Next(); + ManagerST::Get()->OpenFile(rec); + } + break; + case wxID_BACKWARD: { + BrowseRecord rec = NavMgr::Get()->Prev(); + ManagerST::Get()->OpenFile(rec); + } + break; + default: + break; + } +} + +void Frame::OnBackwardForwardUI(wxUpdateUIEvent &event) { + if (event.GetId() == wxID_FORWARD) { + event.Enable(NavMgr::Get()->CanNext()); + } else if (event.GetId() == wxID_BACKWARD) { + event.Enable(NavMgr::Get()->CanPrev()); + } else { + event.Skip(); + } +} + +void Frame::OnFixDatabasePaths(wxCommandEvent &event) { + wxUnusedVar(event); + const wxString ALL( wxT("Tags Database File (*.tags)|*.tags|") + wxT("All Files (*)|*")); + + wxFileDialog *fdlg = new wxFileDialog(this, + wxT("Select an external database:"), + ManagerST::Get()->GetStarupDirectory(), + wxEmptyString, + ALL, + wxOPEN | wxFILE_MUST_EXIST, + wxDefaultPosition); + + if (fdlg->ShowModal() == wxID_OK) { + // get the path + wxFileName dbname(fdlg->GetPath()); + TagsDatabase db; + db.OpenDatabase(dbname); + + KeyValueTableDlg *dlg = new KeyValueTableDlg(this, &db); + dlg->ShowModal(); + + //notify tags manager to reload the file paths from the database + TagsManagerST::Get()->ReloadExtDbPaths(); + + dlg->Destroy(); + } + fdlg->Destroy(); +} + +void Frame::OnFixDatabasePathsUI(wxUpdateUIEvent &event) { + event.Enable(true); +} + +void Frame::CreateWelcomePage() { + Manager *mgr = ManagerST::Get(); + //load the template + wxFileName fn(mgr->GetStarupDirectory(), wxT("index.html")); + wxFFile file(fn.GetFullPath(), wxT("r")); + if (!file.IsOpened()) { + return; + } + m_welcomePage = new wxHtmlWindow(GetNotebook(), wxID_ANY); + + wxString content; + file.ReadAll(&content); + file.Close(); + + //replace $(InstallPath) + content.Replace(wxT("$(InstallPath)"), mgr->GetStarupDirectory()); + + //replace the $(FilesTable) & $(WorkspaceTable) + wxString workspaceTable = CreateWorkspaceTable(); + wxString filesTable = CreateFilesTable(); + + content.Replace(wxT("$(WorkspaceTable)"), workspaceTable); + content.Replace(wxT("$(FilesTable)"), filesTable); + + m_welcomePage->SetPage(content); + GetNotebook()->AddPage(m_welcomePage, wxT("Welcome"), true, 0); +} + +void Frame::OnImportMSVS(wxCommandEvent &e) { + wxUnusedVar(e); + const wxString ALL(wxT("MS Visual Studio Solution File (*.sln)|*.sln|") + wxT("All Files (*)|*")); + wxFileDialog *dlg = new wxFileDialog(this, wxT("Open MS Solution File"), wxEmptyString, wxEmptyString, ALL, wxOPEN | wxFILE_MUST_EXIST, wxDefaultPosition); + if (dlg->ShowModal() == wxID_OK) { + ManagerST::Get()->ImportMSVSSolution(dlg->GetPath()); + } + dlg->Destroy(); +} + +void Frame::OnDebug(wxCommandEvent &e) { + wxUnusedVar(e); + Manager *mgr = ManagerST::Get(); + if(mgr->IsWorkspaceOpen()){ + mgr->DbgStart(); + } +} + +void Frame::OnDebugUI(wxUpdateUIEvent &e) { + e.Enable(true); +} + +void Frame::OnDebugStop(wxCommandEvent &e) { + wxUnusedVar(e); + ManagerST::Get()->DbgStop(); +} + +void Frame::OnDebugStopUI(wxUpdateUIEvent &e) { + e.Enable(DebuggerMgr::Get().GetActiveDebugger() && DebuggerMgr::Get().GetActiveDebugger()->IsRunning()); +} + +void Frame::OnDebugManageBreakpointsUI(wxUpdateUIEvent &e) { + e.Enable(true); +} + +void Frame::OnDebugCmd(wxCommandEvent &e) { + int cmd(wxNOT_FOUND); + if (e.GetId() == XRCID("pause_debugger")) { + cmd = DBG_PAUSE; + } else if (e.GetId() == XRCID("dbg_stepin")) { + cmd = DBG_STEPIN; + } else if (e.GetId() == XRCID("dbg_stepout")) { + cmd = DBG_STEPOUT; + } else if (e.GetId() == XRCID("dbg_next")) { + cmd = DBG_NEXT; + } + + if (cmd != wxNOT_FOUND) { + ManagerST::Get()->DbgDoSimpleCommand(cmd); + } +} + +void Frame::OnDebugCmdUI(wxUpdateUIEvent &e) { + if (e.GetId() == XRCID("pause_debugger") || + e.GetId() == XRCID("dbg_stepin") || + e.GetId() == XRCID("dbg_stepout") || + e.GetId() == XRCID("dbg_next") ) { + e.Enable(DebuggerMgr::Get().GetActiveDebugger() && DebuggerMgr::Get().GetActiveDebugger()->IsRunning()); + } +} + +void Frame::OnDebuggerSettings(wxCommandEvent &e) { + wxUnusedVar(e); + DebuggerSettingsDlg *dlg = new DebuggerSettingsDlg(this); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Frame::OnIdle(wxIdleEvent &e) { + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + dbgr->Poke(); + e.RequestMore(); + } +} + +void Frame::OnNextBuildError(wxCommandEvent &event) { + GetOutputPane()->ProcessEvent(event); +} + +void Frame::OnNextBuildErrorUI(wxUpdateUIEvent &event) { + bool isShown(false); + wxAuiPaneInfo &info = m_mgr.GetPane(wxT("Output")); + if (info.IsOk()) { + isShown = info.IsShown(); + } + event.Enable(ManagerST::Get()->IsWorkspaceOpen() && isShown); +} + +void Frame::OnLinkClicked(wxHtmlLinkEvent &e) { + wxHtmlLinkInfo info = e.GetLinkInfo(); + wxString action = info.GetHref(); + + if (action.StartsWith(wxT("action:"))) { + action = action.AfterFirst(wxT(':')); + wxString command = action.BeforeFirst(wxT(':')); + if (command == wxT("open-file")) { + //Open file + wxString fileName = action.AfterFirst(wxT(':')); + wxFileName fn(fileName); + if (fn.GetExt() == wxT("workspace")) { + //workspace file + ManagerST::Get()->OpenWorkspace(fileName); + } else { + //other file + ManagerST::Get()->OpenFile(fileName, wxEmptyString); + } + } else if (command == wxT("create-workspace")) { + //Create workspace + wxCommandEvent dummy; + OnProjectNewWorkspace(e); + + } else if (command == wxT("import-msvs-solution")) { + //Import microsoft visual studio solution + wxCommandEvent dummy; + OnImportMSVS(e); + + } else if (command == wxT("open-workspace")) { + wxCommandEvent dummy; + OnSwitchWorkspace(e); + } + } else { + //do the default, which is open the link in the default + //browser + wxLaunchDefaultBrowser(info.GetHref()); + } +} + +void Frame::OnLoadLastSessionUI(wxUpdateUIEvent &event) { + event.Check(m_frameGeneralInfo.GetFlags() & CL_LOAD_LAST_SESSION); +} + +void Frame::SetFrameFlag(bool set, int flag){ + if(set){ + m_frameGeneralInfo.SetFlags(m_frameGeneralInfo.GetFlags() | flag); + }else{ + m_frameGeneralInfo.SetFlags(m_frameGeneralInfo.GetFlags() & ~(flag)); + } +} + +void Frame::OnLoadLastSession(wxCommandEvent &event) { + SetFrameFlag(event.IsChecked(), CL_LOAD_LAST_SESSION); +} + +void Frame::OnShowWelcomePageUI(wxUpdateUIEvent &event){ + for (int i=0; iGetPageCount(); i++) { + if (GetNotebook()->GetPage((size_t)i) == m_welcomePage) { + event.Enable(false); + return; + } + } + event.Enable(true); +} + +void Frame::OnShowWelcomePage(wxCommandEvent &event) { + //check if the welcome page is not 'on' + for (int i=0; iGetPageCount(); i++) { + if (GetNotebook()->GetPage((size_t)i) == m_welcomePage) { + GetNotebook()->SetSelection((size_t)i); + return; + } + } + CreateWelcomePage(); +} + +void Frame::LoadPlugins() { + PluginManager::Get()->Load(); + + //after the plugin are loaded, it is time to load the saved + //perspective + wxString pers = EditorConfigST::Get()->LoadPerspective(wxT("Default")); + if ( pers.IsEmpty() == false && EditorConfigST::Get()->GetRevision() == _U(SvnRevision)) { + m_mgr.LoadPerspective(pers); + } else { + EditorConfigST::Get()->SetRevision(_U(SvnRevision)); + } +} + +void Frame::OnAppActivated(wxActivateEvent &e) { + if (!m_theFrame || e.GetActive() == false) { + e.Skip(); + return; + } + + //check if the welcome page is not 'on' + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)i)); + if (editor) { + //test to see if the file was modified + time_t diskTime = GetFileModificationTime(editor->GetFileName().GetFullPath()); + time_t editTime = editor->GetEditorLastModifiedTime(); + if (diskTime > editTime) { + //set the editor time to match the disk time + editor->SetEditorLastModifiedTime(diskTime); + + wxString msg; + msg << wxT("The File '"); + msg << editor->GetFileName().GetFullName(); + msg << wxT("' was modified\n"); + msg << wxT("outside of the editor, would you like to reload it?"); + if (wxMessageBox(msg, wxT("Confirm"), wxYES_NO | wxCANCEL | wxICON_QUESTION) == wxYES) { + editor->ReloadFile(); + } + } + } + } + e.Skip(); +} + +void Frame::UpgradeExternalDbExt() { + wxString fileSpec( wxT( "*.db" ) ); + wxArrayString files; + wxDir::GetAllFiles( ManagerST::Get()->GetStarupDirectory(), &files, fileSpec, wxDIR_FILES ); + for ( size_t i=0; iGetTagsDatabase(); + if (tagDb.IsEmpty()) { + + //fetch list of files + wxDir::GetAllFiles( ManagerST::Get()->GetStarupDirectory(), &files, fileSpec, wxDIR_FILES ); + if (files.GetCount() == 1) { + wxString dbname = files.Item(0); + + //Only one database was found, attach it + EditorConfigST::Get()->SetTagsDatabase(dbname); + ManagerST::Get()->SetExternalDatabase(wxFileName(dbname)); + + } else if (files.GetCount() > 1) { + + wxString message; + message << wxT("CodeLite detected that there is no external symbols database attached.\n"); + message << wxT("However, several databases were found, would you like to attach one now?\n"); + message << wxT("(attaching external symbols database improves CodeCompletion significantly)"); + + if (wxMessageBox(message, wxT("Attach symbols database"), wxICON_QUESTION | wxYES_NO | wxCANCEL) == wxYES) { + wxString dbname = wxGetSingleChoice(wxT("Select extenal database symbols to attach:"), wxT("Select symbols database"), files); + if (dbname.IsEmpty() == false) { + EditorConfigST::Get()->SetTagsDatabase(dbname); + ManagerST::Get()->SetExternalDatabase(wxFileName(dbname)); + } + } + } else { + + //no databases were found at all. + //suggest user to create one + wxString message; + message << wxT("CodeLite detected that there is no external symbols database attached,\n"); + message << wxT("nor it can not find any. Would you like to create one?\n"); + message << wxT("(attaching external symbols database improves CodeCompletion significantly)"); + if (wxMessageBox(message, wxT("Create symbols database"), wxICON_QUESTION | wxYES_NO | wxCANCEL) == wxYES) { + DoBuildExternalDatabase(); + } + } + } +} + +void Frame::OnCompileFile(wxCommandEvent &e) { + wxUnusedVar(e); + Manager *mgr = ManagerST::Get(); + if (mgr->IsWorkspaceOpen() && !mgr->IsBuildInProgress()) { + //get the current active docuemnt + int curpage = GetNotebook()->GetSelection(); + if (curpage != wxNOT_FOUND) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)curpage)); + if (editor && editor->GetProject().IsEmpty() == false) { + mgr->CompileFile(editor->GetProject(), editor->GetFileName().GetFullPath()); + } + } + } +} + +void Frame::OnCompileFileUI(wxUpdateUIEvent &e) { + Manager *mgr = ManagerST::Get(); + if (mgr->IsWorkspaceOpen() && !mgr->IsBuildInProgress()) { + //get the current active docuemnt + int curpage = GetNotebook()->GetSelection(); + if (curpage != wxNOT_FOUND) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)curpage)); + if (editor && editor->GetProject().IsEmpty() == false) { + e.Enable(true); + return; + } + } + } + e.Enable(false); +} + +void Frame::OnDebugAttach(wxCommandEvent &event) +{ + wxUnusedVar(event); + //Start the debugger + Manager *mgr = ManagerST::Get(); + mgr->DbgStart(1); +} + +void Frame::OnCloseAllButThis(wxCommandEvent &e) +{ + wxUnusedVar(e); + //Start the debugger + Manager *mgr = ManagerST::Get(); + + int sel = GetNotebook()->GetSelection(); + if(sel != wxNOT_FOUND){ + mgr->CloseAllButThis(GetNotebook()->GetPage((size_t)sel)); + } +} + +OpenWindowsPanel *Frame::GetOpenWindowsPane(){ + return GetWorkspacePane()->GetOpenedWindows(); +} + +FileExplorer *Frame::GetFileExplorer(){ + return GetWorkspacePane()->GetFileExplorer(); +} + +void Frame::OnLoadWelcomePage(wxCommandEvent &event){ + SetFrameFlag(event.IsChecked(), CL_SHOW_WELCOME_PAGE); +} + +void Frame::OnLoadWelcomePageUI(wxUpdateUIEvent &event){ + event.Check(m_frameGeneralInfo.GetFlags() & CL_SHOW_WELCOME_PAGE ? true : false); +} + +wxComboBox *Frame::GetConfigChoice() +{ + return GetWorkspacePane()->GetConfigCombBox(); +} + +void Frame::OnFileCloseUI(wxUpdateUIEvent &event) +{ + event.Enable(GetNotebook()->GetPageCount() > 0 ? true : false); +} + +void Frame::OnViewEolCR(wxCommandEvent &e) +{ + size_t flags = m_frameGeneralInfo.GetFlags(); + flags &= ~(CL_USE_EOL_CR); + flags &= ~(CL_USE_EOL_LF); + flags &= ~(CL_USE_EOL_CRLF); + m_frameGeneralInfo.SetFlags(flags | CL_USE_EOL_CR); +} + +void Frame::OnViewEolLF(wxCommandEvent &e) +{ + size_t flags = m_frameGeneralInfo.GetFlags(); + flags &= ~(CL_USE_EOL_CR); + flags &= ~(CL_USE_EOL_LF); + flags &= ~(CL_USE_EOL_CRLF); + m_frameGeneralInfo.SetFlags(flags | CL_USE_EOL_LF); +} + +void Frame::OnViewEolCRLF(wxCommandEvent &e) +{ + size_t flags = m_frameGeneralInfo.GetFlags(); + flags &= ~(CL_USE_EOL_CR); + flags &= ~(CL_USE_EOL_LF); + flags &= ~(CL_USE_EOL_CRLF); + m_frameGeneralInfo.SetFlags(flags | CL_USE_EOL_CRLF); +} + +void Frame::OnViewEolUI(wxUpdateUIEvent &e) +{ + LEditor *editor = ManagerST::Get()->GetActiveEditor(); + e.Enable(editor ? true : false); +} + +void Frame::OnConvertEol(wxCommandEvent &e) +{ + LEditor *editor = ManagerST::Get()->GetActiveEditor(); + if(editor){ + size_t flags = m_frameGeneralInfo.GetFlags(); + int eolMode (wxSCI_EOL_LF); //default it to unix + if (flags & CL_USE_EOL_CR) { + eolMode = wxSCI_EOL_CR; + } else if(flags & CL_USE_EOL_CRLF) { + eolMode = wxSCI_EOL_CRLF; + } + + editor->ConvertEOLs(eolMode); + //editor->Colourise(0, wxSCI_INVALID_POSITION); + } +} + +void Frame::OnConvertEolUI(wxUpdateUIEvent &e) +{ + LEditor *editor = ManagerST::Get()->GetActiveEditor(); + e.Enable(editor ? true : false); +} + +void Frame::OnViewEolCRLF_UI(wxUpdateUIEvent &e) +{ + e.Check(m_frameGeneralInfo.GetFlags() & CL_USE_EOL_CRLF ? true : false); +} + +void Frame::OnViewEolCR_UI(wxUpdateUIEvent &e) +{ + e.Check(m_frameGeneralInfo.GetFlags() & CL_USE_EOL_CR ? true : false); +} + +void Frame::OnViewEolLF_UI(wxUpdateUIEvent &e) +{ + e.Check(m_frameGeneralInfo.GetFlags() & CL_USE_EOL_LF ? true : false); +} + +void Frame::OnViewDisplayEOL(wxCommandEvent &e) +{ + bool visible; + size_t frame_flags = m_frameGeneralInfo.GetFlags(); + if(e.IsChecked()){ + frame_flags |= CL_SHOW_EOL; + visible = true; + } else { + frame_flags &= ~CL_SHOW_EOL; + visible = false; + } + + m_frameGeneralInfo.SetFlags(frame_flags); + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(GetNotebook()->GetPage((size_t)i)); + if (editor) { + editor->SetViewEOL(visible); + } + } +} + +void Frame::OnViewDisplayEOL_UI(wxUpdateUIEvent &e) +{ + LEditor *editor = ManagerST::Get()->GetActiveEditor(); + bool hasEditor = editor ? true : false; + if(!hasEditor){ + e.Enable(false); + return; + } + + e.Enable(true); + e.Check(m_frameGeneralInfo.GetFlags() & CL_SHOW_EOL ? true : false); +} + diff --git a/LiteEditor/frame.h b/LiteEditor/frame.h new file mode 100644 index 0000000000..6550e7809d --- /dev/null +++ b/LiteEditor/frame.h @@ -0,0 +1,319 @@ +#ifndef LITEEDITOR_FRAME_H +#define LITEEDITOR_FRAME_H + +#include "wx/combobox.h" +#include "generalinfo.h" +#include +#include +#include "wx/aui/aui.h" +#include "wx/frame.h" +#include "findinfilesdlg.h" +#include "editor.h" +#include "output_pane.h" +#include "findinfilesdlg.h" +#include "cl_process.h" +#include "envvar_table.h" +#include "wx/choice.h" +#include "wx/timer.h" +#include "parse_thread.h" +#include "tags_options_dlg.h" +#include +#include "debuggerpane.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "mainbook.h" + +// forward decls +class TagEntry; +class WorkspacePane; +class wxToolBar; +class wxFlatNotebook; +class OpenWindowsPanel; +class FileExplorer; + +/** + * The main frame class + * \author Eran Ifrah + */ +class Frame : public wxFrame +{ + wxFlatNotebook *m_book; + wxFlatNotebookImageList m_il; + MainBook *m_mainBook; + + static Frame* m_theFrame; + wxAuiManager m_mgr; + OutputPane *m_outputPane; + FindInFilesDialog *m_findInFilesDlg; + FindReplaceData m_data; + WorkspacePane *m_workspacePane; + wxArrayString m_files; + wxTimer *m_timer; + std::map m_viewAsMap; + wxMenu *m_tabRightClickMenu; + TagsOptionsData m_tagsOptionsData; + wxHtmlWindow *m_welcomePage; + DebuggerPane *m_debuggerPane; + wxToolBar *m_debuggerTb; + bool m_buildInRun; + bool m_rebuild; + GeneralInfo m_frameGeneralInfo; + std::map m_toolbars;//< map between toolbars and their resource ID + std::map m_panes;//< map between panes and their name + +public: + // the access method to the singleton frame is by using the Get method + static Frame* Get(); + virtual ~Frame(void); + + void SetFrameFlag(bool set, int flag); + + /** + * Return language name by menu item id + */ + wxString GetViewAsLanguageById(int id) const; + + /** + * Return the main editor notebook + */ + wxFlatNotebook *GetNotebook() { return m_book; } + MainBook* GetMainBook() const {return m_mainBook;} + + /** + * Close the current file + */ + void CloseActiveFile(); + + /** + * \return the output pane (the bottom pane) + */ + OutputPane *GetOutputPane() { return m_outputPane; } + + /** + * return the debugger pane + * \return + */ + DebuggerPane *GetDebuggerPane(){return m_debuggerPane;} + + /** + * \return the workspace pane (the one that contained the Symbol view & class view) + */ + WorkspacePane *GetWorkspacePane() { return m_workspacePane; } + + /** + * return the file explorer pane + */ + FileExplorer *GetFileExplorer(); + + /** + * \brief return the open windows list pane pointer + */ + OpenWindowsPanel *GetOpenWindowsPane(); + + /** + * \return return AUI docking manager + */ + wxAuiManager& GetDockingManager() { return m_mgr; } + + /** + * return the find in files dialog pointer + */ + FindInFilesDialog *GetFindInFilesDlg(){return m_findInFilesDlg;} + + /** + * Return the debugger toolbar + */ + wxToolBar *GetDebuggerToolbar(){return m_debuggerTb;} + + /** + * close editor's page + * \param editor the notebook parent of the page + * \param notify send notebook page closure event + * \param index page index in the notebook + * \param doDelete delete the page from the notebook as well + * \param veto [output] set to true to veto the page closer + */ + void ClosePage(LEditor *editor, bool notify, int index, bool doDelete, bool &veto); + + /** + * Load session into LE + */ + void LoadSession(const wxString &sessionName); + + /** + * load all available plugins + */ + void LoadPlugins(); + + void RegisterToolbar(int menuItemId, const wxString &name); + void RegisterDockWindow(int menuItemId, const wxString &name); + + wxComboBox *GetConfigChoice(); + const GeneralInfo& GetFrameGeneralInfo() const {return m_frameGeneralInfo;} + +private: + // make our frame's constructor private + Frame(wxWindow *pParent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style = wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxSYSTEM_MENU | wxRESIZE_BORDER | wxCLIP_CHILDREN); + wxString CreateWorkspaceTable(); + wxString CreateFilesTable(); + +private: + /** + * Construct all the GUI controls of the main frame. this function is called + * at construction time + */ + void CreateGUIControls(void); + /** + * Helper function that prompt user with a simple wxTextEntry dialog + * \param msg message to display to user + * \return user's string or wxEmptyString if 'Cancel' pressed. + */ + void DispatchCommandEvent(wxCommandEvent &event); + void DispatchUpdateUIEvent(wxUpdateUIEvent &event); + void CreateToolbars(); + void ViewPaneUI(const wxString &paneName, wxUpdateUIEvent&event); + void ViewPane(const wxString &paneName, wxCommandEvent &event); + void CreateViewAsSubMenu(); + void CreateRecentlyOpenedFilesMenu(); + void CreateRecentlyOpenedWorkspacesMenu(); + void CreateWelcomePage(); + void CreateMenuBar(); + void UpgradeExternalDbExt(); + void AutoLoadExternalDb(); + void DoBuildExternalDatabase(); + +protected: + //---------------------------------------------------- + // event handlers + //---------------------------------------------------- + void OnIdle(wxIdleEvent &e); + void OnSearchThread(wxCommandEvent &event); + void OnBuildEvent(wxCommandEvent &event); + void OnQuit(wxCommandEvent& WXUNUSED(event)); + void OnClose(wxCloseEvent &event); + void OnAddSourceFile(wxCommandEvent& event); + void OnBuildFromDatabase(wxCommandEvent& event); + void OnSave(wxCommandEvent& event); + void OnSaveAs(wxCommandEvent& event); + void OnFileReload(wxCommandEvent& event); + void OnCompleteWord(wxCommandEvent& event); + void OnDeleteProject(wxCommandEvent& event); + void OnBuildExternalDatabase(wxCommandEvent& event); + void OnUseExternalDatabase(wxCommandEvent& event); + void OnCloseExternalDatabase(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnFileNew(wxCommandEvent &event); + void OnFileOpen(wxCommandEvent &event); + void OnFileClose(wxCommandEvent &event); + void OnFileCloseUI(wxUpdateUIEvent &event); + void OnFileSaveAll(wxCommandEvent &event); + void OnFileFindAndReplace(wxCommandEvent &event); + void OnFileExistUpdateUI(wxUpdateUIEvent &event); + void OnCompleteWordUpdateUI(wxUpdateUIEvent &event); + void OnFindInFiles(wxCommandEvent &event); + void OnViewToolbar(wxCommandEvent &event); + void OnViewToolbarUI(wxUpdateUIEvent &event); + void OnViewOptions(wxCommandEvent &event); + void OnTogglePanes(wxCommandEvent &event); + void OnNewDlgCreate(wxCommandEvent &event); + void OnProjectNewWorkspace(wxCommandEvent &event); + void OnProjectNewProject(wxCommandEvent &event); + void OnCreateWorkspace(wxCommandEvent &event); + void OnSwitchWorkspace(wxCommandEvent &event); + void OnCloseWorkspace(wxCommandEvent &event); + void OnProjectAddProject(wxCommandEvent &event); + void OnWorkspaceOpen(wxUpdateUIEvent &event); + void OnConfigurationManager(wxCommandEvent &event); + void OnAddEnvironmentVariable(wxCommandEvent &event); + void OnAdvanceSettings(wxCommandEvent &event); + void OnCtagsOptions(wxCommandEvent &event); + void OnBuildProject(wxCommandEvent &event); + void OnBuildAndRunProject(wxCommandEvent &event); + void OnRebuildProject(wxCommandEvent &event); + void OnBuildProjectUI(wxUpdateUIEvent &event); + void OnStopBuild(wxCommandEvent &event); + void OnStopBuildUI(wxUpdateUIEvent &event); + void OnStopExecutedProgram(wxCommandEvent &event); + void OnStopExecutedProgramUI(wxUpdateUIEvent &event); + void OnCleanProject(wxCommandEvent &event); + void OnCleanProjectUI(wxUpdateUIEvent &event); + void OnExecuteNoDebug(wxCommandEvent &event); + void OnExecuteNoDebugUI(wxUpdateUIEvent &event); + void OnTimer(wxTimerEvent &event); + void OnOutputWindowEvent(wxCommandEvent &event); + void OnFileCloseAll(wxCommandEvent &event); + void OnFindResource(wxCommandEvent &event); + void OnFindType(wxCommandEvent &event); + void OnQuickOutline(wxCommandEvent &event); + void OnImportMakefile(wxCommandEvent &event); + void OnImportMakefileUI(wxUpdateUIEvent &event); + void OnImportMSVS(wxCommandEvent &e); + void OnNextBuildError(wxCommandEvent &event); + void OnNextBuildErrorUI(wxUpdateUIEvent &event); + void OnDebugAttach(wxCommandEvent &event); + + // this event is sent from the notebook container to the frame + void OnFileClosing(wxFlatNotebookEvent &event); + void OnPageChanged(wxFlatNotebookEvent &event); + void OnPageClosed(wxFlatNotebookEvent &event); + + //handle symbol tree events + void OnAddSymbols(SymbolTreeEvent &event); + void OnDeleteSymbols(SymbolTreeEvent &event); + void OnUpdateSymbols(SymbolTreeEvent &event); + + void OnRecentFile(wxCommandEvent &event); + void OnRecentWorkspace(wxCommandEvent &event); + void OnBackwardForward(wxCommandEvent &event); + void OnBackwardForwardUI(wxUpdateUIEvent &event); + void OnFixDatabasePaths(wxCommandEvent &event); + void OnFixDatabasePathsUI(wxUpdateUIEvent &event); + + void OnDebug(wxCommandEvent &e); + void OnDebugUI(wxUpdateUIEvent &e); + void OnDebugStop(wxCommandEvent &e); + void OnDebugStopUI(wxUpdateUIEvent &e); + void OnDebugManageBreakpointsUI(wxUpdateUIEvent &e); + void OnDebugCmd(wxCommandEvent &e); + void OnDebugCmdUI(wxUpdateUIEvent &e); + void OnDebuggerSettings(wxCommandEvent &e); + void OnMenuOpen(wxMenuEvent &e); + void OnLinkClicked(wxHtmlLinkEvent &e); + void OnLoadLastSessionUI(wxUpdateUIEvent &event); + void OnLoadLastSession(wxCommandEvent &event); + void OnShowWelcomePage(wxCommandEvent &event); + void OnShowWelcomePageUI(wxUpdateUIEvent &event); + void OnLoadWelcomePage(wxCommandEvent &event); + void OnLoadWelcomePageUI(wxUpdateUIEvent &event); + void OnAppActivated(wxActivateEvent &event); + void OnCompileFile(wxCommandEvent &e); + void OnCompileFileUI(wxUpdateUIEvent &e); + void OnCloseAllButThis(wxCommandEvent &e); + + //EOL + void OnViewEolUI(wxUpdateUIEvent &e); + void OnViewEolCR(wxCommandEvent &e); + void OnViewEolLF(wxCommandEvent &e); + void OnViewEolCRLF(wxCommandEvent &e); + + void OnViewEolCR_UI(wxUpdateUIEvent &e); + void OnViewEolLF_UI(wxUpdateUIEvent &e); + void OnViewEolCRLF_UI(wxUpdateUIEvent &e); + + void OnConvertEol(wxCommandEvent &e); + void OnConvertEolUI(wxUpdateUIEvent &e); + + void OnViewDisplayEOL(wxCommandEvent &e); + void OnViewDisplayEOL_UI(wxUpdateUIEvent &e); + + //Docking windows events + void OnViewPane(wxCommandEvent &event); + void OnViewPaneUI(wxUpdateUIEvent &event); + +public: + void OnWorkspaceConfigChanged(wxCommandEvent &event); + + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +#endif // LITEEDITOR_FRAME_H diff --git a/LiteEditor/free_text_dialog.cpp b/LiteEditor/free_text_dialog.cpp new file mode 100644 index 0000000000..9bcc3a817e --- /dev/null +++ b/LiteEditor/free_text_dialog.cpp @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "free_text_dialog.h" + +/////////////////////////////////////////////////////////////////////////// + +FreeTextDialog::FreeTextDialog( wxWindow* parent, wxString value, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxVERTICAL ); + + m_text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB ); + bSizer23->Add( m_text, 1, wxALL|wxEXPAND, 5 ); + m_text->SetValue(value); + + m_staticline9 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer23->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer24->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer23->Add( bSizer24, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer23 ); + this->Layout(); +} diff --git a/LiteEditor/free_text_dialog.h b/LiteEditor/free_text_dialog.h new file mode 100644 index 0000000000..6ec2b7e2b1 --- /dev/null +++ b/LiteEditor/free_text_dialog.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __free_text_dialog__ +#define __free_text_dialog__ + +#include + +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class FreeTextDialog +/////////////////////////////////////////////////////////////////////////////// +class FreeTextDialog : public wxDialog +{ +private: + +protected: + wxTextCtrl* m_text; + wxStaticLine* m_staticline9; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + +public: + FreeTextDialog( wxWindow* parent, wxString value = wxEmptyString, int id = wxID_ANY, wxString title = wxT("Edit"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 481,299 ), int style = wxDEFAULT_DIALOG_STYLE); + wxString GetValue() const { return m_text->GetValue(); } + +}; + +#endif //__free_text_dialog__ diff --git a/LiteEditor/generalinfo.cpp b/LiteEditor/generalinfo.cpp new file mode 100644 index 0000000000..f61b9b2742 --- /dev/null +++ b/LiteEditor/generalinfo.cpp @@ -0,0 +1,26 @@ +#include "generalinfo.h" + +GeneralInfo::GeneralInfo() +: m_frameSize(800, 600) +, m_framePos(0, 0) +, m_flags(CL_SHOW_WELCOME_PAGE | CL_LOAD_LAST_SESSION | CL_USE_EOL_LF) +{ +} + +GeneralInfo::~GeneralInfo() +{ +} + +void GeneralInfo::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_frameSize"), m_frameSize); + arch.Read(wxT("m_framePos"), m_framePos); + arch.Read(wxT("m_flags"), m_flags); +} + +void GeneralInfo::Serialize(Archive &arch) +{ + arch.Write(wxT("m_frameSize"), m_frameSize); + arch.Write(wxT("m_framePos"), m_framePos); + arch.Write(wxT("m_flags"), m_flags); +} diff --git a/LiteEditor/generalinfo.h b/LiteEditor/generalinfo.h new file mode 100644 index 0000000000..579c1bc512 --- /dev/null +++ b/LiteEditor/generalinfo.h @@ -0,0 +1,41 @@ +#ifndef GENERALINFO_H +#define GENERALINFO_H + +#include "wx/string.h" +#include "serialized_object.h" + +enum { + CL_MAXIMIZE_FRAME = 0x00000001, + CL_LOAD_LAST_SESSION = 0x00000002, + CL_SHOW_WELCOME_PAGE = 0x00000004, + CL_USE_EOL_LF = 0x00000008, + CL_USE_EOL_CR = 0x00000010, + CL_USE_EOL_CRLF = 0x00000020, + CL_SHOW_EOL = 0x00000040 +}; + +class GeneralInfo : public SerializedObject{ + + wxSize m_frameSize; + wxPoint m_framePos; + size_t m_flags; + +public: + GeneralInfo(); + virtual ~GeneralInfo(); + + const wxSize& GetFrameSize() const{return m_frameSize;} + void SetFrameSize(const wxSize &sz){m_frameSize = sz;} + + const wxPoint& GetFramePosition() const{return m_framePos;} + void SetFramePosition(const wxPoint &pt){m_framePos = pt;} + + void SetFlags(const size_t& flags) {this->m_flags = flags;} + const size_t& GetFlags() const {return m_flags;} + + void Serialize(Archive &arch); + void DeSerialize(Archive &arch); +}; + +#endif //GENERALINFO_H + diff --git a/LiteEditor/generic_context.cpp b/LiteEditor/generic_context.cpp new file mode 100644 index 0000000000..db8e311959 --- /dev/null +++ b/LiteEditor/generic_context.cpp @@ -0,0 +1,97 @@ +#include "generic_context.h" +#include +#include "editor_config.h" +#include "editor.h" + +ContextGeneric::ContextGeneric(LEditor *container, const wxString &name) +: ContextBase(container) +{ + //----------------------------------------------- + // Load laguage settings from configuration file + //----------------------------------------------- + SetName(name); + + // Set the key words and the lexer + std::list styles; + LexerConfPtr lexPtr; + // Read the configuration file + if(EditorConfigST::Get()->IsOk()){ + lexPtr = EditorConfigST::Get()->GetLexer(name); + } + + // Update the control + LEditor &rCtrl = GetCtrl(); + rCtrl.SetLexer(lexPtr->GetLexerId()); + + wxString keyWords = lexPtr->GetKeyWords(); + keyWords.Replace(wxT("\n"), wxT(" ")); + keyWords.Replace(wxT("\r"), wxT(" ")); + rCtrl.SetKeyWords(0, keyWords); + rCtrl.StyleClearAll(); + + styles = lexPtr->GetProperties(); + std::list::iterator iter = styles.begin(); + for(; iter != styles.end(); iter++) + { + StyleProperty st = (*iter); + int size = st.GetFontSize(); + wxString face = st.GetFaceName(); + bool bold = st.IsBold(); + + wxFont font(size, wxFONTFAMILY_TELETYPE, wxNORMAL, bold ? wxBOLD : wxNORMAL, false, face); + + if(st.GetId() == 0){ //default + rCtrl.StyleSetFont(wxSCI_STYLE_DEFAULT, font); + rCtrl.StyleSetSize(wxSCI_STYLE_DEFAULT, (*iter).GetFontSize()); + rCtrl.StyleSetForeground(wxSCI_STYLE_DEFAULT, (*iter).GetFgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_DEFAULT, (*iter).GetBgColour()); + rCtrl.StyleSetBackground(wxSCI_STYLE_LINENUMBER, (*iter).GetBgColour()); + rCtrl.StyleSetSize(wxSCI_STYLE_LINENUMBER, (*iter).GetFontSize()); + } + + rCtrl.StyleSetFont(st.GetId(), font); + rCtrl.StyleSetSize(st.GetId(), (*iter).GetFontSize()); + rCtrl.StyleSetForeground(st.GetId(), (*iter).GetFgColour()); + rCtrl.StyleSetBackground(st.GetId(), (*iter).GetBgColour()); + } +} + + +ContextGeneric::~ContextGeneric() +{ +} + +ContextBase *ContextGeneric::NewInstance(LEditor *container){ + return new ContextGeneric(container, GetName()); +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextGeneric::AutoIndent(const wxChar &nChar) +{ + ContextBase::AutoIndent(nChar); +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextGeneric::CodeComplete() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextGeneric::CompleteWord() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextGeneric::GotoDefinition() +{ +} + +// Dont implement this function, maybe derived child will want +// to do something with it +void ContextGeneric::GotoPreviousDefintion() +{ +} diff --git a/LiteEditor/generic_context.h b/LiteEditor/generic_context.h new file mode 100644 index 0000000000..8e97bf7fb3 --- /dev/null +++ b/LiteEditor/generic_context.h @@ -0,0 +1,55 @@ +#ifndef CONTEXT_GENERIC_H +#define CONTEXT_GENERIC_H + +#include "wx/string.h" +#include "wx/wxscintilla.h" +#include "smart_ptr.h" +#include "context_base.h" + +class LEditor; + +/** + * \ingroup LiteEditor + * \brief the basic editor from which complicated editors derives from (e.g. ContextCpp) + * + * \version 1.0 + * first version + * + * \date 04-30-2007 + * + * \author Eran + * + * + */ +class ContextGeneric : public ContextBase { +public: + //--------------------------------------- + // ctors-dtor + //--------------------------------------- + ContextGeneric(LEditor *container, const wxString &name); + ContextGeneric() : ContextBase(wxT("Text")) {}; + ContextGeneric(const wxString &name) : ContextBase(name) {}; + + virtual ~ContextGeneric(); + LEditor &GetCtrl() { return *m_container; } + virtual ContextBase *NewInstance(LEditor *container); + + //--------------------------------------- + // Operations + //--------------------------------------- + virtual void CompleteWord(); + virtual void CodeComplete(); + virtual void GotoDefinition(); + virtual void GotoPreviousDefintion(); + virtual void AutoIndent(const wxChar&); + virtual void CallTipCancel(){}; + + virtual bool IsCommentOrString(long WXUNUSED(pos)){ return false; } + + // event handlers + virtual void OnDwellEnd(wxScintillaEvent & WXUNUSED(event)) {}; + virtual void OnCallTipClick(wxScintillaEvent& WXUNUSED(event)) {}; + virtual void OnDwellStart(wxScintillaEvent & WXUNUSED(event)) {}; +}; +#endif // CONTEXT_GENERIC_H + diff --git a/LiteEditor/iconsextra.cpp b/LiteEditor/iconsextra.cpp new file mode 100644 index 0000000000..7db5b7fe20 --- /dev/null +++ b/LiteEditor/iconsextra.cpp @@ -0,0 +1,349 @@ +// cubes.xpm 16x16 +unsigned char cubes_alpha[]={ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 128, 174, 209, 241, 233, 211, 188, 140, 0, 0, 0, 0, + 0, 0, 0, 52, 255, 255, 255, 255, 255, 254, 254, 255, 20, 0, 0, 0, + 0, 0, 0, 50, 255, 255, 255, 255, 255, 255, 255, 254, 9, 0, 0, 0, + 0, 0, 0, 46, 255, 255, 255, 255, 255, 255, 255, 249, 1, 0, 0, 0, + 0, 0, 0, 41, 255, 255, 255, 255, 255, 255, 255, 238, 0, 0, 0, 0, + 0, 2, 59, 149, 255, 255, 255, 255, 255, 255, 255, 230, 10, 0, 0, 0, + 0, 201, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 200, 106, 0, + 0, 239, 255, 255, 255, 255, 254, 255, 255, 255, 255, 255, 254, 254, 235, 0, + 0, 228, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 219, 0, + 0, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 201, 0, + 0, 206, 255, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 183, 0, + 0, 110, 246, 255, 255, 254, 255, 255, 255, 255, 255, 254, 255, 255, 141, 0, + 0, 0, 20, 125, 231, 245, 124, 106, 220, 255, 255, 254, 254, 140, 3, 0, + 0, 0, 0, 0, 5, 14, 0, 0, 2, 79, 190, 228, 88, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +/* XPM */ +char *cubes_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 159 2", +",. c #3DBB20", +"V c #0033AA", +" c Black", +"5. c #B98800", +"n c #0068DC", +"C c #002D9D", +"> c #2F80D6", +"x. c #007200", +"X. c #4FA214", +"4. c #006F00", +"5 c #0094FD", +"& c #0062D9", +"' c #3BBB27", +"i. c #006C00", +"9. c #BC921C", +"w c #0059C9", +") c #92FF55", +"L c #0027A8", +"O. c #76DB3F", +"y c #008BF3", +"j. c #008F00", +"<. c #4ABE25", +"8 c #004DB8", +"< c #004AB3", +"* c #54B6FF", +"g. c #AC6400", +"s. c #B58200", +"h c #007FE6", +"@ c #2B77CF", +"@. c #A3FF6A", +"+. c #88EB52", +"r. c #32B118", +"0 c #0044AD", +"D. c #005D00", +"f c #0079E1", +"G c #1C599B", +"s c #004DD8", +"K c #0041BA", +"j c #2470CB", +"7 c #3B8DDE", +"^ c #2B6A47", +"m c #006DD5", +"1 c #003EBA", +"m. c #9F6C00", +"V. c #007A00", +"q. c #179405", +"z c #003BB5", +"3. c #007700", +"F c #9C973D", +"o c #4088D8", +"Y c #20B216", +"o. c #6CDB32", +"%. c #007400", +"Z c #009A00", +"| c #FFE50D", +"; c #95CFFF", +"J. c #007100", +"c. c #006E00", +"4 c #0093FD", +"% c #0950BF", +"= c #76C7FF", +"#. c #0C9309", +"v. c #006800", +"6. c #CE9B00", +"B. c #008E00", +"I c #43C52C", +"D c #FFD600", +"1. c #56C228", +"! c #FFE229", +"t c #0087ED", +"x c #FF8700", +"h. c #108100", +"E c #FFF901", +"M. c #A87201", +"z. c #28AE1A", +"S c #FDDC12", +"k c #0046AD", +"w. c #15A80C", +" . c #C7A029", +"W c #FFFF27", +"*. c #E3AF00", +"B c #0040A9", +"e. c #26AB12", +"Q c #FFFF36", +"7. c #D4A000", +"# c #2472CB", +"M c #0072D9", +"H c #0046CB", +"=. c #E6B300", +"A. c #0D9108", +"v c #DB9B00", +"/ c #429581", +"A c #D6BD02", +":. c #B26B00", +"2. c #75DE44", +"d c #006FDF", +"$ c #296DC7", +"T c #099704", +"U c #2CB618", +"u. c #007600", +"d. c #C39100", +"6 c #009BFF", +"8. c #DFAC00", +"N c #1861BE", +"S. c #007300", +"G. c #9F6200", +"c c #CD9300", +">. c #379C12", +"H. c #006D00", +"_ c #7EF051", +"` c #7EF054", +"3 c #008CF5", +"-. c #F4C309", +": c #7FBBF6", +"0. c #AE6500", +"l. c #089E04", +"n. c #AA7100", +"2 c #005AD7", +"r c #0086EC", +".. c #B67000", +"9 c #004EB4", +"a. c #AD7800", +"R c #E6C100", +"i c #004BB2", +"u c #307FD4", +"J c #0051CC", +"p c #0048AE", +"e c #0080E7", +"f. c #B5860E", +"Z. c #008700", +"N. c #BB6E00", +"k. c #019701", +";. c #C29B24", +"q c #001CA9", +"g c #007AE0", +"l c #0042A9", +"t. c #52C730", +"~ c #BC7B00", +"p. c #BA8100", +"P c #237276", +"a c #0042B4", +"+ c #3380D3", +"F. c #AB7200", +"X c #2978D3", +"[ c #D9A300", +"C. c #007E00", +"b. c #BA7B00", +"b c #0766C3", +"&. c #CA9400", +"$. c #007B00", +"} c #FDC900", +"( c #98FF5F", +", c #095DC1", +". c #0071E7", +"] c #007800", +"- c #86CAFF", +"{ c #F8C200", +"O c #3B85D7", +"y. c #007500", +/* pixels */ +" ", +" . X o O + @ # $ % ", +" & * = - ; : > , < 1 ", +" 2 3 4 5 6 7 8 9 0 q ", +" w e r t y u i p a ", +" s d f g h j k l z ", +" x c v b n m M N B V C Z ", +" A S D F G H J K L P I U Y T ", +" R E W Q ! ~ ^ / ( ) _ ` ' ] ", +" [ { } | ...X.o.O.+.@.#.$.%. ", +" &.*.=.-.;.:.>.,.<.1.2.3.$.4. ", +" 5.6.7.8.9.0.q.w.e.r.t.y.u.i. ", +" p.a.s.d.f.g.h.j.k.l.z.x.c.v. ", +" b.n.m.M.N.B.V.C.Z.A.4.S.D. ", +" F.G. j.x.H.4.J. ", +" " +}; + + +/* XPM */ +char *arrow_right_green_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 91 1", +" c Black", +"* c #239413", +"8 c #A3F177", +"s c #7DE548", +"x c #73DA40", +"U c #2A8F16", +"L c #3CA523", +"_ c #2B9C18", +"' c #249B13", +"T c #288F15", +"n c #80E64C", +"} c #008F00", +"7 c #9FEE73", +"; c #44AD2E", +"6 c #98EA6A", +"P c #00AF00", +", c #58BD41", +"F c #7EE349", +"V c #49AB2C", +"z c #85E151", +"k c #05B004", +"p c #77DF43", +"J c #86EE51", +"+ c #3ABF25", +"1 c #A1FF67", +"H c #81E74D", +"y c #228F14", +": c #45B12F", +"X c #00A600", +"i c #70DB3B", +"@ c #00A300", +". c #00C900", +"9 c #A5F37B", +"` c #00A000", +"] c #289A15", +"o c #009D00", +"= c #43AB2B", +"[ c #009A00", +"N c #8CF357", +"S c #78DD42", +"W c #379D20", +"d c #80E84C", +"/ c #009100", +"c c #76DD43", +"R c #288E17", +"M c #85EC52", +"# c #2EA522", +"> c #44AF2E", +"O c #34B621", +"t c #00B400", +"! c #7ACE49", +"q c #96F267", +"{ c #008800", +"A c #7EE244", +"m c #83E950", +"3 c #00AE00", +"j c #54C235", +") c #7DCC46", +"b c #7CE249", +"G c #81E64B", +"% c #3FC229", +"( c #209411", +"l c #228E14", +"a c #7AE245", +"w c #8EF559", +"2 c #4CCB31", +"I c #1B810D", +"5 c #B4F58C", +"e c #A0FF67", +"Q c #85EB4F", +"f c #85EB51", +"4 c #269316", +"D c #7BE046", +"B c #89DF56", +"C c #02AD00", +"v c #79E046", +"< c #A7FA7A", +"g c #88EF55", +"$ c #B1FF74", +"h c #8DF35A", +"Z c #249016", +"u c #91E761", +"r c #55D437", +"& c #00AA00", +"0 c #A7F47E", +"- c #40AB2B", +"K c #80D54F", +"^ c #00A400", +"Y c #278E15", +"E c #278E17", +"~ c #34A01D", +/* pixels */ +" ", +" . ", +" Xo ", +" O+@ ", +" #$%& ", +" *=-;:>,<123 ", +" 4567890qwert ", +" yuipasdfghejk ", +" lzxcvbnmMNBVC ", +" ZASDFGGHJKLP ", +" IUYTREWQ!~^ ", +" ()_` ", +" '][ ", +" {} ", +" X ", +" " +}; + + +/* XPM */ +char *stop_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #ff352a", +". c #ffa18d", +"# c #ff6e56", +"a c #ffd1c0", +"b c #ff8972", +"c c #ff5340", +"d c #ffbdaa", +"e c #ffffff", +/* pixels */ +"eeeeeeeeeeeeeeee", +"eeee.......beeee", +"eee.daaaaaa.beee", +"ee..ad.....db#ee", +"e..ad.....b.db#e", +"e.ad....bbbbb.#e", +"e.a...bbbbb##.#e", +"ebd.bbbbb####.#e", +"ebdbbbb#####c.ce", +"ebdbb#####ccc.ce", +"ebdb####cccc#bce", +"e#b.bcccccc#.c`e", +"eec#.#ccc`#.c`ee", +"eeec#..bbbbc`eee", +"eeee`ccccc``eeee", +"eeeeeeeeeeeeeeee" +}; diff --git a/LiteEditor/keyvaluetabledlg.cpp b/LiteEditor/keyvaluetabledlg.cpp new file mode 100644 index 0000000000..72aa4071e6 --- /dev/null +++ b/LiteEditor/keyvaluetabledlg.cpp @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "keyvaluetabledlg.h" +#include "macros.h" +#include "ctags_manager.h" +#include "envvar_dlg.h" + +/////////////////////////////////////////////////////////////////////////// + +KeyValueTableDlg::KeyValueTableDlg( wxWindow* parent, TagsDatabase *db, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_db(db) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxVERTICAL ); + + m_listVarsTable = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL ); + bSizer12->Add( m_listVarsTable, 1, wxALL|wxEXPAND, 5 ); + + m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer12->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer13; + bSizer13 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer13->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer13->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer12->Add( bSizer13, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer12 ); + this->Layout(); + + ConnectEvents(); + InitVars(); +} + +void KeyValueTableDlg::ConnectEvents() +{ + ConnectListCtrlItemSelected(m_listVarsTable, KeyValueTableDlg::OnItemSelected); + ConnectListCtrlItemActivated(m_listVarsTable, KeyValueTableDlg::OnItemActivated); +} + +void KeyValueTableDlg::InitVars() +{ + m_listVarsTable->ClearAll(); + m_listVarsTable->Freeze(); + + std::vector vars; + m_db->GetVariables(vars); + + //add two columns to the list ctrl + m_listVarsTable->InsertColumn(0, wxT("Name")); + m_listVarsTable->InsertColumn(1, wxT("Value")); + bool sel = true; + + for(size_t i=0; iGetName()); + info.SetColumn(0); + if(sel == true){ + sel = false; + info.SetState(wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED); + m_selectedVarName = vars.at(i)->GetName(); + m_selectedVarValue = vars.at(i)->GetValue(); + item = m_listVarsTable->InsertItem(info); + }else{ + info.SetState(0); + item = m_listVarsTable->InsertItem(info); + } + + info.SetColumn(1); + info.SetId(item); + info.SetText(vars.at(i)->GetValue()); + info.SetState(0); + m_listVarsTable->SetItem(info); + } + + m_listVarsTable->SetColumnWidth(0, wxLIST_AUTOSIZE); + m_listVarsTable->SetColumnWidth(1, wxLIST_AUTOSIZE); + m_listVarsTable->Thaw(); +} + +void KeyValueTableDlg::OnEditVar(wxCommandEvent &event) +{ + wxUnusedVar(event); + EnvVarDlg *dlg = new EnvVarDlg(this, m_selectedVarName, m_selectedVarValue); + if(dlg->ShowModal() == wxID_OK){ + DbRecordPtr record(new VariableEntry(dlg->GetName(), dlg->GetValue())); + m_db->Begin(); + m_db->Update(record); + m_db->Commit(); + InitVars(); + } + dlg->Destroy(); +} + +void KeyValueTableDlg::OnItemSelected(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listVarsTable->GetItem(info) ){ + m_selectedVarName = info.m_text; + } + + info.m_col = 1;//value + if( m_listVarsTable->GetItem(info)){ + m_selectedVarValue = info.m_text; + } +} + +void KeyValueTableDlg::OnItemActivated(wxListEvent &event) +{ + //get the var name & value + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 0; //name + info.m_mask = wxLIST_MASK_TEXT; + + if( m_listVarsTable->GetItem(info) ){ + m_selectedVarName = info.m_text; + } + + info.m_col = 1;//value + if( m_listVarsTable->GetItem(info)){ + m_selectedVarValue = info.m_text; + } + + wxCommandEvent dummy; + OnEditVar(dummy); +} diff --git a/LiteEditor/keyvaluetabledlg.h b/LiteEditor/keyvaluetabledlg.h new file mode 100644 index 0000000000..e00def9cfa --- /dev/null +++ b/LiteEditor/keyvaluetabledlg.h @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __keyvaluetabledlg__ +#define __keyvaluetabledlg__ + +#include + +#include +#include +#include +#include "tags_database.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class KeyValueTableDlg +/////////////////////////////////////////////////////////////////////////////// +class KeyValueTableDlg : public wxDialog +{ +private: + void InitVars(); + void ConnectEvents(); + +protected: + void OnEditVar(wxCommandEvent &event); + void OnItemSelected(wxListEvent &event); + void OnItemActivated(wxListEvent &event); + +protected: + wxListCtrl* m_listVarsTable; + wxStaticLine* m_staticline4; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + wxString m_selectedVarName; + wxString m_selectedVarValue; + TagsDatabase *m_db; + +public: + KeyValueTableDlg( wxWindow* parent, TagsDatabase *db, int id = wxID_ANY, wxString title = wxT("Variables "), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 552,330 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__keyvaluetabledlg__ diff --git a/LiteEditor/lexer_page.cpp b/LiteEditor/lexer_page.cpp new file mode 100644 index 0000000000..bf2b7ab71c --- /dev/null +++ b/LiteEditor/lexer_page.cpp @@ -0,0 +1,236 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP +#include +#endif //WX_PRECOMP + +#include "lexer_page.h" +#include "lexer_configuration.h" +#include "attribute_style.h" +#include +#include "editor_config.h" +#include "macros.h" +#include "free_text_dialog.h" +#include + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE( LexerPage, wxPanel ) +EVT_LISTBOX( wxID_ANY, LexerPage::OnItemSelected ) +EVT_FONTPICKER_CHANGED(wxID_ANY, LexerPage::OnFontChanged) +EVT_COLOURPICKER_CHANGED(wxID_ANY, LexerPage::OnColourChanged) +END_EVENT_TABLE() + +LexerPage::LexerPage( wxWindow* parent, LexerConfPtr lexer, int id, wxPoint pos, wxSize size, int style ) +: wxPanel(parent, id, pos, size, style) +, m_lexer(lexer) +, m_selection(0) +{ + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer5; + sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("Display Item:") ), wxHORIZONTAL ); + + m_properties = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + sbSizer5->Add( m_properties, 0, wxALL|wxEXPAND, 5 ); + + m_propertyList = m_lexer->GetProperties(); + std::list::iterator it = m_propertyList.begin(); + + for(; it != m_propertyList.end(); it++){ + m_properties->Append((*it).GetName()); + } + m_properties->SetSelection(0); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + wxString initialColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT).GetAsString(); + wxString bgInitialColor = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW).GetAsString(); + wxFont initialFont = wxNullFont; + + if(m_propertyList.empty() == false){ + StyleProperty p; + p = (*m_propertyList.begin()); + initialColor = p.GetFgColour(); + bgInitialColor = p.GetBgColour(); + + int size = p.GetFontSize(); + wxString face = p.GetFaceName(); + bool bold = p.IsBold(); + initialFont = wxFont(size, wxFONTFAMILY_TELETYPE, wxNORMAL, bold ? wxBOLD : wxNORMAL, false, face); + } + wxStaticText *text(NULL); + wxGridBagSizer *gbz = new wxGridBagSizer(0, 5); + gbz->AddGrowableCol( 1 ); + gbz->SetFlexibleDirection( wxBOTH ); + + text = new wxStaticText(this, wxID_ANY, wxT("Edit Keywords:")); + gbz->Add(text, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_editKeyWordsButton = new wxButton(this, wxID_ANY, wxT("&Edit Keywords")); + gbz->Add( m_editKeyWordsButton, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5); + + text = new wxStaticText(this, wxID_ANY, wxT("Style font:")); + gbz->Add( text, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_fontPicker = new wxFontPickerCtrl(this, wxID_ANY, initialFont, wxDefaultPosition, wxDefaultSize, wxFNTP_USEFONT_FOR_LABEL); + gbz->Add( m_fontPicker, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + text = new wxStaticText(this, wxID_ANY, wxT("Style forground colour:")); + gbz->Add( text, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_colourPicker = new wxColourPickerCtrl(this, wxID_ANY, wxColour(initialColor), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + gbz->Add( m_colourPicker, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + text = new wxStaticText(this, wxID_ANY, wxT("Style background colour:")); + gbz->Add( text, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_bgColourPicker = new wxColourPickerCtrl(this, wxID_ANY, wxColour(bgInitialColor), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + gbz->Add( m_bgColourPicker, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + //globals settings for whole styles + wxStaticLine *line = new wxStaticLine(this); + gbz->Add(line, wxGBPosition(4, 0), wxGBSpan(1, 2), wxALL|wxEXPAND, 10); + + text = new wxStaticText(this, wxID_ANY, wxT("Global font:")); + gbz->Add( text, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_globalFontPicker = new wxFontPickerCtrl(this, wxID_ANY, initialFont, wxDefaultPosition, wxDefaultSize, wxFNTP_USEFONT_FOR_LABEL); + gbz->Add( m_globalFontPicker, wxGBPosition(5, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + text = new wxStaticText(this, wxID_ANY, wxT("Global background colour:")); + gbz->Add( text, wxGBPosition(6, 0), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + + m_globalBgColourPicker = new wxColourPickerCtrl(this, wxID_ANY, wxColour(bgInitialColor), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + gbz->Add( m_globalBgColourPicker, wxGBPosition(6, 1), wxGBSpan(1, 1), wxALL|wxEXPAND, 5 ); + bSizer7->Add(gbz, 0, wxEXPAND, 5); + + sbSizer5->Add( bSizer7, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer *hs = new wxStaticBoxSizer(wxHORIZONTAL, this, wxT("File Types:")); + m_fileSpec = new wxTextCtrl(this, wxID_ANY, m_lexer->GetFileSpec()); + hs->Add(m_fileSpec, 1, wxALL | wxEXPAND, 5); + + bSizer6->Add( sbSizer5, 1, wxEXPAND, 5 ); + bSizer6->Add( hs, 0, wxEXPAND, 5 ); + this->SetSizer( bSizer6 ); + this->Layout(); + + if(m_propertyList.empty()){ + m_fontPicker->Enable(false); + m_colourPicker->Enable(false); + } + ConnectButton(m_editKeyWordsButton, LexerPage::OnEditKeyWordsButton); +} + +void LexerPage::OnEditKeyWordsButton(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString keywords = m_lexer->GetKeyWords(); + FreeTextDialog *dlg = new FreeTextDialog(this, keywords); + if(dlg->ShowModal() == wxID_OK){ + m_lexer->SetKeyWords(dlg->GetValue()); + } + dlg->Destroy(); +} + +void LexerPage::OnItemSelected(wxCommandEvent & event) +{ + // update colour picker & font pickers + wxString selectionString = event.GetString(); + m_selection = event.GetSelection(); + + std::list::iterator iter = m_propertyList.begin(); + for(; iter != m_propertyList.end(); iter++){ + if(iter->GetName() == selectionString){ + // update font & color + StyleProperty p = (*iter); + wxString colour = p.GetFgColour(); + wxString bgColour = p.GetBgColour(); + wxFont font = wxNullFont; + + int size = p.GetFontSize(); + wxString face = p.GetFaceName(); + bool bold = p.IsBold(); + + font = wxFont(size, wxFONTFAMILY_TELETYPE, wxNORMAL, bold ? wxBOLD : wxNORMAL, false, face); + m_fontPicker->SetSelectedFont(font); + m_bgColourPicker->SetColour(bgColour); + m_colourPicker->SetColour(colour); + } + } +} + +void LexerPage::OnFontChanged(wxFontPickerEvent &event) +{ + // update font + wxObject *obj = event.GetEventObject(); + if(obj == m_fontPicker){ + wxFont font = event.GetFont(); + std::list::iterator iter = m_propertyList.begin(); + for(int i=0; iSetBold(font.GetWeight() == wxFONTWEIGHT_BOLD); + iter->SetFaceName(font.GetFaceName()); + iter->SetFontSize(font.GetPointSize()); + }else if(obj == m_globalFontPicker){ + wxFont font = event.GetFont(); + std::list::iterator iter = m_propertyList.begin(); + for(; iter != m_propertyList.end(); iter++){ + iter->SetBold(font.GetWeight() == wxFONTWEIGHT_BOLD); + iter->SetFaceName(font.GetFaceName()); + iter->SetFontSize(font.GetPointSize()); + } + //update the style font picker as well + m_fontPicker->SetSelectedFont(font); + } +} + +void LexerPage::OnColourChanged(wxColourPickerEvent &event) +{ + //update colour + wxObject *obj = event.GetEventObject(); + if(obj == m_colourPicker){ + wxColour colour = event.GetColour(); + std::list::iterator iter = m_propertyList.begin(); + for(int i=0; iSetFgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); + }else if(obj == m_bgColourPicker){ + wxColour colour = event.GetColour(); + std::list::iterator iter = m_propertyList.begin(); + for(int i=0; iSetBgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); + }else if(obj == m_globalBgColourPicker){ + wxColour colour = event.GetColour(); + std::list::iterator iter = m_propertyList.begin(); + for(; iter != m_propertyList.end(); iter++){ + iter->SetBgColour(colour.GetAsString(wxC2S_HTML_SYNTAX)); + } + //update the style background colour as well + m_bgColourPicker->SetColour(colour); + } +} + +void LexerPage::SaveSettings() +{ + m_lexer->SetProperties( m_propertyList ); + m_lexer->SetFileSpec( m_fileSpec->GetValue() ); + m_lexer->Save(); +} diff --git a/LiteEditor/lexer_page.h b/LiteEditor/lexer_page.h new file mode 100644 index 0000000000..9f65a58fdf --- /dev/null +++ b/LiteEditor/lexer_page.h @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __lexer_page__ +#define __lexer_page__ + +// Define WX_GCH in order to support precompiled headers with GCC compiler. +// You have to create the header "wx_pch.h" and include all files needed +// for compile your gui inside it. +// Then, compile it and place the file "wx_pch.h.gch" into the same +// directory that "wx_pch.h". +#ifdef WX_GCH +#include +#else +#include +#endif + +#include +#include "lexer_configuration.h" +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class LexerPage +/////////////////////////////////////////////////////////////////////////////// +class LexerPage : public wxPanel +{ + LexerConfPtr m_lexer; + std::list m_propertyList; + int m_selection; + + DECLARE_EVENT_TABLE() + +protected: + wxListBox* m_properties; + wxFontPickerCtrl* m_fontPicker; + wxFontPickerCtrl* m_globalFontPicker; + wxColourPickerCtrl* m_globalBgColourPicker; + wxColourPickerCtrl* m_colourPicker; + wxColourPickerCtrl* m_bgColourPicker; + wxTextCtrl *m_fileSpec; + wxButton *m_editKeyWordsButton; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemSelected( wxCommandEvent& event ); + virtual void OnFontChanged(wxFontPickerEvent &event); + virtual void OnColourChanged(wxColourPickerEvent &event); + virtual void OnEditKeyWordsButton(wxCommandEvent &event); +public: + LexerPage( wxWindow* parent, LexerConfPtr lexer, int id = wxID_ANY, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 285,300 ), int style = wxTAB_TRAVERSAL ); + void SaveSettings(); +}; + +#endif //__lexer_page__ diff --git a/LiteEditor/listctrlpanel.cpp b/LiteEditor/listctrlpanel.cpp new file mode 100644 index 0000000000..5afb5ddf7a --- /dev/null +++ b/LiteEditor/listctrlpanel.cpp @@ -0,0 +1,72 @@ +#include "listctrlpanel.h" +#include "manager.h" +#include "globals.h" + +ListCtrlPanel::ListCtrlPanel ( wxWindow* parent ) + : ListCtrlPanelBase ( parent ) +{ + m_listCtrl->InsertColumn ( 0, wxT("Level") ); + m_listCtrl->InsertColumn ( 1, wxT("Address") ); + m_listCtrl->InsertColumn ( 2, wxT("Function") ); + m_listCtrl->InsertColumn ( 3, wxT("File") ); + m_listCtrl->InsertColumn ( 4, wxT("Line") ); +} + +void ListCtrlPanel::OnItemActivated ( wxListEvent& event ) +{ + long frame, frameLine; + wxString frameNumber = GetColumnText ( event.m_itemIndex, 0 ); + wxString frameLineStr = GetColumnText ( event.m_itemIndex, 4 ); + frameNumber.ToLong(&frame); + frameLineStr.ToLong(&frameLine); + ManagerST::Get()->DbgSetFrame(frame, frameLine); +} + +void ListCtrlPanel::Update ( const StackEntryArray &stackArr ) +{ + m_listCtrl->Freeze(); + Clear(); + if (!stackArr.empty()) { + for (int i=(int)stackArr.size()-1; i>=0; i--) { + long item = AppendListCtrlRow(m_listCtrl); + + StackEntry entry = stackArr.at(i); + SetColumnText(item, 0, entry.level); + SetColumnText(item, 1, entry.address); + SetColumnText(item, 2, entry.function); + SetColumnText(item, 3, entry.file); + SetColumnText(item, 4, entry.line); + } + m_listCtrl->SetColumnWidth(1, wxLIST_AUTOSIZE); + m_listCtrl->SetColumnWidth(2, wxLIST_AUTOSIZE); + m_listCtrl->SetColumnWidth(3, wxLIST_AUTOSIZE); + } + m_listCtrl->Thaw(); +} + +void ListCtrlPanel::Clear() +{ + m_listCtrl->DeleteAllItems(); +} + +void ListCtrlPanel::SetColumnText ( long indx, long column, const wxString &rText ) +{ + m_listCtrl->Freeze(); + wxListItem list_item; + list_item.SetId ( indx ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + list_item.SetText ( rText ); + m_listCtrl->SetItem ( list_item ); + m_listCtrl->Thaw(); +} + +wxString ListCtrlPanel::GetColumnText(long index, long column) +{ + wxListItem list_item; + list_item.SetId ( index ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + m_listCtrl->GetItem ( list_item ); + return list_item.GetText(); +} diff --git a/LiteEditor/listctrlpanel.h b/LiteEditor/listctrlpanel.h new file mode 100644 index 0000000000..bba314ac00 --- /dev/null +++ b/LiteEditor/listctrlpanel.h @@ -0,0 +1,28 @@ +#ifndef __listctrlpanel__ +#define __listctrlpanel__ + +/** +@file +Subclass of ListCtrlPanelBase, which is generated by wxFormBuilder. +*/ + +#include "listctrlpanelbase.h" +#include "debugger.h" + +/** Implementing ListCtrlPanelBase */ +class ListCtrlPanel : public ListCtrlPanelBase +{ +protected: + // Handlers for ListCtrlPanelBase events. + void OnItemActivated( wxListEvent& event ); + void SetColumnText ( long indx, long column, const wxString &rText ); + wxString GetColumnText(long index, long column); + +public: + /** Constructor */ + ListCtrlPanel( wxWindow* parent ); + void Update(const StackEntryArray &stackArr); + void Clear(); +}; + +#endif // __listctrlpanel__ diff --git a/LiteEditor/listctrlpanelbase.cpp b/LiteEditor/listctrlpanelbase.cpp new file mode 100644 index 0000000000..a48991abc0 --- /dev/null +++ b/LiteEditor/listctrlpanelbase.cpp @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "listctrlpanelbase.h" + +/////////////////////////////////////////////////////////////////////////// + +ListCtrlPanelBase::ListCtrlPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_listCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL ); + mainSizer->Add( m_listCtrl, 1, wxALL|wxEXPAND, 1 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_listCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( ListCtrlPanelBase::OnItemActivated ), NULL, this ); +} diff --git a/LiteEditor/listctrlpanelbase.h b/LiteEditor/listctrlpanelbase.h new file mode 100644 index 0000000000..cced66b1bf --- /dev/null +++ b/LiteEditor/listctrlpanelbase.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __listctrlpanelbase__ +#define __listctrlpanelbase__ + +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ListCtrlPanelBase +/////////////////////////////////////////////////////////////////////////////// +class ListCtrlPanelBase : public wxPanel +{ + private: + + protected: + wxListCtrl* m_listCtrl; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + + + public: + ListCtrlPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL ); + +}; + +#endif //__listctrlpanelbase__ diff --git a/LiteEditor/localvarstree.cpp b/LiteEditor/localvarstree.cpp new file mode 100644 index 0000000000..285d890d57 --- /dev/null +++ b/LiteEditor/localvarstree.cpp @@ -0,0 +1,134 @@ +#include "localvarstree.h" +#include "map" + +LocalVarsTree::LocalVarsTree(wxWindow *parent, wxWindowID id, long style) +: wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, style) +, m_tree(NULL) +{ +} + +LocalVarsTree::~LocalVarsTree() +{ + Clear(); +} + +void LocalVarsTree::Clear() +{ + if(m_tree){ + delete m_tree; + m_tree = NULL; + } + DeleteAllItems(); +} + +void LocalVarsTree::BuildTree(TreeNode *tree) +{ + if(!tree){ + return; + } + int counter(0); + bool expandRoot(false); + + std::map expandItems; + if(m_tree && m_tree->GetData().name == tree->GetData().name){ + //same stack tree, compare the trees to get its status + //(i.e. expand/fold state) + TreeWalker tmpWalker(m_tree); + for(; !tmpWalker.End(); tmpWalker++){ + TreeNode* node = tmpWalker.GetNode(); + wxString name = node->GetData().name; + bool is_ok = node->GetData().itemId.IsOk(); + bool is_root = GetRootItem() == node->GetData().itemId; + bool is_expanded( false ); + if(!is_root && is_ok){ + is_expanded = IsExpanded(node->GetData().itemId); + } + + if(is_ok && !is_root && is_expanded){ + expandItems[name] = true; + } + counter++; + } + }else{ + expandRoot = true; + } + + //Walk over the tree and construct it + Freeze(); + if(m_tree != tree){ + Clear(); + }else{ + DeleteAllItems(); + } + m_tree = tree; + + //create the tree + wxTreeItemId root = AddRoot(m_tree->GetData().name); + tree->GetData().itemId = root; + TreeWalker walker(tree); + + for(; !walker.End(); walker++) + { + // Add the item to the tree + TreeNode* node = walker.GetNode(); + + // Skip root node + if(node->IsRoot()) + continue; + + wxTreeItemId parentHti = node->GetParent()->GetData().itemId; + if(parentHti.IsOk() == false){ + parentHti = root; + } + + //add the item to the tree + node->GetData().itemId = AppendItem( + parentHti, // parent + node->GetData().name, // display name + wxNOT_FOUND, // item image index + wxNOT_FOUND, // selected item image + new LocalVarData(node->GetData().name) + ); + m_sortItems[parentHti.m_pItem] = true; + } + SortTree(m_sortItems); + + //reset tree state + counter = 0; + TreeWalker secWalker(tree); + for(; !secWalker.End(); secWalker++) + { + TreeNode* node = secWalker.GetNode(); + if(expandItems.find(node->GetData().name) != expandItems.end()){ + //expand this item + if(node->GetData().itemId.IsOk()){ + Expand(node->GetData().itemId); + } + } + counter++; + } + + m_sortItems.clear(); + + if(!HasFlag(wxTR_HIDE_ROOT) && ItemHasChildren(root)){ //exclude the root + Expand(root); + } + + Thaw(); +} + +void LocalVarsTree::SortTree(std::map & nodes) +{ + std::map::iterator iter = nodes.begin(); + for(; iter != nodes.end(); iter++){ + wxTreeItemId item = iter->first; + if(item.IsOk()){ + // Does this node has children? + if( GetChildrenCount( item ) == 0 ) + continue; + SortChildren(item); + } + } +} + + diff --git a/LiteEditor/localvarstree.h b/LiteEditor/localvarstree.h new file mode 100644 index 0000000000..3cdcec681b --- /dev/null +++ b/LiteEditor/localvarstree.h @@ -0,0 +1,35 @@ +#ifndef LOCALVARSTREE_H +#define LOCALVARSTREE_H + +#include "wx/treectrl.h" +#include "debuggerobserver.h" +#include "tree_node.h" + +class LocalVarData : public wxTreeItemData +{ + wxString m_displayString; +public: + LocalVarData(const wxString &displayStr):m_displayString(displayStr){} + virtual ~LocalVarData(){} +}; + +class LocalVarsTree : public wxTreeCtrl +{ + TreeNode *m_tree; + std::map m_sortItems; + +protected: + void SortTree(std::map & nodes); + +public: + LocalVarsTree(wxWindow *parent, wxWindowID id, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT); + virtual ~LocalVarsTree(); + + void BuildTree(TreeNode *tree); + TreeNode *GetTree() {return m_tree;} + void Clear(); +}; + +#endif //LOCALVARSTREE_H + + diff --git a/LiteEditor/mainbook.cpp b/LiteEditor/mainbook.cpp new file mode 100644 index 0000000000..e4c8327b6f --- /dev/null +++ b/LiteEditor/mainbook.cpp @@ -0,0 +1,156 @@ +#include "mainbook.h" +#include "wx/choice.h" +#include "wx/xrc/xmlres.h" +#include "wx/log.h" +#include "manager.h" +#include "ctags_manager.h" +#include "editor.h" +#include "macros.h" + +MainBook::MainBook(wxChoice* choiceFunc, wxChoice* choiceScope) +: m_choiceFunc(choiceFunc) +, m_choiceScope(choiceScope) +{ + //Connect events + m_choiceFunc->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MainBook::OnFuncListMouseDown), NULL, this); + //m_choiceScope->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(MainBook::OnScopeListMouseDown), NULL, this); + ConnectChoice(m_choiceFunc, MainBook::OnFunction); + //ConnectChoice(m_choiceScope, MainBook::OnScope); +} + +MainBook::~MainBook() +{ +} + +void MainBook::OnScope(wxCommandEvent &e) +{ + wxUnusedVar(e); + int sel = e.GetSelection(); + if(sel != wxNOT_FOUND){ + TagEntry *tag = (TagEntry*) m_choiceScope->GetClientData(sel); + if(tag){ + ManagerST::Get()->OpenFile(tag->GetFile(), wxEmptyString, tag->GetLine()-1); + } + } +} + +void MainBook::OnFunction(wxCommandEvent &e) +{ + int sel = e.GetSelection(); + if(sel != wxNOT_FOUND){ + TagEntry *tag = (TagEntry*) m_choiceFunc->GetClientData(sel); + if(tag){ + ManagerST::Get()->OpenFile(tag->GetFile(), wxEmptyString, tag->GetLine()-1); + } + } +} + +void MainBook::Clear() +{ + if(!m_choiceFunc || !m_choiceScope) + return; + + m_choiceFunc->Freeze(); + m_choiceScope->Freeze(); + m_choiceFunc->Clear(); + m_choiceScope->Clear(); + m_choiceFunc->Thaw(); + m_choiceScope->Thaw(); +} + +void MainBook::UpdateScope(TagEntryPtr tag) +{ + if(!tag){ + return; + } + + if(!m_choiceFunc || !m_choiceScope) + return; + + wxString function; + function << tag->GetName() << tag->GetSignature(); + + m_choiceFunc->Freeze(); + m_choiceScope->Freeze(); + + m_choiceFunc->Clear(); + m_choiceScope->Clear(); + + m_choiceFunc->AppendString(function); + m_choiceScope->AppendString(tag->GetScope()); + + m_choiceFunc->SetSelection(0); + m_choiceScope->SetSelection(0); + + m_choiceFunc->Thaw(); + m_choiceScope->Thaw(); +} + +void MainBook::OnScopeListMouseDown(wxMouseEvent &e) +{ + TagsManager *tagsmgr = TagsManagerST::Get(); + Manager *mgr = ManagerST::Get(); + + if(mgr->IsWorkspaceOpen()){ + LEditor *editor = mgr->GetActiveEditor(); + if(editor){ + std::vector< TagEntryPtr > tags; + tagsmgr->GetScopesFromFile(editor->GetFileName(), tags); + m_choiceScope->Freeze(); + wxString cursel; + if(m_choiceScope->GetCount() > 0){ + cursel = m_choiceScope->GetStringSelection(); + } + + m_choiceScope->Clear(); + + if(tags.empty()){ + if(cursel.IsEmpty() == false && cursel != wxT("")){ + m_choiceScope->Append(wxT(""), (void*)NULL); + } + } + + for(size_t i=0; i< tags.size(); i++){ + m_choiceScope->Append(tags.at(i)->GetPath(), new TagEntry(*tags.at(i))); + } + + if(cursel.IsEmpty() == false){ + m_choiceScope->SetStringSelection(cursel); + } + m_choiceScope->Thaw(); + } + } + + e.Skip(); +} + +void MainBook::OnFuncListMouseDown(wxMouseEvent &e) +{ + TagsManager *tagsmgr = TagsManagerST::Get(); + Manager *mgr = ManagerST::Get(); + if(mgr->IsWorkspaceOpen()){ + LEditor *editor = mgr->GetActiveEditor(); + if(editor){ + std::vector< TagEntryPtr > tags; + tagsmgr->TagsFromFileAndScope(editor->GetFileName(), m_choiceScope->GetStringSelection(), tags); + m_choiceFunc->Freeze(); + + wxString cursel; + if(m_choiceFunc->GetCount() > 0){ + cursel = m_choiceFunc->GetStringSelection(); + } + + m_choiceFunc->Clear(); + for(size_t i=0; i< tags.size(); i++){ + m_choiceFunc->Append(tags.at(i)->GetName() + tags.at(i)->GetSignature(), new TagEntry(*tags.at(i))); + } + + if(cursel.IsEmpty() == false){ + m_choiceFunc->SetStringSelection(cursel); + } + m_choiceFunc->Thaw(); + } + } + e.Skip(); +} + diff --git a/LiteEditor/mainbook.h b/LiteEditor/mainbook.h new file mode 100644 index 0000000000..576d3b19b8 --- /dev/null +++ b/LiteEditor/mainbook.h @@ -0,0 +1,28 @@ +#ifndef MAINBOOK_H +#define MAINBOOK_H + +#include "wx/event.h" +#include "wx/string.h" +#include "entry.h" + +class wxChoice; + +class MainBook : public wxEvtHandler +{ + wxChoice *m_choiceFunc; + wxChoice *m_choiceScope; +protected: + void OnFuncListMouseDown(wxMouseEvent &e); + void OnScopeListMouseDown(wxMouseEvent &e); + void OnScope(wxCommandEvent &e); + void OnFunction(wxCommandEvent &e); + +public: + MainBook(wxChoice* choiceFunc, wxChoice* choiceScope); + ~MainBook(); + + void UpdateScope(TagEntryPtr tag); + void Clear(); +}; + +#endif //MAINBOOK_H diff --git a/LiteEditor/manager.cpp b/LiteEditor/manager.cpp new file mode 100644 index 0000000000..49f88b184d --- /dev/null +++ b/LiteEditor/manager.cpp @@ -0,0 +1,2302 @@ +#include "precompiled_header.h" +#include "fileexplorer.h" +#include "manager.h" +#include "ctags_manager.h" +#include "frame.h" +#include "editor.h" +#include "menumanager.h" +#include "language.h" +#include "editor_config.h" +#include "parse_thread.h" +#include "search_thread.h" +#include "workspace.h" +#include "cpp_symbol_tree.h" +#include "fileview.h" +#include +#include "wx/arrstr.h" +#include "context_manager.h" +#include "wx/tokenzr.h" +#include "buildmanager.h" +#include "macros.h" +#include "dirtraverser.h" +#include "depends_dlg.h" +#include "build_settings_config.h" +#include "dirsaver.h" +#include "editor_creator.h" +#include "algorithm" +#include "async_executable_cmd.h" +#include "fileutils.h" +#include "VariableLexer.h" +#include "MakefileParser.h" +#include "TargetLexer.h" +#include "workspace_pane.h" +#include "close_all_dlg.h" +#include "vcimporter.h" +#include "debuggermanager.h" +#include "shell_window.h" +#include "output_pane.h" +#include "localvarstree.h" +#include "wx/regex.h" +#include "simpletable.h" +#include "quickwatchdlg.h" +#include "fileexplorertree.h" +#include "listctrlpanel.h" +#include "breakpointdlg.h" +#include "globals.h" +#include "exelocator.h" +#include "attachdbgprocdlg.h" +//#include "debuggertip.h" +#include "openwindowspanel.h" +#include "threadlistpanel.h" +#include "plugin.h" + +#define CHECK_MSGBOX(res) \ + if( !res ) \ + { \ + wxMessageBox(errMsg, wxT("Error"), wxOK | wxICON_HAND); \ + return; \ + } + +#define CHECK_MSGBOX_BOOL(res) \ + if( !res ) \ + { \ + wxMessageBox(errMsg, wxT("Error"), wxOK | wxICON_HAND); \ + return res; \ + } + +static bool HideDebuggerPane = true; + +Manager::Manager(void) + : m_cleanRequest(NULL) + , m_compileRequest(NULL) + , m_asyncExeCmd(NULL) + , m_dbgCanInteract(false) + , m_quickWatchDlg(NULL) + , m_frameLineno(wxNOT_FOUND) + , m_useTipWin(false) + //, m_debuggerTipWin(NULL) + , m_tipWinPos(wxNOT_FOUND) +{ +} + +Manager::~Manager(void) +{ + UnInitialize(); +// if(m_debuggerTipWin){ +// delete m_debuggerTipWin; +// } + + if (m_cleanRequest) { + delete m_cleanRequest; + m_cleanRequest = NULL; + } + if (m_compileRequest) { + delete m_compileRequest; + m_compileRequest = NULL; + } +} + +wxFrame *Manager::GetMainFrame() +{ + return Frame::Get(); +} + +bool Manager::IsWorkspaceOpen() const +{ + return WorkspaceST::Get()->GetName().IsEmpty() == false; +} + +void Manager::OpenFile(const BrowseRecord &rec) +{ + OpenFile(rec.filename, rec.project, rec.lineno, rec.position); +} + +bool Manager::OpenFile(const wxString &file_name, const wxString &projectName, int lineno, long position) +{ + wxFileName fileName(file_name); + wxString projName(projectName); + wxFlatNotebook *notebook = Frame::Get()->GetNotebook(); + bool updTree = false; + bool fileWasOpenedInNB(false); + int selection(wxNOT_FOUND); + wxWindow *returnFocusWin(NULL); + + wxWindow *focusWin = wxWindow::FindFocus(); + if (focusWin == Frame::Get()->GetOutputPane()->GetDebugWindow()->GetInWin()) { + returnFocusWin = focusWin; + } + + //make sure that the notebook is visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Editor")); + if ( info.IsOk() && !info.IsShown()) { + info.Show(); + Frame::Get()->GetDockingManager().Update(); + } + + // Search to see if this file is already opened + // in the notebook + LEditor* editor = NULL; + size_t nCount = 0; + for (; nCount < (size_t)notebook ->GetPageCount(); nCount++) { + editor = dynamic_cast(notebook ->GetPage(nCount)); + if ( editor ) { + wxString f1 = editor->GetFileName().GetFullPath(); + wxString f2 = fileName.GetFullPath(); + if (f1 == f2) { + notebook ->SetSelection( nCount ); + selection = (int)nCount; + fileWasOpenedInNB = true; + break; + } + editor = NULL; + } + } + + //even in cases were a porject name is empty, we try + //to match a project name to the actual file. otherwise, CC may not work + //since it depends on a valid project name in the editor + if (projectName.IsEmpty()) { + projName = GetProjectNameByFile(fileName.GetFullPath()); + } + + if ( !editor ) { + /// Open the file and read the text + if (fileName.IsOk() == false) + return false; + + // make sure that the file exist + if ( !fileName.FileExists() ) + return false; + + // Create new editor and add it to the notebook + notebook->Freeze(); + // create new instance from pool + editor = EditorCreatorST::Get()->NewInstance(); + editor->Create(projName, fileName); + notebook->AddPage(editor, fileName.GetFullName(), true); + notebook->Thaw(); + selection = (int)notebook->GetPageCount()-1; + updTree = true; + } + + // Go to tag line number and gives scintilla the focus + if ( position != wxNOT_FOUND ) { + int lineno = editor->LineFromPosition(position); + editor->GotoLine( lineno ); + editor->SetCaretAt( position ); + } else { + if (!(fileWasOpenedInNB && lineno == wxNOT_FOUND)) { + editor->GotoLine( lineno ); + } + } + + //update the symbol tree + if (updTree && !editor->GetProject().IsEmpty()) + Frame::Get()->GetWorkspacePane()->BuildSymbolTree(fileName); + + //update the 'Recent file' history + AddToRecentlyOpenedFiles(fileName.GetFullPath()); + + if (selection != wxNOT_FOUND) { + notebook->SetSelection(selection); + } + + editor->SetProject( projName ); + + //Synchronize the file view tree + if (IsWorkspaceOpen()) { + Frame::Get()->GetWorkspacePane()->GetFileViewTree()->ExpandToPath(editor->GetProject(), editor->GetFileName()); + } + + //update the open files list + Frame::Get()->GetOpenWindowsPane()->UpdateList(); + editor->SetActive(); + + if (returnFocusWin) { + returnFocusWin->SetFocus(); + } + return true; +} + +void Manager::SetPageTitle(wxWindow *page, const wxString &name) +{ + wxFlatNotebook *nb = Frame::Get()->GetNotebook(); + int selection = nb->GetPageIndex(page); + if ( selection != -1 ) { + Frame::Get()->GetNotebook()->SetPageText(selection, name); + } +} + +const wxString Manager::GetPageTitle(wxWindow *page) +{ + wxFlatNotebook *nb = Frame::Get()->GetNotebook(); + int selection = nb->GetPageIndex(page); + if ( selection != -1 ) { + return Frame::Get()->GetNotebook()->GetPageText(selection); + } else { + return wxEmptyString; + } +} + +void Manager::SaveAll(bool includeUntitled) +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + size_t count = book->GetPageCount(); + + for (size_t i=0; i(book->GetPage(i)); + if ( !editor ) + continue; + + //if 'includeUntitled' is not true, dont save new documents that have + //not been saved to disk yet + if (!includeUntitled && editor->GetFileName().GetFullPath().StartsWith(wxT("Untitled"))) { + continue; + } + + if (editor->GetModify()) { + editor->SaveFile(); + } + } +} + +void Manager::UnInitialize() +{ + //stop the debugger + DbgStop(); + DebuggerMgr::Free(); + + // Release singleton objects + TagsManagerST::Free(); + LanguageST::Free(); + WorkspaceST::Free(); + ContextManager::Free(); + BuildManagerST::Free(); + BuildSettingsConfigST::Free(); + //----------------------------------------------------- + // Stop the parser thread and release its resources + // This is required if you want to avoid memory leaks + // Stopping the parser thread can take up to several + // seconds + // since we block until the thread complets its current + // work on the queue + //----------------------------------------------------- + ParseThreadST::Get()->Stop(); + ParseThreadST::Free(); + + // Stop the search thread and free its resources + SearchThreadST::Get()->Stop(); + SearchThreadST::Free(); + + //stop the creator thread + EditorCreatorST::Free(); + + wxFlatNotebook::CleanUp(); + MenuManager::Free(); + EditorConfigST::Free(); + + //free all plugins + PluginManager::Get()->UnLoad(); +} + +void Manager::CreateEnvironmentVars(const wxString &path) +{ + //initialize some environment variable to be available for this workspace + EnvironmentVarieblesPtr env = GetEnvironmentVariables(); + wxFileName filepath(path); + env->SetEnv(wxT("WorkspaceName"), WorkspaceST::Get()->GetName()); + env->SetEnv(wxT("WorkspacePath"), filepath.GetPath(wxPATH_GET_VOLUME, wxPATH_UNIX)); + SetEnvironmentVariables(env); +} + +void Manager::CreateWorkspace(const wxString &name, const wxString &path) +{ + // make sure that the workspace pane is visible + ShowWorkspacePane(WorkspacePane::FILE_VIEW); + + wxString errMsg; + bool res = WorkspaceST::Get()->CreateWorkspace(name, path, errMsg); + CHECK_MSGBOX(res); + OpenWorkspace(path + PATH_SEP + name + wxT(".workspace")); +} + +void Manager::CreateProject(ProjectData &data) +{ + wxString errMsg; + bool res = WorkspaceST::Get()->CreateProject(data.m_name, + data.m_path, + data.m_srcProject->GetSettings()->GetProjectType(), + errMsg); + CHECK_MSGBOX(res); + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(data.m_name, errMsg); + //copy the project settings to the new one + proj->SetSettings(data.m_srcProject->GetSettings()); + ProjectSettingsPtr settings = proj->GetSettings(); + + //set the compiler type + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); + while (bldConf) { + bldConf->SetCompilerType(data.m_cmpType); + bldConf = settings->GetNextBuildConfiguration(cookie); + } + proj->SetSettings(settings); + RebuildFileView(); +} + +void Manager::CloseWorkspace() +{ + //close any debugging session that is currently opened + DbgStop(); + + //clear any pending & actual breakpoints from the debugger manager + //DebuggerMgr::Get().DelAllBreakpoints(); + + WorkspaceST::Get()->CloseWorkspace(); + //clear the 'buid' tab + Frame::Get()->GetOutputPane()->Clear(); + + //clear the navigation bar + Frame::Get()->GetMainBook()->Clear(); + + //close all open files, and clear trees + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + int count = book->GetPageCount(); + for (int i=count-1; i>=0; i--) { + LEditor *page = dynamic_cast(book->GetPage((size_t)i)); + if (page) { + book->DeletePage((size_t)i); + } + } + + Frame::Get()->GetNotebook()->Refresh(); + Frame::Get()->GetWorkspacePane()->BuildFileTree(); + SetStatusMessage(wxEmptyString, 1); +} + +void Manager::OpenWorkspace(const wxString &path) +{ + CloseWorkspace(); + + // make sure that the workspace pane is visible + ShowWorkspacePane(WorkspacePane::FILE_VIEW); + + wxString errMsg; + bool res = WorkspaceST::Get()->OpenWorkspace(path, errMsg); + CHECK_MSGBOX(res); + + // update status bar + wxString dbfile = WorkspaceST::Get()->GetStringProperty(wxT("Database"), errMsg); + + wxFileName fn(dbfile); + SetStatusMessage(wxString::Format(wxT("Workspace DB: '%s'"), fn.GetFullName().GetData()), 1); + + // load ctags options + wxBusyCursor cursor; + + //initialize some environment variable to be available for this workspace + CreateEnvironmentVars(path); + Frame::Get()->GetWorkspacePane()->BuildFileTree(); + + //Update the configuration choice on the toolbar + DoUpdateConfigChoiceControl(); + + //update the 'Recent Workspace' history + AddToRecentlyOpenedWorkspaces(path); + + FileExplorer *fe = Frame::Get()->GetFileExplorer(); + wxFileName filename(path); + fe->GetFileTree()->ExpandToPath(filename.GetPath() + wxT("/")); + + SendCmdEvent(wxEVT_WORKSPACE_LOADED); +} + +void Manager::DoUpdateConfigChoiceControl() +{ + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxComboBox *choice = Frame::Get()->GetConfigChoice(); + + choice->Enable(true); + choice->Freeze(); + + std::list confs = matrix->GetConfigurations(); + std::list::iterator iter = confs.begin(); + choice->Clear(); + for (; iter != confs.end(); iter++) { + choice->Append((*iter)->GetName()); + } + + if (choice->GetCount() > 0) { + int where = choice->FindString(matrix->GetSelectedConfigurationName()); + if (where != wxNOT_FOUND) { + choice->SetSelection(where); + } else { + choice->SetSelection(0); + } + } + + choice->Thaw(); +} + +ProjectTreePtr Manager::GetProjectFileViewTree(const wxString &projectName) +{ + if ( !IsWorkspaceOpen() ) { + return NULL; + } + + wxString err_msg; + ProjectPtr prj = WorkspaceST::Get()->FindProjectByName(projectName, err_msg); + if ( !prj ) { + return NULL; + } + return prj->AsTree(); +} + +void Manager::GetProjectList(wxArrayString &list) +{ + WorkspaceST::Get()->GetProjectList(list); +} + +void Manager::AddProject(const wxString & path) +{ + wxString errMsg; + bool res = WorkspaceST::Get()->AddProject(path, errMsg); + CHECK_MSGBOX(res); + + //retag the newly added project + wxFileName fn(path); + RetagProject(fn.GetName()); + RebuildFileView(); +} + +void Manager::RebuildFileView() +{ + // update symbol tree + WorkspacePane *wp = Frame::Get()->GetWorkspacePane(); + wp->BuildFileTree(); +} + +bool Manager::RemoveProject(const wxString &name) +{ + if ( name.IsEmpty() ) { + return false; + } + + ProjectPtr proj = GetProject(name); + + wxString errMsg; + bool res = WorkspaceST::Get()->RemoveProject(name, errMsg); + CHECK_MSGBOX_BOOL(res); + + if (proj) { + //remove symbols from the database + std::vector projectFiles; + proj->GetFiles(projectFiles, true); + TagsManagerST::Get()->DeleteFilesTags(projectFiles); + RemoveProjectNameFromOpenFiles(projectFiles); + } // if(proj) + + Frame::Get()->GetWorkspacePane()->GetFileViewTree()->BuildTree(); + return true; +} + +void Manager::RemoveProjectNameFromOpenFiles(const std::vector &project_files) +{ + //go over all open tabs, if a file belongs to the closed + //project, remove the project name from the container editor, + //this will pervent the parser thread to parse this file after + //its parent project was removed + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + for (size_t i=0; i<(size_t)book->GetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage(i)); + if (editor) { + wxString openFileFP = editor->GetFileName().GetFullPath(); + for (size_t j=0; jSetProject(wxEmptyString); + break; + } + } + } + } +} + +wxString Manager::GetActiveProjectName() +{ + return WorkspaceST::Get()->GetActiveProjectName(); +} + +void Manager::SetActiveProject(const wxString &name) +{ + WorkspaceST::Get()->SetActiveProject(WorkspaceST::Get()->GetActiveProjectName(), false); + WorkspaceST::Get()->SetActiveProject(name, true); +} + + +void Manager::AddVirtualDirectory(const wxString &virtualDirFullPath) +{ + wxString errMsg; + bool res = WorkspaceST::Get()->CreateVirtualDirectory(virtualDirFullPath, errMsg); + CHECK_MSGBOX(res); +} + +void Manager::RemoveVirtualDirectory(const wxString &virtualDirFullPath) +{ + wxString errMsg; + wxString project = virtualDirFullPath.BeforeFirst(wxT(':')); + ProjectPtr p = WorkspaceST::Get()->FindProjectByName(project, errMsg); + if ( !p ) { + return; + } + + // Update symbol tree and database + wxString vdPath = virtualDirFullPath.AfterFirst(wxT(':')); + wxArrayString files; + p->GetFilesByVirtualDir(vdPath, files); + for (size_t i=0; iGetName()); + } + + //and finally, remove the virtual dir from the workspace + bool res = WorkspaceST::Get()->RemoveVirtualDirectory(virtualDirFullPath, errMsg); + CHECK_MSGBOX(res); +} + +void Manager::SaveWorkspace() +{ + WorkspaceST::Get()->Save(); +} + +bool Manager::AddNewFileToProject(const wxString &fileName, const wxString &vdFullPath, bool openIt ) +{ + wxFile file; + if (!file.Create(fileName.GetData(), true)) + return false; + + if (file.IsOpened()) { + file.Close(); + } + + return AddFileToProject(fileName, vdFullPath, openIt); +} + +bool Manager::AddFileToProject(const wxString &fileName, const wxString &vdFullPath, bool openIt ) +{ + wxString project; + project = vdFullPath.BeforeFirst(wxT(':')); + + // Add the file to the project + wxString errMsg; + bool res = WorkspaceST::Get()->AddNewFile(vdFullPath, fileName, errMsg); + if (!res) { + //file or virtual dir does not exist + return false; + } + + if ( openIt ) { + OpenFile(fileName, project); + } + + TagTreePtr ttp; + if ( project.IsEmpty() == false ) { + std::vector comments; + if (TagsManagerST::Get()->GetParseComments()) { + ttp = TagsManagerST::Get()->ParseSourceFile(fileName, &comments); + TagsManagerST::Get()->StoreComments(comments); + } else { + ttp = TagsManagerST::Get()->ParseSourceFile(fileName); + } + TagsManagerST::Get()->Store(ttp); + } + + //send notification command event that files was added to + //project + wxArrayString files; + files.Add(fileName); + SendCmdEvent(wxEVT_PROJ_FILE_ADDED, (void*)&files); + return true; +} + +void Manager::AddFilesToProject(const wxArrayString &files, const wxString &vdFullPath, wxArrayString &actualAdded) +{ + wxString project; + project = vdFullPath.BeforeFirst(wxT(':')); + + // Add the file to the project + wxString errMsg; + //bool res = true; + size_t i=0; + + //try to find this file in the workspace + for (i=0; iGetProjectNameByFile(files.Item(i)); + if (projName.IsEmpty()) { + actualAdded.Add(files.Item(i)); + } + } + + for (i=0; iAddNewFile(vdFullPath, actualAdded.Item(i), errMsg); + } + + //convert wxArrayString to vector for the ctags api + std::vector vFiles; + for (size_t i=0; iRetagFiles(vFiles); + } + + SendCmdEvent(wxEVT_PROJ_FILE_ADDED, (void*)&actualAdded); +} + +bool Manager::RemoveFile(const wxString &fileName, const wxString &vdFullPath) +{ + // First, close any open tab with this file + wxFlatNotebook* nb = dynamic_cast(Frame::Get()->GetNotebook()); + if ( !nb ) { + return false; + } + + wxString project = vdFullPath.BeforeFirst(wxT(':')); + wxFileName absPath(fileName); + absPath.MakeAbsolute(GetProjectCwd(project)); + + int count = nb->GetPageCount(); + for (int i=0; i(nb->GetPage(static_cast(i))); + if ( editor ) { + wxString fn = editor->GetFileName().GetFullPath(); + + if (fn == absPath.GetFullPath() && editor->GetProject() == project) { + nb->DeletePage(static_cast(i)); + break; + } + } + } + + wxString errMsg; + bool res = WorkspaceST::Get()->RemoveFile(vdFullPath, fileName, errMsg); + CHECK_MSGBOX_BOOL(res); + + RemoveFileFromSymbolTree(absPath, project); + return true; +} + +void Manager::RemoveFileFromSymbolTree(const wxFileName &fileName, const wxString &project) +{ + if ( project.IsEmpty() == false ) { + // Remove the file from the tags database as well + TagsManagerST::Get()->Delete(TagsManagerST::Get()->GetDatabase()->GetDatabaseFileName(), fileName.GetFullPath()); + } +} + +wxString Manager::GetProjectCwd(const wxString &project) const +{ + wxString errMsg; + ProjectPtr p = WorkspaceST::Get()->FindProjectByName(project, errMsg); + if ( !p ) { + return wxGetCwd(); + } + + wxFileName projectFileName(p->GetFileName()); + projectFileName.MakeAbsolute(); + return projectFileName.GetPath(); +} + +void Manager::ShowOutputPane(wxString focusWin, bool commit) +{ + // make the output pane visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Output")); + if ( info.IsOk() && !info.IsShown() ) { + info.Show(); + if (commit) { + Frame::Get()->GetDockingManager().Update(); + } + } + + // set the selection to focus win + OutputPane *pane = Frame::Get()->GetOutputPane(); + int index = pane->CaptionToIndex(focusWin); + if ( index != wxNOT_FOUND && index != pane->GetNotebook()->GetSelection()) { + pane->GetNotebook()->SetSelection((size_t)index); + } +} + + +void Manager::ShowDebuggerPane(bool commit) +{ + // make the output pane visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if ( info.IsOk() && !info.IsShown() ) { + info.Show(); + if (commit) { + Frame::Get()->GetDockingManager().Update(); + } + } +} + +void Manager::HidePane(const wxString &paneName, bool commit) +{ + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(paneName); + if ( info.IsOk() && info.IsShown()) { + info.Hide(); + if (commit) { + Frame::Get()->GetDockingManager().Update(); + } + } +} + +void Manager::ShowWorkspacePane(wxString focusWin, bool commit) +{ + // make the output pane visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Workspace")); + if ( info.IsOk() && !info.IsShown() ) { + info.Show(); + if (commit) { + Frame::Get()->GetDockingManager().Update(); + } + } + + // set the selection to focus win + WorkspacePane *pane = Frame::Get()->GetWorkspacePane(); + int index = pane->CaptionToIndex(focusWin); + if ( index != wxNOT_FOUND && index != pane->GetNotebook()->GetSelection()) { + pane->GetNotebook()->SetSelection((size_t)index); + } +} + +ContextBasePtr Manager::NewContextByFileName(const wxFileName &fileName, LEditor *parent) const +{ + EditorConfig::ConstIterator iter = EditorConfigST::Get()->LexerBegin(); + for (; iter != EditorConfigST::Get()->LexerEnd(); iter++) { + LexerConfPtr lexer = iter->second; + wxString lexExt = lexer->GetFileSpec(); + wxStringTokenizer tkz(lexExt, wxT(";")); + while (tkz.HasMoreTokens()) { + if (wxMatchWild(tkz.NextToken(), fileName.GetFullName())) { + return ContextManager::Get()->NewContext(parent, lexer->GetName()); + } + } + } + + // return the default context + return ContextManager::Get()->NewContext(parent, wxT("Text")); +} + +void Manager::ApplySettingsChanges() +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + size_t count = (size_t)book->GetPageCount(); + for (size_t i=0; i(book->GetPage(i)); + if (editor) { + // the open page is of type LEditor + editor->SetSyntaxHighlight(editor->GetContext()->GetName()); + } + } +} + +ProjectSettingsPtr Manager::GetProjectSettings(const wxString &projectName) const +{ + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(projectName, errMsg); + if ( !proj ) { + wxMessageBox(errMsg, wxT("CodeLite"), wxOK | wxICON_HAND); + return NULL; + } + + return proj->GetSettings(); +} + +void Manager::SetProjectSettings(const wxString &projectName, ProjectSettingsPtr settings) +{ + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(projectName, errMsg); + if ( !proj ) { + wxMessageBox(errMsg, wxT("CodeLite"), wxOK | wxICON_HAND); + return; + } + + proj->SetSettings(settings); +} + +BuildMatrixPtr Manager::GetWorkspaceBuildMatrix() const +{ + return WorkspaceST::Get()->GetBuildMatrix(); +} + +void Manager::SetWorkspaceBuildMatrix(BuildMatrixPtr matrix) +{ + WorkspaceST::Get()->SetBuildMatrix(matrix); +} + +void Manager::TogglePanes() +{ + static bool workspaceShown = false; + static bool outputShown = false; + static bool debuggerShown = false; + static bool fileExplorerShown = false; + static bool toggled = false; + + Frame::Get()->Freeze(); + if (!toggled) { + wxAuiPaneInfo info; + info = Frame::Get()->GetDockingManager().GetPane(wxT("Output")); + if ( info.IsOk() ) { + outputShown = info.IsShown(); + } + info = Frame::Get()->GetDockingManager().GetPane(wxT("Workspace")); + if ( info.IsOk() ) { + workspaceShown = info.IsShown(); + } + + info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if ( info.IsOk() ) { + debuggerShown = info.IsShown(); + } + + info = Frame::Get()->GetDockingManager().GetPane(wxT("File Explorer")); + if ( info.IsOk() ) { + fileExplorerShown = info.IsShown(); + } + + HidePane(wxT("Output"), false); + HidePane(wxT("Workspace"), false); + HidePane(wxT("Debugger"), false); + HidePane(wxT("File Explorer"), false); + + //update changes + Frame::Get()->GetDockingManager().Update(); + toggled = true; + + } else { + + if (outputShown) { + ShowOutputPane(wxEmptyString, false); + } + + if (workspaceShown) { + ShowWorkspacePane(wxEmptyString, false); + } + + if (debuggerShown) { + ShowDebuggerPane(false); + } + + if (fileExplorerShown) { + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("File Explorer")); + if ( info.IsOk() && !info.IsShown() ) { + info.Show(); + } + } + + Frame::Get()->GetDockingManager().Update(); + toggled = false; + } + Frame::Get()->Thaw(); +} + +void Manager::SetEnvironmentVariables(EnvironmentVarieblesPtr env) +{ + WorkspaceST::Get()->SetEnvironmentVariables(env); +} + +EnvironmentVarieblesPtr Manager::GetEnvironmentVariables() const +{ + return WorkspaceST::Get()->GetEnvironmentVariables(); +} + +bool Manager::CreateDefaultNewCompiler(const wxString &name) +{ + if (BuildSettingsConfigST::Get()->IsCompilerExist(name)) { + wxMessageBox(wxT("A compiler with this name already exist"), wxT("Error"), wxOK | wxICON_HAND); + return false; + } + + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(name); + cmp->SetName(name); + BuildSettingsConfigST::Get()->SetCompiler(cmp); + return true; +} + +bool Manager::DeleteCompiler(const wxString &name) +{ + if (wxMessageBox(wxT("Remove Compiler?"), wxT("Confirm"), wxYES_NO | wxICON_QUESTION) == wxYES) { + BuildSettingsConfigST::Get()->DeleteCompiler(name); + return true; + } + return false; +} + +void Manager::GetProjectTemplateList(std::list &list) +{ + wxString tmplateDir = m_startupDir + PATH_SEP + wxT("templates"); + + //read all files under this directory + DirTraverser dt(wxT("*.project")); + + wxDir dir(tmplateDir); + dir.Traverse(dt); + + wxArrayString &files = dt.GetFiles(); + + if (files.GetCount() > 0) { + for (size_t i=0; iLoad(files.Item(i)); + list.push_back(proj); + } + } else { + //create 3 default empty projects + ProjectPtr exeProj(new Project()); + ProjectPtr libProj(new Project()); + ProjectPtr dllProj(new Project()); + libProj->Create(wxT("Static Library"), tmplateDir, Project::STATIC_LIBRARY); + dllProj->Create(wxT("Dynamic Library"), tmplateDir, Project::DYNAMIC_LIBRARY); + exeProj->Create(wxT("Executable"), tmplateDir, Project::EXECUTABLE); + list.push_back(libProj); + list.push_back(dllProj); + list.push_back(exeProj); + } +} + +void Manager::SaveProjectTemplate(ProjectPtr proj, const wxString &name) +{ + //create new project + wxString tmplateDir = m_startupDir + PATH_SEP + wxT("templates"); + + ProjectPtr cloned(new Project()); + cloned->Create(name, tmplateDir); + + //copy project settings + cloned->SetSettings(proj->GetSettings()); +} + +ProjectPtr Manager::GetProject(const wxString &name) const +{ + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(name, errMsg); + if ( !proj ) { + wxMessageBox(errMsg, wxT("Error"), wxOK | wxICON_HAND); + return NULL; + } + return proj; +} + + +void Manager::PopupProjectDependsDlg(const wxString &projectName) +{ + DependenciesDlg *dlg = new DependenciesDlg(GetMainFrame(), projectName); + dlg->ShowModal(); + dlg->Destroy(); +} + +void Manager::CleanProject(const wxString &projectName, bool projectOnly) +{ + if ( m_cleanRequest && m_cleanRequest->IsBusy() ) { + return; + } + + if ( m_cleanRequest ) { + delete m_cleanRequest; + } + + m_cleanRequest = new CleanRequest(GetMainFrame(), projectName, projectOnly); + m_cleanRequest->Process(); +} + +bool Manager::IsBuildEndedSuccessfully() const +{ + //build is still running? + if ( m_compileRequest && m_compileRequest->IsBusy() ) { + return false; + } + + wxArrayString lines; + if (m_compileRequest) { + if (!m_compileRequest->GetLines(lines)) { + return false; + } + + //check every line to see if we got an error/warning + wxString project(m_compileRequest->GetProjectName()); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(bldConf->GetCompilerType()); + wxString errPattern = cmp->GetErrPattern(); + wxString warnPattern = cmp->GetWarnPattern(); + + wxRegEx reErr(errPattern); + wxRegEx reWarn(warnPattern); + for (size_t i=0; iIsBusy() ) { + return; + } + + if ( m_compileRequest ) { + delete m_compileRequest; + m_compileRequest = NULL; + } + + //save all files before compiling, but dont saved new documents + SaveAll(false); + + //If a debug session is running, stop it. + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + if (wxMessageBox(wxT("This would terminate the current debug session, continue?"), wxT("Confirm"), wxICON_QUESTION|wxYES_NO|wxCANCEL) != wxYES) { + return; + } else { + DbgStop(); + } + } + m_compileRequest = new CompileRequest(GetMainFrame(), projectName, projectOnly); + m_compileRequest->Process(); +} + +void Manager::CompileFile(const wxString &projectName, const wxString &fileName) +{ + if ( m_compileRequest && m_compileRequest->IsBusy() ) { + return; + } + + if ( m_compileRequest ) { + delete m_compileRequest; + m_compileRequest = NULL; + } + + //save all files before compiling, but dont saved new documents + SaveAll(false); + + //If a debug session is running, stop it. + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + if (wxMessageBox(wxT("This would terminate the current debug session, continue?"), wxT("Confirm"), wxICON_QUESTION|wxYES_NO|wxCANCEL) != wxYES) { + return; + } else { + DbgStop(); + } + } + + m_compileRequest = new CompileRequest(GetMainFrame(), projectName, false, fileName); + m_compileRequest->Process(); +} + +void Manager::StopBuild() +{ + if ( m_compileRequest && !m_compileRequest->IsBusy() ) { + return; + } + + if ( m_compileRequest ) { + m_compileRequest->Stop(); + } +} + +bool Manager::IsBuildInProgress() const +{ + return (m_cleanRequest && m_cleanRequest->IsBusy()) || (m_compileRequest && m_compileRequest->IsBusy()); +} + +bool Manager::IsProgramRunning() const +{ + if (m_asyncExeCmd == NULL) + return false; + + return (m_asyncExeCmd && m_asyncExeCmd->IsBusy()); +} + +void Manager::DebugMessage(wxString msg) +{ + static wxString lastMessage(wxEmptyString); + msg = msg.Trim(false); + if(lastMessage != msg){ + Frame::Get()->GetOutputPane()->AppendText(OutputPane::OUTPUT_DEBUG, msg); + lastMessage = msg; + } +} + +void Manager::ExecuteNoDebug(const wxString &projectName) +{ + //an instance is already running + if (m_asyncExeCmd && m_asyncExeCmd->IsBusy()) { + return; + } + + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(projectName); + + //expand variables + wxString cmd = bldConf->GetCommand(); + cmd = ExpandVariables(cmd, GetProject(projectName)); + + wxString cmdArgs = bldConf->GetCommandArguments(); + cmdArgs = ExpandVariables(cmdArgs, GetProject(projectName)); + + //execute command & cmdArgs + wxString execLine(cmd + wxT(" ") + cmdArgs); + wxString wd = bldConf->GetWorkingDirectory(); + wd = ExpandVariables(wd, GetProject(projectName)); + + //change directory to the working directory + DirSaver ds; + + ProjectPtr proj = GetProject(projectName); + //print the current directory + ::wxSetWorkingDirectory(proj->GetFileName().GetPath()); + DebugMessage(wxT("Setting working directory to: ") + proj->GetFileName().GetPath() + wxT("\n")); + + //now set the working directory according to working directory field from the + //project settings + ::wxSetWorkingDirectory(wd); + DebugMessage(wxT("Setting working directory to: ") + wd + wxT("\n")); + + //execute the command line + //the async command is a one time executable object, + m_asyncExeCmd = new AsyncExeCmd(GetMainFrame()); + +#if defined(__WXMAC__) + execLine = wxString( wxT("osascript -e 'tell application \"Terminal\"'")) + + wxT(" -e 'activate'") + + wxT(" -e 'do script with command \"cd ") + proj->GetFileName().GetPath() + wxT(" && cd ") + wd + wxT(" && ") + execLine + wxT("\"'") + + wxT(" -e 'end tell'"); +#elif defined(__WXGTK__) + //set a console to the execute target + wxString term; + term << wxT("xterm -title "); + term << wxT("'") << execLine << wxT("'"); + term << wxT(" -e "); + execLine.Prepend(term); +#endif + + //execute the program: + //- no hiding the console + //- no redirection of the stdin/out + m_asyncExeCmd->Execute(execLine, false, false); + if (m_asyncExeCmd->GetProcess()) + m_asyncExeCmd->GetProcess()->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(Manager::OnProcessEnd), NULL, this); +} + +void Manager::OnProcessEnd(wxProcessEvent &event) +{ + m_asyncExeCmd->ProcessEnd(event); + m_asyncExeCmd->GetProcess()->Disconnect(wxEVT_END_PROCESS, wxProcessEventHandler(Manager::OnProcessEnd), NULL, this); + delete m_asyncExeCmd; + m_asyncExeCmd = NULL; +} + +void Manager::SetWorkspaceConfigurationName(const wxString &name) +{ + BuildMatrixPtr matrix = GetWorkspaceBuildMatrix(); + matrix->SetSelectedConfigurationName(name); + SetWorkspaceBuildMatrix(matrix); +} + +void Manager::ShowMainToolbar(bool show) +{ + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Standard Toolbar")); + if (info.IsOk() && show && !info.IsShown()) { + info.Show(); + Frame::Get()->GetDockingManager().Update(); + } else if (info.IsOk() && !show && info.IsShown()) { + info.Hide(); + Frame::Get()->GetDockingManager().Update(); + } +} + +BuildConfigPtr Manager::GetActiveProjectBuildConf() +{ + BuildMatrixPtr matrix = GetWorkspaceBuildMatrix(); + wxString projConf = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(), GetActiveProjectName()); + ProjectSettingsPtr settings = GetProjectSettings(GetActiveProjectName()); + return settings->GetBuildConfiguration(projConf); +} + +void Manager::SetExternalDatabase(const wxFileName &dbname) +{ + //close any opened external database + CloseExternalDatabase(); + + // build the external database + TagsManagerST::Get()->OpenExternalDatabase(dbname); + + if (TagsManagerST::Get()->GetExtDatabase()->IsOpen()) { + SetStatusMessage(wxString::Format(wxT("External DB: '%s'"), dbname.GetFullName().GetData()), 2); + EditorConfigST::Get()->SetTagsDatabase(dbname.GetFullPath()); + } +} + +void Manager::GetWorkspaceFiles(std::vector &files, bool absPath) +{ + wxArrayString projects; + GetProjectList(projects); + for (size_t i=0; iGetFiles(files, absPath); + } +} + +bool Manager::IsFileInWorkspace(const wxString &fileName) +{ + wxFileName findme(fileName); + std::vector files; + + GetWorkspaceFiles(files); + std::vector::const_iterator iter = std::find(files.begin(), files.end(), findme); + return iter != files.end(); +} + +void Manager::RetagProject(const wxString &projectName) +{ + //get the project file list + ProjectPtr proj = GetProject(projectName); + if ( proj ) { + //change the directory to the project dir + std::vector projectFiles; + proj->GetFiles(projectFiles, true); + + //call tags manager for retagging + TagsManagerST::Get()->RetagFiles(projectFiles); + } +} + +void Manager::RetagWorkspace() +{ + wxArrayString projects; + GetProjectList(projects); + std::vector projectFiles; + + for (size_t i=0; iGetFiles(projectFiles, true); + } + } + //call tags manager for retagging + TagsManagerST::Get()->RetagFiles(projectFiles); +} + +void Manager::WriteProgram(const wxString &line) +{ + if (!IsProgramRunning()) + return; + + if(m_asyncExeCmd->GetProcess()->GetRedirect() == false){ + return; + } + + wxOutputStream *out = m_asyncExeCmd->GetOutputStream(); + if ( out ) { + wxString cmd(line); + cmd += wxT("\n"); + + const wxCharBuffer pWriteData = _C(cmd); + out->Write(pWriteData.data(), cmd.Length()); + } +} + +void Manager::KillProgram() +{ + if (!IsProgramRunning()) + return; + + m_asyncExeCmd->Terminate(); +} + +wxString Manager::GetProjectNameByFile(const wxString &fullPathFileName) +{ + wxArrayString projects; + GetProjectList(projects); + + std::vector files; + for (size_t i=0; iGetFiles(files, true); + + for (size_t xx=0; xxGetName(); + } + } + } + + return wxEmptyString; +} + +void Manager::ImportFromMakefile(const wxString &path) +{ + DebugMessage(path + wxT("\n")); + + wxFileName fileName = path; + DebugMessage(fileName.GetPath() + wxT("\n")); + + VariableLexer expander(path); + wxArrayString expanded = expander.getResult(); + + MakefileParser parser(expanded); + TypedStrings parsed = parser.getResult(); + + TargetLexer lexer(parsed); + Targets lexed = lexer.getResult(); + CreateWorkspace(wxT("import_from_") + fileName.GetName(), fileName.GetPath()); + + wxArrayString extentions; + extentions.Add(wxT(".h")); + extentions.Add(wxT(".hpp")); + extentions.Add(wxT(".c")); + extentions.Add(wxT(".cc")); + extentions.Add(wxT(".cpp")); + extentions.Add(wxT(".cxx")); + + for (size_t i = 0; i < lexed.size(); i++) { + Target targ = lexed[i]; + wxArrayString deps = targ.getDeps(); + + ProjectPtr proj(new Project()); + proj->Create(targ.getName(), fileName.GetPath(), wxT("importedProject")); + proj->SetSettings(new ProjectSettings(NULL)); + + for (size_t j = 0; j < deps.size(); j++) { + wxString dep = deps[j]; + if (dep.Right(2) == wxT(".o")) { // string ends with .o! + wxString file = dep.Left(dep.size()-2); + + for (size_t k = 0; k < extentions.size(); k++) { + wxString ext = extentions[k]; + wxFileName fileName = proj->GetFileName().GetPathWithSep() + file + ext; + if (fileName.FileExists()) { + bool added = proj->AddFile(fileName.GetFullPath(), wxT("Source Files")); + if (!added) { + DebugMessage(wxT("WHOOPS WRONG BAD NOT GOOD!\n")); + } + } + } + } else if (deps.Index(dep, false) != wxNOT_FOUND) { + wxArrayString dependencies= proj->GetDependencies(); + dependencies.Add(dep); + proj->SetDependencies(dependencies); + } + } + proj->Save(); + //AddProject(proj->GetFileName().GetFullPath()); + } + return; +} + +LEditor *Manager::FindEditorByFileName(const wxString &fileName) const +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + if (!book) { + return NULL; + } + book->GetPageCount(); + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor && editor->GetFileName().GetFullPath() == fileName) { + return editor; + } + } + return NULL; +} + +LEditor *Manager::GetActiveEditor() const +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + if (!book) { + return NULL; + } + + int selected = book->GetSelection(); + if (selected == wxNOT_FOUND) + return NULL; + + LEditor *editor = dynamic_cast(book->GetPage(selected)); + return editor; +} + +void Manager::AddToRecentlyOpenedFiles(const wxString &fileName) +{ + //get list recently opened files + wxArrayString files; + EditorConfig *cfg = EditorConfigST::Get(); + cfg->GetRecentlyOpenedFies(files); + + if (files.Index(fileName) == wxNOT_FOUND) { + //the file does not exist, add it and save the list + files.Add(fileName); + m_recentFiles.AddFileToHistory(fileName); + } + + files.Empty(); + //sync between the history object and the configuration file + m_recentFiles.GetFiles(files); + cfg->SetRecentlyOpenedFies(files); +} + +void Manager::AddToRecentlyOpenedWorkspaces(const wxString &fileName) +{ + //get list recently opened files + wxArrayString files; + EditorConfig *cfg = EditorConfigST::Get(); + cfg->GetRecentlyOpenedWorkspaces(files); + + if (files.Index(fileName) == wxNOT_FOUND) { + //the file does not exist, add it and save the list + files.Add(fileName); + m_recentWorkspaces.AddFileToHistory(fileName); + } + files.Empty(); + //sync between the history object and the configuration file + m_recentWorkspaces.GetFiles(files); + cfg->SetRecentlyOpenedWorkspaces(files); +} + +void Manager::GetRecentlyOpenedFiles(wxArrayString &files) +{ + EditorConfig *cfg = EditorConfigST::Get(); + cfg->GetRecentlyOpenedFies(files); +} + +void Manager::GetRecentlyOpenedWorkspaces(wxArrayString &files) +{ + EditorConfig *cfg = EditorConfigST::Get(); + cfg->GetRecentlyOpenedWorkspaces(files); +} + +void Manager::CloseExternalDatabase() +{ + TagsManager *mgr = TagsManagerST::Get(); + mgr->CloseExternalDatabase(); + //remove the entry from the status bar + SetStatusMessage(wxEmptyString, 2); +} + +void Manager::SetStatusMessage(const wxString &msg, int col) +{ + Frame::Get()->GetStatusBar()->SetStatusText(msg, col); +} + +void Manager::CloseAllButThis(wxWindow *curreditor) +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + bool idxToDelete(0);//can be 1 or 0 + while(book->GetPageCount() > 1){ + if(book->GetPage(0) == curreditor){ + idxToDelete = 1; + } + book->DeletePage(idxToDelete); + } +} + +void Manager::CloseAll() +{ + bool modifyDetected = false; + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + Frame::Get()->GetOpenWindowsPane()->Clear(); + + //check if any of the files is modified + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor) { + if (editor->GetModify()) { + modifyDetected = true; + break; + } + } + } + + int retCode(CLOSEALL_DISCARDALL); + CloseAllDialog *dlg(NULL); + + if (modifyDetected) { + dlg = new CloseAllDialog(Frame::Get()); + retCode = dlg->ShowModal(); + dlg->Destroy(); + } + + switch (retCode) { + case CLOSEALL_SAVEALL: { + ManagerST::Get()->SaveAll(); + //and now close them all + book->DeleteAllPages(); + book->Refresh(); + } + break; + case CLOSEALL_DISCARDALL: { + book->DeleteAllPages(); + book->Refresh(); + } + break; + case CLOSEALL_ASKFOREACHFILE: { + int count = book->GetPageCount(); + for (int i=0; i(book->GetPage((size_t)i)); + if ( !editor ) + continue; + + bool veto; + Frame::Get()->ClosePage(editor, false, book->GetSelection(), true, veto); + } + //once all files have been prompted if needed, remove them all + book->DeleteAllPages(); + book->Refresh(); + } + break; + default: + break; + } + + if (dlg) { + dlg->Destroy(); + } + + //remove all symbol trees from the outline view + Frame::Get()->GetWorkspacePane()->DeleteAllSymbolTrees(); +} + +bool Manager::MoveFileToVD(const wxString &fileName, const wxString &srcVD, const wxString &targetVD) +{ + // to move the file between targets, we need to change the file path, we do this + // by changing the file to be in absolute path related to the src's project + // and then making it relative to the target's project + wxString srcProject, targetProject; + srcProject = srcVD.BeforeFirst(wxT(':')); + targetProject = targetVD.BeforeFirst(wxT(':')); + wxFileName srcProjWd(GetProjectCwd(srcProject), wxEmptyString); + + //set a dir saver point + wxFileName fn(fileName); + + //remove the file from the source project + wxString errMsg; + bool res = WorkspaceST::Get()->RemoveFile(srcVD, fileName, errMsg); + CHECK_MSGBOX_BOOL(res); + + // Add the file to the project + res = WorkspaceST::Get()->AddNewFile(targetVD, fn.GetFullPath(), errMsg); + if (!res) { + //file or virtual dir does not exist + return false; + } + //if the file is currently open, replace its project name + //in the editor container + // First, close any open tab with this file + wxFlatNotebook* nb = Frame::Get()->GetNotebook(); + int count = nb->GetPageCount(); + for (int i=0; i(nb->GetPage(static_cast(i))); + if (editor) { + wxString currFile = editor->GetFileName().GetFullPath(); + if (currFile == fn.GetFullPath()) { + editor->SetProject(targetProject.Trim()); + break; + } + } + } + return true; +} + +void Manager::GetProjectFiles(const wxString &project, wxArrayString &files) +{ + std::vector fileNames; + ProjectPtr p = GetProject(project); + p->GetFiles(fileNames, true); + + //convert std::vector to wxArrayString + for (std::vector::iterator it = fileNames.begin(); it != fileNames.end(); it ++) { + files.Add((*it).GetFullPath()); + } +} + +void Manager::GetWorkspaceFiles(wxArrayString &files) +{ + wxArrayString projects; + GetProjectList(projects); + + for (size_t i=0; iExpandVariables(expression); +} + +wxString Manager::ExpandVariables(const wxString &expression, ProjectPtr proj) +{ + wxString output(expression); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(proj->GetName()); + output.Replace(wxT("$(ProjectName)"), proj->GetName()); + output.Replace(wxT("$(IntermediateDirectory)"), bldConf->GetIntermediateDirectory()); + output.Replace(wxT("$(ConfigurationName)"), bldConf->GetName()); + output.Replace(wxT("$(OutDir)"), bldConf->GetIntermediateDirectory()); + + LEditor *editor = GetActiveEditor(); + if (editor) { + output.Replace(wxT("$(CurrentFileName)"), editor->GetFileName().GetName()); + output.Replace(wxT("$(CurrentFilePath)"), editor->GetFileName().GetPath()); + output.Replace(wxT("$(CurrentFileExt)"), editor->GetFileName().GetExt()); + output.Replace(wxT("$(CurrentFileFullPath)"), editor->GetFileName().GetFullPath()); + } + + //call the environment & workspace variables expand function + output = ExpandVariables2(output); + return output; +} + +//--------------------------- Debugger API ----------------------------- + +void Manager::DbgStart(long pid) +{ + //set the working directory to the project directory + DirSaver ds; + wxString errMsg; + wxString output; + wxString debuggerName; + wxString exepath; + wxString wd; + wxString args; + BuildConfigPtr bldConf; + ProjectPtr proj; + long PID(-1); + + if(pid == 1){ //attach to process + AttachDbgProcDlg *dlg = new AttachDbgProcDlg(NULL); + if(dlg->ShowModal() == wxID_OK){ + wxString processId = dlg->GetProcessId(); + exepath = dlg->GetExeName(); + debuggerName = dlg->GetDebugger(); + DebuggerMgr::Get().SetActiveDebugger(debuggerName); + + processId.ToLong(&PID); + if(exepath.IsEmpty() == false){ + wxFileName fn(exepath); + wxSetWorkingDirectory(fn.GetPath()); + exepath = fn.GetFullName(); + + } + dlg->Destroy(); + }else{ + dlg->Destroy(); + return; + } + } + + if(pid == wxNOT_FOUND){ + //need to debug the current project + proj = WorkspaceST::Get()->FindProjectByName(GetActiveProjectName(), errMsg); + if (proj) { + wxSetWorkingDirectory(proj->GetFileName().GetPath()); + bldConf = WorkspaceST::Get()->GetProjSelBuildConf(proj->GetName()); + if(bldConf){ + debuggerName = bldConf->GetDebuggerType(); + DebuggerMgr::Get().SetActiveDebugger(debuggerName); + } + } + } + + //make sure we have an active debugger + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (!dbgr) { + //No deubgger available, + wxString message; + message << wxT("Failed to launch debugger '") << debuggerName << wxT("': debugger not loaded\n"); + message << wxT("Make sure that you have an open workspace and that the active project is of type 'Executable'"); + wxMessageBox(message, wxT("CodeLite"), wxOK|wxICON_WARNING); + return; + } + + if (dbgr->IsRunning()) { + //debugger is already running, so issue a 'cont' command + dbgr->Continue(); + dbgr->QueryFileLine(); + return; + } + + //set the debugger information + DebuggerInformation dinfo; + DebuggerMgr::Get().GetDebuggerInformation(debuggerName, dinfo); + dbgr->SetDebuggerInformation(dinfo); + + if(pid == wxNOT_FOUND){ + exepath = bldConf->GetCommand(); + args = bldConf->GetCommandArguments(); + exepath.Prepend(wxT("\"")); + exepath.Append(wxT("\"")); + wd = bldConf->GetWorkingDirectory(); + + // Expand variables before passing them to the debugger + wd = ExpandVariables(wd, proj); + exepath = ExpandVariables(exepath, proj); + } + + //get the debugger path to execute + DebuggerInformation dbginfo; + DebuggerMgr::Get().GetDebuggerInformation(debuggerName, dbginfo); + wxString dbgname = dbginfo.path; + + dbgname = ExpandVariables2(dbgname); + + //set focus to the output debug pane + ShowOutputPane(OutputPane::OUTPUT_DEBUG); + + //set ourselves as the observer for the debugger class + dbgr->AddObserver(this); + + //remove any breakpoints from previous runs + //and collect the breakpoints from the user + DebuggerMgr::Get().DelAllBreakpoints(); + + //Loop through the open editors and let each editor + //a chance to update the debugger manager whith any line + //changes (i.e. file was edited and breakpoints were moved) + //this loop must take place before the debugger startup + //or else call to UpdateBreakpoint() will yield an attempt to + //actually add the breakpoint before Run() is called - this can + //be a problem when adding breakpoint to dll files + if(wxNOT_FOUND == pid){ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor) { + editor->UpdateBreakpoints(); + } + } + } + + //We can now get all the gathered breakpoints from the manager + std::vector bps; + DebuggerMgr::Get().GetBreakpoints(bps); + + if(pid == wxNOT_FOUND){ + //it is now OK to start the debugger... + if (!dbgr->Start(dbgname, exepath, wd, bps)) { + wxString errMsg; + errMsg << wxT("Failed to initialize debugger: ") << dbgname << wxT("\n"); + DebugMessage(errMsg); + return; + } + m_dbgWaitingFirstBp = true; + } else { + //Attach to process... + if (!dbgr->Start(dbgname, exepath, PID, bps)) { + wxString errMsg; + errMsg << wxT("Failed to initialize debugger: ") << dbgname << wxT("\n"); + DebugMessage(errMsg); + return; + } + } + + //let the active editor get the focus + LEditor *editor = dynamic_cast(GetActiveEditor()); + if (editor) { + editor->SetActive(); + } + + //mark that we are waiting for the first GotControl() + DebugMessage(output); + DebugMessage(wxT("Debug session started successfully!\n")); + + //Incase we are attaching to process + //do nothing here + if(pid == wxNOT_FOUND){ + dbgr->Run(args); + } + + //and finally make the debugger pane visible + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if (info.IsOk() && !info.IsShown()) { + HideDebuggerPane = true; + ShowDebuggerPane(); + } +} + +void Manager::DbgStop() +{ + if (m_quickWatchDlg) { + m_quickWatchDlg->Destroy(); + m_quickWatchDlg = NULL; + } + + //remove all debugger markers + DbgUnMarkDebuggerLine(); + m_dbgCanInteract = false; + + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (!dbgr) { + return; + } + + if (!dbgr->IsRunning()) { + return; + } + + //clear the debugger pane + Frame::Get()->GetDebuggerPane()->Clear(); + + dbgr->Stop(); + DebuggerMgr::Get().SetActiveDebugger(wxEmptyString); + + DebugMessage(wxT("Debug session ended\n")); + //update toolbar state + UpdateStopped(); + //and finally, hide the debugger pane (if we caused it to appear) + if (HideDebuggerPane) { + HideDebuggerPane = false; + HidePane(wxT("Debugger")); + } + //mark the debugger as non interactive + m_dbgCanInteract = false; +} + +void Manager::DbgMarkDebuggerLine(const wxString &fileName, int lineno) +{ + DbgUnMarkDebuggerLine(); + if (lineno < 0) { + return; + } + + //try to open the file + wxFileName fn(fileName); + LEditor *editor = GetActiveEditor(); + if (editor && editor->GetFileName().GetFullPath() == fn.GetFullPath()) { + editor->HighlightLine(lineno); + editor->GotoLine(lineno-1); + } else { + OpenFile(fileName, wxEmptyString, lineno-1, wxNOT_FOUND); + editor = GetActiveEditor(); + if(editor){ + editor->HighlightLine(lineno); + } + } +} + +void Manager::DbgUnMarkDebuggerLine() +{ + //remove all debugger markers from all editors + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor) { + editor->UnHighlightAll(); + } + } +} + +void Manager::OnOutputWindow(wxCommandEvent &e) +{ + if (e.GetEventType() == wxEVT_SHELLWIN_LINE_ENTERED) { + WriteProgram(e.GetString()); + } else if (e.GetEventType() == wxEVT_SHELLWIN_CTRLC) { + m_asyncExeCmd->Terminate(); + } +} + +void Manager::OnDebuggerWindow(wxCommandEvent &e) +{ + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + if (e.GetEventType() == wxEVT_SHELLWIN_LINE_ENTERED) { + wxString cmd(e.GetString()); + dbgr->ExecuteCmd(cmd); + } else if (e.GetEventType() == wxEVT_SHELLWIN_CTRLC) { + DbgDoSimpleCommand(DBG_PAUSE); + } + } +} + +void Manager::DbgDeleteBreakpoint(const BreakpointInfo &bp) +{ + DebuggerMgr::Get().DelBreakpoint(bp); + //update the editor + LEditor *editor = FindEditorByFileName(bp.file); + if (editor) { + editor->DelBreakpointMarker(bp.lineno-1); + } +} + +void Manager::DbgDeleteAllBreakpoints() +{ + if (!DbgCanInteract()) { + return; + } + + DebuggerMgr::Get().DelAllBreakpoints(); + //update the editor + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + if (!book) { + return; + } + + for (int i=0; iGetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor) { + editor->DelAllBreakpointMarkers(); + } + } +} + +void Manager::DbgDoSimpleCommand(int cmd) +{ + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + switch (cmd) { + case DBG_NEXT: { + if (dbgr->IsRunning()) { + dbgr->Next(); + } + } + break; + case DBG_STEPIN: { + if (dbgr->IsRunning()) { + dbgr->StepIn(); + } + } + break; + case DBG_STEPOUT: { + if (dbgr->IsRunning()) { + dbgr->StepOut(); + } + } + break; + case DBG_PAUSE: { + if (dbgr->IsRunning()) { + dbgr->Interrupt(); + } + } + break; + default: + break; + } + } +} + +void Manager::DbgQuickWatch(const wxString &expression, bool useTipWin, long pos) +{ + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + m_useTipWin = useTipWin; + m_tipWinPos = pos; + dbgr->EvaluateExpressionToTree(expression); + } +} + +void Manager::DbgCancelQuickWatchTip() +{ + /* + if(m_debuggerTipWin){ + m_debuggerTipWin->Dismiss(); + } + */ +} + +//------------------------------------------------- +//Event handlers from the debugger +//------------------------------------------------- + +void Manager::UpdateAddLine(const wxString &line) +{ + DebugMessage(line + wxT("\n")); +} + +void Manager::UpdateFileLine(const wxString &filename, int lineno) +{ + wxString fileName = filename; + long lineNumber = lineno; + if (m_frameLineno != wxNOT_FOUND) { + lineNumber = m_frameLineno; + m_frameLineno = wxNOT_FOUND; + } + + DbgMarkDebuggerLine(fileName, lineNumber); + UpdateDebuggerPane(); +} + +void Manager::UpdateDebuggerPane() +{ + //Update the debugger pane + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if (info.IsShown()) { + DebuggerPane *pane = Frame::Get()->GetDebuggerPane(); + if (pane->GetNotebook()->GetCurrentPage() == (wxWindow*)pane->GetBreakpointView()) { + pane->GetBreakpointView()->Initialize(); + } + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if ( dbgr && dbgr->IsRunning() && DbgCanInteract() ) { + //query the watches, to improve performance, we query only + //the visible panes + if (pane->GetNotebook()->GetCurrentPage() == pane->GetLocalsTree()) { + //update the locals tree + dbgr->QueryLocals(); + + } else if (pane->GetNotebook()->GetCurrentPage() == pane->GetWatchesTable()) { + //update the watches table + wxArrayString expressions = pane->GetWatchesTable()->GetExpressions(); + for (size_t i=0; iEvaluateExpressionToString(expressions.Item(i)); + } + } else if (pane->GetNotebook()->GetCurrentPage() == (wxWindow*)pane->GetFrameListView()) { + //update the stack call + dbgr->ListFrames(); + } else if (pane->GetNotebook()->GetCurrentPage() == (wxWindow*)pane->GetBreakpointView()) { + //update the breakpoint view + pane->GetBreakpointView()->Initialize(); + } else if (pane->GetNotebook()->GetCurrentPage() == (wxWindow*)pane->GetThreadsView()) { + //update the thread list + ThreadEntryArray threads; + dbgr->ListThreads(threads); + pane->GetThreadsView()->PopulateList(threads); + } + } + } +} + +void Manager::UpdateLocals(TreeNode *tree) +{ + NodeData data = tree->GetData(); + static TreeNode *thisTree(NULL); + if(data.name == wxT("*this")){ + //append this tree to the local's tree + thisTree = tree;//keep the tree and wait for the other call that will come + }else{ + //if we already have thisTree, append it as child of this tree + if(thisTree){ + tree->AddChild(thisTree); + thisTree = NULL; + } + Frame::Get()->GetDebuggerPane()->GetLocalsTree()->BuildTree(tree); + } +} + +void Manager::UpdateStopped() +{ + //do something here.... +} + +void Manager::UpdateGotControl(DebuggerReasons reason) +{ + //put us ontop of the z-order window + Frame::Get()->Raise(); + m_dbgCanInteract = true; + + switch (reason) { + case DBG_RECV_SIGNAL_EXC_BAD_ACCESS: + case DBG_RECV_SIGNAL_SIGSEGV: { //program received signal sigsegv + wxString signame = wxT("SIGSEGV"); + if(reason == DBG_RECV_SIGNAL_EXC_BAD_ACCESS){ + signame = wxT("EXC_BAD_ACCESS"); + } + DebugMessage(wxT("Program Received signal ") + signame + wxT("\n")); + int answer = wxMessageBox(wxT("Program Received signal ") + signame + wxT("\n") + wxT("Stack trace can be viewed in the 'Stack' tab\n") + wxT("Would you like to terminate the debugging session?"), wxT("CodeLite"), wxICON_ERROR|wxYES_NO|wxCANCEL); + if (answer == wxYES) { + DbgStop(); + } else if (answer == wxNO) { + //Print the stack trace + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if (info.IsShown()) { + Frame::Get()->GetDebuggerPane()->SelectTab(DebuggerPane::FRAMES); + UpdateDebuggerPane(); + } + } + } + break; + case DBG_END_STEPPING://finished one of the following: next/step/nexti/stepi + case DBG_FUNC_FINISHED: + case DBG_BP_HIT: { //breakpoint reached + //query the current line and file + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + dbgr->QueryFileLine(); + } + } + break; + case DBG_EXITED_NORMALLY: + //debugging finished, stop the debugger process + DbgStop(); + break; + default: + break; + } +} + +void Manager::UpdateLostControl() +{ + //debugger lost control + //hide the marker + DbgUnMarkDebuggerLine(); + m_dbgCanInteract = false; + DebugMessage(wxT("Continuing...\n")); +} + +void Manager::UpdateBpAdded() +{ +} + +void Manager::UpdateExpression(const wxString &expression, const wxString &evaluated) +{ + Frame::Get()->GetDebuggerPane()->GetWatchesTable()->UpdateExpression(expression, evaluated); +} + +void Manager::UpdateQuickWatch(const wxString &expression, TreeNode *tree) +{ + if(m_useTipWin){ + +#if 0 + m_useTipWin = false; + if(m_debuggerTipWin){ + delete m_debuggerTipWin; + } + m_debuggerTipWin = new DebuggerTip(GetMainFrame(), expression, tree, m_tipWinPos); + m_debuggerTipWin->Popup(); +#endif + + }else{ + //Display a dialog with the expression + if (!m_quickWatchDlg) { + //first time? + m_quickWatchDlg = new QuickWatchDlg(GetMainFrame(), expression, tree); + m_quickWatchDlg->ShowModal(); + } else { + //Dialog already created + if (m_quickWatchDlg->IsShown()) { + //dialog is visible, just update the tree + m_quickWatchDlg->Init(expression, tree); + } else { + //Update the tree + m_quickWatchDlg->Init(expression, tree); + m_quickWatchDlg->ShowModal(); + } + } + } +} + +void Manager::UpdateStackList(const StackEntryArray &stackArr) +{ + Frame::Get()->GetDebuggerPane()->GetFrameListView()->Update(stackArr); +} + +void Manager::DbgSetFrame(int frame, int lineno) +{ + wxAuiPaneInfo &info = Frame::Get()->GetDockingManager().GetPane(wxT("Debugger")); + if (info.IsShown()) { + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if ( dbgr && dbgr->IsRunning() && DbgCanInteract() ) { + //set the frame + dbgr->SetFrame(frame); + m_frameLineno = lineno; + } + } +} + +void Manager::DbgSetThread(long threadId) +{ + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if ( dbgr && dbgr->IsRunning() && DbgCanInteract() ) { + //set the frame + dbgr->SelectThread(threadId); + dbgr->QueryFileLine(); + } +} + +void Manager::UpdateBuildTools() +{ + BuilderPtr builder = BuildManagerST::Get()->GetBuilder(wxT( "GNU makefile for g++/gcc" )); + wxString tool = builder->GetBuildToolName(); + wxString origTool(tool); + + //confirm that it exists... + wxString path; + bool is_ok(true); + if (!ExeLocator::Locate(tool, path)) { + is_ok = false; + //failed to locate the specified build tool + //try some default names which are commonly used on windows + if (!is_ok && ExeLocator::Locate(wxT("mingw32-make"), path)) { + tool = path; + is_ok = true; + } + + if (!is_ok && ExeLocator::Locate(wxT("make"), path)){ + tool = path; + is_ok = true; + } + }else{ + //we are good, nothing to be done + return; + } + + wxString message; + if (!is_ok) { + message << wxT("Failed to locate make util '") + << tool << wxT("' specified by 'Build Settings'"); + wxMessageBox(message, wxT("CodeLite"), wxICON_WARNING|wxOK); + return; + } else { + wxLogMessage(wxT("Updating build too to '") + tool + wxT("' from '") + origTool + wxT("'")); + } + + //update the cached builders + builder->SetBuildTool(tool); + BuildManagerST::Get()->AddBuilder(builder); + + //update the configuration files + BuildSystemPtr bsptr = BuildSettingsConfigST::Get()->GetBuildSystem(wxT( "GNU makefile for g++/gcc" )); + if (!bsptr) { + bsptr = new BuildSystem(NULL); + bsptr->SetName(wxT( "GNU makefile for g++/gcc" )); + } + + bsptr->SetToolPath(tool); + BuildSettingsConfigST::Get()->SetBuildSystem(bsptr); +} + +bool Manager::OpenFileAndAppend(const wxString &fileName, const wxString &text) +{ + bool ret(false); + if(OpenFile(fileName, wxEmptyString)){ + LEditor* editor = GetActiveEditor(); + if(editor){ + editor->AppendText(text); + ret = true; + } + } + return ret; +} diff --git a/LiteEditor/manager.h b/LiteEditor/manager.h new file mode 100644 index 0000000000..b70c9c45b8 --- /dev/null +++ b/LiteEditor/manager.h @@ -0,0 +1,658 @@ +/*! + * + * + * Copyright (c) 2007 by Eran Ifrah + */ +#ifndef MANAGER_H +#define MANAGER_H + +#include "singleton.h" +#include "wx/string.h" +#include "readtags.h" +#include "entry.h" +#include "project.h" +#include "context_base.h" +#include "ctags_manager.h" +#include "workspace.h" +#include "list" +#include "compile_request.h" +#include "clean_request.h" +#include "wx/event.h" +#include "filehistory.h" +#include "browse_record.h" +#include "wx/timer.h" +#include "debuggermanager.h" +#include "debuggerobserver.h" + +class wxFrame; +class LEditor; +class AsyncExeCmd; +class QuickWatchDlg; +//class DebuggerTip; + +/*! + * \brief + * Manager class, a global class that provides access to many + * commands of CodeLite + */ +class Manager : public wxEvtHandler, public IDebuggerObserver +{ + friend class Singleton; + wxString m_startupDir; + CleanRequest *m_cleanRequest; + CompileRequest *m_compileRequest; + AsyncExeCmd *m_asyncExeCmd; + FileHistory m_recentFiles; + FileHistory m_recentWorkspaces; + bool m_dbgCanInteract; + bool m_dbgWaitingFirstBp; + QuickWatchDlg *m_quickWatchDlg; + int m_frameLineno; + bool m_useTipWin; +// DebuggerTip *m_debuggerTipWin; + long m_tipWinPos; +public: + /*! + * \brief + * check if a workspace is open + * + * \returns + * true if a workspace is open + */ + bool IsWorkspaceOpen() const; + + /*! + * \brief + * Open a file using file name and line number + * + * \param fileName full path of the file name + * \param projectName project name, can be wxEmptyString + * \param lineno the cursor will be placed at lineno + * \param position the position of the match starting from begining + */ + bool OpenFile(const wxString &file_name, + const wxString &projectName, + int lineno = wxNOT_FOUND, + long position = wxNOT_FOUND); + + void OpenFile(const BrowseRecord &rec); + + /** + * Create new file on the disk and open it in the main editor + * \param fileName file full path (including directories) + * \param vdFullPath path of the virtual directory + */ + bool AddNewFileToProject(const wxString &fileName, const wxString &vdFullPath, bool openIt = true); + + /** + * Add an existing file to workspace + * \param fileName file full path (including directories) + * \param vdFullPath path of the virtual directory + */ + bool AddFileToProject(const wxString &fileName, const wxString &vdFullPath, bool openIt = false); + /** + * \brief + * \param files + * \param vdFullPath + * \param actualAdded + * \return + */ + void AddFilesToProject(const wxArrayString &files, const wxString &vdFullPath, wxArrayString &actualAdded); + + /*! + * \brief + * Set the title for the page (tab) + */ + void SetPageTitle(wxWindow *page, const wxString &name); + + /*! + * \brief + * Return the page title + */ + const wxString GetPageTitle(wxWindow *win); + + /*! + * \brief + * Save all open documents + */ + void SaveAll(bool includeUntitled = true); + + /*! + * \brief + * Free all singleton objects initialised in CodeLite + */ + void UnInitialize(); + + /*! + * \brief + * Return a pointer to the main frame + */ + wxFrame *GetMainFrame(); + + /*! + * \brief + * Create a workspace with a given name and path + * + * \param name + * workspace name + * + * \param path + * workspace path + * + */ + void CreateWorkspace(const wxString &name, const wxString &path); + + /** + * \brief create an empty project + * \param name project name + * \param path project file path + * \param type project type, Project::STATIC_LIBRARY, Project::DYNAMIC_LIBRARY or Project::EXECUTABLE + */ + void CreateProject(ProjectData &data); + + /** + * Open an existing workspace by path + */ + void OpenWorkspace(const wxString &path); + + /** + * Close the current workspace and save all + * changes + */ + void CloseWorkspace(); + + /** + * Return a tree for the file view of a single project + */ + ProjectTreePtr GetProjectFileViewTree(const wxString &projectName); + + /** + * Return all project names under this workspace + */ + void GetProjectList(wxArrayString &list); + + /** + * find project by name + */ + ProjectPtr GetProject(const wxString &name) const; + + /** + * Add an existing project to the workspace. If no workspace is open, + * this function does nothing + * \param path project file path name to add + */ + void AddProject(const wxString &path); + + /** + * Remove the a project from the workspace + * \param name project name to remove + * \return true on success false otherwise + */ + bool RemoveProject(const wxString &name) ; + + /** + * \return active project name + */ + wxString GetActiveProjectName(); + + /** + * Set project as active + * \param name project name to set as active + */ + void SetActiveProject(const wxString &name); + + /** + * Add new virtual directory to the workspace. + * \param virtualDirFullPath a dot separated string of the new virtual directory full path up to the parent project + * for example: to add a new VD name VD3 under: Project1->VD1->VD2 path should contain: Project1.VD1.VD2.VD3 + */ + void AddVirtualDirectory(const wxString &virtualDirFullPath); + + /** + * Remove virtual directory from the workspace. + * \param virtualDirFullPath a dot separated string of the virtual directory to be removed + */ + void RemoveVirtualDirectory(const wxString &virtualDirFullPath); + + /** + * Save workspace + */ + void SaveWorkspace(); + + /** + * remove file from the workspace + * \param fileName the full path of the file to be removed + * \param vdFullPath the files' virtual directory path (including project) + */ + bool RemoveFile(const wxString &fileName, const wxString &vdFullPath); + + /** + * Return a project working directory + * \param project project name + */ + wxString GetProjectCwd(const wxString &project) const; + + /** + * Show output pane and set focus to focusWin + * \param focusWin tab name to set the focus + */ + void ShowOutputPane(wxString focusWin = wxEmptyString, bool commit = true ); + + /** + * Show the debugger pane + */ + void ShowDebuggerPane(bool commit = true); + + /** + * Show the main toolbar + * \param show set to true to show it, false otherwise + */ + void ShowMainToolbar(bool show = true); + + /** + * Show the workspace pane and set focus to focusWin + * \param focusWin tab name to set the focus + */ + void ShowWorkspacePane(wxString focusWin = wxEmptyString, bool commit = true ); + + /** + * Hide pane + */ + void HidePane(const wxString &paneName, bool commit = true); + + /** + * Return the context by file name + * \param fileName + * \param parent the lexer's parent + * \return lexer , if no lexer is matched with the fileName, the "Default" context is returned + */ + ContextBasePtr NewContextByFileName(const wxFileName &fileName, LEditor *parent) const; + + /** + * Reload configuration changes and apply them on open documents + */ + void ApplySettingsChanges(); + + /** + * Return project settings by name + * \param projectName project name + * \return project settings smart prt + */ + ProjectSettingsPtr GetProjectSettings(const wxString &projectName) const; + + /** + * Set project settings + * \param projectName project name + * \param settings settings to update + */ + void SetProjectSettings(const wxString &projectName, ProjectSettingsPtr settings); + + /** + * Return the workspace build matrix + */ + BuildMatrixPtr GetWorkspaceBuildMatrix() const; + + /** + * Set or update the workspace build matrix + */ + void SetWorkspaceBuildMatrix(BuildMatrixPtr matrix); + + /** + * Hide/Show all panes. This function saves the current prespective and + * then hides all panes, when called again, all panes are restored + */ + void TogglePanes(); + + /** + * Set environment variables for the workspace. The new environment will override + * the current. To perform update, do the following: + * \code + * EnvironmentVarieblesPtr env = ManagerST::Get()->GetEnvironmentVariables(); + * //update the environment + * env->SetEnv(wxT("HOME"), wxT("/home/user/eran")); + * //update + * ManagerST::Get()->SetEnvironmentVariables(env); + * \endcode + * \param env + */ + void SetEnvironmentVariables(EnvironmentVarieblesPtr env); + + /** + * get the environment of the workspace + * \return + */ + EnvironmentVarieblesPtr GetEnvironmentVariables() const; + + /** + * create default new compiler + * \return true on success false when a compiler with this name already exist + */ + bool CreateDefaultNewCompiler(const wxString &name); + + /** + * delete compiler + * \param name compiler to delete + */ + bool DeleteCompiler(const wxString &name); + + /** + * Return a list of availanle project templates + * \param list output + */ + void GetProjectTemplateList(std::list &list); + + /** + * Save project as template + * \param proj project to duplicate + * \param name the template name + */ + void SaveProjectTemplate(ProjectPtr proj, const wxString &name); + + /** + * Set lite editor's startup directory + */ + void SetStarupDirectory(const wxString &path){ m_startupDir = path; } + + /** + * Get lite editor's startup directory + */ + const wxString &GetStarupDirectory() const { return m_startupDir; } + + /** + * Popup project dependencies dialog + * \param projectName project name + */ + void PopupProjectDependsDlg(const wxString &projectName); + + /** + * Pass a command to the compiler thread to clean the + * given project + */ + void CleanProject(const wxString &project, bool projectOnly = false); + + /** + * Pass a command to the compiler thread to build the + * given project + */ + void BuildProject(const wxString &project, bool projectOnly = false); + + /** + * compile single file from a given + * given project + */ + void CompileFile(const wxString &project, const wxString &fileName); + + /** + * Stop current build process + */ + void StopBuild(); + + /** + * return true if a compilation is in process (either clean or build) + */ + bool IsBuildInProgress() const; + + /** + * return true a child program is running + */ + bool IsProgramRunning() const; + + /** + * Kill child program which is running + */ + void KillProgram(); + + /** + * Write line to child program + * \param line + */ + void WriteProgram(const wxString &line); + + /** + * Execute the project with no debugger + */ + void ExecuteNoDebug(const wxString &projectName); + + // Update the toolbar's configuration choice controls + void DoUpdateConfigChoiceControl(); + + /** + * Set the workspace active build configuration name + * \param name active configuration name + */ + void SetWorkspaceConfigurationName(const wxString &name); + + /** + * Return the active's project build configuration that matches + * the workspace selected configuration + */ + BuildConfigPtr GetActiveProjectBuildConf(); + + /** + * use an external database + */ + void SetExternalDatabase(const wxFileName &dbname); + + /** + * close the currenlty open extern database + * and free all its resources + */ + void CloseExternalDatabase(); + + /** + * return list of files that are part of the workspace + */ + void GetWorkspaceFiles(std::vector &files, bool absPath = false); + + /** + * check if a file is part of the workspace + * \param fileName the file name in absolute path + */ + bool IsFileInWorkspace(const wxString &fileName); + + /** + * Rebuild the database by removing all entries from the database + * that belongs to a given project, and then re-index all files + * \param projectName project to re-tag + */ + void RetagProject(const wxString &projectName); + + /** + * retag workspace + */ + void RetagWorkspace(); + + /** + * Add debug message + * \param msg + */ + void DebugMessage(wxString msg); + + + /** + * return the project name that 'fullPathFileName' belogs to. if 2 matches were found, return + * the first one, or empty string if no match was found + */ + wxString GetProjectNameByFile(const wxString &fullPathFileName); + + /** + * Import a workspace from a makefile + */ + void ImportFromMakefile(const wxString &path); + + /** + * Return the active editor or NULL if none + */ + LEditor *GetActiveEditor() const; + + /** + * Return the container editor for fileName or NULL + */ + LEditor *FindEditorByFileName(const wxString &fileName) const; + + /** + * add single file to the recently opened files + */ + void AddToRecentlyOpenedFiles(const wxString &fileName); + + /** + * return the FileHistory object that holds the recently opened + * files data + */ + FileHistory &GetRecentlyOpenedFilesClass() {return m_recentFiles;} + + /** + * add workspace file to the recently opened workspaces + */ + void AddToRecentlyOpenedWorkspaces(const wxString &fileName); + + /** + * return the FileHistory object that holds the recently opened + * workspace data + */ + FileHistory &GetRecentlyOpenedWorkspacesClass() {return m_recentWorkspaces;} + + /** + * Return list of recently opened files from the configuration file + * \param files [output] + */ + void GetRecentlyOpenedFiles(wxArrayString &files); + + /** + * Return list of recently opened workspaces from the configuration file + * \param files [output] + */ + void GetRecentlyOpenedWorkspaces(wxArrayString &files); + + /** + * insert message to the status bar at a given column + * \param msg + * \param col + */ + void SetStatusMessage(const wxString &msg, int col); + + /** + * close all opened documents + */ + void CloseAll(); + + /** + * \brief close all open editors except for the active one + */ + void CloseAllButThis(wxWindow *curreditor); + + bool MoveFileToVD(const wxString &fileName, const wxString &srcVD, const wxString &targetVD); + + /** + * return list of files in absolute path of a given project + * \param project project name + */ + void GetProjectFiles(const wxString &project, wxArrayString &files); + + /** + * return list of files in absolute path of the whole workspace + */ + void GetWorkspaceFiles(wxArrayString &files); + + /** + * Import a MS Solution file and open it in the editor + * \param path path to the .sln file + */ + void ImportMSVSSolution(const wxString &path); + + /** + * Expand variables to their real value, if expanding fails + * the return value is same as input. The variable is expanded + * in the project context + */ + wxString ExpandVariables(const wxString &expression, ProjectPtr proj); + + /** + * Expand variables to their real value, if expanding fails + * the return value is same as input. + * the variables are resolved using the workspace varaibles & + * the environment + */ + wxString ExpandVariables2(const wxString &expression); + + /** + * return true if the last buid ended successfully + */ + bool IsBuildEndedSuccessfully() const; + + void OnOutputWindow(wxCommandEvent &e); + void OnDebuggerWindow(wxCommandEvent &e); + + /** + * \brief update the path & name of the build tool + * on windows, try to locate make, followed by mingw32-make + */ + void UpdateBuildTools(); + + /** + * \brief open file specified by the 'fileName' parameter and append 'text' + * to its content + * \param fileName file to open. Must be in full path + * \param text string text to append + * \return true on success, false otherwise + */ + bool OpenFileAndAppend(const wxString &fileName, const wxString &text); + + //-------------------------------------------------------------------- + //IDebuggerObserver implementation. These set of functions are called + //from the debugger whenever event occurs there + //-------------------------------------------------------------------- + void UpdateStopped(); + void UpdateAddLine(const wxString &line); + void UpdateBpAdded(); + void UpdateFileLine(const wxString &file, int lineno); + void UpdateGotControl(DebuggerReasons reason); + void UpdateLostControl(); + void UpdateLocals(TreeNode *tree); + void UpdateExpression(const wxString &expression, const wxString &evaluated); + void UpdateQuickWatch(const wxString &expression, TreeNode *tree); + void UpdateStackList(const StackEntryArray &stackArray); + + //---------------------------------------------------------- + // Debugging API + //---------------------------------------------------------- + void DbgStart(long pid = wxNOT_FOUND); + void DbgStop(); + void DbgDeleteBreakpoint(const BreakpointInfo &bp); + void DbgDeleteAllBreakpoints(); + void DbgDoSimpleCommand(int cmd); + void DbgMarkDebuggerLine(const wxString &fileName, int lineno); + void DbgUnMarkDebuggerLine(); + void DbgQuickWatch(const wxString &expression, bool useTipWin = false, long pos = wxNOT_FOUND); + void DbgCancelQuickWatchTip(); + void DbgSetFrame(int frame, int lineno); + void DbgSetThread(long threadId); + bool DbgCanInteract(){return m_dbgCanInteract;} + void UpdateDebuggerPane(); + +protected: + Manager(void); + virtual ~Manager(void); + void OnProcessEnd(wxProcessEvent &event); + +private: + void RemoveProjectNameFromOpenFiles(const std::vector &project_files); + + /** + * Update the symbol & file tress + */ + void RebuildFileView(); + + /** + * Remove a file from the gui tree + */ + void RemoveFileFromSymbolTree(const wxFileName &fileName, const wxString &project); + + // Create environment variables for the workspace + void CreateEnvironmentVars(const wxString &wpsPath); +}; + +typedef Singleton ManagerST; + +#endif // MANAGER_H + diff --git a/LiteEditor/menu_event_handlers.cpp b/LiteEditor/menu_event_handlers.cpp new file mode 100644 index 0000000000..2ef9ea930f --- /dev/null +++ b/LiteEditor/menu_event_handlers.cpp @@ -0,0 +1,302 @@ +#include "menu_event_handlers.h" +#include "editor.h" +#include "frame.h" + +//------------------------------------ +// Handle copy events +//------------------------------------ +void EditHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor *editor = (LEditor*)owner; + + if (event.GetId() == wxID_COPY) { + editor->Copy(); + } else if (event.GetId() == wxID_CUT) { + editor->Cut(); + } else if (event.GetId() == wxID_PASTE) { + editor->Paste(); + } else if (event.GetId() == wxID_UNDO) { + editor->Undo(); + } else if (event.GetId() == wxID_REDO) { + editor->Redo(); + } else if (event.GetId() == wxID_SELECTALL) { + editor->SelectAll(); + } else if (event.GetId() == wxID_DUPLICATE) { + editor->LineDuplicate(); + } +} + +void EditHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + + if (event.GetId() == wxID_COPY) { + event.Enable(editor && ( editor->GetSelectionStart() - editor->GetSelectionEnd() != 0 )); + } else if (event.GetId() == wxID_CUT) { + event.Enable(editor && ( editor->GetSelectionStart() - editor->GetSelectionEnd() != 0 )); + } else if (event.GetId() == wxID_PASTE) { +#ifdef __WXGTK__ + event.Enable(editor); +#else + event.Enable(editor && editor->CanPaste()); +#endif + } else if (event.GetId() == wxID_UNDO) { + event.Enable(editor && editor->CanUndo()); + } else if (event.GetId() == wxID_REDO) { + event.Enable(editor && editor->CanRedo()); + } else if (event.GetId() == wxID_SELECTALL) { + event.Enable(editor && editor->GetLength() > 0); + } else if (event.GetId() == wxID_DUPLICATE) { + event.Enable(true); + } else { + event.Enable(false); + } + event.Skip(false); +} + +//------------------------------------ +// brace matching +//------------------------------------ +void BraceMatchHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + if (event.GetId() == XRCID("select_to_brace")) { + editor->MatchBraceAndSelect(true); + } else { + editor->MatchBraceAndSelect(false); + } +} + +void BraceMatchHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + event.Enable(editor &&editor->GetLength() > 0); +} + + +//------------------------------------ +// Find / Replace +//------------------------------------ +void FindReplaceHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + if ( event.GetId() == wxID_FIND ) { + editor->DoFindAndReplace(false); + } else if ( event.GetId() == wxID_REPLACE ) { + editor->DoFindAndReplace(true); + } else { + FindReplaceDialog *dlg = editor->GetFindReplaceDialog(); + if (event.GetId() == XRCID("find_next") && dlg) { + FindReplaceData data = dlg->GetData(); + // set search direction down + data.SetFlags(data.GetFlags() & ~(wxFRD_SEARCHUP)); + editor->FindNext( data ); + } else if ( event.GetId() == XRCID("find_previous") && dlg) { + FindReplaceData data = dlg->GetData(); + // set search direction up + data.SetFlags(data.GetFlags() | wxFRD_SEARCHUP); + editor->FindNext( data ); + } + } +} + +void FindReplaceHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + wxUnusedVar(owner); + wxUnusedVar(event); +} + +//---------------------------------- +// goto linenumber +//---------------------------------- + +void GotoHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + wxUnusedVar(event); + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + wxString msg; + msg.Printf(wxT("Go to line number (1 - %ld):"), editor->GetLineCount()); + + while ( 1 ) { + wxTextEntryDialog dlg(editor, msg, wxT("Go To Line")); + dlg.SetTextValidator(wxFILTER_NUMERIC); + + if (dlg.ShowModal() == wxID_OK) { + wxString val = dlg.GetValue(); + long line; + if (!val.ToLong(&line)) { + wxString err; + err.Printf(wxT("'%s' is not a valid line number"), val.GetData()); + wxMessageBox (err, wxT("Go To Line"), wxOK | wxICON_INFORMATION); + continue; + } + + if (line > editor->GetLineCount()) { + wxString err; + err.Printf(wxT("Please insert a line number in the range of (1 - %ld)"), editor->GetLineCount()); + wxMessageBox (err, wxT("Go To Line"), wxOK | wxICON_INFORMATION); + continue; + } + + if (line > 0) { + editor->GotoLine(line - 1); + break; + } else { + editor->GotoLine(0); + break; + } + } else { + // wxID_CANCEL + return; + } + } + editor->SetActive(); +} + +void GotoHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + wxUnusedVar(event); + wxUnusedVar(owner); +} + +//------------------------------------ +// Bookmarks +//------------------------------------ +void BookmarkHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + if (event.GetId() == XRCID("toggle_bookmark")) { + editor->ToggleMarker(); + } else if (event.GetId() == XRCID("next_bookmark")) { + editor->FindNextMarker(); + } else if (event.GetId() == XRCID("previous_bookmark")) { + editor->FindPrevMarker(); + } else if (event.GetId() == XRCID("removeall_bookmarks")) { + editor->DelAllMarkers(); + } +} + +void BookmarkHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + wxUnusedVar(owner); + wxUnusedVar(event); +} + + +//------------------------------------ +// Go to definition +//------------------------------------ +void GotoDefinitionHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + if (event.GetId() == XRCID("goto_definition")) { + editor->GotoDefinition(); + } else if (event.GetId() == XRCID("goto_previous_definition")) { + editor->GotoPreviousDefintion(); + } + +} + +void GotoDefinitionHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if (event.GetId() == XRCID("goto_previous_definition")) { + event.Enable(editor && editor->CanGotoPreviousDefintion()); + } else { + event.Enable(editor != NULL); + } +} + +//------------------------------------------------- +// View As +//------------------------------------------------- + +void ViewAsHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + wxString lexName = Frame::Get()->GetViewAsLanguageById(event.GetInt()); + if (lexName.IsEmpty() == false) { + editor->SetSyntaxHighlight(lexName); + } +} + +void ViewAsHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + event.Enable(true); + wxString lexName = Frame::Get()->GetViewAsLanguageById(event.GetInt()); + event.Check(editor->GetContext()->GetName() == lexName); +} + +//---------------------------------------------------- +// Word wrap hanlder +//---------------------------------------------------- + +void WordWrapHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + event.Enable(false); + return; + } + + event.Enable(true); + event.Check(editor->GetWrapMode() != wxSCI_WRAP_NONE); +} + +void WordWrapHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + editor->SetWrapMode(event.IsChecked() ? wxSCI_WRAP_WORD : wxSCI_WRAP_NONE); +} + +void DebuggerMenuHandler::ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) +{ + LEditor *editor = dynamic_cast(owner); + if ( !editor ) { + return; + } + + if (event.GetId() == XRCID("insert_breakpoint")) { + editor->ToggleBreakpoint(); + } +} + +void DebuggerMenuHandler::ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) +{ + wxUnusedVar(owner); + wxUnusedVar(event); +} diff --git a/LiteEditor/menu_event_handlers.h b/LiteEditor/menu_event_handlers.h new file mode 100644 index 0000000000..850800640c --- /dev/null +++ b/LiteEditor/menu_event_handlers.h @@ -0,0 +1,161 @@ +#ifndef MENU_EVENT_HANDLERS_H +#define MENU_EVENT_HANDLERS_H + +#include "wx/event.h" +#include "smart_ptr.h" +#include + +/** + * The interface for menu event handler classes + */ +class MenuEventHandler +{ +protected: + int m_id; + +public: + MenuEventHandler(int id) : m_id(id) {}; + virtual ~MenuEventHandler(){}; + + // handle an event + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event) = 0; + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event) = 0; + + // Setters/Getters + const int &GetEventId() const { return m_id; } + void SetEventId(const int &id) { m_id = id; } +}; + +typedef SmartPtr MenuEventHandlerPtr; + +//----------------------------------------------------------------- +// Define here a class per event/group +//----------------------------------------------------------------- + +//------------------------------------ +// Common edit tasks +//------------------------------------ +class EditHandler : public MenuEventHandler +{ +public: + EditHandler(int id) : MenuEventHandler(id){}; + virtual ~EditHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------ +// Brace matching +//------------------------------------ +class BraceMatchHandler : public MenuEventHandler +{ +public: + BraceMatchHandler(int id) : MenuEventHandler(id){}; + virtual ~BraceMatchHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------ +// Find / Repalce +//------------------------------------ +class FindReplaceHandler : public MenuEventHandler +{ +public: + FindReplaceHandler(int id) : MenuEventHandler(id){}; + virtual ~FindReplaceHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------ +// Goto +//------------------------------------ +class GotoHandler : public MenuEventHandler +{ +public: + GotoHandler(int id) : MenuEventHandler(id){}; + virtual ~GotoHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------ +// Bookmarks +//------------------------------------ +class BookmarkHandler : public MenuEventHandler +{ +public: + BookmarkHandler(int id) : MenuEventHandler(id){}; + virtual ~BookmarkHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------ +// Go to definition +//------------------------------------ +class GotoDefinitionHandler : public MenuEventHandler +{ +public: + GotoDefinitionHandler(int id) : MenuEventHandler(id){}; + virtual ~GotoDefinitionHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------------------- +// View As +//------------------------------------------------- +class ViewAsHandler : public MenuEventHandler +{ +public: + ViewAsHandler(int id) : MenuEventHandler(id){}; + virtual ~ViewAsHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; +//------------------------------------------------- +// Word wrap +//------------------------------------------------- +class WordWrapHandler : public MenuEventHandler +{ +public: + WordWrapHandler(int id) : MenuEventHandler(id){}; + virtual ~WordWrapHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +//------------------------------------------------- +// Debugger handler +//------------------------------------------------- +class DebuggerMenuHandler : public MenuEventHandler +{ +public: + DebuggerMenuHandler(int id) : MenuEventHandler(id){}; + virtual ~DebuggerMenuHandler(){}; + +public: + virtual void ProcessCommandEvent(wxWindow *owner, wxCommandEvent &event); + virtual void ProcessUpdateUIEvent(wxWindow *owner, wxUpdateUIEvent &event); +}; + +#endif // MENU_EVENT_HANDLERS_H + diff --git a/LiteEditor/menumanager.cpp b/LiteEditor/menumanager.cpp new file mode 100644 index 0000000000..9d7008fd87 --- /dev/null +++ b/LiteEditor/menumanager.cpp @@ -0,0 +1,37 @@ +#include "menumanager.h" +#include "menu_event_handlers.h" +#include "macros.h" + + +MenuManager::MenuManager(void) +{ + PushHandler(new EditHandler(wxID_COPY)); + PushHandler(new EditHandler(wxID_CUT)); + PushHandler(new EditHandler(wxID_PASTE)); + PushHandler(new EditHandler(wxID_UNDO)); + PushHandler(new EditHandler(wxID_REDO)); + PushHandler(new EditHandler(wxID_SELECTALL)); + PushHandler(new EditHandler(wxID_DUPLICATE)); + PushHandler(new EditHandler(XRCID("swap_files"))); + PushHandler(new BraceMatchHandler(XRCID("select_to_brace"))); + PushHandler(new BraceMatchHandler(XRCID("match_brace"))); + PushHandler(new FindReplaceHandler(wxID_FIND)); + PushHandler(new FindReplaceHandler(wxID_REPLACE)); + PushHandler(new FindReplaceHandler(XRCID("find_next"))); + PushHandler(new FindReplaceHandler(XRCID("find_previous"))); + PushHandler(new GotoHandler(XRCID("goto_linenumber"))); + PushHandler(new BookmarkHandler(XRCID("toggle_bookmark"))); + PushHandler(new BookmarkHandler(XRCID("next_bookmark"))); + PushHandler(new BookmarkHandler(XRCID("previous_bookmark"))); + PushHandler(new BookmarkHandler(XRCID("removeall_bookmarks"))); + PushHandler(new GotoDefinitionHandler(XRCID("goto_definition"))); + PushHandler(new GotoDefinitionHandler(XRCID("goto_previous_definition"))); + PushHandler(new ViewAsHandler(viewAsMenuItemID)); + PushHandler(new WordWrapHandler(XRCID("word_wrap"))); + PushHandler(new DebuggerMenuHandler(XRCID("insert_breakpoint"))); + PushHandler(new DebuggerMenuHandler(XRCID("delete_breakpoint"))); +} + +MenuManager::~MenuManager(void) +{ +} diff --git a/LiteEditor/menumanager.h b/LiteEditor/menumanager.h new file mode 100644 index 0000000000..a71b7ffae0 --- /dev/null +++ b/LiteEditor/menumanager.h @@ -0,0 +1,37 @@ +#ifndef MENUMANAGER_H +#define MENUMANAGER_H + +#include "singleton.h" +#include "menu_event_handlers.h" +#include "smart_ptr.h" +#include + +//------------------------------------------------- +// The menu event manager. +//------------------------------------------------- + +class MenuManager : public Singleton +{ + friend class Singleton; + std::map m_handlers; +public: + + // register new event handler + void PushHandler(MenuEventHandlerPtr handler){ + m_handlers[handler->GetEventId()] = handler; + }; + + MenuEventHandlerPtr GetHandler(int id) { + std::map::iterator iter = m_handlers.find(id); + if( iter != m_handlers.end() ) + return iter->second; + return NULL; + }; + +private: + MenuManager(void); + virtual ~MenuManager(void); +}; + +#endif // MENUMANAGER_H + diff --git a/LiteEditor/movefuncimplbasedlg.cpp b/LiteEditor/movefuncimplbasedlg.cpp new file mode 100644 index 0000000000..fa9418d9d1 --- /dev/null +++ b/LiteEditor/movefuncimplbasedlg.cpp @@ -0,0 +1,95 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "movefuncimplbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +MoveFuncImplBaseDlg::MoveFuncImplBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxVERTICAL ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("Select file to place the function implementation:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizer7->Add( m_staticText4, 0, wxALL|wxEXPAND, 5 ); + + m_filePicker = new FilePicker(this); + bSizer7->Add( m_filePicker, 0, wxALL|wxEXPAND, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("Function's implementation (you can edit the below code):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bSizer7->Add( m_staticText5, 0, wxALL, 5 ); + + m_preview = new wxScintilla( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString ); + m_preview->SetUseTabs( true ); + m_preview->SetTabWidth( 4 ); + m_preview->SetIndent( 4 ); + m_preview->SetTabIndents( true ); + m_preview->SetBackSpaceUnIndents( true ); + m_preview->SetViewEOL( false ); + m_preview->SetViewWhiteSpace( false ); + m_preview->SetMarginWidth( 2, 0 ); + m_preview->SetIndentationGuides( true ); + m_preview->SetMarginType( 1, wxSCI_MARGIN_SYMBOL ); + m_preview->SetMarginMask( 1, wxSCI_MASK_FOLDERS ); + m_preview->SetMarginWidth( 1, 16); + m_preview->SetMarginSensitive( 1, true ); + m_preview->SetProperty( wxT("fold"), wxT("1") ); + m_preview->SetFoldFlags( wxSCI_FOLDFLAG_LINEBEFORE_CONTRACTED | wxSCI_FOLDFLAG_LINEAFTER_CONTRACTED ); + m_preview->SetMarginType( 0, wxSCI_MARGIN_NUMBER ); + m_preview->SetMarginWidth( 0, m_preview->TextWidth( wxSCI_STYLE_LINENUMBER, wxT("_99999") ) ); + m_preview->StyleSetFont( wxSCI_STYLE_DEFAULT, wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDER, wxSCI_MARK_BOXPLUS ); + m_preview->MarkerSetBackground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) ); + m_preview->MarkerSetForeground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_BOXMINUS ); + m_preview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) ); + m_preview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_EMPTY ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_BOXPLUS ); + m_preview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) ); + m_preview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_BOXMINUS ); + m_preview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) ); + m_preview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_EMPTY ); + m_preview->MarkerDefine( wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_EMPTY ); + m_preview->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); + m_preview->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); + m_preview->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 76, 90, 90, false, wxEmptyString ) ); + + bSizer7->Add( m_preview, 1, wxEXPAND | wxALL, 5 ); + + bSizer6->Add( bSizer7, 1, wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer6->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttoncancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer8->Add( m_buttoncancel, 0, wxALL, 5 ); + + bSizer6->Add( bSizer8, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer6 ); + this->Layout(); + + // Connect Events + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MoveFuncImplBaseDlg::OnButtonOK ), NULL, this ); + m_buttoncancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MoveFuncImplBaseDlg::OnButtonCancel ), NULL, this ); +} diff --git a/LiteEditor/movefuncimplbasedlg.h b/LiteEditor/movefuncimplbasedlg.h new file mode 100644 index 0000000000..7a613a3cdd --- /dev/null +++ b/LiteEditor/movefuncimplbasedlg.h @@ -0,0 +1,56 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __movefuncimplbasedlg__ +#define __movefuncimplbasedlg__ + +#include +#include +#include +#include +#include +#include +#include "filepicker.h" +#include +#ifdef __VISUALC__ +#include +#endif //__VISUALC__ +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class MoveFuncImplBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class MoveFuncImplBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText4; + FilePicker *m_filePicker; + wxStaticText* m_staticText5; + wxScintilla* m_preview; + wxStaticLine* m_staticline2; + wxButton* m_buttonOK; + wxButton* m_buttoncancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + MoveFuncImplBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Move Function Implementation Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 746,422 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__movefuncimplbasedlg__ diff --git a/LiteEditor/movefuncimpldlg.cpp b/LiteEditor/movefuncimpldlg.cpp new file mode 100644 index 0000000000..693d2d8968 --- /dev/null +++ b/LiteEditor/movefuncimpldlg.cpp @@ -0,0 +1,47 @@ +#include "wx/filename.h" +#include "movefuncimpldlg.h" + +MoveFuncImplDlg::MoveFuncImplDlg( wxWindow* parent, const wxString &text, const wxString &fileName ) +: MoveFuncImplBaseDlg( parent ) +{ + m_preview->SetText(text); + m_filePicker->SetPath(fileName); +} + +void MoveFuncImplDlg::SetText(const wxString &text) +{ + m_preview->SetText(text); +} + +wxString MoveFuncImplDlg::GetText() +{ + return m_preview->GetText(); +} + +void MoveFuncImplDlg::SetFileName(const wxString &fileName) +{ + m_filePicker->SetPath(fileName); +} + +wxString MoveFuncImplDlg::GetFileName() +{ + return m_filePicker->GetPath(); +} + +void MoveFuncImplDlg::OnButtonCancel(wxCommandEvent &e) +{ + wxUnusedVar(e); + EndModal(wxID_CANCEL); +} + +void MoveFuncImplDlg::OnButtonOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + //make sure that the file exist + if(!wxFileName::FileExists(m_filePicker->GetPath())){ + wxMessageBox(wxT("File: ") + m_filePicker->GetPath() + wxT(" does not exist"), + wxT("CodeLite"), wxICON_WARNING| wxOK); + return; + } + EndModal(wxID_OK); +} diff --git a/LiteEditor/movefuncimpldlg.h b/LiteEditor/movefuncimpldlg.h new file mode 100644 index 0000000000..56b0ed47bf --- /dev/null +++ b/LiteEditor/movefuncimpldlg.h @@ -0,0 +1,28 @@ +#ifndef __movefuncimpldlg__ +#define __movefuncimpldlg__ + +/** +@file +Subclass of MoveFuncImplBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "movefuncimplbasedlg.h" + +/** Implementing MoveFuncImplBaseDlg */ +class MoveFuncImplDlg : public MoveFuncImplBaseDlg +{ + void OnButtonCancel(wxCommandEvent &e); + void OnButtonOK(wxCommandEvent &e); + +public: + /** Constructor */ + MoveFuncImplDlg( wxWindow* parent, const wxString &text, const wxString &fileName ); + + void SetText(const wxString &text); + wxString GetText(); + + void SetFileName(const wxString &fileName); + wxString GetFileName(); +}; + +#endif // __movefuncimpldlg__ diff --git a/LiteEditor/navigationmanager.cpp b/LiteEditor/navigationmanager.cpp new file mode 100644 index 0000000000..0f8c3f8fd1 --- /dev/null +++ b/LiteEditor/navigationmanager.cpp @@ -0,0 +1,62 @@ +#include "navigationmanager.h" + +NavMgr::NavMgr() +: m_cur(wxNOT_FOUND) +{ +} + +NavMgr::~NavMgr() +{ + Clear(); +} + +NavMgr *NavMgr::Get() +{ + static NavMgr theManager; + return &theManager; +} + +void NavMgr::Clear() +{ + m_cur = wxNOT_FOUND; + m_records.clear(); +} + +bool NavMgr::CanNext() const +{ + int cur = m_cur; + cur++; + return (cur < (int)m_records.size()); +} + +bool NavMgr::CanPrev() const +{ + int cur = m_cur; + cur--; + return (cur >= 0); +} + +BrowseRecord NavMgr::Next() +{ + if(!CanNext()){ + return BrowseRecord(); + } + + m_cur++; + return m_records.at(m_cur); +} + +BrowseRecord NavMgr::Prev() +{ + if(!CanPrev()){ + return BrowseRecord(); + } + m_cur--; + return m_records.at(m_cur); +} + +void NavMgr::Push(const BrowseRecord &rec) +{ + m_records.push_back(rec); + m_cur = (int)m_records.size(); +} diff --git a/LiteEditor/navigationmanager.h b/LiteEditor/navigationmanager.h new file mode 100644 index 0000000000..02ef532444 --- /dev/null +++ b/LiteEditor/navigationmanager.h @@ -0,0 +1,60 @@ +#ifndef NAVIGATIONMANAGER_H +#define NAVIGATIONMANAGER_H + +#include "vector" +#include "browse_record.h" + +/** + * \class NavMgr + * \brief a manager class that remembers navigation position in a queue + * \author Eran + * \date 08/10/07 + */ +class NavMgr +{ + std::vector m_records; + int m_cur; + +private: + NavMgr(); + virtual ~NavMgr(); + +public: + static NavMgr *Get(); + + /** + * \brief add new record to the manager, this new record will be added in top of our + * list + * \param rec + */ + void Push(const BrowseRecord &rec); + + /** + * \brief return the next place to visit + * \return next browsing record + */ + BrowseRecord Next(); + + /** + * \brief return the previous place we visited at + * \return previous browsing record + */ + BrowseRecord Prev(); + + /** + * \brief return true if manager has more next items + * \return + */ + bool CanNext() const; + + /** + * \brief return true if manager has more previous items + * \return + */ + bool CanPrev() const; + + void Clear(); +}; +#endif //NAVIGATIONMANAGER_H + + diff --git a/LiteEditor/new_configuration_dlg.cpp b/LiteEditor/new_configuration_dlg.cpp new file mode 100644 index 0000000000..e114e01760 --- /dev/null +++ b/LiteEditor/new_configuration_dlg.cpp @@ -0,0 +1,121 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "new_configuration_dlg.h" +#include "manager.h" +#include "project_settings.h" +#include "macros.h" + +/////////////////////////////////////////////////////////////////////////// + +NewConfigurationDlg::NewConfigurationDlg( wxWindow* parent, const wxString &projectName, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_projectName(projectName) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( m_panel1, wxID_ANY, wxT("Configuration Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_staticText1, 0, wxALL, 5 ); + + wxTextValidator validator(wxFILTER_ALPHANUMERIC); + m_textConfigurationName = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, validator ); + bSizer3->Add( m_textConfigurationName, 0, wxALL|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( m_panel1, wxID_ANY, wxT("Copy Settings from:"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_staticText2, 0, wxALL, 5 ); + + wxArrayString m_choiceCopyConfigurationsChoices; + m_choiceCopyConfigurations = new wxChoice( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCopyConfigurationsChoices, 0 ); + + // Get all configuration of the project + m_choiceCopyConfigurations->Append(wxT("-- None --")); + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); + if(settings){ + ProjectSettingsCookie cookie; + BuildConfigPtr bldConf = settings->GetFirstBuildConfiguration(cookie); + while(bldConf){ + m_choiceCopyConfigurations->Append(bldConf->GetName()); + bldConf = settings->GetNextBuildConfiguration(cookie); + } + } + m_choiceCopyConfigurations->SetSelection(0); + bSizer3->Add( m_choiceCopyConfigurations, 0, wxALL|wxEXPAND, 5 ); + + m_panel1->SetSizer( bSizer3 ); + m_panel1->Layout(); + bSizer3->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_ANY, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_RIGHT, 5 ); + + ConnectButton(m_buttonOK, NewConfigurationDlg::OnButtonOK); + + this->SetSizer( bSizer1 ); + this->Layout(); +} + +void NewConfigurationDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + + wxString newConfName; + newConfName = m_textConfigurationName->GetValue(); + newConfName = newConfName.Trim(); + newConfName = newConfName.Trim(false); + if(newConfName.IsEmpty()){ + wxMessageBox (wxT("Configuration Name is empty"), wxT("CodeLite"), wxOK | wxICON_INFORMATION); + return; + } + + ProjectSettingsPtr settings = ManagerST::Get()->GetProjectSettings(m_projectName); + wxString copyFrom = m_choiceCopyConfigurations->GetStringSelection(); + BuildConfigPtr newBuildConf; + + if(copyFrom == wxT("-- None --")){ + newBuildConf = new BuildConfig(NULL); + }else{ + BuildConfigPtr origBuildConf = settings->GetBuildConfiguration(copyFrom); + newBuildConf = origBuildConf->Clone(); + } + + newBuildConf->SetName(newConfName); + settings->SetBuildConfiguration(newBuildConf); + //save the settings + ManagerST::Get()->SetProjectSettings(m_projectName, settings); + EndModal(wxID_OK); +} diff --git a/LiteEditor/new_configuration_dlg.h b/LiteEditor/new_configuration_dlg.h new file mode 100644 index 0000000000..6a31894bd4 --- /dev/null +++ b/LiteEditor/new_configuration_dlg.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __new_configuration_dlg__ +#define __new_configuration_dlg__ + +#include + +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class NewConfigurationDlg +/////////////////////////////////////////////////////////////////////////////// +class NewConfigurationDlg : public wxDialog +{ +private: + wxString m_projectName; + wxPanel* m_panel1; + wxStaticText* m_staticText1; + wxTextCtrl* m_textConfigurationName; + wxStaticText* m_staticText2; + wxChoice* m_choiceCopyConfigurations; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + +protected: + void OnButtonOK(wxCommandEvent &event); + +public: + NewConfigurationDlg( wxWindow* parent, const wxString &projName, int id = wxID_ANY, wxString title = wxT("New Configuration"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 352,199 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__new_configuration_dlg__ diff --git a/LiteEditor/new_item_dlg.cpp b/LiteEditor/new_item_dlg.cpp new file mode 100644 index 0000000000..cf1ad891a4 --- /dev/null +++ b/LiteEditor/new_item_dlg.cpp @@ -0,0 +1,235 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP +#include +#endif //WX_PRECOMP + +#include "new_item_dlg.h" +#include "wx/xrc/xmlres.h" +#include "wx/textctrl.h" +#include "dirsaver.h" +#include "macros.h" + +static const wxString FileTypeCpp = wxT("C++ Source File (.cpp)"); +static const wxString FileTypeC = wxT("C Source File (.c)"); +static const wxString FileTypeHeader = wxT("Header File (.h)"); +static const wxString FileTypeAny = wxT("Any File"); + +/////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE(NewItemDlg, wxDialog) +EVT_CHAR_HOOK(NewItemDlg::OnCharHook) +END_EVENT_TABLE() + +NewItemDlg::NewItemDlg( wxWindow* parent, wxString cwd, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + m_cwd = cwd; + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* m_mainSizer; + m_mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_fileType = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL ); + m_mainSizer->Add( m_fileType, 1, wxALL|wxEXPAND, 5 ); + + // Initialise images map + wxImageList *images = new wxImageList(16, 16, true); + images->Add(wxXmlResource::Get()->LoadBitmap(_T("page_white_c"))); //0 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("page_white_cplusplus"))); //1 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("page_white_h"))); //2 + images->Add(wxXmlResource::Get()->LoadBitmap(_T("page_white_text"))); //3 + + m_fileType->AssignImageList( images, wxIMAGE_LIST_SMALL ); + m_fileType->InsertColumn(0, wxT("File Type")); + + //----------------------------------- + // Populate the list: + wxListItem item; + + item.SetText(FileTypeCpp); + item.SetImage(1); + m_fileType->InsertItem(item); + m_fileTypeValue = FileTypeCpp; + + item.SetText(FileTypeC); + item.SetImage(0); + m_fileType->InsertItem(item); + + item.SetText(FileTypeHeader); + item.SetImage(2); + m_fileType->InsertItem(item); + + item.SetText(FileTypeAny); + item.SetImage(3); + item.SetState(wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED); + m_fileType->InsertItem(item); + m_fileType->SetColumnWidth(0, wxLIST_AUTOSIZE); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 3, 2, 5 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Location:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_location = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_location, 1, wxALL|wxEXPAND, 5 ); + m_location->SetValue(m_cwd); + + m_browseBtn = new wxButton( this, wxID_ANY, wxT("&Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_browseBtn, 0, wxALL, 5 ); + + m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_fileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_fileName, 1, wxALL|wxEXPAND, 5 ); + + m_mainSizer->Add( fgSizer2, 0, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_mainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + m_okButton = new wxButton( this, wxID_ANY, wxT("Create"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_okButton, 0, wxALL, 5 ); + + m_cancel = new wxButton( this, wxID_ANY, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_cancel, 0, wxALL, 5 ); + + m_mainSizer->Add( bSizer6, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( m_mainSizer ); + this->Layout(); + + m_fileName->SetFocus(); + // Attach events + ConnectEvents(); +} + + +void NewItemDlg::ConnectEvents() +{ + m_cancel->Connect(m_cancel->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewItemDlg::OnClick), NULL, this); + m_okButton->Connect(m_okButton->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewItemDlg::OnClick), NULL, this); + m_browseBtn->Connect(m_browseBtn->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewItemDlg::OnClick), NULL, this); + m_fileType->Connect(m_fileType->GetId(), wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(NewItemDlg::OnListItemSelected), NULL, this); +} + + +void NewItemDlg::OnClick(wxCommandEvent &event) +{ + int id = event.GetId(); + if( id == m_okButton->GetId() ){ + DoCreateFile(); + } else if( id == m_cancel->GetId() ){ + EndModal(wxID_CANCEL); + } else if( id == m_browseBtn->GetId() ){ + DirSaver ds; + wxDirDialog *dlg = new wxDirDialog(this, wxT("Location:"), m_cwd); + if(dlg->ShowModal() == wxID_OK) + { + m_location->SetValue(dlg->GetPath()); + } + dlg->Destroy(); + } +} + +void NewItemDlg::DoCreateFile() +{ + wxString errMsg; + if( !Validate(errMsg) ){ + wxMessageBox(errMsg, wxT("CodeLite"), wxICON_INFORMATION | wxOK); + return; + } + + // Construct the file name + wxString fileName(m_fileName->GetValue()); + TrimString(fileName); + + if(m_fileTypeValue == FileTypeAny){ + m_newFileName = wxFileName(m_location->GetValue(),fileName); + } else if( m_fileTypeValue == FileTypeC ){ + // If user already provided suffix, dont add another one on top of it + if(fileName.Find(wxT(".")) == wxNOT_FOUND ){ + m_newFileName = wxFileName(m_location->GetValue(),fileName, wxT("c")); + } else { + m_newFileName = wxFileName(m_location->GetValue(),fileName); + } + } else if( m_fileTypeValue == FileTypeCpp ){ + // If user already provided suffix, dont add another one on top of it + if(fileName.Find(wxT(".")) == wxNOT_FOUND ){ + m_newFileName = wxFileName(m_location->GetValue(),fileName, wxT("cpp")); + } else { + m_newFileName = wxFileName(m_location->GetValue(),fileName); + } + } else if( m_fileTypeValue == FileTypeHeader ){ + // If user already provided suffix, dont add another one on top of it + if(fileName.Find(wxT(".")) == wxNOT_FOUND ){ + m_newFileName = wxFileName(m_location->GetValue(),fileName, wxT("h")); + } else { + m_newFileName = wxFileName(m_location->GetValue(),fileName); + } + } + EndModal(wxID_OK); +} + +bool NewItemDlg::Validate(wxString &errMsg) +{ + // make sure we have file name & path set up correctly + wxFileName fn(m_location->GetValue() + wxFileName::GetPathSeparator()); + + if( m_location->GetValue().Trim().IsEmpty() ){ + errMsg = wxT("Missing location"); + return false; + } + + if( !fn.DirExists() ){ + errMsg = wxT("Directory: "); + errMsg << fn.GetPath() << wxT(" does not exist"); + return false; + } + + fn = wxFileName(m_location->GetValue(), m_fileName->GetValue()); + if( fn.FileExists() ){ + errMsg = wxT("A file with that name already exist, please choose different name"); + return false; + } + + if( m_fileName->GetValue().Trim().IsEmpty() ){ + errMsg = wxT("Missing file name"); + return false; + } + + return true; +} + +void NewItemDlg::OnListItemSelected(wxListEvent &event) +{ + m_fileTypeValue = event.GetText(); +} + +void NewItemDlg::OnCharHook(wxKeyEvent &event) +{ + if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) + { + DoCreateFile(); + } + event.Skip(); +} + diff --git a/LiteEditor/new_item_dlg.h b/LiteEditor/new_item_dlg.h new file mode 100644 index 0000000000..3898e99aad --- /dev/null +++ b/LiteEditor/new_item_dlg.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __new_item_dlg__ +#define __new_item_dlg__ + +// Define WX_GCH in order to support precompiled headers with GCC compiler. +// You have to create the header "wx_pch.h" and include all files needed +// for compile your gui inside it. +// Then, compile it and place the file "wx_pch.h.gch" into the same +// directory that "wx_pch.h". +#ifdef WX_GCH +#include +#else +#include +#endif + +#include +#include +#include +#include "wx/filename.h" +#include "wx/imaglist.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class NewItemDlg +/////////////////////////////////////////////////////////////////////////////// +class NewItemDlg : public wxDialog +{ +private: + +protected: + wxListCtrl* m_fileType; + wxStaticText* m_staticText3; + wxTextCtrl* m_location; + wxButton* m_browseBtn; + wxStaticText* m_staticText6; + wxTextCtrl* m_fileName; + wxStaticLine* m_staticline1; + wxButton* m_okButton; + wxButton* m_cancel; + wxString m_fileTypeValue; + wxFileName m_newFileName; + wxString m_cwd; + +public: + NewItemDlg( wxWindow* parent, wxString cwd, int id = wxID_ANY, wxString title = wxEmptyString, wxPoint pos = wxDefaultPosition, wxSize size = wxSize(500, 350), int style = wxDEFAULT_DIALOG_STYLE ); + const wxFileName &GetFileName() const { return m_newFileName; } + +protected: + //------------------------------------ + // Event handlers + //------------------------------------ + DECLARE_EVENT_TABLE(); + virtual void OnClick(wxCommandEvent &event); + virtual void OnListItemSelected(wxListEvent &event); + virtual void OnCharHook(wxKeyEvent &event); + +private: + void ConnectEvents(); + bool Validate(wxString &errMsg); + void DoCreateFile(); +}; + +#endif //__new_item_dlg__ diff --git a/LiteEditor/newdlg.cpp b/LiteEditor/newdlg.cpp new file mode 100644 index 0000000000..a1707d3a78 --- /dev/null +++ b/LiteEditor/newdlg.cpp @@ -0,0 +1,266 @@ +#include "newdlg.h" +#include +#include +#include +#include +#include "filepicker.h" +#include "dirpicker.h" +#include +#include +#include +#include +#include "project.h" +#include +#include "manager.h" +#include "editor_config.h" +#include "build_settings_config.h" + +DEFINE_EVENT_TYPE(wxEVT_NEW_DLG_CREATE_LE) + +NewDlg::NewDlg() +: wxDialog() +, m_selection(NEW_DLG_WORKSPACE) +{ +} + +NewDlg::NewDlg(wxWindow* parent, + int selection, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + Create(parent, selection, id, caption, pos, size, style); +} + +bool NewDlg::Create(wxWindow* parent, + int selection, + wxWindowID id, + const wxString& caption, + const wxPoint& pos, + const wxSize& size, + long style) +{ + if( !wxDialog::Create(parent, id, caption, pos, size, style) ) + return false; + + m_selection = selection; + + CreateGUIControls(); + ConnectEvents(); + + GetSizer()->Fit(this); + GetSizer()->SetMinSize(500, 300); + GetSizer()->SetSizeHints(this); + return true; +} + +NewDlg::~NewDlg() +{ +} + +int NewDlg::GetSelection() const +{ + return m_selection; +} + +void NewDlg::CreateGUIControls() +{ + wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + m_book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(500, -1), + wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON | wxFNB_NODRAG | wxFNB_FF2 | + wxFNB_BACKGROUND_GRADIENT); + + m_book->AddPage(CreateProjectPage(), wxT("Project"), m_selection == NEW_DLG_PROJECT); + m_book->AddPage(CreateWorkspacePage(), wxT("Workspace"), m_selection == NEW_DLG_WORKSPACE); + mainSizer->Add(m_book, 1, wxEXPAND | wxALL, 5); + + if( m_selection == NEW_DLG_PROJECT ) + { + m_projName->SetFocus(); + } + else + { + m_name->SetFocus(); + } + + // Add the buttons + m_create = new wxButton(this, wxID_OK, wxT("&Create")); + btnSizer->Add(m_create, 0, wxALL | wxEXPAND | wxALIGN_RIGHT, 5 ); + + m_cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel")); + btnSizer->Add(m_cancel, 0, wxALL | wxEXPAND | wxALIGN_RIGHT, 5 ); + + mainSizer->Add(new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL), 0, wxEXPAND ); + mainSizer->Add(btnSizer, 0, wxALL | wxALIGN_RIGHT, 5); +} + +wxWindow *NewDlg::CreateWorkspacePage() +{ + wxBoxSizer *panelSizer = new wxBoxSizer(wxVERTICAL); + wxPanel *panel = new wxPanel(m_book); + panel->SetSizer(panelSizer); + panel->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE) ); + + wxStaticText* itemStaticText; + itemStaticText = new wxStaticText( panel, wxID_STATIC, wxT("Workspace Name:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + panelSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + m_name = new wxTextCtrl( panel, wxID_ANY, wxT("")); + panelSizer->Add(m_name, 0, wxALL | wxEXPAND, 5 ); + + itemStaticText = new wxStaticText( panel, wxID_STATIC, wxT("Workspace Path:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + panelSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + m_pathPicker = new DirPicker(panel); + panelSizer->Add(m_pathPicker, 0, wxEXPAND | wxALL, 5); + return panel; +} + +wxWindow *NewDlg::CreateProjectPage() +{ + wxBoxSizer *panelSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *hSizer = new wxBoxSizer(wxHORIZONTAL); + wxPanel *panel = new wxPanel(m_book); + panel->SetSizer(hSizer); + panel->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT) ); + + wxStaticText* itemStaticText; + + m_projTypes = new wxListBox(panel, wxID_ANY); + + ManagerST::Get()->GetProjectTemplateList(m_list); + + std::list::iterator iter = m_list.begin(); + for(; iter != m_list.end(); iter++) + { + m_projTypes->Append((*iter)->GetName()); + } + + iter = m_list.begin(); + if( iter != m_list.end() ) + { + m_projTypes->SetStringSelection((*iter)->GetName()); + m_projectData.m_srcProject = (*iter); + } + + itemStaticText = new wxStaticText( panel, wxID_STATIC, wxT("Project Name:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + panelSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + m_projName = new wxTextCtrl( panel, wxID_ANY, wxT("")); + panelSizer->Add(m_projName, 0, wxALL | wxEXPAND, 5 ); + + itemStaticText = new wxStaticText( panel, wxID_STATIC, wxT("Project Path:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + panelSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + //by default set here the workspace path + m_projPathPicker = new DirPicker(panel); + m_projPathPicker->SetPath(wxGetCwd()); + + panelSizer->Add(m_projPathPicker, 0, wxEXPAND | wxALL, 5); + + itemStaticText = new wxStaticText( panel, wxID_STATIC, wxT("Project Compiler:"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); + panelSizer->Add(itemStaticText, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 ); + + wxArrayString choices; + //get list of compilers from configuration file + BuildSettingsConfigCookie cookie; + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetFirstCompiler(cookie); + while(cmp) + { + choices.Add(cmp->GetName()); + cmp = BuildSettingsConfigST::Get()->GetNextCompiler(cookie); + } + + m_choiceCmpType = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices); + panelSizer->Add(m_choiceCmpType, 0, wxEXPAND | wxALL, 5); + + if(m_choiceCmpType->GetCount() > 0) + { + m_choiceCmpType->SetSelection(0); + } + + hSizer->Add(m_projTypes, 1, wxALL | wxEXPAND, 5); + hSizer->Add(panelSizer, 2, wxALL | wxEXPAND, 5); + return panel; +} + +void NewDlg::OnClick(wxCommandEvent & event) +{ + wxUnusedVar(event); + // pass data from controls to the m_data + if( m_book->GetSelection() == NEW_DLG_WORKSPACE ) + { + m_workspaceData.m_path = m_pathPicker->GetPath(); + m_workspaceData.m_name = m_name->GetValue(); + + if( m_workspaceData.m_name.Trim().IsEmpty() ) + { + wxMessageBox(wxT("Invalid workspace name"), wxT("Error"), wxOK | wxICON_HAND); + return; + } + + if( !wxDirExists(m_workspaceData.m_path) ) + { + wxMessageBox(wxT("Invalid path"), wxT("Error"), wxOK | wxICON_HAND); + return; + } + + wxCommandEvent event(wxEVT_NEW_DLG_CREATE_LE, GetId()); + event.SetEventObject(this); + ::wxPostEvent(GetParent()->GetEventHandler(), event); + } + else if( m_book->GetSelection() == NEW_DLG_PROJECT ) + { + m_projectData.m_name = m_projName->GetValue(); + m_projectData.m_path = m_projPathPicker->GetPath(); + m_projectData.m_cmpType = m_choiceCmpType->GetStringSelection(); + + //the project type is determined according to the selected project name + m_projectData.m_srcProject = FindProject(m_projTypes->GetStringSelection()); + + if( m_projectData.m_name.Trim().IsEmpty() ) + { + wxMessageBox(wxT("Invalid project name"), wxT("Error"), wxOK | wxICON_HAND); + return; + } + + if( !wxDirExists(m_projectData.m_path) ) + { + wxMessageBox(wxT("Invalid path"), wxT("Error"), wxOK | wxICON_HAND); + return; + } + wxCommandEvent event(wxEVT_NEW_DLG_CREATE_LE, GetId()); + event.SetEventObject(this); + ::wxPostEvent(GetParent()->GetEventHandler(), event); + } + EndModal(wxID_OK); +} + +void NewDlg::OnListItemSelected(wxListEvent &event) +{ + m_projectData.m_srcProject = FindProject( event.GetText() ); +} + +void NewDlg::ConnectEvents() +{ + // Connect buttons + m_create->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(NewDlg::OnClick), NULL, this); + m_projTypes->Connect(wxID_ANY, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(NewDlg::OnListItemSelected), NULL, this); +} + +ProjectPtr NewDlg::FindProject(const wxString &name) +{ + std::list::iterator iter = m_list.begin(); + for(; iter != m_list.end(); iter++) + { + if((*iter)->GetName() == name) + { + return (*iter); + } + } + return NULL; +} + diff --git a/LiteEditor/newdlg.h b/LiteEditor/newdlg.h new file mode 100644 index 0000000000..76d2cedcf6 --- /dev/null +++ b/LiteEditor/newdlg.h @@ -0,0 +1,103 @@ +#ifndef NEW_DLG_H +#define NEW_DLG_H + +#include "wx/dialog.h" +#include "wx/listctrl.h" +#include "ctags_manager.h" +#include "project.h" + +#define NEW_DLG_PROJECT 0 +#define NEW_DLG_WORKSPACE 1 + +class wxTextCtrl; +class wxCheckBox; +class wxButton; +class wxStaticText; +class DirPicker; +class wxComboBox; +class FilePicker; +class wxFlatNotebook; +class wxListBox; + +#ifndef WXDLLIMPEXP_LE + #ifdef WXMAKINGDLL + # define WXDLLIMPEXP_LE WXIMPORT + #elif defined(WXUSINGDLL) + # define WXDLLIMPEXP_LE WXEXPORT + #else + # define WXDLLIMPEXP_LE + #endif // WXDLLIMPEXP_LE +#endif + +// Workspace information +class WXDLLIMPEXP_LE WorkspaceData { +public: + wxString m_name; //< Workspace name + wxString m_path; //< Workspace directoy +}; + +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE, wxEVT_NEW_DLG_CREATE_LE, -1) + +// Workspace dialog +class NewDlg : public wxDialog +{ + WorkspaceData m_workspaceData; + ProjectData m_projectData; + + // Options + wxTextCtrl *m_name; + DirPicker *m_pathPicker; + + wxTextCtrl *m_projName; + DirPicker *m_projPathPicker; + wxListBox *m_projTypes; + wxChoice *m_choiceCmpType; + wxChoice *m_copySettings; + + // Buttons + wxButton *m_create; + wxButton *m_cancel; + + int m_selection; + wxFlatNotebook *m_book; + std::list m_list; + +public: + virtual ~NewDlg( ); + NewDlg(); + NewDlg( wxWindow* parent, + int selection = NEW_DLG_WORKSPACE, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("New"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxSize(400, 200), + long style = wxDEFAULT_DIALOG_STYLE); + + // Creation + bool Create(wxWindow* parent, + int selection = NEW_DLG_WORKSPACE, + wxWindowID id = wxID_ANY, + const wxString& caption = wxT("New"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxSize(400, 200), + long style = wxDEFAULT_DIALOG_STYLE + ); + + const WorkspaceData& GetWorksapceData() const { return m_workspaceData; } + const ProjectData& GetProjectData() const { return m_projectData; } + + // return the selected notebook tab + int GetSelection() const; + ProjectPtr FindProject(const wxString &name); + +protected: + void CreateGUIControls(); + void ConnectEvents(); + void OnClick(wxCommandEvent &event); + void OnListItemSelected(wxListEvent &event); + + wxWindow *CreateProjectPage(); + wxWindow *CreateWorkspacePage(); +}; +#endif // NEW_DLG_H + diff --git a/LiteEditor/open_resouce_dlg.cpp b/LiteEditor/open_resouce_dlg.cpp new file mode 100644 index 0000000000..eb71fad073 --- /dev/null +++ b/LiteEditor/open_resouce_dlg.cpp @@ -0,0 +1,243 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "open_resouce_dlg.h" +#include "macros.h" +#include "manager.h" + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE(OpenResourceDlg, wxDialog) +EVT_CHAR_HOOK(OpenResourceDlg::OnCharHook) +END_EVENT_TABLE() + +OpenResourceDlg::OpenResourceDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +{ + m_timer = new wxTimer(this); + m_timer->Start(100); + + //load all files from the workspace + ManagerST::Get()->GetWorkspaceFiles(m_files, true); + + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* panelSizer; + panelSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticTitle = new wxStaticText( mainPanel, wxID_ANY, wxT("Find Resource (wildcards are allowed):"), wxDefaultPosition, wxDefaultSize, 0 ); + panelSizer->Add( m_staticTitle, 0, wxALL, 5 ); + + m_textResourceName = new wxTextCtrl(mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER); + panelSizer->Add( m_textResourceName, 0, wxALL|wxEXPAND, 5 ); + + wxStaticText *label = new wxStaticText( mainPanel, wxID_ANY, wxT("Matched resources:"), wxDefaultPosition, wxDefaultSize, 0 ); + panelSizer->Add( label, 0, wxALL, 5 ); + + m_listShortNames = new wxListBox( mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + panelSizer->Add( m_listShortNames, 1, wxALL|wxEXPAND, 5 ); + + mainPanel->SetSizer( panelSizer ); + mainPanel->Layout(); + panelSizer->Fit( mainPanel ); + mainSizer->Add( mainPanel, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_btnOk = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_btnOk, 0, wxALL, 5 ); + + m_button2 = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_button2, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + ConnectEvents(); + m_textResourceName->SetFocus(); +} + +OpenResourceDlg::~OpenResourceDlg() +{ + m_timer->Stop(); + delete m_timer; +} + +void OpenResourceDlg::ConnectEvents() +{ + ConnectButton(m_button2, OpenResourceDlg::OnButtonCancel); + ConnectButton(m_btnOk, OpenResourceDlg::OnButtonOK); + m_listShortNames->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(OpenResourceDlg::OnItemActivated), NULL, this); + Connect(m_timer->GetId(), wxEVT_TIMER, wxTimerEventHandler(OpenResourceDlg::OnTimer), NULL, this); +} + +void OpenResourceDlg::OnTimer(wxTimerEvent &event) +{ + wxUnusedVar(event); + wxArrayString tmpArr; + wxString curSel = m_textResourceName->GetValue(); + if(!curSel.IsEmpty()) + { + curSel = curSel.MakeLower(); + for(size_t i=0; iGetStrings(); + actValues.Sort(); + tmpArr.Sort(); + + if(tmpArr == actValues) + return; + + //change was done, update the file list + Freeze(); + m_listShortNames->Clear(); + for(size_t i=0; iAppend(tmpArr.Item(i)); + Thaw(); + if(m_listShortNames->GetCount() > 0){ + m_listShortNames->Select(0); + } +} + +void OpenResourceDlg::OnButtonCancel(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_CANCEL); +} + +void OpenResourceDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + if(UpdateFileName()) + { + EndModal(wxID_OK); + } +} + +void OpenResourceDlg::OnItemActivated(wxCommandEvent &event) +{ + wxUnusedVar(event); + + if(UpdateFileName()) + { + EndModal(wxID_OK); + } +} + +bool OpenResourceDlg::UpdateFileName() +{ + wxString openWhat = m_listShortNames->GetStringSelection(); + if(openWhat.IsEmpty()) + return false; + + m_fileName = openWhat; + return true; +} + +void OpenResourceDlg::OnCharHook(wxKeyEvent &event) +{ + if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) + { + if(m_listShortNames->GetSelection() != wxNOT_FOUND) + { + if(UpdateFileName()){ + EndModal(wxID_OK); + return; + } + } + else if(m_listShortNames->GetCount() == 1) + { + m_listShortNames->SetSelection(0); + if(UpdateFileName()){ + EndModal(wxID_OK); + return; + } + } + } + else + if(event.GetKeyCode() == WXK_DOWN && m_listShortNames->GetCount() > 0) + { + //up key + int cursel = m_listShortNames->GetSelection(); + if(cursel != wxNOT_FOUND) + { + //there is a selection in the listbox + cursel++; + if(cursel >= (int)m_listShortNames->GetCount()){ + //already at last item, cant scroll anymore + return; + } + m_listShortNames->SetSelection(cursel); + m_listShortNames->Select(cursel); + m_listShortNames->SetFirstItem(cursel); + }else{ + //no selection is made + m_listShortNames->SetSelection(0); + m_listShortNames->Select(0); + m_listShortNames->SetFirstItem(0); + } + return; + } + else + if(event.GetKeyCode() == WXK_UP && m_listShortNames->GetCount() > 0) + { + //up key + int cursel = m_listShortNames->GetSelection(); + if(cursel != wxNOT_FOUND) + { + //there is a selection in the listbox + cursel--; + if(cursel < 0){ + //already at first item, cant scroll anymore + return; + } + m_listShortNames->SetSelection(cursel); + m_listShortNames->SetFirstItem(cursel); + }else{ + //no selection is made + m_listShortNames->SetSelection(0); + m_listShortNames->SetFirstItem(0); + } + return; + } + event.Skip(); +} diff --git a/LiteEditor/open_resouce_dlg.h b/LiteEditor/open_resouce_dlg.h new file mode 100644 index 0000000000..a894f88b8c --- /dev/null +++ b/LiteEditor/open_resouce_dlg.h @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __open_resouce_dlg__ +#define __open_resouce_dlg__ + +#include + +#include +#include +#include +#include "vector" +#include "wx/filename.h" +#include "wx/timer.h" +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class OpenResourceDlg +/////////////////////////////////////////////////////////////////////////////// +class OpenResourceDlg : public wxDialog +{ + std::vector m_files; + wxTimer *m_timer; + wxString m_fileName; + +protected: + void OnButtonOK(wxCommandEvent &event); + void OnButtonCancel(wxCommandEvent &event); + void OnItemActivated(wxCommandEvent &event); + void ConnectEvents(); + bool UpdateFileName(); + void OnTimer(wxTimerEvent &event); + +protected: + wxPanel* mainPanel; + wxStaticText* m_staticTitle; + wxTextCtrl* m_textResourceName; + wxListBox* m_listShortNames; + wxStaticLine* m_staticline1; + wxButton* m_btnOk; + wxButton* m_button2; + +public: + OpenResourceDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Open Resource:"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 653,393 ), int style = wxDEFAULT_DIALOG_STYLE); + virtual ~OpenResourceDlg(); + const wxString& GetFileName() const { return m_fileName; } + + DECLARE_EVENT_TABLE(); + virtual void OnCharHook(wxKeyEvent &event); +}; + +#endif //__open_resouce_dlg__ diff --git a/LiteEditor/openwindowspanel.cpp b/LiteEditor/openwindowspanel.cpp new file mode 100644 index 0000000000..7461386b50 --- /dev/null +++ b/LiteEditor/openwindowspanel.cpp @@ -0,0 +1,104 @@ +#include "openwindowspanel.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "frame.h" +#include +#include "manager.h" + +OpenWindowsPanel::OpenWindowsPanel( wxWindow* parent ) + : + OpenWindowsPanelBase( parent ) +{ +} + +void OpenWindowsPanel::Clear() +{ + m_fileList->Clear(); +} + +void OpenWindowsPanel::UpdateList() +{ + m_fileList->Freeze(); + m_fileList->Clear(); + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + for (int i=0; i< (int)book->GetPageCount(); i++) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)i)); + if (editor) { + wxString txt = book->GetPageText((size_t)i); + m_fileList->Append(txt, new wxStringClientData(editor->GetFileName().GetFullPath())); + } + } + SyncSelection(); + m_fileList->Thaw(); +} + +void OpenWindowsPanel::SyncSelection() +{ + wxFlatNotebook *book = Frame::Get()->GetNotebook(); + int sel = book->GetSelection(); + if (sel != wxNOT_FOUND) { + LEditor *editor = dynamic_cast(book->GetPage((size_t)sel)); + if (editor) { + //Ok, the selection is a valid editor (unlike the Welcome page) + wxString fullname = editor->GetFileName().GetFullPath(); + for (size_t i=0; i< m_fileList->GetCount(); i++) { + wxStringClientData *data = dynamic_cast(m_fileList->GetClientObject((unsigned int)i)); + if (data && data->GetData() == fullname) { + m_fileList->Select((int)i); + } + } + } + } +} + +void OpenWindowsPanel::OnKeyDown( wxKeyEvent& event ) +{ + if( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER){ + int selection = m_fileList->GetSelection(); + if(selection != wxNOT_FOUND){ + DoOpenSelectedItem(selection); + return; + } + } + event.Skip(); +} + +void OpenWindowsPanel::OnItemDClicked( wxCommandEvent& event ) +{ + int item = event.GetSelection(); + DoOpenSelectedItem(item); +} + +void OpenWindowsPanel::OnItemSelected(wxCommandEvent &e) +{ +// int item = e.GetSelection(); +// DoOpenSelectedItem(item); + e.Skip(); +} + +void OpenWindowsPanel::OnChar(wxKeyEvent& event) +{ + if( event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER){ + int selection = m_fileList->GetSelection(); + if(selection != wxNOT_FOUND){ + DoOpenSelectedItem(selection); + return; + } + } + event.Skip(); +} + +void OpenWindowsPanel::OnRightUp( wxMouseEvent& event ) +{ + wxUnusedVar(event); +} + +void OpenWindowsPanel::DoOpenSelectedItem(int item) +{ + wxStringClientData *data = dynamic_cast(m_fileList->GetClientObject((unsigned int)item)); + if (data) { + wxString fullpath = data->GetData(); + //open this file... + Manager *mgr = ManagerST::Get(); + mgr->OpenFile(fullpath, wxEmptyString); + } +} diff --git a/LiteEditor/openwindowspanel.h b/LiteEditor/openwindowspanel.h new file mode 100644 index 0000000000..2b0c7142d9 --- /dev/null +++ b/LiteEditor/openwindowspanel.h @@ -0,0 +1,31 @@ +#ifndef __openwindowspanel__ +#define __openwindowspanel__ + +/** +@file +Subclass of OpenWindowsPanelBase, which is generated by wxFormBuilder. +*/ + +#include "openwindowspanelbase.h" + +/** Implementing OpenWindowsPanelBase */ +class OpenWindowsPanel : public OpenWindowsPanelBase +{ +protected: + // Handlers for OpenWindowsPanelBase events. + void OnKeyDown( wxKeyEvent& event ); + void OnItemDClicked( wxCommandEvent& event ); + void OnRightUp( wxMouseEvent& event ); + void OnItemSelected(wxCommandEvent &e); + void OnChar(wxKeyEvent &e); + void DoOpenSelectedItem(int item); + +public: + /** Constructor */ + OpenWindowsPanel( wxWindow* parent ); + void UpdateList(); + void SyncSelection(); + void Clear(); +}; + +#endif // __openwindowspanel__ diff --git a/LiteEditor/openwindowspanelbase.cpp b/LiteEditor/openwindowspanelbase.cpp new file mode 100644 index 0000000000..70e8746ffa --- /dev/null +++ b/LiteEditor/openwindowspanelbase.cpp @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "openwindowspanelbase.h" + +/////////////////////////////////////////////////////////////////////////// + +OpenWindowsPanelBase::OpenWindowsPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_fileList = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SORT ); + mainSizer->Add( m_fileList, 1, wxALL|wxEXPAND, 0 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_fileList->Connect( wxEVT_CHAR, wxKeyEventHandler( OpenWindowsPanelBase::OnChar ), NULL, this ); + m_fileList->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( OpenWindowsPanelBase::OnKeyDown ), NULL, this ); + m_fileList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( OpenWindowsPanelBase::OnItemSelected ), NULL, this ); + m_fileList->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( OpenWindowsPanelBase::OnItemDClicked ), NULL, this ); + m_fileList->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OpenWindowsPanelBase::OnRightUp ), NULL, this ); +} diff --git a/LiteEditor/openwindowspanelbase.h b/LiteEditor/openwindowspanelbase.h new file mode 100644 index 0000000000..e1076dae95 --- /dev/null +++ b/LiteEditor/openwindowspanelbase.h @@ -0,0 +1,46 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __openwindowspanelbase__ +#define __openwindowspanelbase__ + +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class OpenWindowsPanelBase +/////////////////////////////////////////////////////////////////////////////// +class OpenWindowsPanelBase : public wxPanel +{ + private: + + protected: + wxListBox* m_fileList; + + // Virtual event handlers, overide them in your derived class + virtual void OnChar( wxKeyEvent& event ){ event.Skip(); } + virtual void OnKeyDown( wxKeyEvent& event ){ event.Skip(); } + virtual void OnItemSelected( wxCommandEvent& event ){ event.Skip(); } + virtual void OnItemDClicked( wxCommandEvent& event ){ event.Skip(); } + virtual void OnRightUp( wxMouseEvent& event ){ event.Skip(); } + + + public: + OpenWindowsPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 250,300 ), long style = wxTAB_TRAVERSAL|wxWANTS_CHARS ); + +}; + +#endif //__openwindowspanelbase__ diff --git a/LiteEditor/options_base_dlg.cpp b/LiteEditor/options_base_dlg.cpp new file mode 100644 index 0000000000..9225e0a1be --- /dev/null +++ b/LiteEditor/options_base_dlg.cpp @@ -0,0 +1,261 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP +#include +#endif //WX_PRECOMP + +#include "options_base_dlg.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "lexer_configuration.h" +#include "lexer_page.h" +#include "editor_config.h" +#include "manager.h" + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE( OptionsDlg, wxDialog ) + EVT_BUTTON( wxID_OK, OptionsDlg::OnButtonOK ) + EVT_BUTTON( wxID_CANCEL, OptionsDlg::OnButtonCancel ) + EVT_BUTTON( wxID_APPLY, OptionsDlg::OnButtonApply ) +END_EVENT_TABLE() + +OptionsDlg::OptionsDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->Centre( wxBOTH ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + long nbStyle = wxFNB_FF2 | wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON | wxFNB_NODRAG; + m_book = new wxFlatNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, nbStyle ); + m_book->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + + m_book->AddPage( CreateGeneralPage(), wxT("General"), true ); + m_book->AddPage( CreateSyntaxHighlightPage(), wxT("Syntax Highlight"), false ); + + mainSizer->Add( m_book, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_okButton = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_okButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_cancelButton = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_cancelButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_applyButton = new wxButton( this, wxID_APPLY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_applyButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); +} + +wxPanel *OptionsDlg::CreateSyntaxHighlightPage() +{ + wxPanel *page = new wxPanel( m_book, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); + page->SetSizer(sz); + + long style = wxFNB_FF2 | wxFNB_NO_NAV_BUTTONS | wxFNB_DROPDOWN_TABS_LIST | wxFNB_NO_X_BUTTON; + m_lexersBook = new wxFlatNotebook(page, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); + sz->Add(m_lexersBook, 1, wxEXPAND | wxALL, 5); + m_lexersBook->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + + bool selected = true; + EditorConfig::ConstIterator iter = EditorConfigST::Get()->LexerBegin(); + for(; iter != EditorConfigST::Get()->LexerEnd(); iter++){ + LexerConfPtr lexer = iter->second; + m_lexersBook->AddPage(CreateLexerPage(m_lexersBook, lexer), lexer->GetName(), selected); + selected = false; + } + + return page; +} + +wxPanel *OptionsDlg::CreateGeneralPage() +{ + OptionsConfigPtr options = EditorConfigST::Get()->GetOptions(); + m_general = new wxPanel( m_book, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* vSz1; + vSz1 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_general, -1, wxT("Folding:") ), wxVERTICAL ); + + m_checkBoxDisplayFoldMargin = new wxCheckBox( m_general, wxID_ANY, wxT("Display Folding Margin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxDisplayFoldMargin->SetValue(options->GetDisplayFoldMargin()); + + sbSizer1->Add( m_checkBoxDisplayFoldMargin, 0, wxALL, 5 ); + + m_checkBoxMarkFoldedLine = new wxCheckBox( m_general, wxID_ANY, wxT("Underline Folded Line"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxMarkFoldedLine->SetValue(options->GetUnderlineFoldLine()); + + sbSizer1->Add( m_checkBoxMarkFoldedLine, 0, wxALL, 5 ); + + m_staticText1 = new wxStaticText( m_general, wxID_ANY, wxT("Fold Style:"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer1->Add( m_staticText1, 0, wxALL, 5 ); + + wxString m_foldStyleChoiceChoices[] = { wxT("Simple"), wxT("Arrows"), wxT("Flatten Tree Square Headers"), wxT("Flatten Tree Circular Headers") }; + int m_foldStyleChoiceNChoices = sizeof( m_foldStyleChoiceChoices ) / sizeof( wxString ); + m_foldStyleChoice = new wxChoice( m_general, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_foldStyleChoiceNChoices, m_foldStyleChoiceChoices, 0 ); + sbSizer1->Add( m_foldStyleChoice, 0, wxALL|wxEXPAND, 5 ); + m_foldStyleChoice->SetStringSelection( options->GetFoldStyle() ); + + vSz1->Add( sbSizer1, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_general, -1, wxT("Bookmarks:") ), wxVERTICAL ); + + m_displayBookmarkMargin = new wxCheckBox( m_general, wxID_ANY, wxT("Display Selection / Bookmark margin"), wxDefaultPosition, wxDefaultSize, 0 ); + m_displayBookmarkMargin->SetValue(options->GetDisplayBookmarkMargin()); + + sbSizer3->Add( m_displayBookmarkMargin, 0, wxALL, 5 ); + + m_staticText6 = new wxStaticText( m_general, wxID_ANY, wxT("Bookmark Shape:"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer3->Add( m_staticText6, 0, wxALL, 5 ); + + wxString m_bookmarkShapeChoices[] = { wxT("Small Rectangle"), wxT("Rounded Rectangle"), wxT("Circle"), wxT("Small Arrow") }; + int m_bookmarkShapeNChoices = sizeof( m_bookmarkShapeChoices ) / sizeof( wxString ); + m_bookmarkShape = new wxChoice( m_general, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_bookmarkShapeNChoices, m_bookmarkShapeChoices, 0 ); + sbSizer3->Add( m_bookmarkShape, 0, wxALL|wxEXPAND, 5 ); + m_bookmarkShape->SetStringSelection(options->GetBookmarkShape()); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 2, 2, 0, 0 ); + + m_staticText4 = new wxStaticText( m_general, wxID_ANY, wxT("Select the bookmark background colour:"), wxDefaultPosition, wxDefaultSize, 0 ); + gSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_bgColourPicker = new wxColourPickerCtrl(m_general, wxID_ANY, options->GetBookmarkBgColour(), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + gSizer1->Add( m_bgColourPicker, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_staticText5 = new wxStaticText( m_general, wxID_ANY, wxT("Select the bookmark forground colour:"), wxDefaultPosition, wxDefaultSize, 0 ); + gSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_fgColourPicker = new wxColourPickerCtrl( m_general, wxID_ANY, options->GetBookmarkFgColour(), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + gSizer1->Add( m_fgColourPicker, 0, wxALIGN_RIGHT|wxALL, 5 ); + + sbSizer3->Add( gSizer1, 1, wxEXPAND, 5 ); + + vSz1->Add( sbSizer3, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer4; + sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_general, -1, wxT("General:") ), wxVERTICAL ); + + wxBoxSizer *bszier = new wxBoxSizer(wxVERTICAL); + + m_displayLineNumbers = new wxCheckBox( m_general, wxID_ANY, wxT("Display Line Numbers"), wxDefaultPosition, wxDefaultSize, 0 ); + m_displayLineNumbers->SetValue(options->GetDisplayLineNumbers()); + bszier->Add( m_displayLineNumbers, 0, wxALL, 5 ); + + m_showIndentationGuideLines = new wxCheckBox( m_general, wxID_ANY, wxT("Show Indentation Guidelines"), wxDefaultPosition, wxDefaultSize, 0 ); + m_showIndentationGuideLines->SetValue(options->GetShowIndentationGuidelines()); + bszier->Add( m_showIndentationGuideLines, 0, wxALL, 5 ); + + m_highlighyCaretLine = new wxCheckBox( m_general, wxID_ANY, wxT("Highlight Caret Line"), wxDefaultPosition, wxDefaultSize, 0); + m_highlighyCaretLine->SetValue(options->GetHighlightCaretLine()); + bszier->Add( m_highlighyCaretLine, 0, wxALL, 5 ); + + //set some colour pickers + wxStaticLine *line = new wxStaticLine( m_general, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bszier->Add(line, 0, wxEXPAND | wxALL, 5); + + wxBoxSizer *hsizer = new wxBoxSizer(wxHORIZONTAL); + wxStaticText *txt = new wxStaticText(m_general, wxID_ANY, wxT("Select the caret line background colour:")); + hsizer->Add(txt, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5); + + m_caretLineColourPicker = new wxColourPickerCtrl(m_general, wxID_ANY, options->GetCaretLineColour(), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + hsizer->Add(m_caretLineColourPicker, 0, wxALL|wxEXPAND, 5); + bszier->Add( hsizer, 0, wxEXPAND); + + hsizer = new wxBoxSizer(wxHORIZONTAL); + txt = new wxStaticText(m_general, wxID_ANY, wxT("Select the caret forground colour:")); + hsizer->Add(txt, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5); + + m_caretColourPicker = new wxColourPickerCtrl(m_general, wxID_ANY, options->GetCaretColour(), wxDefaultPosition, wxDefaultSize, wxCLRP_SHOW_LABEL); + hsizer->Add(m_caretColourPicker, 0, wxALL|wxEXPAND, 5); + bszier->Add( hsizer, 0, wxEXPAND); + + sbSizer4->Add( bszier, 1, wxEXPAND, 5 ); + + vSz1->Add( sbSizer4, 0, wxEXPAND, 5 ); + + m_general->SetSizer( vSz1 ); + m_general->Layout(); + vSz1->Fit( m_general ); + return m_general; +} + +wxPanel *OptionsDlg::CreateLexerPage(wxPanel *parent, LexerConfPtr lexer) +{ + return new LexerPage(parent, lexer); +} + +void OptionsDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + SaveChanges(); + ManagerST::Get()->ApplySettingsChanges(); + // and close the dialog + EndModal(wxID_OK); +} + +void OptionsDlg::OnButtonApply(wxCommandEvent &event) +{ + SaveChanges(); + ManagerST::Get()->ApplySettingsChanges(); + wxUnusedVar(event); +} + +void OptionsDlg::OnButtonCancel(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_CANCEL); +} + +void OptionsDlg::SaveChanges() +{ + int max = m_lexersBook->GetPageCount(); + for(int i=0; iGetPage((size_t)i); + LexerPage *page = dynamic_cast( win ); + if( page ){ + page->SaveSettings(); + } + } + + // construct an OptionsConfig object and update the configuration + OptionsConfigPtr options(new OptionsConfig(NULL)); + options->SetDisplayFoldMargin( m_checkBoxDisplayFoldMargin->IsChecked() ); + options->SetUnderlineFoldLine( m_checkBoxMarkFoldedLine->IsChecked() ); + options->SetFoldStyle(m_foldStyleChoice->GetStringSelection()); + options->SetDisplayBookmarkMargin(m_displayBookmarkMargin->IsChecked()); + options->SetBookmarkShape( m_bookmarkShape->GetStringSelection()); + options->SetBookmarkBgColour( m_bgColourPicker->GetColour() ); + options->SetBookmarkFgColour( m_fgColourPicker->GetColour() ); + options->SetHighlightCaretLine( m_highlighyCaretLine->IsChecked() ); + options->SetDisplayLineNumbers( m_displayLineNumbers->IsChecked() ); + options->SetShowIndentationGuidelines( m_showIndentationGuideLines->IsChecked() ); + options->SetCaretLineColour(m_caretLineColourPicker->GetColour()); + options->SetCaretColour(m_caretColourPicker->GetColour()); + + EditorConfigST::Get()->SetOptions(options); + ManagerST::Get()->ApplySettingsChanges(); +} diff --git a/LiteEditor/options_base_dlg.h b/LiteEditor/options_base_dlg.h new file mode 100644 index 0000000000..9f56f9699d --- /dev/null +++ b/LiteEditor/options_base_dlg.h @@ -0,0 +1,82 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __options_base_dlg__ +#define __options_base_dlg__ + +// Define WX_GCH in order to support precompiled headers with GCC compiler. +// You have to create the header "wx_pch.h" and include all files needed +// for compile your gui inside it. +// Then, compile it and place the file "wx_pch.h.gch" into the same +// directory that "wx_pch.h". +#ifdef WX_GCH +#include +#else +#include +#endif + +#include +#include +#include +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include +#include "lexer_configuration.h" +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class OptionsDlg +/////////////////////////////////////////////////////////////////////////////// +class OptionsDlg : public wxDialog +{ + DECLARE_EVENT_TABLE() + + // Private event handlers + void OnButtonOK( wxCommandEvent& event ); + void OnButtonCancel( wxCommandEvent& event ); + void OnButtonApply( wxCommandEvent& event ); + +protected: + wxFlatNotebook* m_book; + wxFlatNotebook *m_lexersBook; + wxPanel* m_general; + wxCheckBox* m_checkBoxDisplayFoldMargin; + wxCheckBox* m_checkBoxMarkFoldedLine; + wxStaticText* m_staticText1; + wxChoice* m_foldStyleChoice; + wxCheckBox* m_displayBookmarkMargin; + wxStaticText* m_staticText6; + wxChoice* m_bookmarkShape; + wxStaticText* m_staticText4; + wxColourPickerCtrl* m_bgColourPicker; + wxStaticText* m_staticText5; + wxColourPickerCtrl* m_fgColourPicker; + wxColourPickerCtrl* m_caretLineColourPicker; + wxColourPickerCtrl* m_caretColourPicker; + wxCheckBox* m_highlighyCaretLine; + wxCheckBox* m_displayLineNumbers; + wxCheckBox* m_showIndentationGuideLines; + wxPanel* m_syntaxHighlightPage; + wxStaticLine* m_staticline1; + wxButton* m_okButton; + wxButton* m_cancelButton; + wxButton* m_applyButton; + +private: + wxPanel *CreateSyntaxHighlightPage(); + wxPanel *CreateGeneralPage(); + wxPanel *CreateLexerPage(wxPanel *parent, LexerConfPtr lexer); + void SaveChanges(); + +public: + OptionsDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Options"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 700,650 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__options_base_dlg__ diff --git a/LiteEditor/output_pane.cpp b/LiteEditor/output_pane.cpp new file mode 100644 index 0000000000..b3a15ed061 --- /dev/null +++ b/LiteEditor/output_pane.cpp @@ -0,0 +1,393 @@ +#include "output_pane.h" +#include +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "manager.h" +#include "regex_processor.h" +#include "build_settings_config.h" +#include "dirsaver.h" +#include "macros.h" +#include "shell_window.h" + +#ifndef wxScintillaEventHandler +#define wxScintillaEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScintillaEventFunction, &func) +#endif + +const wxString OutputPane::FIND_IN_FILES_WIN = wxT("Find Results"); +const wxString OutputPane::BUILD_WIN = wxT("Build"); +const wxString OutputPane::OUTPUT_WIN = wxT("Output"); +const wxString OutputPane::OUTPUT_DEBUG = wxT("Debug"); + +BEGIN_EVENT_TABLE(OutputPane, wxPanel) +EVT_MENU(XRCID("next_error"), OutputPane::OnNextBuildError) +END_EVENT_TABLE() + +OutputPane::OutputPane(wxWindow *parent, const wxString &caption) +: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(400, 300)) +, m_caption(caption) +, m_canFocus(true) +, m_logTargetOld(NULL) +, m_nextBuildError_lastLine(wxNOT_FOUND) +{ + CreateGUIControls(); +} + +void OutputPane::OnPaint(wxPaintEvent &event){ + wxPaintDC dc(this); + event.Skip(); +} + +OutputPane::~OutputPane() +{ + delete wxLog::SetActiveTarget(m_logTargetOld); + m_book->DeleteAllPages(); +} + +void OutputPane::CreateGUIControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + + long style = wxFNB_NO_X_BUTTON | + wxFNB_NO_NAV_BUTTONS | + wxFNB_DROPDOWN_TABS_LIST | + wxFNB_FF2 | + wxFNB_CUSTOM_DLG | + wxFNB_BACKGROUND_GRADIENT | + wxFNB_TABS_BORDER_SIMPLE | + wxFNB_BOTTOM ; + + m_book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); + m_book->SetCustomizeOptions(wxFNB_CUSTOM_LOCAL_DRAG | wxFNB_CUSTOM_ORIENTATION | wxFNB_CUSTOM_TAB_LOOK); + mainSizer->Add(m_book, 1, wxEXPAND | wxALL | wxGROW, 1); + + m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("find_results"))); + m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("build"))); + m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("output_win"))); + m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("debug_window"))); + m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("debugger_tab"))); + m_book->SetImageList( &m_images ); + + // Create the 'Find In Files Window' + OutputPaneWinodw *findInFilesWin = new OutputPaneWinodw(m_book, wxID_ANY, FIND_IN_FILES_WIN); + OutputPaneWinodw *buildWin = new OutputPaneWinodw(m_book, wxID_ANY, BUILD_WIN); + m_outputDebug = new OutputPaneWinodw(m_book, wxID_ANY, OUTPUT_DEBUG, WINTYPE_SHELL); + m_outputWind = new OutputPaneWinodw(m_book, wxID_ANY, OUTPUT_WIN, WINTYPE_SHELL); + + findInFilesWin->Connect(wxID_ANY, wxEVT_SCI_DOUBLECLICK, wxScintillaEventHandler(OutputPane::OnMouseDClick), NULL, this); + findInFilesWin->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(OutputPane::OnSetFocus), NULL, this); + buildWin->Connect(wxID_ANY, wxEVT_SCI_DOUBLECLICK, wxScintillaEventHandler(OutputPane::OnMouseDClick), NULL, this); + buildWin->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(OutputPane::OnSetFocus), NULL, this); + + m_book->AddPage(findInFilesWin, FIND_IN_FILES_WIN, true, 0); + m_book->AddPage(buildWin, BUILD_WIN, false, 1); + m_book->AddPage(m_outputWind, OUTPUT_WIN, false, 2); + m_book->AddPage(m_outputDebug, OUTPUT_DEBUG, false, 4); + wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY); + m_logTargetOld = wxLog::SetActiveTarget( new wxLogTextCtrl(text) ); + + m_book->AddPage(text, wxT("Trace"), false, 3); + + mainSizer->Fit(this); + mainSizer->Layout(); +} + +void OutputPane::OnSetFocus(wxFocusEvent &event) +{ + if( m_canFocus ){ + return; + } + + wxWindow *prevFocusWin = event.GetWindow(); + if( prevFocusWin ){ + prevFocusWin->SetFocus(); + } + event.Skip(); +} + +void OutputPane::SelectTab(const wxString &tabName) +{ + int index = CaptionToIndex(tabName); + if( index == wxNOT_FOUND ) + return; + + if(index != m_book->GetSelection()){ + m_book->SetSelection((size_t)index); + } +} + +void OutputPane::AppendText(const wxString &winName, const wxString &text) +{ + int index = CaptionToIndex(winName); + if( index == wxNOT_FOUND ) + return; + + wxWindow *w = m_book->GetPage((size_t)index); + OutputPaneWinodw *window = dynamic_cast(w); + if(window){ + if(window->GetCaption() == BUILD_WIN){ + wxScintilla *sci = (wxScintilla *)window->GetWindow(); + //Keep information about this line + if(text.Contains(wxT("----------Building project:"))){ + LineInfo info; + + info.project = text.AfterFirst(wxT('[')); + info.project = info.project.BeforeFirst(wxT('-')); + TrimString(info.project); + + info.configuration = text.AfterFirst(wxT('[')); + info.configuration = info.configuration.AfterFirst(wxT('-')); + info.configuration = info.configuration.BeforeFirst(wxT(']')); + TrimString(info.configuration); + + //keep the information about this line + //we use here GetLineCount()-1 since an empty docuement contains + //1 line, but scintilla refers to lines from 0 + m_lineInfo[sci->GetLineCount()-1] = info; + }else{ + //set this line with the previous project + int lineno = sci->GetLineCount()-1; + std::map::iterator iter = m_lineInfo.find(lineno-1); + if(iter != m_lineInfo.end()){ + m_lineInfo[lineno] = iter->second; + } + } + } + + window->AppendText(text); + } +} + +void OutputPane::Clear() +{ + int index = m_book->GetSelection(); + if( index == wxNOT_FOUND ) + return; + + wxWindow *w = m_book->GetPage((size_t)index); + OutputPaneWinodw *win = dynamic_cast(w); + if(win){ + + if(win->GetCaption() == BUILD_WIN){ + m_lineInfo.clear(); + } + + win->Clear(); + m_nextBuildError_lastLine = wxNOT_FOUND; + } +} + +int OutputPane::CaptionToIndex(const wxString &caption) +{ + int i = 0; + for(; iGetPageCount(); i++) + { + if(m_book->GetPageText((size_t)i) == caption) + return i; + } + return wxNOT_FOUND; +} + +void OutputPane::OnMouseDClick(wxScintillaEvent &event) +{ + long pos = event.GetPosition(); + int fifWinIndex = CaptionToIndex(OutputPane::FIND_IN_FILES_WIN); + int buildWinIndex = CaptionToIndex(OutputPane::BUILD_WIN); + + OutputPaneWinodw *page = dynamic_cast(m_book->GetPage(m_book->GetSelection())); + if( !page ){ + return; + } + + wxScintilla *win = dynamic_cast( page->GetWindow() ); + if( !win ){ + return; + } + + int line = win->LineFromPosition(pos); + wxString lineText = win->GetLine(line); + + //remove selection + win->SetSelectionStart(pos); + win->SetSelectionEnd(pos); + if( fifWinIndex == m_book->GetSelection() ) + { + //Find in files + OnFindInFilesDClick(lineText); + } + else if(buildWinIndex == m_book->GetSelection()) + { + //build window + lineText.Replace(wxT("\\"), wxT("/")); + OnBuildWindowDClick(lineText, line); + } +} + +void OutputPane::OnFindInFilesDClick(const wxString &line) +{ + // each line has the format of + // file(line, col): text + wxString fileName = line.BeforeFirst(wxT('(')); + wxString strLineNumber = line.AfterFirst(wxT('(')); + strLineNumber = strLineNumber.BeforeFirst(wxT(',')); + strLineNumber = strLineNumber.Trim(); + long lineNumber = -1; + strLineNumber.ToLong(&lineNumber); + + // open the file in the editor + ManagerST::Get()->OpenFile(fileName, wxEmptyString, lineNumber - 1 ); +} + +bool OutputPane::OnBuildWindowDClick(const wxString &line, int lineClicked) +{ + wxString fileName, strLineNumber; + wxString compilerType(wxEmptyString); + LineInfo info; + bool match = false; + + //lineClicked is zero based. + //Get the project name that we are currently compiling: + std::map::iterator iter = m_lineInfo.find(lineClicked); + if(iter != m_lineInfo.end()){ + info = iter->second; + + //get the project + ProjectPtr proj = ManagerST::Get()->GetProject(info.project); + if(proj){ + ProjectSettingsPtr settings = proj->GetSettings(); + if(settings){ + BuildConfigPtr bldConf = settings->GetBuildConfiguration(info.configuration); + if(bldConf){ + compilerType = bldConf->GetCompilerType(); + }else{ + //try to get the first build configuration + ProjectSettingsCookie cookie; + bldConf = settings->GetFirstBuildConfiguration(cookie); + if(bldConf){ + compilerType = bldConf->GetCompilerType(); + } + } + } + } + } + + //get the selected compiler for the current line that was DClicked + //find the project selected build configuration for the workspace selected + //configuration + CompilerPtr cmp; + cmp = BuildSettingsConfigST::Get()->GetCompiler(compilerType); + if(!cmp){ + return false; + } + long idx; + RegexProcessor re(cmp->GetWarnPattern()); + cmp->GetWarnFileNameIndex().ToLong(&idx); + if(re.GetGroup(line, idx, fileName)) + { + //we found the file name, get the line number + cmp->GetWarnLineNumberIndex().ToLong(&idx); + re.GetGroup(line, idx, strLineNumber); + match = true; + } + + //try to match warning pattern + if(!match) + { + //try to match an error pattern to the line + RegexProcessor re(cmp->GetErrPattern()); + cmp->GetErrFileNameIndex().ToLong(&idx); + if(re.GetGroup(line, idx, fileName)) + { + //we found the file name, get the line number + cmp->GetErrLineNumberIndex().ToLong(&idx); + re.GetGroup(line, idx, strLineNumber); + match = true; + } + } + + if(match) + { + long lineNumber = -1; + strLineNumber.ToLong(&lineNumber); + + //do an educated guess for the reason why this failed + wxFileName fn(fileName); + + Manager *mgr = ManagerST::Get(); + std::vector files; + mgr->GetWorkspaceFiles(files, true); + for(size_t i=0; iOpenFile(files.at(i).GetFullPath(), wxEmptyString, (int)lineNumber-1); + + int buildWinIndex = CaptionToIndex(OutputPane::BUILD_WIN); + OutputPaneWinodw *winPane = dynamic_cast(m_book->GetPage(buildWinIndex)); + if( winPane ){ + wxScintilla *win = dynamic_cast(winPane->GetWindow()); + if( win && (lineClicked != wxNOT_FOUND || m_nextBuildError_lastLine != wxNOT_FOUND)){ + if(lineClicked != wxNOT_FOUND){ + //the call came from mouse double click, update + //the m_nextBuildError_lastLine member + m_nextBuildError_lastLine = lineClicked; + } + + win->MarkerDeleteAll(0x7); + win->MarkerAdd(m_nextBuildError_lastLine, 0x7); + win->GotoLine(m_nextBuildError_lastLine); + } + } + } + } + } + + return match; +} + +void OutputPane::OnNextBuildError(wxCommandEvent &event) +{ + wxUnusedVar(event); + // get handle to the build window + int buildWinIndex = CaptionToIndex(OutputPane::BUILD_WIN); + OutputPaneWinodw *winPane = dynamic_cast(m_book->GetPage(buildWinIndex)); + if( !winPane ){ + return; + } + + wxScintilla *win = dynamic_cast(winPane->GetWindow()); + if( !win || win->GetLineCount()<=0 ){ + return; + } + + // iterate through the lines, keeping the last known one + // and pass the text on to OnBuildWindowDClick + int startAt; + if ((m_nextBuildError_lastLine < 0) || + (m_nextBuildError_lastLine >= win->GetLineCount())) + startAt = 0; + else startAt = m_nextBuildError_lastLine+1; + + bool match(false); + for (m_nextBuildError_lastLine = startAt; m_nextBuildError_lastLine < win->GetLineCount(); ++m_nextBuildError_lastLine) { + wxString lineText = win->GetLine(m_nextBuildError_lastLine); + lineText.Replace(wxT("\\"), wxT("/")); + if (OnBuildWindowDClick(lineText, m_nextBuildError_lastLine)) { + match = true; + break; + } + } + + //no match? try from top again + if(!match && startAt > 0){ + for (m_nextBuildError_lastLine = 0; m_nextBuildError_lastLine < startAt; ++m_nextBuildError_lastLine) { + wxString lineText = win->GetLine(m_nextBuildError_lastLine); + lineText.Replace(wxT("\\"), wxT("/")); + if (OnBuildWindowDClick(lineText, m_nextBuildError_lastLine)) { + match = true; + break; + } + } + } +} + + diff --git a/LiteEditor/output_pane.h b/LiteEditor/output_pane.h new file mode 100644 index 0000000000..488e3396ee --- /dev/null +++ b/LiteEditor/output_pane.h @@ -0,0 +1,112 @@ +#ifndef OUTPUT_PANE_H +#define OUTPUT_PANE_H + + +#include "wx/panel.h" +#include "wx/wxscintilla.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "outputpanewindow.h" +#include "map" + +class OutputPane; +class ShellWindow; + +struct LineInfo { + wxString project; + wxString configuration; +}; + +/** + * \ingroup LiteEditor + * This class represents the default bottom pane in the editor + * + * \date 04-14-2007 + * + * \author Eran + * + * \par license + * This code is absolutely free to use and modify. The code is provided "as is" with + * no expressed or implied warranty. The author accepts no liability if it causes + * any damage to your computer, causes your pet to fall ill, increases baldness + * or makes your car start emitting strange noises when you start it up. + * This code has no bugs, just undocumented features! + * + * \todo + * + * \bug + * + */ +class OutputPane : public wxPanel +{ +public: + static const wxString FIND_IN_FILES_WIN; + static const wxString BUILD_WIN; + static const wxString OUTPUT_WIN; + static const wxString OUTPUT_DEBUG; + + wxFlatNotebook *m_book; + wxString m_caption; + bool m_canFocus; + wxFlatNotebookImageList m_images; + OutputPaneWinodw *m_outputWind; + wxLog *m_logTargetOld; + OutputPaneWinodw *m_outputDebug; + std::map m_lineInfo; + +private: + void CreateGUIControls(); + + void OnFindInFilesDClick(const wxString &line); + // returns true if line contained warning/error, false otherwise + bool OnBuildWindowDClick(const wxString &line, int lineClicked = wxNOT_FOUND); + // holds the index of the last line in the build window + // that was reached, using F4 (last build error) + int m_nextBuildError_lastLine; + +public: + /** + * Return the index of a given window by its caption + */ + int CaptionToIndex(const wxString &caption); + + /** + * Destructor + * \param parent parent window for this pane + * \param caption the caption + */ + OutputPane(wxWindow *parent, const wxString &caption); + + /** + * Destructor + */ + virtual ~OutputPane(); + + //----------------------------------------------- + // Operations + //----------------------------------------------- + void AppendText(const wxString &winName, const wxString &text); + void Clear(); + + //----------------------------------------------- + // Setters/Getters + //----------------------------------------------- + wxFlatNotebook *GetNotebook() { return m_book; } + const wxString &GetCaption() const { return m_caption; } + void CanFocus(bool can) { m_canFocus = can; } + void SelectTab(const wxString &tabName); + ShellWindow *GetOutputWindow() {return (ShellWindow *)m_outputWind->GetWindow();} + ShellWindow *GetDebugWindow() {return (ShellWindow *)m_outputDebug->GetWindow();} + + //----------------------------------------------- + // Event handlers + //----------------------------------------------- + void OnSetFocus(wxFocusEvent &event); + void OnMouseDClick(wxScintillaEvent &event); + void OnPaint(wxPaintEvent &event); + void OnEraseBg(wxEraseEvent &){}; + void OnNextBuildError(wxCommandEvent &event); + + DECLARE_EVENT_TABLE() +}; + +#endif // OUTPUT_PANE_H diff --git a/LiteEditor/outputpanewindow.cpp b/LiteEditor/outputpanewindow.cpp new file mode 100644 index 0000000000..23392bb190 --- /dev/null +++ b/LiteEditor/outputpanewindow.cpp @@ -0,0 +1,157 @@ +#include "outputpanewindow.h" +#include "wx/wxscintilla.h" +#include "wx/xrc/xmlres.h" +#include "output_pane.h" +#include "manager.h" +#include "shell_window.h" +#include "frame.h" + +#ifndef wxScintillaEventHandler +#define wxScintillaEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScintillaEventFunction, &func) +#endif + +OutputPaneWinodw::OutputPaneWinodw(wxWindow *parent, wxWindowID id, const wxString &name, int type) +: wxPanel(parent, id) +, m_name(name) +, m_type(type) +{ + CreateGUIControl(); +} + +OutputPaneWinodw::~OutputPaneWinodw() +{ +} + +void OutputPaneWinodw::CreateGUIControl() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + //Create the toolbar + wxToolBar *tb = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL); + + int id = wxNewId(); + tb->AddTool(id, + wxT("Clear All"), + wxXmlResource::Get()->LoadBitmap(wxT("document_delete")), + wxT("Clear All")); + Connect( id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( OutputPaneWinodw::OnClearAll )); + + id = wxNewId(); + tb->AddTool(id, + wxT("Word Wrap"), + wxXmlResource::Get()->LoadBitmap(wxT("word_wrap")), + wxT("Word Wrap")); + Connect( id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( OutputPaneWinodw::OnWordWrap )); + tb->Realize(); + mainSizer->Add(tb, 0, wxALL|wxEXPAND, 5); + + //Create the scintilla page + if(m_type == WINTYPE_SCI){ + m_window = new wxScintilla(this, wxID_ANY, wxDefaultPosition, wxDefaultSize); + wxScintilla *sciWin = (wxScintilla *)m_window; + // Hide margins + sciWin->SetLexer(wxSCI_LEX_NULL); + sciWin->StyleClearAll(); + // symbol margin + sciWin->SetMarginType(0, wxSCI_MARGIN_SYMBOL); + sciWin->SetMarginWidth(0, 0);//keep the symbol margin "On" + sciWin->MarkerSetBackground(0x7, wxT("pink")); + + sciWin->SetMarginWidth(1, 0); + sciWin->SetMarginWidth(2, 0); + + wxFont defFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont font(defFont.GetPointSize(), wxFONTFAMILY_TELETYPE, wxNORMAL, wxNORMAL); + + sciWin->StyleSetFont(0, font); + sciWin->StyleSetBackground(0, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + sciWin->StyleSetBackground(wxSCI_STYLE_DEFAULT, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + sciWin->SetReadOnly(true); + + }else{ + //type shell + m_window = new ShellWindow(this, ManagerST::Get()); + ManagerST::Get()->Connect(m_window->GetId(), wxEVT_SHELLWIN_LINE_ENTERED, wxCommandEventHandler(Manager::OnOutputWindow), NULL, ManagerST::Get()); + ManagerST::Get()->Connect(m_window->GetId(), wxEVT_SHELLWIN_LINE_ENTERED, wxCommandEventHandler(Manager::OnDebuggerWindow), NULL, ManagerST::Get()); + } + + mainSizer->Add(m_window, 1, wxEXPAND | wxALL, 1); + mainSizer->Layout(); +} + +void OutputPaneWinodw::Clear() +{ + if(m_type == WINTYPE_SHELL){ + ((ShellWindow*)m_window)->Clear(); + return; + } + + wxScintilla *win = dynamic_cast(m_window); + if(win){ + win->SetReadOnly(false); + win->ClearAll(); + win->SetReadOnly(true); + } +} + + +void OutputPaneWinodw::OnClearAll(wxCommandEvent &e) +{ + wxUnusedVar(e); + Clear(); +} + +void OutputPaneWinodw::OnWordWrap(wxCommandEvent &e) +{ + wxUnusedVar(e); + wxScintilla *win; + if(m_type == WINTYPE_SCI){ + win = (wxScintilla*)m_window; + }else{ + win = (wxScintilla*)(((ShellWindow*)m_window)->GetOutWin()); + } + + if(win->GetWrapMode() == wxSCI_WRAP_WORD){ + win->SetWrapMode(wxSCI_WRAP_NONE); + }else{ + win->SetWrapMode(wxSCI_WRAP_WORD); + } +} + + +void OutputPaneWinodw::AppendText(const wxString &text) +{ + if(m_type == WINTYPE_SCI){ + wxScintilla *win = dynamic_cast(m_window); + if( win ) + { + // enable writing + win->SetReadOnly(false); + + // the next 4 lines make sure that the caret is at last line + // and is visible + win->SetSelectionEnd(win->GetLength()); + win->SetSelectionStart(win->GetLength()); + win->SetCurrentPos(win->GetLength()); + win->EnsureCaretVisible(); + + // add the text + win->AddText( text ); + + // the next 4 lines make sure that the caret is at last line + // and is visible + win->SetSelectionEnd(win->GetLength()); + win->SetSelectionStart(win->GetLength()); + win->SetCurrentPos(win->GetLength()); + win->EnsureCaretVisible(); + + // enable readonly mode + win->SetReadOnly(true); + } + }else{ + ShellWindow *win = (ShellWindow*)m_window; + win->AppendLine(text); + } +} + diff --git a/LiteEditor/outputpanewindow.h b/LiteEditor/outputpanewindow.h new file mode 100644 index 0000000000..8d7c26001b --- /dev/null +++ b/LiteEditor/outputpanewindow.h @@ -0,0 +1,34 @@ +#ifndef OUTPUTPANEWINDOW_H +#define OUTPUTPANEWINDOW_H + +#include "wx/wxscintilla.h" +#include "wx/panel.h" + +#define WINTYPE_SCI 0 +#define WINTYPE_SHELL 1 + +class OutputPaneWinodw : public wxPanel +{ + wxString m_name; + wxWindow *m_window; + int m_type; + +protected: + void CreateGUIControl(); + void OnClearAll(wxCommandEvent &e); + void OnWordWrap(wxCommandEvent &e); + +public: + OutputPaneWinodw(wxWindow *parent, wxWindowID id, const wxString &name, int type = WINTYPE_SCI); + virtual ~OutputPaneWinodw(); + + const wxString &GetCaption() const {return m_name;} + wxWindow *GetWindow() {return m_window;} + void Clear(); + void AppendText(const wxString &text); +}; + +#endif //OUTPUTPANEWINDOW_H + + + diff --git a/LiteEditor/pluginmanager.cpp b/LiteEditor/pluginmanager.cpp new file mode 100644 index 0000000000..2d9cbffe60 --- /dev/null +++ b/LiteEditor/pluginmanager.cpp @@ -0,0 +1,196 @@ +#include "pluginmanager.h" +#include "manager.h" +#include "wx/filename.h" +#include +#include +#include "frame.h" +#include "editor_config.h" +#include "fileexplorertree.h" +#include "workspace_pane.h" +#include "fileview.h" +#include "wx/xrc/xmlres.h" +#include "ctags_manager.h" +#include "fileexplorer.h" + +PluginManager *PluginManager::Get() { + static PluginManager theManager; + return &theManager; +} + +void PluginManager::UnLoad() { + std::map::iterator plugIter = m_plugins.begin(); + for (; plugIter != m_plugins.end(); plugIter++) { + IPlugin *plugin = plugIter->second; + plugin->UnPlug(); + delete plugin; + } + + std::list::iterator iter = m_dl.begin(); + for ( ; iter != m_dl.end(); iter++ ) { + ( *iter )->Detach(); + delete ( *iter ); + } + + m_dl.clear(); + m_plugins.clear(); +} + +PluginManager::~PluginManager() { +} + +void PluginManager::Load() { + wxString ext; +#if defined (__WXGTK__) || defined (__WXMAC__) + ext = wxT("so"); +#else + ext = wxT("dll"); +#endif + wxString fileSpec( wxT( "*." ) + ext ); + + if ( wxDir::Exists( ManagerST::Get()->GetStarupDirectory() + wxT( "/plugins" ) ) ) { + //get list of dlls + wxArrayString files; + wxDir::GetAllFiles( ManagerST::Get()->GetStarupDirectory() + wxT( "/plugins" ), &files, fileSpec, wxDIR_FILES ); + + for ( size_t i=0; iLoad( fileName ) ) { + wxLogMessage( wxT( "Failed to load plugin's dll: " ) + fileName ); + delete dl; + continue; + } + + bool success( false ); + GET_PLUGIN_CREATE_FUNC pfn = ( GET_PLUGIN_CREATE_FUNC )dl->GetSymbol( wxT( "CreatePlugin" ), &success ); + if ( !success ) { + delete dl; + continue; + } + + IPlugin *plugin = pfn( ( IManager* )this ); + wxLogMessage( wxT( "Loaded plugin: " ) + plugin->GetLongName() ); + m_plugins[plugin->GetShortName()] = plugin; + + //load the toolbar + wxToolBar *tb = plugin->CreateToolBar( ManagerST::Get()->GetMainFrame() ); + if ( tb ) { + Frame::Get()->GetDockingManager().AddPane( tb, wxAuiPaneInfo().Name( plugin->GetShortName() ).LeftDockable( true ).RightDockable( true ).Caption( plugin->GetShortName() ).ToolbarPane().Top() ); + + //Add menu entry at the 'View->Toolbars' menu for this toolbar + int ii = Frame::Get()->GetMenuBar()->FindMenu( wxT( "View" ) ); + if ( ii != wxNOT_FOUND ) { + wxMenu *viewMenu = Frame::Get()->GetMenuBar()->GetMenu( ii ); + wxMenu *submenu = NULL; + wxMenuItem *item = viewMenu->FindItem( XRCID("toolbars_menu") ); + if (item) { + submenu = item->GetSubMenu(); + //add the new toolbar entry at the end of this menu + + int id = wxNewId(); + wxString text(plugin->GetShortName()); + text << wxT(" ToolBar"); + wxMenuItem *newItem = new wxMenuItem(submenu, id, text, wxEmptyString, wxITEM_CHECK); + submenu->Append(newItem); + Frame::Get()->RegisterToolbar(id, plugin->GetShortName()); + } + } + } + + //let the plugin plug its menu in the 'Plugins' menu at the menu bar + //the create menu will be placed as a sub menu of the 'Plugin' menu + int idx = Frame::Get()->GetMenuBar()->FindMenu( wxT( "Plugins" ) ); + if ( idx != wxNOT_FOUND ) { + wxMenu *pluginsMenu = Frame::Get()->GetMenuBar()->GetMenu( idx ); + plugin->CreatePluginMenu( pluginsMenu ); + } + + //keep the dynamic load library + m_dl.push_back( dl ); + } + Frame::Get()->GetDockingManager().Update(); + } +} + +IEditor *PluginManager::GetActiveEditor() { + return( IEditor* )ManagerST::Get()->GetActiveEditor(); +} + +IConfigTool* PluginManager::GetConfigTool() { + return EditorConfigST::Get(); +} + +void PluginManager::HookPopupMenu( wxMenu *menu, MenuType type ) { + std::map::iterator iter = m_plugins.begin(); + for ( ; iter != m_plugins.end(); iter++ ) { + iter->second->HookPopupMenu( menu, type ); + } +} + +void PluginManager::UnHookPopupMenu( wxMenu *menu, MenuType type ) { + std::map::iterator iter = m_plugins.begin(); + for ( ; iter != m_plugins.end(); iter++ ) { + iter->second->UnHookPopupMenu( menu, type ); + } +} + +TreeItemInfo PluginManager::GetSelectedTreeItemInfo( TreeType type ) { + TreeItemInfo info; + switch ( type ) { + case TreeFileExplorer: + return Frame::Get()->GetFileExplorer()->GetFileTree()->GetSelectedItemInfo(); + case TreeFileView: + return Frame::Get()->GetWorkspacePane()->GetFileViewTree()->GetSelectedItemInfo(); + default: + return info; + } +} + +wxTreeCtrl *PluginManager::GetTree(TreeType type) { + switch ( type ) { + case TreeFileExplorer: + return Frame::Get()->GetFileExplorer()->GetFileTree(); + case TreeFileView: + return Frame::Get()->GetWorkspacePane()->GetFileViewTree(); + default: + return NULL; + } +} + +wxFlatNotebook *PluginManager::GetOutputPaneNotebook() { + return Frame::Get()->GetOutputPane()->GetNotebook(); +} + +void PluginManager::OpenFile(const wxString &fileName, const wxString &projectName, int lineno) { + ManagerST::Get()->OpenFile(fileName, projectName, lineno); +} + +wxString PluginManager::GetStartupDirectory() const +{ + return ManagerST::Get()->GetStarupDirectory(); +} + +void PluginManager::AddProject(const wxString &path) +{ + ManagerST::Get()->AddProject(path); +} + +bool PluginManager::IsWorkspaceOpen() const +{ + return ManagerST::Get()->IsWorkspaceOpen(); +} + +TagsManager *PluginManager::GetTagsManager() +{ + return TagsManagerST::Get(); +} + +Workspace *PluginManager::GetWorkspace() +{ + return WorkspaceST::Get(); +} + +bool PluginManager::AddFilesToVirtualFodler(wxTreeItemId &item, wxArrayString &paths) +{ + return Frame::Get()->GetWorkspacePane()->GetFileViewTree()->AddFilesToVirtualFodler(item, paths); +} diff --git a/LiteEditor/pluginmanager.h b/LiteEditor/pluginmanager.h new file mode 100644 index 0000000000..266a936c14 --- /dev/null +++ b/LiteEditor/pluginmanager.h @@ -0,0 +1,54 @@ +#ifndef PLUGINMANAGER_H +#define PLUGINMANAGER_H + +#include "plugin.h" +#include "map" +#include "list" +#include "vector" +#include "wx/string.h" +#include "wx/treectrl.h" +#include "dynamiclibrary.h" + +class PluginManager : public IManager +{ + std::map m_plugins; + std::list< clDynamicLibrary* > m_dl; + +private: + PluginManager(){} + virtual ~PluginManager(); + +public: + + static PluginManager *Get(); + + virtual void Load(); + virtual void UnLoad(); + + //------------------------------------ + //Implementation of IManager interface + //------------------------------------ + + virtual IEditor *GetActiveEditor(); + virtual IConfigTool *GetConfigTool(); + virtual TreeItemInfo GetSelectedTreeItemInfo(TreeType type); + virtual wxTreeCtrl *GetTree(TreeType type); + virtual wxFlatNotebook *GetOutputPaneNotebook(); + virtual void OpenFile(const wxString &fileName, const wxString &projectName, int lineno = wxNOT_FOUND); + virtual wxString GetStartupDirectory() const; + virtual void AddProject(const wxString & path); + virtual bool IsWorkspaceOpen() const; + virtual TagsManager *GetTagsManager(); + virtual Workspace *GetWorkspace(); + virtual bool AddFilesToVirtualFodler(wxTreeItemId &item, wxArrayString &paths); + + //------------------------------------ + //End of IManager interface + //------------------------------------ + + virtual void HookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnHookPopupMenu(wxMenu *menu, MenuType type); + +}; + +#endif //PLUGINMANAGER_H diff --git a/LiteEditor/project_settings_base_dlg.cpp b/LiteEditor/project_settings_base_dlg.cpp new file mode 100644 index 0000000000..5d9c187d62 --- /dev/null +++ b/LiteEditor/project_settings_base_dlg.cpp @@ -0,0 +1,534 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "project_settings_base_dlg.h" + +/////////////////////////////////////////////////////////////////////////// + +ProjectSettingsBaseDlg::ProjectSettingsBaseDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText21 = new wxStaticText( this, wxID_ANY, wxT("Configuration Type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + bSizer22->Add( m_staticText21, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceConfigurationTypeChoices; + m_choiceConfigurationType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceConfigurationTypeChoices, 0 ); + bSizer22->Add( m_choiceConfigurationType, 1, wxALL|wxEXPAND, 5 ); + + m_buttonConfigManager = new wxButton( this, wxID_ANY, wxT("Configuration Manager..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer22->Add( m_buttonConfigManager, 0, wxALL, 5 ); + + mainSizer->Add( bSizer22, 0, wxEXPAND, 5 ); + + m_staticline81 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline81, 0, wxEXPAND | wxALL, 5 ); + + m_notebook3 = new wxTreebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_generalPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer19; + bSizer19 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer3; + fgSizer3 = new wxFlexGridSizer( 4, 2, 0, 0 ); + fgSizer3->AddGrowableCol( 1 ); + fgSizer3->SetFlexibleDirection( wxBOTH ); + fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText22 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Project Type:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText22->Wrap( -1 ); + fgSizer3->Add( m_staticText22, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_choiceProjectTypesChoices[] = { wxT("Static Library"), wxT("Dynamic Library"), wxT("Executable") }; + int m_choiceProjectTypesNChoices = sizeof( m_choiceProjectTypesChoices ) / sizeof( wxString ); + m_choiceProjectTypes = new wxChoice( m_generalPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceProjectTypesNChoices, m_choiceProjectTypesChoices, 0 ); + fgSizer3->Add( m_choiceProjectTypes, 0, wxALL|wxEXPAND, 5 ); + + m_staticText191 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Compiler:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText191->Wrap( -1 ); + fgSizer3->Add( m_staticText191, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceCompilerTypeChoices; + m_choiceCompilerType = new wxChoice( m_generalPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceCompilerTypeChoices, 0 ); + fgSizer3->Add( m_choiceCompilerType, 0, wxALL|wxEXPAND, 5 ); + + m_staticText231 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Debugger:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText231->Wrap( -1 ); + fgSizer3->Add( m_staticText231, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxArrayString m_choiceDebuggerChoices; + m_choiceDebugger = new wxChoice( m_generalPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDebuggerChoices, 0 ); + fgSizer3->Add( m_choiceDebugger, 0, wxALL|wxEXPAND, 5 ); + + m_staticText15 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Output File:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText15->Wrap( -1 ); + fgSizer3->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textOutputFilePicker = new wxTextCtrl( m_generalPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer3->Add( m_textOutputFilePicker, 0, wxALL|wxEXPAND, 5 ); + + m_staticText16 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Intermediate Directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + fgSizer3->Add( m_staticText16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_intermediateDirPicker = new DirPicker( m_generalPage ); + fgSizer3->Add( m_intermediateDirPicker, 0, wxALL|wxEXPAND, 5 ); + + bSizer19->Add( fgSizer3, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText17 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Action:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText17->Wrap( -1 ); + bSizer21->Add( m_staticText17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticline5 = new wxStaticLine( m_generalPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer21->Add( m_staticline5, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + bSizer19->Add( bSizer21, 0, wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizer6; + fgSizer6 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer6->AddGrowableCol( 1 ); + fgSizer6->SetFlexibleDirection( wxBOTH ); + fgSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText18 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Command:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText18->Wrap( -1 ); + fgSizer6->Add( m_staticText18, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCommand = new wxTextCtrl( m_generalPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer6->Add( m_textCommand, 1, wxALL|wxEXPAND, 5 ); + + m_staticText19 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Command Arguments:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19->Wrap( -1 ); + fgSizer6->Add( m_staticText19, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCommandArguments = new wxTextCtrl( m_generalPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer6->Add( m_textCommandArguments, 1, wxALL|wxEXPAND, 5 ); + + m_staticText20 = new wxStaticText( m_generalPage, wxID_ANY, wxT("Working Directory:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20->Wrap( -1 ); + fgSizer6->Add( m_staticText20, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_workingDirPicker = new DirPicker( m_generalPage ); + fgSizer6->Add( m_workingDirPicker, 0, wxALL|wxEXPAND, 5 ); + + bSizer19->Add( fgSizer6, 1, wxEXPAND, 5 ); + + m_generalPage->SetSizer( bSizer19 ); + m_generalPage->Layout(); + bSizer19->Fit( m_generalPage ); + m_notebook3->AddPage( m_generalPage, wxT("General"), false ); + m_compilerPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* compilerPageSizer; + compilerPageSizer = new wxBoxSizer( wxVERTICAL ); + + m_checkCompilerNeeded = new wxCheckBox( m_compilerPage, wxID_ANY, wxT("Compiler is not required for this project"), wxDefaultPosition, wxDefaultSize, 0 ); + + compilerPageSizer->Add( m_checkCompilerNeeded, 0, wxALL, 5 ); + + m_staticline7 = new wxStaticLine( m_compilerPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + compilerPageSizer->Add( m_staticline7, 0, wxEXPAND | wxALL, 5 ); + + wxGridBagSizer* gbSizer1; + gbSizer1 = new wxGridBagSizer( 0, 0 ); + gbSizer1->AddGrowableCol( 1 ); + gbSizer1->SetFlexibleDirection( wxBOTH ); + gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText6 = new wxStaticText( m_compilerPage, wxID_ANY, wxT("Compiler Options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6->Wrap( -1 ); + gbSizer1->Add( m_staticText6, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCompilerOptions = new wxTextCtrl( m_compilerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_textCompilerOptions, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_staticText4 = new wxStaticText( m_compilerPage, wxID_ANY, wxT("Additional Search Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + gbSizer1->Add( m_staticText4, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textAdditionalSearchPath = new wxTextCtrl( m_compilerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_textAdditionalSearchPath, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAddSearchPath = new wxButton( m_compilerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer1->Add( m_buttonAddSearchPath, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticText171 = new wxStaticText( m_compilerPage, wxID_ANY, wxT("Preprocessor:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText171->Wrap( -1 ); + gbSizer1->Add( m_staticText171, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textPreprocessor = new wxTextCtrl( m_compilerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_textPreprocessor, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAddPreprocessor = new wxButton( m_compilerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer1->Add( m_buttonAddPreprocessor, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_buttonCompilerOptions = new wxButton( m_compilerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer1->Add( m_buttonCompilerOptions, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + compilerPageSizer->Add( gbSizer1, 1, wxEXPAND, 5 ); + + m_compilerPage->SetSizer( compilerPageSizer ); + m_compilerPage->Layout(); + compilerPageSizer->Fit( m_compilerPage ); + m_notebook3->AddPage( m_compilerPage, wxT("Compiler"), false ); + m_linkerPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* linkerPageSizer; + linkerPageSizer = new wxBoxSizer( wxVERTICAL ); + + m_checkLinkerNeeded = new wxCheckBox( m_linkerPage, wxID_ANY, wxT("Linker is not required for this project"), wxDefaultPosition, wxDefaultSize, 0 ); + + linkerPageSizer->Add( m_checkLinkerNeeded, 0, wxALL, 5 ); + + m_staticline8 = new wxStaticLine( m_linkerPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + linkerPageSizer->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 ); + + wxGridBagSizer* gbSizer2; + gbSizer2 = new wxGridBagSizer( 0, 0 ); + gbSizer2->AddGrowableCol( 1 ); + gbSizer2->SetFlexibleDirection( wxBOTH ); + gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText10 = new wxStaticText( m_linkerPage, wxID_ANY, wxT("Options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + gbSizer2->Add( m_staticText10, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textLinkerOptions = new wxTextCtrl( m_linkerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer2->Add( m_textLinkerOptions, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_staticText7 = new wxStaticText( m_linkerPage, wxID_ANY, wxT("Library Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7->Wrap( -1 ); + gbSizer2->Add( m_staticText7, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textLibraryPath = new wxTextCtrl( m_linkerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer2->Add( m_textLibraryPath, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonLibraries = new wxButton( m_linkerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer2->Add( m_buttonLibraries, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticText8 = new wxStaticText( m_linkerPage, wxID_ANY, wxT("Libraries:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( -1 ); + gbSizer2->Add( m_staticText8, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textLibraries = new wxTextCtrl( m_linkerPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer2->Add( m_textLibraries, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonLibraryPath = new wxButton( m_linkerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer2->Add( m_buttonLibraryPath, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_buttonLinkerOptions = new wxButton( m_linkerPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + gbSizer2->Add( m_buttonLinkerOptions, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + linkerPageSizer->Add( gbSizer2, 1, wxEXPAND, 5 ); + + m_linkerPage->SetSizer( linkerPageSizer ); + m_linkerPage->Layout(); + linkerPageSizer->Fit( m_linkerPage ); + m_notebook3->AddPage( m_linkerPage, wxT("Linker"), false ); + m_resourceCmpPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer151; + bSizer151 = new wxBoxSizer( wxVERTICAL ); + + m_checkResourceNeeded = new wxCheckBox( m_resourceCmpPage, wxID_ANY, wxT("Resource Compiler is not needed"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkResourceNeeded->SetValue(true); + + bSizer151->Add( m_checkResourceNeeded, 0, wxALL, 5 ); + + m_staticline9 = new wxStaticLine( m_resourceCmpPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer151->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 ); + + wxFlexGridSizer* fgSizer4; + fgSizer4 = new wxFlexGridSizer( 2, 3, 0, 0 ); + fgSizer4->AddGrowableCol( 1 ); + fgSizer4->SetFlexibleDirection( wxBOTH ); + fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText221 = new wxStaticText( m_resourceCmpPage, wxID_ANY, wxT("Compiler Options:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText221->Wrap( -1 ); + fgSizer4->Add( m_staticText221, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textAddResCmpOptions = new wxTextCtrl( m_resourceCmpPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textAddResCmpOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAddResCmpOptions = new wxButton( m_resourceCmpPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + fgSizer4->Add( m_buttonAddResCmpOptions, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticText23 = new wxStaticText( m_resourceCmpPage, wxID_ANY, wxT("Additional Search Path:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText23->Wrap( -1 ); + fgSizer4->Add( m_staticText23, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textAddResCmpPath = new wxTextCtrl( m_resourceCmpPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer4->Add( m_textAddResCmpPath, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAddResCmpPath = new wxButton( m_resourceCmpPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + fgSizer4->Add( m_buttonAddResCmpPath, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + bSizer151->Add( fgSizer4, 1, wxEXPAND, 5 ); + + m_resourceCmpPage->SetSizer( bSizer151 ); + m_resourceCmpPage->Layout(); + bSizer151->Fit( m_resourceCmpPage ); + m_notebook3->AddPage( m_resourceCmpPage, wxT("Resources"), false ); + m_preBuildPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxVERTICAL ); + + m_staticText11 = new wxStaticText( m_preBuildPage, wxID_ANY, wxT("Specifies here a command lines to run in the pre-build event:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + bSizer8->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( m_preBuildPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer8->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_checkListPreBuildCommandsChoices; + m_checkListPreBuildCommands = new wxCheckListBox( m_preBuildPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListPreBuildCommandsChoices, 0 ); + bSizer9->Add( m_checkListPreBuildCommands, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + m_buttonNewPreBuildCmd = new wxButton( m_preBuildPage, wxID_ANY, wxT("New..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_buttonNewPreBuildCmd, 0, wxALL, 5 ); + + m_buttonDeletePreBuildCmd = new wxButton( m_preBuildPage, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_buttonDeletePreBuildCmd, 0, wxALL, 5 ); + + m_buttonEditPreBuildCmd = new wxButton( m_preBuildPage, wxID_ANY, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_buttonEditPreBuildCmd, 0, wxALL, 5 ); + + m_buttonUpPreBuildCmd = new wxButton( m_preBuildPage, wxID_ANY, wxT("Up"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_buttonUpPreBuildCmd, 0, wxALL, 5 ); + + m_buttonDownPreBuildCmd = new wxButton( m_preBuildPage, wxID_ANY, wxT("Down"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer10->Add( m_buttonDownPreBuildCmd, 0, wxALL, 5 ); + + bSizer9->Add( bSizer10, 0, wxEXPAND, 5 ); + + bSizer8->Add( bSizer9, 1, wxEXPAND, 5 ); + + m_preBuildPage->SetSizer( bSizer8 ); + m_preBuildPage->Layout(); + bSizer8->Fit( m_preBuildPage ); + m_notebook3->AddPage( m_preBuildPage, wxT("PreBuild"), false ); + m_postBuildPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer81; + bSizer81 = new wxBoxSizer( wxVERTICAL ); + + m_staticText111 = new wxStaticText( m_postBuildPage, wxID_ANY, wxT("Specifies here a command lines to run in the post-build event:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText111->Wrap( -1 ); + bSizer81->Add( m_staticText111, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticline21 = new wxStaticLine( m_postBuildPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer81->Add( m_staticline21, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer91; + bSizer91 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_checkListPostBuildCommandsChoices; + m_checkListPostBuildCommands = new wxCheckListBox( m_postBuildPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListPostBuildCommandsChoices, 0 ); + bSizer91->Add( m_checkListPostBuildCommands, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer101; + bSizer101 = new wxBoxSizer( wxVERTICAL ); + + m_buttonNewPostBuildCmd = new wxButton( m_postBuildPage, wxID_ANY, wxT("New..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer101->Add( m_buttonNewPostBuildCmd, 0, wxALL, 5 ); + + m_buttonDeletePostBuildCmd = new wxButton( m_postBuildPage, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer101->Add( m_buttonDeletePostBuildCmd, 0, wxALL, 5 ); + + m_buttonEditPostBuildCmd = new wxButton( m_postBuildPage, wxID_ANY, wxT("Edit..."), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer101->Add( m_buttonEditPostBuildCmd, 0, wxALL, 5 ); + + m_buttonUpPostBuildCmd = new wxButton( m_postBuildPage, wxID_ANY, wxT("Up"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer101->Add( m_buttonUpPostBuildCmd, 0, wxALL, 5 ); + + m_buttonDownPostBuildCmd = new wxButton( m_postBuildPage, wxID_ANY, wxT("Down"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer101->Add( m_buttonDownPostBuildCmd, 0, wxALL, 5 ); + + bSizer91->Add( bSizer101, 0, wxEXPAND, 5 ); + + bSizer81->Add( bSizer91, 1, wxEXPAND, 5 ); + + m_postBuildPage->SetSizer( bSizer81 ); + m_postBuildPage->Layout(); + bSizer81->Fit( m_postBuildPage ); + m_notebook3->AddPage( m_postBuildPage, wxT("PostBuild"), false ); + m_customBuildPage = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer15; + bSizer15 = new wxBoxSizer( wxVERTICAL ); + + m_checkEnableCustomBuild = new wxCheckBox( m_customBuildPage, wxID_ANY, wxT("Enable custom build"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer15->Add( m_checkEnableCustomBuild, 0, wxALL, 5 ); + + m_staticline82 = new wxStaticLine( m_customBuildPage, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer15->Add( m_staticline82, 0, wxEXPAND | wxALL, 5 ); + + wxFlexGridSizer* fgSizer31; + fgSizer31 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer31->AddGrowableCol( 1 ); + fgSizer31->SetFlexibleDirection( wxBOTH ); + fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText181 = new wxStaticText( m_customBuildPage, wxID_ANY, wxT("Build Command:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText181->Wrap( -1 ); + fgSizer31->Add( m_staticText181, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textBuildCommand = new wxTextCtrl( m_customBuildPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_textBuildCommand, 1, wxALL|wxEXPAND, 5 ); + + m_staticText192 = new wxStaticText( m_customBuildPage, wxID_ANY, wxT("Clean Command:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText192->Wrap( -1 ); + fgSizer31->Add( m_staticText192, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCleanCommand = new wxTextCtrl( m_customBuildPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer31->Add( m_textCleanCommand, 1, wxALL|wxEXPAND, 5 ); + + bSizer15->Add( fgSizer31, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_customBuildPage, -1, wxEmptyString ), wxVERTICAL ); + + m_staticText201 = new wxStaticText( m_customBuildPage, wxID_ANY, wxT("Note: When executing these commands, CodeLite sets its working directory to the \nproject directory."), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText201->Wrap( -1 ); + sbSizer3->Add( m_staticText201, 0, wxALL|wxEXPAND, 5 ); + + bSizer15->Add( sbSizer3, 0, wxEXPAND, 5 ); + + m_customBuildPage->SetSizer( bSizer15 ); + m_customBuildPage->Layout(); + bSizer15->Fit( m_customBuildPage ); + m_notebook3->AddPage( m_customBuildPage, wxT("Custom Build"), false ); + m_customMakefileStep = new wxPanel( m_notebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer5; + fgSizer5 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer5->AddGrowableCol( 1 ); + fgSizer5->AddGrowableRow( 1 ); + fgSizer5->SetFlexibleDirection( wxBOTH ); + fgSizer5->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText25 = new wxStaticText( m_customMakefileStep, wxID_ANY, wxT("Dependenices:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText25->Wrap( -1 ); + fgSizer5->Add( m_staticText25, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textDeps = new wxTextCtrl( m_customMakefileStep, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer5->Add( m_textDeps, 0, wxALL|wxEXPAND, 5 ); + + m_staticText26 = new wxStaticText( m_customMakefileStep, wxID_ANY, wxT("Rule action:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText26->Wrap( -1 ); + fgSizer5->Add( m_staticText26, 0, wxALL, 5 ); + + m_textPreBuildRule = new wxTextCtrl( m_customMakefileStep, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB ); + fgSizer5->Add( m_textPreBuildRule, 0, wxALL|wxEXPAND, 5 ); + + bSizer16->Add( fgSizer5, 1, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_customMakefileStep, -1, wxEmptyString ), wxVERTICAL ); + + m_staticText24 = new wxStaticText( m_customMakefileStep, wxID_ANY, + wxT("Define here a custom makefile rule to be executed in the pre-build steps.\nThis rule can be a composite rule or simple rule and must follow the writing convnetion.\nWhen executing these rules, the current directory is set to the project working directory\nSee the wiki for more help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText24->Wrap( -1 ); + sbSizer2->Add( m_staticText24, 0, wxALL, 5 ); + + bSizer16->Add( sbSizer2, 0, wxEXPAND, 5 ); + + m_customMakefileStep->SetSizer( bSizer16 ); + m_customMakefileStep->Layout(); + bSizer16->Fit( m_customMakefileStep ); + m_notebook3->AddPage( m_customMakefileStep, wxT("Advance"), true ); + + mainSizer->Add( m_notebook3, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonCancel, 0, wxALL, 5 ); + + m_buttonApply = new wxButton( this, wxID_ANY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonApply, 0, wxALL, 5 ); + + mainSizer->Add( bSizer3, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_choiceProjectTypes->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_choiceCompilerType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_choiceDebugger->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textOutputFilePicker->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_intermediateDirPicker->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textCommand->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textCommandArguments->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_workingDirPicker->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkCompilerNeeded->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textCompilerOptions->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textAdditionalSearchPath->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textPreprocessor->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkLinkerNeeded->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textLinkerOptions->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textLibraryPath->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textLibraries->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkResourceNeeded->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textAddResCmpOptions->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textAddResCmpPath->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkListPreBuildCommands->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkListPreBuildCommands->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonNewPreBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonDeletePreBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonEditPreBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonUpPreBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonDownPreBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkListPostBuildCommands->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkListPostBuildCommands->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonNewPostBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonDeletePostBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonEditPostBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonUpPostBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_buttonDownPostBuildCmd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_checkEnableCustomBuild->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textBuildCommand->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textCleanCommand->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textDeps->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); + m_textPreBuildRule->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( ProjectSettingsBaseDlg::OnCmdEvtVModified ), NULL, this ); +} diff --git a/LiteEditor/project_settings_base_dlg.h b/LiteEditor/project_settings_base_dlg.h new file mode 100644 index 0000000000..b782f3561c --- /dev/null +++ b/LiteEditor/project_settings_base_dlg.h @@ -0,0 +1,135 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __project_settings_base_dlg__ +#define __project_settings_base_dlg__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include "dirpicker.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ProjectSettingsBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class ProjectSettingsBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText21; + wxChoice* m_choiceConfigurationType; + wxButton* m_buttonConfigManager; + wxStaticLine* m_staticline81; + wxTreebook* m_notebook3; + wxPanel* m_generalPage; + wxStaticText* m_staticText22; + wxChoice* m_choiceProjectTypes; + wxStaticText* m_staticText191; + wxChoice* m_choiceCompilerType; + wxStaticText* m_staticText231; + wxChoice* m_choiceDebugger; + wxStaticText* m_staticText15; + wxTextCtrl* m_textOutputFilePicker; + wxStaticText* m_staticText16; + DirPicker* m_intermediateDirPicker; + wxStaticText* m_staticText17; + wxStaticLine* m_staticline5; + wxStaticText* m_staticText18; + wxTextCtrl* m_textCommand; + wxStaticText* m_staticText19; + wxTextCtrl* m_textCommandArguments; + wxStaticText* m_staticText20; + DirPicker* m_workingDirPicker; + wxPanel* m_compilerPage; + wxCheckBox* m_checkCompilerNeeded; + wxStaticLine* m_staticline7; + wxStaticText* m_staticText6; + wxTextCtrl* m_textCompilerOptions; + wxStaticText* m_staticText4; + wxTextCtrl* m_textAdditionalSearchPath; + wxButton* m_buttonAddSearchPath; + wxStaticText* m_staticText171; + wxTextCtrl* m_textPreprocessor; + wxButton* m_buttonAddPreprocessor; + wxButton* m_buttonCompilerOptions; + wxPanel* m_linkerPage; + wxCheckBox* m_checkLinkerNeeded; + wxStaticLine* m_staticline8; + wxStaticText* m_staticText10; + wxTextCtrl* m_textLinkerOptions; + wxStaticText* m_staticText7; + wxTextCtrl* m_textLibraryPath; + wxButton* m_buttonLibraries; + wxStaticText* m_staticText8; + wxTextCtrl* m_textLibraries; + wxButton* m_buttonLibraryPath; + wxButton* m_buttonLinkerOptions; + wxPanel* m_resourceCmpPage; + wxCheckBox* m_checkResourceNeeded; + wxStaticLine* m_staticline9; + wxStaticText* m_staticText221; + wxTextCtrl* m_textAddResCmpOptions; + wxButton* m_buttonAddResCmpOptions; + wxStaticText* m_staticText23; + wxTextCtrl* m_textAddResCmpPath; + wxButton* m_buttonAddResCmpPath; + wxPanel* m_preBuildPage; + wxStaticText* m_staticText11; + wxStaticLine* m_staticline2; + wxCheckListBox* m_checkListPreBuildCommands; + wxButton* m_buttonNewPreBuildCmd; + wxButton* m_buttonDeletePreBuildCmd; + wxButton* m_buttonEditPreBuildCmd; + wxButton* m_buttonUpPreBuildCmd; + wxButton* m_buttonDownPreBuildCmd; + wxPanel* m_postBuildPage; + wxStaticText* m_staticText111; + wxStaticLine* m_staticline21; + wxCheckListBox* m_checkListPostBuildCommands; + wxButton* m_buttonNewPostBuildCmd; + wxButton* m_buttonDeletePostBuildCmd; + wxButton* m_buttonEditPostBuildCmd; + wxButton* m_buttonUpPostBuildCmd; + wxButton* m_buttonDownPostBuildCmd; + wxPanel* m_customBuildPage; + wxCheckBox* m_checkEnableCustomBuild; + wxStaticLine* m_staticline82; + wxStaticText* m_staticText181; + wxTextCtrl* m_textBuildCommand; + wxStaticText* m_staticText192; + wxTextCtrl* m_textCleanCommand; + wxStaticText* m_staticText201; + wxPanel* m_customMakefileStep; + wxStaticText* m_staticText25; + wxTextCtrl* m_textDeps; + wxStaticText* m_staticText26; + wxTextCtrl* m_textPreBuildRule; + wxStaticText* m_staticText24; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + wxButton* m_buttonApply; + + // Virtual event handlers, overide them in your derived class + virtual void OnCmdEvtVModified( wxCommandEvent& event ){ event.Skip(); } + + public: + ProjectSettingsBaseDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Project Settings"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 782,502 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__project_settings_base_dlg__ diff --git a/LiteEditor/project_settings_dlg.cpp b/LiteEditor/project_settings_dlg.cpp new file mode 100644 index 0000000000..9f652f67a3 --- /dev/null +++ b/LiteEditor/project_settings_dlg.cpp @@ -0,0 +1,594 @@ +#include "project_settings_dlg.h" +#include "add_option_dialog.h" +#include "free_text_dialog.h" +#include "manager.h" +#include "configuration_manager_dlg.h" +#include "macros.h" +#include "editor_config.h" +#include "build_settings_config.h" +#include "debuggermanager.h" +#include "dirpicker.h" +#include "filepicker.h" +#include "wx/tokenzr.h" + +ProjectSettingsDlg::ProjectSettingsDlg( wxWindow* parent, const wxString &configName, const wxString &projectName, const wxString &title ) +: ProjectSettingsBaseDlg( parent, wxID_ANY, title ) +, m_projectName(projectName) +, m_configName(configName) +, m_oldConfigurationName(wxEmptyString) +{ + ConnectEvents(); + m_notebook3->SetSelection(0); + //fill the dialog with values + InitDialog(m_configName, wxEmptyString); + m_oldConfigurationName = m_choiceConfigurationType->GetStringSelection(); + + //if this is a custom build project disable the + //compiler linker pages + if(m_checkEnableCustomBuild->IsChecked()){ + DisableLinkerPage(true); + DisableCompilerPage(true); + m_postBuildPage->Enable(false); + m_preBuildPage->Enable(false); + m_checkCompilerNeeded->Enable(false); + m_checkLinkerNeeded->Enable(false); + m_resourceCmpPage->Enable(false); + }else{ + DisableCustomBuildPage(true); + } + + m_textAddResCmpOptions->Enable(!m_checkResourceNeeded->IsChecked()); + m_textAddResCmpPath->Enable(!m_checkResourceNeeded->IsChecked()); + m_buttonAddResCmpOptions->Enable(!m_checkResourceNeeded->IsChecked()); + m_buttonAddResCmpPath->Enable(!m_checkResourceNeeded->IsChecked()); + m_buttonApply->Enable(false); +} + +void ProjectSettingsDlg::UpdateConfigurationTypeChoice(const wxString &itemToSelect) +{ + ProjectSettingsPtr projSettingsPtr = ManagerST::Get()->GetProjectSettings(m_projectName); + ProjectSettingsCookie cookie; + m_choiceConfigurationType->Clear(); + BuildConfigPtr conf = projSettingsPtr->GetFirstBuildConfiguration(cookie); + while(conf){ + m_choiceConfigurationType->Append(conf->GetName()); + conf = projSettingsPtr->GetNextBuildConfiguration(cookie); + } + + if(itemToSelect.IsEmpty() || m_choiceConfigurationType->FindString(itemToSelect) == wxNOT_FOUND){ + if(m_choiceConfigurationType->GetCount() > 0) + m_choiceConfigurationType->SetSelection(0); + }else{ + m_choiceConfigurationType->SetStringSelection(itemToSelect); + } +} + +void ProjectSettingsDlg::InitDialog(const wxString &configName, const wxString &oldConfig) +{ + wxUnusedVar(configName); + ProjectSettingsPtr projSettingsPtr = ManagerST::Get()->GetProjectSettings(m_projectName); + + UpdateConfigurationTypeChoice(configName); + if(oldConfig.IsEmpty() == false){ + // save old values before replacing them + SaveValues(oldConfig); + } + CopyValues(m_choiceConfigurationType->GetStringSelection()); +} + +void ProjectSettingsDlg::ClearValues() +{ + BuildCommandList preBuildCmds, postBuildCmds; + + m_textOutputFilePicker->SetValue(wxEmptyString); + m_intermediateDirPicker->SetPath(wxEmptyString); + m_textCommand->SetValue(wxEmptyString); + m_textCommandArguments->SetValue(wxEmptyString); + m_workingDirPicker->SetPath(wxEmptyString); + m_checkCompilerNeeded->SetValue(false); + m_textCompilerOptions->SetValue(wxEmptyString); + DisableCompilerPage(false); + m_textAdditionalSearchPath->SetValue(wxEmptyString); + m_checkLinkerNeeded->SetValue(false); + DisableLinkerPage(m_checkLinkerNeeded->IsChecked()); + m_textLinkerOptions->SetValue(wxEmptyString); + m_textLibraries->SetValue(wxEmptyString); + m_textLibraryPath->SetValue(wxEmptyString); + m_checkListPreBuildCommands->Clear(); + m_checkListPostBuildCommands->Clear(); + m_checkEnableCustomBuild->SetValue(false); + m_textBuildCommand->Clear(); + m_textCleanCommand->Clear(); + m_textAddResCmpOptions->Clear(); + m_textAddResCmpPath->Clear(); + m_textPreBuildRule->Clear(); + m_textDeps->Clear(); + m_checkResourceNeeded->SetValue(true); +} + +void ProjectSettingsDlg::CopyValues(const wxString &confName) +{ + BuildConfigPtr buildConf; + ProjectSettingsPtr projSettingsPtr = ManagerST::Get()->GetProjectSettings(m_projectName); + buildConf = projSettingsPtr->GetBuildConfiguration(confName); + if(!buildConf){ + ClearValues(); + return; + } + + wxArrayString searchArr, libPath, libs; + BuildCommandList preBuildCmds, postBuildCmds; + + m_textOutputFilePicker->SetValue(buildConf->GetOutputFileName()); + m_intermediateDirPicker->SetPath(buildConf->GetIntermediateDirectory()); + m_textCommand->SetValue(buildConf->GetCommand()); + m_textCommandArguments->SetValue(buildConf->GetCommandArguments()); + m_workingDirPicker->SetPath(buildConf->GetWorkingDirectory()); + m_checkCompilerNeeded->SetValue(!buildConf->IsCompilerRequired()); + m_textCompilerOptions->SetValue(buildConf->GetCompileOptions()); + DisableCompilerPage(m_checkCompilerNeeded->IsChecked()); + m_textAdditionalSearchPath->SetValue(buildConf->GetIncludePath()); + m_checkLinkerNeeded->SetValue(!buildConf->IsLinkerRequired()); + DisableLinkerPage(m_checkLinkerNeeded->IsChecked()); + m_textLinkerOptions->SetValue(buildConf->GetLinkOptions()); + m_textLibraries->SetValue(buildConf->GetLibraries()); + m_textLibraryPath->SetValue(buildConf->GetLibPath()); + m_textPreprocessor->SetValue(buildConf->GetPreprocessor()); + buildConf->GetPreBuildCommands(preBuildCmds); + buildConf->GetPostBuildCommands(postBuildCmds); + BuildCommandList::iterator iter = preBuildCmds.begin(); + m_textBuildCommand->SetValue(buildConf->GetCustomBuildCmd()); + m_textCleanCommand->SetValue(buildConf->GetCustomCleanCmd()); + m_checkEnableCustomBuild->SetValue(buildConf->IsCustomBuild()); + + m_checkResourceNeeded->SetValue(!buildConf->IsResCompilerRequired()); + m_textAddResCmpOptions->SetValue(buildConf->GetResCompileOptions()); + m_textAddResCmpPath->SetValue(buildConf->GetResCmpIncludePath()); + + //set the custom pre-prebuild step + wxString customPreBuild = buildConf->GetPreBuildCustom(); + //extract the dependencies + wxString deps, rules; + deps = customPreBuild.BeforeFirst(wxT('\n')); + rules = customPreBuild.AfterFirst(wxT('\n')); + + rules = rules.Trim(); + rules = rules.Trim(false); + + deps = deps.Trim(); + deps = deps.Trim(false); + + m_textDeps->SetValue(deps); + m_textPreBuildRule->SetValue(rules); + + m_checkListPreBuildCommands->Clear(); + for(; iter != preBuildCmds.end(); iter ++){ + int index = m_checkListPreBuildCommands->Append(iter->GetCommand()); + m_checkListPreBuildCommands->Check(index, iter->GetEnabled()); + } + + iter = postBuildCmds.begin(); + m_checkListPostBuildCommands->Clear(); + for(; iter != postBuildCmds.end(); iter ++){ + int index = m_checkListPostBuildCommands->Append(iter->GetCommand()); + m_checkListPostBuildCommands->Check(index, iter->GetEnabled()); + } + + //set the project type + wxString projType = projSettingsPtr->GetProjectType(); + int sel = m_choiceProjectTypes->FindString(projType); + if(sel == wxNOT_FOUND){ + sel = 0; + } + m_choiceProjectTypes->SetSelection(sel); + + m_choiceCompilerType->Clear(); + wxString cmpType = buildConf->GetCompilerType(); + BuildSettingsConfigCookie cookie; + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetFirstCompiler(cookie); + while(cmp){ + m_choiceCompilerType->Append(cmp->GetName()); + cmp = BuildSettingsConfigST::Get()->GetNextCompiler(cookie); + } + + m_choiceDebugger->Clear(); + wxString dbgType = buildConf->GetDebuggerType(); + wxArrayString dbgs = DebuggerMgr::Get().GetAvailableDebuggers(); + if(dbgs.GetCount() > 0){ + m_choiceDebugger->Append(dbgs); + } + + if(m_choiceDebugger->GetCount() > 0){ + int find = m_choiceDebugger->FindString(dbgType); + if(find != wxNOT_FOUND){ + m_choiceDebugger->SetSelection(find); + }else{ + m_choiceDebugger->SetSelection(0); + } + } + + int where = m_choiceCompilerType->FindString(cmpType); + if(where == wxNOT_FOUND){ + if(m_choiceCompilerType->GetCount() > 0){ + m_choiceCompilerType->SetSelection(0); + } + }else{ + m_choiceCompilerType->SetSelection(where); + } +} + +void ProjectSettingsDlg::SaveValues(const wxString &confName) +{ + BuildConfigPtr buildConf; + ProjectSettingsPtr projSettingsPtr = ManagerST::Get()->GetProjectSettings(m_projectName); + buildConf = projSettingsPtr->GetBuildConfiguration(confName); + if(!buildConf){ + return; + } + wxArrayString searchArr, libPath, libs; + BuildCommandList preBuildCmds, postBuildCmds; + + buildConf->SetOutputFileName(m_textOutputFilePicker->GetValue()); + buildConf->SetIntermediateDirectory(m_intermediateDirPicker->GetPath()); + buildConf->SetCommand(m_textCommand->GetValue()); + buildConf->SetCommandArguments(m_textCommandArguments->GetValue()); + buildConf->SetWorkingDirectory(m_workingDirPicker->GetPath()); + buildConf->SetCompilerRequired(!m_checkCompilerNeeded->IsChecked()); + buildConf->SetCompileOptions(m_textCompilerOptions->GetValue()); + buildConf->SetIncludePath(m_textAdditionalSearchPath->GetValue()); + buildConf->SetLibPath(m_textLibraryPath->GetValue()); + buildConf->SetLibraries(m_textLibraries->GetValue()); + buildConf->SetLinkerRequired(!m_checkLinkerNeeded->IsChecked()); + buildConf->SetLinkOptions(m_textLinkerOptions->GetValue()); + projSettingsPtr->SetProjectType(m_choiceProjectTypes->GetStringSelection()); + buildConf->SetCompilerType(m_choiceCompilerType->GetStringSelection()); + buildConf->SetDebuggerType(m_choiceDebugger->GetStringSelection()); + buildConf->SetPreprocessor(m_textPreprocessor->GetValue()); + buildConf->SetCustomBuildCmd(m_textBuildCommand->GetValue()); + buildConf->SetCustomCleanCmd(m_textCleanCommand->GetValue()); + buildConf->EnableCustomBuild(m_checkEnableCustomBuild->IsChecked()); + + buildConf->SetResCompilerRequired(!m_checkResourceNeeded->IsChecked()); + buildConf->SetResCmpIncludePath(m_textAddResCmpPath->GetValue()); + buildConf->SetResCmpOptions(m_textAddResCmpOptions->GetValue()); + + //set the pre-build step + wxString rules = m_textPreBuildRule->GetValue(); + wxString deps = m_textDeps->GetValue(); + + rules = rules.Trim(); + rules = rules.Trim(false); + deps = deps.Trim(); + deps = deps.Trim(false); + + wxString prebuilstep; + prebuilstep << deps << wxT("\n"); + prebuilstep << rules; + prebuilstep << wxT("\n"); + buildConf->SetPreBuildCustom(prebuilstep); + + BuildCommandList cmds; + cmds.clear(); + for(size_t i=0; iGetCount(); i++){ + wxString cmdLine = m_checkListPreBuildCommands->GetString((unsigned int)i); + bool enabled = m_checkListPreBuildCommands->IsChecked((unsigned int)i); + BuildCommand cmd(cmdLine, enabled); + cmds.push_back(cmd); + } + buildConf->SetPreBuildCommands(cmds); + + cmds.clear(); + for(size_t i=0; iGetCount(); i++){ + wxString cmdLine = m_checkListPostBuildCommands->GetString((unsigned int)i); + bool enabled = m_checkListPostBuildCommands->IsChecked((unsigned int)i); + BuildCommand cmd(cmdLine, enabled); + cmds.push_back(cmd); + } + buildConf->SetPostBuildCommands(cmds); + + //save settings + ManagerST::Get()->SetProjectSettings(m_projectName, projSettingsPtr); +} + +void ProjectSettingsDlg::ConnectEvents() +{ + ConnectChoice(m_choiceConfigurationType, ProjectSettingsDlg::OnConfigurationTypeSelected); + ConnectCheckBox(m_checkCompilerNeeded, ProjectSettingsDlg::OnCheckCompilerNeeded); + ConnectCheckBox(m_checkLinkerNeeded, ProjectSettingsDlg::OnCheckLinkerNeeded); + ConnectButton(m_buttonAddSearchPath, ProjectSettingsDlg::OnAddSearchPath); + ConnectButton(m_buttonLibraries, ProjectSettingsDlg::OnAddLibrary); + ConnectButton(m_buttonLibraryPath, ProjectSettingsDlg::OnAddLibraryPath); + ConnectButton(m_buttonNewPreBuildCmd, ProjectSettingsDlg::OnNewPreBuildCommand); + ConnectButton(m_buttonEditPreBuildCmd, ProjectSettingsDlg::OnEditPreBuildCommand); + ConnectButton(m_buttonUpPreBuildCmd, ProjectSettingsDlg::OnUpPreBuildCommand); + ConnectButton(m_buttonDownPreBuildCmd, ProjectSettingsDlg::OnDownPreBuildCommand); + ConnectButton(m_buttonDeletePreBuildCmd, ProjectSettingsDlg::OnDeletePreBuildCommand); + ConnectButton(m_buttonNewPostBuildCmd, ProjectSettingsDlg::OnNewPostBuildCommand); + ConnectButton(m_buttonEditPostBuildCmd, ProjectSettingsDlg::OnEditPostBuildCommand); + ConnectButton(m_buttonUpPostBuildCmd, ProjectSettingsDlg::OnUpPostBuildCommand); + ConnectButton(m_buttonDownPostBuildCmd, ProjectSettingsDlg::OnDownPostBuildCommand); + ConnectButton(m_buttonDeletePostBuildCmd, ProjectSettingsDlg::OnDeletePostBuildCommand); + ConnectButton(m_buttonOK, ProjectSettingsDlg::OnButtonOK); + ConnectButton(m_buttonApply, ProjectSettingsDlg::OnButtonApply); + ConnectButton(m_buttonConfigManager, ProjectSettingsDlg::OnButtonConfigurationManager); + ConnectButton(m_buttonAddPreprocessor, ProjectSettingsDlg::OnButtonAddPreprocessor); + ConnectButton(m_buttonLinkerOptions, ProjectSettingsDlg::OnButtonAddLinkerOptions); + ConnectButton(m_buttonCompilerOptions, ProjectSettingsDlg::OnButtonAddCompilerOptions); + ConnectCheckBox(m_checkEnableCustomBuild, ProjectSettingsDlg::OnCustomBuildEnabled); + ConnectCheckBox(m_checkResourceNeeded, ProjectSettingsDlg::OnResourceCmpNeeded); + ConnectButton(m_buttonAddResCmpPath, ProjectSettingsDlg::OnResourceCmpAddPath); + ConnectButton(m_buttonAddResCmpOptions, ProjectSettingsDlg::OnResourceCmpAddOption); + m_checkListPostBuildCommands->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(ProjectSettingsDlg::OnEditPostBuildCommand), NULL, this); + m_checkListPreBuildCommands->Connect(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(ProjectSettingsDlg::OnEditPreBuildCommand), NULL, this); +} + +void ProjectSettingsDlg::OnCustomBuildEnabled(wxCommandEvent &event) +{ + if(event.IsChecked()){ + //disable compile & link pages + DisableCompilerPage(true); + DisableLinkerPage(true); + //also disable the checkboxes + m_checkLinkerNeeded->Enable(false); + m_checkCompilerNeeded->Enable(false); + DisableCustomBuildPage(false); + m_postBuildPage->Enable(false); + m_preBuildPage->Enable(false); + m_resourceCmpPage->Enable(false); + }else{ + //disable this page but make sure link & compile pages + //are enabled + DisableCompilerPage(false); + DisableLinkerPage(false); + m_checkLinkerNeeded->Enable(true); + m_checkCompilerNeeded->Enable(true); + DisableCustomBuildPage(true); + m_postBuildPage->Enable(true); + m_preBuildPage->Enable(true); + m_resourceCmpPage->Enable(true); + } + event.Skip(); +} + +void ProjectSettingsDlg::DisableCustomBuildPage(bool disable) +{ + m_textBuildCommand->Enable(!disable); + m_textCleanCommand->Enable(!disable); +} + +void ProjectSettingsDlg::OnButtonAddPreprocessor(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textPreprocessor); + event.Skip(); +} + +void ProjectSettingsDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + SaveValues(m_choiceConfigurationType->GetStringSelection()); + EndModal(wxID_OK); +} + +void ProjectSettingsDlg::OnButtonApply(wxCommandEvent &event) +{ + wxUnusedVar(event); + SaveValues(m_choiceConfigurationType->GetStringSelection()); + m_buttonApply->Enable(false); +} + +void ProjectSettingsDlg::OnButtonConfigurationManager(wxCommandEvent &event) +{ + wxUnusedVar(event); + ConfigurationManagerDlg *dlg = new ConfigurationManagerDlg(this); + dlg->ShowModal(); + dlg->Destroy(); + + //update the configuration type choice control + UpdateConfigurationTypeChoice(m_choiceConfigurationType->GetStringSelection()); + //Load values according to the new selection + CopyValues(m_choiceConfigurationType->GetStringSelection()); + event.Skip(); +} + +void ProjectSettingsDlg::OnConfigurationTypeSelected(wxCommandEvent &event) +{ + wxString selection = event.GetString(); + InitDialog(selection, m_oldConfigurationName); + m_oldConfigurationName = selection; + event.Skip(); +} + +void ProjectSettingsDlg::DisableCompilerPage(bool disable) +{ + m_textAdditionalSearchPath->Enable(!disable); + m_buttonAddSearchPath->Enable(!disable); + m_textCompilerOptions->Enable(!disable); + m_textPreprocessor->Enable(!disable); + m_buttonAddPreprocessor->Enable(!disable); + m_buttonCompilerOptions->Enable(!disable); +} + +void ProjectSettingsDlg::DisableLinkerPage(bool disable) +{ + m_textLibraryPath->Enable(!disable); + m_textLibraries->Enable(!disable); + m_textLinkerOptions->Enable(!disable); + m_buttonLibraries->Enable(!disable); + m_buttonLibraryPath->Enable(!disable); + m_buttonLinkerOptions->Enable(!disable); +} + +void ProjectSettingsDlg::OnCheckCompilerNeeded(wxCommandEvent &event) +{ + DisableCompilerPage(event.IsChecked()); + event.Skip(); +} + +void ProjectSettingsDlg::OnCheckLinkerNeeded(wxCommandEvent &event) +{ + DisableLinkerPage(event.IsChecked()); + event.Skip(); +} + +void ProjectSettingsDlg::PopupAddOptionDlg(wxTextCtrl *ctrl) +{ + AddOptionDlg *dlg = new AddOptionDlg(NULL, ctrl->GetValue()); + if(dlg->ShowModal() == wxID_OK){ + wxString updatedValue = dlg->GetValue(); + ctrl->SetValue(updatedValue); + } + dlg->Destroy(); +} + +void ProjectSettingsDlg::OnAddSearchPath(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textAdditionalSearchPath); + event.Skip(); +} + +void ProjectSettingsDlg::OnAddLibrary(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textLibraries); + event.Skip(); +} + +void ProjectSettingsDlg::OnAddLibraryPath(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textLibraryPath); + event.Skip(); +} + +void ProjectSettingsDlg::OnNewCommand(wxCheckListBox *list) +{ + FreeTextDialog *dlg = new FreeTextDialog(this); + if(dlg->ShowModal() == wxID_OK){ + wxString value = dlg->GetValue(); + TrimString(value); + //incase several commands were entered, split them + wxStringTokenizer tkz(value, wxT("\n"), wxTOKEN_STRTOK); + while(tkz.HasMoreTokens()){ + wxString command = tkz.NextToken(); + if(command.IsEmpty() == false){ + list->Append(command); + list->Check(list->GetCount()-1); + } + } + } + dlg->Destroy(); +} + +void ProjectSettingsDlg::OnEditCommand(wxCheckListBox *list) +{ + wxString selectedString = list->GetStringSelection(); + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + + FreeTextDialog *dlg = new FreeTextDialog(this, selectedString); + if(dlg->ShowModal() == wxID_OK){ + wxString value = dlg->GetValue(); + TrimString(value); + if(value.IsEmpty() == false){ + list->SetString(sel, value); + } + } + dlg->Destroy(); +} + +void ProjectSettingsDlg::OnUpCommand(wxCheckListBox *list) +{ + wxString selectedString = list->GetStringSelection(); + + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + + bool isSelected = list->IsChecked(sel); + sel --; + if(sel < 0){ + return; + } + + // sel contains the new position we want to place the selection string + list->Delete(sel + 1); + list->Insert(selectedString, sel); + list->Select(sel); + list->Check(sel, isSelected); +} + +void ProjectSettingsDlg::OnDownCommand(wxCheckListBox *list) +{ + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + + sel ++; + if(sel >= (int)list->GetCount()){ + return; + } + + // sel contains the new position we want to place the selection string + wxString oldStr = list->GetString(sel); + bool oldStringIsSelected = list->IsChecked(sel); + + list->Delete(sel); + list->Insert(oldStr, sel - 1); + list->Select(sel); + list->Check(sel - 1, oldStringIsSelected); +} + +void ProjectSettingsDlg::OnDeleteCommand(wxCheckListBox *list) +{ + int sel = list->GetSelection(); + if(sel == wxNOT_FOUND){ + return; + } + list->Delete(sel); + if(sel < (int)list->GetCount()){ + list->Select(sel); + } else if(sel - 1 < (int)list->GetCount()){ + list->Select(sel -1); + } +} + +void ProjectSettingsDlg::OnButtonAddCompilerOptions(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textCompilerOptions); + event.Skip(); +} + +void ProjectSettingsDlg::OnButtonAddLinkerOptions(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textLinkerOptions); + event.Skip(); +} + +void ProjectSettingsDlg::OnResourceCmpAddOption(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textAddResCmpOptions); + event.Skip(); +} + +void ProjectSettingsDlg::OnResourceCmpAddPath(wxCommandEvent &event) +{ + PopupAddOptionDlg(m_textAddResCmpPath); + event.Skip(); +} + +void ProjectSettingsDlg::OnResourceCmpNeeded(wxCommandEvent &event) +{ + m_textAddResCmpOptions->Enable(!event.IsChecked()); + m_textAddResCmpPath->Enable(!event.IsChecked()); + m_buttonAddResCmpOptions->Enable(!event.IsChecked()); + m_buttonAddResCmpPath->Enable(!event.IsChecked()); + event.Skip(); +} + +void ProjectSettingsDlg::OnCmdEvtVModified(wxCommandEvent &event) +{ + m_buttonApply->Enable(true); + event.Skip(); +} diff --git a/LiteEditor/project_settings_dlg.h b/LiteEditor/project_settings_dlg.h new file mode 100644 index 0000000000..6e9b2041af --- /dev/null +++ b/LiteEditor/project_settings_dlg.h @@ -0,0 +1,91 @@ +#ifndef __project_settings_dlg__ +#define __project_settings_dlg__ + +/** +@file +Subclass of ProjectSettingsBaseDlg, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "project_settings_base_dlg.h" +#include "project_settings.h" + +/** Implementing ProjectSettingsBaseDlg */ +class ProjectSettingsDlg : public ProjectSettingsBaseDlg +{ + wxString m_projectName; + wxString m_configName; + wxString m_oldConfigurationName; + +protected: + void ConnectEvents(); + void InitDialog(const wxString &configName, const wxString &oldConfig); + + /** + * Copy values from the project settings configuration file to the + * GUI controls + * \param confName configuration name to copy + */ + void CopyValues(const wxString &confName); + + /** + * Save values from the GUI controls back to + * project settings configuration file + * \param confName configuration name to save + */ + void SaveValues(const wxString &confName); + + /** + * Clear the GUI controls values + */ + void ClearValues(); + + void DisableCompilerPage(bool disable); + void DisableLinkerPage(bool disable); + void DisableCustomBuildPage(bool disable); + + void PopupAddOptionDlg(wxTextCtrl *ctrl); + + void OnEditCommand(wxCheckListBox* list); + void OnUpCommand(wxCheckListBox* list); + void OnDownCommand(wxCheckListBox* list); + void OnNewCommand(wxCheckListBox* list); + void OnDeleteCommand(wxCheckListBox* list); + void UpdateConfigurationTypeChoice(const wxString &itemToSelect); + + virtual void OnCmdEvtVModified( wxCommandEvent& event ); + +public: + /** Constructor */ + ProjectSettingsDlg( wxWindow* parent, const wxString &configName, const wxString &projectName, const wxString &title ); + + virtual void OnCheckCompilerNeeded(wxCommandEvent &event); + virtual void OnCheckLinkerNeeded(wxCommandEvent &event); + virtual void OnConfigurationTypeSelected(wxCommandEvent &event); + virtual void OnAddSearchPath(wxCommandEvent &event); + virtual void OnAddLibraryPath(wxCommandEvent &event); + virtual void OnAddLibrary(wxCommandEvent &event); + virtual void OnNewPreBuildCommand(wxCommandEvent & event){ OnNewCommand(m_checkListPreBuildCommands); event.Skip();} + virtual void OnEditPreBuildCommand(wxCommandEvent &event){ OnEditCommand(m_checkListPreBuildCommands); event.Skip();} + virtual void OnUpPreBuildCommand(wxCommandEvent &event){ OnUpCommand(m_checkListPreBuildCommands); event.Skip();} + virtual void OnDownPreBuildCommand(wxCommandEvent &event){ OnDownCommand(m_checkListPreBuildCommands); event.Skip();} + virtual void OnDeletePreBuildCommand(wxCommandEvent &event){ OnDeleteCommand(m_checkListPreBuildCommands); event.Skip();} + virtual void OnNewPostBuildCommand(wxCommandEvent & event){ OnNewCommand(m_checkListPostBuildCommands); event.Skip();} + virtual void OnEditPostBuildCommand(wxCommandEvent &event){ OnEditCommand(m_checkListPostBuildCommands); event.Skip();} + virtual void OnUpPostBuildCommand(wxCommandEvent &event){ OnUpCommand(m_checkListPostBuildCommands); event.Skip();} + virtual void OnDownPostBuildCommand(wxCommandEvent &event){ OnDownCommand(m_checkListPostBuildCommands); event.Skip();} + virtual void OnDeletePostBuildCommand(wxCommandEvent &event){ OnDeleteCommand(m_checkListPostBuildCommands); event.Skip();} + virtual void OnButtonOK(wxCommandEvent &event); + virtual void OnButtonApply(wxCommandEvent &event); + virtual void OnButtonConfigurationManager(wxCommandEvent &event); + virtual void OnButtonAddPreprocessor(wxCommandEvent &event); + virtual void OnButtonAddLinkerOptions(wxCommandEvent &event); + virtual void OnButtonAddCompilerOptions(wxCommandEvent &event); + virtual void OnCustomBuildEnabled(wxCommandEvent &event); + virtual void OnResourceCmpNeeded(wxCommandEvent &e); + virtual void OnResourceCmpAddPath(wxCommandEvent &e); + virtual void OnResourceCmpAddOption(wxCommandEvent &e); +}; + +#endif // __project_settings_dlg__ + diff --git a/LiteEditor/quickoutlinedlg.cpp b/LiteEditor/quickoutlinedlg.cpp new file mode 100644 index 0000000000..ae9fde787d --- /dev/null +++ b/LiteEditor/quickoutlinedlg.cpp @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "quickoutlinedlg.h" +#include "cpp_symbol_tree.h" +#include "macros.h" + +extern wxImageList* CreateSymbolTreeImages(); + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE(QuickOutlineDlg, wxDialog) +EVT_CHAR_HOOK(QuickOutlineDlg::OnCharHook) +EVT_TEXT(wxID_ANY, QuickOutlineDlg::OnTextEntered) +END_EVENT_TABLE() + +QuickOutlineDlg::QuickOutlineDlg(wxWindow* parent, const wxString &fileName, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_fileName(fileName) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK ) ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + m_textFilter = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0|wxNO_BORDER ); + m_textFilter->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK ) ); + bSizer1->Add( m_textFilter, 0, wxALL|wxEXPAND, 5 ); + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_staticline1->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK ) ); + bSizer1->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + + //build the outline view + m_treeOutline = new CppSymbolTree( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxNO_BORDER); + m_treeOutline->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INFOBK ) ); + m_treeOutline->SetSymbolsImages(CreateSymbolTreeImages()); + + //no hidden root + m_treeOutline->BuildTree(m_fileName); + m_treeOutline->ExpandAll(); + + bSizer1->Add( m_treeOutline, 1, wxALL|wxEXPAND, 5 ); + this->SetSizer( bSizer1 ); + this->Layout(); + m_textFilter->SetFocus(); +} + +QuickOutlineDlg::~QuickOutlineDlg() +{ +} + +void QuickOutlineDlg::OnCharHook(wxKeyEvent &e) +{ + if(e.GetKeyCode() == WXK_ESCAPE){ + EndModal(wxID_CANCEL); + }else if(e.GetKeyCode() == WXK_NUMPAD_ENTER || e.GetKeyCode() == WXK_RETURN){ + if(m_treeOutline->ActivateSelectedItem()){ + EndModal(wxID_OK); + } + }else if(e.GetKeyCode() == WXK_UP){ + m_treeOutline->AdvanceSelection(false); + }else if(e.GetKeyCode() == WXK_DOWN){ + m_treeOutline->AdvanceSelection(); + }else{ + e.Skip(); + } +} + +void QuickOutlineDlg::OnTextEntered(wxCommandEvent &WXUNUSED(e)) +{ + wxString curname = m_textFilter->GetValue(); + if(curname.IsEmpty() == false){ + m_treeOutline->SelectItemByName(curname); + } +} diff --git a/LiteEditor/quickoutlinedlg.h b/LiteEditor/quickoutlinedlg.h new file mode 100644 index 0000000000..8c409fd889 --- /dev/null +++ b/LiteEditor/quickoutlinedlg.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jul 28 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __quickoutlinedlg__ +#define __quickoutlinedlg__ + +#include + +#include +#include +#include "wx/timer.h" + +class CppSymbolTree; + +/////////////////////////////////////////////////////////////////////////////// +/// Class QuickOutlineDlg +/////////////////////////////////////////////////////////////////////////////// +class QuickOutlineDlg : public wxDialog +{ + wxString m_fileName; + +protected: + wxTextCtrl* m_textFilter; + wxStaticLine* m_staticline1; + CppSymbolTree* m_treeOutline; + + DECLARE_EVENT_TABLE() + void OnCharHook(wxKeyEvent &e); + void OnTextEntered(wxCommandEvent &e); + +public: + QuickOutlineDlg( wxWindow* parent, const wxString &fileName, int id = wxID_ANY, wxString title = wxEmptyString, wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 371,386 ), int style = wxBORDER_SIMPLE); + virtual ~QuickOutlineDlg(); +}; + +#endif //__quickoutlinedlg__ diff --git a/LiteEditor/quickwatchbasedlg.cpp b/LiteEditor/quickwatchbasedlg.cpp new file mode 100644 index 0000000000..7dafc572c1 --- /dev/null +++ b/LiteEditor/quickwatchbasedlg.cpp @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "quickwatchbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +QuickWatchBaseDlg::QuickWatchBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxHORIZONTAL ); + + m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + m_textCtrl1 = new wxTextCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_textCtrl1, 0, wxALL|wxEXPAND, 5 ); + + m_localVarsTree = new LocalVarsTree(m_panel1, wxID_ANY, wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT | wxTR_HIDE_ROOT); + bSizer3->Add( m_localVarsTree, 1, wxALL|wxEXPAND, 5 ); + + m_panel1->SetSizer( bSizer3 ); + m_panel1->Layout(); + bSizer3->Fit( m_panel1 ); + bSizer1->Add( m_panel1, 1, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_buttonEvaluate = new wxButton( this, wxID_ANY, wxT("&Evaluate"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonEvaluate, 0, wxALL, 5 ); + + m_buttonClose = new wxButton( this, wxID_CANCEL, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonClose, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_buttonEvaluate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuickWatchBaseDlg::OnReEvaluate ), NULL, this ); + m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QuickWatchBaseDlg::OnButtonClose ), NULL, this ); +} diff --git a/LiteEditor/quickwatchbasedlg.h b/LiteEditor/quickwatchbasedlg.h new file mode 100644 index 0000000000..0a2e5a7324 --- /dev/null +++ b/LiteEditor/quickwatchbasedlg.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __quickwatchbasedlg__ +#define __quickwatchbasedlg__ + +#include +#include +#include +#include +#include +#include +#include "localvarstree.h" +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class QuickWatchBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class QuickWatchBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_panel1; + wxTextCtrl* m_textCtrl1; + LocalVarsTree *m_localVarsTree; + wxButton* m_buttonEvaluate; + wxButton* m_buttonClose; + + // Virtual event handlers, overide them in your derived class + virtual void OnReEvaluate( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonClose( wxCommandEvent& event ){ event.Skip(); } + + + public: + QuickWatchBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Quick Watch"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 524,419 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__quickwatchbasedlg__ diff --git a/LiteEditor/quickwatchdlg.cpp b/LiteEditor/quickwatchdlg.cpp new file mode 100644 index 0000000000..0865779d93 --- /dev/null +++ b/LiteEditor/quickwatchdlg.cpp @@ -0,0 +1,34 @@ +#include "quickwatchdlg.h" +#include "localvarstree.h" +#include "manager.h" + +QuickWatchDlg::QuickWatchDlg( wxWindow* parent, const wxString &expression, TreeNode *tree ) +: +QuickWatchBaseDlg( parent ) +{ + Init(expression, tree); +} + +void QuickWatchDlg::OnButtonClose( wxCommandEvent& event ) +{ + wxUnusedVar(event); + EndModal(wxID_CANCEL); +} + +void QuickWatchDlg::Init(const wxString &expression, TreeNode *tree) +{ + m_localVarsTree->BuildTree(tree); + m_textCtrl1->SetValue(expression); +} + +void QuickWatchDlg::OnReEvaluate(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString expression = m_textCtrl1->GetValue(); + if(expression.IsEmpty()){ + return; + } + + // Call the manager to update the expression + ManagerST::Get()->DbgQuickWatch(expression); +} diff --git a/LiteEditor/quickwatchdlg.h b/LiteEditor/quickwatchdlg.h new file mode 100644 index 0000000000..55f762918e --- /dev/null +++ b/LiteEditor/quickwatchdlg.h @@ -0,0 +1,27 @@ +#ifndef __quickwatchdlg__ +#define __quickwatchdlg__ + +/** +@file +Subclass of QuickWatchBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "quickwatchbasedlg.h" +#include "tree_node.h" +#include "debuggerobserver.h" + +/** Implementing QuickWatchBaseDlg */ +class QuickWatchDlg : public QuickWatchBaseDlg +{ +protected: + // Handlers for QuickWatchBaseDlg events. + void OnButtonClose( wxCommandEvent& event ); + void OnReEvaluate( wxCommandEvent& event ); + +public: + /** Constructor */ + QuickWatchDlg( wxWindow* parent, const wxString &expression, TreeNode *tree); + void Init(const wxString &expression, TreeNode *tree); +}; + +#endif // __quickwatchdlg__ diff --git a/LiteEditor/res/Checkbox_off.gif b/LiteEditor/res/Checkbox_off.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c12c4da9cf58188c15489d325850c51979aec15 GIT binary patch literal 890 zcmZ?wbhEHbbu_=!~Us#$hJa?td&<2NwG;WnIk2!@*z; E0E^=r#{d8T literal 0 HcmV?d00001 diff --git a/LiteEditor/res/accept.png b/LiteEditor/res/accept.png new file mode 100644 index 0000000000000000000000000000000000000000..89c8129a490b329f3165f32fa0781701aab417ea GIT binary patch literal 781 zcmV+o1M>WdP)4-QibtN)VXQDpczE`xXAkUjh%RI>;okxb7K@0kpyQ1k_Y(|Oe7$m(^ zNYX>mI||sUbmn+c3<&FnE=4u#()KBS^SH8e)Qs5i!#lY=$-1gbH6VluzU=m=EP78&5vQ z-?+fFP-G2l&l_QzYealK$;1Rl?FkzXR&Jv@fBPNjCr#AYRyJ7UJQ0v#?)7Ott=>3`#-pV!7>9}>Q1jL)H6h&gkP@3nI=+F3nA~M>u#(n* z8T!#8oEw&-mED4!h4s!N@Jo3S7N&Q6%6l3}nlcd~X@>;uelvPsSkXIgg~e+^T1zSf z3SNj(5%jK~i8@b;C%A_P)WdKcYATc)}MrC3kGB7YRATc;PF*rIkFd!>1F)%P2jj;m&000McNliru z(*h9_AOuE|S}6bk010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00ELo zL_t(|+O<-@FGEoj{@!aJqC=BL+JO);G!l(plSBkD7(`5nMKBmU_y;5g!O+cWAbx}n zek7QPA7K#*iG*Nbs;Z`1ZQp(OT(>VYX`^W>e93o*bH4N4bI-ZJzv2v9K8cz$vx_o> zv7XPs`eSq%)h(jtBoKPHKOj(G+pB13+pi7Xi!I?^b%yiFm8{~99%s|eWXDA5H9N!R z@i`KSl!!niK!RXVRXj$X-|mK99GOp8!N5Ry>!P=HOgoBhL+1>g&2?~TRp6vU7Yt-@ zko5yIYfmK^GbmnCy`%1K-(X{}ava%_LV$BZm_i7C1mx{xQb?8*YhX#r93pXI2_r7< z*oDFk0fX^$k=gneg^*fE_ta$ZB`$WZ@ zy}&hoV;Yqnr|VQ#x$Sl&=qT_frA-`|#m4W7ztNN9tN$fF0lI9w@IERnasU7T07*qo IM6N<$f-zR;^8f$< literal 0 HcmV?d00001 diff --git a/LiteEditor/res/arrow_right_green.png b/LiteEditor/res/arrow_right_green.png new file mode 100644 index 0000000000000000000000000000000000000000..11cc87a4f9367ea20c1dd422034d9aab9e7e7d2d GIT binary patch literal 589 zcmV-T0WdKcYATc)}MrC3kGB7YRATc;PF*rIkFd!>1F)%P2jj;m&000McNliru z(*h9_A22`ogrEQb010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00E^* zL_t(|+O<fP+Dxk zKu0TL$}^nqqln9U(u-m28+qJtm|%HRJrj6{+#r{$;EaP(X@nsV^&uJ$VWhdGKvi>g zovy<%^ud`zkVxq8gf4L#zLo@eV2ny*(l`{RfN_pz{T02oCPn!5_3f>bviM-a@kIau zJsb$>^y2*>-!qCKY^5Ax#cYw^RIHjcA$60xg345&#H6CXzY!5{3_Ir+VK?`7V;l!r z-wzg0n4GK*^UI98OW2mmpRfX3#%s)k+C@u{3mUq@V>>3{&90n|Ir$srVg7xhfwk|0 b{ug`zCpn355`FoI00000NkvXXu0mjf7q|ES literal 0 HcmV?d00001 diff --git a/LiteEditor/res/bookmark.png b/LiteEditor/res/bookmark.png new file mode 100644 index 0000000000000000000000000000000000000000..a3c39ffad77132749ac57d4036310405f58f9c67 GIT binary patch literal 1155 zcmV-}1bq96P)U8iP?GF)=6_Nhu#ily*zm-R^dGJ73p_9qa-PmdGS0_f9hB|2t>y z|6HMz;&z^+`|4h|Z8!VeTltR{m7tVbbQ~OJwVnRR$&T&Gj_hFBVshl|RKIH7hPOlY zy}Gsh5o<;F%AJeJSv26_uw2u-@r9=-je|Q)|EA|(+P_0AyJLW!HS6E3UD6(-G!3OG z8r#=3c6Qw}d`AEu4r^d9R<$nXZyL)z8O-;2FC&8Ho zrwD~KO|4zcogJ;W>_SxAG__rXYYdvqaJV%ZiFPFG620+6eNT7az@w3P)WlPO21>82 zp$NH&KW9cyeSa)BbM=o*HuFodI6GdRbH;6#^w0ri3#AlC-fMVu)qQ<0$6{7<%u2@1 zNHnaQrjD+G)S;XOcMgP65hegA4U7aBad3UG=deq8cP^hP7IG80eCG0m4iGVnfzGzJ zwS*0D^57OA?*l$41wscA0?Gj(2qi0UUjPD>!0?4`7{qIrw8fi4`f?rM_w$$ca`bTP zrhx}Hn@J12*=v8W0`ZHWT<~4+1E>;}4wRf=Y!*c<5z509gbJE z_mQ5$cD+$eaQd3~f&hRw4yaOtX|&=gaMV1cI$Ra(RR!WJ>T5!+JNGN6T5CbTzU?B} zV1zp7t5j9ORqxdud5VOlwe8&@jA|`?A%G!Snh0qP*#5llr36G!Eg(hUATKy3NkY?F zB-84T?{tLG7f(ENmz9WVh6K9+u1%egO{NeX z{|Sg`a)k*xdK^5Hi>iBBl$95;B7+RbHsms+_0~ma7Qsf`WuAgDK?!`~x1m VVQuRvSiJxM002ovPDHLkV1nW59wh(( literal 0 HcmV?d00001 diff --git a/LiteEditor/res/bookmark_delete.png b/LiteEditor/res/bookmark_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..bb47ce2e4a241f05963fbaf4fef9cee9c8a1873d GIT binary patch literal 788 zcmV+v1MB>WP)WdKuQATcu_L}hv)GB7YRATTgGFf%$bGaxH4F)%O}nMk_;000McNliru z(+C_54I^#P`>Ox|010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00L}D zL_t(|+O?8fNKQ8$|R`twwtw_;uOupPoG3Q4tLP2|&k$E>+){XSVMB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^QEG}1W`$&iA!M#NHhY=9%JLfy+5B#H1 zraSqvxE!pd&gFC+4hRvS@9W~Jk>)@&DX|-qFrXT3sM-Q(ov)rM-Q}s|r4XFk(lGh{ z?Tjz9Qv0-O*_TM_!dRZ$bx6~6W97Sl(724IO#p2=#$w5SxBLYUMqiL7z`nB5^1RIa z={3pcr8?lvbvqB9JyuPfKC+*7XFBRhtS_XURg(GQ#^psS=@8>W!K0}s5!O9xoxDbZ9ey~(U>X-vJ4>-hc&~%;LvM?Nnue@ z79>T2EK_LjA42EAi1|b&B!#@2fW!`DQ6T^c{-A_(yA`Wa1b6RE+^9KPcJ)A^Lig3) z0xP;cJM3v;P`Z(KGwXg5K$KJ=sw&_EBIqm1X!)zejaobb8!`|NetTT9B z?)_bf34j(S08IuTi5aX&QDBG~(&1P*&wKqn;&L>mJlvk2;R%Algr&K_V|1Wfv8&C#xyTra{=9YgLVSr= zrAvPUd{iQO3(UUPAnKe^OXTn^DYMNS>p$2JXOSc=5N=ix00000NkvXXu0mjf%tmPO literal 0 HcmV?d00001 diff --git a/LiteEditor/res/breakpoint.png b/LiteEditor/res/breakpoint.png new file mode 100644 index 0000000000000000000000000000000000000000..53816d95219cc71a3e47736e9040a95f5500023f GIT binary patch literal 745 zcmVWdKBPAUGgOVQwHYFfcSAF)=zZH###kAS*C2Ffd5B`I-O#00(qQO+^RP z0SF2b2Ue(+U;qFB32;bRa{vGf5&!@T5&_cPe*6Fc00d`2O+f$vv5yP0)}X5iR&B2U1bHIq)tu5k4_a(Jn;?> z9&4zs0G0tnf)3~~j?)Y@D~v(Ea#?TX4u9yJ!O;N#j`AEgW{$z2tY!o7Lx553oDqls zoM1wvP#!@$d#>1s@oX1xBtL`klSr)ZSoQ)SAV|0ai~5iVxqJ>>&6K26O8_JJDVTqN zc9)PDvL2^`kfi`QOGqRk5u%Vo==u~b`hb8bu;_Li%B-kq-O?`WI|!r;Sx)LC^g^0? z%B};WTA{0&POM9S?4GP!z5&XXfFwYMVDRh!uFoq2fM}SD>hINQ1w6gk9sxw0T28V` z`%=u&X}NIQ9y~W*95gW#;uZV$)k?CuUK&0{;8O%?X6gf{25)cKXw3MQ z)@VMle=G~c(r%CnLjtfcSv#hUTD6UO)e_lmG<(yAx#ua1^SEaW54|0ooEXUsWg$Xp z7&XwLnjOo>=4Pjz>$2JFKIZrROl!w6-U42TLt07I^b1kkgXgecju$UvGkAH+Mf0FP b_@D6?MCDH@7f5>;00000NkvXXu0mjfTn;`P literal 0 HcmV?d00001 diff --git a/LiteEditor/res/bug.png b/LiteEditor/res/bug.png new file mode 100644 index 0000000000000000000000000000000000000000..5fc4b25caf5c1c9cb7719f9bbc4272b9490ae808 GIT binary patch literal 3692 zcmV-y4wLbTP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S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ua{&O9GZ_oTWk~vq(Q#vR z?#n!Hjp_`+s1raQzqe`{uKa#ZCjv(flz|_fL54RsWv{7P0m?%nh=8j`fC8=QHN3i_UKmt0000< KMNUMnLSTYHEZI~5 literal 0 HcmV?d00001 diff --git a/LiteEditor/res/but_green_s.png b/LiteEditor/res/but_green_s.png new file mode 100644 index 0000000000000000000000000000000000000000..f99b7bdf69c661e515e9fd43acedda32ce4851ac GIT binary patch literal 568 zcmV-80>}M{P)fbp{zeIR;*K zJ`|0ge|}f*Z@`*1~z#CMTVDOpTRY_PYFaZU{}t1u$MsAg4D9GGO&RS z1`+H)=HpLy8D4#T3dZgU{t#Vf{y{JhxB(4(4U~Hc#E(DUWng1L3Pg5R28P$)A45Wr z5n*dzPbJva;*xd-1`{TRSKokY7$G6Z!G>%Akn{4}1B?(aTG7c+?ibEb))Wag_vLql z8jz)M13;#|{q+bEH$aeDW6dzTYkr?^`p90z1@aKPdd=x)1}K&?p5NA}6# zDU4v}gMf|2Ux+wR0mv(d!~Zif!Cb(>4)F>I9|39tX#}xdi~hp{k`pS=&W?A}z5X(+Wne~82oi&P??0LWtZZP*QNkh8|1WB0 zfCUOd4I(K+69vQr{~16b#f;%rh(?ezn2}QpBc<6HAiw~u%#$K|=_UC90000F_A89qTKGV%LqLqA&{k|D2>yV7qLmg~*x1@cbjz3zP!z2FhV16<-TNNz zuIz$fLNt0{xWmll%$dUkM1*+|PHJ2ZGvdmC35A3UoF6R(-~DS$BH+@Xy#VYsLyQ>z zxq>v8$ny|FSR~0W2u4ic`k5mcbEIiLksz4Y#KyE{9LLn}_oq&%6$}Oga?Zh83$3-^ zU4V1$eaMkz85m>bTh*c{3ch%tltQ=L4Q7$u>-Ff*JP6K)r(~Ul_41v6uR1rSij#*! zl14&E?hS3Iagod#Oo#p}d7WbijUO{Mqc5?@<$>unxw*22 z?bQuGkPsSMOgEm)qR1=cLLyZOm>T65_V?)|o0p=i_uUiST44Cz-W mqJp!8r`H!$*8T4x&4Leh&Epbde3h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MJAIbnM@&s1O!5W@6Ez%^*Z&MOJQ;{yj+f-D4%@(SO2%s z08(Fh{GRzu=9$Gk9YeXfb7{<^QCeZlY-LI@o2>O(onmQ%k3K2}Xi2Y*()mG)m;Z|9gqK~oq20000R;XdCL|N_!U1qIpnKMkHRa9h7d(~W%a<}^kL4QEM1Rd_V7e42EFZX=8+>@CZ zTW5vL4*`H#qBMa7uMu>zn0Q{5z>xwlA#=M-2s{QDn4D6GD22%55M2RtPr;J25OaF= ziYiE`frJaNsRk13Ah8~Jjj*`^HaCL63PLMvYlZE2w1K1@BzBOtgVYYYJ3-z7@=j26 zf#MGAy|znjRQHam;W_lv80^6Ppp)IF}g`C-hTJU;20{K@<= z75Z}u0*HYSAQXYndW4b?N<-)(LNok{z=Q^AMV+>J5iTZJvgLW{xWv)9`6Z5=vUirL=_vB!1_x zafMA+r21UyppqmY$AD;g==9-QqpCoOr6kxKt!FT1(Kt&<>a@B%a4Z9t6YXWN*q8&mziVE`{Ysgrq1~0^u0Yi&K4*h7{B(c^9@)_(kniW z-aawUv-ZRD=)RXZ;;6_WtuD*ANP{*!HmVorK78*D8slG@u#vk}BRvekbA77)f+e%8y z3m#;ar;Dzn#K~)&;)PCe_ah}=M4n69QyGaS88x-B?V-$;7~C9)gc$;B%HCtY0E)Rp AEC2ui literal 0 HcmV?d00001 diff --git a/LiteEditor/res/clean.png b/LiteEditor/res/clean.png new file mode 100644 index 0000000000000000000000000000000000000000..1294132968da8a359cc0a3d87c617d7015921829 GIT binary patch literal 792 zcmV+z1LypSP)WdKBJATux^Q)O@&l1qU%EbBxo5uSZ0`6poC!r6&bMa@1V8c%;iN38>C1FXaWgG+w_K|C7k zHy2j`!$5WG9$4iiy~DssR#`T9)Z5^Ox&h5F5t@oe?ZDjvf->Os(%7toqz9ehu(z?Y zxWYZs*40!6H37jb%zRgc+YmR-0crukK43OBF*gp&1WXGKmjmrx2NkF^%T0tM8WNG@ zvlGCFO-wSf@mVNq+ytDSbWb zJ+YC*!0@s)zogMyIAJ*nvS3#vI$DaWN#BE91`eCjySuKGe5SMDRW%9U*lJ8_W=9~X zK3|AZT?j~0!ARNUJOiDzml>=*b4zhK%C(I{hD$-1hJQ}0(ICMfJ@I}CxeWS%ic)9Mps*`ddWyfG6nbuvmi)Be0*~kuI^DplD?n)5{@%Zh WJ}STSwfcAf0000zg6 literal 0 HcmV?d00001 diff --git a/LiteEditor/res/cog.png b/LiteEditor/res/cog.png new file mode 100644 index 0000000000000000000000000000000000000000..67de2c6ccbeac17742f56cf7391e72b2bf5033ba GIT binary patch literal 512 zcmV+b0{{JqP)CQDsH?WF>AIFt zQuJ}i;w2$ZUU#3SZ6RY0Gw;kZ&ol1~2ky^QZ(fom$=jNJZt!z7w_pH~wdQ;R)Gh%BbQFCx+Nm!4SuS-vkr`vhhrX zM*>w%e+v~?m@q~ImPAgtLkR_3U<2F8LP3W5=LJ*ZN|S5p#sf4YFr$p~Q~Z*0Ngxf2 zjk#J#<7EAlhzlrV53~GF&pIzcCN_lz9@05UeoUXiK%N z#x+4o*i_c|6_Uu1+&TIho?3@y4k-#b8Y_o94zW*B3a1ne2-Y5s0uke$$|@=}OP-i= zNYZQA=>PrZu0MfSL=b8UhD_={W4IY1{b{)U)*gc45xtL%IYLY&hF;d`@GzI&7H&D# zh;z_BX$#hqh@q?AY3sJTod2%*Yd)_>YM0#q&ixGuh+PQsneK)F0000Q=x^v9(O#)I^*1P@J88{eEq2?L!pBBNgvKK>?DRnwpy1+WPrxadEMzRPX0n?Fydf;jxUK zf?N;;w{aXBrFvEn5wzA|<}8m@7d=in)(b3`Q{Y6RvA^@|DMd73l0l@C=-obDm z3V=X_$0h*e0Km3OC*9GypNTz#i=S>0XSH$w;QM~L)6ozB!rfwnBaeb)eVPFPR4SFT zX0zE*Y4^zlNG%$d=m}h2US4>fcWzl$Qd|=6SpZJ&$6+SG%zFz-m)c>Hmmr4jEhoog$DG2}+^*?lQuzyHIS?5s{K>@IchNu((B~WSMLSX{J z#zbKlg}TFydP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@+@Q?+;RywPY zcOk92TxO3~rzQ-;-tVScsaO%?Lsogt8~ndrrsKNJCAn0OWMm1&oIGFiGWmf2U%vqL Wj{8_}YSHol0000WdKBJATc-~MrC3kGB7YRATlvJGc-CfHy|r8F)%Pkca1*)000McNliru z(*p<$2|C2S4S@gv010qNS#tmY3labT3lag+-G2N4000DMK}|sb0I`n?{9y$E00JsW zL_t(|+NG1dYZGx8$3J(MOYEg4roJ?T(Ag!6PL56rBDgsyIys4sf>>uoib!!NmLiJ( zLU3{rT*PWAb#SPPw6;wy$@P*ny?3AAooOr8sSkYb_4j=4`+bfd9I&*#H;Yd>x$aVn zB5Hw8%`8&O<*0UAdPeTYQu6=q|D@=ReU{UQ|3nbx1H&ZweUnXs}9^MBa?N zfYLaAWr~H_>-61-C;^!PDw;2G5)nQdJAi(lX0RoT0x;!lb~Xr$P2wQJD#P}+B#}6} z@HH({lCZu52qPMfBMWr!^z5M#bkixvaW-vf_)8LD*Fl`n*xZDCK7*L@g+kxP57LE% zVqbo3+NgjjRNDiP$uwOTEGx5@Qx-Q{48*#T&j3m)q5`SwcyELwMLu`h@___RIWR=J zW3w%}jW}x>YUoCmqz-g-ICr1ArEzcV7fG)NT_wAnPTcc$r5q^f8cw;y+Z}+avv+wo zYH(|9mAEVOa2nYRhK+w9-SQzGSBspwGR2R5dqLHkNv<{==89t_)3sfdRh4b!nXZg6 zef|NR|8AyXy}rYx-hk)w2YND>XA>}UVV3?uckVyyH&S{ZvA%;{Qvd(}07*qoM6N<$ Ef)Ic(&Hw-a literal 0 HcmV?d00001 diff --git a/LiteEditor/res/cubes.ico b/LiteEditor/res/cubes.ico new file mode 100644 index 0000000000000000000000000000000000000000..437134ffeb879da58097b50029f9005fb0f67710 GIT binary patch literal 26694 zcmeI4349J$+yAeKwXM=s6g674bU|rF>%mmFr`n>5qLxXBHG)_|Lo-TIsyp21PNL>2;r_h1izw+~qV;dd z{l0S?B0iS;-SdsPiJojK_q*q9a}oUm2-LIl!)JXewqS^ks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Wl(5begIx#1 z)>)Bop*5`4QpIG&!Fqsmn5V%JPd{HVvMX%X5F!c6;2cq{RA;?FR0oz{=nPnWun388 z-XlJ4e;SsE$jA;TfTE^2YrybWIgupBl-POh84*q`vFrTKkIUNNouB;k&-15X9(w1F cqdGl%|Fq+)+<<2W(rx$O$ljZ?*&z4+7fOPWFaQ7m literal 0 HcmV?d00001 diff --git a/LiteEditor/res/cubes.png b/LiteEditor/res/cubes.png new file mode 100644 index 0000000000000000000000000000000000000000..d89e408afe5187171a329072156dba029e6933d0 GIT binary patch literal 809 zcmV+^1J?YBP)WdKBJATc-~MrC3kGB7YRATlyKF*rIgI3O!9F)%Q|D$le4000McNliru z(*hC|Hy6>DOg#Vq010qNS#tmY3labT3lag+-G2N4000DMK}|sb0I`n?{9y$E00MzY zL_t(|+NG0ANK{c6$N%S!_uiSwdH6yEBgrzOh!zoAv}jQ+qLtF3MNo@CHL2ZIsxM~qhpdl2Z6oFynG^pu}&Yj17%zd4?r_Yh3AzXRj!2Qm-|KInW|M?EE z$HD5N+w1aCH9y{-lu!6o(e3!W%dxrR`g}w7c`mc!e6c6bkL?b)xp-=DuxIvQ6Oar6 z2^rYP+nAimh#yOvur-~*RNF9pG5=T6PzP{=;O#;MP{Z43Rl-?4i?4Ib42%PwCy=gK z|4QlsLgz4b`q3r;5o`sPNx;AZssspBAFBh-?f^64qe%Nv5-`NhaMi8s z;y-|xfHdET{&=|e+VR|pGI|=Ng?NR|)E1>)GJh}$nAy>}(CJ*LwzY8zzA^xZaSertzqmLz_^iY%l zRt%&be-|UgORW9a8C)Gs!=t46GF5_*NX>r3OlncXJ+#%1U@XIGW+Ex8i;y~F`1GL@ zo&|QOZw~wWHMJ^UY|_kRS2zI9f{;3|T&g zBMOVRa4~VAi?ZY~N@=gWGYZ)(A#&px^xDD$NLaxY nDtm;!dT5T(+Uvc(;+^pa*oGqxm(3E*00000NkvXXu0mjfkEmv( literal 0 HcmV?d00001 diff --git a/LiteEditor/res/cubes_blue.png b/LiteEditor/res/cubes_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..0cc371319030a06d742cc286742103e0364778de GIT binary patch literal 801 zcmV++1K#|JP)WdKBJATc-~MrC3kGB7YRATlyKF*rIgI3O!9F)%Q|D$le4000McNliru z(*hC~1qIC7y=nje010qNS#tmY3labT3lag+-G2N4000DMK}|sb0I`n?{9y$E00MbQ zL_t(|+NG0ENEBfh#-DFzXJ=Po-NJ}cR9aeG0*MTb>{16i1yUZobg1Z11X2hdx^)RU zc<2yxi--v7;5mxGiV#Z-Vj**NYX#l^yYpw~&o?t)@4A&P;mH@~@XpNh``-8A`G7qZ zYw2!p$VsJm_h3vO;GT$E-0ibW*Rr{rm${qEWUVE0_UzQ|fUDn6j*ll6j_dx=KHq1R#PLf}s=8cL0w7zQVD7$=V&@*c@sN2#1@!9D-gW80UaXkAuePVy7hV z=jZ?~e;PqYJ!f}i>ctgVnA zHqh1%RxU#1iijWYL*HN$xr)PeC$yN$l%AT;PdwUMp~7Q{u`UVM6`*vi7jIX)@b2+5 z(a8%eaq2v-ja`H*7&d7gA5!qm!rD-#uo@?66R@1sj0b`JF(@*Iy8|eF_)L3;Sn+5Q zdU61{AHZM?ICnUL>6tlJ+oTm;zq)OrRx?m4P$yy0iK3@r8gIBR!^&z%lT+!9FxE8* zwRMU>kT&<6@;0DaF(3!GT<5keY}08N$KX(!ig`dHLP&u|-{Cj%KpMUiP-jn&Uh79& zID(ESQw>`{cmyUR{S68fnWIEd@gxDyWAJD~!BeeKKJ&U0ZuJJ3ag&82QBi02(c4po zUA{xGIEWo>4+=G%C6zLR_ubRLh}U`-8g=@mjJzJf$`!Tw;$8rw{TC<)lL$x&aCr*z f6EF69i~rSc!d4^DEjJ(Z00000NkvXXu0mjfsd`fB literal 0 HcmV?d00001 diff --git a/LiteEditor/res/cut.png b/LiteEditor/res/cut.png new file mode 100644 index 0000000000000000000000000000000000000000..72e26fc220d23389cf17fce7df7a22fa4b23d361 GIT binary patch literal 876 zcmV-y1C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ePg3r{}X@8JrxMAT#nF;eeo{y`7fk7NYSOn$)l?i(GDs>|~Z)zDT^gkG8vd z$y|8n59wFG`NT(g3-;vX`hAb}u3oo4X0#@wR)q#l(HM^skIf2H$Q4WE?J9ZQV9Lo^ zsk8swnLoVk;3rwPZu$@WBGl5eEbY$A0jb#e5S z>*M45{J;IAupsCEy0&aS(5=U!{eh6#fsn$r?2K0`jjEyTsoSmnAD5}HjoKb;(*OVf M07*qoM6N<$g5!ejFaQ7m literal 0 HcmV?d00001 diff --git a/LiteEditor/res/debugger_stepin.png b/LiteEditor/res/debugger_stepin.png new file mode 100644 index 0000000000000000000000000000000000000000..f4981c0515a56cb33c1d3eed88ffce2cf24b6396 GIT binary patch literal 3136 zcmV-G48QYKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taR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@dZ36E?>NbQ<0v5I>V(4H;FRv j{@uqAU(%>Dy#yElB?QLm;Sq2F00000NkvXXu0mjfw)@}_ literal 0 HcmV?d00001 diff --git a/LiteEditor/res/debugger_stop.png b/LiteEditor/res/debugger_stop.png new file mode 100644 index 0000000000000000000000000000000000000000..1d74a788578b21e3b638ce1cdbb689811f4b7034 GIT binary patch literal 1316 zcmV+<1>5?GP) zZERFk8i1d3?!D7HGk2yl1xj0Jky;8yP_qc`sz{8{Xks*I@FPk#K}FoeWq0e>4`YIV z%qqGuMp;)Skxf>KMq{FhF%gg`Xky}5QM-e!Q%jlB&PV6#&UEg*uRkh?Qo@|%oL}cW z&pGdVa^9mvgtIlJHlAnTT-XwgbfJ~5m#P_`%2y(LzB%jKGYOR1kVv#I9aww)x=rh^ zSh=LXzk@_FhEh-{lu4yB9N0HFe(1e}|0_(So)UTc_?#dSIj!6F-S^xyu($Tkph&7L zk}ivk6hwZ=&GwOk$Y@#QNKxe7!y+3W+#lHCE!*Z|opyqS=RW$M`=1`T=bB5ChzqqE zAfObSn5j+OA++o!fRkzV(7`O{oAPp!Fu;7Pwrm1G{IyhpwSQl-=Bq}Q2ZiNCltSK z%(M&~M-z46n;(ko`s*VD<>Cv^oD^8<=J5La{*t@u#;feYxJSM2VyhDU^CwYC|2Fxj z=I@sr{y)1A9cf1bA=;+d_ufYw`1f-i4S93I1ZeB*-PZTVwf6A08D?q?0^eipiWWBC zeBqoI=2#XH zq2YNL`8=V89Z5%TUS)>j@s*w#CUZ26S1DjxCZ=Ift+X~RsFceT@_Bqezz=)^5!#mY z5}Fr3&$L=&oo*>ZVeAW(*-9vq#4-aK4XcT}`#ud{h3QBU(@tPIop||ir1&Fl zy+SoVuW3PXVu<4K0q_bilY^j!<}w12pLD%m``WN$MCL6AD-JD5FddW*H7yWnfcT&+ zFdTI2Qo_j|W@f5~bvg6wxL2zTwe?*BRt$6)j40@qrUmHm?B+}dj4-W>FCy@mDvj;gAU8JlTsQ7xi&x(e z8~Nld&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+l;fbGt=E1vL2C=s!A&9 z|5H_|O1$>~d~@gPFF*bKvoDNRm9>tmx*%_Y_dW;$@t)w9M-P6wv-j9l;FKbD~0K4s(C{{h_-;Y0mET2YU-AY^K+DXBSr)PM1)?{=bytD zTwMH1nkK_5T?fbpSyIm`>ZZnM{gzl8&0o(Bna>(lmY1>CMprro@WXfC$0!|yc>>HtNN-&9IudVGQx!2@`~7(-jPpbdFe;Jn4n zE#t{5*`T=90pcXNH5!d*>p5B}lu@iK4-u^hlaQq%Ck!I8bU+XpR>xzkxQ{!)!-tPP ze0O65V*>iUKD}N@lBa;f=pNO)#yLxvL_|@_FwZ#He|Do=qSopI@erp8;-U4H^8Au? zkW;0|w`az#G9pIg#9|jl^yi??Z9Hqc}0kyaXrPt?;O+96DE^udDnqbD!%{oeFkaD z>2yjnuZaf(vNYwQEK%OkSW8h9gh9xB-k`LY4zR!fwAz32Bv@K{hu?nxgM)*oY;J5a zxi(>XHl>+2c;J)Uw<(4N>CFqGFFLiRDf`H z_KM50WOi6mWX&r8@!lgM%X@o!AMNbyjIu17#BnkffPu95RgT^0bT=_i|hdY8vu1l5W{3-bk_g?002ovPDHLk FV1fv^foK2# literal 0 HcmV?d00001 diff --git a/LiteEditor/res/enum.png b/LiteEditor/res/enum.png new file mode 100644 index 0000000000000000000000000000000000000000..a2df3aaafaeb0c2769fc9120631e82eaf68d4967 GIT binary patch literal 518 zcmV+h0{Q)kP)fbp{zeIR;*K zJ`|0ge|}f*Z@`*1~z#CMTVDOpP@UI0o_X=8l;wmm4OZJ0(Kzt@u$0R z&9T{83=AerC@xr>I0X?dKn5EN)Ma1;SQ!{ze}ByI>f2)!&3zH&3=C%=UWuKb1D1aU zRQLMpV+Ia3q*wsC;N`am7$J@>_VPP|53&?)0LZkrzaBy21_^X-T8ZM7cRwG&1B8PE z*#LG1hMVt?KtqlZuEEygFG@gO|9Au<`yb+J6c;dHNjM-yd-@pRu5h*ci=l=IrjU&d z;u4>V|L}m@bBGzP*~jHCSRDrvMg$@&B98w9iQu~bK>lBZXZ|C6_8*pxk@Es88v`RK zA0R8l@Dn43VThy*O%#xH0 c #C0C0C0", +"t c #5F5F5F", +"- c #D7D7D7", +"4 c #996666", +"9 c #66CC66", +"* c #666699", +"@ c #FFFF99", +". c #E7E7D6", +"o c #CCCC33", +"5 c #868686", +/* pixels */ +" ", +" .XXoooOO+", +" X@@###$$%", +" X@#&&*$$%", +" X###$$$X=", +" o##&&*XX=", +"--;:>>,,,,", +";1:4<2<5>3* ", +":167638980* ", +">2>7:3:q:w* ", +">2***3***0* ", +">23333ww00e ", +",&&&****ret ", +" ", +" " +}; diff --git a/LiteEditor/res/error.png b/LiteEditor/res/error.png new file mode 100644 index 0000000000000000000000000000000000000000..722794f27a05a69b93be5dcfbebe611a72ea9d27 GIT binary patch literal 674 zcmV;T0$u%yP)2L+eb1RQGo5jq&>6=uQ&Ah0#Tv$+xzz7$Cl!QdoG6({f)iOj}_7ht4 z3o3{joL*g7%RPC%{HfHA zEFH)0={)+Pvpw|`5Ty&`PR%|VnH>GxT-eV+1})u#?PG547wY6Syyg+) zR+g)m>+S=G|1)q3u!}MTE$zw4RKmi~{U)3q#cUnN&;BIc7~n!C@W9cqm;DBVeZ4K` z{q<#VHh>~p3v#ooh?x(J_J?i(_5WUB&ty7MQ|vm5H)rgc^mHYs;!z)# z7BN<{h`h#m+yHKoKwLloa3E2m8A=<|ufKTRiyI)rCL|N)?K7EZwVZp4xw3!=htRb# z)QuU`&5!6*6e1B23S5^f1EDV9B7hoj_NF<=D4w9{)m%&?wNCgB0C=Z-GxDLmv zjo7PMW8PR7A?M|sUJ{<~TOloFa7kk2g$RDtT3H~3?>i29dmF#7DQrATxxO^Z3>7U8 zM@8Bu8j#fb9v+}IAT&aP5IbL}K^H;#pzCcyVG{#^c(=mmKZ-uwW$^>>lK=n!07*qo IM6N<$f-250+yDRo literal 0 HcmV?d00001 diff --git a/LiteEditor/res/exclamation.png b/LiteEditor/res/exclamation.png new file mode 100644 index 0000000000000000000000000000000000000000..c37bd062e60c3b38fc82e4d1f236a8ac2fae9d8c GIT binary patch literal 701 zcmV;u0z&N#0$9Ug7g~-`rQ^qx~m@y2OU8A z#zh~=7n#Z$Z*fx-GOtDf07cgx0suCz_W(2~Y(0tf@FX@P6EPuM_dgn$vj9LucO)%W zw%HgMW>=#oL>nZ>M&NEf08>)#)k<{$fCT_r>rPi=BV=hFh6WS^qqze>C6Ek}o{M5% za|@JGowu0t{&hgNzySHZxy@LTNh);YzZ2zSp_ zl$^T&Dnc|NLb&RD_!4>pt@VHdP)ZGER%5ZmWEe$lryR&y;2u^3cOkO4#6c%-(EY6a{600000NkvXXu0mjfxS2AI literal 0 HcmV?d00001 diff --git a/LiteEditor/res/execute.png b/LiteEditor/res/execute.png new file mode 100644 index 0000000000000000000000000000000000000000..5cc2b0dd36978513f3ca009c68ebc4150976fc80 GIT binary patch literal 634 zcmV-=0)_pFP)cA1hmXWM zDZ#H?v3PJ5$Hq5OmbDN{wJ%9%wAR zT-Qu9!vIN`896F;t~rD&@Nfe0`Nv1rEgogE>hi36i1p_V%rE6ZqX5JdGmz-z3Rm#{ z+Z*c0z*?bg!mefM79{Zs`zK3~u)rkEuD#mHG}dlY@$@R6?<^o~D%1C9AK Udps;mZ~y=R07*qoM6N<$f`qvmMgRZ+ literal 0 HcmV?d00001 diff --git a/LiteEditor/res/file_explorer.png b/LiteEditor/res/file_explorer.png new file mode 100644 index 0000000000000000000000000000000000000000..7b7fbd17e39353723122664abae8461f3788227d GIT binary patch literal 612 zcmV-q0-ODbP)PDrjnPX=rH; zqQ${l4iyS4Fv&4giDwVmm?Q$ zhTL&8OyXERuCJ_Y++wrjMj8GD99k(+b> z<{<5wp8G;7au@E7lX7q%1U@V;^Dm<#Bbba-gga)&*~B}OVT z8FJ_8^ce^a9*{dnoOjg?w)UFTS_KNZh~pjN>QDihNJTD3CPDxgha7@4JUq?D&XIEY9KSYW_M1j`N1m2BQ6{jt9pgXOIG5 z7fYv3PRIVYk-8w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o(VJ^4bBk&*nbq?AucDPbZj zF?9v_Y->lURQ}15IgNB)x=wS`jO~^sck}Uhv$=W3W5-XPXZgZb@`bV2r4$=(@<}Q0 zeO1`D{oJ#AUO!!%i0)Nd@4APQiF@ca{9*o_mMwesAG%^$);I6Y^#4j2=NoE`m8t*$ N002ovPDHLkV1h>6I=lb? literal 0 HcmV?d00001 diff --git a/LiteEditor/res/filenew.png b/LiteEditor/res/filenew.png new file mode 100644 index 0000000000000000000000000000000000000000..76e81cd1a770117b2fbc32de91cf07264cc5bf52 GIT binary patch literal 347 zcmV-h0i^zkP)55^4g$&z{(%l2XDi?NQ!X*YzvJWm$v* z0AQYH9LE6>0RV`|%jITf=M`f_j1ki`VcWKP2JTQ*o6Z4X7zU^+Qc6%&s4B*Bd|5*Q z01#t*bDWPo02b6o0077fKt#^Dk6XYlz#X)z%%x%SxpD0O%Vu_tb5K6_HMK0d8JO8y zbWAQEUjpPWl~OVJZUM^8WcTuHOPMIZo5!PK4F`bs%0~d-#G2MVXZurH6Hq#4kX|`g z%d`abO0@>KEm3a%j6J_CQBAJPfLgS@th#{ww-s#FDeCu5S}3fdf2eT thpapOQoz3N&2!?4$*=!aG#l+3_6JkQ_sKtzzr+9l002ovPDHLkV1iGtmP`Nu literal 0 HcmV?d00001 diff --git a/LiteEditor/res/find.png b/LiteEditor/res/find.png new file mode 100644 index 0000000000000000000000000000000000000000..c9db9937b23e77f4faefa483e4719dac3f8b911f GIT binary patch literal 1136 zcmV-$1dscPP)BVdyRxqB*nlla!ZwgOvrddL3Jx-$nqcC+dSTRPV!*^3z2i;; z!i6`Gj1dz>6Q?d@8wxTFcZ0fVw7PW2L z@l$_1-Xlp8KEE`)mdd09gM)*1iztZ07cUjuF87beUq0Tes%4CikI(hR`#aB^{-pAk z0KY%b>u|_tqtU3}Vi5yYQG}-HFio>KGjr=zyDXm|94D{ma$x$7f`qU>grf`Nfj zR-BukU6ZWR>&fKwcYgwWartZV{>c-IU7cMK!V!2pKDeAt=(>j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Vz{$=QD*s?d9Z??f4v^9zS^V`PD`tc(M6Ayz7`}pD%Bmy?^cebz@PCc7j!% zf3~o*G@S@~ literal 0 HcmV?d00001 diff --git a/LiteEditor/res/folder24.png b/LiteEditor/res/folder24.png new file mode 100644 index 0000000000000000000000000000000000000000..e9d6bd8ea854ef19c28c51256388f97fc9167010 GIT binary patch literal 1021 zcmV;(~Z0KrB8Nh{v*Sgq7`uC}_I*Y38t)fA#)0dS<^PzA5K zeM0~fHQ(WA(YczTW_VQ=+6nbWo8iF-5km}AjkZ80{Q#J;o(5*)j7BSCd~z1d;RRA} zv@#>fjI48TLk>)JU0dSw5S@d-K|3?T(4l5z-tZZH0GMIiN5;=Tdg{}j#+(p1@E9UJC93T{Q3OhzbzyM(G1>aukxgEeMDoTFHG01t z15rR2IJ_!Js!$M24Bu%?k>wc}PyuQ{2xOR5<5Wnpq8cD#cu_FJ1uW-ac61~I zrhv2q@_?CDjHN#4?dD!EGqCPxHUbB6th8GBu z&E+D_DK0=~=6&;zvDWxpQyL3Xa#^y{*Q-eGWDo;eTo9CNr6O?}uNv8-cbkaX&5PH@ z&z`?<_0rA1OWR*K`sy>|SK=|8yX~Uzi^+2bXSyZo$)XMX>cZ&HM*a59_rAS+Ayt#> zcbod#o#~06Z%q8~&84w-o_*q>=j&6myFNUA_|z|-o;tH|XW~|pQZYYQ&l=x-K6&oI z%u>o7b@bkYJCD2Sj@K#!TV4rXdiTqh@6EUO)*B0zwf3qSwF4i$Idu4^w`+S&4y?4f r|MT0jcx~SIRuzrYncu(4R@(jrl8K<1Hyxgn00000NkvXXu0mjf7`^Op literal 0 HcmV?d00001 diff --git a/LiteEditor/res/folder_find.png b/LiteEditor/res/folder_find.png new file mode 100644 index 0000000000000000000000000000000000000000..c64e2ee679dbcff0440e6fe3194a971152b38d51 GIT binary patch literal 795 zcmV+$1LXXPP)8hoRQY~32;;v|2 z6e-B2B zCE(hxS3dK-rRD4TH?wNZx>((BtjuOJ_pgyBGdA>1yDCbtXz88 ZdJfaffI=X}!C?RZ002ovPDHLkV1kN7cwztm literal 0 HcmV?d00001 diff --git a/LiteEditor/res/folder_green.png b/LiteEditor/res/folder_green.png new file mode 100644 index 0000000000000000000000000000000000000000..1269904abda80b49c9870bcad334c62ff8f901a1 GIT binary patch literal 643 zcmV-}0(||6P)|QL9~pZ|Dr`iP)Pqk&_-HBB|!uQ zVM#?KT1MtVFr8`ceB6(7?|DxP%@1&TH;4Cu_s4nO=Ny$9!~g2h`^P<=>y~p~uD_5i z4Cb=AAyIbZ^YX{s&Eq$&c)JZv&Aq&JsPEvZ&P-w8%;@R8c_&-SW^!ILZBS2rGH!;I zWO)f-SHN(2`0{Y+z_IO`uYG<53v_3@$g4a}-HZU7-2gh#EdXN$fL0tZ@%JXM z#H5MF7>6JY+5;k^Er1w{;~GTPcM+Nh5rbo0Dp9pPz*_5WoPheL;YW2GR}q>BKdA$| zq;PfO+V!!)(W5$9_h?cfP9ls53-zC@MQbcJ7fFoX0u;wfZgISn&5v|>ogIaf-MM0? zmV{U|b=?5qLis!*!mrj6feuNH?6A-clyHc3qFsy7)GcJ=nLEnGRf#8RZQ$ip)pfk?i%Y&pFewX|L*>K{@Bo{_M`f%o_z7` zQ0>0+YIBYG-`@b}&Gm4k|1jmV`vz=c1Al6@ d2H-jle*wgMJpJWgq1^xg002ovPDHLkV1m|8F;)No literal 0 HcmV?d00001 diff --git a/LiteEditor/res/folder_red.png b/LiteEditor/res/folder_red.png new file mode 100644 index 0000000000000000000000000000000000000000..33d736aee97582f59e36593fd3a5dd3e17a04ca8 GIT binary patch literal 628 zcmV-)0*n2LP)~*|GI^9|lHl-sUXBEdKlf zuqB`{dSr5N^vLPnom*|-KF;Hn%V<8pg{>ICZUvCI)9OA1fGmn=+`Wf}Ei?>~^$=PS z|8<~Qe=i!vCjfV4wY(!L18K*d5wlEgz4*9=kDEf3$vSc|SL;{=Q!04C^-(A6z2w2}3^VYXIcMfLGh@F-->=;^b;9pE+9-AgXNuFXu)G8rVomlzj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0?Oww+P6%Z+k|bcBmIEl22q_KOzBBKWsqd8Z`@eB;aEPg?5VhJzJU{;`w@~=i z*xhZhA9fDxlNGa|RO+O6I=6gY{Wkzj-yY7-zq0f9^gD_D{m-b^>+hP{ZvV7~%Lge8 zC3bc;sGvn=MY$=venUprCD#wFwW}Qih~t<1^z@6HxMC*g!7&+v}lwk9A2Ze|&iZoIgAZ3MTi0rviU@eS5?r z4KA#JuLrmglUjU7y&F^VIw}$Rg3uR)V-k9U&=-WhAoK;n1)+F@6(FfbKq!_YoYN6- z@oomdg%KbsI|VMR`^0v};X*@SkkbJdKbzvy#h(jwfiBRE_p0E=F98r%Yr~OBPWzsj6v!X?6(f7#B3EJn O0000%;FgzBex zdV1o_>0tWL$EOTXOA&#{%E7?!@8e^fnk{9y7*@0tgV|xZ1z?(u1IYk(cAx>D9xyQe zM-F39IAD4q!Yo^u4Q z_(c^o_P{1^L0t3v2*d!Wt5~51FoIGdBO~MgHE{^Zki`rP@0uWdm}`*J1Pln){byu> zahRDI7+lp6{sx6IBbMaJh@K>6Wo7?AevCZ^e)M9|g>cmc_QL;$EGP*F;vGarVMB8Q z!bz`zq#=mOgfH=cyamRrko*E<{{`Y@K(-i24DJP720VK7h>=jX1PCwyGSh&E9y~SJ P00000NkvXXu0mjftDo6U literal 0 HcmV?d00001 diff --git a/LiteEditor/res/func_protected.png b/LiteEditor/res/func_protected.png new file mode 100644 index 0000000000000000000000000000000000000000..d4d909aa79dd34b16572bd232571b9832f6ed63c GIT binary patch literal 528 zcmV+r0`L8aP)%;FgzBex zdV1o_>0tWL$EOTXOA&#{%E7?!@8e^fnk{9y7*@0tgV|xZ1z?(u1IYk(cAx>D9xyQe zM-F39IAD4q$;|Je}+ z@iv5pmsLP9unAlc*E~N0F#zf+R(3QO2-Y(&tcgV!05a@dBLhRU<2QyVm_|m-q{f0` z8Zb7TRUryLcObm*A3X^o8z3hq_x~|80s`itO8)4@q6-m57vL^Hq`v<^NrY+^HZ&(7 zob(z<8iJTi_!18@GZeEz@(Ymt7l@Yu*%;FgzBex zdV1o_>0tWL$EOTXOA&#{%E7?!@8e^fnk{9y7*@0tgV|xZ1z?(u1IYk(cAx>D9xyQe zM-F39IAD4q$;|Jf0E zz`=5vZJ}+KO#MpJM4MAZ+LjPYjkwf9UW#!PH5N~4r|J^)~P`pTNLgfF4otNldP_C^vDr{*7O#;(MB`B zu)y`Nzd@tGs2o5)`}s5=ga86FGc)*x@ZHUuT>0V}J~fUYA&o<@Mk8rmdjSBYK!gwk zK@mj}gn-tHwn7J?;h~vH0N?N!Yf))=ISDyH7U4q!L2x$4(*SK~k0Junj7kd;1g$M7 zCHeHN6aXR+d_bXau^}`-YmIA*@ZP6)MI_x`uvVi0k&tUrO8}%E2twpyK(NM8a4||U zm69qDL2Hw#+Pg*RQNf4QMCTl$z-U7hMTnAZaj6ocb*t{Q24rIzy#E)VP#9xyk<0u= znu8ET(8jc|H(j}lmX#JV1(8E3g|(Lavm%HDjNY}=y92y$0&E5_`7jYA2-;{+szm|2 z0eDt{)*9;^N^7>~c!KS4?+lR);9OOeC%j0Uv9oWyYy)(NghSUShUs@3I*agCN30kQG`+otrc2p zv`&AK&N?r7 VzCPCNY)$|G002ovPDHLkV1f$M`9c5y literal 0 HcmV?d00001 diff --git a/LiteEditor/res/gear_run.png b/LiteEditor/res/gear_run.png new file mode 100644 index 0000000000000000000000000000000000000000..1ab93e7b8c98204e9f3f77bfcf73f7e7d6c29f5d GIT binary patch literal 1618 zcmV-Y2CeytP)WdKHUAUGgFb!Q+lFfcP9F)}(eH##shAS*C2FfgB>#}fbm00(qQO+^RO z2nY)a9Aqr7=l}o!32;bRa{vGf5&!@T5&_cPe*6Fc00d`2O+f$vv5yPFSrX+vYAnl!YAgaj2E2?})sf0mhkv=OaxxB&Qu;nO~-1nzXZ?!Fj z!M=#V;m|~ehWhU-Dq5c$A0PQ1P`{7PpFG)^$g=$9tgP3+lqC1PLx*ZN{x1SalE9KT zcwWT1bunNVd{bI_t;24gs4pm38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zV6t}hg zFtX%<^P-WFQEb#`gl3+XuzmZ+C!bk2RR;$cOQvm>YY0Ix_F&?_;JlRa4^bq?aj5)D Qga7~l07*qoM6N<$f{W_(CjbBd literal 0 HcmV?d00001 diff --git a/LiteEditor/res/gear_stop.png b/LiteEditor/res/gear_stop.png new file mode 100644 index 0000000000000000000000000000000000000000..738ff508bed1a510619282bfcb5db8a60b51f4df GIT binary patch literal 1600 zcmV-G2EX}WdKHUAUGgFb!Q+lFfcP9F)}(eH##shAS*C2FfgB>#}fbm00(qQO+^RO z2nY)U9&pVjP5=M^32;bRa{vGf5&!@T5&_cPe*6Fc00d`2O+f$vv5yPu9@mecZLTy${cKrwhvfjm9sz z>FvGWJ-_q&{mwZb!2i6c$Gtpt%FRzrNypM@`9(!Z1}SRex;=X+g}mFhul)r{#tAEiHTnz_pV+KXRnAoTjDrnwn*YR5f{f_wEbp z{uO|#szBooNm5|NiiJQ?@cDrQKlH|80aruAb2g{b0W~#cc2SJ3e^d|BAjEsN zZCjNyIvRnycSB&eo1v`C4kIHG2nG`x8)Tt@>2wTOEPC*I2f^j~rA?>f+htjK z_X;o!tuYV;5gd+OSiXD-4rKQP3_8&j~ z{YN)%hCDW#*@^ssFeb()5&}$2Omu}p@eOnOKvl)3w{ESaDk_RKBZ>ZG5!%FP44(A) zVm*I-)YP;&xnMz2FJVan6A&U#Wn~Gc84SUd)b zD1s`b$YxMwiO2yg>M|ZRl+7|Q8cknxbaYlR47FGk)B3zTBP?6?B*bDOdZE*RmMqC7 z-x@3y8bX0PP`md%NcMSw36208_5&XYfG&Z(l@ksUV;x8_^o4!;EzCX-EzAgF1W{=+H3eCr5#e2GF!=%@5#d(5Do6-YhCC zG;ee`vg?*Ebr9LK@*_PkQz;ZS7vPAXK?iAIBO%bmgJ6t~11%$}chuKcQ6y`^!0Y`D7A<-Tn~59&lJ?AK#Qwm0T_OTpG6J+Tg#j^HvjISl;jqKO z$bf;1&7Y=7|H8n)y^Y1iMR4g-kH&(`oAPoeS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n(Js=P($Jq+7=b4uWdjvx>j_PiBk)9?c7FlYa58NdFv(`o10M$ zf{6Q10x)v5b%+Q)1Zs2hX{@g!DVOOew1Yt61IxO)Q40hQ%e$9jYWU!*vtm{PRSo5G znIuWPh~N->WdKHUATcr^L}hv)GB7YRATlvJG%`9cG9W83F)%QmgE8*_000McNliru z(+C?1G%kgGB#;0A010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00P!Y zL_t(|+NG0QNRwe0$N%5AZ<}*6CrX;B*z&~4q$KPj$Sgvt3%!c8NJ%AvMFb{y( z-guFQlpu;1sbQ!^5OffO$OD$bT$9Q}n>)DEx9vOad;44D6`E?? z&+kItNUu$diN(#$%>uIt2m}Jx3Ukfr?VoNTocs%ilgd$Vx`#apS#fn?F@!E_8#-(c zam;fH#YH6r<8MYUDp$Sq<^vV2stWs~_{fZak#uM)EyhStJjz6%44 z=y7+zlx2cqYSm_MTmhp}7k>9IB0`0s=z|26Lf# zFq9g~mWs9j9M94E!~{e|5dsr~tS2B^866eFpa_N97nN9-oQNe5#AHBHd{GooTL7PL z<6Ggr7jkzNU;8zrUK2>A|B1%T$AW5Bk=-;0SKS zXUmS?KKStY$;()BNm$l)S8buuMpCUNJ35FfsK3 zU#(vpgd#Oc^Sd3x)Y{sb=Jk576PcW6RE&w^IN}fb7kQo^k!87C$wF|q3Eoz}0oW2| U!~9yXvj6}907*qoM6N<$f~0znvj6}9 literal 0 HcmV?d00001 diff --git a/LiteEditor/res/locals_view.png b/LiteEditor/res/locals_view.png new file mode 100644 index 0000000000000000000000000000000000000000..279dd4df2aa6f976b6350e999510ac1f57d69ccc GIT binary patch literal 887 zcmV--1Bm>IP)WdKueAT%IKVQwHYFfcSAF*!OgI65>iAS*C2FfbHbcz*x@00(qQO+^RO z2nY)|H;GkE)c^nh32;bRa{vGf5&!@T5&_cPe*6Fc00d`2O+f$vv5yP_rKL<>7=>l-~6l8Ih7<$*U$@r{V`mbESb4lGpEelbZ$Fy=WM65)0v=1LPEXpUVOaI`+U#y@&Np2 z(RKp#^-Uf`QKZ4|M;a=YCJBoZZC zF0XQ$&BGr0-z^#y>_1Ybdxn9_ zVna%DI;*Cp`bs21g2xjJI3BL1;1AXbIy#2fT&}Pu9L85UD$-#uGfTf~X_qr3qS#M;+Y*iFO2lvD!zI2|NB5?BnnyS!Z1 zw)JM~3NS3}v)NqKGC}RqAU!pc6Pg%}EdLU~8eqZ6ke+~3QuFfi=(C^4Y0K}Qf&bG>Sa>%S;qT&-$4f~@^89$Awj`NzF z7T?m+HbGTY%WOqOOMmoTQgXGhtn4IjV@{q+x^T0z`{%`G&GzMgso$PyK$)COlvn@& N002ovPDHLkV1j!CiKhSn literal 0 HcmV?d00001 diff --git a/LiteEditor/res/magic-wand.png b/LiteEditor/res/magic-wand.png new file mode 100644 index 0000000000000000000000000000000000000000..a3f1773fece8bde27a989189f3a268f8e7ac1cca GIT binary patch literal 742 zcmVWdKcSATc)}L}hv)GB7YRATlsIF)=zZG$1Q5F)%PU!+@&*000McNliru z(+CU>FC}qa@pu3L010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00KTq zL_t(|+GAj#5HMmBe71&xTPlR%D~Nr0I)mIN27yhFZhz>O5@q1FuVk2o*TgGx7to zearmm&+8ZMK&k&vFTVHwZ+mu{TISOzDPiIFI*}E97GD_Wpco(`E7Z=-!^&`X=aRn+ z3Ly+nuRmC7Qp~Vq)0W+=+`(6arNJ>gFJbd`@KM)^cW@ffeOo-c#)n)+!0bVUFt);H6uKzeWIYChc!vBDHQ)6SJ zCf)>e?%cTqpyoR!CMGbA|GBuh9*c^K1`$lpCr_U22O0pf=`Tnl3k%C15fPDzKsGNy z%^WdKueATl^0L}hv)GB7YRATc>QGc`IfIUp-AF)%PtqQi6m000McNliru z(*hU(1reasJca-O010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00fyy zL_t(|+O<@BOjBnRKYc$&p+HMpsGU;f(aHuApaYC%&KM~nZhy=zOPnm3n_I+)+cepX zn#CE|P#&TIhZr{uk2zwfkYNyoFb7sU6J^4X2_?3r4_bOlAGht@cbl*=dAT`Ha_;v! z-|u(6^ExJT!najAIHu;Ynq6|}bV?OEt} zkc>HUq#-Xx8vfEsbVEM_Fy;d&Dm|Kgq2#!>uy9{ief>$>qAzf{t>;rVDm0w9=m|-p zv?cHL3|gXu2M)V+?QEde=em%XAYotWz61IIz;N$PqPhIUxY=YFFdA(BnwnD!R)a=< zHg0&sMU9FoNPjJrl93{#2vC+dlL3Pd_3KuO)+kd`Rc?atSLkm4*3^5ob2=jQc;o``p}7o6 z-Beje=xz;cX>6>$T2P?o5k&ZKjF9hqIW=hn$5|E}7bT>oznEb(n*2KLT|GfCRF#$c zEq`gScW*gAoX?PpSpY^4z#kZZhX8O74MWurE%ryFqqTIJu#b%0x>fyw2gik(Sy^Hx zleuQnYK8vmLlCFh26Tg++0mxC(bQaR`G?4MyX~`spYIep(ENeX4HO;+o){5KbRB48gz*Ogqh!^SUS^0#-MC ze;K=ff9STuY#h&3Z+U0Kt~aSZKR&K$sdCN+Tg;ZC^xRyE+vfwEARtJJj|V`OC zH$*~e0VsR(5{t#$si`T{ZFV5XNYoX%n>Pn#ayfO%W((;0`Z@zR zzUM|y&%-A%7A;XyQc@u*OHE{CB*S1Zguoprb3}ll^-&*=*NQ|UA&bSbUF+_iS`25w z7sSWMALQ|P$BR0?gX7qCtLjla^ACo^MpcSXF@_kC~H(2GV6ZiY0nBAGA@@} zA(zWTStDUd!9IegXyJcjc{Cbr0*x1uOa4#b=Wc%jnzrSr?%xYL00000NkvXXu0mjf D#^+>f literal 0 HcmV?d00001 diff --git a/LiteEditor/res/media_stop.png b/LiteEditor/res/media_stop.png new file mode 100644 index 0000000000000000000000000000000000000000..f522eab07c8b42a6b34e26f5eccb6e542ac709f9 GIT binary patch literal 705 zcmV;y0zUnTP)WdKcYATl%{MrC3kGB7YRATc*OG&MRjIUp-AF)%PD++897000McNliru z)CUI$9s$SMPQd^G010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00J3F zL_t(|+Kp1XZWBQiJ@eRIN8m&dDGgsh2Nj>eXYc{grlCNJ=tVE%V zWEcAHn|COvK$|NC!bL+Hj{a(vsa6p&lP<`Z>q(LV)3X4R!E1}a5(OLKt#lIqy}558 zS-VVNxv-X-8Nmk1rL%XF{GEcng|w+Nn`#SF2r{4e>dHbtNxEpjv#e)9*^HH8hZPY8 zUw@G7lN6z^zkx`{Qmut{VQW$D?%^H|y~Uc@s|`z9X-vIp`=%Xw7p{_KPNBY3P>#Qi zUW~%iELXYn()N5{S<_FFl|ph^IhCeX|{gY00000NkvXXu0mjf@$NF= literal 0 HcmV?d00001 diff --git a/LiteEditor/res/member_private.png b/LiteEditor/res/member_private.png new file mode 100644 index 0000000000000000000000000000000000000000..ad3472e9baa8e3f593f7a3cce3ee38f7eb6d523c GIT binary patch literal 618 zcmV-w0+s!VP)-q(zT1&dtdIU3lRWtgAb2o&~4cXuj?`Agw;$cm z3O>Fp;mhu4JX~7kngQn=oksu6AeDE%Lu3RN7O$eTxr0WnsU)Yt1dD>mg+RaM=%5kl zVEJReRQ9JgQk3%Vgy6y1GeV&aEEjgm#o$D(;WSbPj+;MFsUP72&*Jd-D^7Y%+Ro|o}I+f{d+k2b%5gP3dSc!;W&;jJIaEhGgrKO z*vPm!n1dm7Yzt}21gET$=|Y$R0D0*mBKhX|2c5EKuO4In?ax@{#Dfyf~;1nXQuGmR!hGlWu*EjeC+M76o)8Luc4f%Q5Z|G zKBXio<#Rht^~k9vQpJL_Pe{fjoCi>;ROnyr{6~NR0KjIoY|f;7-~a#s07*qoM6N<$ Ef|(>7mcRMrdU2?^#iBax?O@x>zn8HFEkto)Jk3c{W(JF<1hgGU*VF)5A#md6s zY=hbuA$kzRJ>e1wcW{@z*FMJChqJdK!NOVQz4QIP@An`nCH|)w!Lau59ReHzQgAeU zK=CY--Gi66B7m%6fajQ;m@c9)o=3iDf|*9jlGAfxH+yK+ZPd3Ka?o)|GhmGM=Wb7- zSRU06B54$xq>#<=asjvqoIZa7pVq5=bs-`EZt&5u9C~dhWp(xG8%$lE#Fe|3w1T(K zD){j6J?_jea?OBqj&5^ssFSK2KOu4g7p|Q{<<$n7^_G&H1rscBA{PRKwx^v&q@5ME z%}O=wLCa7kyc2>)`(O|X&9!|vZ6EHwn&WO{4D7Ui!D?*d7|-L|&KKn4CU?`I|Se{d)@wi}x`;aT1>Ag|d?W@I?7|48@->h{ zl%N}orC1+OlBDvHm8NRsKoO~AK{g~Lha?;YU|AOZtDOG`FaUs5yVMbmuv!2B002ov JPDHLkV1g5o7f1jA literal 0 HcmV?d00001 diff --git a/LiteEditor/res/member_public.png b/LiteEditor/res/member_public.png new file mode 100644 index 0000000000000000000000000000000000000000..f445ab6969adb6b4c2e3054de5528b98be7b763b GIT binary patch literal 582 zcmV-M0=fN(P)PvoJZH`~^Ucg5r4$|`ESx?benp5wKn9M|7nH2Z zo(_&*#Q=H6APQW~t&~xkEuvU?UO&A3jHQi5Z0qP U${9M48vpb7#@a>@M6?kbYa8u+1}#KQk-}#PB1TcL zkdSC%a%RWd-Mihp#6rlx?CuP^-+c44NJKD-FtOYnPXGuU^jEd}HmV&40w@y!5sEwS z3LxpP%*j$VUw~9@9^A|{B<)P>UBB0aZu1q|A2n#yE97+=s2L;~r@7)Dj7=^@BJp@+ zOh9^S(I-%b-0TWG+-ys(5`ZxRcYFqZ+He2L+s)>IS!8NpIRxJ4qjZ$Y8*;zBItz-S ze5(rp2Pfyc2+UFp6B5AY(EomxDnwi^l{aHPSqEvqNVOe`0Qd&)K1q$r;qHFS7v2$S zIozaR`v&#uf94zYlV{E$0~V&hzpAm0U!JC5ZL0%tbZr>4s%kt)yonW&4@DNBgJQc} z4-+B8Q&4_106xXag$;%Eo*7%wIt)fN_yQ>YLhIf#>@nz@YFMGit*`%Kl zg>T7#;ZSLXGdjxhviwTnKhhP&D5@rf2$2*t<807*qoM6N<$ Ef+IH95C8xG literal 0 HcmV?d00001 diff --git a/LiteEditor/res/new_class.png b/LiteEditor/res/new_class.png new file mode 100644 index 0000000000000000000000000000000000000000..67bb4ede45ced35673393fdec4b0b8c63c1a850f GIT binary patch literal 7960 zcmai(by!p3+s6+fjf5gyGL(`|rMsjNkd_<`qg%R57&SoYmXOgQD9sQl>2B##@*VzO ze%Jfodv}om|0=4!|R9dIqG9bEiu=I(fN(t*l*va)QB^NcG`A)y2Z}E|ks{Y;OVZ zofBXqk6_;&(R8$Q^)Pj@01TaO@4|8a4GxBw*_k3kU4Z(IFY!nj>rU1&b#VYYSOFcB z>)}WZ^FN<=b1}03PH%&E?!%-U?d>fbT!FJeXggBFxC_$)yV_X*#d|-WBVhmv(h^#p zu-z=LG_CRUg9S)^X=UZMUqPnPFADV78W|J`>4=?UA+u$Wb7TE4;W&i16ut{b0rC9h%VBp7R+#L(mp&Yq-{?Ra3S@ zkA0%Nn;f%Vp10O-E%;rEY-B%;z@mti%_FBLqxAsp_WnNlF)?Ayn~@j-hs)-T#DKok z@lnKDf<9GLj9BwBVB6c@g)3Ow+VWBiJ&@^-KXLyjHGcf_n*p4;*=)y)3`hS2`M+`U zlKT32Bi6FS)6>Xv@FZ1~jT~F21fF%3?$et` zP1tp#?Cq-=@eEC)KOpkR(|%X_xwFu4N;)%d82juq^{Y?0x$yk_r&I|32o!NZJ;HW1-1IR#~67I2FR<#s59qo&JGm&z^VNp4>yQxFCa(!E!XE@}> zwT!qR?xy~FypP?=tL)!m&=)FzoahBplNA)nintxy=($A16HJR;P8kUnN?bT z%->{B_Q+-tACI=lGymgV0Y9^eF?}r``o!qW_vYI7ERt2~{=x6{^jkT$UGUv1l{xO2 zP@zfDByoO+QH_;`K?Y!;NCwi$1IZoe7gUCE?3k(Vg3M+~9k^-S{rrFbTJnIm@D*Ha z`#AW(a33EfD-qHE#!GFu8+J(MTd5B1!uZ*YkN^jnzKa65{3kF2f}`-GjFKMa^{ub; zpi9P_-0ST1q)KVSQ?asd=sh5Mw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z>4nauWQ~xG2k)jb$19CYjEC5yxrnrOBUgb25cl~P)Oqsq4{eo&@3@X3R?%k)6HUjM2)ld5y=b~L@C!Sp z{I<=LzUfoUegIm)nVROqQ${h?i1LAT{P*66YPuSnX*yco=?>NS9K;DqEL z36cX{;Mp)iRoj#^vg{iHL@+Z>Wx^Q7Zk`tN$kLz*23du=!w?zj$~ta!Rm_OvExg&d z3m$VqOCVtMiuidE`Sxh=eSqWTAh=GApIlw4+!4LvY{P45X~!j}oY9{TBC3Sh7X+a1PK z_d`?w_RzKE%2uu`gUnA_%O}*J0;M1&07*qoM6N<$f*4=@0ssI2 literal 0 HcmV?d00001 diff --git a/LiteEditor/res/open_resource.png b/LiteEditor/res/open_resource.png new file mode 100644 index 0000000000000000000000000000000000000000..bfb7ffadb9e848204d52386fbc8cdd6d9fc97418 GIT binary patch literal 1060 zcmV+<1l#+GP)Q@-V6x7^ik+zkv{YfXniPsFI4D5 zeRiX5MX`buRPZU%+A8#iG5$){tl8b!nLGEKKFrQ!H@l6cJ#c65%)R$~&-a|~xvWuD z{;QohaUu&8t+hpC%qv?523{}ruH9YSGWEkP(efsei*%vuEefspvK@e>9eScl8 zR$H&C!`rrP+qGlIj-97YeX?=GhQ2ieeXDybVNanPf;By?DHwjbeq$D3MS#J`9$>OXs7726YEL z`7DAVbPzdk60ffa(BI#mdQ6UEzdj~?O#tcyp?K#7{iR;+=D{Nq~WTsl``$DWB9ItNkI0#GWIx`ui3Ni$ z=n!#a3^XET!FQbi6XWB!AY^M_Pa1X1z~FgaJWo=SFaRPa1feDAtY>w>54r%9rl$Dd z$otHcgQbrxsR9^U#y~`{))87E<3YnJb5)CzE-4xx8^ihy2G->}7#Ly}iQHm2MnpEm ziejB00*|W^p_NqPZH+c{{yeJ6>@&-QWRyc@<^%4R1OA-z)4kSO{2*l4_AT7Kdyn;n z3=bh9Nl|Iq`W~wJg*v9uT28 zC!GLOQ&Su{e3(bim%7v>&!(7$Hs|7l*({#tADmF$Q#bkyVxR7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!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0005pNklxAb}DIiSgL6jqRSU%7U?DlI$p{)cqIr>-Vo}F*9Bh{_ExC z58!=j6W%%8i_DNLLqy0#0KvJ8loBZ=7R%*NFCu(8Jfz?6^S7D}-aXBXr>7@E2z)s| z$BPK6%Guc&7Z(@QbxoFK0Hl;qRZ>cb2z6a^eSM9pvRp2opCBRtTwPspe0lKvlWByW{@;{vU;2I&g4sz{$x8y@Zf|dy&*%R)kxs#AG@>j^ zM1-O!@ZQrj4G#|wgb>K{oRktV#;yEk1tOGXiF1xT&vDM7sx(bQjFI7Rxbn>|rgVvNKXnayT@OiXQ(&!?y4c~0AQb5DuX6{+gZ zJz)mx^_u$ek#RE?KblVVG2ZyxnT|1Wd3XRO?LNx zGMNMsdDBhD0n()cDk2fHRn_mWHZ}6v@BDiJ4KXZ><>kM700000NkvXXu0mjf(W4Ve literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_close.png b/LiteEditor/res/page_close.png new file mode 100644 index 0000000000000000000000000000000000000000..571eeea16ab19bb0575852c9bbe1fe4dcf21c739 GIT binary patch literal 2975 zcmV;Q3t;q#P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fkn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j=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}0002GNkl}#+c`)&NW zwqa8z9SCZzoO1x+oYz`AI(Eo86Ba@UAqeN3#|~tjQfe%XlqLc8K~>MZ^s?|3!HP4-{~iq|9{JI9Pp;T0|3mQ Vm^4dGqfh_<002ovPDHLkV1iXygmwS` literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_error.png b/LiteEditor/res/page_error.png new file mode 100644 index 0000000000000000000000000000000000000000..17019b1791b42170264c0c37c9b28f222f8dcc8d GIT binary patch literal 475 zcmV<10VMv3P)1uahhU_pOn^j+S}`HYzyho=urfv>TZc|%LG9n@#>l{w&?w))7-klN=(&_XiAyP^OYX3cvNW=jm03t#% znd}XNyjCWY$@{f_-RXJqE>I#-V7_|8UIF z?!w!E+v_reN57yFg$me{D>!3wa0k>ipI5&%0RkZw57Wf&0Pewq==xNn!vbm^u`4K@ zX9K4*0O%c_X76wj(<8#CVvT0C%pjFY<--Q~^~>w*>k%ldm{Gfs RG)4db002ovPDHLkV1gZe*8Tth literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_find.png b/LiteEditor/res/page_find.png new file mode 100644 index 0000000000000000000000000000000000000000..e6a81a4a7611539307bf39a8336d84922b20dab4 GIT binary patch literal 3562 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|c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 HcmV?d00001 diff --git a/LiteEditor/res/page_green.png b/LiteEditor/res/page_green.png new file mode 100644 index 0000000000000000000000000000000000000000..648171b27483af6a85c7ec17f039736cca8f6b82 GIT binary patch literal 639 zcmV-_0)YLAP)yCX-P;G)CK8tJP#i4rB-X920pr zO;fo@2t?zAd_JEzGl{`x7Ex|9sRzOiAyEPc)$4U-n~Cfo9vPpx#6$ZCCe|m{#kDXK zQy887@J`=}oY3d-f^xl@5(i(8P} z%r%sIb`WQZv;MR;@Wp-sv%53+$N7sp7rQvQoyD!jwv1uUEeD*X*=*iS;CcWC8sG~b zKAx?@nfn`FJzjw~Q?F%Qf)_auqjh(@4!%G9AT#Ioo@1laknh5qam>@b{GQnklY6`m zyGf_g@a^SSSe{sfPqV8qJwDCT;8>SJ|_-p``nS-WdKcYATc!{L3L*!GB7YTATcpIGch_bG$1Q5F)%RM{uz1z000McNliru z(*^_#BP&Bw(USlG010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00II@ zL_t(|+O3k$YZE~f$3L4*ni|p-K}?{w62xD4Q7J@(LZJnF^P1@w1r{$wcd=>e0au&tTUoTA^VG;5|vhoSTwL7?X?my84dRt4rWurBuX+Qshb^0KbhvZ>Ga9pki z%3zu(ak+Kv9Ih9LfX&?9M=C84(AXH8p!9SZuRKclZG-0PB5RYoSzTPm4Wx*H&I98o zhY9?^NDF*q{ax-bhxQyHtFg!SldD!3IB<+gu8&ai1xgWw+Dg&s0K@_!r)D;HNR=je z|K>BwGx5v<-(P)2sPQCFTV-SzKQ-JFo)F0JJn6Uef6K^=0QioZ`ctAHLlJgQJzdas z47*oC8)5fOjh*Zxhd&8g?Tn5ei)csP{`lST`!!7{`=0o&fNFnrRRR^`DqSEQnTflg zMZ>=l*exfrBPWLFil(3B%hD2sZC%hKmxIeQ_fiF-BcR$x6=lzwS^nGj4gIqDw=pOE QPyhe`07*qoM6N<$f{afrKmY&$ literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_open.png b/LiteEditor/res/page_open.png new file mode 100644 index 0000000000000000000000000000000000000000..784e8fa48234f4f64b6922a6758f254ee0ca08ec GIT binary patch literal 537 zcmV+!0_OdRP)x(K@^6+>g^d@v4;gkbWsEoXE%32*i1tcpTNXd5CcIl)ECgqz|2rE6EW}s7R?kl za1q`0GCkMruC6-2LANtwVlsgzsp4?{@7$`KBv!G66>Vie3h?3OmEEkjwdLG0PgLVi z`!N((f$A@n17Ldj#`};0I3@iHJ5M{#IZz|UIYRm4(!uV7eYIYIwQf&}_2J~}>pQ^n z6o8--^T(=hkBNQ_k{-_GWE;FMW7!p}f{NG3nHZ{D5<3d8&tLh%a4AqqnjMkr3m&fkMdECD3N5}Unig5wy40;>lo4j~k+e}v)` zR6)J8Mk*u=SpB`p6o)7j?S0T@9?bz#m@l>gc*zk__|*!FMcHwP!gwLJvS~9c0px8E zWdJqqugp&5yTRy_S>Q5+w2hY9tP>LtTlZO(Ks*orIjWH(M znQeASRN8^ZX0!9&yq(=;oO57|-2*@wp~K&?LO94t)E^SScsv{qo8$2qBls!eIObs( z@@}{Lin$L6jd+5a3Oo^cx7+a`2o$#4E%$w&d!8qRT-W8jUN0v?!BPQHC5j?35~RR- zy%sL^`#q;3{eEAFi0!8W77BbMNdlwM2v9@;iGXWh+je%#U>L?T4xfhX1vU~iO@mge zr4mVy1PJIv&5OmN>Y;Jk=E-CtDpDdjpl?Z}(XuS%A}5d@Cp4SQ+?+@Rnv;lhdnQ0X zDQP;LD%(UP2lB|+a0s`9fylKBg}b*P$UC5@*Xub!Ig*&~IPg6li}f4Et}gaqHk+yH z5;PY=o+pkBbRFKq(7m{YYPG7qv(6|&6#61ksRS#>iOw7laj{saX3>}x;>qt5FtG?= zKTZWGlaWklKgMX=W+V9;YWZ00E23fOYr}|jQ{`u07*qoM6N<$f^0|gCIA2c literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_save.png b/LiteEditor/res/page_save.png new file mode 100644 index 0000000000000000000000000000000000000000..7e32fc7fee0c7a8cb54673cfd907f204b90e7f4d GIT binary patch literal 970 zcmV;*12z1KP)SV>Q47W7wx5P-Flt#-LKB~9XWgU`K?(!`{~&6r_Me1 z?3r@)>XjCP2-X@YW$xYoW9NtOe>})JefP_)8y^73i4(iq2tOa4K5_QRV@J7p^Tv9a zm&T<_FSE1z97i@c`R41-1z=?1j8f*MORw}-c|-taikmF~AVh$>6F}Q3Ze{Hngk*@o%&--J2!j3v0YwcrUz>qs9T*$} z2!QCR1wq>tOuO|NAPWYnx(pCVIHo;nDT=$TFH9Z0(lZF?iejp313-oV zH^Xd+0YF5cYCzBx#s3F@q}Fg_RcfZZ6T$EnUj)`QbHsR zYoE-cm$7@lj&jD`IljG%2$+?}f01hcu&Or5IWs%>i!7O(G9Zsyz?@t_7BDyRXp2y% z>ssLfG`*>P++T?^6op=xN_xHHYO8@psFf1Cly`SA=0DdoVkAeI$wVEE!t=g zph`8FEY*O%L1}qJOHH|a`7*cf?D5H`pAjCs_2yOHfA4MTx>*3El-NCWYM>-xGzAR^SW8Z8Aa1vA6lS8FgYa4CxPZb!8+ zo6V@}dN5#6N}=ltP17v;RL+^M>nNqyzPl|%v819P1_r|1bcIq1ZQD{xAtLD7mb#wN zw%sDQSDWExsFnpQcV7bVAR@vB_eFrI(ae*(wyn>(N8hTwbQdpN7{7S&qP+3?YXre~G-f;=tptk*_wL{4;NXDSY(~xr_aLQ5 zrW7CnXEruAzL-olM{V1jo=&H~pM3h{shqN;ltg;j$dFWqBFDVgckljIMFbHZ5fNr~ zt7)2RynSefFmiTsfbKPWD0Bo6_AI|4QL~x7Lgiw7~v1i{J_i}R8`eI s1~BY05B@kj^T2k_KL8(q^gky50KLPg7AnEhqW}N^07*qoM6N<$f<{9 literal 0 HcmV?d00001 diff --git a/LiteEditor/res/page_white_c.png b/LiteEditor/res/page_white_c.png new file mode 100644 index 0000000000000000000000000000000000000000..34a05cccf064b35701b61ba1d395048873d7b48e GIT binary patch literal 587 zcmV-R0<`^!P)~7 zMNw2LQirB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{@d7Nl&d$#+7-TckP&Q}N91e-C#5QQ<|d}62BjvZR2H60wE-%6;pyTSA|c6o&@eC9QG)Hj&ExYL zO&oVL^)+cM^qd@ApywS>pwx0H@RDN}hq;7mU-SKczYQ-hnrr=;iDAQMZQ+*g=YOM= z!QlMQEn7FbaD->uKAYgo_j9)W&$$zS*W9}m(ey0q$&7l-XEWO0Y(9M=SnhLbwy;d>@~SY$Ku*0xPvIOQeV1x7u_z-2-X>_74(yfh7C znXL|3GZ+d2`3re2hs?MK_a&qd(zT!hvmh*svfo-sJAdvy=kze6yXK5~;V>_A@8|bD-*djs%xHE_ z{(frD$&)A6m}(V3%}ZK6+xNyhpB0;4Xm!l2X$|c9@;6nr>9ygN=Qp?df2&FXK71j& zereBh+r4u+m7u0V+k)Q0#Q3OQD~)=9xgCYDVnJ@p?yb*mx>mZ8Hyqw)vXkY1_I|N< zWLql%&dk`{SNLJu_OD+a`?ttoDZ|>gwqmCEOpf8Htv*gjmRD3%jR`F55 zBz2GhS_9OK7$T~QRmX5r)}Ff5ycyM zEpmS|s1#Vc^B~_HzldSbVzF);i0J?kA*ivcV}vC`2S^G9B;QW)N}&4WdS2Xd zfHR#>Q5hY<^lsbR)Z}`LqC`w#!^~fiGseNC?-NY<aW0PnVXgpx`F5PkdAD*`WB6X8h6{N;+bv8ro592!v zq+W;^S}NCHy_@$ay!~Z-6y3xh+@QbMWx@U5QWHjj451jk=<1?x>1e zb>9k_nY`=?el#kFfE+ZE(t!jfu7~kg^M#qK62g4}^7%Yznofo7y)LckTexig(*E}{ rUcx@)00000NkvXXu0mjfr859L literal 0 HcmV?d00001 diff --git a/LiteEditor/res/pictures.png b/LiteEditor/res/pictures.png new file mode 100644 index 0000000000000000000000000000000000000000..d9591c13f67cac8e13632e1c841f7debd1417a5e GIT binary patch literal 704 zcmV;x0zdtUP)W^i!ifsTc(=K1_V3&M#zHR|lg@#Gff=58Uzib9<$t0J;KqX&BUR5k)rz$& zB8cFtCF~4|SkfeZK0aC--x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#IY#uB+4zcQLVj&G37fp4!Cvu6VffKx1xt&ybfOKw{NA5eo=C*1& zYfjNSR^+O?8dLN6O2szruW{M1>cI`?Qs=t*FD|^w2#A9rxT8b(;aDZnbz7*rtrc~0 z5MAcbq)W`7B{^Tu!|hwywfi{DYJzM*BdCDwCV6?_bF_LRtV#$(JdUA6DJc(g?EKT0 zj&EC7BMyY2xs28Aty;eluOhPU%QUsN5IFxPGB<{(T1hAzq~K2Tv(0H@O^wt=bzC=y zN&v-4lTI7Ra0#Bw5e&|9dg3xK^rYZCLhO&gZDpWpL_1fhLt40|POiR}=C&3}rq1GI zCUHtv5Q#OCD>yvc^*6$8D&>_ya#je-(<#~}Hk0W3Ed5u@c<%HpXuz8Ybz=Z3BA}_* zUdlgO(d29@(XGa@tdG*Zj?&fyN>n3P8X(pbXYI8nPJ6?Is*7MGDX3!zBSmGXz~FoB zyx6mVQR?BQ{UQG%ubs;P~T5+g#07*)K~=ke$F`lyJx6i0X_HNZmzfWqQQeOLk% zAy5?v2zexFI`6hNSN~~xpr2DG-==lfF*?f1nG@GhnPZ+Yy3hTZi>vs)8fDi&r0Yl-$==jVXjn!>TM92B*`+G51O@b{*znVk+M;RAMR_d_O&({=< zBjQFnE}sWCjUWJ32nNK6SqHr@JKVJU|^Oghi00000NkvXXu0mjftLGW= literal 0 HcmV?d00001 diff --git a/LiteEditor/res/plugin_add.png b/LiteEditor/res/plugin_add.png new file mode 100644 index 0000000000000000000000000000000000000000..ae43690ecefe7952ef9b0a410614d014299bd3c0 GIT binary patch literal 691 zcmV;k0!;mhP)!C{kgV#7nZ!}+IFwq-SXfjo|dBU;$2A*R+N`fo=|&GUYL?n@~UJ} zRwmI}jPAB8^01Y3C+^Ijd+pCXe>~g?4Jqg4)T#41=X}pOfxGiRR{6W&>CB0&nI=@t zRrSu<^!c5C0)&<(_cUQ7TI*VgHN*l@P5-TfC4f_@-VY11P%L?g;zAJ-8T%U`aCgp( zo^&%s)zGr{_QtkAOc?cV zQv@Ya7h%t}T`nSsD7Oy`1i{aDaBT3P$D8A1r!%M-=8CwXt~6AISyR6jGsiIoM;>tZ z&|vV(9f&CEifGyEVzQcIGxNN8`GVQmBE|UvZp9xX9KCnIMU)jaD^N2^UMg#1ikMNI zccRNH*tm5QYno!*e}0qU>_gJsE$2etD<@XAvnsrb$ z6AdYytGA&+iFC(ifFqRvB@qNA^X?fNqMb~-l0^}rXPZ}>v4 Z=Nr{rY9&UI$M^sM002ovPDHLkV1hoZLv;WE literal 0 HcmV?d00001 diff --git a/LiteEditor/res/previous.png b/LiteEditor/res/previous.png new file mode 100644 index 0000000000000000000000000000000000000000..78dcc7011a22ae26734ef1f580c91e52c2ec55c8 GIT binary patch literal 1055 zcmV+)1mOFLP)TjcoMb5d~nuh0)Yrbz&L6G3EZ8Wgu5dhz8~T= z=I6$O0qpmiH#-h-$t%Fle>fY%O76- z)M#0yg*V?j zzqz%sLie#KYNt+-Q$@x)al3PI6(1zy&idBY8)xV~ z>JxG%A?j}A+){_NchCO%aI4xR+O!?`HXtDWmGqstz7Num(YRltoucU&;W;m#du#Ra z*773VM>~YJO#z}AKRq{?U0R%6h>O)&Nqogzi)5dbV88A^{o$|8odSeh>ucvv|Ndnd8kPm%j7C?uGgD(>xNWB1Q(N<<#I@fUq)_z({I z!-5WaCB|f?+Cogkpdto}I1#9vPmA5&-5H7fO2otJ(hjYQB$_Ec#16xc46tA!5HKSY z0h1_9;PCZ8VdCUeycIjfUgZquTWyCeO%-gMDX5d9JYJ=$*6G@rPuZud}HH0Mi3ym-Kkuk z%$A0J3CQ9J5s@P4)Ep*1G#ultIPPKy$#8qpY;LB<=i57_4sZ8CSYkq(yu6hE7hnhx zurtsX@nZO9Li){y4bhsyGHg9h5cC13;+j&on)V3bFM;Sw32!v6v^jyNi{jX8VC Z{sa7iJORC0X666@002ovPDHLkV1nQS0iFN= literal 0 HcmV?d00001 diff --git a/LiteEditor/res/puzzle.jpg b/LiteEditor/res/puzzle.jpg new file mode 100644 index 0000000000000000000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I`he0Tpm4*4=-2Ol4`M1jd=YyDMbN>h3 CJ#EJT literal 0 HcmV?d00001 diff --git a/LiteEditor/res/puzzle.png b/LiteEditor/res/puzzle.png new file mode 100644 index 0000000000000000000000000000000000000000..f88b4289e9df8db0d7c132cd921c27a4bc75ef7f GIT binary patch literal 62919 zcmbrlRZv{f)`i=+ySp{+4#C|uxVu|$2(FE5aCdhJ4k5S%cX!tS!7t}O#d*39x9UE0 z?Omg1uigFCST@(}2xUbnBzSyy004j_BQ37_alHWmz;0l{Kkf{CA*DVpa8A)Ay?#EMlJ~Zh6gsEA(+L;5&E@r4dKmcUKMbtdA z&bo9P2{qlR?yH+UEY!0R9Dtdv7sn3kmJFc+H=cwT+c-TuqT4v{;yuqOOUOc2gs}Pn06kDeX0S~&8Z z@>TV_XFkD^gyla$(R}IY=@W;y^EPgNeu54@Conn9`r>}4WF*)9{f#wMerW$O#s9Im z%qam5`3@dBmM&t1Q$A)7Z6oilZtnf#ejtg<%`5?{(_^|^@8EvRUs&OoXteS!x-{O^ zUi3)LXz2I*zWH#&!C(LW4-M_x!|Qz}y6@gTcbuW@<3S(ToQ@;$VMJzdbS~kD?=7Lh zoWdRmqF(_mYExv{bK#qV!@HvSuJ&-N!#e)mF-WU+@jrJxyJaDr>Hicd&6quUUW1=o zmF)b3N_M|FT-^S?&h;it++5o}xRy{S5%l?~#V|+-47ldH_G#P$i47?1Z&Q^%R6QZ> zuNZth;QC>+Ve@SwW;4RNMqFHcFDrFy|M>VgVOGkAI!AWuHRv*e(nvh|c{3t!mid!~ znuixe;pi3P&|}K^Zr{*u+z^^NQ5f0b*~M-RH{}bORA($t4MH4`Frl^YZ?GNdQwn5M zDIJn;0X#ELAc)@y3sQunu}y+Ifc)p)9!oEZIG&y6ewF{XfNw>2XfPm(>i-XI{r?Ch z7n*K_V6N03yj8D%rxK;h+Z6)?lTO<{op3S`>f9UqW;DFnHHJc9QIY`(*`KbaJplDF zaQxR768p`Ef6;m<3|OoEJyhmw=nGK6@V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fUMgvo%%e>MAs#p}m^UVWxk4y>=m(<;p}ToU6fL~)e$ zM*aTTlP8|pjyCAr+hucQldcSC|Fq%Of6x&CvDVW1PH{EuGuNwy=nHV+{F6LUZd0FY z(QGzpa*Q@@Y8=BuGa_V*d#v#>d%HUnw-;Vk7>+e2qNA?{6 zlRudQ1FEL5dq+d&e>RKu0kJsEes6NP6r6QMucfIrtBjUMy!VUi=ZY`qZ=L(*BC-=q zDj7AY0o71P0@h#K!Zb9xq!3R)GZ_ZR(4})l>>bN{uU|ja_;&FY;tsrs`n0XfKBRgC zWC;I$%6tc)z_}Q-28s&{li-yXcG{bSfz5)5I^zotj9-R-A1=S zau0TjmL0jG-a7uH%B7=DFTq?u6h@#Xz20RGLMC;PO=425R>6Xe9a-Wyaj8hUXCZWC ziN!^ZY+%Vo7T0$~os4<^F=WR_iJQK$<=~;=%;IUvwK7&YoB=$C0OIpMFZ%zM{{XcY VH%O>aM%VxV002ovPDHLkV1nH$qx1j( literal 0 HcmV?d00001 diff --git a/LiteEditor/res/refresh.png b/LiteEditor/res/refresh.png new file mode 100644 index 0000000000000000000000000000000000000000..be0e7705276c763c229a72ade12ff3f43889f832 GIT binary patch literal 1387 zcmV-x1(f=UP)H`uyfIt;OBqT(2iJ)o#wc(*6YK)>57sqN#s9mq^#NJ(>-LrcxbKxQ2M38`#e9~xM zzM0>Q=9?LeG2CqX?593)UF6mP)u1)|29txX{ljm5{pgOTOAiA~e0NlAeX3Ug2xANf_T2XQU3X4A zAi@=q_l3zhhKy_Q9fNCWY=JG%mN6Qo42d*^kxWN#|Kyjpmy27YC?ez7oSUntL+}3a zYnAEv#J?Be0QBX}mmj-(>d;W9i_{U8Be9(n>=Z10Wur!cY(W&F+cE8yqSdHUzw{3p zjg;juWyr!loY{JG;;Uux&at)Qn?Q#hiC|$COSchjLN=e``w6}$5ncy4g)4}PAzDX- zYj|Ouv>D?z4I)sqYKlrj(TA}g2};NA`eM(>*;m$&H~Vo-9kRZpZA#NfvuY>bkq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;QLZP?s+K z%HDnZcs7~DFv0V4d5Ps9>tkC$@bU3aBCovsYVU!A2j3hW8|RUDoR+p$%&>{?mG-<) zfv_PVf6z{x_|$$lzWe?91NH9=TsS|ob7!^R+?v3$EPU5Ti`-XiwAldo=)>bx3i-0G z?#Z`O1F7-Tr@#BEp`jtL!!|(>6n&Jok97rIN1i)0fAhxo&T97cz8}us_~P@=-n)K% z`b?~9hZXq2+Ohu+k)NW`(b4!{i;EpiiNwnJ3qQU+Gdpu;&z`+c$6`@48jY5D(MqGL zs)}&fjshqV!8FafkYzoTbKQ#~B9TaBS9^Q=YldNjHrrJ>EYmb*XJ>!UWHRSese4>0 kWvut;{(mdh3ikp21rQm6Sy>v8hyVZp07*qoM6N<$f>nptA^-pY literal 0 HcmV?d00001 diff --git a/LiteEditor/res/stop.png b/LiteEditor/res/stop.png new file mode 100644 index 0000000000000000000000000000000000000000..5919bbfdb965e903a44a0bc714241202e65944dc GIT binary patch literal 1581 zcmV+|2GaS7P)`Jv*GplcYNvz51^{Q(D_Nhp$qoeZ+OIP=;%ii+Q zo>)lF>W&M5XIYrV;-&l>r(Zq$((sd$Qx^_=McnfL4S2FK*MIY;`nPxX_Vj3(49shV zd;yBnpcLpD=sFk%ex<_b%fqLRKmUjC-fhl2bzQ(v$C9tz`nlU5Ol6u4DkgY7gba`X z0s(c!D1ZnU1|;LmynT_wPY?ZYZQ=apYXT1Cy6)@$^d}xlDut9Q?_{C0%fU+hyHnR8 z9tW!it^TCXP@7?el~yqdjO9{8&}_c>qnlOr;JdoQpQk<@wpN+Ku;`+5sh%w zs|iTR;Gbd;t&~_C4dW_BIFVqiUSsIx;XChfs=s*$uw6x?w=7&ET z-;w$yM1%n&b=QTZH^@|`U0%(!$+5@ec@iU^1ZzmBGdCL3~cRK?^4H2G^^zxX2J z1%Wt@BO)RbBPZoZu3Zkt)AHt#qaq^WIF7i!FCro%YriNjqU6siCS$QCc{Gw3{ytGd zmj`~-k~Op~uHz-&@Et4^*5q3#$0hgik0F5X`!u!9L+|S&dB+_rxvdY^by1pzuIr5L z+QZnuUS@olLU4VbIze+j;DF)7B7y9L?{N_!3B){~xvg990%6&j}HC@p}zABeOlg@Irr zlz<{Wm4;@zf4Yy@vTiD~bC{-yX_{0^B|>dEx_|yNs%@Q2;gLs}LU@~iI)bYNPgGIU zP@@IkE6&$+awr;6qzOo;o9NxWn{;mvCA=%nV zlz=FZ0v0F@7i@tsZLiqHSw9%bgblh-G!W1=zmpX^cM@N|jM7w|aa^vuEL_>k zxncp|wrOr}Cw}k{=eImS0CX7!@%8H{OiZBJHuG-i#%+ob1v->QT`6XL_Wwd`R|C*d z2T#CN{OMUgFAIolo3V-s$@#yc@1Zd}MlNtdXt5(x+^Gb@lb`e4dqoV+q z0Ed9gS2to!oM+;9zePi*T@Ue+4#yn-?#IRX<$Kok1{L14CYgBfHeZ;kRjJ?;0h-Zi zL?fbK26#b0MSQ05v499VStG&;L-Dlj?0ig|O;5( literal 0 HcmV?d00001 diff --git a/LiteEditor/res/svn_repo.png b/LiteEditor/res/svn_repo.png new file mode 100644 index 0000000000000000000000000000000000000000..fee6374f02f982bab83d577cd78469574280c9e7 GIT binary patch literal 3553 zcmV<74Ic7|P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#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h*VWqEn|BXv-w`uh6%Tc2M2;(b9MyLe%V>Dn|8 z2fH{2g+hV;ZjWoL-_Y%L`|rN<_J@m$i=P1Z4gnr86^7x$jhi>mwYFO?<#M^%!Ei6@ zoKPy|<2Z^s)oNvZZfH4}kD6 b;r|W*?COITg`BaK00000NkvXXu0mjf7@VJf literal 0 HcmV?d00001 diff --git a/LiteEditor/res/sym_wiz_bmp.png b/LiteEditor/res/sym_wiz_bmp.png new file mode 100644 index 0000000000000000000000000000000000000000..94dad9ad3746f126aa18d0545b99197d5274cdc5 GIT binary patch literal 88800 zcmX_{1yCH#^Y<4EhXf8ua68;J!R>;(6M}`{?(P;GfTV#A>007=fN{A@E96JC2rW6GG^6t1dp!?;3WFw(r4*+PL z|Gi-1>Cp&YjED}BvZ9F7Ab3Z%(5*hi69r-`|CuXC3P^hGz30eqa(eX zLHh5EvbB+ev!0zHpl$Q~Uw4%M|K+Ck`WAXGUG0FH*1u6NX3&3Tbv-*PQ!8Vjm0&CA z#fJEQpLev=Hv}%9{r6wHeX_Q+G_-O6t_BlYUTkmv>!xDrU||Rp9*tAKfB+;#gjHNp z51O1~Df?`xcQB&wOf~B3i%Y(QjkTh_!4Dus@)JL+t;twFtrh1gNWp+`U@>SCRf^3*KZa&)bHOI% zvN&i{z#}Lj$4Lf&MJ}XI_p#z`;slr|B3!8gK-V-7y3jS(^ljJRUIgO>{Z=4&-xdnO zJZOmQq!81fAP2xu5Lvsub`U!hi~$3t*-m8@1Ksp*m`^Hu-pydhHtsu9>_uR*zOu;U zsJ&{y!=RLe1OR^2TsWyHN44dfT#@^BZTuH+t^gSSaGTOk!4i1-;hp>^{bxSS#q6y&FVEj1zgnh3p#~OuQYrZ%ZaKa#6c|j#L6m z7N9^!Uz~56N)EY`B4?#j05R2WyQU)oE*2;qSG%-ncA;i5`}I-jV>=U>x*sG9B>3Cv zz_9WUw~^?PvWi@Z@&RCt1j=rY4g>&RkrW0BBb2$~hxna^=30H>sNkX`A6|Cv`rf|{ z00O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p2n7R@TxpC>)tVg zC{4cDWnDt(&PY{l1(W$Ox~b6hra7jeKO0zSrYQ6_T#h)AEu-;_pFgM;8?7JpdT;Vb z>HuAR*CEdPBw#GM<=%Y8yW?76Gq;Jk|FqvAHL!K(wdeWy8`i3>Y1-4oz0Uc+s#m^q zgCQqxBoCtfUipTl z6*doeU{rsG#YVJ%brvtM#ofWPG6{VHiy8alScU2h;=q0?Oi9W-ZM0$ ze58h3%zIaxb&~u}Pnt}vROZU=Y%Pvcvy7NUnZex{ zt-8cZ7PHJ67oBorHKrQB;v3e;#IW`Cdyk-ipY$DP3-ix7u4kZ>mC#2G)L~~U*`K)& zyzbN;m5nHVEkP{s=k+{CP6qVFF+WpY&+*+kG-{wu=;!0j_YBt%fO(v>(<-<9xQkdt zPVMCK`HgRYzv08HUvCF2gl=8tn3J@);<`P?Rg)*{&~_EyNDq}>{oeBUewTPO%<=VU zkdFDhyirxFUv;20!?+D;>7Szx##;u`O++@00<|bWkQ@%GZuKdjF z`Q02`d={0TD>XQBaB@-@*kyFe*8pQ37NyGn^ax#tPW%&u+RIA)N-)+3w{#l(-t7Is z=RVEmn>CSbb6?%*3Dqh)P@%lnfzb|)V&>{fgF%CKWuxnBhPrQyo2A4`s>K>mUKns`1;sJ1SqouuNWFz3MCcO8IJ0~2tw%jzNU{sJCMaJ>- zc%x3$J|>kn3!w0X!qG8x9ts`o%++tqQOJTi+jwRM)>@Ldsmac9r?n}b3F$m15QUOn z<-3r`kbg%T`Kl(qqGppQYrwl!b&hRR?r{PxM&(iT}=Jl5<%6r$+ebiKOgDD2jP zN3$cX{L9mm+ymsQ@3m)MdeKVf*&rEf@6;@E1FgB0? literal 0 HcmV?d00001 diff --git a/LiteEditor/res/text_tree.png b/LiteEditor/res/text_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..0bc3d917cd495eb03ebf997e5815cd93cc984112 GIT binary patch literal 650 zcmV;50(Jd~P)! zu}>925XOJAyYE2*Cy5Qw1jSg8m>5uF1Z*s9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1(`x6^sVlY^ z&J|}lVm|}@g3yQcftr`D2DmM2?XI;V#z-b&uNz9aj~R^!&RQNi^}vbYmGQ1oK@_AC zL=ELijH?HXS)Nw|@xz3c}H!9e%p1{B3^p;I%^a zj(fFj%*n#4s3uiWVJclvWYdw=Yx}Ff?ozV(p8OmblYb`Ra$hYyW_%a^Y*+XUVLA676o81WdLerbuJ(^AY|!dE+8^6Fft%9GCDFbIx#RHD=;xIFkm~z@;j|==^1poj6 z|4BqaRCwBBU>Nd%5u0FodOF{mH*bO&85wQfzkk2}^XJbyPn|mT8>azLQBl@xY-}9@ z0sfVg{raWI!otGD#l^+&_wQeZ^XJcByLt0w-jO3m_M#iW3?gJ@W%n2u7#K!G zM5qZ13k&h`@-qJT@q^*jt5*!qpFd~d*QZ&K(dNZ0qgYw;8Tpy~-dYB*dVuuFlZY(*tsCXj4;*-@EtkW_|zqxo+0%IUm3- zkd~G{_3hiYzz-ijaIv$qGXPz}U}9v<@btwOhTlKGGrWHDl0i;Zmf`BPI}C=VPAsZc z{^nNB23~c0hJ9=2FbD|n zGyE0OVo=ajX86X;%y9eab?H-wcXu$s{IX}yp3A_1wA-_L_q~f(ZZSxjSTWrH%)s!M zpO=A!o%8aR&6~GBeDRv$_+ti!tB)8MKED9^7Z!*xaPQu|cfdg0^7qfrU}hCBzE@wF z8D8GK&v0SaqVC^+{}=rK@I>wP<7YZgPOtfN`Rvhzr_Y{0#F`G0lM^-nGV$%^lTed> zcKy(yCy(!Yo;Z2x8%WOC$w3Vm(67#&zxaUxAF#8t;k2=~RK=Cph7kY&1mD?)h1aKq P00000NkvXXu0mjfh&4nm literal 0 HcmV?d00001 diff --git a/LiteEditor/res/wrap_arrow.png b/LiteEditor/res/wrap_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..6972c5e5946080ca1dec4de09d9430d3edf6c555 GIT binary patch literal 631 zcmV--0*L*IP)`NY~_X_4^RN+9OmbDu*=G*+_}E z3jR}&gbG0=R0#?Z-=09KI|YP8=#E5@+>uO|=1VUCOole%Li*0J2^Gy8+;b?&km6gg zf;aDGp1r#I_V|We$e$~WifFF9R7MCMwsmwsME9<<@yx?a+v)qKuKbNe>k1{IrVt}k zbbSs~bXr8Se}V_b4opa0GhLA`RHceaP=N}IElbSa8@d(ij1Q|4CvOirm9fb=LB4S^vR0{?%1Sg>G8Lqh{7 z`GS%$hyv1}1pWWN-TN(XfCB$Yg8YKP0wa}RxN(!G5Ev4Uo-U3d6}P6Ix8`C{;Bh(l zws+_MRMyXeG0m;}&ME421Rj!BP|lERzQ+*b@coUV(niME1#Feu4xVV&y5M%`=JDrh Y3AgIcu*N=31RBQR>FVdQ&MBb@0A8AA3jhEB literal 0 HcmV?d00001 diff --git a/LiteEditor/res/wx24.png b/LiteEditor/res/wx24.png new file mode 100644 index 0000000000000000000000000000000000000000..8035b6c89f457c9ad0ebe783b0345631ac08c170 GIT binary patch literal 1455 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbQ|Pftew|C&U%VZ2;p2Fx3F$H8dOm zf;$J6o%#TjVPI(a&%p5iKM(=wQ7{?;Lo5XT|NgLG!IFlC22k<^C1Vf;q(KS#|9`vp zTi!4*Ffx<``2~XoMk)aejsv-OK;;2vfk$L90|U1(2s1Lwngc31*h@TpUD>bm$cTw3 z2<~3(2NrUTC~+(;$;dBaSh?;LB0FlEm9xw)x% zB@ExrOxq6>V*@D*$t=l9Wmxg23rh6r>vgSsLzo z@54RMvoYU%`_ImM;y-gvl!lrTAs#gz004w9p37?i0B95Soe>8O^! z3IIgi|6ZWPCqy(T5!>yBssi>b0VSazQC8ZE>i!0nFo!c90pzvUl9R&k;AusdFD}CR@ z$M<1R>)k=7>oKENT8*qM{bME)Z{r1{Uu!V5$2jv84vrI?uYxct3IpXaYR`04JE;F? zy_S*nMby@oGV>imHJlxuwdR3C)1OK^fBTzSBm1#hpjqPV-CV}77&~qd8XF9eb+abt zv3YbgQn7R~;%Os{XGuUrE9$ZgeJ_2}Lg=#G9)yl<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(LX>rYrYNT1W?GL@hRm+^8dAsWSTy1gEvq5+aF<@$#&7g;gFTn+uwgHTa`?SE4NS}vXazC)tD$t z!(K=zmo+#bUoz73hzEOM=ppksMQZHuyrdydGQ)geCn@TZEVMK9v?RR6zSy>x`SKbX zi$()m+lf-PG?zBWlQ4QYXN8Xj&~J|_)=4X;42agOl}7b3(Qrk!{24HjN3UX^_|88b zdq{4?MmDeZ9zI>aZo7vWQH9MB-fy3aj(yC>TuD8^P=vH`ZHusK@BQ3~dGRNKnPWSi dejjMRLw7EcM>{Xo2t?fu@IpaNzDyPx{2z>8`z!ze literal 0 HcmV?d00001 diff --git a/LiteEditor/resource.h b/LiteEditor/resource.h new file mode 100644 index 0000000000..91ebfcee91 --- /dev/null +++ b/LiteEditor/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by code_parser.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/LiteEditor/resources.cpp b/LiteEditor/resources.cpp new file mode 100644 index 0000000000..9da48ee4c0 --- /dev/null +++ b/LiteEditor/resources.cpp @@ -0,0 +1,14038 @@ +// +// This file was automatically generated by wxrc, do not edit by hand. +// + +#include + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include +#include +#include +#include + +static size_t xml_res_size_0 = 582; +static unsigned char xml_res_file_0[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,216,73,68,65,84,120,218, +164,83,59,75,92,81,16,254,102,247,60,174,187,186,197,250,66,3,218,41,152, +160,16,11,11,171,20,26,82,11,74,2,130,32,254,129,252,142,252,130,20,134, +96,145,50,164,74,145,98,109,23,173,146,128,178,96,145,16,88,21,217,133, +93,239,190,238,222,123,114,238,99,207,185,55,166,115,224,60,103,206,55, +243,205,204,33,165,20,30,35,44,156,62,30,126,69,136,67,64,6,142,210,23, +148,172,202,158,14,142,95,197,0,121,198,32,10,92,205,173,148,81,154,45, +162,88,118,192,29,150,241,228,245,134,112,155,61,180,234,46,234,23,13,53, +232,120,100,34,224,156,247,215,119,150,80,94,152,48,15,98,106,148,184,164, +40,154,201,133,18,176,6,204,63,157,194,249,167,90,95,43,100,12,32,152,152, +152,41,160,215,246,50,94,63,188,253,140,165,141,69,108,238,61,55,12,190, +188,171,224,244,236,27,118,183,246,133,137,64,8,129,110,115,240,223,36, +213,170,191,32,11,18,171,47,150,81,57,169,162,89,111,105,202,121,112,201, +109,18,133,148,24,180,125,147,52,34,147,172,72,126,84,106,209,8,37,71,185, +72,39,165,136,207,225,36,53,218,208,13,224,181,3,12,239,245,154,12,150, +99,184,110,253,193,239,198,21,198,68,17,151,215,223,113,223,111,105,7,185, +200,169,5,16,18,65,7,240,123,132,160,11,179,111,116,238,176,184,242,4,91, +47,183,113,117,123,129,55,251,175,49,59,55,13,223,247,35,218,182,10,58, +156,254,93,96,138,173,244,66,74,71,227,123,40,4,37,56,195,113,116,61,23, +121,215,129,160,162,166,25,64,58,49,0,133,229,250,249,254,70,165,75,150, +149,116,57,97,247,58,81,207,142,102,200,84,193,246,87,98,144,105,201,17, +214,67,39,73,31,240,148,29,105,19,245,224,29,169,248,158,70,52,19,155,81, +39,166,98,252,167,134,64,150,157,101,98,91,153,113,134,4,60,84,251,225, +247,200,208,183,159,72,55,11,242,81,64,35,119,143,253,206,127,5,24,0,55, +48,177,202,25,58,144,27,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_1 = 612; +static unsigned char xml_res_file_1[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,246,73,68,65,84,24,25, +165,193,63,72,148,113,28,199,241,247,239,238,185,63,42,150,4,122,154,244, +199,171,33,176,40,197,169,110,104,111,178,65,90,218,202,69,68,156,90,26, +90,107,40,20,28,42,104,106,113,105,104,105,13,162,197,193,90,14,21,10,44, +48,201,72,81,239,79,231,243,124,63,223,124,144,182,26,142,94,175,224,238, +252,143,48,62,187,56,85,185,62,246,112,187,225,93,238,128,132,75,152,12, +151,35,23,110,134,220,113,51,76,226,88,62,174,175,172,108,220,123,245,120, +98,33,26,187,54,54,159,43,118,101,74,69,218,209,85,111,216,60,176,16,53, +98,207,52,182,107,180,171,25,123,134,67,145,155,115,255,230,32,237,154, +158,251,66,42,114,23,238,142,147,114,112,32,4,62,44,47,243,47,163,35,35, +152,140,84,132,59,102,198,228,220,58,127,60,159,57,75,170,82,169,240,55, +181,90,13,37,70,42,50,25,114,231,233,244,25,8,14,30,144,59,71,156,119,213, +13,182,246,154,212,90,5,10,185,136,227,29,226,234,80,1,153,72,69,46,71, +38,66,0,23,135,28,130,51,60,60,204,219,143,235,212,213,197,229,161,19,68, +185,44,91,187,7,236,236,183,88,250,92,67,50,82,25,201,144,140,196,12,147, +33,25,74,68,181,90,229,71,179,72,185,212,201,78,43,176,185,103,36,33,203, +96,95,55,219,205,128,36,82,81,18,199,152,25,51,207,190,243,199,220,100, +137,84,173,121,64,62,159,35,105,37,200,161,149,56,197,40,75,226,17,73,156, +144,138,220,132,36,158,220,233,3,156,148,36,82,157,133,28,7,177,17,27,36, +114,82,30,160,81,175,227,18,169,72,18,146,3,34,0,206,145,114,249,28,191, +54,99,246,155,70,119,71,158,150,57,81,38,176,185,29,227,63,215,56,159,93, +35,21,198,103,23,23,75,167,78,78,200,12,153,48,51,36,97,113,76,46,31,209, +223,215,195,232,197,211,200,97,183,214,194,182,86,168,244,126,99,247,211, +251,228,235,234,210,237,224,238,180,227,245,131,27,119,251,7,250,31,245, +14,93,233,89,93,122,211,8,238,78,187,94,78,93,184,53,80,190,244,66,74,58, +126,3,149,204,48,103,29,102,159,90,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_2 = 623; +static unsigned char xml_res_file_2[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,1,73,68,65,84,120,218, +164,83,187,107,20,65,28,254,126,119,59,51,235,93,114,197,169,137,81,238, +130,77,132,152,40,152,194,66,27,145,40,214,130,143,64,64,16,209,42,133, +127,135,85,170,104,97,8,34,41,197,202,194,226,108,131,218,24,33,122,16, +196,61,225,18,9,119,112,151,189,215,62,198,217,135,179,183,33,193,194,89, +230,189,243,253,190,239,247,32,41,37,254,167,25,193,176,246,240,29,2,28, +2,82,112,52,124,64,241,44,147,221,131,151,183,34,128,172,97,128,231,152, +156,152,46,162,48,158,71,190,104,130,153,70,202,146,211,115,97,55,123,104, +213,109,212,183,26,114,208,113,72,51,96,140,245,231,110,79,161,88,30,213, +15,34,105,20,155,164,144,205,241,114,1,184,8,156,62,127,2,159,214,171,125, +117,33,34,0,110,240,209,177,28,122,109,39,101,117,245,233,27,76,93,158, +196,149,187,151,180,130,183,207,42,248,240,241,61,238,204,47,114,205,128, +115,142,110,115,112,168,147,170,27,63,33,114,2,23,174,157,67,229,213,6, +154,245,150,146,156,5,19,44,113,34,23,2,131,182,167,157,70,164,157,21,182, +205,74,53,236,65,203,80,38,188,19,130,71,251,96,16,10,205,181,125,56,109, +31,238,190,154,227,110,100,12,236,180,126,193,106,108,227,24,207,227,219, +206,23,236,247,91,202,64,38,52,154,0,112,1,191,3,120,61,130,223,133,94, +55,58,123,152,156,62,131,249,155,55,176,253,123,11,11,139,247,49,62,113, +18,158,231,133,178,147,40,40,58,253,61,31,115,75,101,77,251,243,178,5,215, +115,144,243,11,48,221,17,116,29,27,89,219,4,167,188,146,233,67,152,17,0, +5,225,250,250,98,87,206,62,62,133,149,165,117,157,49,79,150,239,97,243, +249,174,14,99,226,148,120,173,28,53,243,104,140,116,20,226,124,192,213, +217,235,225,15,223,87,27,67,41,249,55,57,104,8,48,190,42,149,74,178,86, +171,29,26,194,31,175,219,250,29,169,65,170,143,226,199,193,250,236,194, +8,165,242,53,144,67,148,160,27,140,165,88,31,80,146,164,242,145,149,166, +106,228,64,17,169,100,65,54,36,36,135,36,28,5,96,89,22,253,171,156,255, +8,48,0,128,84,187,212,17,142,176,90,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_3 = 618; +static unsigned char xml_res_file_3[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,252,73,68,65,84,120,218, +164,83,61,107,20,65,24,126,222,187,157,153,245,46,185,226,98,18,98,188, +4,155,8,49,137,160,133,133,54,17,162,88,7,212,28,4,2,34,88,89,248,59,172, +180,209,198,16,66,208,46,88,89,88,156,109,72,42,83,36,28,4,241,78,184,40, +114,7,119,217,251,218,219,29,103,63,156,221,13,9,22,206,50,239,204,236, +48,207,251,60,239,7,73,41,241,63,195,240,204,198,147,79,240,112,8,72,192, +81,252,7,133,171,140,78,107,239,30,4,0,105,195,0,207,48,57,49,155,71,110, +60,139,108,222,4,51,141,132,39,187,59,128,213,232,162,89,179,80,59,168, +203,126,219,38,205,128,49,214,187,185,60,131,252,212,176,126,16,72,163, +208,37,249,108,70,166,114,192,117,224,210,181,139,216,123,95,238,169,11, +17,0,112,131,15,143,101,208,109,217,9,175,235,47,182,49,115,107,26,183, +31,221,208,10,62,190,44,225,203,238,103,60,92,90,229,154,1,231,28,157,70, +255,204,32,149,119,190,67,100,4,22,22,175,162,180,185,131,70,173,169,36, +167,193,4,139,130,200,133,64,191,229,232,160,17,233,96,249,99,191,84,246, +167,55,82,148,242,239,132,224,193,217,51,66,161,13,44,23,118,203,197,224, +68,173,225,52,82,6,142,155,63,80,169,31,225,2,207,226,240,248,43,78,122, +77,229,32,229,59,141,0,184,128,219,6,156,46,193,237,64,239,235,237,223, +152,158,157,196,210,253,123,56,250,117,128,226,234,10,198,39,70,225,56, +142,47,59,202,130,162,51,87,188,172,41,239,189,174,130,164,98,227,216,200, +184,57,152,131,33,116,108,11,105,203,4,167,172,146,233,66,152,1,0,121,233, +34,34,249,230,249,7,157,178,103,175,30,99,255,237,207,88,229,196,131,18, +238,85,160,230,158,142,145,174,22,198,12,220,153,191,171,75,142,115,22, +43,201,191,88,20,3,12,175,10,133,130,172,86,171,103,166,240,219,86,75,191, +35,101,164,250,40,124,236,237,175,20,135,40,81,175,161,156,168,81,24,75, +176,62,165,36,42,229,115,59,77,245,200,169,38,82,197,130,180,79,72,198, +36,156,7,80,169,84,232,95,237,252,71,128,1,0,192,102,181,108,206,164,124, +224,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_4 = 505; +static unsigned char xml_res_file_4[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,139,73,68,65,84,120,218, +98,252,255,255,63,3,37,128,5,68,28,244,100,132,241,137,53,13,172,193,126, +251,127,136,1,204,64,146,133,71,232,191,128,129,11,3,167,140,58,3,187,136, +28,3,11,55,31,196,56,70,136,177,127,190,125,98,248,245,230,49,195,183,39, +55,24,62,92,220,243,255,207,167,119,140,112,23,176,176,50,252,84,74,108, +103,224,86,54,134,91,241,255,255,63,48,189,48,205,1,197,234,132,217,135, +24,132,12,157,25,238,205,72,255,9,228,178,131,13,96,101,99,96,227,144,80, +100,248,243,225,25,138,98,152,127,142,63,254,6,23,139,1,170,1,169,5,90, +202,6,119,1,43,43,3,195,239,55,119,241,122,122,226,204,233,96,250,207,199, +167,12,80,75,17,129,200,202,193,192,240,239,227,99,156,154,45,101,185,24, +86,180,20,131,217,97,185,5,96,154,141,3,201,0,118,118,160,1,159,30,48,48, +254,71,14,99,80,56,96,122,33,228,227,3,176,52,59,178,1,108,64,3,24,191, +60,130,4,56,80,19,35,35,34,2,96,160,191,192,6,18,38,95,31,49,192,244,32, +12,0,154,246,255,217,17,120,192,193,99,15,108,2,23,68,252,249,17,136,1, +80,87,177,178,163,185,224,63,35,90,50,130,242,163,29,191,49,68,49,48,160, +164,9,140,148,8,50,13,238,116,36,183,51,98,73,158,140,216,146,50,48,78, +47,0,37,12,254,163,203,254,199,162,11,17,70,23,144,13,48,4,82,175,128,10, +69,81,156,202,136,195,160,255,12,175,129,36,72,15,3,19,44,47,0,177,24,51, +51,195,50,32,253,23,202,103,0,242,33,152,21,206,255,11,85,35,6,18,3,155, +73,105,118,6,8,48,0,174,175,122,4,200,188,186,205,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_5 = 528; +static unsigned char xml_res_file_5[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,162,73,68,65,84,120,218, +98,252,255,255,63,3,37,128,5,68,28,244,100,132,241,137,53,13,172,193,126, +251,127,136,1,204,64,146,133,71,232,191,128,129,11,3,167,140,58,3,187,136, +28,3,11,55,31,196,56,70,136,177,127,190,125,98,248,245,230,49,195,183,39, +55,24,62,92,220,243,255,207,167,119,140,112,23,176,176,50,252,84,74,108, +103,224,86,54,134,91,241,255,255,63,48,189,48,205,1,197,234,132,217,135, +24,132,12,157,25,238,205,72,255,9,228,178,131,13,96,101,99,96,227,144,80, +100,248,243,225,25,138,98,152,127,142,63,254,6,23,139,1,170,1,169,5,90, +202,6,119,1,43,43,3,195,239,55,119,241,122,122,226,204,233,96,250,207,199, +167,12,80,75,17,129,200,202,193,192,240,239,227,99,156,154,45,101,185,24, +86,180,20,131,217,97,185,5,96,154,141,3,201,0,118,118,160,1,159,30,48,48, +254,71,14,99,80,56,96,122,33,228,227,3,176,52,59,178,1,108,64,3,24,191, +60,130,4,56,80,19,35,35,34,2,96,160,191,192,6,18,38,95,31,49,192,244,32, +12,0,154,246,255,217,17,6,241,54,132,134,151,85,64,49,176,9,92,16,215,60, +63,2,49,0,234,42,86,118,52,23,8,214,51,48,172,137,69,24,0,50,236,93,35, +3,67,180,227,55,134,40,152,70,70,204,164,198,130,98,26,48,54,156,85,33, +10,63,119,32,188,240,31,61,9,34,27,32,39,39,247,255,49,52,2,2,230,161,74, +254,232,197,162,11,17,70,23,224,46,64,164,190,255,64,73,132,106,22,54,52, +39,32,156,244,26,72,26,130,152,76,248,18,15,51,51,20,179,66,242,11,144, +253,23,136,151,1,217,98,32,49,176,153,178,178,178,56,115,224,163,71,143, +24,9,101,75,128,0,3,0,128,120,122,16,248,22,44,183,0,0,0,0,73,69,78,68, +174,66,96,130}; + +static size_t xml_res_size_6 = 525; +static unsigned char xml_res_file_6[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,159,73,68,65,84,120,218, +98,252,255,255,63,3,37,128,5,68,28,244,100,132,241,137,53,13,172,193,126, +251,127,136,1,204,64,146,133,71,232,191,128,129,11,3,167,140,58,3,187,136, +28,3,11,55,31,196,56,70,136,177,127,190,125,98,248,245,230,49,195,183,39, +55,24,62,92,220,243,255,207,167,119,140,112,23,176,176,50,252,84,74,108, +103,224,86,54,134,91,241,255,255,63,48,189,48,205,1,197,234,132,217,135, +24,132,12,157,25,238,205,72,255,9,228,178,131,13,96,101,99,96,227,144,80, +100,248,243,225,25,138,98,152,127,142,63,254,6,23,139,1,170,1,169,5,90, +202,6,119,1,43,43,3,195,239,55,119,241,122,122,226,204,233,96,250,207,199, +167,12,80,75,17,129,200,202,193,192,240,239,227,99,156,154,45,101,185,24, +86,180,20,131,217,97,185,5,96,154,141,3,201,0,118,118,160,1,159,30,48,48, +254,71,14,99,80,56,96,122,33,228,227,3,176,52,59,178,1,108,64,3,24,191, +60,130,4,56,80,19,35,35,34,2,96,160,191,192,6,18,38,95,31,49,192,244,32, +12,0,154,38,158,115,4,174,248,69,21,52,246,192,38,112,65,92,243,252,8,196, +0,168,171,88,161,6,48,130,82,34,35,35,227,255,53,113,8,201,144,197,12,12, +239,154,32,124,152,107,144,211,4,12,8,214,253,103,100,129,113,152,153,25, +24,92,213,17,254,6,133,50,35,150,228,201,136,158,36,101,101,101,255,63, +126,140,61,6,126,244,98,209,133,112,213,5,246,194,255,134,44,40,9,7,226, +29,68,70,97,67,115,2,194,73,175,129,164,33,136,201,132,47,241,128,188,5, +198,172,144,252,2,100,255,5,226,101,64,182,24,72,12,238,5,92,6,60,122,244, +136,145,80,182,4,8,48,0,50,211,128,135,30,60,53,216,0,0,0,0,73,69,78,68, +174,66,96,130}; + +static size_t xml_res_size_7 = 518; +static unsigned char xml_res_file_7[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,152,73,68,65,84,120,218, +98,252,255,255,63,3,37,128,5,68,8,180,48,130,57,64,18,110,28,72,4,155,209, +140,80,10,36,247,161,230,63,196,0,144,160,32,167,208,127,123,69,23,6,85, +97,117,6,25,62,57,6,94,118,62,20,141,159,127,126,98,120,250,233,49,195, +237,183,55,24,246,223,223,243,255,195,247,119,140,112,23,48,51,51,252,108, +112,110,103,208,151,48,134,107,248,247,255,31,138,1,76,140,76,12,250,146, +134,64,150,31,131,131,146,51,67,241,246,244,159,64,14,59,216,0,86,22,6, +54,121,1,69,134,151,95,159,161,59,149,1,221,75,32,26,164,150,133,149,129, +13,238,2,118,32,243,241,167,187,112,205,177,217,89,12,12,38,76,40,46,88, +156,56,5,17,46,64,6,27,11,212,101,96,3,88,25,24,94,127,127,204,240,234, +219,99,20,205,125,17,229,12,12,103,32,94,137,157,159,3,150,127,5,84,247, +250,235,99,6,14,54,164,88,0,185,224,229,183,7,24,33,142,46,246,242,59,130, +15,178,20,110,0,200,180,183,191,30,65,226,6,9,116,110,90,137,226,149,119, +63,31,193,3,132,131,3,217,0,118,6,134,155,239,143,64,67,142,17,174,193, +214,226,47,74,64,94,255,120,4,34,251,31,226,106,20,23,48,96,73,56,32,69, +123,250,24,225,174,112,181,251,139,161,134,9,166,144,141,13,226,18,159, +138,255,240,128,219,115,136,25,174,217,199,229,47,88,29,7,18,70,4,34,43, +34,142,255,3,137,224,186,255,64,254,95,132,103,254,35,124,246,31,150,142, +145,243,2,43,27,3,35,40,31,32,43,196,240,19,35,134,97,136,164,12,77,20, +144,116,2,177,154,25,35,78,33,26,65,161,202,140,108,13,35,165,217,25,32, +192,0,17,230,128,36,111,223,157,67,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_8 = 938; +static unsigned char xml_res_file_8[] = { +47,42,32,88,80,77,32,42,47,10,115,116,97,116,105,99,32,99,104,97,114,32, +42,101,110,117,109,101,101,95,120,112,109,91,93,32,61,32,123,10,47,42,32, +99,111,108,117,109,110,115,32,114,111,119,115,32,99,111,108,111,114,115, +32,99,104,97,114,115,45,112,101,114,45,112,105,120,101,108,32,42,47,10, +34,49,54,32,49,54,32,51,52,32,49,34,44,10,34,88,32,99,32,35,67,67,67,67, +54,54,34,44,10,34,49,32,99,32,35,70,70,70,70,70,70,34,44,10,34,36,32,99, +32,35,70,70,67,67,54,54,34,44,10,34,58,32,99,32,35,67,66,67,66,67,66,34, +44,10,34,50,32,99,32,35,70,56,70,56,70,56,34,44,10,34,54,32,99,32,35,57, +57,51,51,54,54,34,44,10,34,51,32,99,32,35,70,49,70,49,70,49,34,44,10,34, +35,32,99,32,35,70,70,67,67,57,57,34,44,10,34,59,32,99,32,35,67,67,67,67, +67,67,34,44,10,34,32,32,99,32,78,111,110,101,34,44,10,34,119,32,99,32,35, +69,65,69,65,69,65,34,44,10,34,79,32,99,32,35,67,67,57,57,51,51,34,44,10, +34,38,32,99,32,35,54,54,57,57,57,57,34,44,10,34,56,32,99,32,35,53,53,53, +53,53,53,34,44,10,34,43,32,99,32,35,69,70,68,54,67,54,34,44,10,34,60,32, +99,32,35,65,48,65,48,65,52,34,44,10,34,113,32,99,32,35,65,68,65,57,57,48, +34,44,10,34,48,32,99,32,35,67,67,69,67,70,70,34,44,10,34,61,32,99,32,35, +54,54,54,54,51,51,34,44,10,34,101,32,99,32,35,51,51,54,54,54,54,34,44,10, +34,55,32,99,32,35,67,67,57,57,57,57,34,44,10,34,44,32,99,32,35,57,57,57, +57,67,67,34,44,10,34,37,32,99,32,35,57,57,54,54,51,51,34,44,10,34,114,32, +99,32,35,54,54,54,54,54,54,34,44,10,34,62,32,99,32,35,67,48,67,48,67,48, +34,44,10,34,116,32,99,32,35,53,70,53,70,53,70,34,44,10,34,45,32,99,32,35, +68,55,68,55,68,55,34,44,10,34,52,32,99,32,35,57,57,54,54,54,54,34,44,10, +34,57,32,99,32,35,54,54,67,67,54,54,34,44,10,34,42,32,99,32,35,54,54,54, +54,57,57,34,44,10,34,64,32,99,32,35,70,70,70,70,57,57,34,44,10,34,46,32, +99,32,35,69,55,69,55,68,54,34,44,10,34,111,32,99,32,35,67,67,67,67,51,51, +34,44,10,34,53,32,99,32,35,56,54,56,54,56,54,34,44,10,47,42,32,112,105, +120,101,108,115,32,42,47,10,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32, +32,32,34,44,10,34,32,32,32,32,32,32,32,46,88,88,111,111,111,79,79,43,34, +44,10,34,32,32,32,32,32,32,32,88,64,64,35,35,35,36,36,37,34,44,10,34,32, +32,32,32,32,32,32,88,64,35,38,38,42,36,36,37,34,44,10,34,32,32,32,32,32, +32,32,88,35,35,35,36,36,36,88,61,34,44,10,34,32,32,32,32,32,32,32,111,35, +35,38,38,42,88,88,61,34,44,10,34,45,45,59,58,62,62,44,44,44,44,60,88,88, +111,111,61,34,44,10,34,45,49,49,49,50,50,51,51,51,51,38,37,37,61,61,62, +34,44,10,34,59,49,58,52,60,50,60,53,62,51,42,32,32,32,32,32,34,44,10,34, +58,49,54,55,54,51,56,57,56,48,42,32,32,32,32,32,34,44,10,34,62,50,62,55, +58,51,58,113,58,119,42,32,32,32,32,32,34,44,10,34,62,50,42,42,42,51,42, +42,42,48,42,32,32,32,32,32,34,44,10,34,62,50,51,51,51,51,119,119,48,48, +101,32,32,32,32,32,34,44,10,34,44,38,38,38,42,42,42,42,114,101,116,32,32, +32,32,32,34,44,10,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34, +44,10,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,10,125,59,10}; + +static size_t xml_res_size_9 = 537; +static unsigned char xml_res_file_9[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,171,73,68,65,84,120,218, +164,83,189,74,3,65,16,158,205,253,37,133,33,106,163,32,74,4,177,12,162, +133,133,160,144,160,160,34,104,231,19,216,216,69,4,193,66,68,72,35,86,121, +15,75,65,4,139,164,244,1,12,18,148,28,17,46,33,26,19,146,112,194,221,186, +179,123,185,219,203,217,101,97,246,103,118,230,219,153,111,102,9,165,20, +198,25,42,78,169,27,194,15,108,246,225,80,243,31,52,241,22,188,107,95,82, +1,128,202,201,196,20,221,76,231,96,105,122,25,230,146,243,48,97,36,67,142, +93,187,3,245,142,9,111,173,87,120,126,127,162,237,193,23,241,35,80,20,176, +175,178,5,200,204,172,250,14,46,117,67,0,49,18,131,204,236,10,219,29,192, +214,98,22,242,15,39,54,59,24,28,64,83,65,95,72,165,193,234,125,250,14,59, +197,195,16,192,227,233,61,79,9,159,69,91,85,3,157,3,227,100,176,173,217, +169,66,163,87,231,226,59,191,184,66,216,216,102,186,38,187,179,152,152, +221,42,232,170,68,162,161,1,52,7,166,96,208,99,9,29,239,110,47,248,171, +249,179,2,192,90,12,26,125,102,67,4,131,113,93,6,96,7,171,255,17,97,124, +168,59,191,62,230,184,214,32,176,193,71,125,0,68,107,253,214,68,109,164, +209,178,107,60,34,212,203,193,225,38,30,151,1,12,128,202,119,89,178,80, +248,92,249,41,243,181,84,36,60,133,141,117,71,152,80,17,117,40,2,24,109, +28,230,80,42,186,254,30,71,66,143,54,151,95,5,93,23,145,32,216,94,206,9, +28,61,231,125,166,67,187,184,36,161,42,12,115,228,44,179,245,104,215,9, +50,146,8,160,195,62,150,255,130,166,3,193,127,16,102,106,36,39,18,1,11, +90,217,107,10,241,127,40,224,211,74,164,166,194,209,241,24,14,10,50,238, +119,254,19,96,0,31,149,137,171,209,3,19,102,0,0,0,0,73,69,78,68,174,66, +96,130}; + +static size_t xml_res_size_10 = 1600; +static unsigned char xml_res_file_10[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,6,7,73,68,65,84,72,137,141,150,107,140,148,213,29, +198,127,231,242,206,59,179,51,123,27,150,221,217,139,236,46,100,89,46,177, +88,81,150,180,148,154,180,165,152,42,65,55,150,75,106,72,154,218,148,96, +76,219,180,72,170,253,170,210,136,37,105,37,177,177,246,147,10,8,52,141, +49,84,131,70,19,168,161,208,34,32,66,23,48,11,50,59,179,59,91,119,118,231, +242,222,223,211,15,139,166,45,165,248,255,114,190,156,231,247,228,124,248, +63,207,17,198,24,110,53,150,120,176,61,165,85,127,50,165,231,2,194,115, +163,201,122,16,142,6,230,80,225,86,90,113,51,3,45,30,178,219,178,234,129, +21,95,95,186,113,217,93,139,87,116,207,235,204,53,54,53,11,33,160,50,83, +97,236,90,97,226,236,223,46,156,60,254,238,135,175,141,151,252,253,161, +57,80,255,194,6,141,246,240,61,223,30,190,243,153,181,235,215,12,229,58, +187,193,8,162,48,34,142,227,89,145,148,104,173,16,18,74,19,5,222,122,253, +200,7,111,236,59,190,99,186,126,240,205,91,26,116,182,111,216,182,229,177, +245,187,150,221,185,220,246,221,128,48,12,16,2,140,17,68,81,12,24,148,146, +8,33,0,80,74,99,167,18,156,255,240,116,244,210,238,131,79,124,146,127,117, +231,77,13,218,219,30,218,250,253,159,12,239,233,237,155,143,83,119,102, +47,124,14,146,100,155,27,64,192,212,180,67,24,70,8,33,248,76,159,76,165, +40,22,174,242,226,174,253,59,242,133,125,59,111,48,72,91,15,172,26,126, +100,245,145,193,37,75,109,207,153,133,7,65,132,144,2,223,143,232,233,106, +229,71,15,127,13,203,82,188,248,202,49,46,126,60,129,109,107,76,108,208, +90,33,165,32,97,219,140,126,60,18,237,221,243,206,253,51,238,161,195,0, +26,32,41,54,217,75,134,58,158,155,155,203,217,197,177,60,198,8,126,252, +195,181,8,41,121,239,47,231,17,2,86,173,24,68,41,137,49,176,102,245,34, +82,182,196,245,124,190,181,250,118,226,56,102,247,239,254,140,16,208,156, +109,83,75,135,58,119,217,98,195,81,207,236,171,104,128,132,237,174,235, +89,184,228,238,137,226,56,81,20,17,4,17,65,24,178,120,160,135,238,92,11, +74,201,235,240,217,215,206,235,105,99,115,119,150,48,140,72,218,54,151, +70,139,148,74,147,104,45,145,82,210,181,160,107,241,133,147,133,239,2,191, +151,0,141,29,137,205,158,31,48,49,62,206,212,212,20,211,211,211,188,252, +218,219,212,28,247,58,84,224,122,1,35,151,199,248,199,197,60,174,235,3, +2,99,192,245,124,246,255,241,61,202,229,50,229,114,153,201,82,9,215,245, +105,238,212,155,27,196,247,132,110,16,155,178,115,6,185,251,159,165,18, +194,24,148,82,84,170,14,193,237,125,88,90,1,130,124,161,196,174,223,30, +228,252,200,85,12,48,208,223,197,79,183,13,211,215,155,67,8,8,195,128,252, +88,145,198,76,10,99,98,98,99,192,142,150,67,208,45,81,97,95,36,130,92,173, +82,165,86,171,17,248,30,3,243,59,185,111,237,74,164,148,248,65,192,206, +221,123,121,247,232,41,28,199,197,117,92,222,63,113,142,167,159,123,5,199, +241,48,6,214,221,187,146,37,131,61,68,81,64,181,90,165,90,169,16,139,184, +25,43,238,151,36,76,235,76,101,70,85,42,21,234,117,135,142,246,86,94,122, +126,7,203,239,88,136,31,132,140,94,41,242,193,217,75,164,27,108,140,137, +49,38,166,33,149,224,220,133,81,70,46,95,35,138,98,6,22,244,240,135,61, +143,51,191,183,147,186,227,18,69,17,6,1,150,200,106,161,45,234,142,143, +239,76,160,148,162,51,215,138,193,128,129,216,196,196,152,89,193,191,237, +139,49,134,56,142,63,63,227,216,32,165,192,243,92,170,149,42,198,132,212, +28,15,116,14,137,78,76,37,236,84,108,37,18,36,18,22,163,163,99,172,223, +184,157,163,199,207,160,180,98,94,79,59,139,6,186,185,150,47,50,61,61,195, +204,76,133,252,216,56,253,189,237,44,232,239,66,74,201,153,115,151,184, +127,195,207,57,121,234,35,60,207,161,94,119,136,98,131,208,214,167,202, +202,12,121,202,118,31,78,88,162,41,97,105,164,148,92,185,90,196,243,67, +238,253,230,16,66,74,190,188,108,128,107,249,18,227,165,41,0,238,186,99, +144,39,183,111,97,78,182,25,140,97,215,111,94,229,240,91,239,99,89,250, +122,140,40,4,170,28,155,182,167,116,173,244,194,167,77,189,27,78,88,182, +234,182,140,143,78,36,104,105,209,32,192,241,124,148,148,116,180,103,217, +189,243,49,70,175,22,49,177,161,175,55,135,165,53,190,31,92,143,11,104, +109,105,70,41,65,16,4,32,20,161,81,39,141,213,144,151,0,17,233,151,149, +101,163,19,54,90,43,148,210,108,251,193,48,45,77,25,226,216,16,69,49,74, +41,250,123,59,153,223,223,133,214,138,48,138,136,162,152,76,38,197,35,91, +214,97,89,22,90,107,44,203,66,105,139,136,230,189,78,126,183,209,0,145, +149,125,61,140,10,127,77,103,26,87,168,216,195,182,53,150,214,156,62,123, +153,189,135,222,1,4,235,239,91,197,162,133,183,33,128,11,23,199,248,211, +27,199,112,28,143,45,155,214,128,49,164,82,73,226,40,68,42,11,167,30,156, +11,173,182,253,255,17,118,169,69,143,126,181,179,177,254,118,58,161,109, +41,2,164,84,72,169,73,167,27,16,82,51,56,112,27,191,220,190,17,219,210, +60,253,235,3,156,58,115,9,33,12,181,106,141,48,12,136,227,136,216,64,221, +11,162,66,53,243,157,218,249,61,111,222,16,215,141,95,218,186,117,94,139, +216,147,212,146,132,54,52,54,54,145,78,167,73,165,26,72,167,83,116,229, +230,32,165,160,56,62,69,181,86,199,117,93,106,181,26,149,202,12,174,27, +224,5,33,87,102,196,142,233,211,47,220,24,215,159,77,211,242,71,183,245, +53,171,103,115,115,90,147,233,84,130,116,58,69,38,147,38,153,76,33,132, +4,4,66,128,239,205,194,107,245,58,245,154,75,97,114,50,188,92,142,159,40, +159,124,254,87,255,183,209,0,82,95,121,252,158,249,77,230,153,197,61,29, +67,185,185,115,105,204,164,81,90,97,204,108,101,74,49,155,172,245,90,157, +98,105,130,143,62,41,252,125,164,44,158,172,31,219,121,248,191,89,55,45, +125,241,141,167,236,102,237,172,95,144,77,109,26,232,200,174,156,211,152, +153,155,180,18,18,192,11,124,51,85,171,78,94,46,149,79,140,76,214,247,78, +5,201,3,230,200,47,156,255,201,249,34,223,22,241,224,179,29,182,197,109, +118,66,182,3,248,65,60,233,6,92,53,7,127,86,188,149,246,95,92,111,231,152, +68,65,83,24,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_11 = 515; +static unsigned char xml_res_file_11[] = { +47,42,32,88,80,77,32,42,47,10,115,116,97,116,105,99,32,99,104,97,114,32, +42,105,109,97,103,101,95,120,112,109,91,93,32,61,32,123,10,47,42,32,119, +105,100,116,104,32,104,101,105,103,104,116,32,110,99,111,108,111,114,115, +32,99,104,97,114,115,95,112,101,114,95,112,105,120,101,108,32,42,47,10, +34,49,54,32,49,54,32,53,32,49,34,44,10,47,42,32,99,111,108,111,114,115, +32,42,47,10,34,32,32,99,32,35,48,48,48,48,48,48,34,44,10,34,46,32,99,32, +35,67,48,67,48,67,48,34,44,10,34,88,32,99,32,35,48,48,56,48,56,48,34,44, +10,34,111,32,99,32,35,70,70,70,70,70,70,34,44,10,34,79,32,99,32,78,111, +110,101,34,44,10,47,42,32,112,105,120,101,108,115,32,42,47,10,34,88,88, +88,88,88,88,88,88,88,88,88,88,88,88,88,88,34,44,10,34,88,88,88,88,88,88, +88,88,88,88,88,88,88,88,88,88,34,44,10,34,88,32,32,32,32,32,32,32,32,32, +32,32,32,88,88,88,34,44,10,34,88,32,111,111,111,111,111,111,111,111,111, +111,32,88,88,88,34,44,10,34,88,32,111,32,32,32,32,32,32,32,32,32,32,32, +32,88,34,44,10,34,88,32,111,32,111,111,111,111,111,111,111,111,111,111, +32,88,34,44,10,34,88,32,111,32,111,46,46,46,46,46,46,46,46,111,32,88,34, +44,10,34,88,32,111,32,111,111,111,111,111,111,111,111,111,111,32,88,34, +44,10,34,88,32,111,32,111,46,46,46,46,46,46,46,46,111,32,88,34,44,10,34, +88,32,111,32,111,111,111,111,111,111,111,111,111,111,32,88,34,44,10,34, +88,32,32,32,111,46,46,46,46,46,46,46,46,111,32,88,34,44,10,34,88,88,88, +32,111,111,111,111,111,111,111,111,111,111,32,88,34,44,10,34,88,88,88,32, +32,32,32,32,32,32,32,32,32,32,32,88,34,44,10,34,88,88,88,88,88,88,88,88, +88,88,88,88,88,88,88,88,34,44,10,34,88,88,88,88,88,88,88,88,88,88,88,88, +88,88,88,88,34,44,10,34,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88, +34,10,125,59,10}; + +static size_t xml_res_size_12 = 801; +static unsigned char xml_res_file_12[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,105,32,49,56,32,70,101,98,32,50,48,48,51,32,50,50,58, +49,56,58,49,56,32,43,48,49,48,48,192,42,207,180,0,0,0,7,116,73,77,69,7, +211,2,18,23,5,5,204,218,189,106,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11, +18,1,210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2, +121,73,68,65,84,120,218,165,147,79,72,20,97,24,198,159,111,103,103,103, +87,97,221,194,136,82,84,90,90,92,2,137,12,141,236,82,7,59,5,82,30,188,116, +168,232,80,4,82,8,30,186,117,9,58,120,232,16,116,139,136,8,234,224,57,138, +192,138,16,75,12,98,33,115,117,107,5,221,255,187,243,103,231,207,55,51, +95,239,186,149,46,225,201,23,230,240,206,204,243,251,222,247,225,249,128, +61,22,107,233,110,111,200,73,165,120,247,96,76,30,224,158,136,91,220,237, +179,76,215,178,185,155,151,185,155,203,100,173,37,115,246,236,212,238,128, +171,223,79,142,143,39,22,142,236,3,98,18,208,33,3,249,162,137,217,143,25, +177,156,46,192,44,169,12,186,114,0,115,163,197,191,146,96,11,192,242,253, +87,169,58,160,132,155,104,37,128,17,117,19,95,191,252,98,96,46,224,56,2, +171,117,99,167,164,21,32,84,23,186,74,63,154,4,32,130,25,130,161,19,208, +119,0,143,0,190,194,177,126,201,218,29,224,216,28,106,13,8,135,155,189, +28,130,94,35,24,231,128,75,143,131,198,233,98,167,36,240,231,232,0,46,127, +26,65,71,228,22,84,13,168,86,1,93,7,52,141,0,90,99,116,234,105,18,181,96, +97,226,91,219,127,38,14,63,76,205,243,67,137,161,37,67,130,159,250,9,172, +173,144,31,54,208,214,14,86,46,66,228,138,136,31,239,67,223,96,18,185,138, +195,117,39,180,152,203,148,158,154,207,79,60,218,90,161,194,99,137,177, +46,9,215,21,160,116,172,23,111,87,187,240,238,241,51,209,201,11,44,113, +234,60,174,141,93,132,43,24,54,105,29,31,82,240,205,194,218,80,166,176, +26,39,105,19,176,156,213,140,7,129,253,49,40,50,134,187,3,40,125,248,76, +123,135,88,241,104,18,122,114,0,185,31,192,96,12,56,119,56,130,233,153, +57,86,219,164,21,93,191,186,109,162,86,51,80,42,80,39,97,209,137,162,167, +97,26,111,184,46,195,202,106,72,147,83,233,141,48,214,53,9,181,117,138, +64,144,54,247,156,242,54,160,90,49,32,7,183,92,231,182,45,108,211,105,24, +199,224,80,154,138,121,64,34,66,72,129,70,223,225,55,242,64,26,190,19,80, +103,79,144,94,235,71,91,56,130,142,40,83,13,91,64,120,4,38,35,253,13,10, +20,153,163,68,80,241,36,1,207,99,240,104,66,193,83,173,81,62,243,186,19, +110,245,6,152,113,147,133,34,81,81,103,247,209,219,83,134,93,190,67,176, +56,136,29,109,15,10,53,157,37,149,50,131,247,221,211,192,136,215,122,23, +26,117,250,165,140,188,30,193,202,21,181,249,226,94,0,163,253,23,40,7,147, +8,72,9,112,121,10,243,19,47,246,122,139,255,213,111,194,86,35,208,45,55, +31,244,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_13 = 688; +static unsigned char xml_res_file_13[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,105,32,49,56,32,70,101,98,32,50,48,48,51,32,50,49,58, +51,52,58,50,55,32,43,48,49,48,48,71,119,141,63,0,0,0,7,116,73,77,69,7,211, +3,8,12,6,36,185,41,44,45,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18,1,210, +221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,8,73,68, +65,84,120,218,173,147,77,107,212,80,20,134,159,204,164,51,233,204,56,31, +173,212,145,82,113,45,216,223,224,47,240,47,184,209,157,11,5,65,16,10,130, +184,81,232,166,42,8,110,116,33,136,11,119,117,227,194,149,80,87,165,46, +212,210,162,117,250,57,169,157,73,147,73,38,77,110,226,153,100,218,142, +29,93,233,129,55,92,110,206,251,222,39,185,247,194,63,150,246,219,120,134, +41,108,166,9,69,17,23,179,85,109,58,103,140,76,120,205,131,5,20,243,140, +242,150,89,190,13,7,220,227,198,228,185,241,153,122,161,82,59,61,86,214, +106,227,69,138,229,60,190,10,241,124,31,87,180,241,163,197,118,195,138, +91,109,251,75,224,170,121,89,224,5,15,88,74,2,206,204,86,247,158,221,188, +90,219,197,195,137,92,246,221,46,174,215,165,115,112,64,160,20,42,142,40, +140,230,176,58,29,62,173,52,88,90,92,163,219,8,214,152,227,188,222,11,112, +61,207,255,220,90,149,198,44,149,114,153,179,165,49,84,41,20,226,28,171, +63,119,88,248,186,204,135,197,101,218,91,46,100,142,184,123,35,146,0,219, +241,155,141,245,245,186,82,26,166,97,80,173,84,48,170,53,174,61,126,138, +64,165,134,158,114,162,80,20,139,20,219,71,1,210,212,220,238,56,68,1,228, +93,23,203,178,152,42,20,160,43,239,140,190,233,80,170,175,136,157,227,0, +69,115,163,109,51,34,84,185,108,22,93,211,168,251,42,109,60,105,60,156, +139,6,9,192,220,148,128,209,156,46,1,122,50,233,8,73,31,117,216,28,36,158, +1,130,12,205,29,171,131,81,212,201,103,244,228,239,180,109,39,109,102,192, +56,24,20,15,18,148,248,232,153,97,236,105,161,150,17,124,180,24,211,114, +134,9,194,225,128,100,43,184,207,59,178,92,231,59,81,228,196,68,226,53, +247,172,63,27,131,196,220,160,204,251,227,128,94,221,225,9,5,174,176,37, +45,226,53,77,59,37,136,250,10,146,128,77,57,28,183,152,228,130,28,233,221, +147,119,33,173,187,92,102,143,87,167,38,12,195,222,239,166,91,169,88,17, +227,67,86,121,206,27,252,191,93,166,227,186,205,37,185,84,143,100,100,9, +197,156,60,95,243,50,249,128,255,95,191,0,245,142,251,88,112,106,209,242, +0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_14 = 514; +static unsigned char xml_res_file_14[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,148,73,68,65,84,120,218, +164,83,189,74,3,65,16,158,73,246,126,130,36,134,128,90,8,70,196,202,66, +59,59,77,210,197,103,176,211,198,218,70,16,68,180,17,27,107,27,237,124, +6,45,68,77,145,194,103,8,34,70,81,176,144,144,104,98,114,102,199,219,221, +187,221,187,196,66,200,192,236,238,12,187,223,124,243,179,72,68,48,138, +48,177,220,29,79,0,8,28,244,87,181,251,54,170,29,6,2,40,19,1,17,138,59, +239,10,32,233,175,204,201,82,54,95,128,84,110,30,220,204,52,36,237,76,236, +93,191,215,132,110,243,21,218,31,53,104,212,43,228,117,26,168,25,36,25, +167,185,226,30,140,77,46,69,34,241,120,100,76,64,122,106,209,39,80,134, +220,236,10,60,220,108,75,174,18,128,49,2,119,124,6,126,218,111,255,202, +219,205,230,129,89,100,106,96,57,4,222,231,163,116,148,202,27,114,191,189, +58,11,138,161,124,171,11,0,7,39,231,186,8,204,82,12,19,18,192,230,208,255, +126,150,42,68,92,46,149,55,99,62,89,7,105,191,72,181,29,138,0,248,6,239, +62,73,141,202,225,238,126,204,23,222,17,106,57,220,164,96,251,6,245,234, +127,230,27,245,147,103,206,33,3,22,166,192,191,170,177,142,95,158,166,96, +109,171,3,112,116,109,24,180,170,106,60,72,188,137,21,145,15,69,22,160, +131,98,187,92,15,19,33,196,83,80,126,52,0,62,197,202,133,13,133,245,158, +25,91,209,58,12,70,53,248,2,40,254,66,235,222,50,236,49,236,84,192,149, +116,55,117,228,208,76,47,123,193,32,217,164,159,17,133,111,201,128,225, +80,105,133,51,58,202,242,178,252,74,225,63,210,21,197,40,170,38,133,8,145, +20,70,145,95,1,6,0,60,10,174,84,253,86,25,93,0,0,0,0,73,69,78,68,174,66, +96,130}; + +static size_t xml_res_size_15 = 568; +static unsigned char xml_res_file_15[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,202,73,68,65,84,120,218, +98,252,255,255,63,3,37,128,5,68,8,180,48,130,57,64,18,110,28,72,4,155,209, +140,80,10,36,247,161,230,63,196,0,144,160,32,167,208,127,123,69,23,6,85, +97,117,6,25,62,57,6,94,118,62,20,141,159,127,126,98,120,250,233,49,195, +237,183,55,24,246,223,223,243,255,195,247,119,140,112,23,48,51,51,252,108, +112,110,103,208,151,48,134,107,248,247,255,31,138,1,76,140,76,12,250,146, +134,64,150,31,131,131,146,51,67,241,246,244,159,64,14,59,216,0,86,22,6, +54,121,1,69,134,151,95,159,193,53,184,79,9,68,49,96,87,206,122,176,151, +64,214,130,212,178,176,50,176,129,13,6,17,236,64,230,227,79,119,25,94,125, +125,10,198,238,9,254,16,93,103,254,65,48,16,184,1,13,124,13,148,123,9,196, +143,63,223,101,96,99,65,10,68,118,86,6,134,215,223,31,67,66,144,17,97,107, +95,79,37,216,214,226,146,118,6,6,19,38,134,87,223,128,106,24,33,33,200, +193,134,108,0,144,243,242,219,3,140,16,47,90,209,201,80,238,23,206,80,214, +20,9,54,247,229,119,132,26,144,165,112,3,64,166,189,253,245,8,18,55,64, +144,90,99,205,48,187,229,40,152,221,201,176,18,76,167,184,91,34,28,7,100, +112,112,192,226,19,232,110,187,149,64,173,72,206,71,246,201,225,41,140, +96,231,131,128,141,197,95,136,56,80,1,200,43,135,195,255,51,50,193,92,192, +193,14,241,10,8,31,1,106,2,105,4,177,93,139,254,195,3,146,19,42,207,206, +142,37,12,192,182,194,146,31,200,70,160,166,61,125,80,119,64,93,192,206, +134,35,41,131,2,4,230,108,144,211,130,189,254,50,172,101,96,70,81,8,18, +131,123,239,63,154,1,172,108,96,203,81,194,33,210,255,47,106,102,128,5, +10,66,13,34,41,67,19,5,196,3,255,25,64,33,197,140,225,86,136,70,144,51, +152,145,83,11,35,165,217,25,32,192,0,172,204,147,34,122,233,37,249,0,0, +0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_16 = 705; +static unsigned char xml_res_file_16[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,77,111,32,50,52,32,70,101,98,32,50,48,48,51,32,49,55,58, +52,53,58,52,57,32,43,48,49,48,48,38,220,93,34,0,0,0,7,116,73,77,69,7,212, +7,7,8,30,1,199,217,78,193,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240,1, +66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,25,73, +68,65,84,120,218,141,82,187,110,19,65,20,61,243,216,93,71,224,68,16,41, +13,95,64,7,21,159,193,103,240,1,208,166,161,64,138,228,138,146,142,127, +160,163,129,10,33,33,209,129,34,132,220,80,16,18,252,88,219,107,239,236, +204,92,206,236,218,201,66,82,48,214,217,241,204,220,115,231,156,185,87, +225,254,203,39,7,71,251,199,195,219,38,119,46,32,10,8,65,132,66,8,10,144, +8,129,38,4,74,41,108,98,116,254,124,60,194,215,231,175,1,148,246,224,104, +120,252,246,213,227,123,167,63,22,56,155,57,156,47,29,38,203,128,105,229, +177,112,130,170,17,172,153,168,97,66,24,139,124,175,192,167,55,241,25,239, +57,101,130,15,246,96,152,231,227,179,10,223,127,174,240,171,108,240,123, +233,49,169,152,96,29,81,214,130,85,3,222,10,56,170,128,142,200,111,105, +152,60,43,60,240,144,9,190,216,224,35,166,117,192,108,35,152,213,192,132, +184,216,112,38,230,252,63,119,116,161,72,54,134,241,132,75,51,213,0,251, +68,102,61,15,23,12,230,229,152,19,51,167,48,37,46,156,198,42,164,16,211, +145,245,54,201,160,0,108,142,221,176,209,104,44,189,98,112,154,53,202,64, +37,36,174,98,34,111,73,166,151,36,39,57,111,21,180,31,155,14,214,81,97, +45,26,149,24,172,68,161,140,100,23,250,239,155,119,40,168,64,155,43,5,194, +69,67,27,142,254,106,150,169,86,17,49,147,46,200,152,235,73,146,2,211,179, +0,147,193,107,139,192,18,5,27,225,173,116,18,255,189,185,111,33,89,187, +76,96,185,176,150,155,25,193,6,202,165,179,119,147,252,157,130,190,133, +180,169,51,155,106,11,83,8,50,159,248,234,202,66,63,73,186,104,192,179, +172,103,65,217,140,149,97,135,21,17,5,95,127,144,236,147,20,161,175,191, +129,72,199,82,173,133,118,97,107,81,238,238,225,30,14,189,197,154,217,171, +13,75,90,105,76,189,106,251,166,29,122,23,174,146,102,78,161,190,84,80, +142,191,141,94,140,194,211,44,87,185,243,210,246,124,96,89,211,79,146,149, +68,228,35,67,73,167,196,59,135,247,39,239,184,59,39,154,212,12,119,136, +71,196,131,109,123,170,93,147,220,48,100,139,146,248,76,124,84,93,131,183, +196,182,183,241,127,163,217,42,88,252,1,243,93,220,79,105,182,126,216,0, +0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_17 = 809; +static unsigned char xml_res_file_17[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,105,32,49,56,32,70,101,98,32,50,48,48,51,32,50,50,58, +49,56,58,49,56,32,43,48,49,48,48,192,42,207,180,0,0,0,7,116,73,77,69,7, +211,2,18,21,55,23,209,151,76,61,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11, +18,1,210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2, +129,73,68,65,84,120,218,165,147,75,72,84,81,24,199,255,231,142,247,222, +153,201,121,248,66,4,35,201,50,163,136,22,17,90,180,104,81,45,162,149,210, +162,69,80,139,64,55,146,8,45,220,180,179,85,109,34,40,232,65,109,130,90, +184,106,17,76,160,33,20,162,20,129,97,228,52,168,233,140,206,157,199,125, +204,125,157,185,167,207,145,164,33,92,121,224,192,253,206,185,255,223,247, +157,255,249,14,176,199,193,234,162,219,235,242,81,53,63,222,158,148,79, +248,85,209,237,248,188,203,177,185,227,250,124,67,246,121,46,179,226,124, +177,39,207,143,237,14,184,185,120,106,112,176,103,246,96,19,144,12,1,9, +25,216,200,219,152,156,201,136,31,75,155,176,53,157,193,84,219,48,125,49, +255,87,210,80,7,112,130,224,237,66,5,80,195,219,104,85,194,89,61,139,175, +115,203,12,140,3,158,39,144,174,88,255,74,234,1,66,231,48,117,250,209,38, +0,17,108,5,150,73,192,192,3,170,4,8,84,31,171,3,206,238,0,51,225,163,72, +251,81,18,48,1,200,10,204,50,193,124,31,224,4,112,213,173,236,226,63,128, +152,128,52,223,136,254,120,184,247,218,241,217,143,112,221,14,18,187,181, +105,150,13,170,136,196,6,85,228,101,29,60,65,20,183,80,169,51,113,33,37, +125,62,114,32,121,90,242,10,120,58,117,14,119,167,175,99,85,59,9,236,163, +237,82,1,88,43,160,251,242,60,186,6,222,33,87,206,251,38,15,230,115,191, +11,47,237,33,254,168,6,88,155,66,177,163,143,37,161,244,80,148,0,86,12, +164,30,127,23,35,197,75,172,253,216,25,92,29,78,195,163,164,249,50,85,130, +144,72,205,126,195,76,106,81,195,61,180,213,142,96,44,195,106,102,34,41, +171,139,144,58,99,248,244,161,19,158,5,118,168,111,14,251,251,55,145,254, +25,67,115,178,5,135,91,59,48,244,240,57,51,179,228,11,71,105,199,131,114, +25,214,166,70,108,138,226,116,94,159,76,227,228,91,214,11,80,200,20,16, +11,25,104,92,207,65,235,212,97,174,218,219,42,31,133,29,64,209,132,213, +64,173,161,80,227,184,174,45,60,219,1,247,192,50,142,129,64,243,208,20, +82,208,168,40,224,50,245,71,80,19,211,181,254,3,96,46,94,252,90,66,111, +56,138,72,60,65,161,165,139,128,46,203,213,124,148,168,154,124,152,65,85, +67,168,84,37,65,66,134,45,43,56,22,234,90,249,253,56,90,75,21,12,89,62, +134,35,10,139,183,112,49,113,161,139,178,228,49,74,105,186,17,1,98,209, +176,48,210,206,86,218,251,216,192,29,188,66,181,254,45,208,120,51,10,217, +44,33,114,227,25,244,218,194,3,72,88,193,21,42,123,132,190,122,104,142, +209,218,235,189,190,226,157,241,7,216,134,35,14,151,205,18,205,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_18 = 626; +static unsigned char xml_res_file_18[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,2,57,73,68,65,84,56,141,125,147,203,107,83,65,20,198, +191,153,59,121,52,109,111,233,75,180,86,11,190,136,171,90,234,90,220,168, +43,221,41,5,209,165,75,55,5,253,47,132,42,130,127,129,116,33,138,11,81, +187,209,69,23,10,5,139,98,155,130,149,90,49,196,214,52,185,55,143,155,185, +51,115,142,139,152,144,74,154,217,205,153,57,191,243,157,243,205,8,34,70, +175,245,244,227,230,144,146,114,44,165,228,145,254,116,98,50,149,240,166, +152,229,233,149,31,165,212,252,165,51,183,84,183,164,165,181,252,252,169, +67,254,149,254,164,55,113,117,250,248,120,82,201,145,148,242,84,24,19,202, +154,160,60,137,237,10,109,3,64,87,192,201,241,193,155,39,198,6,102,58,99, +229,134,69,174,104,225,103,20,210,196,168,105,215,0,0,217,13,208,176,174, +6,0,196,205,246,34,109,240,232,125,17,53,195,168,197,140,74,76,168,199, +205,179,174,10,220,127,115,137,28,1,96,52,12,67,74,134,39,24,145,233,1, +176,142,208,82,32,133,104,199,181,99,176,97,72,38,104,67,61,0,29,10,136, +25,173,173,54,132,152,28,4,17,34,221,3,160,173,99,0,96,98,144,4,184,53, +139,152,96,137,161,36,227,79,104,15,6,48,179,215,170,238,65,180,98,8,234, +22,66,72,68,134,17,132,14,64,23,23,110,47,188,190,51,115,108,244,156,177, +205,11,206,17,26,198,193,17,227,219,175,6,118,67,139,239,5,141,216,118, +0,252,236,156,231,103,231,146,153,201,203,106,160,47,117,113,48,157,200, +196,142,160,29,33,212,77,169,55,102,210,32,34,108,21,98,68,145,3,217,253, +46,248,0,70,32,164,142,141,243,8,64,85,219,246,59,80,82,64,74,129,98,153, +1,233,160,148,0,192,201,206,22,42,255,96,71,29,81,31,17,181,147,91,14,248, +169,4,132,16,176,198,161,84,50,245,189,32,185,214,86,16,230,22,173,159, +157,171,128,105,42,161,188,97,37,37,136,129,98,77,99,175,170,97,137,182, +62,172,255,92,41,149,71,47,172,127,138,151,227,64,127,101,150,79,246,13, +49,204,45,230,189,244,192,234,219,151,239,30,63,120,243,249,213,70,33,120, +177,249,59,188,235,152,103,159,47,111,156,189,127,237,252,117,99,81,140, +118,130,85,157,127,182,176,179,52,157,7,0,113,208,119,222,173,54,144,43, +4,0,128,225,76,18,217,195,67,24,159,189,55,193,54,174,151,191,60,44,3,128, +16,192,95,51,173,68,130,10,33,137,220,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_19 = 587; +static unsigned char xml_res_file_19[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,221,73,68,65,84,56,203, +141,147,75,75,227,96,20,134,157,249,29,10,194,236,220,73,7,93,186,116,214, +94,182,138,3,130,130,184,82,156,89,138,160,85,177,56,76,162,86,55,42,130, +218,129,202,160,48,94,16,17,116,225,74,69,81,84,42,82,135,166,73,83,147, +38,189,165,173,190,126,231,27,19,83,47,163,129,135,92,223,39,231,156,228, +43,1,80,66,176,173,148,225,97,84,189,65,57,227,163,147,115,9,60,217,108, +86,207,231,243,183,133,66,1,47,193,238,67,16,132,31,110,137,91,80,69,225, +100,50,137,84,42,229,144,72,36,160,105,26,100,89,230,18,73,146,32,138,162, +35,177,195,31,72,64,15,100,50,25,88,150,197,247,132,105,154,208,117,29, +138,162,112,65,58,157,6,189,196,239,247,255,147,144,160,206,123,254,169, +182,107,115,198,183,44,195,183,28,197,252,86,12,123,167,58,23,80,192,48, +12,196,98,177,103,45,241,153,212,15,93,122,250,130,242,141,176,166,98,252, +143,2,97,69,198,240,239,40,6,3,18,88,75,188,111,187,21,85,85,121,37,145, +72,228,81,208,44,134,3,254,13,21,95,186,183,151,108,243,220,186,130,158, +217,191,208,12,171,72,66,149,208,60,226,241,248,163,160,127,73,198,8,43, +189,178,97,226,187,187,188,32,107,131,4,116,108,75,168,29,154,9,137,28, +65,223,47,9,253,193,40,42,106,7,58,94,251,124,68,46,151,227,195,37,9,225, +8,218,38,195,33,47,19,84,54,6,4,119,192,59,115,141,163,11,211,57,167,42, +72,64,80,53,142,160,166,243,164,167,119,49,130,175,63,67,198,113,200,132, +150,176,48,48,125,141,246,177,43,28,158,25,60,72,80,5,4,133,139,4,244,25, +171,91,14,190,53,249,46,140,206,169,48,90,197,43,180,140,94,98,97,85,126, +22,118,83,36,176,127,164,221,3,13,59,251,90,81,239,182,228,41,47,10,216, +197,187,255,13,242,9,183,142,224,65,242,153,13,40,69,55,222,19,102,207, +154,124,245,186,4,101,36,121,199,114,182,161,165,95,118,15,78,190,230,162, +107,41,55,70,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_20 = 621; +static unsigned char xml_res_file_20[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,255,73,68,65,84,56,203, +141,147,205,107,19,81,20,197,171,127,135,5,193,93,119,37,82,151,46,235, +90,235,86,169,32,40,72,87,74,219,149,74,161,141,138,81,113,70,141,110,140, +72,171,17,83,66,5,109,139,136,80,65,55,181,11,177,69,73,73,167,154,249, +140,243,149,201,204,36,169,199,119,159,206,100,210,70,218,129,195,188,153, +247,238,111,238,185,119,110,15,128,30,18,187,14,48,165,152,6,118,209,65, +166,253,113,92,2,144,10,130,192,106,54,155,91,173,86,11,221,196,246,33, +8,194,157,36,36,9,24,160,224,90,173,6,207,243,98,217,182,13,211,52,161, +170,42,135,200,178,12,81,20,99,72,20,188,143,0,116,192,247,125,132,97,200, +239,36,215,117,97,89,22,52,77,227,128,122,189,14,250,72,54,155,253,11,33, +192,241,244,183,67,131,23,223,230,50,115,42,50,115,10,102,222,233,248,180, +106,113,0,5,56,142,3,93,215,119,88,226,53,57,113,125,61,53,81,80,127,9, +243,6,238,191,214,32,188,82,113,163,168,224,90,94,6,179,196,125,71,86,12, +195,224,153,84,42,149,54,224,180,40,229,179,139,6,142,93,122,63,27,145, +159,46,104,24,125,242,3,186,25,160,248,209,224,16,219,169,225,229,146,194, +235,81,173,86,219,128,201,89,21,55,89,234,253,67,15,198,147,233,21,152, +13,165,26,224,202,180,196,51,177,92,31,151,167,55,120,77,200,82,12,152, +120,33,99,178,160,160,111,112,234,66,18,112,171,248,19,99,185,114,87,173, +73,118,27,112,238,161,84,74,51,64,255,201,188,144,4,164,115,155,88,94,115, +120,6,244,236,214,67,182,222,224,29,34,75,49,224,232,200,215,209,171,207, +43,56,115,183,228,124,41,185,48,237,16,83,143,55,113,254,94,25,203,171, +54,175,1,89,240,252,144,173,117,30,220,1,160,54,30,25,94,25,59,149,249, +238,140,60,146,112,86,44,99,248,246,58,158,189,81,121,32,169,209,104,236, +80,7,32,250,145,62,172,152,88,250,108,118,244,58,130,108,87,87,0,123,249, +251,127,115,208,69,91,49,224,31,228,48,43,144,71,27,123,9,102,103,93,62, +189,9,64,47,65,246,48,206,145,104,244,123,255,0,61,247,217,210,167,139, +213,231,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_21 = 603; +static unsigned char xml_res_file_21[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,237,73,68,65,84,56,203, +141,147,75,75,220,80,20,199,181,223,192,189,3,253,14,202,124,129,82,55, +133,66,55,110,68,232,182,48,203,66,17,169,82,209,58,11,17,212,12,116,68, +161,160,160,214,71,41,138,138,5,177,32,142,207,133,160,125,104,17,84,38, +49,201,164,121,103,158,246,223,123,110,205,37,197,72,13,252,8,201,61,231, +119,207,57,112,234,0,212,17,236,105,100,52,49,146,255,225,33,227,129,200, +139,8,154,74,165,146,85,173,86,175,107,181,26,226,96,231,144,36,105,40, +42,137,10,146,148,236,121,30,124,223,23,216,182,13,211,52,161,170,42,151, +40,138,130,76,38,35,36,97,114,61,9,40,160,88,44,162,92,46,243,55,225,186, +46,44,203,130,166,105,92,16,4,1,232,146,108,54,251,87,18,10,90,82,82,106, +245,216,195,251,45,11,167,138,47,36,148,224,56,14,116,93,191,213,18,159, +73,40,120,244,98,36,53,190,105,49,129,141,195,139,128,7,176,150,120,223, +97,43,133,66,129,87,34,203,242,109,1,125,140,109,154,188,130,133,61,11, +115,59,38,102,115,38,76,183,44,36,84,9,205,195,48,140,120,193,187,141,95, +152,200,89,144,214,13,244,47,105,24,90,43,64,90,214,69,37,212,14,205,132, +68,177,130,225,207,6,70,24,95,142,29,236,255,244,240,246,147,134,158,121, +133,7,87,42,21,62,23,146,16,177,130,193,21,29,3,236,198,253,83,15,123,39, +46,222,44,168,232,158,86,196,60,72,64,80,53,66,208,154,185,76,15,172,234, +72,62,31,239,72,47,170,72,47,234,60,121,247,187,139,174,217,43,188,158, +202,243,100,170,128,160,228,127,4,237,163,249,15,131,76,240,180,255,96, +157,74,238,253,168,226,213,148,140,151,147,121,116,206,200,232,152,150, +49,191,161,11,65,136,16,60,233,59,107,104,233,58,121,156,104,110,123,182, +251,131,221,252,205,197,206,87,7,219,4,155,69,238,200,198,249,85,192,171, +136,18,59,3,246,243,247,93,123,16,195,181,16,220,72,154,217,128,124,58, +184,79,50,139,117,249,246,70,4,9,146,220,99,157,67,104,245,19,127,0,89, +147,194,83,251,77,141,110,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_22 = 342; +static unsigned char xml_res_file_22[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,4,0,0, +0,181,250,55,234,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,0,232,73,68,65,84,24,25, +5,193,49,110,83,65,24,6,192,217,199,158,129,52,65,184,130,142,130,40,161, +73,147,83,112,46,75,80,112,34,132,210,81,210,65,138,8,55,24,37,142,131, +223,254,251,49,211,162,157,59,243,2,0,176,243,43,19,132,139,231,253,90, +35,35,35,35,35,35,207,249,180,181,177,68,8,87,107,61,230,144,67,14,249, +155,63,249,157,145,251,124,222,218,88,130,230,106,228,152,127,57,230,152, +135,236,179,203,200,83,30,243,101,107,19,77,115,57,190,149,175,78,78,86, +171,213,71,64,255,224,182,3,139,107,68,41,195,222,52,188,4,29,104,110,173, +134,147,161,148,233,6,208,1,46,1,81,166,18,64,7,248,110,24,74,41,49,93, +3,58,192,59,0,49,17,64,7,248,161,12,211,84,152,222,3,58,192,27,4,1,0,116, +128,159,166,105,154,2,222,2,58,136,246,26,0,128,73,178,36,102,29,77,0,0, +179,158,20,45,218,43,103,22,0,0,148,93,238,254,3,3,180,149,207,94,76,118, +19,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_23 = 655; +static unsigned char xml_res_file_23[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,33,73,68,65,84,56,203, +149,147,235,78,19,81,20,133,137,137,201,137,207,160,86,137,134,200,145, +128,196,27,66,91,6,40,173,13,8,38,208,251,133,94,164,128,180,165,237,164, +77,161,54,234,15,77,124,18,159,11,68,197,222,176,210,153,118,58,211,229, +174,152,74,45,37,225,199,78,206,100,206,250,246,172,181,247,12,0,24,184, +76,213,215,66,215,206,62,119,95,16,51,58,42,222,87,236,15,114,217,237,141, +215,108,78,67,47,160,45,206,236,162,149,206,66,139,39,123,32,117,95,128, +215,3,97,52,54,182,240,235,229,202,231,234,226,210,189,127,128,191,98,228, +223,161,69,165,37,68,52,55,183,59,16,217,187,198,169,59,154,209,56,144, +203,163,125,62,54,91,227,229,25,211,149,83,64,42,205,90,9,81,107,237,190, +1,62,126,130,150,205,181,1,104,4,66,92,246,248,57,117,135,178,29,3,232, +189,236,15,224,120,254,185,90,22,230,174,118,89,208,98,9,166,190,142,169, +154,152,1,222,127,128,154,74,163,30,12,131,186,67,217,138,2,217,189,63, +231,138,201,66,226,89,118,110,136,205,200,38,107,132,214,213,102,116,135, +236,188,5,246,242,36,204,1,153,44,100,143,15,149,57,179,90,158,158,97,253, +167,112,26,22,147,92,94,13,89,178,227,246,1,14,55,32,166,81,153,157,215, +74,70,129,253,127,191,7,32,57,61,237,81,1,52,13,216,156,192,138,29,216, +73,146,111,11,10,19,83,252,66,128,228,112,115,201,229,129,18,142,0,73,145, +132,41,32,70,118,40,64,121,213,142,178,222,136,239,99,227,252,92,64,205, +238,226,146,211,13,37,180,14,208,24,37,135,11,20,150,90,156,50,104,39,139, +203,64,100,3,181,23,203,40,60,124,140,195,161,97,222,5,160,205,226,212, +29,74,240,21,117,77,64,162,79,167,176,212,226,164,129,21,158,76,176,163, +241,71,106,213,100,6,130,33,156,88,172,56,26,25,197,193,173,65,222,1,208, +102,9,53,155,3,74,32,4,105,213,1,10,75,45,62,211,119,2,251,54,50,198,190, +14,223,87,127,26,5,72,214,5,252,24,125,128,253,27,58,161,203,2,109,150, +80,93,88,66,201,48,173,81,88,61,105,31,222,29,98,95,6,239,168,103,197,61, +33,150,244,70,161,240,116,146,245,251,153,14,116,183,217,254,245,155,194, +133,99,188,108,253,6,114,187,164,199,219,237,190,20,0,0,0,0,73,69,78,68, +174,66,96,130}; + +static size_t xml_res_size_24 = 792; +static unsigned char xml_res_file_24[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,105,32,51,48,32,83,101,112,32,50,48,48,51,32,50,51, +58,53,52,58,50,54,32,43,48,49,48,48,101,213,255,193,0,0,0,7,116,73,77,69, +7,211,9,30,21,54,56,94,91,206,140,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11, +18,1,210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2, +112,73,68,65,84,120,218,173,83,93,72,20,81,24,61,227,254,224,162,235,66, +254,36,104,25,61,88,102,152,89,160,132,97,4,21,25,177,20,65,86,190,85,208, +67,61,69,244,210,83,208,75,136,212,75,68,15,69,36,244,32,4,61,136,134,218, +74,22,6,185,238,106,182,208,34,254,176,107,40,181,171,179,227,238,206,220, +153,123,111,223,46,185,172,237,171,243,48,247,206,247,125,231,204,57,103, +238,0,219,125,5,128,246,49,160,111,10,104,254,191,247,25,184,62,164,96, +100,0,56,123,31,40,42,0,207,3,79,163,23,143,9,243,225,101,25,84,148,79, +249,189,73,224,76,168,190,130,201,171,245,50,210,228,145,67,54,37,144,169, +111,97,145,181,229,222,154,206,102,197,238,4,118,158,58,112,220,15,116, +103,234,180,182,200,26,79,127,67,71,173,3,105,3,172,196,1,131,75,127,1, +65,60,26,235,55,23,87,0,195,64,117,235,30,88,229,37,189,195,192,73,86,89, +54,120,212,219,224,134,186,1,205,48,17,154,138,71,237,192,221,2,130,50, +224,245,210,216,172,132,164,7,157,225,176,183,177,178,184,194,61,210,214, +213,84,5,53,1,193,45,204,124,87,133,219,16,55,206,1,106,1,193,62,96,54, +54,49,55,14,203,4,76,11,14,151,3,237,93,7,21,168,52,203,77,132,35,26,18, +145,228,179,19,192,135,77,76,65,146,105,46,122,22,199,195,4,96,89,43,72, +36,137,140,225,119,60,133,31,223,98,65,13,184,151,63,191,133,128,146,174, +77,3,119,138,61,46,2,145,10,198,178,224,236,62,109,194,146,88,35,128,45, +31,163,108,174,95,129,155,216,181,227,241,145,243,141,30,59,215,129,20, +81,89,214,63,18,34,144,28,241,117,29,190,47,241,201,50,1,239,105,224,87, +142,224,35,112,161,174,181,238,221,222,182,26,96,45,65,64,78,22,56,217, +102,176,81,112,194,164,125,166,38,5,116,221,132,207,175,173,164,83,162, +187,11,24,205,90,88,167,68,133,73,126,255,196,41,125,61,235,61,177,145, +196,192,240,178,53,191,164,209,91,56,97,57,9,178,96,87,36,58,90,138,171, +73,223,131,92,6,14,155,210,187,187,174,148,124,166,179,224,85,53,9,223, +216,106,76,106,102,71,32,168,62,95,136,82,93,8,72,82,193,72,217,228,60, +3,157,181,151,25,172,61,115,75,113,57,202,181,141,67,134,75,65,152,134, +127,78,171,211,37,66,94,234,4,230,168,61,241,126,70,179,216,126,215,237, +12,106,110,153,193,136,241,39,215,128,55,185,12,250,128,138,82,103,209, +160,176,43,85,122,138,191,160,20,122,110,145,150,252,180,223,2,143,232, +19,58,221,192,171,43,64,104,219,254,222,191,141,62,42,191,243,181,250,120, +0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_25 = 512; +static unsigned char xml_res_file_25[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,4,0,0, +0,181,250,55,234,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,146,73,68,65,84,40,207, +85,81,77,75,2,97,16,94,252,1,222,253,9,254,143,189,116,17,178,139,84,151, +50,136,10,139,46,69,137,145,217,18,81,208,161,58,148,17,69,101,81,27,164, +80,82,168,171,182,174,233,186,150,81,82,244,113,200,226,37,33,79,94,119, +159,166,109,33,99,14,51,239,204,51,207,51,239,12,7,238,207,84,111,94,146, +37,201,219,154,179,92,197,89,182,171,182,124,253,3,239,16,235,103,182,152, +253,216,217,2,168,132,203,122,145,41,142,44,123,197,11,98,44,234,16,217, +190,190,19,182,0,55,254,103,124,225,9,217,102,202,168,226,14,39,134,216, +84,193,16,199,130,223,4,20,3,178,241,76,133,71,2,85,77,127,11,21,87,152, +48,70,3,150,68,78,184,67,9,5,92,96,3,219,200,66,65,134,250,231,5,83,226, +74,147,107,233,198,3,52,36,48,163,140,243,83,252,146,114,73,32,13,139,141, +185,90,72,227,100,253,147,136,11,40,99,15,179,252,79,207,58,47,66,38,54, +133,6,30,210,57,73,127,35,77,133,58,162,88,54,1,171,252,1,49,196,145,166, +124,143,206,237,104,75,181,173,198,53,65,74,216,84,214,248,21,146,200,144, +220,57,250,26,158,90,135,102,14,41,10,57,26,43,135,60,14,177,79,81,10,167, +20,13,8,214,30,142,2,17,227,158,202,42,42,52,75,158,152,114,72,210,107, +216,232,255,253,230,174,63,129,87,68,16,106,10,134,76,234,62,99,184,25, +33,253,105,184,253,214,30,130,225,17,189,143,141,57,66,76,37,134,94,214, +233,240,48,151,222,22,110,57,214,136,115,208,62,105,11,214,147,136,161, +171,222,105,235,182,187,156,255,174,249,107,62,175,71,106,151,220,255,206, +253,13,9,136,93,8,242,153,238,134,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_26 = 3562; +static unsigned char xml_res_file_26[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,3,5,73,68,65,84,120,218,124,147,201,111,91,85,20,135,191,123, +223,243,148,56,37,182,75,92,217,73,73,17,141,168,10,133,69,42,129,8,72, +32,177,67,12,11,36,134,172,58,32,229,15,64,32,4,98,195,158,110,144,10,221, +178,32,20,9,137,138,16,171,18,169,80,219,132,48,52,165,12,105,18,60,180, +137,93,167,30,222,139,237,146,231,231,123,47,139,200,198,43,142,116,164, +115,244,59,195,119,22,71,100,50,153,107,177,88,108,212,24,163,1,132,16, +244,155,49,6,173,53,150,101,201,70,163,225,85,42,149,215,164,148,151,187, +186,29,143,199,199,38,39,39,19,252,143,25,99,16,66,80,40,20,76,169,84,138, +6,131,193,158,102,3,10,192,243,60,164,148,72,41,17,66,244,188,143,0,165, +148,0,66,253,195,237,254,45,253,46,165,164,123,82,55,238,150,246,39,178, +191,89,107,141,16,2,219,222,155,171,181,238,225,3,88,150,181,183,213,182, +255,35,232,138,74,41,130,193,32,158,231,225,56,14,201,100,178,71,6,80,190, +83,198,117,93,194,225,176,40,22,75,180,125,181,71,103,140,65,41,69,36,18, +33,16,8,112,246,236,167,156,56,113,146,47,103,103,177,44,11,41,37,115,115, +223,50,51,51,195,236,236,23,157,213,213,213,218,103,231,206,33,132,64,41, +133,221,189,247,194,133,111,248,126,225,18,217,141,44,205,102,147,239,230, +231,169,212,170,128,224,143,27,191,83,119,28,110,221,218,52,185,92,238, +67,173,212,39,82,202,175,125,223,71,172,172,172,148,211,233,244,200,139, +47,189,140,183,235,241,216,177,199,73,36,98,92,90,88,96,183,189,203,224, +96,20,219,178,153,120,248,8,202,247,201,231,179,40,173,203,83,83,79,61, +177,185,121,59,111,107,173,57,127,254,43,132,148,220,159,220,207,143,203, +87,73,196,18,4,66,65,34,209,1,198,70,199,216,55,52,68,62,155,99,227,239, +13,238,139,199,232,232,78,114,113,105,105,198,169,215,223,177,210,233,244, +251,153,139,153,176,233,104,142,62,244,8,35,7,246,179,252,243,79,248,190, +66,74,201,174,215,38,61,58,198,218,234,95,140,63,56,206,112,116,152,70, +189,133,187,227,30,95,91,191,89,176,254,105,221,123,175,190,230,134,162, +213,97,170,215,92,194,225,16,142,170,18,10,133,136,68,34,104,173,113,92, +151,137,35,19,132,91,17,74,151,171,140,168,52,201,112,210,106,217,59,7, +108,229,41,251,232,192,49,94,121,225,85,214,179,107,44,229,175,32,149,197, +3,135,15,114,250,228,91,24,163,249,248,204,25,54,179,183,145,165,16,207, +30,127,158,169,231,158,230,202,213,31,248,101,113,209,150,38,96,154,141, +125,14,119,90,37,124,209,33,30,27,230,208,225,241,218,244,244,116,126,116, +52,93,72,165,82,133,55,223,120,61,239,182,220,170,176,13,205,118,131,245, +252,77,74,106,139,166,110,220,181,175,95,255,237,212,208,80,238,237,252, +189,220,33,11,75,214,155,245,27,129,1,251,3,229,171,236,214,214,150,165, +181,38,30,79,104,36,7,127,45,46,191,91,108,111,62,58,95,82,178,226,108, +111,215,93,231,35,219,247,253,185,90,173,150,170,239,212,159,4,6,77,199, +92,76,165,83,203,8,122,15,101,89,22,149,237,202,221,114,117,251,243,106, +163,250,140,49,116,148,175,138,192,159,255,14,0,133,61,138,66,189,249,108, +251,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_27 = 675; +static unsigned char xml_res_file_27[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,53,73,68,65,84,56,203, +133,147,77,72,85,81,16,199,127,231,122,159,62,141,231,194,175,22,213,34, +90,84,18,173,84,12,108,231,162,149,33,210,162,104,23,45,219,135,65,180, +137,32,218,215,46,44,33,90,188,32,162,54,109,130,132,12,9,66,91,229,71, +226,194,252,232,67,125,250,222,189,247,156,153,105,241,82,81,158,245,135, +225,12,51,240,155,57,103,230,56,51,99,191,70,223,175,221,54,227,186,152, +30,85,85,202,105,32,245,66,16,253,107,130,4,67,84,39,98,106,72,205,110, +12,245,20,218,248,143,238,60,159,57,91,19,32,170,109,0,47,231,70,8,26,216, +72,74,148,125,5,47,129,160,129,32,129,155,231,238,226,189,52,28,0,168,94, +235,74,231,181,3,171,111,37,1,31,132,218,0,81,0,158,141,173,28,8,24,232, +106,33,11,66,252,245,117,247,231,124,115,103,167,115,209,78,50,200,189, +29,255,114,95,7,197,241,101,134,122,15,239,1,252,216,72,170,29,56,139,78, +29,235,123,156,115,206,129,1,24,254,205,18,106,70,92,7,197,15,43,224,160, +56,190,76,28,57,48,35,23,195,233,35,77,100,94,136,9,150,160,89,67,186,244, +16,201,234,32,106,70,164,31,3,226,58,199,96,79,123,205,14,102,22,55,8,65, +137,241,46,50,205,144,172,30,83,67,43,11,28,74,102,41,77,188,224,204,212, +40,211,19,112,22,152,254,180,111,212,3,111,49,148,24,103,121,13,21,182, +190,175,144,46,207,162,89,153,11,185,121,90,187,31,208,210,117,21,201,50, +188,40,219,251,22,229,91,89,29,57,15,64,99,236,52,198,71,196,141,29,180, +247,14,3,10,102,76,126,91,102,241,203,59,188,79,17,85,210,44,67,36,197, +212,147,107,189,200,9,96,248,201,20,107,165,228,85,140,55,51,73,208,242, +36,38,235,152,148,56,217,56,15,121,197,52,1,173,96,186,137,201,38,38,101, +26,143,95,98,246,35,20,111,245,57,128,152,20,51,13,168,95,197,194,122,21, +162,41,88,0,75,49,45,99,178,133,134,18,38,37,112,110,207,91,196,100,102, +14,193,194,47,44,172,85,77,214,119,97,161,132,201,6,38,91,152,38,104,186, +0,144,236,0,44,211,223,161,252,179,201,111,214,23,208,66,100,150,3,45,128, +181,97,146,2,25,22,85,79,23,9,146,36,102,153,166,187,128,36,189,63,247, +104,176,7,163,31,71,225,159,223,207,0,55,150,161,246,116,59,244,7,169,146, +115,193,212,214,167,43,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_28 = 444; +static unsigned char xml_res_file_28[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,78,73,68,65,84,56,203, +181,82,187,74,3,81,16,61,27,246,43,140,218,90,248,64,173,67,64,140,164, +208,86,108,36,8,254,128,127,162,149,22,91,216,216,218,68,116,203,152,15, +80,20,172,253,134,236,230,238,221,251,30,239,174,236,130,96,66,52,122,96, +184,195,204,229,204,153,195,4,68,132,121,16,78,106,92,14,51,226,202,128, +9,133,132,11,156,31,45,5,223,253,107,76,34,224,210,160,189,0,236,54,67, +140,24,255,185,130,52,151,200,243,16,66,88,36,201,47,8,70,76,224,250,153, +35,25,115,164,105,62,145,32,152,215,196,198,180,102,28,199,212,239,247, +167,78,168,21,12,6,3,114,206,193,90,11,173,181,223,93,128,115,238,125,200, +145,101,25,24,99,229,91,213,162,40,10,190,120,160,148,66,183,219,13,102, +145,221,235,245,232,207,60,8,206,134,167,100,157,133,245,242,157,127,175, +58,55,165,138,147,135,67,146,70,66,72,229,67,32,62,126,44,235,91,23,235, +164,164,134,209,6,112,132,134,177,6,157,230,1,246,22,247,161,125,94,65, +104,129,118,115,7,173,229,22,114,41,235,186,242,151,185,185,178,134,237, +213,13,63,144,16,26,91,76,55,158,204,162,200,43,228,66,34,85,9,152,26,251, +92,212,245,98,114,161,216,249,213,233,147,192,224,238,253,182,92,161,104, +212,4,94,246,253,91,12,233,87,40,162,130,179,132,167,215,23,84,214,253, +239,33,205,130,15,118,205,227,18,99,124,149,175,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_29 = 650; +static unsigned char xml_res_file_29[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,2,81,73,68,65,84,72,137,213,150,177,79,21,65,16,198, +127,179,187,239,65,3,39,137,13,209,4,197,88,144,152,24,80,99,4,108,44,108, +44,161,246,127,240,143,176,182,176,55,26,59,163,38,82,217,216,80,96,34, +193,196,74,27,144,40,248,4,18,20,98,144,119,183,59,99,113,247,158,47,128, +20,15,40,156,100,50,59,151,205,247,237,204,119,59,119,98,102,156,164,185, +19,69,7,194,131,71,207,31,175,172,52,110,23,69,42,146,41,166,74,82,197, +20,84,149,164,101,133,73,21,51,5,64,196,225,164,35,58,193,123,71,111,189, +142,153,129,64,45,132,218,185,161,179,51,97,189,177,54,113,119,250,206, +224,110,179,32,166,68,17,19,49,38,98,82,98,76,164,164,196,164,164,84,174, +17,240,206,225,189,195,59,71,8,158,177,75,195,124,90,92,229,242,200,121, +150,190,52,24,30,26,100,181,177,193,179,87,175,39,93,140,205,35,139,240, +225,227,50,0,159,191,126,7,96,185,138,88,34,136,115,140,92,56,131,15,1, +51,99,107,107,155,236,84,134,28,10,41,237,112,208,62,17,161,200,115,68, +164,20,57,4,143,247,158,16,2,75,75,139,4,95,230,222,123,156,115,32,210, +206,75,255,219,34,119,128,139,8,226,74,234,176,151,93,85,247,157,198,203, +225,245,28,102,251,8,58,161,94,190,219,0,192,188,48,117,229,244,241,16, +20,49,242,118,110,142,164,202,118,184,8,64,108,198,174,192,15,36,16,224, +198,248,56,0,243,47,230,201,178,140,157,120,140,45,234,180,123,83,215,186, +6,254,39,65,234,16,249,216,52,104,205,59,51,40,242,188,157,111,87,100,197, +238,17,53,48,12,235,136,11,239,23,40,242,156,31,223,2,253,89,198,78,209, +173,6,174,106,145,89,219,157,115,140,141,142,2,112,189,235,115,183,76,9, +24,168,25,98,86,77,66,65,171,30,205,44,108,150,219,156,48,125,245,40,247, +160,179,2,145,182,40,109,13,126,23,93,215,208,22,217,170,10,68,132,217, +217,89,76,141,205,159,125,244,103,253,252,202,143,116,15,74,80,231,28,102, +198,228,228,4,173,129,113,171,123,220,202,28,193,123,47,141,181,117,84, +203,59,208,250,138,169,42,170,86,186,149,235,122,232,161,30,234,213,0,244, +244,212,234,36,43,240,98,212,66,13,179,68,175,235,163,105,59,152,37,156, +32,33,55,158,222,127,248,228,102,140,154,172,234,151,97,165,12,70,249,250, +90,149,83,93,16,17,130,247,41,198,228,247,62,243,120,51,73,193,123,31,6, +6,178,55,242,223,255,85,252,1,24,65,56,54,40,27,151,24,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_30 = 1667; +static unsigned char xml_res_file_30[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,6,74,73,68,65,84,72,137,117,150,105,108,84,215,21, +199,127,247,190,55,251,230,241,100,112,109,192,91,216,151,24,74,65,160, +180,41,82,213,170,75,210,8,168,82,164,166,9,93,84,129,162,126,128,74,16, +90,165,85,82,42,8,81,19,17,169,72,205,7,66,211,180,168,173,19,74,161,73, +37,104,235,8,186,64,195,106,183,33,24,136,1,47,241,216,227,241,140,61,203, +155,247,238,189,253,96,99,182,228,255,229,233,190,115,239,255,156,243,63, +231,92,93,193,109,8,166,23,242,137,217,139,105,153,51,151,100,50,65,165, +226,16,8,4,208,90,83,46,151,41,149,202,132,195,33,0,2,193,32,82,8,92,215, +165,169,113,58,189,125,31,210,117,246,28,3,221,157,84,50,157,83,156,146, +187,96,140,161,92,42,205,43,149,202,13,198,152,187,205,31,137,170,235,134, +28,199,249,180,49,250,30,219,29,14,140,86,120,174,59,109,215,15,55,190, +247,253,13,107,250,60,207,11,106,125,239,161,219,161,181,102,110,235,204, +210,214,141,95,63,238,185,238,50,163,220,59,236,246,237,11,207,41,222,167, +60,119,240,161,7,90,1,216,179,79,148,181,214,65,132,112,62,142,220,113, +170,35,27,215,60,68,52,20,64,8,241,174,170,150,219,128,11,31,149,65,74, +149,115,67,7,94,125,137,225,124,145,108,161,200,11,79,127,7,215,117,43, +24,227,55,198,112,83,50,99,12,70,107,28,199,25,217,185,245,219,73,199,245, +24,204,141,113,180,125,47,210,23,60,15,180,221,36,21,147,223,86,236,196, +149,215,142,28,101,126,115,61,153,220,24,158,82,52,214,213,50,94,118,248, +217,47,14,224,186,158,40,151,203,68,34,97,180,54,104,173,243,91,55,173, +143,79,75,198,232,31,206,99,73,65,186,38,70,110,172,196,23,150,207,5,120, +16,248,167,0,88,187,249,69,211,254,243,205,252,235,127,215,184,208,125, +3,53,169,187,37,37,117,169,4,74,41,94,249,205,97,10,249,130,8,71,34,84, +171,213,252,166,13,107,227,225,96,128,193,108,30,165,53,150,148,248,125, +54,201,120,132,120,36,200,190,246,163,252,118,231,83,66,0,132,235,151,62, +89,45,142,238,127,246,229,189,132,130,126,50,217,60,66,128,20,2,109,12, +169,154,56,126,159,77,79,239,224,240,88,177,52,58,187,121,250,44,219,182, +200,230,10,183,186,69,74,146,137,40,0,91,30,95,75,178,101,233,142,92,119, +199,51,2,32,57,123,53,185,238,142,117,64,251,206,215,254,66,126,172,196, +135,153,44,150,53,81,34,165,52,161,96,128,173,27,30,102,116,188,204,43, +237,127,165,226,84,145,82,76,57,168,137,71,137,132,67,60,247,189,175,2, +60,13,60,63,85,131,105,139,190,68,166,235,109,128,117,118,188,165,125,243, +142,221,140,141,151,24,204,100,17,147,28,198,64,44,22,65,107,77,177,88, +158,250,15,16,139,77,144,239,127,249,37,74,253,103,182,3,187,110,218,44, +128,112,250,126,74,67,87,0,222,67,248,187,58,59,47,61,246,201,149,43,25, +25,45,144,31,45,224,186,30,174,91,165,80,24,167,88,44,225,186,85,170,213, +42,149,138,131,101,89,132,195,33,14,253,238,247,20,250,187,183,97,133,158, +71,149,110,73,7,224,20,199,110,245,182,231,188,225,57,229,71,15,31,60,76, +107,243,12,98,241,24,158,231,97,12,136,201,176,141,1,173,13,129,128,159, +88,44,194,137,142,227,20,115,153,31,4,107,234,119,27,85,189,99,86,108,128, +199,55,110,226,82,247,23,113,93,23,199,113,24,205,102,255,84,24,201,62, +90,63,173,246,144,109,73,222,61,211,69,185,92,198,178,172,137,32,180,70, +107,205,204,153,13,164,146,113,60,183,250,163,230,197,159,122,177,251,84, +7,120,249,59,28,136,237,123,223,228,106,79,31,215,122,174,163,181,198,243, +60,114,67,67,164,234,234,46,174,254,236,170,185,239,119,247,48,208,63,128, +101,89,8,41,167,10,226,186,46,209,88,140,229,203,22,115,252,196,169,92, +54,147,169,173,77,167,9,134,66,88,150,133,207,103,35,165,196,46,140,21, +169,84,28,92,215,69,41,133,231,186,212,55,54,22,150,46,89,24,59,119,225, +34,227,227,227,68,99,49,108,219,158,228,54,8,33,48,198,80,169,84,56,223, +121,145,21,43,150,38,79,159,233,52,133,209,81,161,148,194,178,44,108,159, +15,33,4,182,82,26,165,20,74,41,180,82,164,210,233,194,146,182,5,177,238, +203,61,0,212,214,38,145,147,145,251,253,62,108,219,102,124,188,136,148, +146,64,192,143,227,84,249,160,167,151,149,43,150,114,250,108,151,201,101, +179,1,101,89,85,33,4,66,8,164,154,148,69,43,69,50,149,202,45,105,91,16, +187,218,211,139,49,134,72,36,76,48,24,32,16,240,19,137,132,249,202,231, +86,177,254,145,213,36,147,9,252,126,31,161,80,144,104,52,130,82,138,238, +171,215,89,210,182,128,84,58,237,104,165,2,74,41,140,49,216,158,167,112, +93,143,198,230,166,209,153,51,234,19,61,215,250,192,24,162,209,8,150,101, +97,89,18,159,207,199,236,150,25,188,245,183,127,99,140,97,229,178,69,92, +250,160,151,82,169,140,207,103,240,251,125,84,42,14,215,111,12,176,96,254, +44,174,69,194,149,222,27,189,9,41,101,65,186,174,203,183,214,127,89,239, +219,241,84,98,48,51,140,54,134,112,56,68,32,224,159,104,195,104,132,197, +243,90,232,56,241,31,34,145,240,55,18,137,248,131,111,31,251,7,15,204,107, +165,38,17,159,218,23,14,135,208,90,211,63,48,196,195,159,127,144,239,62, +249,181,188,82,10,107,205,19,27,185,49,48,148,120,235,196,185,85,177,201, +116,167,14,133,2,204,106,110,224,216,59,167,72,38,107,182,26,99,126,25, +12,6,110,248,124,190,243,103,47,92,92,255,153,149,109,56,85,15,79,169,9, +189,165,228,190,84,13,215,250,50,140,140,142,29,201,100,134,15,72,128,222, +254,204,150,203,151,123,126,60,94,44,209,210,52,157,112,40,72,60,26,161, +101,102,61,71,59,78,146,78,167,182,217,182,245,130,148,18,75,74,164,20, +127,108,104,168,91,123,240,207,29,204,110,110,160,38,30,37,16,240,211,210, +212,128,235,121,244,245,13,252,186,235,191,239,63,34,132,152,152,100,203, +146,216,182,245,211,124,97,252,153,225,145,81,22,206,105,98,217,162,251, +57,246,206,73,234,235,235,182,89,150,181,251,102,39,77,13,144,16,7,27,27, +167,175,123,227,200,223,105,154,94,71,107,99,61,249,66,145,145,145,252, +175,164,148,79,72,41,97,34,43,49,117,5,248,108,107,71,169,84,254,201,146, +57,141,116,94,186,78,115,211,140,237,150,37,119,243,241,120,179,185,121, +198,99,199,79,158,103,249,194,86,242,133,177,215,165,20,27,110,242,73,41, +239,125,85,216,182,253,220,179,123,94,63,93,155,136,238,85,90,239,186,135, +146,137,123,232,54,252,97,254,156,150,45,123,246,31,186,98,89,214,55,239, +206,244,255,74,24,231,27,106,141,149,170,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_31 = 347; +static unsigned char xml_res_file_31[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,1,34,73,68,65,84,72,137,181,150,65,174,131,48,12,68, +199,166,72,92,14,14,203,134,61,135,202,134,198,249,155,111,148,166,147, +164,160,214,18,106,2,193,207,158,216,164,146,82,194,47,237,81,222,88,215, +245,43,196,101,89,132,2,0,96,158,103,28,199,1,17,1,0,136,200,203,229,102, +102,231,21,99,68,140,17,211,52,97,219,182,122,6,238,80,85,155,206,1,96, +24,6,168,42,82,74,80,85,168,42,198,113,124,89,67,1,0,16,99,124,115,156, +143,61,0,22,212,71,0,0,200,11,64,68,206,185,143,91,192,46,192,29,180,170, +204,165,97,242,185,113,236,255,203,102,118,142,115,80,62,247,53,181,44, +186,25,152,217,91,116,76,46,31,95,2,228,47,149,82,49,249,110,1,202,205, +100,247,242,108,75,153,40,192,155,199,163,98,13,7,128,246,202,71,0,223, +196,154,214,62,103,251,83,90,19,80,58,102,144,94,57,87,203,180,4,245,74, +181,6,184,45,81,110,254,140,61,191,45,81,77,174,203,128,90,180,189,172, +186,128,252,183,21,109,15,66,1,229,7,172,213,11,189,47,42,5,132,16,158, +33,4,122,216,176,195,135,172,59,253,82,192,190,239,205,115,226,138,201, +175,255,85,52,27,237,27,246,7,83,200,247,201,63,145,191,196,0,0,0,0,73, +69,78,68,174,66,96,130}; + +static size_t xml_res_size_32 = 1428; +static unsigned char xml_res_file_32[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,91,73,68,65,84,72,137,157,148,203,143,29,71,25,197, +127,85,253,184,207,153,185,241,216,51,19,99,3,22,198,88,4,153,4,33,145, +8,48,43,54,172,8,138,77,28,20,34,25,25,72,88,177,98,97,16,146,21,86,108, +80,130,98,129,4,68,140,88,240,7,96,66,226,144,77,192,17,34,177,194,35,209, +64,156,216,9,15,51,190,115,231,62,186,111,119,85,125,85,197,226,222,25, +140,34,28,137,35,181,186,85,93,85,231,212,247,157,58,234,200,7,238,56,187, +255,224,251,31,189,255,212,9,190,114,250,1,174,95,255,23,226,61,183,130, +214,154,61,123,122,188,186,241,58,103,191,249,40,171,107,43,252,253,205, +191,30,204,210,236,111,62,8,214,88,186,189,53,222,181,218,33,237,247,251, +201,237,7,142,208,108,53,1,88,91,91,189,229,230,55,99,255,254,253,108,111, +15,201,243,156,103,126,117,33,238,140,159,252,194,87,153,78,39,115,49,137, +178,222,11,222,207,254,91,9,84,198,81,89,153,189,141,99,90,219,255,122, +106,43,0,84,85,141,136,67,68,0,42,128,167,158,126,22,99,12,222,7,0,210, +24,136,198,152,157,73,88,43,228,121,78,158,130,139,48,26,21,120,239,97, +87,31,40,165,72,247,44,178,185,53,224,202,27,111,112,163,223,7,24,108,252, +101,131,223,191,248,50,117,85,163,116,68,107,77,138,2,17,193,205,9,26,205, +156,63,255,233,85,126,250,179,159,115,252,248,199,249,212,39,239,161,44, +42,66,240,187,28,74,41,66,16,110,91,232,242,157,115,103,201,242,156,86, +158,62,121,237,218,181,205,193,96,176,104,173,109,180,218,249,114,35,207, +31,226,182,229,149,111,28,187,235,120,252,222,249,39,163,143,49,134,24, +227,19,63,92,143,64,252,214,185,239,198,255,7,159,254,204,201,120,223,169, +51,49,107,44,124,36,37,4,68,28,206,9,198,67,162,32,207,114,246,221,126, +152,165,94,111,183,44,59,39,188,169,80,40,5,90,105,148,154,125,3,12,70, +5,166,174,145,118,155,60,207,170,52,2,34,30,239,3,86,64,3,18,3,101,81,226, +253,78,51,45,246,109,4,55,83,129,210,154,133,78,147,170,182,56,39,136,56, +146,36,241,41,49,226,189,144,102,13,150,26,179,5,221,197,69,180,2,47,51, +39,212,86,112,114,235,187,161,84,160,221,1,235,60,33,56,188,247,4,34,105, +84,138,86,171,197,115,23,159,102,90,142,209,10,54,54,54,104,117,58,200, +124,211,105,253,31,151,253,47,104,173,41,235,38,214,186,185,105,28,132, +72,26,99,36,107,100,188,242,199,151,121,225,55,207,83,22,37,221,197,46, +157,118,27,241,30,11,56,239,145,240,14,39,136,1,231,102,110,20,43,136,117, +64,32,85,49,226,189,163,209,110,146,59,199,201,207,127,150,86,179,205,143, +126,188,142,56,193,88,176,198,189,99,124,40,165,176,86,48,118,54,215,139, +39,70,72,67,12,136,245,120,235,40,139,130,187,63,246,81,58,173,54,143,61, +246,3,208,138,44,135,188,221,33,217,33,8,179,219,16,153,53,119,86,31,133, +82,138,188,213,33,203,91,68,194,172,68,64,26,98,196,58,139,115,14,107,28, +131,254,22,166,83,163,117,194,230,230,13,174,94,237,179,189,189,69,16,15, +106,166,116,215,147,64,140,17,98,4,165,40,38,5,87,174,188,142,23,33,204, +133,164,196,136,115,22,17,65,188,163,40,74,64,209,94,232,114,241,169,11, +92,252,229,5,170,170,194,57,71,146,101,100,105,130,78,18,136,32,222,35, +34,4,239,73,147,132,238,66,7,173,19,242,188,1,68,98,136,164,160,18,177, +14,17,139,247,14,107,13,206,53,208,42,144,229,41,198,24,86,86,87,57,244, +222,3,228,121,70,162,19,138,178,194,89,195,142,248,60,207,25,77,198,188, +246,218,21,26,121,74,150,37,248,40,4,32,117,182,30,86,117,133,169,107,162, +43,41,202,146,44,111,224,67,32,132,192,104,92,112,230,244,131,124,237,225, +47,113,230,145,175,51,24,13,121,248,203,95,228,195,199,62,196,120,92,160, +181,102,121,79,143,23,95,250,3,15,158,126,132,44,235,82,150,19,242,102, +11,29,2,169,181,230,39,131,27,111,158,3,58,192,63,158,251,245,179,227,67, +135,14,31,246,18,186,206,58,108,109,168,234,138,235,255,220,228,23,23,46, +82,79,134,28,255,196,221,172,173,174,176,181,53,36,198,192,100,52,98,107, +48,64,41,77,150,101,56,107,17,107,9,4,52,80,157,63,255,196,94,231,76,171, +223,191,241,190,203,151,47,223,117,239,231,238,253,118,49,236,35,50,235, +77,89,78,153,20,35,154,141,12,116,142,23,207,100,82,50,26,141,24,143,39, +140,198,5,147,121,6,89,107,136,68,66,8,120,241,104,128,225,112,196,230, +230,38,203,203,123,1,232,245,150,198,96,240,34,248,32,24,83,51,153,148, +84,213,20,66,205,116,90,80,87,21,198,24,170,170,194,218,26,9,179,252,113, +214,162,180,70,41,77,212,168,116,199,106,106,238,106,165,20,89,222,12,173, +238,94,156,19,130,117,212,149,161,152,150,120,23,1,97,58,173,152,20,37, +85,85,17,99,100,90,213,24,99,145,218,80,215,53,34,1,98,68,140,73,82,128, +86,171,197,222,125,251,118,189,237,108,253,140,179,150,170,152,133,221, +111,47,61,207,145,195,239,225,244,67,247,205,22,7,225,210,165,75,136,8, +74,41,186,221,14,215,174,190,5,84,140,135,21,0,131,62,0,221,20,96,105,105, +105,238,221,93,188,117,199,7,143,222,115,226,228,137,165,193,96,75,122, +139,189,206,190,149,181,238,129,131,239,110,230,121,214,10,33,54,99,140, +25,243,116,215,90,203,209,163,71,253,157,119,30,19,241,82,214,181,145,237, +193,160,60,245,192,169,223,165,0,237,118,251,109,217,82,27,243,66,191,223, +231,241,199,191,191,51,212,6,22,129,133,185,227,242,57,129,7,12,80,0,19, +96,8,56,128,245,245,117,254,13,251,38,133,42,145,10,134,39,0,0,0,0,73,69, +78,68,174,66,96,130}; + +static size_t xml_res_size_33 = 970; +static unsigned char xml_res_file_33[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,145,73,68,65,84,72,137,157,148,203,139,28,85,20, +198,127,231,222,238,169,158,164,199,196,113,66,156,24,8,154,224,34,146, +184,145,184,144,64,12,62,48,136,130,248,87,184,119,233,202,189,11,119,110, +68,92,136,11,5,209,133,248,7,100,35,36,16,87,201,128,17,151,38,140,70,50, +116,61,238,121,184,168,234,78,247,68,23,237,165,110,221,122,157,243,221, +175,206,247,29,57,123,246,249,173,89,61,251,233,216,241,167,206,61,247, +236,153,114,245,234,149,22,130,8,214,26,41,101,238,221,255,99,231,135,239, +127,60,200,57,125,247,203,173,27,31,0,200,137,19,187,219,8,63,31,157,62, +113,246,201,99,71,185,121,243,198,122,153,151,198,165,75,47,179,179,251, +28,71,54,55,249,230,235,207,5,96,100,225,140,82,230,165,75,175,240,235, +222,45,212,193,77,137,53,41,84,27,99,0,194,3,95,138,29,17,78,132,240,224, +193,223,16,65,81,35,204,214,6,72,121,68,0,102,138,155,45,1,32,68,128,187, +19,64,219,41,110,101,237,26,132,100,136,192,204,176,21,128,8,130,254,5, +1,69,13,55,95,155,129,100,29,24,28,2,8,128,232,169,5,65,219,21,76,187,245, +25,32,11,6,170,186,12,16,72,56,166,61,106,41,138,187,173,47,83,53,2,80, +213,69,174,30,192,131,72,210,51,8,232,138,98,170,107,3,64,134,0,55,195, +108,137,1,64,68,160,106,64,208,21,197,255,7,128,164,220,215,82,245,208, +47,26,50,205,119,189,119,231,54,231,207,191,176,164,229,152,31,171,9,87, +79,236,237,221,6,160,168,50,210,199,84,4,146,132,253,123,251,124,252,209, +135,200,16,52,95,250,203,165,27,98,21,48,250,111,247,247,255,100,123,231, +244,191,169,168,151,234,246,206,51,212,109,33,165,132,153,147,146,144,82, +66,36,13,107,159,204,163,151,177,123,191,142,114,198,221,57,190,189,139, +8,152,149,199,127,145,106,255,176,170,54,200,57,51,59,248,139,44,153,156, +50,32,143,90,192,156,92,64,22,48,55,242,104,139,80,167,235,90,242,104,76, +206,233,16,128,48,24,45,80,96,171,154,242,238,59,215,184,114,229,85,54, +38,19,136,160,170,42,54,39,21,93,215,33,210,163,228,156,185,126,253,58, +95,126,245,45,218,104,15,160,74,53,153,44,213,128,190,65,105,121,68,75, +77,185,124,249,50,183,239,236,241,201,167,159,17,30,188,245,230,85,222, +127,239,109,234,186,89,0,164,148,216,61,117,106,160,36,228,148,123,163, +149,195,42,138,232,181,27,66,16,104,81,154,166,65,85,25,165,68,164,192, +221,104,154,134,174,235,250,186,70,32,34,212,179,26,45,5,45,5,51,195,221, +87,107,48,47,112,41,138,244,110,71,181,48,155,205,168,235,122,48,96,80, +74,161,235,10,77,211,44,250,84,206,153,174,235,40,165,215,190,187,45,68, +177,164,162,32,6,6,194,220,116,133,82,10,109,219,82,74,33,34,232,218,150, +186,158,209,182,221,34,184,87,155,225,102,168,150,5,43,119,95,2,240,32, +34,194,6,247,69,128,169,209,204,147,187,227,225,168,41,109,219,210,182, +221,42,131,82,80,45,244,241,65,137,88,233,196,163,182,157,61,20,145,189, +182,173,207,185,71,223,170,189,116,23,47,92,24,191,120,241,162,188,241, +250,107,4,193,120,52,102,60,30,173,4,139,8,247,238,223,231,224,224,128, +217,108,70,206,9,247,32,165,71,166,20,32,1,103,54,54,54,190,152,76,54,71, +109,219,156,158,78,167,191,159,124,250,228,169,156,178,164,148,68,122,217, +200,144,84,134,34,199,188,216,119,239,254,86,69,4,17,30,17,17,102,118,171, +105,154,107,189,95,150,118,164,170,226,238,155,57,165,173,128,35,41,165, +169,136,76,69,100,10,108,2,21,144,135,207,13,104,35,162,22,145,26,120,24, +225,15,205,252,192,204,30,84,85,213,61,6,48,236,50,15,254,56,60,243,192, +118,206,63,0,31,128,244,63,38,255,0,189,195,168,22,42,193,211,163,0,0,0, +0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_34 = 1021; +static unsigned char xml_res_file_34[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,196,73,68,65,84,72,137,165,150,203,139,28,85,20, +198,127,183,170,186,167,31,147,54,142,163,81,12,81,18,200,195,188,52,162, +38,27,31,224,42,171,128,139,196,181,34,36,8,130,127,129,138,27,17,92,5, +119,62,136,32,35,136,232,42,66,36,144,128,18,18,204,38,34,19,51,106,50, +157,72,102,38,244,76,207,163,171,171,234,158,115,92,84,79,79,207,51,141, +22,20,212,173,115,239,249,206,57,223,119,78,149,83,53,254,235,245,217,197, +235,81,169,24,85,157,163,26,56,247,248,240,96,105,167,11,220,190,150,15, +246,95,25,155,60,255,193,177,253,159,68,125,56,25,30,44,23,182,14,150,138, +155,163,192,13,133,129,219,81,43,23,159,122,176,82,220,117,244,224,182, +135,171,3,225,166,74,33,172,197,222,202,247,98,101,33,131,74,209,49,54, +21,255,3,176,33,192,158,215,63,126,250,236,233,147,63,110,27,170,110,9, +156,91,115,143,87,229,175,233,140,153,68,41,21,35,202,69,71,236,5,17,117, +0,193,70,0,73,43,222,241,88,173,212,117,174,182,186,156,215,238,182,185, +213,20,162,98,1,112,164,226,80,5,175,185,125,67,0,19,53,223,225,104,209, +185,154,161,102,120,85,22,218,9,245,70,155,225,193,8,17,67,12,84,141,182, +64,38,253,0,152,177,158,6,102,227,140,70,43,99,124,114,22,204,225,5,82, +111,180,50,35,201,140,172,115,112,67,14,76,117,93,91,226,243,16,157,131, +192,65,59,51,194,208,161,102,100,222,240,25,125,0,152,97,220,71,198,206, +240,102,180,213,8,53,47,157,90,254,174,175,12,212,150,234,14,176,82,77, +102,228,17,123,195,3,153,228,89,123,223,15,192,26,170,89,34,59,127,54,114, +197,196,153,162,166,152,129,3,90,137,246,7,176,24,189,169,225,130,245,122, +193,136,19,65,212,136,66,199,66,170,76,207,245,3,32,178,124,221,35,169, +46,48,144,122,165,149,42,57,190,49,209,20,226,88,238,15,160,34,38,43,250, +96,37,7,162,74,146,41,237,84,137,66,199,124,162,76,52,51,164,31,153,238, +61,114,168,50,16,5,171,34,135,156,92,47,74,234,133,216,27,169,55,68,141, +122,35,35,105,107,247,204,186,141,118,232,141,211,71,190,127,255,248,153, +129,48,192,171,117,72,93,4,129,56,19,154,109,207,139,59,135,184,122,99, +146,71,107,33,227,83,41,51,115,146,115,167,107,112,80,219,125,34,0,194, +217,209,145,172,53,55,255,200,166,82,33,136,83,223,181,123,53,50,85,68, +141,114,33,164,149,6,148,34,163,24,122,234,211,158,198,156,16,56,240,24, +34,61,37,170,237,62,81,4,74,157,117,97,112,251,49,217,250,220,145,77,94, +149,68,242,198,17,53,122,191,29,3,81,64,24,56,188,42,73,170,80,16,76,12, +223,105,76,145,229,25,24,80,1,106,64,8,100,152,85,227,84,72,178,229,74, +90,107,162,26,32,98,120,81,48,195,5,44,231,96,118,116,36,3,166,128,180, +3,242,128,153,85,140,165,62,232,237,230,94,48,51,176,238,104,54,2,7,113, +172,180,90,249,176,234,114,48,59,58,34,181,221,39,26,192,147,29,224,10, +228,178,236,117,220,173,146,131,205,229,34,206,41,46,64,103,230,125,243, +143,177,214,248,92,83,26,11,83,114,89,178,210,215,171,72,238,100,16,3,91, +92,16,148,107,165,34,113,26,175,26,217,163,119,155,136,218,205,139,215, +198,207,158,191,112,245,210,205,191,75,219,95,56,250,234,51,227,87,226, +49,156,187,237,162,240,139,201,115,7,103,186,37,234,201,162,13,252,234, +194,232,207,70,253,246,205,247,190,189,124,33,85,147,235,119,155,250,219, +157,233,137,159,111,76,252,240,205,165,177,119,158,125,226,161,231,235, +83,179,187,62,60,126,248,212,47,159,158,58,179,112,103,226,86,146,82,49, +63,87,207,26,223,125,62,121,238,192,204,82,202,29,117,244,222,131,59,143, +187,234,142,215,42,3,91,94,9,94,122,247,203,151,239,205,183,247,214,27, +11,149,181,246,170,26,181,3,31,189,57,116,248,167,183,107,123,78,14,172, +180,185,255,243,219,178,120,109,222,247,86,21,141,211,153,223,191,202,86, +218,254,5,146,137,160,153,55,29,158,147,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_35 = 1387; +static unsigned char xml_res_file_35[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,50,73,68,65,84,72,137,165,213,91,108,92,71,25,192, +241,255,156,235,222,236,245,218,235,107,176,29,39,165,141,99,80,49,145, +69,35,32,40,8,165,17,148,170,55,210,66,43,85,10,188,165,47,180,125,160, +66,68,168,106,225,33,234,3,18,60,128,64,21,66,36,36,68,117,137,160,106, +0,181,225,161,34,106,140,162,22,23,199,106,75,168,93,175,237,196,222,93, +159,221,179,123,46,115,225,33,224,68,144,128,148,124,210,104,94,190,153, +223,140,230,155,25,140,49,220,108,251,236,167,62,113,228,163,219,198,14, +254,175,28,139,91,136,201,59,134,7,95,62,254,226,207,182,245,117,30,184, +81,206,45,1,121,185,174,119,222,86,230,232,143,158,63,186,115,172,112,93, +228,214,0,213,160,53,251,6,147,131,174,253,195,111,126,253,232,142,167, +75,15,3,76,124,119,84,108,125,170,87,0,8,99,12,7,246,220,246,249,93,119, +78,60,32,194,21,145,247,133,201,57,134,140,107,240,29,131,107,105,108,129, +45,208,150,49,26,165,12,137,52,132,145,76,71,111,255,228,151,182,151,139, +91,163,40,34,227,216,156,155,171,168,67,239,254,241,107,149,233,248,196, +191,23,225,0,244,229,205,151,31,187,123,234,208,80,167,139,212,17,150,35, +177,157,20,236,20,44,125,101,163,70,129,108,65,20,162,219,49,237,150,162, +213,168,82,191,244,15,26,141,148,229,48,101,200,194,62,156,217,122,116, +226,171,101,241,206,177,181,227,155,64,135,29,137,96,97,22,75,183,17,110, +66,54,159,226,251,9,190,39,17,94,7,56,133,43,136,138,33,90,71,132,107,120, +97,157,180,25,227,54,13,34,80,180,106,138,74,67,209,135,177,31,9,74,199, +238,250,98,207,200,217,87,214,143,56,0,5,59,161,185,250,62,150,92,195,114, +18,98,59,102,168,4,162,56,0,197,62,112,123,193,237,4,97,129,23,33,220,203, +184,214,7,116,197,115,8,89,165,145,66,42,97,53,132,164,157,225,189,97,123, +58,152,208,191,221,220,65,206,150,180,131,10,57,93,65,0,197,254,65,170, +181,98,80,114,179,85,79,164,22,196,224,199,32,108,140,146,168,196,35,74, +123,76,106,77,245,151,186,222,202,244,183,87,88,183,33,47,50,252,105,171, +119,252,205,61,234,209,197,131,107,106,19,40,120,6,97,27,108,27,186,93, +40,117,119,179,50,191,240,132,119,56,248,69,229,5,207,29,122,55,245,176, +28,176,64,72,73,154,66,225,251,38,92,121,110,252,56,119,236,62,80,150,175, +49,66,202,217,241,193,83,167,111,191,120,176,187,237,251,227,191,30,50, +115,95,169,180,29,128,172,39,2,219,22,27,158,160,93,204,185,184,133,222, +252,112,199,133,10,192,161,253,159,30,154,158,120,253,131,107,203,51,251, +175,190,92,206,70,244,79,162,54,86,121,123,220,59,243,230,148,243,172,62, +127,113,135,213,38,99,48,43,192,223,175,0,14,11,150,197,121,223,34,241, +178,69,200,13,249,231,7,186,107,71,254,246,208,15,6,155,91,198,129,125, +215,187,7,78,105,139,160,48,202,140,213,254,195,204,190,169,19,186,62,187, +75,40,237,128,240,180,214,111,111,2,174,205,178,128,89,23,82,225,23,53, +126,87,122,98,231,200,119,118,239,220,115,223,250,218,226,43,55,186,104, +173,213,200,207,172,252,228,212,111,62,214,124,50,21,234,185,184,221,198, +40,140,81,38,39,181,142,128,215,28,0,71,176,166,53,243,150,33,65,184,241, +11,222,197,199,231,119,12,236,205,176,192,114,92,49,55,2,236,164,242,204, +159,115,171,139,103,135,183,239,152,12,130,253,97,24,38,42,6,19,211,97, +48,11,155,135,140,160,170,36,243,194,208,122,214,170,63,125,204,125,111, +239,104,208,195,82,113,145,181,245,203,254,228,133,109,118,174,43,95,240, +60,23,199,177,73,109,11,101,140,24,222,227,85,150,76,191,78,230,195,225, +100,34,238,218,216,8,80,45,48,77,192,208,177,9,120,176,28,39,42,250,150, +206,124,239,151,73,237,190,206,106,157,188,103,112,124,135,97,51,240,185, +222,177,242,135,165,174,50,69,209,133,103,249,40,36,77,211,100,189,175, +142,215,218,48,178,214,42,52,195,128,106,181,134,174,3,53,208,142,185,250, +84,92,8,146,242,76,119,255,225,115,165,45,143,141,4,53,172,0,84,198,166, +74,64,210,43,221,66,33,63,16,56,13,60,215,199,18,2,137,164,165,66,154,81, +147,70,210,164,49,16,82,95,108,80,93,105,32,150,1,105,48,14,87,129,147, +203,214,94,217,219,115,96,172,220,67,28,150,72,235,41,169,151,32,77,66, +53,105,114,185,186,142,202,164,200,76,130,242,82,82,145,162,180,36,137, +36,113,152,144,212,52,73,29,244,42,152,203,96,58,13,38,190,6,56,115,166, +241,226,55,238,237,95,158,179,205,75,133,143,116,102,105,36,32,193,196, +2,167,148,193,147,25,180,145,24,33,209,66,34,173,20,69,74,44,82,98,59,33, +114,19,98,87,163,10,6,53,160,201,137,60,209,82,251,42,0,240,211,83,171, +175,62,116,151,251,192,202,103,118,191,148,29,240,179,170,165,16,145,160, +24,119,172,46,164,239,159,52,89,109,91,254,149,17,198,50,24,12,72,131,147, +216,100,91,62,110,83,199,186,105,140,106,106,220,196,117,156,200,253,253, +38,240,252,23,10,194,205,151,57,121,54,125,245,219,247,102,239,127,67,236, +154,246,250,253,44,17,188,115,126,118,230,195,31,95,122,226,70,165,250, +255,66,24,243,223,101,62,246,113,255,238,161,125,83,211,217,81,47,59,247, +151,217,223,45,253,252,210,61,55,11,92,247,203,188,248,215,248,244,185, +95,205,220,175,46,73,172,216,177,111,118,114,184,230,12,254,51,146,165, +232,116,247,112,233,193,209,237,35,251,111,5,248,39,68,83,179,103,45,179, +228,235,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_36 = 1351; +static unsigned char xml_res_file_36[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,14,73,68,65,84,72,137,141,149,207,143,28,71,25,134, +159,170,254,53,51,59,251,123,118,179,179,182,19,219,36,78,198,177,76,76, +132,227,40,68,160,120,237,189,113,64,202,33,145,86,226,196,149,67,132,176, +8,8,34,33,129,196,159,128,144,114,137,228,3,8,229,6,23,68,136,48,17,68, +16,39,10,74,72,100,109,20,35,226,153,221,205,174,119,122,166,187,186,190, +250,56,244,218,222,196,107,66,73,165,190,84,189,79,125,223,251,86,181,81, +85,190,104,180,158,105,254,50,157,140,190,25,50,193,54,128,6,152,38,96, +217,10,149,94,75,218,241,239,103,31,159,184,252,193,179,55,250,199,95,153, +183,190,16,116,172,68,253,132,248,11,213,129,172,153,244,186,189,206,226, +238,120,23,147,24,204,12,48,7,166,197,164,77,77,31,67,34,142,73,160,47, +195,8,118,45,108,41,147,76,254,127,128,42,45,163,235,113,159,225,110,14, +93,48,179,16,79,65,220,52,98,83,227,173,53,130,152,0,176,53,177,141,168, +82,141,60,69,156,215,128,99,199,30,60,90,58,119,185,179,176,216,89,189, +120,126,124,226,196,67,226,74,119,27,112,104,254,240,67,253,229,62,102, +10,166,151,155,28,58,178,192,226,220,2,51,19,179,173,5,183,116,182,211, +239,62,220,124,127,250,187,231,87,86,163,251,251,167,94,159,255,149,95, +187,49,248,4,183,227,107,192,48,207,91,113,146,246,54,54,54,166,122,143, +60,204,218,218,26,251,189,249,205,207,46,179,117,120,64,92,193,145,133, +251,56,151,126,133,81,163,96,169,189,108,31,105,158,106,159,60,250,88,251, +205,245,171,108,109,15,57,209,59,253,252,244,125,159,174,117,218,243,220, +252,215,205,26,224,189,215,249,206,98,53,59,219,193,75,32,73,18,74,87,221, +233,81,2,205,249,132,82,96,126,105,14,71,224,248,235,95,229,157,107,111, +243,173,231,206,241,228,163,79,112,117,244,79,66,8,160,134,151,239,127, +53,0,208,227,150,7,138,115,142,60,207,9,161,62,121,233,252,29,128,133,230, +84,198,88,19,102,230,166,137,76,140,72,224,229,75,175,128,214,90,62,40, +65,4,241,251,246,113,27,96,80,85,20,165,146,128,124,14,160,70,201,178,132, +134,77,152,105,79,99,198,224,37,80,58,143,170,210,6,68,2,65,3,34,114,55, +64,85,9,26,8,33,32,18,40,156,82,236,51,89,21,18,155,146,36,9,211,241,12, +57,35,188,8,69,233,80,133,194,215,192,16,2,85,85,29,0,64,9,18,234,18,69, +40,157,199,237,91,168,65,137,37,33,137,19,82,26,228,140,16,9,184,170,66, +81,74,39,136,15,4,9,248,131,90,164,65,209,176,87,65,80,202,178,162,40,239, +44,12,162,68,69,66,108,82,188,86,132,160,120,9,20,101,221,162,178,172,144, +61,13,239,15,168,192,0,33,40,33,4,188,8,152,136,36,201,80,106,195,173,70, +200,48,38,34,37,247,67,212,4,172,141,136,147,20,163,160,88,36,4,66,144, +123,180,72,107,113,99,12,111,191,245,119,190,243,147,231,217,220,29,64, +84,39,40,111,127,202,84,62,65,28,101,12,135,57,177,68,92,235,191,199,47, +126,253,99,210,78,204,153,195,103,121,247,157,183,192,24,196,223,195,100, +128,172,217,226,47,87,174,208,154,200,72,206,88,142,60,185,204,194,220, +2,249,176,195,199,91,31,19,71,25,131,193,6,135,90,75,28,187,52,205,131, +114,148,198,160,201,79,191,253,35,162,27,13,90,19,211,245,93,184,27,0,18, +60,113,146,50,57,181,8,6,110,252,241,58,101,84,80,157,245,12,7,57,102,206, +18,101,41,91,241,54,116,149,110,80,62,172,222,227,119,47,93,97,106,184, +76,104,213,109,243,222,29,0,160,206,176,119,14,9,158,52,73,121,250,137, +115,164,81,204,155,127,253,27,199,207,62,192,104,171,128,20,54,252,191, +25,250,109,252,77,33,249,243,14,79,165,79,243,134,92,165,170,28,160,100, +141,230,103,0,246,118,82,246,50,92,57,199,104,60,98,101,101,133,243,79, +93,132,119,27,92,123,99,157,201,185,54,233,102,70,115,167,69,190,62,102, +231,85,199,15,206,188,196,233,47,159,166,146,58,113,34,255,195,100,164, +142,152,247,30,99,12,65,3,155,155,155,108,95,207,137,115,229,3,62,228,228, +215,122,148,187,115,200,251,49,47,124,253,18,131,65,159,98,92,32,123,162, +34,1,123,80,76,81,16,13,84,149,171,83,96,12,163,60,103,60,30,99,140,97, +202,204,240,104,116,140,171,127,248,7,169,77,249,222,133,239,83,20,5,170, +129,178,116,123,167,86,172,53,24,99,15,168,0,181,26,52,242,222,19,188,128, +53,140,198,99,118,118,118,216,220,216,36,4,207,151,22,47,210,95,255,132, +111,156,122,134,225,112,8,128,115,41,174,44,17,241,181,10,241,193,111,145, +175,92,1,198,59,87,82,57,143,136,208,237,46,115,178,215,67,4,178,102,198, +227,143,157,102,245,226,10,229,190,55,42,203,50,118,118,135,228,195,156, +56,142,48,182,98,255,143,10,192,168,42,198,152,204,70,209,37,107,227,23, +124,85,166,192,104,117,117,53,233,118,151,178,40,138,130,42,84,85,117,251, +190,220,250,70,81,196,250,71,31,217,63,189,246,90,178,79,115,160,170,139, +159,55,185,52,198,252,124,245,194,133,223,190,248,195,23,179,32,161,225, +131,180,173,177,147,214,218,9,99,204,132,170,54,140,49,241,222,161,110, +245,161,50,198,148,198,152,2,116,87,36,140,196,251,255,220,85,193,61,70, +2,164,251,102,76,253,120,236,197,2,0,1,28,80,1,229,222,252,140,224,127, +1,119,50,232,229,4,159,129,227,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_37 = 1264; +static unsigned char xml_res_file_37[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,4,183,73,68,65,84,72,137,149,148,203,79,93,85,20,135, +191,189,247,125,150,75,105,47,180,2,154,24,91,18,18,27,235,171,45,85,169, +128,138,248,74,212,212,145,175,129,41,53,206,252,63,28,57,104,180,117,96, +226,192,153,209,72,213,56,176,179,198,71,20,133,94,172,54,177,165,133,2, +165,79,227,13,151,115,246,94,123,57,56,23,4,82,163,61,201,58,131,179,247, +89,191,253,173,223,90,219,168,42,0,61,61,189,173,75,141,165,175,219,182, +180,247,236,184,235,78,255,216,99,131,9,40,205,229,255,253,88,235,88,188, +124,169,99,236,243,175,234,206,217,207,204,138,192,246,237,221,85,12,63, +180,84,54,239,220,218,214,194,248,248,79,183,150,121,205,179,111,95,31, +29,93,59,216,84,46,147,91,249,40,26,201,89,199,158,125,143,240,199,153, +9,66,132,40,1,189,69,132,98,33,15,128,70,37,170,254,35,128,70,84,13,55, +110,252,9,170,248,32,168,200,45,11,88,151,67,1,145,64,20,89,35,128,65,21, +98,140,40,144,164,129,40,254,150,61,80,227,64,21,17,65,214,9,168,162,100, +11,40,248,32,68,137,255,139,64,68,72,211,148,114,185,140,113,161,73,176, +65,64,155,47,145,128,162,36,169,71,66,250,159,4,23,206,79,115,186,246,11, +173,109,237,60,220,127,0,197,172,18,132,16,176,255,8,40,104,68,130,0,224, +125,32,136,252,107,212,235,117,78,124,253,5,143,62,188,151,214,205,155, +233,189,123,23,65,36,243,14,8,33,32,97,45,65,84,212,154,140,64,33,245,1, +9,225,166,4,33,120,22,230,102,232,237,237,229,212,196,36,11,139,215,185, +247,193,22,146,36,0,14,20,162,8,34,97,173,201,160,170,132,32,128,146,250, +64,188,137,64,240,158,43,139,115,24,77,57,123,118,150,201,90,141,23,14, +190,140,247,1,0,99,93,230,101,8,27,74,164,138,170,174,158,250,204,239,191, +81,40,150,200,23,139,205,40,96,140,225,218,149,5,144,132,249,249,5,230, +23,175,48,252,204,243,108,105,175,174,238,59,115,230,183,172,196,33,16, +130,176,58,201,109,109,213,42,198,252,176,163,103,215,206,197,133,105,182, +109,235,192,96,50,117,3,133,66,129,190,190,62,6,135,134,152,57,127,129, +177,177,49,230,231,231,40,20,139,107,74,144,237,189,122,245,26,213,142, +59,200,231,11,27,187,40,107,213,106,199,237,52,18,143,181,22,145,72,185, +92,162,111,255,67,12,13,28,224,220,244,52,199,199,190,100,110,254,26,185, +124,43,105,208,108,118,84,201,57,71,140,145,45,213,46,140,1,17,191,70,160, +73,18,130,7,160,88,44,224,156,67,252,18,3,253,123,24,124,180,159,233,233, +105,190,56,126,156,217,217,139,20,138,5,80,193,40,56,3,18,5,151,107,69, +67,36,77,19,92,46,143,115,118,131,128,161,57,104,74,0,218,91,183,242,210, +139,7,121,252,137,97,198,199,127,226,250,245,107,140,30,62,68,207,206,29, +164,105,138,49,89,9,157,115,156,60,121,146,143,62,254,132,176,28,50,129, +16,40,150,74,27,186,40,42,193,103,4,165,82,145,253,125,123,120,114,228, +105,106,181,83,28,253,224,67,206,157,155,225,185,103,71,216,210,214,74, +163,177,188,42,96,173,165,171,187,187,233,151,193,89,151,13,154,15,27,8, +84,17,9,148,138,37,6,14,60,194,235,175,189,202,233,95,167,56,113,226,27, +102,102,46,82,44,21,137,81,88,94,94,38,77,211,213,255,140,49,52,150,26, +4,239,9,222,35,34,196,24,215,123,176,98,176,115,57,6,6,251,25,29,125,131, +218,169,83,252,248,227,247,148,74,101,140,177,72,8,120,239,73,83,207,242, +242,242,170,111,206,57,210,52,205,166,63,4,98,20,172,181,24,99,215,95,21, +149,74,197,141,12,15,241,214,155,163,76,78,76,112,244,216,49,58,59,59,105, +105,105,193,123,159,37,79,18,26,141,37,146,36,33,77,83,210,52,37,73,146, +236,212,34,132,144,17,168,102,221,181,74,240,212,200,200,214,174,238,174, +234,232,225,67,76,78,78,242,222,251,199,152,157,157,167,165,82,225,202, +213,235,104,140,68,141,4,9,36,73,66,146,164,235,9,188,207,146,135,0,40, +190,57,184,57,128,163,199,62,168,62,112,255,125,239,14,143,140,84,166,106, +53,142,28,57,194,228,196,20,155,90,54,165,187,239,185,39,127,239,238,221, +230,201,225,39,80,148,124,46,79,62,159,91,119,141,27,99,88,188,124,153, +122,189,206,210,210,18,206,89,98,84,172,53,152,161,129,193,125,123,246, +238,125,183,163,189,186,223,90,39,159,124,250,233,229,90,173,118,209,251, +116,91,165,82,57,127,91,231,109,221,206,58,99,173,53,38,107,27,211,76,106, +154,38,235,138,217,103,207,158,43,102,87,78,84,85,85,17,153,200,77,252, +60,190,171,254,231,141,253,253,3,3,76,77,157,30,251,238,187,111,223,246, +222,95,136,49,150,157,181,173,10,155,172,181,21,99,76,197,24,83,1,202,64, +17,112,77,0,1,18,85,109,24,99,26,192,95,170,241,47,145,88,23,145,27,6,200, +91,99,94,233,220,190,253,193,185,75,151,222,81,213,11,205,83,58,32,119, +147,112,128,93,33,105,222,50,177,41,20,54,198,223,184,252,254,212,64,227, +112,233,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_38 = 876; +static unsigned char xml_res_file_38[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,51,73,68,65,84,72,137,181,149,75,76,19,81,20,134, +239,189,165,157,185,243,104,167,47,10,109,33,84,44,5,141,8,136,21,133,88, +33,70,26,73,16,92,24,99,220,153,138,110,124,172,208,141,18,89,25,217,248, +68,113,129,65,73,32,65,12,49,38,196,5,6,138,143,40,11,169,81,54,152,180, +46,140,40,2,133,142,41,140,244,184,17,2,132,34,80,252,147,147,204,220,199, +124,249,239,252,103,6,3,0,154,19,195,48,44,203,178,52,28,14,143,163,13, +18,89,120,195,81,154,124,254,220,185,102,167,211,89,248,95,0,19,225,240, +183,153,25,197,208,112,173,161,91,175,215,167,110,8,1,0,22,85,178,217,92, +242,238,237,91,168,175,175,127,138,16,194,75,231,215,90,72,163,209,48,139, +6,16,34,39,125,190,182,207,195,195,80,93,85,125,62,97,128,199,227,57,218, +210,210,210,83,94,94,94,53,55,40,73,82,126,96,112,112,166,223,223,31,117, +58,157,238,132,0,8,33,166,184,184,248,148,191,175,111,164,171,171,43,88, +83,83,115,150,82,170,43,43,45,187,244,33,16,128,246,182,182,33,158,231, +13,235,6,204,93,184,221,238,195,227,227,227,83,178,44,131,223,239,31,171, +173,173,109,124,208,220,28,12,5,131,80,87,87,215,154,48,0,0,80,69,69,197, +238,220,220,220,51,147,147,147,138,162,40,48,58,58,10,125,189,189,208,209, +209,1,135,170,171,125,9,3,22,184,57,228,45,247,222,8,133,66,51,178,44,131, +28,137,64,79,231,147,169,253,101,101,135,9,33,73,241,30,166,211,234,242, +211,237,105,62,139,57,249,224,138,128,185,226,56,174,200,119,234,244,227, +224,208,80,172,219,83,4,163,95,66,112,175,169,41,184,107,167,251,69,118, +86,214,85,155,213,122,212,104,48,236,49,25,77,158,77,25,25,247,69,65,248, +162,86,171,95,82,74,63,229,184,92,141,132,16,38,105,165,30,145,101,249, +13,198,248,200,171,190,222,19,77,55,175,223,138,204,198,212,217,89,46,179, +201,104,76,210,168,147,246,165,90,82,144,242,91,65,148,114,232,125,32,240, +123,42,18,97,1,96,22,99,76,56,142,251,200,243,252,158,85,159,101,101,101, +229,179,214,135,143,192,235,245,94,65,8,105,41,165,133,214,84,235,217,173, +57,57,157,69,110,247,200,22,87,246,44,33,36,3,0,144,86,20,13,5,219,243, +190,171,213,234,109,171,6,8,130,80,106,179,218,98,69,238,93,207,85,42,21, +89,144,115,149,138,16,86,210,73,183,51,210,210,33,221,110,127,157,102,181, +13,80,150,61,246,207,119,176,164,97,72,142,203,213,158,102,183,67,65,94, +254,157,101,230,49,71,57,45,203,176,28,66,104,62,8,107,138,28,207,243,37, +59,242,242,149,20,139,5,178,156,206,11,235,142,105,188,194,24,91,68,65, +8,243,60,127,89,20,132,17,155,213,122,124,67,1,8,33,70,20,196,175,44,203, +218,17,66,146,86,20,191,153,77,166,3,43,237,33,113,18,26,239,211,62,61, +61,29,253,145,233,112,228,1,192,132,252,75,222,172,40,74,171,94,210,199, +255,65,173,197,193,95,23,102,173,40,254,220,228,112,20,0,0,98,52,26,189, +164,147,70,120,142,119,36,124,68,243,182,49,46,212,75,82,120,115,102,102, +1,0,32,179,201,116,145,227,184,161,229,214,174,216,201,241,52,27,139,13, +96,140,247,42,138,210,173,151,36,5,99,204,83,150,189,187,220,90,252,215, +246,186,132,49,86,49,26,141,25,99,66,162,211,209,49,0,136,110,40,96,53, +250,3,182,172,2,112,190,22,130,190,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_39 = 784; +static unsigned char xml_res_file_39[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,2,215,73,68,65,84,72,137,165,85,77,79,219,64,20,156, +125,78,8,20,90,21,164,222,145,26,218,222,56,20,1,237,63,224,71,113,236, +31,232,111,232,29,209,94,169,56,245,94,190,17,196,142,109,8,41,161,9,73, +4,38,107,123,223,235,193,142,147,144,130,72,24,107,20,57,89,191,121,111, +102,189,81,34,130,135,176,180,180,244,113,101,101,245,115,24,134,97,255, +247,34,12,99,12,140,97,0,195,207,19,17,221,220,220,220,108,110,110,126, +131,136,60,200,245,245,245,47,50,38,182,183,183,175,39,39,167,114,185,7, +219,7,32,130,87,0,16,4,119,143,45,27,194,196,196,4,180,214,74,32,42,71, +68,106,110,110,238,77,177,184,176,80,44,22,223,189,77,80,156,157,125,253, +126,109,109,237,67,20,197,35,21,239,65,65,1,146,155,154,154,154,219,218, +250,249,107,113,113,177,168,84,239,231,90,237,10,158,231,225,177,140,158, +130,92,16,4,183,113,28,27,165,122,86,16,17,180,214,96,230,44,143,81,32, +34,144,52,124,18,145,206,209,209,225,233,253,69,74,1,34,0,179,140,69,225, +164,14,1,192,238,238,222,193,112,31,10,128,64,132,199,38,0,228,0,192,182, +75,39,221,209,186,159,137,61,131,139,159,110,17,103,181,114,0,224,251,126, +185,211,209,16,0,194,221,98,131,35,143,130,100,125,154,1,0,84,42,149,179, +102,179,217,81,105,247,201,4,72,45,26,151,232,9,92,94,94,94,120,158,119, +110,89,86,82,92,18,239,89,0,78,239,199,97,38,192,204,129,109,219,101,178, +172,196,251,108,123,50,152,199,163,244,11,0,128,109,219,37,82,42,155,224, +121,246,8,186,30,101,103,209,206,206,239,93,99,12,88,4,196,130,110,78,227, +188,104,204,189,23,45,19,112,28,231,36,8,2,64,4,2,134,112,218,77,106,217, +40,16,54,89,200,153,64,181,90,245,219,237,118,103,122,102,102,146,251,70, +237,15,236,201,19,244,77,157,101,208,104,52,106,181,171,171,191,68,4,97, +1,192,224,103,100,48,36,160,181,110,251,158,231,89,68,233,238,65,22,212, +255,160,186,151,74,8,36,135,164,101,89,41,9,0,20,245,63,116,112,176,127, +72,68,89,231,81,20,65,1,176,136,134,168,20,0,37,80,105,225,66,97,2,194, +198,68,97,24,133,186,195,141,122,67,3,144,129,127,52,219,118,78,4,0,51, +163,80,200,35,142,99,108,108,108,36,197,160,64,150,133,156,101,129,40,233, +203,48,67,119,58,104,182,90,113,28,199,173,31,223,55,191,230,243,249,224, +246,246,246,156,136,66,173,181,25,16,40,149,78,143,163,48,132,69,22,94, +76,191,196,242,242,10,86,87,63,33,54,49,238,238,238,112,221,184,142,202, +110,249,194,113,28,215,243,220,178,239,249,182,235,186,246,217,153,95,106, +183,219,103,204,124,41,247,246,244,128,128,227,56,167,181,218,149,142,77, +44,213,106,245,143,235,186,222,254,222,222,113,217,45,159,250,190,111,95, +84,42,94,189,94,63,23,145,134,136,152,7,3,234,207,170,95,48,159,207,23, +230,231,231,87,235,245,122,189,213,106,93,48,115,83,70,61,171,239,225,31, +208,143,130,239,12,29,142,98,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_40 = 1073; +static unsigned char xml_res_file_40[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,248,73,68,65,84,72,137,141,148,95,136,212,85,20, +199,63,247,254,126,51,59,59,142,233,182,138,174,134,86,43,217,154,139,253, +33,8,36,247,37,164,16,210,181,160,2,179,32,44,139,180,8,2,159,178,194,151, +158,124,178,135,245,41,236,41,33,168,80,72,148,4,65,200,94,20,107,253,59, +185,184,105,181,234,224,174,187,59,127,238,61,231,244,48,163,187,230,140, +122,225,48,47,115,239,231,247,61,223,115,190,206,204,104,118,78,254,126, +106,207,201,147,39,214,152,106,21,64,205,75,90,61,219,247,198,59,159,21, +155,94,104,117,204,172,105,13,236,250,242,55,85,181,233,181,225,149,231, +55,183,250,127,171,74,1,62,124,33,187,126,105,207,115,219,189,115,57,149, +160,166,66,219,130,222,194,196,248,168,94,43,141,122,128,185,29,133,176, +98,65,110,203,238,173,207,110,186,86,186,145,55,28,222,103,178,147,229, +127,246,126,177,119,100,91,43,1,206,204,216,220,87,248,97,219,246,175,95, +30,251,183,200,96,41,195,218,183,182,98,166,248,76,142,225,225,97,0,22, +118,205,195,84,112,56,118,126,181,131,103,102,151,112,10,71,143,29,30,124, +112,254,133,21,31,237,178,216,12,144,54,26,149,76,142,151,136,181,9,38, +164,147,154,121,206,21,47,130,3,147,8,166,140,78,84,112,206,179,228,209, +197,84,124,59,33,86,241,81,192,36,117,144,1,90,3,212,140,24,34,170,138, +85,199,112,82,227,177,197,93,117,244,148,91,245,159,88,69,203,37,44,27, +17,81,180,197,144,220,174,192,64,98,68,12,186,219,175,115,100,224,19,76, +5,21,69,36,18,107,21,68,5,21,65,68,232,49,35,148,83,48,135,198,160,78,169, +220,29,128,33,49,32,49,146,120,104,107,107,163,44,9,57,185,129,184,2,201, +188,110,84,5,83,197,84,81,83,60,6,230,232,157,217,17,135,74,197,53,47,173, +94,89,185,114,29,223,158,75,146,83,131,131,39,174,94,189,122,121,26,0,84, +98,189,212,184,164,115,56,155,118,51,116,250,56,27,159,46,176,114,227,231, +0,100,156,129,131,154,128,187,121,209,185,229,102,201,79,31,39,144,166, +144,38,9,253,253,253,239,2,187,1,60,128,25,168,10,26,35,127,105,39,71,233, +225,231,201,30,138,203,55,49,112,250,1,156,6,102,100,97,120,76,217,181, +239,44,14,35,241,134,119,134,71,73,92,192,52,16,106,161,254,177,106,183, +248,126,74,129,98,49,112,254,239,113,126,111,235,225,66,110,17,197,27,121, +46,61,254,26,235,62,29,96,168,20,88,187,243,32,223,29,191,136,97,208,98, +177,110,27,136,233,0,17,33,168,177,170,99,132,37,67,7,72,10,5,36,223,78, +241,74,160,250,228,122,94,220,113,128,51,157,79,81,25,29,193,244,110,219, +219,212,228,122,139,162,68,76,97,195,204,95,145,51,198,193,165,239,19,76, +249,227,242,4,50,167,151,156,8,78,20,81,197,3,218,100,66,85,149,233,249, +54,205,100,105,148,18,45,225,205,182,95,8,131,158,35,189,31,80,195,240, +99,147,104,21,104,60,96,245,46,221,113,254,31,158,183,0,34,117,147,85,21, +164,198,112,117,54,67,237,15,227,59,11,164,94,136,24,90,42,215,151,75,21, +189,171,130,59,0,134,169,32,18,49,21,66,112,236,118,235,248,179,239,117, +242,106,88,46,139,155,149,199,87,13,55,98,56,83,84,91,3,166,155,124,91, +139,234,0,229,124,201,211,93,62,196,162,111,14,48,166,5,50,115,150,0,134, +170,177,232,161,14,76,173,121,240,0,170,214,76,193,205,22,9,98,240,200, +172,42,221,51,206,17,203,227,100,187,150,179,122,203,219,120,167,96,16, +13,130,104,139,231,193,172,149,2,149,122,222,168,161,26,9,154,16,45,197, +44,97,50,40,30,189,195,192,230,10,154,122,128,51,53,164,17,21,42,210,240, +164,1,53,3,236,254,0,205,166,72,213,98,173,90,67,197,213,151,72,28,42,160, +17,76,234,178,235,117,111,128,53,51,185,45,87,219,115,240,240,247,93,137, +79,218,141,169,117,84,141,186,162,107,238,168,138,91,117,223,10,154,153, +188,236,9,126,52,42,135,128,28,52,146,210,129,4,38,174,135,241,87,243,133, +153,171,18,194,125,1,242,249,60,105,154,78,133,237,189,46,173,233,91,184, +108,254,210,254,247,50,94,194,61,95,7,50,153,76,118,255,254,125,223,22, +139,197,99,0,255,1,154,99,8,57,153,132,38,85,0,0,0,0,73,69,78,68,174,66, +96,130}; + +static size_t xml_res_size_41 = 1395; +static unsigned char xml_res_file_41[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,58,73,68,65,84,72,137,141,149,203,143,28,87,21,198, +127,231,222,91,93,93,213,221,211,221,51,147,153,113,98,141,109,97,8,146, +137,172,24,9,65,64,196,91,136,192,18,145,178,48,27,22,88,137,162,72,252, +1,44,65,32,145,5,32,22,144,5,59,100,33,161,64,8,98,129,32,40,177,68,20, +69,74,4,24,236,160,76,228,120,28,191,102,60,211,207,170,238,122,221,195, +162,198,239,4,114,74,71,58,183,234,222,239,156,170,58,231,251,68,122,130, +162,96,129,106,207,167,128,130,247,158,195,39,15,188,176,113,250,226,211, +0,221,102,23,205,13,141,159,230,232,68,48,115,240,133,162,115,32,5,157, +131,79,148,114,160,44,203,34,211,107,115,28,6,240,220,54,95,131,3,124,249, +248,227,58,151,236,253,165,149,37,140,55,52,108,3,253,69,138,14,247,10, +249,24,102,144,123,192,139,58,252,252,241,207,205,206,188,250,26,37,213, +108,168,3,134,229,46,254,71,9,140,246,246,232,199,75,224,110,37,184,9,158, +195,254,35,15,141,95,255,235,27,77,79,6,13,10,218,176,240,76,136,142,64, +171,61,112,85,84,65,181,94,215,177,238,37,214,91,249,221,173,168,4,230, +176,250,200,3,195,63,189,241,155,206,155,91,127,102,176,53,193,54,204,216, +157,16,202,97,137,26,65,228,246,43,87,85,125,78,203,189,196,165,162,37, +84,133,167,50,21,222,43,78,209,186,242,12,86,142,46,77,94,120,233,7,237, +215,254,241,10,201,78,74,232,218,4,61,247,201,213,173,213,151,212,248,24, +217,187,110,154,222,225,190,118,109,128,46,35,1,214,246,87,219,155,66,23, +72,96,249,200,98,250,221,95,126,43,186,114,105,139,209,118,74,17,120,194, +53,199,250,254,67,216,102,64,175,189,76,20,70,132,205,38,198,6,88,44,6, +131,120,161,42,43,138,34,39,75,11,76,233,104,249,136,46,93,190,253,157, +83,3,71,193,151,86,30,233,253,229,228,15,191,24,190,249,207,191,49,216, +202,168,58,21,85,223,211,8,28,91,227,107,132,89,76,51,143,105,70,49,65, +163,137,179,134,74,12,148,10,165,82,164,21,179,116,78,50,72,225,162,165, +153,52,89,89,90,100,108,134,51,215,125,180,115,250,11,95,249,116,152,229, +187,164,131,41,69,103,206,124,53,199,118,3,26,81,139,188,147,33,49,148, +113,206,36,156,98,3,135,138,226,61,84,51,168,230,57,105,154,49,29,38,76, +118,38,232,13,197,126,16,177,62,89,163,106,249,210,205,54,179,245,51,175, +254,251,143,237,247,90,95,189,94,92,163,122,24,90,109,75,63,238,211,143, +133,195,7,87,88,106,47,179,200,34,93,150,136,104,146,51,103,200,144,157, +206,13,6,189,33,89,51,101,170,67,174,239,108,147,180,230,224,13,197,165, +9,218,172,112,6,195,224,210,228,9,26,242,114,251,88,231,107,201,254,9,173, +126,76,111,95,143,253,7,246,113,238,251,155,234,218,155,69,96,27,198,137, +69,17,68,192,163,84,90,82,153,146,236,70,230,31,127,248,209,198,249,199, +54,120,235,237,243,164,43,37,163,173,33,88,234,73,22,129,49,227,175,247, +206,118,95,60,116,236,224,55,90,135,26,44,237,235,179,214,91,227,236,232, +221,51,159,58,121,224,120,63,236,19,218,16,21,131,21,33,215,156,89,149, +144,184,25,187,175,111,243,247,245,119,46,31,232,238,127,176,191,124,21, +159,12,49,214,96,103,24,3,220,234,187,241,250,232,201,237,95,13,126,219, +42,90,60,184,184,198,81,142,225,162,160,115,37,185,134,17,131,53,22,35, +6,217,155,7,49,128,87,22,62,219,37,94,138,253,66,119,129,246,66,172,209, +66,168,166,43,104,155,196,220,28,52,17,16,3,163,199,70,79,158,251,222,133, +211,118,28,248,39,56,129,51,54,239,45,244,184,152,95,170,27,83,204,173, +25,208,10,2,99,137,195,136,184,25,237,70,113,203,71,173,102,18,54,194,212, +196,214,19,235,7,230,46,78,17,193,24,40,78,76,191,249,135,83,175,188,248, +187,183,94,246,130,136,45,13,65,229,56,63,252,79,221,255,106,64,193,118, +132,184,25,19,133,17,81,24,93,143,36,26,5,177,219,9,194,96,199,5,102,98, +155,114,213,221,199,138,2,198,88,58,207,54,158,122,254,199,207,255,190, +211,106,231,210,169,43,182,24,206,21,103,57,98,63,3,253,130,208,135,245, +129,154,151,174,6,184,45,107,237,174,181,34,198,72,38,98,175,27,74,185, +143,25,141,8,206,90,30,58,245,192,137,225,149,241,174,81,65,20,164,18,68, +13,229,74,142,181,13,140,115,24,103,49,129,195,54,220,5,197,111,168,215, +247,20,54,60,250,174,17,54,29,57,53,183,127,8,253,10,194,209,159,29,126, +186,170,252,109,126,244,224,181,66,245,142,123,181,109,204,201,194,170, +168,38,85,81,97,42,93,80,100,211,145,213,108,120,151,232,124,132,41,240, +137,125,7,41,202,2,175,119,31,16,145,141,52,159,205,231,243,108,154,103, +5,146,153,46,248,247,93,240,235,140,236,25,238,82,178,255,101,179,52,193, +171,191,111,171,136,188,157,84,227,127,37,163,180,156,165,115,220,36,114, +218,208,220,145,0,57,232,255,81,41,17,97,193,54,73,103,179,15,221,102,173, +201,171,73,145,79,71,9,217,40,103,97,55,162,90,86,156,166,208,254,185,37, +253,73,245,209,159,73,234,4,227,81,194,93,18,123,199,115,103,173,171,198, +165,153,12,166,148,215,65,183,45,196,120,71,9,204,64,115,106,85,187,183, +60,83,107,76,114,97,2,118,15,221,220,135,15,141,128,203,151,175,50,219, +4,222,1,31,86,48,55,24,245,160,153,210,122,206,214,202,118,239,191,144, +26,80,50,65,10,65,74,131,228,247,120,97,49,133,245,179,217,204,147,224, +153,226,157,181,62,118,145,255,47,236,128,136,22,16,150,28,174,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_42 = 1363; +static unsigned char xml_res_file_42[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,26,73,68,65,84,72,137,133,149,203,111,93,71,25,192, +127,223,204,156,115,238,251,157,216,233,181,211,86,118,147,56,137,82,68, +161,69,105,251,7,0,42,82,23,176,1,33,22,72,172,168,216,32,86,136,110,64, +98,195,186,18,187,46,144,80,43,145,138,135,132,154,5,32,165,81,160,212, +9,132,144,164,148,214,181,157,248,213,107,223,231,185,231,53,195,226,218, +13,215,113,224,147,230,156,163,57,51,223,239,155,239,53,226,125,23,42,51, +121,53,254,43,106,56,19,82,186,168,121,118,241,60,81,49,179,81,18,219,70, +187,65,150,101,136,18,134,235,125,208,194,67,34,160,181,38,23,106,174,221, +253,59,253,171,25,197,205,60,185,207,130,17,7,4,40,170,40,42,80,172,228, +168,212,43,116,101,72,148,196,246,64,135,179,14,231,28,98,31,214,143,130, +63,157,191,49,249,254,60,240,245,7,191,140,85,160,11,10,26,25,148,160,214, +170,80,111,84,137,162,148,254,96,176,175,125,98,101,144,207,129,146,253, +137,233,19,60,74,140,24,208,74,44,5,32,128,92,57,79,185,86,163,179,219, +159,178,213,57,135,170,107,242,89,128,59,4,56,132,155,102,123,53,159,164, +21,99,150,128,83,160,78,66,169,145,163,249,120,157,106,161,76,163,221,32, +75,51,156,115,56,28,117,191,138,117,118,10,226,112,92,154,249,195,35,0, +45,143,214,79,242,11,131,78,220,238,23,199,195,103,191,188,196,75,79,124, +177,184,220,185,190,242,241,71,107,43,135,1,214,89,102,138,199,166,32,7, +239,211,205,167,120,251,95,127,228,221,223,220,166,52,204,81,158,241,49, +24,7,184,231,68,243,2,154,109,167,156,242,240,154,54,118,151,157,178,43, +78,166,125,44,34,40,163,112,153,3,7,191,125,233,202,171,95,250,245,197, +87,223,104,188,13,192,143,23,129,239,61,88,175,80,96,173,189,128,200,139, +8,47,36,105,114,49,37,121,49,78,162,179,41,25,191,63,254,14,78,59,48,130, +24,65,180,176,254,254,38,88,193,101,80,122,50,119,225,212,229,133,127,62, +42,6,19,64,98,151,156,99,1,199,153,241,40,94,138,8,23,162,40,94,92,254, +204,7,0,100,119,18,220,157,4,119,39,197,110,58,180,167,184,183,178,73,146, +197,72,65,5,175,124,237,135,167,190,177,246,149,237,163,1,2,110,196,105, +34,242,36,204,142,71,227,153,145,13,243,227,48,122,234,96,145,153,203,97, +230,243,164,21,16,37,40,165,208,70,177,181,186,131,149,172,112,153,223, +169,198,92,189,245,220,149,179,217,195,0,192,141,169,50,2,98,212,168,27, +170,94,175,71,55,236,126,154,166,253,189,46,189,205,93,68,246,131,33,32, +162,80,90,19,245,147,221,191,112,149,15,199,31,18,204,250,234,244,155,243, +83,89,107,0,232,145,73,8,120,48,232,132,132,201,128,199,127,53,251,133, +197,235,199,127,94,125,166,86,14,172,175,197,211,42,205,50,92,18,227,44, +68,113,148,245,70,253,254,217,147,39,158,217,142,54,232,220,219,101,115, +101,147,174,12,104,255,180,225,214,127,208,17,0,177,214,210,250,78,113, +53,237,51,215,171,133,232,11,112,225,252,147,60,81,110,83,159,107,209,108, +54,105,114,140,54,109,106,28,195,67,51,34,100,139,123,172,241,49,123,187, +59,44,119,110,177,177,190,197,206,70,135,238,106,138,186,11,213,189,34, +159,252,178,47,98,173,165,249,173,226,106,54,96,174,55,14,225,60,48,7,50, +11,230,24,152,6,248,101,141,95,240,208,158,194,119,6,82,133,196,10,61,52, +48,80,176,167,160,175,81,29,131,217,8,48,247,13,245,86,157,222,218,238, +196,69,105,215,41,114,14,54,128,251,192,113,32,4,59,0,231,65,154,89,236, +48,65,43,33,73,45,58,210,200,200,96,34,65,135,10,19,107,84,207,199,219, +240,240,183,2,252,192,163,216,44,50,94,29,237,199,160,107,43,165,133,42, +195,198,39,152,89,133,52,64,183,20,65,83,227,87,60,252,192,195,104,141, +194,96,18,131,160,145,196,67,66,133,13,29,209,118,4,155,2,29,192,119,148, +219,101,238,95,91,227,198,27,55,159,54,0,129,173,252,45,92,142,63,151,179, +129,149,187,128,18,68,65,170,132,84,50,70,114,40,251,28,224,112,214,98, +11,126,46,127,226,204,99,106,220,11,49,129,166,118,178,74,247,230,30,55, +222,188,185,100,199,246,182,88,107,81,85,133,237,30,213,232,255,191,20, +158,47,252,99,254,233,249,179,65,209,163,214,174,17,223,142,249,243,235, +239,62,111,71,246,29,0,147,63,153,3,3,170,166,176,123,71,67,230,127,54, +139,246,1,177,56,205,126,111,114,184,20,156,117,69,175,165,169,54,171,140, +150,71,188,247,139,235,231,138,47,231,111,157,251,230,34,178,19,76,42,25, +53,169,1,213,80,71,2,214,95,219,194,52,52,186,164,16,79,64,51,25,6,200, +208,165,115,69,236,29,203,123,175,95,63,213,248,118,241,22,226,14,188,136, +250,180,173,203,62,164,122,4,100,8,255,126,229,62,170,161,144,252,164,233, +29,136,100,146,235,188,181,199,213,215,174,189,220,252,126,233,253,195, +91,31,104,19,16,153,88,165,114,211,16,63,241,240,172,199,71,95,221,70,183, +64,114,15,118,138,150,29,185,162,222,58,254,163,202,165,163,78,47,193,92, +64,20,70,160,38,189,222,101,14,66,38,117,144,77,98,82,173,86,193,130,141, +29,89,226,56,113,169,72,186,103,33,116,100,137,197,69,142,108,96,201,70, +22,215,119,68,157,140,121,255,49,100,199,71,137,155,190,177,229,224,161, +225,204,226,105,202,181,50,86,57,156,1,60,135,0,226,243,63,47,250,255,150, +255,0,181,23,55,72,168,81,70,216,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_43 = 1155; +static unsigned char xml_res_file_43[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,4,74,73,68,65,84,72,137,173,148,93,108,20,85,20,199, +127,247,206,236,116,246,163,59,219,237,23,84,104,107,45,212,22,105,41,32, +85,12,42,42,193,168,137,241,129,68,19,125,51,49,66,171,197,7,125,49,152, +24,131,225,5,18,183,16,121,50,38,190,24,98,132,68,30,140,26,131,81,33,49, +49,40,26,73,41,31,69,148,118,75,217,221,238,118,119,59,95,215,135,29,236, +2,13,150,200,36,39,247,78,50,231,255,59,103,238,255,92,161,148,226,118, +158,163,251,234,94,183,109,55,251,220,91,249,143,23,149,160,148,90,116, +28,28,102,181,157,254,200,201,142,237,201,142,236,96,217,98,114,228,237, +84,191,106,221,134,183,67,245,189,186,181,252,17,107,69,247,202,157,139, +201,89,52,224,224,176,92,211,187,241,133,167,40,141,131,59,77,255,166,231, +95,218,191,67,44,187,99,128,158,53,235,223,172,93,210,30,163,52,13,165, +41,26,219,215,53,118,118,221,51,124,71,0,31,14,107,107,122,55,108,125,134, +82,26,220,18,56,5,240,242,244,63,240,236,139,169,237,162,229,127,3,186, +187,123,118,90,77,77,181,20,39,193,153,5,167,8,133,52,77,173,93,205,157, +29,173,183,236,66,84,219,52,181,93,132,107,12,154,204,112,184,53,26,137, +118,36,235,18,189,241,68,125,79,119,223,192,163,145,120,212,196,83,128, +6,74,175,172,161,8,185,137,63,103,70,79,125,127,44,55,115,245,143,76,54, +243,75,177,56,59,94,158,115,198,109,151,244,208,1,101,11,165,20,71,222, +107,120,117,213,125,125,47,199,98,86,115,204,74,198,205,72,52,172,155,166, +142,174,129,212,161,156,5,119,14,132,81,17,38,0,40,13,140,4,24,113,112, +125,176,231,176,75,121,119,46,159,41,22,114,19,185,124,230,242,132,14,16, +49,140,129,206,182,182,181,132,13,112,242,224,22,32,239,3,62,40,5,66,7, +17,2,202,1,32,8,37,43,112,95,0,2,148,192,240,133,110,24,196,107,151,180, +197,155,67,250,114,29,224,247,243,151,247,114,244,112,235,166,129,7,55, +155,73,11,188,217,107,127,176,2,241,139,160,92,240,93,240,3,168,18,149, +14,148,156,95,125,5,62,160,215,81,72,79,241,237,175,199,143,8,165,20,169, +33,97,57,46,61,171,150,90,239,62,188,126,224,137,112,210,2,123,162,2,242, +93,80,94,32,170,42,34,42,16,82,170,82,189,31,192,164,9,70,11,249,171,5, +245,205,169,19,159,159,155,41,237,254,247,144,71,134,132,101,187,244,116, +55,215,190,179,185,111,197,86,51,110,128,157,185,222,104,138,27,196,131, +240,20,120,30,8,147,66,65,250,95,157,57,251,217,249,153,242,110,67,99,236, +58,23,5,144,238,123,27,35,187,30,239,189,251,201,26,19,129,239,222,12,80, +4,157,48,15,241,97,182,136,247,229,153,191,14,93,200,151,247,24,26,99,131, +41,85,16,55,222,166,35,67,194,42,187,116,245,45,169,125,127,203,234,150, +199,42,42,85,194,55,66,2,144,239,248,124,49,58,121,120,52,87,218,101,106, +156,31,76,169,2,44,48,104,131,41,149,147,130,83,101,199,61,139,231,131, +227,129,227,87,108,88,29,142,87,181,247,145,158,194,118,189,81,77,112,250, +154,248,130,0,128,55,14,168,82,131,105,180,226,41,112,212,60,164,58,92, +21,236,85,5,226,43,234,107,66,173,59,247,43,167,90,107,65,192,190,237,34, +217,96,132,58,231,171,84,85,194,85,239,213,29,121,138,132,166,181,237,221, +33,140,106,45,125,33,128,33,89,154,8,105,13,216,254,188,239,165,4,68,80, +45,32,69,224,32,47,56,38,73,66,211,90,36,212,1,147,183,4,212,72,217,30, +19,50,138,237,130,12,129,30,198,43,185,92,204,100,115,39,115,185,239,116, +132,209,23,79,60,116,151,149,136,105,134,4,187,0,174,77,157,144,77,166, +16,29,255,9,136,105,114,133,9,58,122,28,60,147,139,151,175,228,79,78,79, +253,112,193,46,31,242,4,191,1,218,120,105,114,109,71,102,102,91,111,162, +241,254,101,137,100,4,173,72,140,140,25,149,98,37,112,252,150,128,122,169, +245,11,25,37,61,61,87,252,121,106,252,167,177,114,241,144,35,248,81,151, +252,29,130,12,32,149,224,220,105,167,116,226,66,250,226,35,93,217,169,109, +253,86,227,218,164,110,26,181,136,174,106,173,155,230,224,131,33,97,212, +73,237,149,230,80,205,211,231,74,197,175,139,130,99,33,193,37,1,211,131, +41,101,87,127,59,50,36,194,10,234,29,197,242,90,197,150,246,80,205,198, +75,158,243,73,30,255,211,215,82,21,55,45,52,104,33,31,146,174,34,166,11, +138,18,50,131,41,85,94,168,211,170,156,168,15,150,171,8,235,130,130,132, +43,131,41,229,1,252,3,30,188,97,109,235,41,88,189,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_44 = 821; +static unsigned char xml_res_file_44[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,49,51,32,68,101,122,32,50,48,48,51,32,48,48,58, +48,51,58,50,51,32,43,48,49,48,48,23,153,72,187,0,0,0,7,116,73,77,69,7,211, +8,28,13,24,18,11,187,29,133,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,141, +73,68,65,84,120,218,181,146,91,72,20,97,20,199,255,51,179,179,219,138,174, +202,174,43,22,94,192,144,140,85,33,201,176,11,250,82,9,133,151,212,183, +8,236,33,34,10,146,236,242,212,147,16,120,161,55,123,241,37,2,173,54,180, +200,46,162,81,106,138,16,102,133,100,134,33,100,174,56,54,123,153,189,204, +236,92,251,102,197,104,51,122,137,14,204,129,57,156,243,59,231,59,231,15, +252,163,81,166,59,249,178,184,28,172,165,206,229,116,29,14,8,17,159,239, +235,226,169,145,230,64,52,41,177,27,147,48,160,26,109,168,218,2,104,157, +175,158,42,221,229,169,228,165,16,156,219,210,48,249,254,237,140,47,180, +82,251,180,106,217,151,72,234,194,88,158,219,117,72,211,116,99,229,187, +127,208,184,140,166,77,0,109,58,198,98,201,126,183,252,5,15,70,95,144,38, +192,190,178,210,242,188,204,252,233,53,201,231,165,58,224,205,117,59,15, +158,61,86,77,157,62,178,159,118,103,58,234,73,172,47,9,160,202,170,187, +34,183,8,103,142,215,67,84,37,136,113,9,45,158,139,185,13,143,234,26,25, +27,211,88,81,82,72,19,3,67,190,61,187,243,25,176,104,34,83,77,152,181,22, +211,221,25,157,138,26,26,157,234,41,217,9,77,211,32,73,26,198,227,3,232, +58,209,70,165,200,217,70,77,127,131,190,183,160,32,209,236,213,236,66,216, +104,133,35,105,130,244,148,84,193,239,231,48,54,62,67,150,66,193,202,26, +224,184,16,134,185,126,176,86,80,22,154,161,55,11,200,30,232,95,151,152, +248,161,104,67,112,100,218,201,50,100,12,143,76,67,81,116,228,228,164,97, +117,53,136,144,32,38,157,205,198,216,108,91,0,209,152,42,8,178,12,33,18, +135,53,195,192,224,208,107,132,73,97,81,81,22,36,69,130,44,83,104,239,31, +66,231,192,136,249,68,38,36,133,188,155,128,196,14,100,81,33,0,9,254,160, +132,116,187,21,171,82,4,119,239,77,220,168,57,90,118,245,64,161,66,247, +213,222,2,43,186,62,59,236,105,97,80,186,145,119,51,235,126,18,64,148,84, +33,170,42,224,3,34,232,44,18,180,50,152,95,228,123,116,246,195,108,32,220, +113,219,83,188,195,222,222,251,172,51,120,93,238,253,93,137,9,128,22,39, +0,77,6,31,137,25,172,72,81,96,136,26,210,225,88,56,207,123,253,61,226,114, +52,166,60,220,158,159,225,9,130,219,34,101,122,227,9,16,248,152,8,110,61, +122,101,254,141,255,137,8,5,68,81,137,83,173,159,139,77,63,159,251,84,185, +22,16,104,252,193,54,130,10,132,165,185,192,99,116,160,91,177,171,205,190, +185,200,24,137,254,188,117,248,66,124,137,87,165,75,127,3,124,84,34,122, +11,204,190,215,32,234,156,81,75,228,240,45,41,179,205,28,235,63,216,15, +103,145,36,45,16,110,86,17,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_45 = 791; +static unsigned char xml_res_file_45[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,49,51,32,68,101,122,32,50,48,48,51,32,48,48,58, +48,51,58,50,51,32,43,48,49,48,48,23,153,72,187,0,0,0,7,116,73,77,69,7,211, +2,27,0,58,55,56,178,60,169,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,111, +73,68,65,84,120,218,165,147,91,72,20,81,24,199,255,51,123,209,221,102,47, +54,206,174,187,185,73,144,154,38,174,176,97,100,68,15,82,80,129,18,21,37, +72,47,65,244,18,17,68,101,244,158,245,26,25,17,245,80,70,87,40,42,133,208, +236,166,18,248,34,17,72,164,93,52,119,213,218,117,157,189,204,204,153,51, +51,205,10,149,139,72,70,31,156,63,124,156,63,63,206,247,231,124,192,127, +22,147,147,214,23,85,17,216,172,205,197,124,241,182,89,49,29,141,142,143, +30,236,217,55,155,89,14,192,154,19,161,196,127,177,118,93,205,166,184,60, +135,112,161,11,3,5,150,178,157,175,38,155,186,183,78,68,255,6,96,115,98, +177,90,253,195,19,99,120,208,251,28,134,217,111,12,215,70,86,23,149,189, +221,210,27,12,47,235,5,148,80,95,253,218,245,8,135,214,64,162,50,52,141, +162,174,166,34,100,31,181,191,214,187,140,150,129,93,177,238,165,0,150, +156,124,172,140,30,227,157,133,156,224,247,130,168,42,100,89,3,33,20,62, +222,85,224,118,114,251,105,163,148,152,188,157,26,90,18,16,216,227,57,44, +56,89,254,203,248,12,74,75,253,96,25,13,83,83,115,160,84,67,141,80,203, +86,9,229,59,170,154,170,43,7,165,225,71,120,63,63,101,126,6,12,107,136, +238,34,135,137,35,120,214,243,22,170,170,35,16,112,33,22,75,66,153,230, +192,213,93,101,42,119,223,106,185,244,132,205,222,100,240,117,17,32,147, +165,162,72,8,196,180,2,187,215,192,195,167,253,72,137,18,42,42,4,80,85, +67,97,74,65,75,128,96,111,72,183,27,28,27,92,217,238,88,149,7,32,146,106, +2,100,36,146,50,20,93,67,76,78,227,206,221,55,231,38,191,253,208,157,193, +20,88,43,131,21,30,11,124,156,105,86,116,89,51,180,134,60,128,36,83,49, +67,85,196,103,37,164,40,129,213,110,193,200,104,162,163,187,239,221,129, +177,207,211,10,99,51,109,165,60,16,244,192,170,131,206,181,145,251,121, +0,77,49,1,26,65,60,157,53,146,146,108,102,97,230,228,129,251,194,137,120, +67,93,253,13,91,100,131,0,132,138,205,35,32,18,241,122,239,217,65,58,45, +56,191,96,4,136,241,172,132,153,239,153,147,35,67,137,46,9,42,204,172,221, +205,50,142,187,128,43,217,169,180,142,242,0,80,94,130,108,146,80,135,129, +142,86,13,167,254,68,121,20,167,109,237,236,227,249,221,104,135,131,109, +99,94,162,13,219,127,93,247,115,184,246,169,209,167,127,216,204,107,125, +78,92,94,252,27,142,160,9,103,193,255,238,15,193,141,51,168,94,104,25,44, +66,103,191,7,215,151,179,96,255,84,63,1,53,243,0,23,222,224,137,126,0,0, +0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_46 = 788; +static unsigned char xml_res_file_46[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,49,51,32,68,101,122,32,50,48,48,51,32,48,48,58, +48,51,58,50,51,32,43,48,49,48,48,23,153,72,187,0,0,0,7,116,73,77,69,7,211, +8,28,13,13,35,109,208,251,171,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,108, +73,68,65,84,120,218,181,146,91,72,83,113,28,199,191,59,59,187,184,139,110, +110,115,166,91,83,179,220,114,121,140,153,163,7,49,146,136,92,25,88,38, +146,93,158,242,33,66,10,122,176,72,122,137,124,232,33,146,136,162,215,16, +202,50,146,13,188,49,111,43,69,140,69,146,121,137,204,225,166,97,78,155, +195,121,118,142,255,52,88,32,173,11,68,191,167,239,15,190,124,248,93,190, +192,63,150,32,38,170,221,22,27,68,244,81,173,70,123,32,248,117,217,239, +159,158,60,221,81,17,12,255,9,64,199,132,46,85,223,152,103,182,238,253, +18,89,2,35,85,194,35,17,154,74,123,102,202,92,197,62,255,239,0,84,76,8, +105,90,239,245,125,64,115,103,23,200,122,111,103,242,108,91,213,166,129, +162,206,52,230,175,38,224,88,46,165,48,59,23,140,49,19,43,92,4,60,207,33, +223,186,195,40,158,20,247,174,57,73,149,199,17,112,197,3,8,99,98,34,199, +95,171,145,73,21,58,189,10,108,52,138,72,132,7,203,114,72,209,40,37,137, +50,69,37,87,178,178,48,211,20,26,250,37,96,203,177,164,115,58,25,165,153, +154,254,12,131,65,15,74,192,99,118,118,9,28,199,111,64,168,52,181,234,80, +196,190,162,158,161,67,29,24,249,190,229,230,27,228,106,173,108,165,249, +194,58,146,197,232,192,60,236,194,227,40,50,150,32,16,88,196,216,216,28, +146,20,50,65,105,113,126,109,193,65,67,75,242,93,40,126,2,156,15,22,167, +210,39,30,160,210,120,25,103,178,106,48,111,175,131,229,149,22,142,157, +135,177,186,26,69,79,207,56,148,114,49,170,42,10,143,236,74,217,214,155, +220,144,144,190,41,7,238,116,53,191,175,220,76,181,39,219,176,220,214,141, +242,61,4,237,109,225,40,253,242,38,237,149,52,11,188,94,31,30,191,24,186, +39,79,164,39,133,18,1,88,30,190,165,58,246,201,143,47,248,196,242,40,84, +98,73,118,247,115,100,89,148,232,115,6,80,224,234,31,188,63,218,228,28, +23,127,170,103,152,244,132,86,183,232,245,194,53,246,97,220,28,164,94,191, +56,223,253,232,13,178,114,212,8,207,134,176,232,112,32,164,87,76,92,41, +186,209,224,28,126,183,127,112,120,106,46,205,164,178,198,13,67,63,112, +214,147,173,94,35,53,86,66,78,109,39,228,100,6,105,207,80,145,233,46,215, +251,152,71,217,40,201,212,220,150,222,137,11,120,42,164,222,146,75,86,50, +82,160,35,125,187,13,171,164,76,79,72,181,142,184,25,203,242,38,227,45, +136,226,2,250,68,84,75,139,70,202,15,213,95,245,108,244,207,40,12,118,102, +26,131,31,221,174,86,252,239,250,6,103,252,228,157,254,35,113,154,0,0,0, +0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_47 = 1229; +static unsigned char xml_res_file_47[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,4,148,73,68,65,84,72,137,141,150,203,111,85,85,20, +198,127,107,159,115,47,229,246,69,105,27,110,185,148,150,90,121,24,148, +167,60,163,32,33,36,168,76,29,48,209,129,19,157,249,31,104,28,232,64,19, +71,162,18,52,168,24,31,3,194,75,36,33,106,98,136,81,35,161,81,35,161,40, +16,160,5,107,95,180,212,123,239,217,123,45,7,167,247,182,208,214,184,146, +147,157,147,156,253,125,235,251,214,218,107,31,49,51,238,143,67,135,14, +61,103,102,77,6,193,9,102,134,129,97,38,136,96,102,22,137,200,61,123,166, +227,136,8,185,92,238,143,253,251,247,159,74,119,223,247,156,60,121,242, +123,51,51,239,189,121,31,204,66,48,213,96,166,193,84,205,84,213,204,210, +53,132,96,222,123,75,146,196,74,165,146,21,139,69,27,31,31,15,7,15,30,124, +201,204,136,103,164,63,153,4,128,115,14,16,12,163,146,177,0,62,40,2,68, +81,132,164,146,96,242,93,85,81,213,42,144,155,131,0,128,193,161,1,110,223, +238,71,205,24,30,30,230,202,149,107,96,6,166,247,40,158,110,147,136,76, +38,246,63,8,70,71,198,232,239,187,133,0,253,253,125,244,94,186,136,1,81, +20,87,65,166,19,148,74,37,68,132,233,245,153,213,34,111,70,239,176,103, +56,211,130,53,53,209,251,119,137,142,206,110,58,59,59,80,85,162,40,154, +242,114,58,88,28,207,80,48,43,193,88,209,56,246,103,194,192,72,25,157,40, +210,222,2,123,150,42,11,99,79,77,77,142,114,82,198,137,195,57,135,247,190, +10,156,201,100,102,146,206,106,77,81,249,242,186,103,104,176,132,31,153, +96,77,146,97,153,27,165,99,222,4,77,11,91,192,64,77,113,206,161,170,85, +239,43,235,244,152,149,160,20,148,203,163,198,196,184,160,227,194,162,59, +101,234,31,201,179,178,16,227,156,160,42,85,192,74,214,102,134,170,86,213, +84,98,206,34,139,164,13,234,48,156,8,73,82,166,88,44,2,16,66,64,85,171, +126,87,200,146,36,153,129,51,39,129,1,50,217,32,206,57,6,7,135,184,118, +245,106,181,200,85,75,170,9,9,113,28,87,212,84,37,204,106,81,6,13,83,76, +134,154,178,56,223,202,170,182,69,196,153,52,39,13,160,102,40,149,54,157, +178,11,145,106,239,198,0,141,251,191,169,175,169,137,30,31,147,140,100, +98,45,189,184,123,85,54,46,42,102,169,198,242,93,227,215,91,96,81,140,183, +132,187,35,129,45,93,66,107,67,150,209,225,59,204,175,175,33,155,169,97, +104,104,152,134,198,6,132,116,96,77,41,72,66,118,241,134,194,27,67,171, +187,86,134,146,114,36,9,24,69,28,134,87,232,29,241,188,250,195,56,73,38, +166,68,134,194,216,24,239,238,30,165,245,209,53,252,116,225,60,133,124, +43,43,87,174,230,228,137,19,60,241,196,46,218,151,46,145,73,151,211,26, +140,126,177,123,176,247,124,223,142,218,27,3,191,204,107,206,98,217,24, +157,20,41,64,89,140,178,192,63,30,54,46,137,56,243,124,45,91,31,202,131, +9,43,186,31,164,235,129,110,156,19,182,62,182,157,124,62,143,6,173,108, +157,170,193,248,145,157,127,213,61,123,110,111,155,185,211,44,110,121,248, +158,33,110,80,210,136,141,121,199,169,167,155,200,101,211,145,132,64,123, +123,97,178,45,141,206,206,78,98,113,248,180,132,83,10,170,36,135,183,223, +204,158,255,113,79,251,173,107,87,19,137,64,210,175,188,10,235,106,39,120, +165,235,50,185,44,156,58,254,21,71,143,127,6,8,175,191,246,38,223,125,123, +14,76,120,239,192,59,244,221,188,73,156,142,10,153,65,0,240,219,219,251, +110,189,48,255,66,223,214,249,9,19,65,40,39,194,150,246,44,135,247,53,178, +113,105,43,152,208,89,88,66,87,199,106,4,88,179,102,21,27,182,172,3,49, +214,175,221,196,130,134,70,84,205,42,135,109,214,54,205,47,200,70,31,108, +171,229,153,207,239,98,185,44,7,159,106,166,176,32,131,73,51,8,172,90,159, +130,163,198,222,189,79,130,75,165,110,222,188,22,115,130,6,21,195,102,87, +0,80,10,208,220,152,229,173,29,202,203,27,198,105,95,88,195,239,151,46, +114,244,216,9,48,248,250,204,89,206,156,62,139,98,28,122,255,67,122,122, +126,198,76,248,248,147,79,233,191,126,19,231,34,195,208,57,21,0,120,111, +20,154,235,104,91,80,67,226,19,218,22,21,168,175,109,64,49,186,86,116,147, +137,83,11,118,237,220,70,115,107,27,136,178,121,235,38,26,155,155,81,13, +130,136,251,79,2,48,114,181,117,136,8,62,4,106,115,243,105,172,175,35,41, +151,233,40,180,131,64,226,3,203,186,186,81,11,4,15,203,187,151,99,106,248, +224,171,179,98,86,2,85,13,229,114,153,36,73,188,136,224,16,124,228,196, +135,128,152,152,23,239,16,81,193,164,24,196,204,68,16,111,120,16,135,83, +175,254,222,147,124,95,244,244,244,28,24,24,24,248,8,170,39,62,189,26,211, +222,175,252,191,24,134,76,78,68,163,58,246,16,192,234,234,234,110,0,252, +11,226,113,105,244,162,127,88,205,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_48 = 1581; +static unsigned char xml_res_file_48[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,244,73,68,65,84,72,137,141,149,123,108,149,119,25, +199,63,191,247,125,207,253,210,203,169,231,148,210,11,87,211,201,194,168, +21,151,40,91,153,90,149,76,77,204,112,139,12,252,211,24,195,150,25,37,222, +134,186,32,68,198,101,196,48,59,116,154,101,101,226,148,140,184,217,184, +108,19,68,113,155,69,116,29,155,3,70,75,87,232,232,57,167,180,61,151,247, +61,239,121,111,143,127,0,115,102,34,126,147,231,191,239,243,253,60,249, +229,151,231,81,34,194,245,52,168,18,173,241,100,114,105,56,149,204,33,162, +236,74,181,88,51,171,111,126,73,172,201,235,245,170,107,1,246,169,72,172, +163,163,243,11,75,87,247,173,203,222,242,209,158,88,72,207,234,142,11,128, +103,89,152,197,226,165,252,27,167,95,61,251,210,240,147,147,83,23,14,124, +69,220,242,255,13,120,178,49,215,127,243,167,250,183,119,246,246,244,104, +153,12,204,107,133,124,1,138,211,160,20,232,26,232,58,24,6,126,165,194, +232,203,195,167,142,63,255,135,239,222,109,206,60,117,93,192,80,199,146, +175,221,250,185,219,31,76,101,154,13,42,38,120,62,132,12,144,0,2,1,117, +197,40,128,8,24,6,36,227,204,188,125,145,195,79,15,253,112,109,225,252, +230,107,2,14,229,186,238,235,255,244,39,30,74,42,133,148,43,239,100,161, +180,203,193,74,253,187,83,215,33,30,7,171,6,174,3,137,4,179,110,157,161, +103,159,223,186,126,54,127,255,123,0,143,70,27,87,223,126,235,71,158,155, +167,140,80,173,82,198,80,138,241,185,18,51,64,79,44,138,17,141,112,213, +171,9,72,200,224,159,98,16,173,148,88,28,13,227,42,69,56,145,96,172,94, +99,232,229,225,59,239,113,170,191,121,7,176,93,69,163,183,44,94,120,108, +101,166,165,183,52,87,34,0,38,103,102,177,191,113,31,153,190,85,228,191, +188,145,155,102,102,208,19,241,203,83,213,108,94,9,133,200,236,251,9,149, +209,81,212,230,31,176,56,157,38,208,117,82,201,4,47,76,23,198,255,49,113, +225,67,223,145,250,37,68,132,1,35,117,215,133,165,55,200,84,166,93,94,205, +180,201,177,198,156,188,184,117,187,120,114,89,227,175,140,200,145,133, +221,50,29,73,202,108,44,45,127,122,95,187,156,62,252,71,17,17,9,68,100, +248,225,71,228,47,77,173,114,166,185,85,38,51,243,101,172,115,145,236,48, +226,247,138,8,136,8,191,142,166,135,38,27,114,114,84,197,228,5,52,249,107, +95,191,248,34,226,5,129,56,142,35,34,34,19,35,39,229,72,174,93,14,199,211, +242,230,145,163,34,34,226,56,142,184,190,47,34,34,35,107,191,40,47,162, +228,207,42,38,99,177,38,121,52,146,24,254,62,81,67,151,7,126,212,146,53, +180,45,174,227,37,223,240,29,44,20,214,228,91,40,199,37,247,241,143,33, +128,239,251,52,181,205,67,239,235,35,121,199,29,44,185,173,15,215,117,81, +154,134,174,235,140,237,218,195,216,192,94,102,124,152,66,112,125,159,58, +65,115,62,224,128,225,195,34,129,236,132,239,113,17,33,9,196,60,159,185, +173,91,240,2,97,217,182,45,120,158,135,107,154,100,63,184,2,165,105,88, +166,5,186,70,56,20,226,204,206,221,156,216,244,117,108,20,117,12,42,8,174, +4,196,3,21,243,96,145,190,18,163,55,17,50,214,149,60,143,34,66,24,48,80, +24,64,225,216,81,12,179,70,100,249,114,92,160,110,89,212,45,11,215,243, +112,109,155,243,15,237,97,228,219,223,194,65,225,161,83,7,106,87,190,103, +84,41,242,34,207,105,117,68,249,186,162,128,112,26,159,183,8,40,16,80,65, +81,3,142,15,60,194,197,145,147,212,93,7,203,178,176,44,11,219,113,40,158, +29,227,248,222,1,108,192,69,199,66,40,35,20,17,242,87,202,81,40,45,128, +188,31,136,180,40,133,129,96,35,148,128,34,62,149,134,102,186,127,186,143, +216,178,110,42,179,115,152,166,137,105,154,84,75,37,66,109,57,186,127,254, +51,170,109,157,76,225,145,71,152,66,120,155,128,58,130,171,4,79,84,81,211, +80,163,5,223,43,206,215,116,114,40,26,81,164,9,72,167,155,232,221,189,155, +116,111,15,229,98,145,74,181,130,10,133,208,35,17,42,213,42,229,233,75, +68,23,47,224,198,31,239,33,217,218,73,148,128,40,144,2,22,40,13,23,108, +129,49,109,175,216,197,89,63,24,201,132,13,186,80,52,16,208,53,191,147, +21,59,119,18,95,190,140,210,84,158,114,181,138,145,74,17,12,62,129,251, +240,0,145,116,154,114,213,164,156,47,16,234,108,167,111,255,126,86,175, +90,67,134,128,28,138,118,77,163,44,156,210,224,156,1,96,122,193,254,139, +81,250,87,104,33,94,11,234,180,229,178,44,92,217,203,185,98,1,223,182,105, +110,111,39,126,240,16,231,183,60,64,0,116,25,6,241,245,235,40,76,76,160, +217,54,243,110,232,198,109,138,17,5,58,148,70,93,41,102,125,246,255,66, +108,87,3,208,81,7,79,212,157,215,91,99,49,150,160,49,253,247,191,113,105, +227,61,180,198,226,164,58,58,105,121,102,136,233,205,247,19,69,145,64,163, +184,99,59,77,131,79,208,216,209,78,182,57,195,244,198,123,57,243,204,83, +100,209,88,98,132,56,41,193,5,133,54,248,31,203,110,131,10,127,242,195, +241,232,239,215,4,104,231,108,147,26,1,29,171,86,211,112,243,74,138,187, +118,17,66,8,163,163,0,151,0,135,128,204,87,55,98,77,156,103,226,119,191, +69,67,167,93,15,241,146,14,199,28,255,238,199,197,249,229,123,214,245,6, +21,222,180,38,153,120,240,54,95,152,170,85,169,224,19,1,154,209,105,68, +35,162,95,6,120,65,64,69,124,166,241,177,128,8,58,89,35,194,9,67,241,180, +237,236,124,76,156,77,87,51,141,119,31,135,65,113,118,172,87,97,205,78, +38,182,125,38,221,168,233,150,133,239,185,36,117,131,104,60,142,22,143, +131,166,33,245,58,9,211,36,93,183,113,53,157,32,18,225,48,194,179,182,189, +67,80,223,188,230,193,185,170,187,84,232,179,239,143,68,182,173,137,39, +110,92,17,14,19,79,165,160,169,17,82,169,203,134,90,13,230,230,112,75,101, +94,51,45,134,108,107,244,245,186,243,189,3,87,158,229,186,0,128,181,42, +156,14,193,157,11,34,209,13,31,72,37,111,234,106,201,54,52,53,54,225,59, +53,42,166,197,100,169,84,57,85,46,159,60,107,89,7,108,228,87,7,197,153, +254,111,57,215,4,188,91,159,87,70,151,1,11,194,208,34,160,187,80,244,96, +28,180,241,67,226,252,207,128,127,1,238,178,9,22,222,6,142,239,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_49 = 1618; +static unsigned char xml_res_file_49[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,70,114,32,56,32,65,117,103,32,50,48,48,51,32,49,50,58, +53,55,58,48,52,32,43,48,49,48,48,159,160,199,19,0,0,0,7,116,73,77,69,7, +211,8,8,11,9,28,100,44,175,232,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18, +1,210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,5,171, +73,68,65,84,120,218,181,85,107,76,20,87,24,61,51,251,156,101,129,133,45, +8,20,33,40,69,10,8,21,65,168,66,250,162,22,136,152,106,76,127,41,181,54, +74,172,73,141,196,68,13,22,107,52,54,105,109,155,24,105,67,99,164,154,52, +180,134,132,4,21,27,9,10,117,3,130,64,23,121,41,181,160,32,15,129,101,97, +151,125,207,163,247,142,134,72,8,182,105,226,77,38,59,123,103,230,156,239, +156,243,221,123,129,151,60,152,23,61,60,127,222,164,153,153,225,191,245, +249,132,108,81,116,79,50,76,254,198,195,135,25,145,62,43,41,185,188,193, +225,176,229,40,149,220,247,167,79,111,181,45,133,193,190,136,192,225,208, +68,134,134,250,239,43,42,90,159,28,31,31,249,30,80,191,143,206,159,60,217, +152,200,178,252,229,172,172,215,191,148,36,247,189,67,135,106,55,254,47, +2,73,146,192,146,55,120,94,196,186,117,49,96,24,124,83,90,122,173,195,110, +159,168,47,40,88,27,148,156,28,141,172,172,132,112,143,199,150,187,20,134, +242,249,63,229,229,189,111,219,237,179,95,177,44,219,64,176,235,102,103, +103,182,45,91,246,10,68,81,146,201,10,11,215,105,188,94,97,141,199,35,144, +57,17,228,30,86,235,28,4,193,59,240,175,25,148,149,53,47,119,56,230,218, +119,238,204,12,25,25,153,197,131,7,83,8,15,15,64,66,66,56,30,63,158,197, +228,164,75,86,67,84,200,100,42,149,2,129,129,90,152,205,3,168,175,255,179, +70,165,210,92,22,4,33,73,16,248,112,155,205,183,187,186,122,191,109,129, +130,233,105,87,122,122,122,68,8,199,169,17,21,21,44,95,60,47,160,189,125, +4,33,33,126,88,185,50,80,86,66,237,18,4,9,46,23,143,169,41,7,41,32,26,26, +141,122,179,213,106,219,108,52,26,48,52,52,142,59,119,238,119,209,168,22, +100,160,84,106,187,123,123,71,249,137,9,15,1,16,100,249,102,243,19,196, +197,25,17,20,164,157,23,76,138,39,207,69,40,20,172,172,192,225,240,32,58, +58,20,171,87,199,34,44,204,136,204,204,100,162,84,60,144,155,251,163,223, +2,130,35,71,214,247,91,44,190,143,42,42,26,188,36,3,12,14,90,17,19,99,144, +1,37,137,65,107,235,35,92,189,218,131,142,142,73,98,19,39,91,69,137,52, +26,5,60,30,94,190,247,249,68,180,181,245,211,124,2,245,250,97,118,129,69, +199,142,213,199,89,173,35,171,35,34,130,149,212,2,26,164,90,205,18,32,6, +85,85,38,92,191,222,58,167,215,235,127,209,235,253,167,77,38,191,45,121, +121,169,241,97,97,65,114,1,44,203,200,239,181,180,116,163,175,111,144,144, +49,166,170,170,83,246,121,130,226,226,75,55,253,253,61,111,165,165,165, +48,9,9,203,49,59,235,6,199,41,73,69,146,76,98,50,153,165,224,224,160,156, +202,202,3,45,36,224,120,143,199,103,238,236,28,63,19,16,160,93,54,57,57, +7,170,152,6,239,114,57,96,177,88,154,166,166,230,242,22,172,3,73,242,188, +177,99,199,219,76,82,82,148,28,36,245,159,14,42,155,6,77,192,221,195,195, +246,246,103,223,36,236,172,40,204,252,184,38,47,224,196,213,18,104,13,62, +138,32,219,147,146,18,71,108,141,120,211,96,208,214,22,20,28,79,158,39, +152,155,115,206,121,189,188,28,46,245,86,169,100,158,117,139,40,251,155, +145,145,200,101,102,198,127,125,225,194,13,142,38,109,26,108,250,244,210, +231,23,184,152,248,32,20,92,124,23,247,124,77,164,211,116,32,22,98,203, +150,247,153,109,219,114,201,122,178,31,159,39,112,187,61,245,141,141,163, +104,110,30,199,149,43,157,4,248,105,191,83,18,74,76,192,145,150,22,123, +192,237,214,91,110,223,158,172,80,43,184,128,190,39,93,240,243,83,96,119, +254,135,248,174,185,20,135,110,238,133,58,196,73,177,224,116,122,169,170, +244,121,2,157,78,127,166,161,161,177,199,100,106,114,155,205,125,184,123, +119,128,124,172,129,221,238,149,123,158,90,22,27,27,138,212,212,8,206,104, +100,253,121,240,152,241,78,194,226,25,195,184,115,8,25,169,81,112,6,247, +96,211,111,89,232,98,111,34,49,41,146,88,198,183,204,19,148,151,239,234, +56,119,174,40,169,175,111,194,223,229,114,222,80,40,20,114,22,74,37,75, +44,242,145,151,159,174,11,218,89,178,117,240,194,41,204,194,41,146,75,154, +198,148,119,12,198,16,6,91,243,99,80,49,120,20,187,174,109,150,10,246,199, +59,22,237,69,145,145,1,249,209,209,198,119,86,173,138,150,165,210,246,163, +107,128,134,72,239,9,47,217,34,72,199,176,164,141,225,128,143,117,144,95, +27,52,106,218,109,106,104,56,6,31,100,199,194,182,198,203,28,174,222,155, +177,136,128,84,91,148,147,147,198,208,170,169,2,179,249,111,172,88,241, +26,89,76,244,8,224,229,57,157,78,128,68,190,18,24,31,36,133,23,172,66,160, +91,5,180,90,37,212,42,53,116,90,45,68,137,165,200,138,69,4,68,126,109,127, +255,195,252,168,168,229,168,171,107,151,85,208,253,38,49,49,25,6,3,181, +205,43,119,154,79,228,137,125,100,187,80,1,26,178,101,232,56,21,56,45,7, +189,78,139,223,239,244,163,181,231,81,23,130,80,184,232,60,208,233,60,23, +107,106,154,154,234,235,219,48,62,62,46,141,142,142,53,180,180,116,148, +158,61,91,54,33,138,74,98,147,146,88,198,195,167,224,161,86,146,138,213, +74,2,172,2,217,23,48,109,115,227,212,175,141,66,235,208,163,18,226,222, +90,28,132,121,145,130,202,202,163,246,236,236,99,57,247,239,63,60,161,82, +169,255,168,169,249,162,134,206,231,228,148,196,12,15,143,125,34,8,110, +114,240,68,130,85,65,224,84,156,194,192,234,225,96,220,168,110,237,198, +88,183,218,183,194,146,179,167,255,167,218,159,151,60,112,232,184,117,235, +184,139,252,28,124,126,78,20,153,206,222,222,191,64,187,43,54,214,95,146, +212,146,227,85,67,120,64,215,192,61,148,53,55,90,195,198,82,234,226,26, +55,20,183,181,253,48,178,228,129,243,162,145,145,81,108,212,104,132,102, +158,151,176,125,251,198,39,159,89,55,85,7,7,24,75,166,109,150,107,8,65, +49,246,96,226,191,224,188,148,241,15,81,36,199,113,168,252,75,132,0,0,0, +0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_50 = 1600; +static unsigned char xml_res_file_50[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,70,114,32,56,32,65,117,103,32,50,48,48,51,32,49,50,58, +53,55,58,48,52,32,43,48,49,48,48,159,160,199,19,0,0,0,7,116,73,77,69,7, +211,8,8,11,3,30,112,205,38,78,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18, +1,210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,5,153, +73,68,65,84,120,218,181,85,123,108,83,101,20,63,247,209,123,219,174,235, +99,115,143,142,109,149,135,99,108,163,243,177,1,226,196,77,7,1,226,64,13, +49,254,195,36,38,4,19,18,205,136,9,16,228,165,68,19,133,144,40,196,236, +15,33,49,154,37,100,9,113,3,140,144,234,22,154,45,5,54,75,132,193,6,110, +184,110,235,104,187,117,125,220,181,183,189,15,207,119,167,11,203,0,141, +198,47,185,233,237,189,223,61,191,243,251,253,206,57,31,192,255,188,168, +199,189,60,117,202,205,79,77,73,199,210,105,249,69,69,73,6,41,106,227,186, +61,123,40,133,188,219,183,175,253,5,65,136,214,179,172,225,248,209,163, +111,68,31,21,131,126,28,128,32,240,133,185,185,153,59,119,236,88,237,44, +45,45,124,5,192,181,147,60,63,114,164,179,156,166,165,246,154,154,101,135, +84,53,121,123,247,238,11,235,254,21,128,170,170,64,227,14,73,82,96,197, +138,133,64,81,240,249,129,3,63,244,198,98,1,87,67,195,115,54,167,211,1, +53,53,101,118,81,140,174,127,84,12,246,193,63,205,205,125,181,177,88,228, +83,154,166,59,48,246,165,72,100,106,75,94,222,19,160,40,170,6,214,216,184, +130,79,165,228,103,68,81,198,103,10,224,61,132,195,113,144,229,212,224, +223,122,112,242,100,119,145,32,196,123,182,109,91,149,51,58,26,129,187, +119,67,96,183,155,161,172,204,14,35,35,17,8,6,19,26,27,100,161,129,233, +116,12,88,44,122,240,122,7,193,229,250,165,77,167,227,219,101,89,174,144, +101,201,30,141,166,183,159,61,251,126,116,14,131,201,201,68,117,117,117, +65,142,193,192,65,113,113,150,118,73,146,12,61,61,163,144,147,147,1,139, +23,91,52,38,68,46,89,86,33,145,144,32,20,18,48,1,7,240,60,183,41,28,142, +110,202,206,182,194,240,240,56,92,189,218,255,43,177,106,142,7,44,171,191, +209,215,55,38,5,2,34,6,144,53,250,94,239,125,40,41,201,6,155,77,63,75,24, +147,199,247,10,48,12,173,49,16,4,17,28,142,92,88,190,124,9,228,231,103, +195,170,85,78,100,170,52,173,95,255,85,198,28,128,189,123,87,15,76,76,164, +223,60,125,186,35,133,30,192,208,80,24,22,46,180,106,1,85,149,130,43,87, +126,135,243,231,111,66,111,111,16,101,50,104,82,17,32,158,103,64,20,37, +237,62,157,86,224,218,181,1,226,143,197,100,242,209,115,36,58,120,208,85, +18,14,143,46,47,40,200,98,137,4,196,72,142,163,49,16,5,173,173,110,184, +120,241,74,220,100,50,125,103,50,101,78,186,221,25,175,111,216,240,108, +105,126,190,77,75,128,166,41,109,159,199,115,3,110,221,26,66,48,202,221, +218,250,73,108,22,96,215,174,51,63,103,102,138,47,85,85,85,82,101,101,69, +16,137,36,193,96,96,49,35,85,3,113,187,189,106,86,150,173,190,165,165,201, +67,246,31,63,254,253,71,55,111,134,60,54,155,217,137,252,128,48,38,198, +39,18,2,76,76,76,116,133,66,241,13,115,250,64,85,197,167,183,110,173,165, +42,42,138,53,35,137,254,100,17,218,196,104,12,158,244,249,98,61,127,125, +212,212,180,57,185,96,65,81,47,97,73,2,19,16,34,79,101,101,9,202,90,240, +188,213,170,191,208,208,112,216,57,203,32,30,159,142,167,82,146,149,152, +75,168,178,44,245,103,181,40,8,40,193,202,149,229,6,155,45,240,217,246, +237,63,237,107,108,172,171,244,251,165,87,125,190,240,91,22,11,165,85,20, +97,73,170,202,102,51,96,81,108,166,68,49,81,219,221,237,253,186,189,29, +170,53,128,100,82,116,117,118,142,189,173,170,18,82,12,192,218,181,21,154, +137,4,68,85,21,172,140,82,48,155,205,77,145,136,244,174,199,19,148,198, +190,60,148,169,243,247,195,88,60,6,138,40,130,42,165,200,102,80,101,137, +200,1,44,234,50,30,53,148,205,50,48,26,77,95,116,116,116,86,49,12,181,88, +20,211,250,188,60,35,44,91,246,36,196,98,34,122,161,211,128,150,44,201, +37,223,26,44,22,26,66,129,59,80,187,247,61,72,246,121,129,9,142,0,27,246, +3,31,9,128,46,129,189,149,22,1,176,178,244,93,35,220,44,64,115,243,59,189, +248,83,177,102,205,17,214,110,231,127,100,24,230,101,226,5,139,169,32,160, +38,27,209,26,167,195,140,116,241,105,72,13,245,131,58,124,23,232,208,48, +232,39,71,129,141,6,208,180,105,205,15,224,105,208,167,20,121,222,44,42, +44,52,111,116,56,178,235,150,46,117,16,217,180,242,35,61,48,83,41,20,54, +23,224,136,160,65,7,105,96,35,33,208,197,131,96,140,142,3,45,248,1,56,148, +135,199,134,36,250,160,39,122,46,42,205,3,192,108,119,212,215,87,81,36, +107,194,192,235,253,13,22,45,122,10,155,137,28,1,146,246,204,104,196,254, +192,123,93,34,2,92,50,2,180,52,133,1,49,89,179,1,64,143,225,176,195,193, +200,128,129,139,205,159,166,72,255,194,192,192,189,141,197,197,69,112,233, +82,143,198,130,204,155,242,114,39,88,173,12,2,164,180,49,194,40,105,224, +210,56,252,148,4,126,149,154,9,110,230,1,208,47,224,24,13,64,175,167,230, +159,7,70,163,248,77,91,91,87,151,203,117,13,198,199,199,213,177,49,127, +135,199,211,123,224,196,137,147,1,69,97,81,38,22,72,165,113,52,74,6,200, +138,193,32,28,94,70,204,51,131,155,1,201,194,11,103,151,158,163,231,3,180, +180,124,24,139,199,161,190,191,255,222,177,100,82,126,173,173,109,127,221, +185,115,251,63,166,105,230,188,207,231,135,193,65,52,147,85,33,131,193, +230,96,49,83,30,51,214,115,51,89,19,121,76,248,223,106,68,0,35,24,185,135, +28,56,100,93,190,124,152,240,254,224,193,103,138,66,93,239,235,187,131, +38,51,80,90,106,85,115,141,58,236,170,44,22,4,27,186,30,199,52,167,102, +88,16,6,54,140,204,115,40,17,243,112,128,135,45,65,152,254,214,227,233, +222,41,73,42,158,19,134,251,107,111,95,31,184,15,201,45,32,68,128,149,166, +129,150,209,15,42,8,12,86,16,141,113,105,29,86,220,100,242,204,63,137,253, +159,215,31,226,164,169,192,188,186,0,153,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_51 = 1051; +static unsigned char xml_res_file_51[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,226,73,68,65,84,72,137,149,149,201,111,28,69,20, +135,191,218,186,199,219,56,118,44,79,236,128,229,216,135,144,5,133,27,72, +225,18,69,145,141,147,11,68,40,156,56,228,136,196,21,113,64,92,248,27,8, +127,68,176,229,68,129,3,1,17,75,65,98,187,17,150,108,138,23,134,49,145, +151,78,98,123,60,227,169,122,28,122,154,56,238,113,12,37,213,161,165,87, +239,123,191,247,123,85,173,68,132,86,43,8,36,171,171,239,138,132,15,150, +150,150,237,111,191,223,126,255,236,196,216,117,173,13,72,96,241,225,195, +139,222,251,65,107,237,165,131,131,131,43,45,147,0,106,39,64,154,251,215, +95,110,153,74,165,178,88,58,80,234,123,233,240,97,166,166,166,55,103,102, +190,125,111,120,120,184,107,116,116,244,84,169,116,96,98,237,241,147,168, +90,223,252,234,220,27,231,198,76,108,48,74,163,148,122,62,0,96,122,250, +202,171,119,238,222,249,100,226,236,217,51,131,165,1,186,139,93,44,39,143, +121,48,251,128,227,199,142,160,0,237,44,90,160,90,173,50,57,121,249,251, +238,125,61,31,117,182,119,220,24,27,31,247,219,115,217,157,201,47,79,78, +119,252,185,48,247,225,208,208,208,153,133,133,5,22,23,43,244,237,239,163, +167,183,135,98,177,131,219,183,255,96,248,208,40,143,42,139,180,117,182, +49,251,96,158,249,249,242,107,93,201,218,199,165,129,129,91,192,223,207, +5,108,109,213,1,197,201,147,175,83,221,168,114,237,203,171,12,30,56,72, +185,92,102,105,121,153,87,78,156,224,238,189,123,180,23,218,25,25,61,196, +139,47,28,228,173,243,231,153,156,154,98,127,111,95,174,27,59,0,130,82, +10,65,216,216,216,64,43,56,125,234,52,197,238,46,214,215,143,147,172,174, +114,244,200,17,130,214,244,22,187,209,70,51,191,176,192,245,175,191,65, +163,192,168,28,64,63,251,249,52,32,132,0,2,51,51,51,248,134,240,221,205, +155,92,249,226,26,62,53,142,32,33,141,67,176,70,35,105,93,123,1,0,165,64, +132,16,4,65,17,69,17,132,128,214,138,182,66,7,161,225,161,153,73,0,223, +240,24,107,81,105,121,57,9,57,64,22,225,67,3,65,112,54,198,211,0,109,104, +143,34,2,210,140,74,11,17,4,173,45,40,37,249,244,173,20,0,34,16,124,64, +161,112,177,33,52,64,107,141,107,139,240,222,167,119,69,36,221,94,176,86, +163,0,145,144,107,82,75,0,164,30,8,66,228,98,64,176,198,80,112,49,74,50, +149,146,42,16,65,107,147,169,218,187,69,233,81,193,135,212,68,231,28,162, +192,104,67,20,69,136,146,109,113,169,18,163,117,171,238,180,6,100,99,26, +188,255,23,160,80,24,99,112,145,203,252,69,154,131,16,68,208,198,180,176, +55,93,185,139,150,149,22,50,5,145,67,41,133,181,150,252,179,34,136,4,140, +222,181,211,187,3,188,111,2,108,6,48,249,48,17,36,8,218,104,80,170,69,1, +187,1,120,86,129,214,26,235,28,74,107,182,231,120,234,129,217,213,131,93, +1,217,181,140,156,75,251,239,92,115,90,210,165,148,66,66,72,167,200,100, +83,244,63,0,217,114,46,194,24,67,28,199,108,109,53,96,219,123,144,221,133, +204,3,239,125,238,124,14,16,199,133,180,152,84,63,174,169,32,142,226,92, +149,25,0,165,176,198,72,95,223,158,175,41,252,252,211,143,180,183,183,161, +181,66,72,199,212,90,75,28,71,57,19,51,15,66,8,108,214,54,247,189,124,236, +104,46,95,110,190,62,187,244,105,41,73,30,69,198,88,180,214,20,10,5,226, +56,38,46,20,112,81,132,82,10,173,21,90,107,180,78,127,145,206,58,54,55, +107,221,23,222,185,48,188,167,2,144,149,249,185,217,27,247,239,223,31,175, +86,171,186,171,179,19,99,13,198,24,148,82,212,235,117,172,181,172,54,18, +86,147,132,114,185,204,220,220,108,88,95,95,187,90,175,213,230,119,102, +107,249,79,174,84,42,58,73,146,55,87,86,86,222,126,178,182,118,92,130,244, +26,99,218,66,240,166,225,131,50,90,99,173,221,8,33,148,149,226,135,98,177, +248,249,200,200,200,76,127,127,127,227,63,1,182,43,20,145,254,90,173,214, +179,181,85,239,244,62,56,192,24,99,148,181,46,137,34,247,151,49,102,9,8, +187,37,248,7,136,126,190,62,214,237,108,78,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_52 = 1136; +static unsigned char xml_res_file_52[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,4,55,73,68,65,84,72,137,237,149,93,108,83,117,24,198, +159,255,57,167,167,167,61,221,233,119,187,178,174,237,216,128,45,72,194, +54,144,57,179,78,140,49,10,14,50,160,154,96,226,189,122,97,212,104,98,192, +196,27,189,227,78,3,194,133,55,144,140,17,19,69,19,167,46,96,88,196,68, +179,144,125,20,216,7,108,108,184,181,93,187,126,156,182,59,167,61,231,255, +247,74,19,48,243,70,185,208,248,220,190,201,243,75,222,143,231,37,140,49, +60,74,113,143,212,253,127,192,223,2,16,66,186,67,161,45,191,132,195,205, +83,14,187,124,236,225,186,85,180,238,247,184,61,227,145,72,244,182,162, +40,79,108,234,179,217,22,181,109,219,241,83,127,60,222,35,73,18,62,191, +52,188,150,202,164,3,131,131,131,118,139,40,136,195,23,47,21,220,46,247, +143,199,95,62,222,171,170,101,140,143,143,207,245,197,251,59,207,156,254, +164,242,151,0,191,63,208,235,112,200,103,163,209,168,223,98,17,3,86,81, +132,166,233,48,77,179,56,51,115,235,85,187,44,159,32,28,39,175,231,114, +175,237,218,185,235,35,135,162,236,102,148,130,129,129,82,86,156,155,159, +93,147,172,210,235,201,228,244,119,127,2,124,113,249,107,242,254,201,19, +139,93,157,93,17,194,17,120,60,62,184,156,78,232,186,134,239,71,70,32,55, +56,204,173,109,219,120,74,41,91,90,92,80,115,217,117,101,123,71,7,20,197, +9,183,203,137,213,213,21,152,212,196,220,220,108,254,157,119,223,107,122, +41,113,100,3,0,132,223,73,183,111,221,236,110,109,109,139,228,243,5,100, +215,178,224,249,59,112,42,10,36,155,132,206,238,46,92,25,29,229,53,93,131, +32,136,36,117,127,89,233,235,223,143,98,185,140,244,202,125,204,207,220, +130,94,211,209,222,177,19,28,225,221,235,185,236,81,0,231,31,24,242,197, +161,161,11,46,167,19,59,218,183,195,231,119,163,144,207,97,97,225,14,138, +249,60,60,30,47,34,45,45,24,60,154,192,145,99,9,68,182,182,160,49,20,68, +185,152,199,210,210,61,84,202,42,188,62,31,92,46,39,98,45,49,156,253,244, +204,169,129,129,1,251,31,45,114,56,26,46,191,249,214,219,3,233,116,10,22, +209,130,112,115,51,138,249,60,206,157,62,131,104,44,134,72,52,134,64,99, +35,198,174,253,160,130,16,243,233,253,207,184,50,233,52,150,239,45,96,121, +121,25,207,31,56,8,89,113,160,86,171,195,227,245,160,168,150,48,116,254, +194,181,108,54,219,47,112,28,119,170,175,175,111,219,103,231,206,65,77, +85,224,226,61,112,203,110,236,59,252,56,18,47,38,48,49,57,5,127,48,8,209, +106,133,174,215,168,174,235,6,225,8,60,126,47,214,178,25,28,58,124,8,37, +181,140,111,134,71,32,234,18,108,130,29,118,175,21,123,186,247,236,21,69, +235,199,130,44,203,29,171,139,191,182,135,244,40,158,218,186,19,18,103, +67,165,84,198,141,225,41,196,95,233,65,131,226,128,36,73,80,85,21,27,27, +213,164,166,105,133,66,161,112,192,239,15,192,237,114,131,231,4,36,191, +156,193,62,123,28,190,45,1,216,100,59,140,90,29,55,230,174,219,156,46,37, +38,24,70,189,238,133,31,157,193,30,180,247,116,160,49,22,196,196,213,105, +220,155,155,71,208,190,5,169,244,183,122,77,175,27,149,106,117,93,211,180, +15,40,165,153,100,114,186,213,239,243,135,11,197,156,208,234,106,179,194, +66,208,177,235,49,108,223,221,134,198,150,32,166,198,166,145,93,92,198, +116,110,210,34,24,166,9,98,3,42,70,25,130,192,161,90,172,194,226,16,192, +192,192,139,4,201,233,155,63,83,74,79,112,28,151,181,217,108,179,28,199, +209,169,201,137,23,40,165,141,32,56,249,92,215,193,103,9,64,44,54,30,12, +20,43,119,87,176,81,215,144,46,165,64,41,171,11,166,97,170,186,85,67,142, +79,33,83,204,66,204,171,48,169,9,31,124,200,152,41,141,49,58,203,24,27, +123,232,64,231,1,204,19,66,102,171,82,121,79,147,179,201,155,89,73,131, +50,6,171,203,138,130,190,142,154,162,65,191,171,103,9,128,184,32,8,39,195, +225,112,103,40,16,242,90,56,145,168,165,18,11,52,5,38,70,175,140,46,153, +166,121,148,49,102,108,150,53,28,207,13,61,217,211,219,44,152,150,189,186, +81,183,112,2,216,234,218,106,33,149,74,141,84,171,213,55,8,99,12,132,144, +110,0,9,158,231,195,130,32,216,12,195,168,154,166,41,49,198,18,155,25,63, +144,55,132,124,200,243,60,68,81,116,26,134,177,81,175,215,13,0,215,25,99, +95,109,26,118,255,148,254,195,15,231,95,3,248,13,125,198,218,111,204,167, +100,148,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_53 = 1042; +static unsigned char xml_res_file_53[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,217,73,68,65,84,72,137,173,148,109,76,91,85,24,199, +255,247,150,214,210,82,236,202,192,137,67,32,46,10,193,189,40,108,81,23, +198,94,130,162,78,133,141,25,167,241,37,153,11,36,219,212,193,18,17,20, +17,179,172,209,25,21,141,102,64,156,250,5,163,124,208,101,137,68,150,72, +22,162,108,147,77,121,9,136,197,117,140,1,93,43,165,180,23,110,123,185, +247,239,135,181,201,34,176,54,147,127,242,228,156,156,243,156,243,123,158, +115,206,115,4,146,88,72,7,43,171,12,169,169,43,110,209,230,84,157,74,77, +29,27,27,147,63,109,248,80,89,208,249,6,18,22,2,188,89,251,206,214,185, +144,92,226,155,154,202,150,102,36,179,193,104,148,173,137,214,190,208,156, +246,93,195,71,71,79,223,52,224,153,221,47,88,214,231,221,223,240,213,241, +47,50,122,251,123,127,0,112,197,108,177,122,21,69,21,66,178,127,77,254, +198,135,158,221,86,88,212,123,174,251,143,87,79,158,104,245,197,2,16,35, +157,237,79,150,26,215,173,205,249,250,208,161,131,46,99,130,249,19,146, +89,36,243,3,211,222,85,193,217,105,31,201,15,198,66,119,109,170,171,171, +149,214,173,206,106,121,244,241,98,83,76,41,144,4,73,236,217,83,246,182, +213,150,242,254,225,35,71,223,34,233,36,249,13,201,55,72,110,13,144,198, +33,82,55,76,10,36,145,150,145,245,89,69,101,229,187,145,181,55,50,17,0, +4,65,184,77,20,133,205,69,187,107,155,170,171,42,215,3,24,15,155,75,1,254, +84,128,4,27,176,28,64,74,191,12,91,209,115,71,62,14,202,161,45,37,59,159, +78,141,150,64,92,184,45,72,74,93,251,215,123,53,229,251,1,252,4,32,19,0, +1,140,43,128,205,8,232,85,0,26,128,144,8,60,82,82,28,112,254,34,59,37,169, +125,3,128,239,163,2,44,102,115,222,189,247,61,56,99,213,99,11,128,28,13, +104,17,1,147,2,196,199,1,171,34,206,122,0,6,3,144,152,8,217,154,114,183, +87,39,182,103,199,4,48,154,76,230,149,105,153,183,2,144,1,232,69,96,179, +10,244,169,192,157,226,117,15,33,34,85,67,104,101,122,250,178,56,157,206, +21,211,17,185,221,238,145,56,113,110,135,31,8,90,174,141,89,53,224,158, +48,80,208,0,168,0,20,0,178,12,200,179,80,50,147,226,179,228,80,232,100, +76,0,0,167,103,124,206,138,203,110,219,104,122,50,226,53,64,79,32,81,0, +52,17,225,179,7,32,1,112,255,3,88,140,16,66,254,145,219,39,38,220,103,163, +1,16,46,52,125,65,65,126,187,39,72,185,115,152,222,65,137,147,23,73,207, +56,233,113,133,219,97,210,211,117,149,158,150,46,122,92,1,74,229,229,229, +77,177,60,211,184,48,68,17,4,161,170,245,120,83,123,233,203,123,151,117, +156,7,18,172,128,205,6,232,245,128,18,188,22,185,52,5,60,182,1,232,108, +107,131,215,59,213,28,53,250,72,6,17,3,176,221,110,183,79,204,145,236,115, +145,63,246,144,39,46,144,109,125,228,144,151,84,73,214,84,215,140,52,54, +54,143,58,28,195,19,36,15,71,203,96,254,0,176,198,104,208,55,217,237,71, +175,116,116,118,203,61,3,163,106,71,103,183,92,87,95,239,4,96,7,144,34, +234,196,3,45,223,182,242,243,198,102,74,179,179,45,211,211,129,132,197, +0,11,254,166,0,32,8,194,29,0,210,0,152,0,120,1,56,72,250,195,115,166,109, +133,133,95,238,216,185,107,151,170,106,120,233,197,231,207,155,204,166, +82,29,112,113,222,62,139,1,162,73,16,132,228,189,101,101,63,111,204,223, +148,67,141,40,126,234,137,203,22,179,249,97,157,78,55,120,189,223,188,34, +138,85,36,221,77,199,142,149,244,247,246,56,147,147,150,227,204,153,115, +105,126,191,116,106,114,114,42,235,191,142,255,203,0,228,213,213,215,143, +253,218,117,150,3,3,131,156,14,4,28,151,70,70,50,22,189,228,155,132,60, +240,122,85,245,165,33,199,48,189,62,31,189,62,223,239,191,117,95,88,177, +100,128,48,100,245,107,21,149,127,187,174,122,72,146,179,193,224,169,37, +5,132,33,217,251,246,29,112,184,60,30,230,230,230,238,95,114,64,24,146, +99,48,24,94,137,90,7,75,165,127,1,28,245,114,167,199,223,211,46,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_54 = 789; +static unsigned char xml_res_file_54[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,111,32,49,52,32,78,111,118,32,50,48,48,50,32,50,51, +58,51,49,58,52,52,32,43,48,49,48,48,132,80,28,72,0,0,0,7,116,73,77,69,7, +211,8,11,14,58,19,20,134,186,76,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10, +240,1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2, +109,73,68,65,84,120,218,173,83,93,72,83,97,24,126,118,142,103,103,230,230, +230,166,203,179,181,89,186,160,33,180,202,114,21,104,136,66,80,70,87,153, +218,69,23,93,68,20,68,84,55,210,133,22,70,208,69,49,172,240,46,162,34,234, +162,130,20,67,100,200,160,80,81,234,170,48,76,209,153,109,58,247,207,217, +217,206,79,159,197,214,17,244,170,222,143,239,226,249,126,158,239,253,158, +231,125,129,127,12,141,26,212,60,178,14,90,25,147,55,153,18,22,162,137, +244,252,226,220,202,8,24,12,162,31,223,54,35,40,82,3,69,166,146,109,205, +45,102,107,185,201,172,103,141,158,98,166,248,196,195,161,87,221,111,250, +3,230,181,237,141,8,40,53,248,62,255,243,250,173,167,79,150,68,73,66,90, +200,64,38,35,151,147,233,252,229,9,45,78,6,24,120,54,38,184,11,239,161, +186,237,147,55,207,119,112,89,73,32,59,57,8,224,17,79,37,67,249,35,124, +22,31,98,12,94,7,88,92,92,79,112,7,206,131,14,231,192,225,221,246,242,85, +126,25,75,177,48,158,13,191,23,69,57,131,213,116,34,156,63,220,8,44,235, +53,240,73,6,248,134,88,52,21,52,40,211,234,123,234,119,237,176,72,185,12, +252,211,159,19,254,169,217,107,136,131,57,115,180,233,65,88,136,78,170, +83,102,105,124,213,105,65,9,58,116,145,20,253,191,9,92,156,179,53,196,135, +49,247,35,153,28,155,9,30,65,55,62,145,172,140,157,125,247,170,192,231, +30,171,9,200,101,175,101,11,249,78,14,251,11,139,158,231,174,244,49,191, +75,161,124,184,177,206,149,74,184,227,54,244,42,22,24,214,112,168,2,123, +130,53,72,68,220,80,198,43,177,84,208,32,194,71,198,35,41,162,186,140,143, +106,2,209,174,187,84,122,122,111,215,172,22,29,225,109,56,199,84,233,70, +237,21,180,65,207,2,196,168,129,130,6,193,108,244,118,73,134,110,4,11,55, +129,35,121,2,137,171,216,87,84,91,11,115,67,186,79,95,205,49,116,148,232, +185,16,196,202,116,42,66,139,74,207,95,23,46,96,120,70,90,189,90,4,234, +10,94,194,92,176,200,98,178,98,171,5,198,182,102,134,118,57,72,169,86,35, +18,163,86,168,164,114,188,62,138,133,117,117,32,182,203,247,197,50,249, +20,177,190,161,160,1,199,89,97,183,17,155,76,100,26,17,124,49,186,40,124, +137,215,113,33,140,109,88,137,104,199,20,206,226,45,254,148,30,141,44,79, +97,231,1,192,78,94,55,148,192,214,217,98,55,86,235,123,55,237,5,117,144, +46,147,148,119,129,186,232,72,235,101,217,106,112,42,134,82,135,134,214, +56,88,138,54,227,127,198,47,25,70,225,104,183,151,141,145,0,0,0,0,73,69, +78,68,174,66,96,130}; + +static size_t xml_res_size_55 = 631; +static unsigned char xml_res_file_55[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,9,73,68,65,84,56,203, +165,83,61,104,147,81,20,61,249,26,196,82,161,66,138,205,15,193,208,210, +73,23,113,16,148,170,213,130,40,210,8,25,130,224,208,69,42,40,72,113,112, +112,17,151,82,29,90,20,193,66,39,21,65,36,67,80,208,224,34,162,22,196,44, +78,182,249,196,218,96,105,145,240,217,74,32,230,222,115,159,67,73,52,86, +176,210,11,151,247,184,112,206,227,220,115,94,200,57,135,205,148,135,77, +86,184,113,185,244,122,196,153,25,140,6,210,64,101,227,52,10,43,170,44, +82,88,80,213,220,163,225,39,229,6,46,212,144,48,250,242,172,59,28,63,2, +231,0,115,132,57,7,58,130,70,212,164,134,160,26,96,41,88,134,255,165,148, +87,225,248,227,243,207,103,90,36,144,182,6,50,5,157,65,77,65,35,232,8,207, +107,67,251,214,118,244,37,250,176,107,231,238,180,136,94,30,188,209,159, +108,145,64,37,10,254,83,144,132,10,65,37,84,9,10,17,223,158,64,170,59,5, +132,67,232,142,68,145,220,145,76,151,230,75,47,0,76,134,54,226,66,250,206, +177,9,21,205,28,220,115,40,201,144,226,91,176,130,55,239,102,158,189,186, +250,246,248,134,92,200,159,43,140,138,104,174,188,84,70,8,30,182,117,116, +64,68,247,174,179,241,204,195,76,219,233,251,167,174,252,141,68,235,10, +37,161,166,16,35,84,116,125,14,84,116,90,68,179,127,130,7,198,14,76,72, +93,51,93,145,46,84,165,138,74,80,129,10,139,45,75,204,222,27,186,21,235, +140,15,171,18,39,111,15,58,149,181,87,40,68,60,154,64,42,153,66,120,75, +24,158,121,88,92,156,3,69,11,77,130,236,221,161,235,209,206,216,133,222, +88,47,12,14,61,137,158,166,133,52,3,29,241,253,199,42,60,122,248,188,80, +70,105,206,207,83,153,107,18,136,104,93,85,33,38,48,7,208,17,102,132,26, +97,142,168,213,106,88,9,86,49,183,236,195,159,245,243,84,27,255,48,229, +151,91,146,120,226,230,209,201,88,36,122,81,105,152,95,248,4,149,95,57, +80,229,87,42,139,84,22,72,230,102,167,62,54,163,12,231,92,179,7,198,246, +79,247,95,219,247,254,247,217,191,186,197,5,169,235,136,138,62,248,159, +223,248,19,19,249,133,146,234,21,229,237,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_56 = 3265; +static unsigned char xml_res_file_56[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,1,220,73,68,65,84,120,218,164,147,65,78,27,65,16,69,95,77,247, +244,68,99,141,77,228,108,114,128,172,144,216,230,22,40,135,96,205,134,147, +132,45,242,17,34,80,132,56,11,202,130,32,129,18,9,137,241,216,177,141,237, +158,174,202,130,177,99,146,236,40,169,212,253,23,245,235,247,175,106,49, +51,94,19,254,235,229,229,15,224,125,106,19,222,57,220,139,204,144,44,67, +68,200,68,0,193,185,140,148,18,41,37,22,203,229,79,47,34,124,58,60,164, +223,239,243,183,154,13,222,61,205,140,167,167,39,66,8,124,57,63,199,139, +8,170,202,217,217,25,23,23,23,212,117,77,150,101,0,164,148,80,85,82,74, +136,8,117,93,115,125,125,141,170,178,92,46,159,159,32,34,0,92,93,93,113, +124,124,204,209,209,17,131,193,0,239,253,150,64,85,185,187,187,227,254, +254,254,31,133,94,58,112,112,112,192,201,201,9,189,94,143,233,116,74,81, +20,0,44,22,11,110,111,111,153,207,231,255,55,145,78,193,104,52,162,44,75, +68,132,162,40,240,222,211,52,13,15,15,15,132,16,200,243,156,148,18,49,198, +173,252,103,5,34,148,101,137,115,142,60,207,113,206,161,170,52,77,67,140, +145,225,112,184,245,99,67,48,30,143,119,20,0,239,134,67,66,8,20,69,65,219, +182,172,86,43,202,178,164,170,170,109,167,93,2,215,153,108,102,100,188, +50,60,102,12,246,246,112,206,109,199,181,215,225,108,167,83,74,137,182, +109,89,175,215,47,9,12,216,223,223,71,85,169,170,138,16,2,222,123,156,115, +136,8,155,61,81,85,98,140,196,24,153,205,102,127,76,76,109,146,207,167, +167,228,121,78,219,118,115,79,137,212,21,169,234,206,61,97,6,235,245,154, +250,241,145,113,51,22,63,157,52,31,191,223,220,124,80,213,129,25,111,193, +122,102,150,27,100,152,101,6,96,168,97,10,68,140,185,97,13,216,100,254, +107,246,77,118,247,127,50,153,4,17,121,211,77,199,1,210,165,2,42,34,17, +179,85,213,239,175,54,53,242,218,239,252,123,0,13,49,44,139,229,229,191, +123,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_57 = 3424; +static unsigned char xml_res_file_57[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,2,123,73,68,65,84,120,218,164,147,75,72,84,113,20,198,127,255, +251,236,142,147,138,90,162,89,97,101,148,80,134,20,20,65,17,244,90,37,45, +138,108,103,139,40,24,201,32,122,72,47,44,178,32,122,169,20,5,181,179,16, +162,218,20,4,45,122,16,21,22,9,81,68,190,50,202,180,151,206,232,204,220, +185,119,238,105,33,25,149,139,192,3,103,115,224,124,252,206,225,251,148, +136,48,158,82,233,29,107,238,18,114,62,234,245,55,171,0,26,143,94,108,249, +159,197,200,254,173,27,69,4,227,65,238,172,156,219,143,222,150,31,174,12, +139,62,57,114,109,221,82,181,193,201,202,199,201,157,130,16,96,135,115, +1,29,165,3,254,8,173,168,128,31,95,246,94,5,42,141,21,7,155,22,158,88,143, +236,62,94,193,80,219,229,77,189,131,59,209,148,78,16,8,150,157,73,144,112, +153,224,100,35,64,74,92,44,59,147,52,222,40,137,6,208,55,105,87,123,87, +243,45,194,101,75,200,209,110,224,14,15,18,255,250,129,68,244,35,137,104, +31,209,175,221,196,162,159,64,2,82,110,20,221,180,70,5,140,198,13,165,225, +200,197,147,37,167,128,78,110,73,241,230,10,236,182,122,250,130,93,120, +73,11,45,149,36,109,58,104,73,29,47,17,3,207,35,148,63,117,84,64,191,253, +250,75,234,224,182,3,3,243,167,155,179,147,78,209,204,236,246,187,118,254, +170,149,88,159,91,24,240,202,209,148,66,211,77,4,65,210,30,226,123,40,77, +167,245,101,207,171,101,107,87,94,215,0,234,46,28,201,110,184,126,111,75, +247,208,146,23,143,221,109,242,235,156,2,78,226,198,191,49,28,251,142,248, +30,72,0,128,159,28,254,125,2,192,142,170,218,222,156,236,172,254,207,253, +29,147,55,46,206,80,15,59,182,11,205,231,85,241,230,10,10,219,154,232,147, +106,226,177,52,150,109,163,155,33,112,227,127,62,241,236,149,99,5,135,78, +239,41,155,86,52,165,95,51,108,22,149,230,242,212,143,240,139,36,95,26, +8,188,24,137,120,130,212,208,55,18,131,253,99,19,164,163,157,243,2,63,132, +105,57,106,65,113,22,207,186,171,161,185,1,99,237,67,145,206,251,74,124, +23,207,247,48,236,240,216,4,78,222,244,110,0,47,62,128,154,96,177,96,78, +30,207,37,34,173,119,174,170,186,75,111,104,235,73,161,233,230,31,142,52, +0,106,170,106,58,39,58,214,251,119,237,93,198,234,146,17,245,116,42,129, +166,155,148,205,45,84,0,115,103,79,194,176,50,254,177,180,1,112,230,202, +153,25,0,231,246,29,126,2,131,83,1,2,223,29,233,180,135,25,202,66,105,250, +216,97,250,123,112,162,182,225,254,255,132,105,207,177,234,229,34,130,26, +111,156,127,14,0,197,187,19,120,112,84,231,143,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_58 = 1060; +static unsigned char xml_res_file_58[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,235,73,68,65,84,72,137,165,150,223,107,20,87,20, +199,63,119,118,55,219,117,53,26,173,209,88,43,49,169,21,196,66,91,169,72, +171,168,4,43,52,63,222,12,8,190,244,81,232,99,145,62,244,15,104,125,40, +125,47,84,232,67,125,118,163,109,69,177,130,20,84,240,41,210,218,42,244, +135,49,254,74,214,172,217,221,217,153,59,247,156,62,204,206,100,55,187, +141,165,61,112,103,239,204,189,247,124,207,247,156,239,185,172,81,85,254, +171,157,56,113,34,11,20,173,181,69,99,204,43,91,7,6,94,47,246,174,221,93, +220,50,252,70,249,233,227,43,159,125,250,241,23,217,23,57,57,125,250,244, +203,65,16,108,245,125,127,93,173,86,91,175,170,195,219,182,109,219,181, +99,199,142,157,167,78,125,178,113,195,134,190,53,3,125,171,123,43,97,79, +161,28,130,53,61,172,41,24,126,186,126,99,22,96,69,128,193,193,193,55,207, +158,61,251,195,190,125,251,54,25,99,186,238,17,85,158,214,28,214,131,181, +189,25,178,25,131,141,34,122,87,175,50,0,222,74,0,125,125,125,195,123,246, +236,73,157,119,75,231,163,133,6,117,7,61,249,44,130,33,116,16,57,112,18, +175,175,8,208,223,223,159,122,76,156,171,42,170,138,136,16,54,234,148,43, +85,10,185,12,161,3,43,16,9,132,18,207,95,8,144,205,102,187,70,13,208,240, +125,234,117,159,39,143,30,226,4,172,139,71,204,64,137,154,199,86,172,129, +136,252,227,90,228,92,58,87,98,199,158,137,25,58,7,81,212,2,80,42,149,186, +134,121,242,228,73,46,94,188,216,21,224,208,161,67,169,123,81,197,74,12, +32,206,33,34,56,149,118,6,19,19,19,43,145,105,179,82,169,212,22,189,19, +197,57,197,1,174,25,186,115,218,14,0,80,158,159,167,152,127,9,237,201,147, +40,199,24,67,162,80,231,132,108,54,19,59,110,22,91,85,155,53,80,196,69, +168,42,6,240,173,116,2,252,120,245,42,99,71,143,114,127,190,145,126,51, +24,104,105,129,237,253,171,58,24,137,8,65,232,16,113,100,12,52,34,101,193, +119,157,0,19,227,227,184,32,100,107,95,79,26,117,204,192,224,121,94,60, +79,82,147,48,0,34,39,4,161,37,233,172,103,117,193,15,186,0,148,166,166, +248,224,200,251,204,148,131,165,143,45,169,2,24,90,198,64,68,176,214,17, +90,33,227,65,195,42,115,85,139,147,46,41,26,31,27,195,250,13,6,214,229, +59,24,24,98,22,137,220,98,57,70,68,54,196,138,98,157,32,2,143,171,17,161, +149,84,226,109,141,54,117,254,60,170,202,236,51,203,131,100,148,67,102, +230,3,238,151,3,254,156,243,211,189,214,90,252,32,100,215,246,45,220,189, +123,143,245,133,12,15,43,33,149,186,69,197,33,110,89,138,84,149,241,241, +113,130,106,141,77,189,30,94,147,130,231,197,12,104,50,73,44,151,203,17, +134,33,57,28,57,241,121,90,181,44,212,45,30,16,161,56,39,157,0,83,83,83, +28,57,124,152,71,207,151,186,212,36,207,166,152,134,54,231,226,131,217, +44,158,231,33,206,97,157,162,145,67,157,16,53,147,216,1,32,34,140,141,142, +210,168,213,216,180,38,206,121,107,13,18,38,173,42,90,10,14,68,52,190,62, +84,49,6,116,121,145,85,149,243,23,46,48,114,240,32,143,159,75,170,158,148, +69,243,253,181,205,121,90,207,36,3,85,188,230,245,224,7,194,162,111,93, +7,192,216,232,40,245,197,69,54,174,94,234,173,84,69,198,96,60,179,164,34, +160,80,40,96,52,135,49,70,158,215,109,229,246,76,245,175,185,154,43,207, +46,132,55,131,104,195,183,29,0,151,46,95,230,221,189,123,121,178,8,152, +37,87,173,221,60,92,136,127,103,31,60,248,227,246,244,244,247,215,174,92, +186,126,171,178,118,232,232,241,143,222,186,114,167,122,15,204,76,174,39, +119,230,247,207,223,89,104,3,200,231,243,140,140,140,224,121,30,67,45,138, +105,235,226,150,180,205,207,205,237,60,54,57,25,30,155,156,228,213,253, +147,31,54,92,230,61,179,248,240,126,97,250,235,51,191,221,248,174,146,236, +75,1,90,111,200,127,99,251,15,28,8,83,39,153,108,230,155,115,215,206,21, +111,125,249,213,175,211,55,131,214,125,230,255,252,109,73,108,215,238,183, +139,26,53,194,95,238,252,108,151,175,253,13,46,235,39,209,84,139,215,54, +0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_59 = 1304; +static unsigned char xml_res_file_59[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,4,170,73,68,65,84,120,218, +140,85,109,108,20,69,24,126,102,247,238,184,107,105,75,229,160,197,214, +96,192,128,1,238,206,2,181,41,17,21,21,139,191,72,192,212,156,138,4,19, +49,1,130,209,198,196,16,254,24,84,20,131,26,146,26,99,68,227,71,240,15, +209,104,252,36,17,76,60,137,85,248,1,40,160,53,37,134,98,75,122,161,215, +187,222,237,222,238,206,142,239,204,238,94,75,61,10,147,188,55,115,51,239, +60,207,251,53,239,178,129,35,187,80,211,80,139,178,49,10,215,117,97,90, +28,225,136,142,133,107,246,227,122,35,147,201,68,195,225,240,28,198,88, +156,36,89,55,115,102,7,211,244,182,50,194,11,250,7,6,126,217,248,208,253, +235,67,55,0,178,40,26,141,182,145,204,211,52,237,102,146,37,177,88,108, +113,77,77,77,83,50,153,138,70,34,97,61,18,210,53,219,101,40,57,128,37,24, +194,58,195,240,88,97,145,188,63,45,65,58,157,126,164,183,183,247,80,99, +99,163,70,22,86,213,113,133,192,104,137,163,236,2,196,133,25,4,110,59,14, +69,67,168,11,218,116,4,165,82,105,101,125,125,125,5,92,16,216,212,49,156, +51,145,39,203,67,145,16,92,48,80,132,225,144,112,215,59,159,150,128,115, +46,100,94,38,131,203,89,138,220,183,204,18,78,247,15,34,70,150,75,96,155, +84,29,18,203,245,214,215,37,8,192,170,13,211,48,200,67,3,23,250,207,43, +107,109,238,137,231,129,128,227,95,155,54,7,129,245,213,134,195,121,144, +4,72,44,9,172,49,207,40,121,68,105,184,49,130,107,121,48,145,100,71,37, +90,134,68,18,184,132,46,239,81,112,61,130,182,190,87,32,83,232,195,116, +146,172,37,185,147,253,252,70,115,164,61,218,250,224,199,171,64,165,137, +166,218,38,164,154,87,224,129,219,214,161,189,165,115,130,128,10,128,187, +210,106,18,153,55,223,116,249,95,17,228,118,11,204,122,137,233,180,222, +71,68,207,37,154,219,208,209,186,10,75,231,38,17,175,157,163,148,178,197, +17,156,31,249,3,223,253,253,21,94,207,236,193,182,142,103,209,211,190,27, +76,133,195,245,115,64,137,231,142,242,88,26,108,248,89,86,33,162,141,231, +113,13,112,57,228,250,118,44,133,175,139,222,190,55,81,167,215,227,233, +212,14,200,18,150,33,41,91,50,52,28,244,12,96,82,134,115,134,151,163,80, +124,47,107,209,117,188,248,196,29,91,177,189,163,231,218,193,38,190,213, +183,222,139,167,218,183,227,237,95,247,227,192,111,123,177,126,225,6,69, +233,112,73,96,35,120,89,163,37,23,70,217,39,8,135,113,207,236,216,156,200, +99,169,45,40,218,133,10,94,234,213,142,171,240,79,189,208,87,89,63,154, +220,130,239,7,62,199,137,203,199,41,193,113,216,84,159,22,133,68,39,112, +211,22,200,142,219,20,54,47,68,90,162,121,89,75,114,94,2,38,47,162,96,229, +148,84,192,79,184,158,248,132,193,185,212,77,52,37,168,82,44,56,86,153, +42,136,170,136,188,176,233,149,13,231,109,69,22,148,184,118,247,252,53, +77,81,122,137,99,229,44,198,204,172,154,3,240,175,63,248,84,73,64,18,156, +203,57,70,29,183,62,58,11,15,119,173,198,151,223,30,195,77,49,29,67,99, +22,198,74,54,4,229,194,245,223,73,40,68,105,230,204,192,104,249,242,255, +194,30,236,125,242,206,91,222,127,107,66,135,195,128,78,25,141,234,2,51, +120,1,35,20,150,28,129,203,214,64,181,164,170,75,17,152,60,71,173,163,136, +156,53,140,169,253,82,238,5,149,35,252,185,82,255,90,17,130,201,71,6,213, +73,109,234,112,130,64,29,255,69,85,8,44,228,109,161,27,200,91,67,152,202, +144,183,135,212,188,171,231,67,96,165,134,151,211,155,60,21,194,16,154, +65,53,111,87,12,160,246,236,181,15,249,14,100,203,112,3,15,196,104,1,90, +9,227,124,24,87,53,5,2,84,192,254,90,142,162,51,161,35,232,14,152,215,74, +84,197,208,172,249,237,193,32,151,10,134,205,61,15,196,149,83,66,17,92, +174,196,98,231,134,36,14,124,118,186,2,44,135,220,83,58,193,160,59,173, +117,11,80,91,91,67,113,215,144,47,217,226,247,193,113,51,91,228,230,191, +57,235,207,178,51,91,125,115,217,198,35,208,35,90,236,100,93,56,158,82, +248,172,74,204,39,253,81,75,249,83,138,224,190,252,158,179,153,163,71,51, +39,199,26,22,119,165,119,44,126,247,216,165,75,116,58,24,142,132,159,185, +240,90,251,63,202,131,195,107,5,79,255,200,54,89,236,202,81,38,180,248, +213,31,132,106,31,9,130,176,116,44,207,110,187,210,253,120,122,105,119, +119,26,183,220,213,125,208,228,122,130,21,134,46,198,206,188,191,243,175, +190,111,46,86,28,221,156,97,160,175,221,25,151,21,151,112,173,112,136,163, +192,57,43,64,137,54,73,32,101,28,51,10,13,231,182,46,123,175,43,53,127, +221,60,121,87,89,169,135,66,31,125,241,211,15,53,125,251,54,79,6,87,33, +122,242,120,213,206,179,98,170,19,126,132,78,78,85,60,216,41,176,100,217, +242,185,194,49,199,207,157,63,91,154,122,254,159,0,3,0,231,195,138,67,73, +226,228,15,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_60 = 88800; +static unsigned char xml_res_file_60[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,195,0,0,1,172,8,2,0, +0,0,239,200,132,198,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43, +14,27,0,0,0,7,116,73,77,69,7,215,8,4,12,28,44,161,72,146,123,0,0,0,7,116, +69,88,116,65,117,116,104,111,114,0,169,174,204,72,0,0,0,12,116,69,88,116, +68,101,115,99,114,105,112,116,105,111,110,0,19,9,33,35,0,0,0,10,116,69, +88,116,67,111,112,121,114,105,103,104,116,0,172,15,204,58,0,0,0,14,116, +69,88,116,67,114,101,97,116,105,111,110,32,116,105,109,101,0,53,247,15, +9,0,0,0,9,116,69,88,116,83,111,102,116,119,97,114,101,0,93,112,255,58,0, +0,0,11,116,69,88,116,68,105,115,99,108,97,105,109,101,114,0,183,192,180, +143,0,0,0,8,116,69,88,116,87,97,114,110,105,110,103,0,192,27,230,135,0, +0,0,7,116,69,88,116,83,111,117,114,99,101,0,245,255,131,235,0,0,0,8,116, +69,88,116,67,111,109,109,101,110,116,0,246,204,150,191,0,0,0,6,116,69,88, +116,84,105,116,108,101,0,168,238,210,39,0,0,1,0,73,68,65,84,120,156,236, +189,119,147,37,201,113,39,232,17,145,250,105,89,186,186,170,171,90,139, +209,192,12,6,26,132,32,9,130,71,242,184,183,164,221,226,204,214,110,205, +248,207,217,125,5,126,131,189,175,176,220,51,2,188,37,177,71,128,7,114, +33,56,24,2,203,1,70,79,119,79,235,210,242,85,61,173,82,70,248,253,145,85, +217,89,153,249,94,55,184,32,167,6,108,183,178,178,124,153,17,30,17,30,30, +238,191,240,136,140,36,136,8,35,200,117,93,73,146,0,128,16,226,223,113, +28,7,0,20,69,57,232,215,64,226,170,164,80,74,1,8,23,2,17,40,151,84,170, +106,138,54,138,161,231,56,2,152,164,48,116,93,36,4,5,82,10,148,73,132,16, +68,244,75,241,235,19,148,248,148,62,46,36,141,121,38,132,8,247,40,34,42, +138,226,121,158,231,121,136,200,5,103,220,99,192,0,136,235,113,66,8,18, +236,187,142,196,36,70,89,36,35,0,16,66,8,33,194,115,93,135,51,66,16,17, +1,16,40,231,156,49,70,8,248,202,228,107,213,83,125,250,216,17,77,188,235, +119,36,234,141,18,49,0,0,1,0,73,68,65,84,165,52,184,246,187,25,17,37,73, +34,132,0,130,39,56,23,156,11,238,184,174,229,56,142,235,114,193,61,244, +6,246,0,1,131,140,112,172,67,136,72,25,99,140,8,206,5,10,4,0,66,41,163, +128,200,5,10,193,131,178,3,5,26,99,47,159,210,105,163,100,77,242,251,146, +115,30,92,135,255,51,198,8,33,30,23,142,240,56,10,129,136,136,30,231,142, +235,113,33,76,207,244,184,231,243,9,171,2,33,132,80,42,43,170,166,105,156, +35,34,250,74,35,49,42,80,8,46,184,231,121,158,7,0,120,108,11,195,246,233, +41,157,114,138,106,146,235,186,143,158,209,232,211,160,95,53,73,167,72, +61,193,185,16,2,79,252,249,142,15,142,77,81,56,151,79,132,16,89,150,37, +198,124,195,5,0,4,81,32,1,66,1,64,160,224,130,7,134,48,40,247,87,220,238, +167,244,171,166,4,77,234,247,251,131,193,0,0,132,16,225,71,24,242,59,134, +98,100,165,44,231,194,19,28,143,201,215,164,120,25,113,111,37,73,140,82, +202,40,5,66,16,16,1,8,8,202,152,36,73,128,224,190,23,37,83,0,0,1,0,73,68, +65,84,187,62,63,117,56,239,83,125,58,205,148,224,221,108,219,230,156,155, +166,25,224,164,72,47,34,162,196,164,172,150,37,72,185,16,252,200,191,29, +105,19,32,16,136,34,229,176,115,12,233,19,37,224,39,37,148,130,127,151, +82,66,8,229,156,11,60,145,55,40,250,169,62,157,78,74,208,36,73,146,50,153, +140,109,219,166,105,250,119,2,63,21,252,244,161,119,70,202,112,126,236, +215,142,245,9,32,172,73,2,185,39,60,27,78,122,168,19,218,64,40,163,148, +50,217,115,28,0,95,159,16,8,248,92,1,30,205,233,146,179,63,165,211,65,201, +136,27,0,242,249,188,44,203,189,94,111,48,24,248,97,164,8,244,70,196,188, +158,23,30,15,108,146,175,82,4,142,102,106,0,0,40,60,199,26,152,118,183, +219,245,61,102,160,22,143,52,131,80,198,40,33,20,5,55,77,147,0,162,192, +35,115,8,232,185,46,247,142,240,123,56,227,83,101,58,109,148,128,169,1, +160,223,239,3,128,97,24,190,78,152,166,25,64,224,176,127,145,37,217,96, +41,193,57,32,200,68,70,68,136,184,36,35,57,160,23,0,0,1,0,73,68,65,84,68, +207,21,92,48,36,132,115,207,245,92,215,113,93,143,199,75,4,0,85,211,24, +99,28,41,57,226,130,40,16,145,0,161,190,178,198,171,250,84,159,78,15,37, +216,36,68,228,156,31,30,30,2,64,42,149,74,167,211,112,108,132,194,182,196, +239,197,153,194,12,69,150,85,178,5,163,0,2,178,74,150,81,22,76,250,144, +128,32,196,119,151,185,92,214,113,60,207,117,93,79,132,149,32,96,232,207, +233,0,8,149,152,235,121,62,14,7,74,40,99,130,11,129,194,117,92,136,57,187, +167,202,116,74,40,57,198,157,203,229,214,214,214,250,253,254,194,194,66, +112,51,236,86,218,195,150,11,110,94,46,184,220,173,164,42,186,162,75,76, +50,20,3,0,92,238,50,202,142,179,48,16,2,36,74,1,16,137,76,193,21,71,172, +18,53,128,16,194,8,32,50,116,61,14,132,81,134,92,16,70,1,81,112,68,32,158, +231,18,194,24,59,129,223,159,6,196,79,3,141,140,76,158,61,123,54,157,78, +111,109,109,13,135,195,72,52,8,0,122,110,219,161,131,182,221,108,217,141, +172,145,149,181,0,234,42,0,0,1,0,73,68,65,84,37,25,0,100,73,150,37,89,87, +244,80,167,82,137,130,99,90,158,99,14,122,29,69,145,224,216,3,30,233,129, +224,209,178,1,8,33,154,166,73,146,68,41,69,225,57,142,75,142,195,152,0, +84,8,254,212,12,157,66,138,106,146,162,40,150,101,117,58,29,68,172,84,42, +178,44,251,247,125,208,29,16,39,158,42,51,91,26,128,230,214,123,245,122, +191,62,176,6,254,163,176,169,64,68,89,215,40,113,9,161,32,60,211,225,0, +8,192,93,107,56,232,247,1,128,32,119,29,55,174,24,136,40,73,140,81,42,73, +12,5,23,128,72,8,2,80,70,9,0,23,194,115,221,192,20,69,86,235,158,210,71, +66,81,77,146,101,217,48,12,68,244,65,247,212,212,84,42,149,242,145,147, +109,219,65,231,113,206,109,207,81,21,73,150,216,0,58,93,222,106,218,117, +215,115,35,107,109,132,16,42,169,217,148,70,100,53,157,73,15,76,151,35, +160,240,204,161,105,219,71,137,109,203,137,71,51,3,171,198,100,69,211,117, +238,7,156,48,80,83,33,56,112,206,185,56,90,117,9,22,88,158,209,145,137, +204,0,0,1,0,73,68,65,84,234,211,71,69,9,222,45,155,205,230,243,121,215, +117,27,141,6,28,3,35,93,215,41,165,150,101,217,182,13,0,200,193,113,29, +207,115,129,128,164,18,73,37,66,117,155,195,70,34,88,33,178,126,120,112, +80,111,118,104,16,45,32,74,166,80,232,13,142,108,20,28,119,127,92,15,252, +159,178,36,49,122,4,143,124,150,132,34,16,130,40,128,16,0,20,66,112,206, +159,194,240,143,144,70,198,147,138,197,162,166,105,205,102,179,211,233, +248,119,252,93,0,136,232,186,46,34,184,130,59,174,227,122,174,34,73,148, +16,33,176,79,58,7,221,131,56,43,66,136,174,105,76,82,8,163,4,0,40,1,38, +51,10,132,15,45,143,3,10,107,216,15,194,84,137,203,35,18,163,132,80,137, +29,239,77,64,100,146,132,64,232,35,197,37,0,224,121,222,83,103,247,81,209, +200,253,73,71,40,71,150,133,16,138,162,248,115,111,77,211,0,192,113,28, +68,112,184,231,171,133,199,113,104,218,158,224,186,162,30,58,181,180,149, +214,20,45,88,105,241,53,35,155,205,2,128,233,184,132,123,46,18,166,201, +94,140,0,0,1,0,73,68,65,84,225,58,158,208,24,82,199,114,41,231,46,64,253, +240,176,92,169,132,43,16,49,111,129,99,101,140,121,66,184,142,75,41,225, +84,146,40,0,0,2,50,38,17,20,8,39,86,106,48,180,86,248,148,254,89,105,164, +38,249,209,29,85,85,253,159,190,98,249,189,226,71,125,28,207,163,64,40, +165,142,231,13,109,27,0,60,79,0,194,65,191,86,205,76,24,170,1,49,109,208, +21,25,64,102,30,23,131,110,183,233,169,18,1,143,8,32,169,76,158,121,125, +79,32,21,46,149,20,0,0,228,174,43,8,99,140,146,112,108,29,252,77,77,4,56, +231,8,128,156,163,111,231,4,7,100,8,40,4,82,74,72,40,208,240,84,153,254, +101,40,57,50,233,83,120,135,73,224,50,252,235,140,146,117,185,112,132,231, +10,142,66,32,32,162,191,246,38,122,110,223,14,45,180,197,151,219,100,137, +233,233,148,68,193,226,4,37,42,40,243,247,224,14,108,15,0,122,189,222,96, +48,4,20,174,227,56,222,35,28,29,174,9,37,84,209,52,206,5,57,10,129,34,2, +113,93,215,117,253,5,64,17,240,37,10,211,0,0,1,0,73,68,65,84,236,172,10, +123,186,167,206,238,159,149,18,52,41,232,0,73,146,34,210,15,250,181,104, +20,85,161,58,156,59,158,23,108,81,242,209,116,100,47,64,88,21,2,93,84,244, +84,190,88,84,20,61,155,209,9,34,0,8,206,185,237,33,37,156,115,251,120,229, +24,98,113,112,8,217,24,77,211,24,163,148,28,39,36,4,8,65,130,194,243,16, +193,95,12,252,149,201,233,41,61,142,70,34,110,56,185,235,45,76,132,16,85, +81,39,245,73,238,9,151,251,187,1,252,53,50,68,68,130,196,215,36,66,8,10, +55,200,18,100,15,58,56,151,81,25,149,193,51,91,141,70,187,111,129,231,154, +3,147,1,72,18,184,2,124,69,64,68,16,30,196,98,217,254,181,239,217,0,8,165, +84,146,101,89,98,18,165,0,64,25,67,192,112,216,243,105,140,224,159,155, +70,106,146,15,183,195,104,35,146,160,148,41,41,66,241,60,206,143,55,187, +9,33,132,56,218,11,224,167,33,200,135,237,198,65,179,11,33,179,20,65,45, +70,58,69,9,17,68,145,82,170,231,112,87,160,235,241,129,115,164,4,96,86, +118,215,0,0,1,0,73,68,65,84,132,16,64,222,239,118,7,131,65,56,99,100,55, +129,36,7,239,192,160,191,171,133,17,228,28,60,207,243,55,58,161,240,227, +5,71,77,123,170,79,191,114,74,198,73,0,64,8,113,221,19,145,198,72,2,89, +146,39,141,73,238,250,251,74,30,237,79,34,64,40,121,244,42,129,101,153, +157,102,27,143,95,40,136,23,164,232,169,98,177,88,202,167,211,154,162,202, +152,206,23,10,185,180,191,204,123,188,179,0,29,151,123,158,215,106,117, +227,217,31,213,240,228,125,64,0,74,0,8,23,28,0,71,233,241,83,250,85,209, +184,183,148,142,94,35,137,81,112,179,146,169,52,134,141,62,239,249,47,28, +9,20,20,40,35,204,215,164,163,100,84,49,164,161,135,32,163,11,228,168,184, +8,130,246,255,19,0,85,55,26,205,186,204,128,160,34,216,163,178,101,205, +72,165,84,130,104,218,158,174,74,145,140,112,204,20,8,33,64,142,118,34, +16,64,46,152,34,163,235,2,61,122,119,133,209,71,21,75,28,36,79,233,159, +76,201,136,219,151,178,119,188,197,108,20,201,146,60,151,159,163,156,149, +105,172,251,0,0,1,0,73,68,65,84,21,228,66,138,165,8,146,162,86,148,89,200, +39,2,34,16,37,165,15,28,228,118,175,211,60,232,12,29,17,218,236,22,177, +82,84,214,36,198,128,202,2,32,48,36,0,104,245,187,221,118,187,223,31,30, +1,236,24,61,226,67,168,36,75,190,138,161,240,8,1,130,8,132,4,45,141,108, +78,143,102,127,74,255,84,74,176,73,143,34,203,146,20,185,25,25,190,132, +144,66,186,48,107,207,22,83,69,199,115,90,102,107,34,51,97,121,150,196, +66,198,12,129,40,134,211,237,245,152,213,234,216,26,100,210,186,60,166, +66,133,66,1,17,135,67,43,192,251,136,64,40,67,0,215,229,153,148,176,108, +212,212,113,166,20,142,60,29,149,36,230,56,14,0,250,193,75,74,169,224,158, +64,96,44,216,244,242,116,251,229,175,140,162,93,18,142,227,133,109,82,28, +39,5,119,102,75,179,150,101,229,82,57,67,53,100,73,214,85,253,81,46,244, +205,146,228,118,54,250,122,129,72,58,5,20,238,144,202,70,212,55,133,74, +39,132,164,82,186,227,48,32,12,0,8,128,172,165,50,25,149,2,38,90,93,252, +0,0,1,0,73,68,65,84,12,6,125,46,100,85,97,220,243,216,241,155,230,241,216, +227,209,204,78,86,92,211,68,42,17,56,122,95,5,17,169,164,184,174,39,201, +12,81,32,80,26,130,225,241,150,62,165,39,167,168,119,11,203,49,24,187,241, +52,17,113,187,174,75,8,81,100,37,250,136,30,109,72,162,20,80,48,67,103, +62,136,62,60,60,108,52,218,126,146,48,112,14,231,85,20,69,145,25,34,2,149, +130,217,86,74,147,252,157,74,142,109,7,101,145,147,218,16,86,44,77,215, +101,137,17,32,4,208,229,220,127,66,0,185,64,60,14,96,62,165,95,9,141,139, +39,249,130,142,7,169,35,215,136,24,137,97,62,242,26,84,86,53,13,1,242,149, +153,114,62,173,81,68,0,202,36,219,182,123,237,22,156,236,251,184,151,57, +210,9,42,203,50,11,197,35,142,158,217,182,53,28,12,6,253,14,156,84,196, +136,122,49,74,128,16,42,49,228,8,200,81,128,196,40,250,129,11,129,254,14, +130,48,61,141,17,252,211,104,220,185,0,190,77,138,68,113,226,130,38,132, +248,139,240,225,188,65,198,76,62,151,99,95,126,32,0,0,1,0,73,68,65,84,49, +100,61,155,201,101,53,64,0,110,247,26,45,85,146,12,141,88,28,0,120,220, +180,132,57,251,23,41,93,246,151,210,128,48,110,13,0,0,1,92,215,53,135,150, +39,200,208,140,190,5,21,103,66,153,164,169,10,16,226,216,22,130,64,68,66, +40,161,140,0,136,17,175,27,140,149,219,83,138,210,184,115,1,2,156,20,141, +220,196,58,158,49,22,247,44,1,105,10,11,248,160,240,250,67,110,57,222,208, +118,91,67,219,29,182,205,78,203,127,251,32,78,39,236,156,127,135,72,170, +10,2,192,243,60,68,160,146,106,164,179,67,211,52,93,17,47,55,94,115,38, +201,140,18,199,225,254,222,112,0,164,140,114,33,252,205,115,145,230,63, +85,166,95,138,198,121,183,48,78,10,84,36,113,221,195,247,17,137,106,20, +206,162,104,58,82,69,215,120,101,110,110,126,186,60,28,12,250,3,167,215, +235,155,166,185,127,120,8,177,183,160,226,75,28,132,144,116,174,84,63,56, +176,60,193,17,9,147,24,5,77,162,158,107,187,214,176,215,233,0,0,10,215, +118,188,48,135,71,49,119,66,89,106,132,59,0,0,1,0,73,68,65,84,20,85,69, +160,140,209,96,245,5,142,48,147,224,156,243,99,227,26,246,116,79,85,234, +73,104,220,116,58,0,164,163,166,51,193,253,248,89,20,1,133,213,75,79,103, +140,12,113,45,178,179,189,169,50,206,32,227,128,68,244,244,124,41,139,110, +175,213,104,8,129,165,74,121,84,246,128,12,77,163,76,241,184,227,135,193, +9,1,34,184,237,185,2,165,129,105,41,196,115,184,162,72,158,39,136,196,104, +216,237,146,163,165,95,5,252,55,168,60,135,51,141,18,228,2,16,8,21,2,8, +241,60,207,135,125,79,39,113,191,20,141,60,141,4,198,158,85,2,39,141,191, +31,238,139,155,171,110,247,196,250,134,159,64,82,179,18,165,130,233,156, +72,50,177,153,36,35,34,1,104,183,123,142,32,158,240,172,126,55,146,37,82, +135,108,54,155,78,105,154,162,40,190,223,68,64,66,56,168,70,54,43,132,240, +56,31,14,186,8,32,68,20,207,133,155,64,153,196,36,138,0,76,98,220,19,126, +49,148,73,128,194,227,34,108,98,159,194,240,39,161,168,77,10,207,161,226, +225,224,8,250,14,156,30,9,7,0,0,1,0,73,68,65,84,174,253,45,222,254,142, +202,240,211,94,175,215,106,181,36,73,154,158,158,14,167,159,157,157,5,128, +102,219,212,101,183,51,180,9,209,1,80,82,51,133,114,201,25,54,186,245,238, +100,58,59,170,198,1,31,85,85,143,149,3,128,72,136,30,163,144,73,25,192, +173,129,133,253,161,165,169,58,196,12,82,192,129,80,42,83,21,224,120,205, +151,80,20,28,8,72,18,115,92,14,20,56,23,254,73,81,65,209,137,225,217,167, +228,211,56,156,52,222,103,69,108,82,56,54,19,126,116,112,112,208,237,118, +227,42,136,136,197,188,174,234,121,175,215,216,218,218,106,118,135,76,86, +36,138,222,208,230,114,118,125,125,183,213,181,248,88,216,251,72,165,52, +85,149,101,194,135,254,107,226,8,32,43,58,37,194,118,28,192,104,196,40, +30,110,16,220,5,38,17,74,0,185,231,56,64,8,8,193,185,0,0,17,11,109,60,165, +81,148,188,238,230,95,4,211,227,136,232,131,72,116,248,103,42,149,26,14, +135,190,59,11,63,42,20,10,19,19,19,31,126,248,225,189,123,247,34,165,32, +34,33,82,95,183,246,238,0,0,1,0,73,68,65,84,190,144,3,0,71,48,127,188,115, +34,73,154,158,210,72,183,223,27,90,195,65,183,149,88,239,112,149,36,69, +81,21,166,105,90,243,160,6,0,4,80,112,97,104,10,10,238,154,131,118,179, +25,9,131,69,205,12,161,50,59,138,87,113,206,65,8,36,196,243,119,56,112, +193,133,224,220,11,183,250,41,12,79,164,228,19,38,2,51,30,153,145,37,130, +164,64,184,134,97,200,178,60,24,12,44,203,10,51,220,219,219,43,22,139,134, +97,172,172,172,108,108,108,236,238,238,134,243,166,242,165,185,185,185, +201,74,69,215,36,0,160,194,241,108,171,82,41,40,220,53,135,195,118,171, +187,182,182,150,88,201,224,218,175,128,154,202,78,76,86,91,221,190,139, +18,183,123,0,136,2,45,211,53,114,197,129,233,34,8,219,178,32,102,147,8, +33,148,41,140,250,110,144,170,186,110,90,30,149,24,16,160,148,10,225,159, +15,5,161,227,156,162,33,245,167,228,83,242,106,73,56,160,18,143,76,66,146, +169,247,239,248,175,197,1,128,127,246,82,48,124,27,141,70,175,215,163,148, +58,142,211,110,124,84,93,182,0,0,1,0,73,68,65,84,183,19,203,42,230,116, +10,160,25,42,152,109,33,184,196,65,112,201,177,164,226,212,108,179,111, +139,177,75,99,1,43,89,146,8,149,53,149,34,2,18,224,84,97,12,92,199,178, +29,167,223,127,244,150,112,92,9,8,0,147,24,1,208,13,77,242,223,83,225,130, +82,70,8,5,33,0,48,188,157,55,48,201,79,149,41,160,113,56,9,70,72,106,20, +98,240,19,107,154,166,170,170,231,121,193,196,13,17,47,94,188,152,205,102, +253,3,190,51,153,204,237,219,183,91,173,71,171,37,1,79,130,168,166,242, +185,66,186,86,107,89,76,16,10,169,20,29,54,91,220,177,249,232,3,187,195, +149,76,27,154,68,33,157,47,183,123,22,128,68,184,205,5,40,68,56,182,71, +168,220,237,52,122,3,19,66,202,20,206,203,36,9,142,66,76,192,100,5,5,151, +101,73,162,132,201,18,101,254,162,203,137,92,79,87,87,194,244,24,77,138, +12,223,81,81,150,136,40,9,33,153,76,198,127,199,45,16,125,62,159,247,143, +243,238,247,251,156,243,0,81,69,124,13,80,57,85,168,12,109,116,136,253, +126,7,80,0,0,1,0,73,68,65,84,106,164,104,110,162,156,149,189,92,90,163, +39,103,94,17,243,16,239,203,82,161,160,107,138,166,178,110,171,69,145,160, +199,169,164,104,233,146,235,216,158,0,219,60,113,138,1,132,230,16,71,172, +8,85,53,205,180,108,255,221,58,207,113,253,23,104,2,119,255,84,123,34,244, +24,77,130,209,51,255,19,92,70,204,242,2,239,70,8,145,101,185,82,169,204, +206,206,46,46,46,2,64,173,86,27,83,226,210,210,220,217,153,178,161,25,181, +173,221,142,203,91,61,55,98,66,18,84,48,70,170,194,212,84,134,129,24,112, +1,140,34,130,196,64,97,212,118,108,115,104,71,178,4,14,43,28,44,208,53, +149,16,66,0,1,48,113,139,92,184,50,255,202,141,211,184,121,126,228,34,158, +32,144,157,191,66,23,134,231,254,253,98,177,120,112,112,208,106,181,16, +209,117,93,127,249,69,8,113,254,252,249,169,169,169,64,153,194,246,32,172, +124,20,153,174,74,142,195,65,184,158,111,41,66,10,20,190,14,103,63,81,103, +194,10,165,146,36,235,170,191,29,5,128,0,112,238,121,46,169,215,155,66, +43,144,212,0,0,1,0,73,68,65,84,166,115,98,83,104,220,226,34,34,163,76,209, +52,113,164,105,9,123,13,34,63,255,213,42,211,72,77,26,101,192,163,200,198, +15,91,75,39,246,86,7,105,210,233,244,204,204,140,127,95,146,36,207,243, +252,47,88,120,158,55,57,57,89,175,215,225,216,24,4,220,194,241,5,0,168, +206,206,46,44,44,232,153,76,16,66,141,40,83,164,50,113,75,3,0,249,172,166, +171,134,161,201,224,239,192,36,76,213,104,62,159,229,220,75,156,132,70, +178,35,162,166,42,254,169,4,227,233,95,51,12,31,39,157,196,209,150,8,123, +67,59,101,49,98,150,150,150,150,114,185,156,111,147,142,14,215,66,100,140, +249,23,225,226,226,93,24,240,207,106,161,115,74,146,210,135,75,31,213,28, +77,149,8,162,172,200,32,184,154,78,153,67,75,151,143,244,115,216,59,49, +157,140,152,186,72,101,70,149,30,49,201,255,218,244,105,220,254,164,200, +198,157,68,99,224,39,246,15,236,26,37,247,169,169,169,181,181,181,195,195, +67,215,117,57,231,136,200,57,247,47,194,18,39,158,213,60,216,29,5,56,226, +7,7,76,185,0,0,1,0,73,68,65,84,112,45,49,22,48,30,17,83,66,84,93,7,130, +221,122,147,155,102,167,127,116,188,152,44,43,205,102,115,96,58,158,235, +132,13,219,99,109,204,120,141,137,186,218,95,107,26,185,63,9,17,41,165, +113,131,148,40,157,224,152,229,120,239,34,226,196,196,132,235,186,189,94, +79,150,101,127,37,139,82,234,219,164,80,22,175,190,183,95,107,246,119,118, +118,70,77,199,34,229,142,239,161,68,19,226,255,207,164,210,154,174,114, +137,74,18,37,132,160,240,134,3,75,85,85,219,113,92,107,232,216,86,36,75, +68,8,137,3,38,108,140,195,255,255,149,168,17,140,218,85,18,177,73,143,181, +7,138,162,64,12,177,134,205,195,149,43,87,16,241,237,183,223,150,101,89, +146,164,197,197,197,71,111,90,250,18,247,134,189,129,155,169,206,117,107, +107,183,86,119,174,44,78,39,86,236,73,38,146,137,247,201,201,96,125,42, +155,245,122,3,85,243,207,69,241,56,85,157,193,208,5,170,106,212,236,15, +96,48,44,20,10,71,45,69,238,114,34,75,143,182,143,6,42,146,8,189,35,82, +138,43,223,124,173,100,112,0,0,1,0,73,68,65,84,175,43,141,219,51,233,219, +164,241,254,194,127,228,31,244,22,151,84,120,87,9,33,228,197,23,95,204, +229,114,170,170,110,111,111,111,111,111,135,225,8,1,46,104,186,144,215, +47,95,190,124,174,156,25,116,219,157,190,29,153,118,71,204,97,162,117,140, +59,199,196,185,30,33,36,159,77,171,146,111,23,37,244,250,133,114,89,166, +84,16,137,72,186,42,209,129,229,30,173,254,34,183,157,228,99,85,35,90,18, +169,88,68,152,241,251,191,102,52,110,238,22,188,17,48,106,162,27,60,10, +239,39,9,167,169,215,235,171,171,171,97,158,11,11,11,203,203,203,156,243, +94,175,119,130,179,164,11,166,72,12,0,64,205,102,59,131,126,183,231,8,0, +16,78,196,203,140,50,9,65,17,225,52,112,114,70,22,113,70,199,50,144,116, +77,233,117,59,2,5,0,74,146,100,164,12,211,178,29,115,48,28,12,34,45,138, +107,106,220,38,37,26,230,95,123,103,247,68,187,111,71,13,178,224,34,216, +5,16,73,131,136,119,239,222,125,243,205,55,35,76,46,95,190,252,204,51,207, +20,10,133,80,21,49,197,102,0,0,1,0,73,68,65,84,14,13,28,39,216,153,194, +0,142,78,5,224,86,253,32,97,59,192,24,24,20,168,78,96,39,18,129,87,88,231, +140,76,65,112,174,170,26,30,149,138,18,160,237,112,211,178,27,237,46,247, +67,89,232,5,172,198,219,233,120,85,195,122,60,30,164,127,124,41,1,39,237, +239,239,83,74,43,149,74,56,222,24,73,19,193,161,254,119,41,6,131,1,231, +220,95,36,9,104,102,102,38,157,78,191,251,238,187,178,44,95,189,122,53, +236,20,206,156,57,19,102,40,172,230,65,35,183,80,77,33,162,228,14,118,106, +245,97,207,184,116,118,170,223,29,72,196,236,116,77,144,164,133,133,133, +196,102,196,33,75,34,194,11,123,183,8,135,82,169,228,95,116,7,54,1,32,64, +4,145,210,249,140,2,86,215,66,0,0,202,108,199,83,21,6,177,47,69,61,57,133, +155,255,107,6,155,18,108,82,173,86,243,247,166,69,226,141,1,197,145,117, +42,149,242,149,73,8,49,24,12,130,243,150,253,241,39,132,48,12,3,0,238,223, +191,255,240,225,195,112,222,176,88,151,47,205,182,182,239,1,128,65,128, +214,207,0,0,1,0,73,68,65,84,55,28,162,164,203,170,46,73,210,234,250,118, +107,104,247,7,195,190,197,29,199,217,217,169,69,242,142,161,248,232,15, +44,202,168,244,0,160,42,18,16,134,66,16,206,125,111,75,142,120,80,207,117, +1,5,247,78,28,117,23,105,72,28,45,69,64,91,216,170,253,58,25,167,228,83, +148,151,151,151,31,62,124,216,60,185,71,44,145,194,9,12,195,200,231,243, +158,231,249,129,202,64,184,135,135,135,221,110,151,115,62,24,12,154,205, +230,27,111,188,225,167,143,120,73,166,231,231,166,171,31,126,248,225,189, +205,125,23,33,83,154,90,60,123,214,113,93,211,245,144,105,133,234,204,185, +115,231,58,157,254,240,120,133,99,188,179,136,107,76,34,66,15,223,241,211, +171,50,3,42,169,154,162,106,148,11,64,255,68,203,163,164,28,132,112,109, +199,21,9,11,201,120,34,168,145,92,147,95,51,59,20,166,145,81,128,108,54, +203,57,223,218,218,98,140,101,50,153,76,38,19,129,186,62,133,7,165,47,77, +63,162,221,110,183,195,81,108,255,128,111,0,72,165,82,138,162,188,243,206, +59,243,107,12,194,72,0,0,1,0,73,68,65,84,243,243,149,147,135,221,2,64,121, +114,182,213,51,61,217,240,192,1,64,32,228,226,185,133,149,181,14,218,221, +253,90,189,223,50,46,95,190,96,181,118,33,149,121,184,89,91,90,90,10,35, +217,48,118,25,15,126,35,173,72,236,93,35,165,3,232,251,7,135,170,4,66,206, +4,109,20,194,227,64,100,244,16,89,68,111,198,76,5,34,96,32,62,45,24,85, +141,143,17,37,35,238,189,189,189,106,181,58,57,57,73,41,245,60,175,209, +104,132,97,44,0,12,172,19,27,35,225,100,244,136,16,162,40,138,255,58,165, +79,103,206,156,153,155,155,115,93,183,219,237,238,238,238,14,135,195,96, +209,45,204,4,17,207,157,59,119,105,97,170,144,202,164,13,229,209,93,57, +163,26,41,198,216,234,214,65,191,231,110,111,214,56,165,155,155,155,157, +161,25,47,29,70,59,190,39,177,13,225,188,186,170,80,89,51,142,23,85,100, +66,28,129,8,72,0,131,99,202,35,185,18,57,199,213,40,241,209,168,42,125, +44,40,249,76,183,96,243,208,236,236,236,153,51,103,194,51,32,63,205,74, +237,45,216,182,39,0,0,1,0,73,68,65,84,193,123,219,111,239,213,247,238,238, +126,8,39,39,77,126,154,224,115,94,190,38,81,74,25,99,203,203,203,151,47, +95,126,238,185,231,6,131,193,246,246,118,164,80,8,137,53,157,47,84,138, +134,127,90,141,63,153,202,87,166,151,151,151,29,215,179,28,97,9,249,236, +217,179,182,109,183,90,141,198,97,51,156,55,140,66,34,252,227,74,150,8, +101,194,79,115,185,92,46,147,209,212,163,57,172,36,211,190,233,18,66,40, +165,138,44,119,187,253,224,100,196,68,79,26,167,136,29,10,223,28,147,235, +99,65,201,222,237,194,133,11,223,251,222,247,84,85,253,202,87,190,18,127, +234,121,222,90,103,101,192,251,93,167,163,74,42,217,167,50,149,37,38,207, +21,231,225,228,176,43,151,203,15,31,62,228,156,11,33,60,207,99,140,249, +203,109,203,203,203,174,235,238,236,236,248,59,5,70,17,5,0,170,23,75,208, +105,237,33,150,0,224,226,217,233,131,245,53,143,166,101,128,243,231,207, +15,90,187,123,205,65,190,82,100,78,31,148,180,159,43,192,43,99,166,253, +225,52,137,78,10,98,222,214,4,159,0,0,1,0,73,68,65,84,222,10,17,169,196, +132,99,19,85,118,76,203,113,60,69,166,182,235,73,0,138,170,122,174,203, +100,153,132,152,36,206,206,18,177,84,120,28,198,167,156,31,23,26,247,85, +174,114,185,252,218,107,175,213,106,181,200,148,100,48,236,83,5,62,181, +240,105,139,152,165,108,249,160,191,191,213,222,184,127,112,23,66,145,27, +159,138,197,98,181,90,117,28,135,82,42,73,146,16,194,191,168,84,42,75,75, +75,91,91,91,225,18,3,254,39,250,128,169,197,114,62,155,49,218,219,247,222, +127,255,125,0,208,85,66,200,81,181,83,233,140,132,14,231,86,187,118,184, +119,216,178,121,84,117,194,134,42,242,40,114,17,161,100,20,207,228,108, +42,197,20,217,243,184,145,203,217,142,227,184,124,56,52,123,189,65,152, +141,127,14,112,132,91,88,93,226,55,73,82,0,243,227,101,162,18,52,201,135, +50,87,174,92,121,254,249,231,117,93,247,219,211,239,247,131,102,15,172, +126,65,207,107,146,118,169,114,181,104,148,167,10,51,51,165,185,106,97, +226,193,238,125,211,58,218,37,29,208,139,47,190,88,84,128,119,225,0,0,1, +0,73,68,65,84,173,86,133,16,174,235,250,24,220,243,188,240,169,186,17,138, +247,58,0,148,38,207,92,123,225,133,66,161,112,235,214,3,154,43,14,91,173, +71,121,93,179,123,120,216,232,147,158,237,114,241,63,132,100,195,245,137, +231,34,132,0,80,45,165,72,12,152,4,253,78,43,151,49,8,34,161,146,150,74, +121,2,81,112,199,54,17,17,80,136,227,183,120,35,220,34,72,63,209,22,198, +43,243,177,160,4,77,202,100,50,131,193,192,223,208,248,242,203,47,79,76, +76,0,128,227,56,221,110,215,111,30,23,92,102,204,225,86,209,40,117,204, +142,161,164,116,217,200,235,133,245,238,234,141,157,247,32,6,74,102,103, +103,87,87,87,21,69,241,55,176,50,198,28,199,9,127,203,251,136,156,254,254, +246,106,184,38,17,28,115,230,204,25,93,87,169,154,213,37,243,225,145,61, +67,224,114,163,238,164,170,213,185,169,170,33,31,103,225,54,57,9,62,226, +150,0,70,227,149,240,211,200,20,12,0,24,128,106,100,101,73,234,15,45,4, +36,76,102,254,113,242,0,40,208,182,29,0,112,93,87,60,150,228,181,210,0, +0,1,0,73,68,65,84,78,137,35,213,8,87,44,108,156,62,46,42,149,160,73,75, +75,75,203,203,203,205,102,243,254,253,251,112,108,144,139,197,98,46,151, +171,215,235,173,86,11,8,112,116,45,62,116,185,253,206,131,119,239,238,223, +91,173,175,153,142,165,235,250,74,247,65,187,223,134,147,248,119,113,113, +241,240,240,240,23,191,248,69,176,251,86,81,148,96,87,201,177,164,220,221, +245,141,205,189,246,131,7,15,2,201,198,125,208,210,210,188,70,113,246,204, +100,175,94,7,128,65,175,231,170,154,148,161,30,163,58,123,148,18,133,221, +171,215,186,150,23,174,73,132,39,36,245,116,184,83,71,152,165,163,52,153, +76,134,48,89,147,229,208,71,164,129,16,240,28,231,132,143,197,163,215,121, +35,126,45,94,165,176,137,250,56,162,165,145,103,149,92,186,116,105,111, +111,111,101,101,133,134,78,30,86,85,21,17,7,253,190,43,91,38,31,40,92,219, +111,214,14,250,135,0,48,93,157,250,234,197,47,51,74,238,237,223,190,54, +251,140,161,165,2,86,132,144,207,126,246,179,0,240,211,159,254,84,81,20, +89,112,113,228,63,0,0,1,0,73,68,65,84,150,151,150,150,130,24,193,145,188, +220,94,171,227,20,231,206,55,54,62,252,199,91,171,175,94,91,138,3,222,64, +226,82,170,244,252,243,165,247,222,123,47,87,46,34,226,244,68,254,193,126, +99,38,247,232,232,1,2,208,56,168,121,174,146,153,204,199,85,39,98,102,34, +24,60,158,0,78,34,232,224,105,38,157,6,0,219,177,128,16,64,180,134,67,193, +9,161,56,180,61,25,208,177,76,77,211,17,185,39,40,59,214,242,136,14,133, +185,69,70,78,28,54,157,114,197,26,183,171,100,114,114,82,85,85,74,105,62, +159,247,239,31,191,123,132,30,154,54,239,91,124,128,136,19,217,202,132, +94,222,57,220,173,15,234,243,249,197,61,115,123,191,187,151,200,182,92, +46,171,170,234,7,60,215,215,215,79,216,36,238,8,150,171,86,210,159,252, +228,39,95,152,45,118,26,7,135,205,33,31,49,187,246,85,176,84,42,101,243, +229,74,41,207,180,236,89,99,24,70,250,0,128,74,150,56,125,66,136,51,168, +71,188,109,152,79,162,173,10,23,55,6,155,251,76,114,89,141,248,51,59,70, +2,53,45,83,0,0,1,0,73,68,65,84,65,82,16,1,4,130,224,66,160,227,114,159, +123,68,176,97,160,13,49,19,24,209,215,112,37,79,179,167,27,183,211,141, +16,226,31,42,18,220,244,123,43,157,206,120,166,105,243,158,197,245,74,174, +224,74,222,229,169,101,181,174,108,119,182,47,86,47,24,154,94,239,31,156, +173,46,199,217,94,186,116,201,231,243,198,27,111,248,135,156,62,122,166, +101,133,132,50,3,0,208,10,133,157,181,7,30,72,249,162,193,184,213,233,185, +185,124,38,44,95,191,26,115,115,115,254,79,15,32,93,157,107,12,188,82,74, +242,249,35,0,32,147,4,183,5,246,218,13,238,165,42,105,74,216,163,47,140, +249,23,36,22,5,72,116,127,163,140,65,216,4,202,138,66,41,120,195,129,97, +24,125,139,35,16,85,55,134,131,161,164,203,241,206,79,180,121,163,58,34, +220,228,120,13,79,15,141,180,73,163,80,2,0,200,76,225,96,58,216,235,185, +135,115,211,165,131,221,131,221,193,126,181,82,84,101,217,17,86,86,203, +57,174,157,200,54,144,218,43,175,188,242,217,207,126,246,228,8,51,192,182, +184,44,222,150,131,0,0,1,0,73,68,65,84,119,52,242,164,160,191,249,112,103, +115,63,145,73,240,147,33,2,104,251,235,91,93,251,248,99,92,128,136,104, +72,162,211,236,154,142,213,108,245,251,173,230,135,55,110,193,227,160,210, +40,203,52,166,57,254,127,89,81,152,164,164,50,249,254,208,66,4,127,93,78, +34,104,187,30,0,114,215,241,145,120,156,167,47,234,112,17,137,230,51,72, +73,66,97,167,83,69,227,222,8,136,95,3,0,33,36,155,202,33,231,174,24,56, +162,183,181,85,91,156,154,188,187,190,122,119,111,37,163,171,22,31,50,10, +143,190,19,225,28,189,178,29,55,224,132,144,139,23,47,66,168,243,248,224, +96,171,214,245,31,201,86,103,239,225,205,247,222,126,27,1,0,161,182,121, +255,198,59,239,220,184,113,3,146,58,251,200,23,87,114,236,196,88,135,84, +94,107,237,62,20,160,203,232,245,27,230,236,229,171,183,111,223,238,88, +34,236,47,198,52,60,194,63,81,20,113,189,148,21,85,87,101,255,251,79,20, +136,239,233,60,151,251,7,158,68,242,198,203,130,147,134,48,113,72,143,169, +234,71,72,227,112,187,196,172,164,0,0,1,0,73,68,65,84,210,168,41,140,166, +233,57,54,225,161,233,138,254,110,163,97,164,164,162,166,55,154,237,198, +176,222,115,14,61,116,128,60,26,52,251,247,63,248,249,141,213,68,137,248, +241,133,32,229,204,108,234,240,225,123,0,96,119,187,168,100,212,84,86,211, +245,155,31,222,175,117,135,157,158,105,121,140,16,114,247,238,170,117,188, +27,46,210,145,165,106,218,217,59,14,34,80,5,1,37,163,100,245,204,108,181, +138,192,100,77,236,213,106,133,130,97,14,93,66,72,235,112,55,210,204,112, +99,35,157,20,31,9,113,65,5,119,116,77,83,20,89,150,165,126,183,203,1,129, +18,4,112,93,143,0,12,77,7,69,244,176,252,56,116,11,151,27,175,70,144,247, +180,249,184,199,191,13,24,33,95,160,75,249,231,243,100,214,131,97,126,74, +90,91,217,247,151,159,14,123,135,150,232,187,194,68,8,62,147,141,173,86, +107,231,193,195,8,230,141,8,197,191,158,88,190,186,188,48,243,230,155,111, +190,119,111,195,70,200,79,158,185,116,229,10,231,194,114,61,68,44,205,46, +94,187,118,109,56,180,108,171,7,177,31,154,0,0,1,0,73,68,65,84,23,212,228, +100,197,100,53,147,189,113,227,198,157,59,119,30,174,29,32,2,48,117,118, +254,66,74,6,68,150,42,23,192,236,101,74,115,121,3,185,217,174,53,187,241, +49,61,10,92,199,187,45,210,156,120,167,170,186,145,205,102,185,127,162, +42,161,192,24,16,34,184,231,57,220,182,109,143,139,176,48,113,196,180,49, +98,183,198,96,255,211,64,143,57,105,52,113,20,34,98,53,115,230,66,254,85, +20,88,153,128,182,176,26,246,48,149,163,30,90,142,232,185,104,34,132,142, +132,87,114,147,25,236,121,64,248,96,111,123,37,44,175,184,50,77,159,89, +86,85,85,202,100,188,99,220,252,220,181,11,115,133,52,114,123,253,195,119, +222,124,243,205,231,158,187,36,245,235,96,214,223,122,235,173,240,220,199, +103,98,20,171,254,150,186,225,208,44,78,85,25,64,113,182,172,0,32,130,108, +20,47,44,204,236,239,237,234,10,239,213,234,169,234,194,173,91,55,31,110, +213,250,141,189,0,127,60,185,212,18,59,62,144,91,112,157,49,52,73,146,36, +198,40,10,93,215,41,101,64,1,1,56,114,218,125,169,0,0,1,0,73,68,65,84,231, +34,134,166,159,196,91,141,242,179,167,129,216,159,254,233,159,198,239,134, +251,56,184,19,30,61,132,144,148,150,117,61,75,166,204,213,58,233,12,201, +103,169,34,83,137,113,68,162,8,99,190,116,142,16,2,220,60,60,236,75,57, +221,86,43,169,225,202,91,239,220,217,115,139,211,213,52,61,185,216,20,46, +104,114,114,114,186,156,103,156,75,170,145,74,41,140,155,7,135,67,170,105, +132,233,153,180,182,93,31,48,203,186,183,214,86,139,233,189,173,45,208, +12,111,104,233,198,163,247,17,138,197,98,165,82,153,152,40,31,116,204,98, +218,63,136,18,235,245,46,48,72,167,210,78,111,111,183,137,194,22,229,233, +202,204,68,165,219,234,10,111,216,110,118,186,253,126,54,155,29,175,76, +113,84,4,33,109,136,164,12,255,98,140,2,136,161,105,166,211,6,0,65,164, +50,35,36,244,46,33,0,140,210,203,196,46,24,149,242,163,165,113,56,41,177, +186,225,150,92,173,124,241,90,246,55,139,121,94,46,114,195,112,52,205,241, +208,228,96,42,210,241,43,185,136,40,80,74,77,14,86,112,128,229,4,0,0,1, +0,73,68,65,84,55,55,107,3,147,86,12,64,17,43,40,78,249,202,196,116,53,205, +142,10,68,68,40,76,206,94,186,116,137,49,106,185,152,41,87,46,158,63,47, +203,114,167,89,219,217,61,72,28,160,11,19,199,219,201,153,158,43,100,189, +238,222,141,27,55,166,166,167,100,151,120,84,146,40,7,32,11,103,166,9,85, +219,93,107,208,107,143,242,95,241,86,39,122,156,240,157,48,244,241,19,200, +170,150,78,167,7,166,237,185,14,8,199,229,39,176,209,40,86,129,234,132, +81,90,48,2,19,229,246,17,210,147,226,164,81,205,200,101,11,103,229,87,23, +228,79,206,73,207,115,176,50,100,210,192,76,62,85,10,101,69,68,181,191, +249,198,253,134,84,174,100,17,193,105,172,198,216,31,165,139,22,138,8,82, +106,114,186,2,118,247,96,107,21,0,174,159,159,87,25,32,85,20,128,43,87, +174,204,100,21,1,224,160,131,102,51,14,197,130,255,147,149,204,204,153, +139,153,76,230,206,157,109,165,152,7,219,114,5,28,108,173,108,236,30,82, +183,95,152,156,189,184,52,119,235,225,46,0,52,247,55,196,253,241,29,0,0, +1,0,73,68,65,84,130,246,198,109,6,60,89,56,39,80,184,72,74,70,41,99,12, +129,136,227,195,6,19,1,126,132,79,216,249,198,125,197,233,161,199,68,1, +18,253,119,164,25,203,133,151,179,214,210,133,252,103,23,140,23,47,100, +95,93,200,62,91,78,205,30,37,99,58,34,32,128,161,233,12,180,74,10,1,64, +201,77,252,232,71,63,122,253,245,183,96,196,160,12,148,192,231,80,153,44, +149,74,121,153,15,127,242,147,159,0,64,38,197,128,115,63,77,58,155,149, +209,236,31,214,246,87,183,239,173,237,12,189,40,92,13,243,92,88,88,96,74, +170,88,52,102,22,114,181,150,141,220,218,223,171,219,82,234,96,243,225, +253,135,59,10,17,142,217,218,239,186,107,107,107,123,135,173,184,28,226, +109,143,207,182,18,165,20,200,80,85,36,73,86,132,16,146,34,147,164,148, +137,52,222,110,157,30,122,34,59,25,6,73,137,79,219,237,118,161,80,112,92, +71,145,21,206,57,2,74,236,40,220,188,183,185,45,244,66,218,235,15,64,183, +91,235,77,55,51,157,30,28,244,185,211,105,93,252,228,203,110,26,70,69,170, +0,0,1,0,73,68,65,84,119,80,170,150,35,5,141,249,249,179,159,189,123,253, +185,229,123,239,109,62,251,153,107,10,0,56,173,187,239,223,117,73,74,173, +206,58,224,46,78,87,13,233,137,236,199,205,27,239,93,189,124,110,107,163, +65,20,232,116,108,93,129,190,148,153,16,166,83,158,177,234,91,174,101,95, +185,122,229,73,196,247,36,38,42,72,9,49,85,120,146,236,163,224,209,147, +23,253,47,67,79,228,221,198,192,38,159,76,211,68,68,69,86,0,128,82,26,168, +17,33,100,106,126,118,182,154,206,79,79,78,79,101,1,17,221,238,234,131, +102,119,111,175,219,111,172,28,52,246,30,124,88,219,57,114,118,24,10,231, +36,202,157,16,82,169,20,101,45,87,72,89,31,220,186,117,148,11,244,142,199, +244,124,106,105,118,226,145,26,121,3,72,178,10,193,207,107,215,159,187, +113,235,110,125,104,83,119,152,45,79,45,45,79,43,28,108,38,149,50,234,242, +242,242,226,100,102,171,214,61,216,169,5,121,71,153,159,39,55,39,48,26, +102,141,25,204,241,25,201,169,165,113,154,20,105,225,24,51,238,191,236, +118,129,175,91,0,0,1,0,73,68,65,84,22,252,12,46,194,29,64,8,65,0,96,70, +166,44,169,149,153,66,169,176,123,208,245,132,119,251,246,221,191,253,219, +191,125,247,254,78,34,46,137,208,197,139,139,134,4,139,231,23,120,191,127, +239,222,189,118,163,97,171,122,169,194,246,14,14,53,26,90,15,22,246,254, +202,221,253,174,29,112,139,51,207,229,203,197,114,49,155,201,182,15,118, +193,243,82,142,45,184,31,152,6,163,80,236,53,91,196,107,59,0,0,222,160, +103,143,49,201,137,66,27,165,115,137,79,31,59,179,129,147,22,232,116,78, +223,30,127,18,87,248,231,40,221,234,247,251,241,155,241,241,84,172,78,78, +78,79,45,204,102,153,2,215,150,167,85,219,117,181,178,92,186,244,155,159, +185,182,189,179,231,13,234,43,183,223,133,36,44,2,39,165,207,82,229,151, +95,126,185,86,171,109,244,4,65,156,159,169,104,214,94,164,172,102,179,125, +80,111,1,128,59,104,132,185,5,124,22,22,22,22,166,202,153,202,140,132,214, +59,239,175,155,156,167,84,60,236,88,0,128,148,165,16,178,103,22,218,67, +46,172,118,111,16,115,57,55,0,0,1,0,73,68,65,84,200,227,210,136,235,74, +100,134,21,72,44,162,61,17,181,78,180,121,113,183,62,166,220,83,66,143, +249,52,177,79,163,108,108,48,206,210,233,116,100,208,4,179,60,66,136,99, +91,138,170,1,64,161,58,89,0,0,184,182,247,246,247,58,135,132,107,179,0, +80,44,230,64,114,139,18,245,8,19,40,222,121,231,102,121,122,238,204,84, +62,92,4,156,68,208,254,127,127,207,83,171,209,98,122,118,177,154,106,155, +60,175,31,125,102,14,16,80,201,17,183,107,243,201,206,225,70,53,85,26,131, +51,46,63,243,12,0,220,92,217,43,84,140,253,213,53,40,94,2,193,101,135,11, +80,251,59,219,158,38,50,147,21,72,178,10,225,235,49,62,40,174,91,163,172, +239,24,51,19,158,15,158,78,101,250,37,86,112,227,150,57,184,238,245,122, +241,33,139,136,214,160,55,232,52,91,107,183,187,245,253,240,253,223,249, +157,223,153,57,115,145,34,160,127,140,40,128,74,41,42,114,74,82,186,245, +189,219,235,187,137,194,74,236,200,66,169,32,1,203,76,156,93,89,217,129, +96,206,12,136,200,84,198,77,77,51,0,0,1,0,73,68,65,84,79,244,108,222,25, +152,119,182,59,156,15,238,190,255,254,152,121,208,236,68,81,214,114,211, +57,101,117,125,125,112,120,224,74,148,128,203,251,7,117,75,54,228,163,244, +163,236,74,156,225,40,168,23,79,16,193,112,137,45,141,132,21,78,155,95, +243,105,92,100,50,184,30,111,216,9,33,153,76,38,146,222,39,179,190,221, +217,126,136,221,131,206,198,221,206,206,74,88,46,23,151,151,175,46,205, +204,206,78,225,17,79,56,88,89,217,216,234,104,26,118,58,117,194,135,123, +247,222,127,227,245,215,71,149,24,174,140,4,0,160,229,136,211,28,134,214, +219,17,51,154,59,168,215,56,40,78,183,217,216,220,115,152,122,251,246,237, +142,153,252,21,229,66,90,5,128,242,204,82,175,211,217,30,42,93,68,102,117, +100,42,9,120,244,189,196,81,0,121,140,41,26,69,129,84,19,149,50,145,201, +99,221,235,71,75,191,244,10,110,184,229,193,69,175,215,75,252,2,169,213, +62,160,253,122,110,102,41,159,207,139,65,219,108,30,152,173,90,239,96,219, +31,136,83,83,149,233,233,137,74,78,67,155,50,209,183,0,0,1,0,73,68,65,84, +102,148,171,197,86,199,162,165,5,87,0,152,222,198,189,27,27,235,117,46, +167,222,120,239,238,126,199,26,99,210,131,58,44,95,153,151,58,143,190,136, +130,8,153,74,110,239,225,123,74,102,18,80,26,52,157,185,43,151,61,111,208, +236,216,199,9,146,49,223,245,235,215,47,158,157,205,150,139,245,195,46, +77,149,92,30,85,61,146,20,197,78,228,25,191,137,161,249,233,168,106,196, +157,64,162,221,58,109,244,248,243,184,225,164,141,133,36,121,165,211,105, +85,85,91,173,150,255,70,74,144,192,181,77,85,38,84,150,213,226,84,170,50, +235,245,155,94,183,225,52,247,186,205,186,119,124,226,199,68,209,32,114, +102,241,220,92,174,192,186,123,111,127,234,133,43,115,37,189,197,101,200, +159,185,254,210,11,7,187,123,123,205,70,123,111,227,177,38,29,17,157,193, +49,240,151,12,0,148,179,243,96,41,185,130,142,32,151,206,166,62,184,113, +251,153,103,158,41,104,156,155,157,141,251,31,36,98,62,56,86,148,201,106, +78,73,21,50,115,147,151,242,86,223,62,81,74,88,123,70,1,199,251,1,106,207, +0,0,1,0,73,68,65,84,68,206,137,40,39,200,18,8,153,156,140,30,5,6,62,210, +222,211,230,227,146,87,112,97,132,140,226,63,125,233,212,235,245,106,181, +234,31,183,109,89,22,231,92,85,85,0,232,236,220,215,21,202,52,3,128,2,122, +76,86,153,172,200,138,214,222,188,231,57,118,170,88,13,51,209,84,89,166, +112,123,101,227,176,79,10,6,233,67,126,113,54,71,250,93,38,185,189,141, +253,155,31,222,106,123,198,84,37,11,49,75,112,92,37,201,40,86,94,123,237, +181,141,141,141,221,253,222,236,204,68,58,155,202,164,242,233,12,28,52, +197,244,153,217,229,162,90,51,229,82,218,235,108,108,110,90,210,254,246, +102,223,37,170,215,83,140,76,28,5,75,20,116,77,83,36,170,105,122,171,97, +165,211,74,248,105,184,220,120,101,194,29,31,104,79,220,151,141,130,16, +99,236,92,226,140,225,148,208,47,189,103,18,146,156,183,191,151,35,147, +201,148,74,37,68,20,66,248,31,76,34,200,9,183,132,221,71,119,136,206,112, +216,105,236,220,126,107,255,225,173,76,202,112,234,91,97,0,11,0,122,186, +16,6,228,243,0,0,1,0,73,68,65,84,178,120,241,249,84,97,106,121,233,236, +68,41,39,213,215,108,78,16,1,29,119,107,111,144,155,159,183,187,205,129, +217,89,123,112,127,148,179,67,196,47,124,225,11,83,83,83,153,76,202,164, +42,67,44,76,151,20,64,240,172,102,187,3,106,118,251,225,205,237,198,160, +209,198,11,151,47,167,211,250,176,219,107,28,214,54,87,86,70,1,29,138,8, +82,106,106,42,27,214,131,240,204,227,177,221,25,100,28,51,101,27,101,165, +130,159,17,155,52,30,203,127,84,148,28,5,24,51,62,194,66,9,154,228,127, +131,203,39,255,112,180,253,253,253,189,189,61,0,14,158,133,118,79,0,1,2, +86,167,189,113,251,61,203,195,79,124,245,247,243,147,243,102,191,107,100, +114,145,114,159,191,126,29,0,28,187,211,235,180,191,255,215,255,245,234, +194,34,200,178,73,156,253,237,237,110,221,157,156,210,238,221,93,117,61, +56,115,241,156,50,162,23,207,159,63,15,0,27,181,227,233,164,148,70,232, +245,14,54,26,59,108,110,34,181,183,215,151,21,77,147,248,249,243,23,173, +254,176,86,219,91,91,201,211,228,80,0,0,1,0,73,68,65,84,223,217,57,56,120, +229,149,87,194,76,130,64,70,240,51,94,80,68,26,113,113,197,69,250,216,185, +216,152,9,218,105,83,157,8,61,254,91,74,241,159,113,251,28,156,88,26,220, +153,156,156,156,154,154,34,132,19,62,0,167,11,78,23,236,158,176,123,182, +39,50,213,153,218,198,3,73,55,186,91,247,70,2,73,199,100,178,116,233,220, +210,251,107,53,75,202,85,166,206,126,250,75,95,251,227,127,247,141,189, +195,174,154,157,169,181,76,47,6,29,34,189,184,48,153,61,98,206,244,217, +153,202,68,49,215,237,118,219,45,135,129,138,182,229,112,36,132,234,153, +52,115,186,179,231,175,191,242,220,185,251,219,117,0,56,220,89,25,213,240, +68,248,2,39,195,143,113,26,51,235,140,40,208,147,91,154,211,169,82,79,20, +153,244,41,113,240,249,255,253,227,0,147,134,17,18,62,36,174,4,4,0,8,186, +150,38,129,14,118,166,80,66,215,196,246,206,176,127,49,149,73,248,120,50, +162,24,246,90,107,251,150,156,202,160,148,150,251,31,124,240,243,65,166, +84,58,83,205,108,55,210,231,139,205,207,241,0,0,1,0,73,68,65,84,46,207, +24,136,48,26,50,71,46,170,229,12,64,230,229,210,252,79,127,250,206,252, +229,138,124,216,220,109,56,116,243,245,26,153,158,209,105,109,253,190,215, +146,123,60,109,23,200,122,173,221,49,31,250,103,124,37,2,160,184,64,198, +0,240,68,1,254,143,232,65,216,27,156,54,125,26,247,53,173,200,205,196,241, +228,39,243,79,118,143,103,76,229,43,84,12,136,219,69,167,11,78,7,220,161, +199,197,238,238,158,140,182,176,251,2,209,30,246,33,137,212,236,244,181, +79,126,245,27,223,248,70,58,51,57,85,50,206,94,90,100,110,191,118,216,154, +41,27,8,144,82,163,21,8,255,15,223,135,147,128,227,179,159,125,113,161, +172,87,230,231,26,235,55,207,61,243,98,85,37,158,108,8,206,187,3,71,200, +180,187,91,75,207,92,172,55,155,255,253,31,127,17,239,170,81,2,25,159,108, +148,17,138,200,42,208,143,184,228,227,201,70,213,231,163,165,145,54,105, +148,238,39,90,166,224,53,200,72,83,213,226,2,221,253,49,112,238,191,16, +14,30,218,174,87,44,151,14,118,54,115,25,180,20,188,47,0,0,1,0,73,68,65, +84,29,128,227,137,29,148,81,44,73,8,249,173,79,95,118,1,228,244,229,202, +226,101,0,184,191,181,129,120,66,251,195,229,142,2,206,112,210,126,40,169, +210,66,229,224,198,173,123,125,71,171,168,234,196,226,197,243,51,244,173, +59,157,190,101,79,47,166,206,79,124,98,176,125,167,103,139,254,254,254, +244,194,76,220,240,36,138,37,92,220,152,167,113,3,22,7,70,225,49,144,104, +195,78,161,65,130,241,223,45,25,245,8,98,35,222,63,58,34,62,28,229,236, +180,135,72,69,159,240,30,225,93,93,118,166,43,122,49,171,20,114,26,56,93, +2,30,64,56,139,215,223,127,24,252,8,198,162,28,74,113,126,238,204,210,153, +252,152,246,68,166,84,97,252,17,174,243,244,226,37,219,35,90,46,91,84,4, +0,32,247,50,230,208,68,80,37,96,0,153,201,233,149,181,61,62,220,183,1,8, +113,33,214,205,79,98,135,226,6,50,80,202,241,137,131,44,163,240,254,168, +44,31,45,141,124,155,59,81,235,3,57,70,6,150,255,53,129,184,173,146,100, +185,159,89,84,250,31,82,232,35,33,138,144,85,35,0,0,1,0,73,68,65,84,105, +141,92,62,171,247,44,145,202,18,112,59,244,164,117,1,175,191,181,114,87, +163,147,139,213,116,120,152,134,173,2,34,86,138,70,252,43,20,143,157,49, +197,235,252,210,75,47,249,143,222,249,219,31,55,55,211,58,77,21,114,100, +232,130,42,33,145,152,214,31,148,47,79,212,7,222,4,169,111,213,140,197, +197,232,138,114,188,148,81,85,138,88,157,68,165,76,172,231,24,58,109,106, +4,79,248,29,220,72,108,195,191,14,143,251,200,215,75,195,125,150,121,246, +127,235,103,174,83,52,153,24,82,222,167,188,159,85,218,196,237,18,183,11, +224,249,86,195,103,226,246,26,77,200,223,184,183,217,229,39,152,132,121, +250,21,96,35,208,67,184,207,194,178,30,63,42,150,151,231,211,133,74,63, +149,170,206,84,63,124,255,3,66,8,120,92,53,93,52,38,218,43,155,59,187,189, +220,116,62,146,11,66,102,102,148,220,18,175,35,217,19,181,202,111,218,152, +58,159,78,122,210,21,220,56,128,133,80,251,19,159,250,63,37,73,210,150, +190,70,193,101,224,82,28,250,42,69,120,143,242,46,58,167,183,69,0,0,1,0, +73,68,65,84,37,158,207,222,103,210,111,118,64,78,229,220,173,198,224,209, +74,215,193,238,126,195,223,51,148,180,122,53,134,194,157,20,175,85,184, +218,103,207,159,191,122,117,105,97,110,66,77,85,22,178,158,7,208,221,223, +113,101,10,4,189,214,214,118,95,201,42,143,148,198,108,31,142,234,206,68, +188,31,185,14,143,177,81,218,54,198,44,157,66,120,20,208,227,99,220,62, +69,28,77,248,102,56,125,68,171,172,65,127,208,105,33,51,220,249,223,237, +151,62,71,193,165,224,80,116,168,232,19,209,151,24,97,242,163,73,95,163, +237,200,114,94,34,230,94,253,209,132,110,119,99,107,235,160,15,73,163,252, +9,197,58,170,99,34,109,153,41,165,0,96,246,252,243,175,191,246,218,173, +141,118,155,32,51,155,146,140,156,72,82,168,184,94,235,112,119,115,51,17, +134,143,186,134,36,121,134,245,27,143,41,146,120,212,148,237,116,34,238, +199,196,184,33,41,134,17,239,200,176,119,11,15,187,65,109,125,216,235,146, +198,38,76,95,164,82,133,20,61,130,46,17,142,210,185,197,81,162,70,94,75, +101,211,111,9,0,0,0,1,0,73,68,65,84,143,19,219,123,59,15,238,212,215,95, +62,87,221,219,107,12,82,251,245,253,230,189,205,122,181,60,25,244,194,222, +230,198,212,252,153,120,197,18,171,29,73,22,233,149,8,48,15,63,250,210, +23,190,176,190,115,48,176,240,96,183,46,233,179,174,55,244,16,89,192,92, +210,183,183,106,181,70,99,241,242,115,5,109,28,12,15,179,77,28,153,137, +182,42,92,219,196,94,136,244,197,233,161,199,71,38,35,64,53,160,112,107, +57,231,245,122,189,92,142,190,37,98,214,119,192,234,22,151,175,53,119,214, +149,108,222,204,188,32,80,120,174,91,208,171,142,227,144,210,85,85,61,126, +125,214,234,152,142,91,156,156,189,123,239,190,155,147,15,116,103,117,181, +71,74,149,15,214,107,231,75,139,62,195,250,254,129,208,75,211,229,20,140, +64,108,79,88,127,18,91,226,136,180,110,97,166,58,116,161,117,136,249,169, +50,62,248,69,199,190,80,84,143,123,221,29,84,23,46,44,150,197,195,195,126, +126,38,221,58,216,46,84,103,19,187,60,252,51,210,253,145,139,68,115,27, +209,117,114,114,145,234,82,162,3,191,0,0,1,0,73,68,65,84,180,169,17,60, +225,254,164,136,29,14,238,7,237,241,163,0,237,118,219,63,249,31,142,91, +110,91,125,67,6,170,168,133,233,51,169,66,85,246,76,197,29,50,179,237,150, +94,209,22,190,168,151,207,62,146,136,54,65,139,207,124,254,139,95,200,85, +114,67,28,56,36,69,42,231,94,250,244,171,140,18,196,65,125,253,238,205, +119,222,1,196,253,221,237,55,126,252,227,176,93,129,208,48,29,5,137,198, +235,77,162,251,51,100,152,153,158,44,26,210,133,203,87,14,182,91,161,4, +172,190,181,250,112,101,215,149,93,215,108,239,181,6,59,59,59,241,202,4, +101,37,186,188,240,236,97,148,192,19,61,120,4,152,39,230,253,168,232,49, +154,148,40,247,200,5,0,184,174,91,46,151,57,231,166,105,182,90,173,71,9, +208,99,140,161,51,144,83,57,166,234,138,145,86,211,217,76,161,220,184,251, +102,103,119,75,81,212,112,89,151,175,94,200,107,240,149,175,126,254,162, +65,5,247,24,81,116,5,46,207,85,84,167,121,231,221,155,183,239,173,253,236, +246,38,186,221,205,221,222,63,252,195,164,14,88,110,0,0,1,0,73,68,65,84, +63,252,252,231,55,19,135,254,40,87,18,191,30,5,138,195,36,3,16,57,127,105, +57,253,232,150,164,2,33,150,199,211,40,122,181,70,122,98,161,215,107,223, +188,117,39,81,39,70,121,219,241,55,227,38,39,17,134,158,54,179,244,152, +183,148,226,64,36,81,16,254,106,73,169,84,154,155,155,51,77,179,209,104, +28,169,32,114,224,38,90,93,62,108,9,103,104,118,155,59,183,223,222,95,189, +157,215,21,115,231,94,132,201,116,53,45,1,16,45,127,225,220,34,77,165,172, +218,93,203,5,64,4,215,25,170,103,190,244,251,127,248,234,165,57,19,96,242, +252,11,221,225,240,224,160,185,181,91,3,183,187,177,178,9,49,93,121,146, +233,85,220,57,38,218,51,0,0,224,193,29,244,204,226,204,194,213,43,139,131, +90,119,232,144,114,86,187,116,233,226,66,81,1,0,225,12,235,181,19,159,208, +136,23,10,35,84,57,49,193,19,222,63,37,52,18,39,197,167,39,193,184,143, +59,236,240,215,112,166,167,167,1,96,123,123,155,82,74,192,35,158,133,118, +7,128,128,240,250,245,157,123,115,40,122,244,0,0,1,0,73,68,65,84,111,254, +196,242,240,115,255,243,191,47,101,139,35,252,189,86,189,112,142,118,90, +110,191,245,215,223,250,179,233,234,132,150,173,104,229,114,70,135,93,68, +6,176,250,254,235,255,203,159,252,59,13,224,131,59,247,7,173,198,225,225, +96,122,105,62,28,7,31,5,35,18,81,54,132,52,47,113,98,225,87,233,230,79, +126,210,87,213,87,94,121,197,72,165,6,46,0,247,108,34,75,104,75,12,0,164, +76,181,210,28,122,162,115,208,52,133,29,251,132,70,34,184,121,18,172,147, +232,227,78,173,62,253,18,56,41,130,88,195,23,193,167,4,130,244,134,97,40, +138,114,180,171,196,110,163,221,65,171,139,174,101,185,220,168,204,108, +221,187,33,165,178,141,189,173,164,210,0,0,202,185,194,213,79,124,241,155, +223,252,230,118,155,19,185,200,219,61,219,131,190,57,80,0,213,116,225,135, +223,255,254,143,127,252,230,245,229,169,124,86,5,68,119,4,122,27,53,185, +123,172,251,11,116,46,224,115,245,115,159,43,149,74,239,190,251,110,195, +205,118,182,239,188,253,238,106,122,182,148,86,69,173,232,95,171,37,0,0, +1,0,73,68,65,84,109,35,34,72,172,187,191,223,109,120,249,234,172,101,245, +215,183,27,143,5,49,163,160,222,168,90,157,126,122,76,60,233,177,141,241, +19,12,6,131,176,44,8,33,197,98,177,92,46,83,34,8,239,131,211,2,187,141, +131,29,112,77,77,34,121,5,50,133,18,186,67,243,206,79,252,143,190,37,150, +238,255,127,249,165,103,207,77,86,121,251,246,143,254,219,127,219,108,14, +45,132,234,217,171,186,97,112,206,87,215,215,238,60,172,139,99,83,137,136, +0,238,120,191,22,54,171,145,71,145,250,7,38,57,80,199,243,231,207,171,170, +202,185,184,242,137,87,74,19,147,115,69,163,56,81,105,237,174,17,66,192, +227,100,104,139,116,49,107,40,75,75,103,233,176,77,184,217,237,159,56,182, +245,73,128,212,147,227,170,83,72,227,190,205,29,185,30,211,73,254,7,184, +32,38,11,89,213,24,239,19,167,13,78,11,236,22,186,67,46,196,230,198,122, +74,18,104,117,57,138,65,183,61,170,104,191,35,47,46,77,87,11,198,185,235, +103,13,42,22,206,94,240,16,17,225,211,159,255,252,87,190,210,134,20,34, +0,0,1,0,73,68,65,84,242,138,233,120,136,224,33,130,219,93,127,255,231,132, +16,0,17,81,136,48,207,81,62,34,209,32,69,166,87,254,255,43,87,174,44,47, +84,4,194,194,194,180,2,160,24,133,137,52,221,222,94,235,238,239,163,42, +193,209,233,182,114,38,99,212,187,131,129,57,82,173,19,101,24,190,142,152, +216,39,153,28,124,228,52,50,50,153,8,29,194,9,194,215,221,110,215,255,128, +100,4,87,233,133,73,218,250,71,224,92,56,4,8,128,167,88,46,207,21,139,219, +107,247,179,25,141,0,119,204,62,98,121,84,65,193,245,194,165,23,22,46,1, +0,172,175,175,14,221,35,173,189,178,80,60,168,237,35,66,125,101,187,86, +179,30,254,232,103,179,231,46,181,238,124,119,119,64,85,85,253,250,215, +191,158,216,174,112,41,145,139,241,77,126,212,40,137,192,241,71,149,39, +231,207,191,247,222,123,77,73,203,77,228,201,65,173,51,44,106,105,133,34, +216,166,131,178,78,98,113,240,184,138,143,10,41,133,51,146,164,88,229,105, +163,145,222,45,220,188,184,44,34,20,124,143,59,50,49,81,202,231,194,254, +33,205,0,0,1,0,73,68,65,84,61,193,41,239,18,175,77,188,142,70,186,136,56, +89,54,10,57,13,157,22,1,239,100,46,183,187,115,59,94,147,240,197,194,194, +217,203,231,202,224,139,245,248,97,125,251,225,157,7,107,224,245,87,30, +108,189,242,181,63,92,156,78,183,250,244,7,63,248,193,126,207,13,242,134, +41,110,98,159,28,216,198,81,212,115,207,61,119,253,218,165,98,46,157,47, +41,205,189,77,68,20,128,232,114,4,140,171,99,32,213,68,252,16,230,28,145, +100,220,41,159,54,122,252,10,110,228,102,128,30,130,251,136,232,191,73, +2,49,1,169,217,41,39,187,68,132,197,68,143,137,110,222,176,159,189,144, +175,102,189,169,162,68,156,54,69,23,224,17,28,1,183,183,122,231,198,221, +221,78,152,115,162,54,203,33,41,35,34,26,169,220,204,140,105,182,119,31, +174,187,0,207,95,63,119,230,236,53,73,85,253,115,211,194,163,34,50,60,226, +125,19,111,221,40,138,164,204,168,172,80,158,40,26,210,246,246,90,187,221, +3,70,33,164,118,97,138,76,86,158,16,155,135,235,252,216,186,125,36,244, +152,253,21,121,145,104,0,0,1,0,73,68,65,84,73,145,102,39,218,91,66,72,161, +80,8,238,7,76,8,33,146,44,43,75,191,217,91,163,185,222,123,128,0,72,206, +76,26,128,182,112,219,0,64,224,132,37,115,187,7,135,80,170,221,88,153,168, +62,87,144,162,75,4,97,242,95,175,70,165,120,246,172,196,185,144,189,173, +166,153,213,100,77,75,167,135,0,57,0,4,124,245,115,159,83,221,46,128,28, +169,115,162,155,142,251,187,49,148,168,220,0,64,36,109,98,102,225,238,221, +187,83,75,23,236,222,129,8,189,186,27,7,242,17,4,22,103,24,113,184,225, +140,167,211,211,141,91,119,75,52,9,152,20,228,104,54,155,225,69,183,112, +74,99,226,50,202,105,250,206,155,0,8,98,192,112,192,137,6,156,0,2,37,6, +33,143,24,118,14,154,68,78,23,205,213,131,238,245,66,241,168,98,187,27, +219,52,93,156,42,167,18,48,141,148,93,92,204,18,66,108,55,111,55,223,188, +240,234,151,17,113,120,84,54,0,192,225,131,27,38,215,55,218,210,103,94, +62,187,126,235,230,135,187,173,223,254,237,223,142,243,73,244,227,113,124, +166,213,193,32,0,0,1,0,73,68,65,84,147,168,136,113,52,227,127,248,192,226, +242,202,195,237,153,137,75,48,86,39,18,11,10,215,36,60,158,19,37,127,122, +232,49,231,113,199,109,111,88,214,129,121,247,109,82,216,92,7,217,25,99, +76,43,185,243,223,232,151,63,79,137,77,193,102,98,64,121,143,137,174,36, +1,147,213,128,225,97,211,145,149,162,76,205,173,131,110,80,196,214,234, +218,250,94,47,81,167,3,13,80,164,236,133,87,191,252,231,127,254,231,127, +245,195,183,82,0,128,71,91,122,247,15,205,187,119,183,26,59,43,150,176, +14,14,123,169,66,225,71,63,122,199,10,181,46,40,37,222,246,200,255,120, +191,198,51,134,149,67,213,11,165,82,118,99,99,175,59,140,238,112,79,52, +138,163,126,6,192,46,172,238,167,19,45,61,230,107,19,99,114,134,219,118, +244,198,109,72,100,254,255,195,149,155,205,189,173,218,187,63,222,199,75, +45,237,165,97,241,83,195,194,39,237,252,85,134,3,33,28,150,42,233,233,96, +59,162,185,185,249,225,91,111,254,180,32,23,186,91,181,222,246,7,15,223, +248,225,95,254,231,255,23,86,189,165,0,0,1,0,73,68,65,84,12,0,190,133,65, +196,141,251,247,35,53,132,80,255,253,241,31,255,241,84,37,239,0,32,248, +136,28,28,150,209,230,175,254,246,151,47,221,109,152,168,230,95,250,212, +167,152,93,191,189,219,125,172,143,72,180,82,145,226,194,54,38,206,138, +16,50,57,51,67,8,57,58,228,54,148,61,72,48,74,188,227,117,107,84,157,63, +114,26,23,79,122,18,124,231,39,200,102,179,173,240,183,105,143,69,102,214, +214,154,15,223,87,209,229,251,15,21,171,211,43,125,181,83,252,106,61,255, +155,22,73,13,203,159,38,19,207,105,186,113,148,193,60,24,218,118,121,122, +234,131,91,183,107,155,91,123,235,155,183,239,212,180,202,252,27,119,183, +135,120,84,208,225,222,254,234,78,39,142,145,131,235,87,159,59,79,16,137, +82,152,159,206,32,162,102,31,102,10,57,89,79,175,222,216,179,205,6,0,124, +225,139,151,234,31,174,242,208,212,1,78,106,67,184,242,163,148,44,44,159, +56,124,14,171,233,252,252,100,33,173,196,77,87,132,213,168,4,48,86,225, +78,27,253,18,171,37,99,38,53,189,94,140,245,22,49,0,0,1,0,73,68,65,84,47, +30,230,6,128,97,191,163,12,15,242,103,46,148,102,22,50,229,73,213,233,171, +118,143,117,15,164,171,255,187,122,238,27,70,245,226,35,105,106,243,172, +252,137,223,250,157,175,23,39,11,3,232,217,52,163,95,248,244,171,95,250, +188,174,72,0,189,189,123,239,254,236,199,63,190,189,121,184,183,179,246, +253,111,127,59,92,171,8,201,132,128,82,88,154,47,48,66,174,124,230,211, +141,90,211,25,246,228,131,238,208,51,255,235,183,191,109,15,123,194,235, +175,110,236,221,185,113,35,194,100,20,242,13,146,37,54,63,208,167,192,18, +199,125,89,196,124,6,82,10,51,140,104,79,164,136,68,153,159,54,122,210, +221,183,16,146,90,92,10,233,116,122,102,102,102,127,127,127,117,117,245, +4,7,225,234,42,35,18,83,11,85,73,207,168,70,74,207,100,115,165,106,221, +204,82,37,163,106,122,152,249,179,207,95,47,233,240,123,191,255,91,215, +211,84,112,207,235,13,12,25,175,47,84,53,187,126,243,231,31,60,88,223,223, +111,246,192,237,238,119,232,119,190,243,157,191,249,155,159,18,66,205,9, +149,174,0,0,1,0,73,68,65,84,252,51,110,225,100,196,200,255,41,3,128,82, +112,215,222,252,206,223,220,116,74,105,53,53,243,123,255,246,223,254,151, +191,127,56,127,121,98,237,189,95,108,30,118,45,110,65,224,139,249,112,140, +16,194,138,50,74,50,163,228,27,22,84,68,89,195,106,151,8,186,19,127,158, +90,74,62,245,38,17,70,132,155,29,105,252,193,193,65,161,80,16,66,48,198, +58,157,142,235,186,254,233,37,141,135,111,167,37,143,25,5,32,20,185,59, +236,117,107,43,183,135,189,182,97,54,26,187,27,197,51,23,195,222,33,159, +213,40,0,145,21,3,153,37,227,193,253,123,27,237,182,46,16,40,111,59,229, +47,252,193,215,11,110,187,75,49,85,184,68,72,87,120,12,100,48,187,141,237, +141,102,117,178,28,239,24,191,251,151,175,95,239,14,69,241,92,137,182,250, +213,197,185,23,175,92,44,170,206,206,202,238,149,207,127,217,108,62,168, +223,187,243,247,111,60,188,124,249,44,112,187,86,235,165,51,70,92,14,241, +182,39,162,245,136,42,36,218,164,8,133,37,156,56,165,136,216,176,120,202, +83,69,96,243,192,221,0,0,1,0,73,68,65,84,143,193,73,144,20,206,15,40,128, +5,254,41,202,185,92,174,90,173,250,223,221,222,221,221,221,223,223,39,232, +18,183,143,102,91,88,93,97,247,186,187,43,55,126,252,95,223,248,155,191, +128,252,164,226,13,131,110,16,78,235,214,7,63,63,230,169,78,93,187,92,93, +56,183,112,46,183,125,255,195,195,110,115,168,170,90,101,38,167,3,32,24, +8,247,126,246,215,191,241,181,175,253,238,239,126,222,180,236,110,207,222, +218,169,217,199,149,137,212,223,175,219,167,62,117,237,202,244,196,220, +226,156,255,238,129,4,192,140,137,156,65,236,221,253,135,141,204,116,1, +110,173,53,215,30,220,237,118,250,225,143,66,198,187,54,222,211,241,71, +241,4,99,40,44,213,136,34,38,186,81,56,169,79,79,82,196,191,36,61,30,39, +69,228,18,177,249,126,135,133,79,189,169,84,42,126,80,128,115,78,9,39,94, +15,187,155,104,181,209,108,163,107,14,28,46,151,166,215,62,248,121,233, +252,51,245,157,13,159,195,221,59,183,255,239,111,127,111,237,193,7,65,113, +213,124,233,217,79,255,230,159,252,92,11,253,149,0,0,1,0,73,68,65,84,201, +159,172,55,57,83,170,94,189,101,186,208,30,116,0,224,220,167,190,241,231, +255,233,63,125,235,91,127,247,220,185,138,161,203,4,209,61,174,103,128, +118,35,130,54,36,99,230,204,204,209,91,44,76,63,154,217,17,35,93,157,120, +249,83,215,110,175,175,81,49,220,29,88,212,235,223,126,247,221,112,171, +195,141,77,236,188,120,215,142,241,77,129,231,141,51,137,8,60,172,160,113, +8,117,58,205,210,147,158,236,30,49,227,145,33,235,127,253,61,156,126,122, +122,122,122,122,154,18,65,121,23,236,58,152,45,176,90,194,25,234,18,76, +228,116,61,95,66,187,63,92,121,203,117,28,0,16,2,61,86,254,203,239,190, +246,31,255,227,255,5,39,205,254,255,249,31,254,240,202,236,148,104,189, +247,151,223,254,214,234,161,105,34,34,224,252,194,66,169,148,127,255,246, +253,219,15,234,14,66,128,150,18,173,8,57,25,6,68,57,39,16,1,64,18,131,97, +179,193,29,51,215,106,151,150,206,221,187,179,94,91,219,122,176,178,18, +180,55,162,151,241,126,77,116,73,97,44,133,161,121,28,35,54,173,181,0,0, +1,0,73,68,65,84,196,12,88,162,103,28,211,5,241,159,167,138,158,244,100, +247,68,3,30,12,50,199,113,226,30,144,16,34,107,10,229,61,234,52,209,106, +162,213,0,119,128,136,235,247,239,21,83,146,48,59,188,119,208,235,180,0, +64,32,50,66,222,122,160,189,113,79,251,209,223,253,229,207,127,250,253, +128,9,34,78,20,141,107,175,92,159,46,100,174,94,127,150,35,194,209,174, +146,151,37,230,119,18,182,55,55,111,253,253,247,78,118,140,23,135,186,129, +17,253,194,215,94,81,0,42,213,18,212,239,190,246,250,45,20,104,1,92,152, +200,111,223,125,160,76,78,254,197,95,252,109,203,73,64,199,193,117,162, +125,10,219,27,146,20,209,142,167,79,52,246,113,230,97,81,39,58,211,83,66, +191,196,249,73,16,91,63,10,26,38,73,82,228,145,159,216,40,76,209,230,235, +196,227,194,201,16,32,232,216,67,135,167,10,133,141,187,55,175,101,20,20, +174,99,246,16,171,140,17,46,132,207,225,187,175,109,42,18,41,230,51,182, +139,182,35,94,122,229,11,0,112,246,202,39,22,47,35,33,100,109,77,97,255, +34,246,0,0,1,0,73,68,65,84,30,56,71,71,77,94,93,40,174,111,108,3,192,214, +237,59,43,59,252,157,173,191,58,255,194,43,175,92,245,119,190,10,66,162, +77,11,215,141,33,102,167,207,95,186,198,223,93,233,247,242,70,26,0,17,108, +25,204,118,123,97,138,174,173,239,231,207,165,223,250,241,207,63,241,27, +191,65,236,250,234,161,124,118,46,15,224,34,74,163,192,77,124,20,37,226, +203,64,177,226,218,16,182,160,16,210,251,95,170,131,62,66,26,185,130,11, +35,70,67,226,240,226,156,199,229,75,8,81,39,174,240,7,158,194,219,204,4, +100,25,223,82,156,153,206,166,178,42,152,77,2,174,47,47,199,241,132,64, +33,164,169,133,201,189,205,109,66,200,183,190,119,195,243,92,211,178,50, +25,195,48,140,249,179,215,124,182,11,11,103,9,33,142,223,31,128,136,128, +8,54,181,15,219,135,207,191,112,126,123,101,195,157,195,91,183,239,30,122, +197,171,217,250,15,223,223,251,230,55,191,25,169,210,163,11,201,152,185, +252,194,204,101,120,127,165,174,242,1,34,40,140,190,244,153,175,191,249, +119,127,53,41,82,189,93,164,0,0,1,0,73,68,65,84,111,239,67,175,101,145, +119,111,223,155,82,59,251,221,153,179,115,121,183,187,187,217,16,75,139, +139,145,182,199,245,41,174,4,241,177,55,138,3,140,48,60,167,95,165,70,174, +150,196,213,40,120,20,190,19,151,90,24,37,168,197,51,118,250,44,17,67,198, +59,212,107,21,12,231,185,75,133,201,44,63,51,169,128,211,160,224,248,235, +26,154,38,83,74,80,77,95,123,254,194,181,185,180,16,120,123,75,186,191, +167,111,181,10,255,207,95,255,247,239,124,239,245,135,119,223,15,151,174, +248,117,0,240,53,73,86,244,11,207,127,254,206,195,245,219,239,220,91,185, +245,224,238,131,131,221,213,117,111,238,211,75,115,249,111,125,235,91,223, +249,206,119,130,250,36,14,131,103,151,140,15,126,122,83,8,156,59,83,254, +199,239,126,247,15,254,224,15,94,125,113,241,238,134,251,252,111,124,201, +180,236,65,127,240,193,219,127,143,104,29,222,223,186,179,211,8,183,113, +20,154,14,11,231,177,96,40,113,112,70,36,249,177,160,145,167,40,251,244, +88,199,236,11,162,211,233,228,243,249,240,29,255,28,152,69,56,0,0,1,0,73, +68,65,84,130,82,230,178,180,61,104,232,246,22,195,190,36,107,229,60,77, +169,28,17,8,183,108,33,75,147,87,83,185,210,198,218,195,119,110,110,123, +185,249,79,44,235,207,79,41,91,15,14,219,252,72,75,14,123,202,86,157,214, +182,63,180,186,59,189,214,206,228,204,210,163,202,80,89,53,50,149,74,62, +107,152,219,31,222,251,95,255,195,191,103,178,212,171,175,109,111,232,255, +211,31,190,186,90,239,189,122,121,226,245,127,184,91,154,46,203,133,249, +130,193,96,132,49,32,196,189,127,115,103,19,212,23,62,113,205,107,55,111, +222,189,203,179,51,238,254,238,252,197,229,179,83,19,133,12,56,202,146, +37,6,219,155,205,202,229,231,38,211,114,208,204,68,79,55,10,96,193,73,243, +19,71,235,137,79,199,60,58,109,51,184,39,221,85,2,73,3,46,104,173,16,39, +62,91,30,206,149,158,127,169,43,103,232,91,255,7,65,20,162,227,175,161, +1,0,0,161,196,240,165,157,73,107,170,34,85,43,25,221,238,216,217,226,100, +137,109,236,29,49,92,186,56,43,181,26,183,182,225,214,118,107,6,142,154, +40,0,0,1,0,73,68,65,84,113,162,166,40,202,208,244,94,250,212,151,1,0,165, +204,194,66,22,17,93,47,239,117,197,15,127,248,67,181,48,119,254,217,103, +36,101,231,205,215,111,190,248,197,103,9,244,207,206,159,255,252,87,63, +91,107,70,79,211,58,233,104,82,159,249,189,175,168,247,106,134,148,126, +233,115,159,251,193,15,126,96,187,244,204,148,215,28,192,76,234,200,242, +157,209,172,173,180,126,185,168,247,106,235,153,137,133,196,190,140,79, +235,70,169,14,36,13,78,114,114,213,5,146,212,8,70,168,236,105,160,95,122, +181,4,146,84,42,56,211,45,110,171,37,73,86,11,11,222,252,111,13,202,159, +161,162,199,68,159,137,30,229,29,198,219,146,4,76,81,1,160,213,25,12,134, +246,100,89,179,91,221,125,208,103,38,210,130,41,190,107,88,190,56,123,117, +58,237,95,155,242,244,183,254,230,214,127,249,254,141,119,126,241,218,131, +219,111,6,101,41,114,246,220,203,95,220,219,219,187,183,94,35,106,230,194, +171,47,194,193,102,189,79,1,80,32,2,33,103,179,214,250,123,255,248,253, +239,255,12,17,215,191,139,148,224,0,0,1,0,73,68,65,84,223,121,45,177,23, +63,121,113,210,191,254,202,87,190,114,125,190,80,189,240,137,119,191,251, +45,0,0,4,119,232,0,162,172,176,172,236,110,173,220,185,253,214,91,15,54, +246,226,174,45,98,162,226,26,240,216,41,125,88,164,137,253,114,154,105, +220,89,37,163,92,91,28,12,250,47,27,133,81,185,127,221,107,53,184,99,53, +238,190,37,87,190,196,101,187,42,28,163,245,11,0,0,209,247,80,146,210,101, +35,91,4,128,114,33,157,210,179,179,103,166,206,233,153,191,219,116,158, +153,204,23,235,242,252,124,246,165,165,236,238,208,6,68,223,228,93,122, +118,249,181,191,169,3,200,127,241,189,183,115,105,229,143,36,217,245,240, +194,229,231,253,106,124,243,155,223,36,132,172,190,255,15,127,255,218,45, +169,92,230,27,251,87,202,58,0,0,98,125,245,131,155,239,175,13,9,187,183, +117,165,223,167,111,255,217,159,9,109,230,223,252,155,47,69,218,21,238, +123,166,148,127,231,143,254,232,255,251,201,155,47,63,127,177,187,249,255, +178,43,175,58,150,43,185,189,134,87,113,187,189,148,218,3,59,66,252,0,0, +1,0,73,68,65,84,184,243,211,27,151,63,251,213,68,129,4,55,35,19,151,39, +1,209,163,128,105,98,202,83,101,150,158,52,10,16,183,228,97,73,5,103,223, +194,73,196,221,219,252,255,169,123,207,48,185,142,227,80,180,250,228,48, +57,207,236,206,230,136,77,200,145,0,1,16,36,69,82,36,69,82,18,77,201,162, +178,44,63,101,91,207,150,108,189,43,203,79,233,190,123,109,217,79,178,100, +81,162,36,83,164,178,196,32,6,128,4,1,34,18,25,88,44,176,216,156,103,103, +39,231,112,98,191,31,179,24,12,102,22,132,236,239,221,43,168,126,204,119, +166,79,159,234,234,234,234,234,170,234,52,156,141,71,233,92,36,159,77,26, +172,246,132,247,189,69,67,55,2,141,153,127,81,114,108,66,222,13,188,96, +0,128,112,44,157,4,193,35,168,193,96,116,141,191,205,171,166,154,115,134, +93,254,88,32,148,221,60,208,60,50,93,182,91,241,134,70,227,201,233,244, +76,212,8,81,160,95,56,156,205,22,0,94,249,202,151,255,174,172,15,90,86, +239,72,166,33,111,116,82,172,9,64,65,128,1,161,72,189,212,161,196,0,0,1, +0,73,68,65,84,36,131,220,189,15,111,54,60,115,114,188,151,7,149,181,59, +216,124,6,99,227,205,154,246,190,157,27,51,50,116,247,54,47,42,44,147,201, +131,38,107,148,99,96,231,122,27,21,63,252,90,230,200,107,175,217,91,214, +174,106,181,223,200,118,65,53,97,201,90,102,190,181,180,213,102,190,165, +164,167,18,110,178,155,187,252,119,197,154,151,57,85,44,22,3,87,119,49, +163,138,216,93,118,105,154,44,164,156,61,155,149,92,134,18,77,82,49,173, +145,77,25,89,243,13,252,31,172,169,139,18,150,47,131,183,91,69,51,167,224, +224,212,239,95,24,90,255,176,195,234,50,82,188,18,93,72,30,60,190,80,215, +225,199,216,212,210,103,235,246,241,29,245,98,80,89,213,214,155,122,230, +247,87,0,224,204,4,11,192,2,192,133,83,251,40,138,238,91,183,172,99,214, +238,216,129,49,142,230,52,96,178,165,102,84,9,65,176,59,104,158,20,19,99, +57,92,108,88,181,109,107,187,250,234,104,100,87,151,171,114,27,120,101, +197,203,245,53,208,184,99,96,251,124,50,219,106,35,18,148,141,42,231,198, +201,238,0,0,1,0,73,68,65,84,28,19,217,70,144,84,210,94,215,217,215,112, +105,240,66,157,89,203,230,210,117,141,109,80,35,139,43,134,31,223,66,21, +213,230,124,11,235,234,86,19,169,255,220,137,165,37,64,21,161,219,210,47, +207,243,36,73,134,195,97,73,146,252,126,127,249,91,169,152,117,113,36,65, +51,188,167,17,0,16,145,6,140,181,72,32,166,182,58,4,59,47,136,165,108,137, +100,62,30,12,238,61,66,205,166,241,216,239,6,223,245,72,31,39,41,172,129, +85,100,124,41,144,51,26,44,187,187,44,124,62,99,228,200,48,194,235,215, +183,156,120,115,124,34,195,99,57,83,250,252,23,47,141,147,36,228,139,42, +34,200,13,155,239,40,201,129,67,36,1,89,218,187,26,105,0,143,5,143,143, +44,40,109,54,107,70,75,155,212,228,224,201,117,222,246,196,169,216,48,145, +85,163,115,235,182,238,172,170,93,237,95,191,197,160,116,53,13,199,244, +206,70,75,166,8,28,77,106,137,144,137,111,168,87,149,244,210,212,84,88, +74,100,138,141,29,189,70,6,170,190,173,85,63,176,146,64,212,154,152,181, +166,12,251,22,94,0,0,1,0,73,68,65,84,66,37,146,218,244,63,58,252,39,86, +149,64,77,71,41,255,6,131,193,166,166,166,92,46,39,203,114,177,88,148,101, +153,231,121,0,8,93,121,211,196,18,164,193,140,16,9,154,82,200,229,194,211, +35,154,166,75,243,151,51,177,37,91,83,119,233,243,116,60,160,74,137,195, +67,146,2,0,178,42,201,138,11,192,218,238,173,51,243,69,142,99,128,116,145, +145,231,159,59,151,181,184,140,58,74,229,82,94,74,187,16,101,250,58,173, +185,165,180,132,33,153,39,18,89,114,49,16,24,30,11,54,184,137,76,42,18, +14,45,58,92,62,0,112,184,172,36,128,96,177,65,116,244,119,123,47,130,205, +108,177,217,230,38,166,175,196,105,93,83,213,216,149,52,97,209,40,51,142, +78,136,54,55,0,128,146,6,146,93,177,145,72,78,124,243,220,208,218,213,107, +247,61,251,124,66,163,140,249,160,80,223,17,11,205,235,60,169,209,94,57, +53,159,166,172,100,120,82,180,187,48,198,72,47,166,243,58,203,80,149,130, +82,229,213,66,141,169,190,226,8,184,162,100,215,162,250,163,195,77,110, +229,245,138,138,23,0,0,1,0,73,68,65,84,186,145,145,88,53,174,75,146,100, +50,153,68,81,52,155,205,201,100,18,33,148,203,229,242,249,124,110,238,130, +129,144,72,86,192,136,0,85,10,79,93,57,249,252,79,198,7,79,109,184,235, +17,57,17,180,118,172,43,125,62,187,16,105,240,176,195,163,179,233,2,3,72, +141,71,18,88,151,34,186,208,226,183,117,248,13,169,241,52,214,146,103,46, +165,124,221,13,28,6,46,31,178,59,28,71,39,178,187,182,55,4,47,206,103,0, +0,16,198,144,46,50,169,2,27,89,154,29,155,92,56,127,113,236,246,29,91,175, +81,75,114,206,166,142,130,66,44,17,124,61,45,187,122,110,123,199,238,1, +100,196,74,56,210,179,235,190,76,42,60,125,236,72,178,32,249,252,126,192, +202,204,84,208,96,51,147,43,108,2,33,212,92,194,237,114,119,247,116,229, +139,90,67,157,253,236,185,203,57,138,231,140,44,199,218,215,118,58,39,230, +227,56,145,156,12,44,40,140,201,74,23,230,34,154,221,194,87,241,173,4,149, +82,114,35,237,82,197,225,170,248,211,138,253,252,143,11,43,75,82,149,173, +250,28,75,28,0,0,1,0,73,68,65,84,240,22,126,71,233,33,16,8,56,157,206,82, +54,179,217,44,138,98,40,20,146,36,73,11,93,54,226,12,65,179,0,8,171,133, +116,44,50,114,249,18,97,245,121,235,27,156,205,157,233,162,38,154,173,24, +99,159,207,231,245,119,240,250,66,58,54,29,78,139,128,113,60,91,92,156, +89,60,117,126,186,217,78,107,241,164,181,94,156,28,139,116,110,236,68,121, +149,195,233,3,51,6,23,157,118,213,91,103,70,147,13,171,91,35,139,145,171, +116,66,36,77,47,198,201,72,134,61,127,98,175,129,73,215,53,116,148,73,109, +108,244,138,156,232,178,25,227,121,162,209,107,242,240,202,252,66,161,101, +85,83,163,152,26,156,32,38,167,71,179,148,91,94,60,71,241,78,131,221,66, +174,212,151,220,46,119,169,9,29,86,19,107,176,36,151,2,118,111,171,73,77, +23,9,163,203,66,68,227,216,227,100,84,222,0,138,202,226,244,196,92,164, +209,239,173,20,133,90,190,221,72,32,110,106,30,221,130,58,233,15,218,131, +187,226,223,202,218,154,205,230,170,202,183,182,182,182,181,181,81,164, +66,234,57,78,80,0,0,1,0,73,68,65,84,168,41,40,70,112,33,138,243,49,44,101, +121,10,154,125,246,120,60,76,178,92,102,228,152,44,95,91,94,118,215,219, +223,243,173,127,250,198,142,158,226,186,150,28,214,151,99,220,79,62,119, +249,63,78,77,39,44,77,239,121,239,142,30,39,73,1,198,24,230,70,103,214, +111,232,196,0,13,173,245,107,154,204,15,222,221,183,185,205,172,235,24, +99,172,235,184,244,48,25,115,254,243,51,129,209,139,7,207,157,124,173,108, +127,116,54,88,189,13,254,70,175,177,228,17,44,167,203,50,231,174,127,240, +3,31,142,79,158,53,154,196,99,35,243,160,44,239,3,174,244,67,203,117,47, +87,115,237,150,45,93,205,54,131,197,110,53,113,0,128,85,21,89,189,106,90, +110,112,219,84,68,232,154,150,42,106,55,18,136,146,83,82,214,73,176,146, +209,93,197,243,42,233,185,213,98,78,55,137,2,220,40,174,13,215,243,37,30, +143,123,189,94,168,233,76,52,195,160,98,10,138,76,41,174,141,229,44,1,120, +98,232,194,253,107,214,233,197,180,158,12,100,18,49,187,219,91,137,240, +189,239,190,210,249,107,231,0,0,1,0,73,68,65,84,91,146,164,248,247,127, +207,113,172,192,115,103,39,25,0,216,127,96,164,219,205,107,151,166,253, +158,6,192,24,167,195,129,188,224,55,38,27,91,235,86,53,82,67,1,102,211, +122,152,83,66,139,179,225,171,116,2,65,96,0,248,233,243,35,154,42,23,101, +93,20,120,131,40,180,118,173,7,128,6,143,17,0,128,20,124,13,62,10,0,88, +182,16,156,52,243,173,142,28,64,67,115,226,240,201,133,43,211,88,201,77, +198,240,93,119,221,246,214,156,1,0,171,219,103,193,24,228,34,6,37,57,55, +222,236,49,93,184,188,180,126,192,226,173,119,40,26,6,128,200,82,212,233, +113,188,133,72,173,56,180,85,13,11,181,109,113,171,193,77,36,105,197,58, +215,70,56,236,118,123,149,13,94,122,43,218,125,100,226,56,146,65,7,0,132, +64,206,103,36,141,179,88,198,7,79,173,19,41,13,171,197,92,10,192,91,89, +68,115,199,90,0,248,240,123,243,52,137,120,142,76,253,232,112,190,168,78, +14,141,79,93,2,0,232,239,212,68,148,195,24,15,79,71,182,221,70,141,102, +181,76,162,28,142,132,31,0,0,1,0,73,68,65,84,160,235,172,181,221,215,159, +22,119,122,137,159,157,88,190,78,94,231,172,119,109,245,239,63,48,132,16, +247,155,151,6,57,150,48,138,204,159,17,164,162,65,71,247,26,0,0,218,212, +209,107,2,0,76,59,12,197,87,210,197,93,73,22,11,0,157,30,107,96,226,178, +162,27,147,82,46,165,128,153,190,218,132,74,10,24,203,141,250,18,176,142, +230,38,134,146,146,147,193,144,213,230,45,93,94,111,47,77,246,101,210,170, +83,140,135,21,151,215,244,7,198,39,161,198,65,174,205,121,171,137,212,205, +35,147,85,53,89,113,8,143,68,34,37,157,84,5,66,221,0,30,125,130,84,148, +229,185,54,69,199,186,222,213,236,224,12,12,46,68,9,172,98,172,87,116,53, +57,62,53,104,107,89,143,16,218,184,101,57,56,244,248,35,217,84,42,251,236, +254,201,169,16,15,0,23,71,231,1,192,128,80,100,124,140,126,104,139,52,90, +44,160,96,49,103,190,52,40,211,73,154,100,216,238,77,93,206,232,210,4,230, +23,179,194,142,126,143,86,84,52,93,58,114,114,166,132,141,120,254,112,62, +52,68,177,159,0,0,1,0,73,68,65,84,95,248,202,151,215,92,95,47,97,245,246, +45,47,253,236,103,154,181,206,12,24,99,172,176,252,240,229,5,175,159,25, +157,141,182,9,147,39,94,189,114,239,7,62,0,74,98,33,78,214,123,140,229, +138,87,113,198,97,51,1,152,200,112,194,230,245,104,144,87,139,197,82,186, +96,70,197,98,38,150,209,108,94,81,206,231,5,209,88,203,219,21,217,251,22, +108,95,49,229,143,11,111,181,22,160,182,55,212,134,203,202,74,94,20,197, +202,58,47,231,97,76,217,217,227,188,178,8,24,35,92,0,32,89,6,220,118,166, +169,222,133,180,124,81,86,40,223,106,179,205,181,140,77,142,158,125,253, +197,168,161,203,105,229,201,171,152,253,141,29,173,237,61,14,33,254,182, +45,182,208,226,120,40,37,0,6,5,1,46,228,21,160,142,30,25,91,181,99,224, +39,79,31,30,26,9,137,22,171,211,34,26,253,45,107,12,177,56,235,176,177, +188,144,153,245,250,234,108,14,246,204,96,0,4,219,150,54,254,244,184,18, +205,114,23,78,190,98,100,115,245,13,29,229,42,24,236,158,228,210,66,75, +206,195,13,168,0,0,1,0,73,68,65,84,71,191,87,148,38,167,147,141,62,20,41, +114,70,179,121,97,62,35,37,230,218,223,246,231,199,142,31,129,124,108,54, +202,55,214,9,8,169,103,206,93,240,121,125,43,54,164,199,227,17,25,130,166, +216,116,104,200,230,170,7,0,164,23,130,49,4,188,206,113,76,46,153,87,36, +133,23,56,0,192,154,28,11,71,5,131,161,42,216,91,201,255,21,211,225,214, +19,35,120,11,73,170,20,163,218,0,82,149,31,59,53,53,229,241,120,202,223, +150,7,120,138,162,37,204,42,233,57,86,14,17,184,200,178,148,207,65,25,57, +13,0,144,150,47,104,52,233,91,107,178,185,74,197,41,209,177,83,51,197,11, +115,133,174,238,38,145,4,168,96,159,191,169,219,235,239,186,251,174,59, +78,29,125,161,197,11,129,24,3,0,51,211,145,130,82,12,167,212,247,220,183, +122,160,213,120,112,162,208,218,234,199,185,4,195,48,41,21,249,44,226,170, +30,239,191,63,113,240,232,96,224,142,254,118,87,157,125,173,31,93,26,75, +40,0,241,188,120,252,98,170,175,33,27,152,159,158,159,157,170,243,183,59, +211,91,20,0,0,1,0,73,68,65,84,0,64,115,123,187,215,161,31,124,230,229,52, +35,172,222,190,113,49,66,61,112,239,246,66,58,28,203,176,125,253,77,170, +36,25,41,233,216,233,75,158,122,103,113,98,232,114,94,232,110,240,188,117, +115,90,157,117,161,172,106,96,73,130,210,231,150,114,126,11,43,171,138, +134,133,76,40,196,27,169,116,36,133,84,57,85,144,117,68,240,28,91,59,150, +193,13,100,168,242,213,45,5,55,185,41,240,173,223,150,59,77,229,65,37,85, +175,76,237,123,226,148,153,60,253,113,192,8,174,30,133,86,186,44,137,68, +124,37,215,226,129,16,112,86,87,236,242,66,124,171,211,69,149,216,58,113, +249,10,178,248,218,234,45,37,156,31,251,192,3,12,141,224,23,7,18,105,105, +34,98,1,128,201,225,233,9,143,129,129,2,17,202,230,120,218,24,157,63,207, +185,26,177,188,36,75,170,76,189,253,190,117,105,37,119,242,74,220,168,81, +224,6,78,135,28,44,27,227,79,63,127,89,215,20,69,81,104,134,17,5,190,173, +107,29,0,41,184,27,70,51,136,102,108,245,202,235,79,60,113,226,163,221, +221,77,124,0,0,1,0,73,68,65,84,31,124,231,233,215,94,79,230,241,64,87,7, +100,73,146,12,202,217,116,96,161,184,245,206,29,181,44,170,21,5,183,129, +2,0,32,5,66,142,9,44,153,143,39,72,139,197,97,19,230,67,9,147,201,33,39, +83,142,70,127,56,184,72,49,60,82,138,6,147,161,210,29,171,181,184,43,211, +223,162,105,254,88,112,147,149,110,37,184,169,84,205,204,204,184,221,238, +170,68,116,245,172,18,130,179,209,163,223,39,144,6,88,37,176,68,232,50, +0,38,112,65,98,60,148,255,54,209,100,45,225,31,185,112,41,79,249,112,126, +52,201,119,246,186,0,8,6,0,206,28,121,51,134,173,237,126,11,0,4,102,102, +218,187,251,28,174,250,58,39,217,221,238,157,158,28,243,218,176,221,168, +159,28,138,141,206,196,105,77,151,244,162,16,91,60,35,219,118,89,139,35, +113,93,200,44,105,148,129,230,145,195,238,110,119,241,44,100,47,141,36, +242,0,0,200,89,231,91,88,204,197,179,84,170,192,6,230,39,39,166,22,90,252, +38,179,181,174,190,163,69,39,216,70,167,209,219,190,106,221,186,117,85, +28,165,95,0,0,1,0,73,68,65,84,71,198,146,173,182,244,235,7,134,250,250, +186,144,146,72,105,245,189,94,109,52,41,173,106,171,155,60,241,138,189, +190,163,150,75,85,110,23,66,8,128,164,17,33,26,184,165,112,194,100,119, +25,25,121,108,62,225,242,120,24,61,19,206,202,245,78,11,137,80,42,22,17, +205,102,162,34,40,0,53,70,197,31,210,22,127,68,248,79,88,220,229,191,80, +163,120,203,39,113,85,125,146,77,198,52,89,138,92,57,205,12,252,84,72,29, +183,207,124,119,57,135,158,86,49,69,27,157,130,165,236,30,231,199,199,206, +28,95,184,244,142,181,245,227,227,243,113,83,126,239,175,15,44,74,184,175, +119,109,25,231,216,224,69,44,56,252,110,99,87,223,86,140,177,162,200,34, +71,97,172,125,251,169,179,11,9,67,134,200,143,12,78,72,6,20,55,132,79,75, +82,14,59,192,132,159,127,254,116,28,224,177,251,183,1,96,76,219,177,152, +126,236,190,206,159,255,234,56,197,48,59,54,119,188,113,124,20,0,166,34, +38,136,192,111,95,56,88,40,236,93,219,231,191,243,158,119,149,181,139,211, +36,202,135,7,78,0,0,1,0,73,68,65,84,218,157,27,124,227,71,143,159,27,238, +105,115,1,228,0,16,195,211,180,154,89,76,243,129,103,159,101,154,186,182, +174,238,170,106,221,74,97,42,61,216,220,102,140,177,96,177,27,88,169,24, +214,108,70,86,201,73,54,119,189,28,13,211,52,139,144,174,169,178,14,64, +0,96,172,201,146,198,114,76,101,144,233,79,66,51,221,196,226,134,149,156, +207,90,173,190,176,176,224,114,185,42,243,148,210,195,87,78,197,102,70, +96,105,52,151,136,170,98,11,182,180,20,205,253,69,115,159,158,158,41,56, +182,163,250,93,150,186,238,101,108,185,153,55,143,30,5,71,219,220,208,217, +88,209,80,71,135,167,139,173,142,150,166,215,78,13,215,117,247,174,170, +55,3,192,244,200,72,32,163,6,46,157,109,238,236,68,8,53,52,117,120,234, +219,188,245,237,2,10,174,239,98,79,94,42,0,134,164,2,56,155,153,12,231, +179,50,61,224,39,47,77,164,10,0,182,206,6,27,9,172,72,16,162,104,202,229, +250,214,250,167,207,13,111,185,125,253,187,222,177,182,187,217,115,242, +252,52,198,176,16,37,171,81,96,212,0,0,1,0,73,68,65,84,131,73,230,220,104, +193,35,4,83,241,128,199,215,130,16,114,24,89,146,226,155,59,59,199,103, +3,78,95,235,232,145,87,123,86,53,204,70,51,205,46,195,120,72,236,221,177, +133,80,147,100,38,124,105,104,196,215,208,80,171,66,170,122,157,65,228, +17,144,193,249,176,215,99,74,68,178,172,192,88,204,230,217,96,152,102,5, +164,161,76,46,165,43,42,199,177,138,162,209,52,85,105,134,86,161,173,109, +148,91,1,222,106,182,4,254,48,138,17,66,197,98,177,88,44,86,185,111,8,161, +197,51,175,162,68,192,55,112,155,200,208,70,179,57,71,55,72,180,47,163, +218,204,205,107,80,243,253,156,171,171,116,117,9,198,24,1,12,206,208,15, +191,239,209,197,137,211,11,42,213,229,115,202,214,174,7,31,220,60,116,102, +208,213,108,167,231,46,188,242,242,129,211,83,209,122,7,185,255,247,71, +238,186,255,174,74,2,90,218,122,58,187,87,79,93,126,189,209,165,205,133, +105,0,12,128,20,41,123,122,60,41,32,84,0,104,44,73,18,214,28,62,143,199, +200,204,75,148,15,39,127,118,57,16,47,66,0,0,1,0,73,68,65,84,60,44,218, +168,253,79,29,122,248,174,230,11,147,201,114,69,3,139,225,209,169,104,147, +75,95,10,206,187,60,13,37,105,104,241,123,69,26,178,209,193,164,173,47, +182,184,216,212,82,63,63,49,217,222,213,232,229,149,139,199,7,51,148,81, +167,77,180,158,75,198,35,6,147,165,178,189,171,156,92,132,144,217,97,97, +104,154,32,136,98,49,145,78,231,8,85,199,136,1,77,182,59,76,169,148,172, +234,152,32,9,138,166,202,124,175,52,191,202,72,254,100,116,82,165,24,173, +24,144,172,74,95,92,92,68,8,233,186,94,58,88,162,92,213,249,115,7,236,28, +240,117,29,172,195,79,241,6,156,142,80,154,132,10,233,130,165,199,232,240, +139,226,181,155,101,16,37,240,70,135,223,45,108,26,240,167,135,103,76,38, +38,150,224,154,123,234,113,104,129,166,139,163,71,206,39,104,75,42,147, +119,212,91,237,205,187,126,253,203,239,197,138,222,158,54,71,37,181,59, +119,238,240,123,197,201,177,11,38,54,87,103,199,225,52,3,0,24,129,10,208, +212,217,96,167,128,145,211,50,98,247,254,83,5,87,211,0,0,1,0,73,68,65,84, +246,245,190,77,3,94,34,123,108,78,238,110,183,47,92,156,3,145,153,11,231, +74,211,192,117,237,45,139,139,217,68,142,10,45,45,14,93,153,119,152,244, +88,52,148,203,196,173,54,55,0,248,154,123,221,70,62,50,116,69,108,235,86, +103,79,241,117,61,2,41,141,204,193,218,29,27,134,46,143,136,133,165,177, +153,197,166,150,214,90,214,149,233,92,78,33,72,150,103,9,164,103,115,69, +146,100,40,154,5,169,200,25,88,89,165,56,6,36,73,33,16,82,228,130,170,35, +154,186,110,35,67,165,104,254,105,72,82,9,222,194,249,175,226,81,62,159, +111,106,106,138,197,98,115,115,115,37,211,187,244,54,56,116,208,194,83, +148,209,134,16,129,85,89,209,177,96,178,115,6,115,232,244,107,217,88,200, +222,210,3,21,220,113,216,4,18,0,24,214,4,116,142,193,243,23,206,92,94,152, +199,197,28,47,80,9,181,225,193,15,188,203,148,11,101,9,208,117,219,199, +254,242,209,197,19,251,60,253,253,236,245,164,90,237,222,58,39,221,191, +170,97,93,127,99,36,56,39,50,133,112,150,101,97,245,91,0,0,1,0,73,68,65, +84,1,0,77,213,18,209,84,40,26,79,42,246,109,107,141,87,166,98,99,83,225, +64,142,236,238,176,45,12,205,93,10,235,61,155,251,34,11,75,0,176,122,251, +218,118,143,208,232,51,156,190,156,138,102,168,192,220,216,165,43,83,147, +211,11,219,182,110,46,107,5,151,93,185,152,16,58,221,198,99,199,206,229, +129,204,39,149,182,46,95,118,110,10,24,44,51,254,209,193,195,198,186,46, +3,179,66,184,164,138,105,12,195,155,205,230,156,164,91,173,6,36,167,72, +158,47,74,96,49,210,197,130,170,169,5,13,131,44,171,2,207,161,27,132,185, +111,53,73,170,182,184,171,180,40,212,80,95,235,157,150,70,55,0,240,251, +253,126,191,127,124,124,92,20,69,175,215,139,16,66,88,5,85,209,115,177, +146,255,31,25,187,28,157,159,64,136,232,90,183,61,190,56,3,53,252,197,24, +35,36,54,108,90,79,197,66,122,46,118,232,252,212,162,46,172,234,94,197, +73,188,69,0,140,177,17,208,201,99,47,194,195,125,164,162,157,24,143,222, +217,238,168,178,109,251,215,46,207,148,209,20,74,70,163,189,55,0,0,1,0, +73,68,65,84,165,179,223,125,250,52,199,50,115,147,129,210,13,41,134,185, +203,141,15,247,170,106,248,196,68,130,48,187,49,0,198,128,89,219,219,87, +233,91,218,111,159,59,123,73,82,242,59,6,188,115,5,124,240,248,20,0,76, +70,204,4,65,80,9,226,201,31,62,177,105,109,91,239,218,221,8,33,206,217, +138,142,159,50,111,185,205,57,182,160,168,180,161,120,229,212,113,194,169, +18,57,70,48,25,172,183,245,108,60,112,101,212,214,97,186,48,26,216,176, +97,3,146,66,225,188,201,105,229,171,26,190,220,33,221,14,35,66,64,57,124, +139,225,32,67,89,202,126,155,96,180,40,185,172,166,20,85,69,99,5,177,204, +43,184,37,23,2,64,173,78,170,82,158,181,83,108,43,14,210,233,116,218,106, +181,150,210,53,77,99,89,118,126,126,62,145,72,40,129,115,38,156,38,24,22, +16,194,74,62,21,13,31,120,254,215,147,19,99,109,171,55,187,90,186,51,10, +22,205,214,21,251,153,81,48,212,183,246,110,223,190,61,152,208,122,154, +219,3,231,38,27,6,154,135,78,28,97,69,113,102,108,222,214,130,103,0,0,1, +0,73,68,65,84,33,148,88,156,87,40,58,158,152,31,31,58,115,98,176,111,77, +111,249,243,50,109,14,119,163,191,169,147,213,131,235,251,220,135,207,165, +1,3,96,80,148,252,249,193,153,7,239,94,109,85,82,19,41,98,85,135,109,254, +226,92,198,230,232,53,230,115,185,98,71,171,123,65,34,149,137,209,159,28, +140,126,106,183,239,212,120,12,33,64,8,17,8,45,196,200,19,151,210,245,150, +196,194,252,76,157,191,173,193,223,136,16,170,111,110,174,115,219,5,94, +15,206,45,232,60,109,228,89,157,48,186,173,68,36,174,43,145,88,145,99,84, +138,39,10,225,43,83,145,134,122,207,141,166,7,202,221,85,215,177,192,179, +52,9,197,162,130,72,138,227,57,93,81,52,172,107,152,82,20,9,17,20,73,32, +132,144,174,169,4,65,222,130,118,210,77,238,193,173,18,163,27,85,160,114, +111,73,201,137,43,20,10,24,227,60,82,145,146,132,124,24,3,2,4,186,148,230, +41,168,235,222,52,54,116,214,219,214,29,186,120,208,226,174,47,237,38,168, +178,43,203,221,238,177,7,182,34,132,78,199,223,100,19,104,215,0,0,1,0,73, +68,65,84,248,230,63,188,193,11,174,30,23,238,222,249,72,104,110,127,223, +174,71,89,245,202,145,95,95,234,220,182,51,33,69,23,142,28,237,219,243, +14,0,0,53,141,41,83,153,200,251,30,124,15,0,152,196,231,159,221,59,24,79, +21,198,66,46,64,248,91,63,120,13,0,72,179,27,3,128,142,113,86,49,216,204, +191,120,250,242,253,31,187,195,151,37,49,198,60,73,228,26,220,155,155,226, +39,102,162,0,88,71,88,215,1,1,254,253,129,113,140,117,81,224,5,129,231, +121,222,83,223,1,0,182,198,158,221,77,189,103,47,47,241,40,180,124,39,129, +134,25,1,113,98,125,38,145,20,120,37,159,203,64,133,70,169,101,114,9,44, +38,19,198,24,176,206,241,156,36,75,0,0,8,116,12,136,162,8,93,83,53,157, +166,8,192,186,142,17,86,181,210,182,176,91,10,110,18,153,172,157,142,94, +49,52,144,76,38,109,54,91,101,138,209,104,52,153,76,145,225,87,77,74,128, +32,74,166,111,46,21,75,6,166,38,82,161,133,13,119,61,96,52,138,169,169, +139,148,111,149,96,48,193,245,187,44,132,112,0,0,1,0,73,68,65,84,178,91, +37,82,24,227,181,59,119,203,249,108,255,154,141,153,76,68,213,108,31,248, +240,131,61,94,83,157,152,153,47,118,238,185,103,99,244,194,203,199,143, +78,157,27,9,105,162,189,222,162,159,56,54,234,104,242,210,21,20,122,253, +93,59,119,238,104,240,136,179,19,131,126,39,44,37,105,0,192,82,174,144, +151,99,241,172,172,104,125,183,245,204,93,158,108,234,111,182,102,245,214, +126,159,191,193,68,176,68,163,219,123,242,226,20,66,136,64,64,16,8,16,202, +203,76,65,101,67,161,197,217,249,240,252,98,216,105,101,77,230,229,69,16, +62,151,193,226,244,208,20,201,83,82,32,146,113,181,180,152,114,115,118, +167,91,52,48,152,245,234,20,45,146,18,34,232,74,190,173,216,57,17,65,208, +52,133,49,80,52,165,41,50,0,232,152,224,57,74,211,17,73,34,4,168,228,231, +2,241,135,122,214,255,219,224,38,59,2,110,100,232,85,113,65,215,245,21, +141,113,78,16,201,92,2,73,165,3,178,17,150,242,169,130,74,153,44,122,34, +160,187,44,186,174,230,211,9,240,212,85,21,57,146,84,248,0,0,1,0,73,68, +65,84,10,43,241,232,129,7,30,192,24,79,79,211,5,213,4,8,97,140,89,192,128, +145,145,135,169,133,12,215,182,45,59,115,226,213,51,6,99,26,45,202,230, +117,74,170,82,51,149,160,111,205,150,15,107,42,67,163,167,126,125,52,147, +147,199,67,198,169,241,32,0,32,200,190,122,100,246,109,247,172,182,21,50, +199,84,218,148,148,150,102,34,173,46,33,202,121,63,245,248,150,241,19,163, +65,71,227,248,249,203,24,131,78,241,205,30,114,54,140,40,146,164,40,66, +83,79,170,218,241,143,125,228,3,229,34,172,38,22,52,131,223,79,69,166,199, +84,4,132,38,183,215,1,0,56,13,20,128,30,10,70,29,78,129,32,175,217,76,229, +240,99,21,159,121,158,195,24,115,130,168,42,82,177,80,68,28,191,252,22, +235,0,152,32,8,124,139,137,17,252,151,247,187,213,74,88,213,171,82,126, +147,167,149,92,250,45,82,74,55,221,32,80,52,140,241,154,85,190,104,104, +170,174,222,137,64,193,88,175,248,80,137,140,157,113,118,108,173,42,177, +82,188,90,90,90,49,198,74,185,20,0,0,41,121,244,75,0,0,1,0,73,68,65,84, +144,41,139,217,234,126,244,246,219,191,255,212,96,222,169,237,125,173,56, +224,210,219,6,54,65,141,196,175,94,191,29,0,62,128,112,58,147,251,183,167, +142,51,12,77,81,204,84,152,25,187,48,188,169,115,219,212,153,241,0,97,158, +141,23,158,61,22,28,240,137,237,187,196,137,131,199,79,101,252,159,222, +99,217,208,180,122,230,194,204,153,40,242,216,185,153,165,130,78,96,93, +199,87,22,56,146,34,142,29,126,213,100,52,244,173,217,122,149,163,130,199, +201,83,185,232,120,48,106,101,242,146,70,171,82,169,250,76,33,148,44,24, +228,98,81,55,137,72,69,88,224,175,173,2,168,212,244,149,207,20,69,177,28, +228,242,69,130,230,1,0,99,29,16,169,234,58,69,224,91,77,152,86,144,164, +21,181,75,229,88,3,53,117,32,136,234,85,188,165,12,108,253,6,249,28,22, +212,56,0,194,0,86,94,88,221,101,113,27,165,250,38,11,164,70,9,76,149,150, +161,46,99,147,99,131,199,246,27,80,199,218,118,7,115,99,54,33,132,104,140, +1,33,96,221,61,29,152,198,184,197,94,190,138,51,206,0,0,1,0,73,68,65,84, +220,55,49,195,172,107,112,38,212,246,109,59,119,207,95,26,61,113,230,204, +222,67,163,69,238,203,95,254,244,181,74,169,25,76,25,1,160,171,127,59,0, +36,83,89,142,37,68,158,254,226,183,39,0,240,79,127,121,12,0,0,194,206,118, +43,198,120,112,49,215,6,120,118,9,235,110,38,63,62,145,178,54,110,92,211, +144,152,85,179,169,16,175,99,9,151,22,7,99,172,227,87,78,228,220,230,164, +32,156,231,56,14,0,213,53,118,33,132,156,205,29,206,230,142,96,90,49,26, +232,100,224,53,232,184,19,0,156,46,61,28,65,5,45,203,0,42,0,41,21,116,171, +109,249,44,40,165,144,97,132,235,110,113,89,86,87,186,46,203,69,130,32, +113,121,145,46,0,137,80,137,1,183,20,220,228,182,137,202,148,178,134,168, +53,30,85,85,45,39,86,190,18,236,205,146,125,45,232,121,82,139,83,90,220, +110,200,239,88,107,108,178,75,132,20,34,164,16,1,82,101,1,82,116,110,14, +215,189,244,198,185,88,229,209,161,87,137,169,196,188,204,107,206,179,105, +181,143,69,168,113,227,17,116,210,0,0,0,1,0,73,68,65,84,29,189,194,164, +148,138,7,236,116,10,3,6,200,147,210,108,94,24,232,100,94,58,53,3,144,92, +182,223,229,216,236,196,156,114,181,82,119,222,243,200,246,221,15,173,219, +122,255,87,255,178,177,175,62,142,117,40,45,30,63,58,158,40,31,11,134,117, +12,57,217,96,21,246,30,157,141,154,205,152,51,108,94,229,81,88,113,221, +154,102,92,90,164,135,1,99,28,78,51,7,79,76,191,241,230,248,161,19,163, +243,179,99,11,115,203,71,12,122,140,20,0,108,221,117,103,36,171,2,0,43, +114,169,188,66,114,88,193,58,34,132,104,48,82,200,198,75,5,229,50,201,108, +81,133,235,199,59,132,16,65,49,162,193,172,105,136,34,17,66,8,16,137,53, +5,17,4,134,63,17,223,13,86,90,50,1,215,15,52,149,111,105,154,94,49,122, +70,51,12,191,246,227,177,139,172,59,250,34,0,42,69,149,48,0,82,74,55,224, +92,179,181,49,198,177,185,69,224,109,222,232,133,217,216,78,175,151,41, +33,188,124,246,2,178,53,172,106,182,193,74,202,191,244,23,177,174,173,143, +126,244,11,151,107,195,89,0,0,1,0,73,68,65,84,159,249,146,97,195,110,51, +96,192,152,227,133,72,114,78,153,16,204,233,209,25,62,127,254,245,217,37, +150,221,178,169,115,98,40,115,103,123,35,141,113,100,228,144,171,123,103, +9,195,198,29,15,111,220,241,240,199,63,249,183,2,207,115,28,123,102,146, +3,0,29,227,179,39,39,48,198,56,19,47,90,59,117,60,150,5,148,184,178,32, +249,125,29,173,190,85,62,235,234,86,235,83,207,13,226,146,48,233,120,49, +78,145,36,65,18,196,145,19,195,128,241,99,254,150,202,168,15,75,33,0,160, +68,35,210,83,30,22,229,144,206,178,140,195,76,47,68,210,166,52,178,122, +172,18,48,185,76,206,192,153,107,229,3,33,100,48,138,112,149,183,12,195, +170,170,90,59,8,252,209,161,218,119,91,113,150,7,106,162,97,85,35,224,210, +210,82,229,12,110,101,54,218,228,5,75,39,55,241,3,2,169,8,107,8,75,4,150, +48,198,4,206,203,140,27,213,223,102,182,47,47,71,185,124,250,66,142,246, +67,246,82,140,239,25,240,0,34,89,0,120,243,245,67,49,176,119,54,90,16,66, +83,21,141,247,13,0,0,1,0,73,68,65,84,87,70,44,142,229,13,224,101,122,202, +212,238,185,103,183,197,96,106,16,11,23,135,194,61,171,68,221,178,225,83, +31,127,207,11,191,123,19,211,133,72,193,34,136,132,219,101,26,60,114,40, +74,153,87,53,90,246,189,241,250,60,213,218,230,184,118,180,188,223,35,174, +235,111,94,219,223,28,152,155,48,48,197,120,142,73,196,50,24,64,65,74,86, +231,182,175,243,181,40,217,133,169,124,75,183,213,100,183,227,120,74,177, +91,99,147,115,214,134,150,92,58,133,16,114,121,109,197,188,4,8,114,18,83, +80,217,185,169,75,44,145,183,57,60,37,242,56,154,0,0,32,72,10,40,179,0, +129,20,182,89,140,6,90,26,95,202,54,182,212,83,72,43,20,100,164,75,70,129, +7,68,64,77,71,69,215,255,71,87,225,191,214,228,255,139,96,133,195,24,43, +127,43,135,170,27,217,79,0,192,113,220,138,216,243,233,164,104,182,98,214, +33,13,124,41,155,138,58,102,190,7,128,0,3,232,41,85,39,105,151,83,112,249, +203,121,71,174,156,120,99,238,194,163,27,27,174,140,204,196,204,185,12, +0,66,51,0,0,1,0,73,68,65,84,231,126,186,119,42,35,109,218,120,91,153,146, +145,11,39,117,131,167,205,111,89,145,6,0,232,111,209,33,90,8,75,69,223, +154,183,101,247,62,241,163,244,229,175,125,237,67,111,252,234,199,3,143, +255,89,187,17,32,55,245,170,92,136,198,146,161,165,209,72,98,85,163,72, +87,214,107,96,237,178,201,252,193,119,203,153,108,254,123,79,159,100,24, +122,62,46,18,24,143,156,31,222,218,185,241,204,217,153,32,54,128,164,210, +12,214,89,90,137,199,119,172,235,148,172,38,186,195,146,14,133,53,151,139, +12,167,226,192,216,220,78,39,153,153,142,18,175,158,76,114,220,48,77,211, +24,19,94,127,27,0,0,48,118,23,141,212,188,193,0,2,35,21,162,186,133,163, +57,2,112,49,137,8,6,171,146,174,43,133,124,17,99,48,24,13,43,242,188,202, +168,184,165,224,38,39,113,221,244,109,169,158,185,92,14,106,28,37,140,113, +108,98,48,109,113,133,222,252,61,89,223,67,82,45,168,81,69,88,69,186,70, +47,188,84,112,109,129,250,29,70,211,242,110,13,148,159,79,102,83,46,127, +117,77,252,179,0,0,1,0,73,68,65,84,235,193,195,199,11,110,110,210,88,72, +91,55,127,236,239,222,245,183,159,251,210,189,143,111,92,46,8,227,189,207, +253,74,52,208,31,252,224,7,111,48,248,58,159,252,198,63,197,219,182,115, +140,109,219,214,238,55,174,204,254,236,229,19,219,90,56,147,17,0,0,3,180, +244,238,188,235,161,61,193,19,191,35,58,215,175,175,191,182,182,191,18, +85,207,154,157,0,144,206,228,56,134,252,218,143,102,177,142,177,142,159, +250,205,25,2,25,24,159,9,212,156,164,155,70,78,93,24,205,16,219,55,246, +53,18,139,65,89,196,146,230,119,89,205,221,238,225,4,209,222,226,88,154, +72,149,70,189,151,142,70,189,54,76,18,176,22,33,0,210,87,223,132,16,2,90, +108,112,0,0,68,83,114,131,219,32,233,88,207,101,18,73,236,16,56,73,135, +120,44,73,115,124,73,146,42,249,143,86,138,143,223,82,176,242,232,6,21, +70,95,213,7,149,195,74,249,109,161,80,176,88,44,181,78,123,224,228,139, +153,43,199,141,70,147,146,8,26,89,166,104,223,88,100,219,82,184,222,212, +208,3,29,198,236,145,158,0,0,1,0,73,68,65,84,239,225,61,3,44,199,193,213, +72,201,217,73,250,189,127,241,193,249,145,99,115,42,221,231,119,21,109, +189,27,87,187,134,78,158,243,182,217,136,177,227,63,255,217,179,71,70,19, +54,145,136,135,39,230,23,163,87,174,92,233,237,237,133,26,51,124,237,221, +123,76,38,83,131,195,224,110,237,218,180,105,211,190,227,151,119,239,222, +252,163,159,28,216,188,182,19,228,196,229,203,161,182,53,221,134,232,133, +184,105,160,30,141,205,190,121,236,137,95,62,183,125,251,246,218,32,97, +107,123,79,99,75,119,183,39,130,164,160,133,207,135,211,60,66,204,174,123, +186,77,225,192,197,69,106,247,174,102,191,215,178,255,92,104,117,135,249, +181,227,83,193,68,190,187,183,153,202,102,114,162,208,198,231,206,140,37, +17,66,4,66,36,129,242,18,42,40,84,38,157,12,69,146,38,3,37,23,243,188,176, +236,252,91,157,22,154,166,23,35,105,77,150,93,254,230,88,100,145,230,141, +170,10,118,151,35,21,139,40,178,76,49,36,73,80,149,156,95,241,249,22,129, +27,206,187,65,149,85,123,189,81,82,141,145,127,219,0,0,1,0,73,68,65,84, +133,101,118,118,54,159,207,151,132,169,82,22,167,79,188,226,100,117,231, +154,221,162,217,38,216,61,40,159,162,213,2,100,227,178,103,179,217,213, +36,26,140,101,79,16,81,6,222,228,108,246,25,182,175,111,78,93,156,48,89, +152,104,140,111,27,104,212,2,51,12,93,184,244,250,89,217,217,92,200,229, +27,183,63,244,153,119,175,249,250,215,127,152,213,229,187,238,184,3,42, +140,134,178,142,244,218,197,50,133,91,87,183,81,148,225,252,11,63,127,225, +245,215,157,3,119,69,223,188,88,191,181,159,90,186,52,71,117,80,115,111, +158,10,9,126,159,227,226,98,158,13,94,176,214,183,213,142,221,190,134,206, +109,183,221,182,123,247,237,167,142,190,236,52,230,253,13,13,231,79,78, +46,4,195,88,52,40,146,100,86,139,134,150,166,241,209,0,66,200,226,50,141, +156,154,44,154,237,46,37,21,150,141,170,82,36,74,210,68,32,132,144,172, +209,146,70,167,147,145,88,34,213,212,120,109,77,28,34,41,93,213,24,222, +32,242,140,205,200,69,99,89,138,17,140,6,70,201,101,57,139,157,130,25,175, +107,0,0,1,0,73,68,65,84,68,144,201,100,20,69,99,89,166,220,16,112,75,138, +17,172,56,91,82,214,70,43,10,208,138,194,36,73,18,203,178,169,84,42,24, +12,150,174,123,47,229,12,156,219,103,21,104,202,228,96,108,117,4,205,82, +52,195,8,6,222,96,94,120,243,149,92,34,236,106,239,47,231,4,0,183,67,44, +173,42,49,35,38,203,192,204,233,99,103,38,198,144,148,7,155,152,86,154, +223,253,177,63,19,147,129,156,193,183,166,30,231,50,166,143,126,225,51, +255,246,243,253,91,251,90,42,201,168,82,138,101,190,111,216,185,115,247, +238,221,110,35,155,159,218,255,236,112,226,54,63,121,34,102,55,229,150, +242,124,215,195,247,109,139,38,231,46,189,122,244,210,200,72,154,246,145, +249,176,201,102,171,109,176,58,55,223,223,211,116,236,141,227,156,17,5, +210,84,32,16,159,95,74,217,13,228,92,26,214,116,184,108,156,206,88,44,169, +249,40,216,237,38,37,65,56,189,86,187,121,109,151,123,126,49,190,44,78, +4,34,16,33,105,76,65,161,51,137,5,142,86,10,249,140,32,154,17,66,60,207, +178,101,4,157,246,0,0,1,0,73,68,65,84,12,77,32,4,36,129,100,77,193,164, +40,50,178,164,242,2,167,203,69,29,16,232,26,205,178,154,166,17,4,129,16, +194,186,142,110,61,199,13,254,240,117,220,85,194,84,149,39,22,139,173,89, +179,38,20,10,49,12,51,61,61,205,113,92,105,35,37,2,21,169,178,158,139,168, +0,4,103,74,132,22,103,206,28,68,4,209,222,179,46,26,24,91,81,189,97,44, +54,109,219,76,71,151,112,46,126,240,220,244,80,145,89,221,183,90,112,11, +22,1,0,176,161,194,60,248,252,99,123,22,46,30,31,26,15,222,243,200,35,144, +159,67,66,67,21,170,90,157,218,189,231,174,200,132,28,228,212,220,149,105, +177,85,146,226,139,0,157,183,119,154,158,56,185,94,214,150,14,157,57,11, +134,133,120,172,103,50,16,127,199,59,222,81,201,129,222,129,77,0,64,147, +136,166,137,167,127,119,90,81,65,81,97,120,137,160,34,83,235,154,215,176, +50,157,80,16,143,113,84,82,49,139,89,14,53,83,185,96,84,246,88,56,198,238, +112,27,240,165,209,8,38,74,146,141,131,113,42,146,78,89,13,13,234,59,232, +0,0,1,0,73,68,65,84,184,11,8,64,132,195,89,222,55,71,153,28,86,156,46,66, +105,188,70,72,46,42,170,166,1,194,178,166,235,178,66,81,20,0,214,53,29, +3,32,130,32,110,49,205,180,130,36,213,42,249,114,122,85,98,185,239,58,28, +14,132,144,199,227,193,24,207,205,205,33,132,166,166,166,16,66,4,150,145, +156,197,217,37,29,0,116,37,57,55,114,226,165,95,36,139,154,167,99,117,93, +223,166,200,252,180,171,161,165,140,170,18,127,157,195,83,119,255,227,183, +63,128,254,227,183,135,251,235,218,15,191,248,253,212,67,3,11,145,69,107, +41,212,128,75,159,164,14,254,230,119,103,162,112,207,35,143,96,41,252,196, +191,60,157,166,233,207,127,254,243,43,218,118,165,7,209,211,123,175,23, +45,166,227,80,120,201,223,228,191,56,116,236,167,63,93,120,223,35,235,56, +87,253,253,247,188,109,223,15,158,76,136,248,248,190,67,186,156,128,171, +146,132,49,70,74,2,24,27,0,116,246,110,2,128,119,221,43,229,11,82,54,87, +248,197,107,73,32,224,197,215,47,146,4,225,172,39,247,236,104,187,90,206, +21,230,0,0,1,0,73,68,65,84,48,85,48,154,216,68,17,103,148,226,229,153,72, +79,119,75,83,61,91,196,180,64,165,92,62,67,112,41,141,113,233,114,85,156, +204,161,241,153,24,65,32,132,8,130,32,73,146,52,154,172,8,33,179,137,195, +120,249,34,95,138,38,104,147,133,214,10,57,13,83,8,1,214,84,69,195,64,0, +198,165,177,252,150,26,230,110,114,3,206,138,211,109,149,175,74,41,225, +112,184,156,167,161,161,161,36,82,154,166,17,72,37,148,56,228,151,112,54, +164,69,71,177,156,205,74,154,191,119,227,240,233,163,180,193,28,61,183, +175,124,86,73,165,182,171,196,252,254,71,118,172,105,119,246,109,178,126, +227,243,159,58,31,80,83,165,181,105,128,1,0,73,129,37,162,247,83,223,248, +31,127,253,141,95,164,49,140,5,52,222,108,126,238,245,203,9,249,26,253, +85,53,42,225,244,153,108,109,222,168,197,191,102,237,234,129,104,52,122, +112,36,173,14,254,206,204,131,61,135,82,162,199,216,184,227,11,159,249, +192,255,249,157,231,10,129,115,165,79,176,20,189,50,17,85,174,218,100,221, +3,183,173,182,62,214,32,0,0,1,0,73,68,65,84,223,178,103,231,158,251,223, +255,118,199,64,83,1,116,192,24,39,130,161,103,223,24,155,93,8,24,236,198, +80,40,205,27,24,140,49,230,88,41,28,61,55,146,240,57,77,189,29,78,159,215, +190,60,199,130,1,48,164,243,100,166,64,77,205,70,166,102,67,179,243,161, +74,39,95,48,8,8,128,102,217,66,54,157,47,74,8,99,10,233,154,174,105,4,133, +8,157,36,169,91,74,134,74,176,242,154,73,184,126,162,109,69,211,187,242, +171,210,6,220,235,124,159,214,86,140,241,197,163,26,81,140,163,2,87,210, +93,184,152,183,112,200,168,38,26,58,238,208,243,113,45,52,150,140,134,92, +62,255,138,200,43,45,247,221,239,250,196,238,119,1,198,248,39,251,39,174, +73,72,33,47,182,244,185,205,104,149,184,248,187,215,81,251,214,251,254, +252,189,107,255,253,43,63,49,90,236,123,214,123,107,137,172,172,206,150, +77,187,127,63,174,220,127,251,219,187,111,135,95,188,126,110,203,206,158, +104,22,2,70,189,1,192,80,95,15,140,230,198,197,151,126,118,120,68,122,153, +241,173,121,207,70,85,102,118,40,0,0,1,0,73,68,65,84,237,204,104,83,67, +155,131,190,30,219,150,237,247,108,217,14,79,63,253,116,190,160,77,132, +132,146,148,104,130,49,29,159,134,213,93,27,215,24,179,24,116,29,75,69, +213,217,98,145,179,89,191,219,216,213,32,28,59,31,4,192,24,144,78,80,86, +129,200,73,4,65,16,146,70,140,142,142,121,92,22,179,213,133,16,162,25,26, +1,0,197,2,46,98,146,6,0,130,38,21,21,147,52,65,34,90,213,53,250,214,91, +159,180,242,204,107,109,74,149,126,170,234,238,139,139,139,149,127,203, +111,57,65,32,181,4,42,6,161,16,132,252,34,206,46,74,138,62,56,116,133,202, +135,181,92,88,211,149,92,42,86,233,198,87,69,80,106,41,217,217,227,6,206, +179,156,141,227,115,115,99,177,44,248,36,78,94,136,151,210,214,89,209,210, +72,16,164,200,141,42,92,66,107,241,247,187,13,203,14,209,163,187,215,116, +239,122,228,231,223,252,82,136,169,51,94,93,95,224,162,217,246,141,173, +235,223,241,17,103,33,81,96,249,51,199,95,124,229,200,117,55,94,148,201, +187,251,142,173,247,220,185,156,75,13,95,0,0,1,0,73,68,65,84,177,193,158, +115,25,210,30,115,254,232,197,228,106,31,117,105,60,138,117,64,133,2,239, +178,175,94,101,103,24,170,144,43,142,93,158,138,42,36,109,16,251,187,235, +87,181,216,128,226,188,86,22,3,148,46,96,73,230,169,137,249,66,54,29,203, +102,18,101,86,152,76,38,81,16,24,146,64,136,84,85,157,64,186,142,129,38, +174,29,165,127,235,192,31,116,246,109,173,121,84,213,204,203,246,117,205, +182,118,163,183,149,90,250,21,200,234,242,140,155,172,101,37,181,173,179, +121,228,226,249,250,58,7,2,5,235,90,89,82,1,148,200,200,9,87,247,142,21, +231,248,74,137,205,62,19,0,108,221,181,129,7,0,190,206,146,254,225,79,254, +121,169,213,136,144,213,118,242,87,223,186,124,198,190,179,163,87,54,177, +179,39,46,38,10,201,19,51,210,95,252,197,99,85,120,202,207,27,27,174,155, +123,255,219,175,126,181,84,202,115,111,76,149,30,152,246,245,147,191,121, +163,169,165,173,206,99,101,216,203,4,66,24,227,72,96,206,85,223,88,89,119, +167,183,5,99,124,207,29,138,172,168,111,108,151,36,0,0,1,0,73,68,65,84, +8,240,225,147,83,33,153,94,74,229,151,22,8,191,83,148,9,79,147,67,45,22, +41,6,32,95,4,69,213,218,234,156,106,50,67,218,5,179,168,25,45,28,14,22, +160,98,30,97,114,33,47,114,224,69,203,62,95,233,148,105,134,38,117,181, +72,32,32,0,20,85,33,25,6,97,189,182,21,254,184,112,195,40,0,92,223,150, +85,115,112,85,249,199,199,199,125,62,31,212,152,59,58,162,181,225,167,89, +148,3,140,9,61,167,170,160,107,114,95,135,217,225,169,179,8,40,155,205, +51,77,155,172,174,229,15,145,188,116,232,183,79,45,153,86,123,157,6,234, +198,17,81,0,112,184,237,36,198,8,241,22,3,142,46,133,198,52,203,134,219, +252,172,125,231,95,127,226,246,23,70,149,109,219,86,45,188,250,155,233, +160,18,205,132,192,214,218,224,38,74,247,43,215,82,14,53,189,2,33,196,179, +148,197,36,12,158,159,150,227,87,118,174,118,188,250,31,7,91,238,232,203, +23,252,15,220,51,192,32,52,125,250,148,36,184,164,208,146,104,179,84,50, +202,102,119,59,93,94,135,203,103,65,160,234,221,0,0,1,0,73,68,65,84,22, +228,182,70,91,56,146,40,200,100,94,210,83,241,212,66,48,157,142,43,62,23, +187,20,46,218,188,150,108,36,111,182,113,217,84,14,116,202,102,97,114,217, +156,172,1,89,50,189,17,34,8,66,211,145,162,202,197,162,42,201,10,67,17, +36,181,124,68,130,134,40,154,34,1,176,174,235,37,67,253,191,212,226,255, +171,224,230,107,1,110,20,236,174,204,89,53,125,91,22,59,222,213,21,177, +173,229,83,135,72,136,1,2,183,25,221,123,155,13,64,81,68,128,226,34,9,20, +170,232,143,82,100,122,26,26,198,247,157,108,105,185,191,142,169,46,5,174, +111,245,210,67,235,150,123,90,183,220,243,236,254,241,245,237,220,149,193, +48,54,180,66,50,208,226,183,28,19,184,55,143,77,52,117,179,135,14,95,108, +230,240,196,249,108,132,32,222,249,206,119,194,74,162,83,85,74,163,215, +136,1,54,110,235,103,228,133,87,206,14,91,214,212,115,164,69,215,131,165, +90,89,140,226,229,161,160,41,118,34,230,121,164,91,20,107,35,79,109,157, +107,0,96,183,174,75,178,250,242,177,68,201,173,22,160,98,0,0,1,0,73,68, +65,84,205,74,201,249,67,23,37,19,73,0,6,93,206,79,44,161,158,30,199,229, +75,241,116,66,33,9,0,140,189,126,71,120,49,177,92,75,64,69,153,32,73,130, +210,137,68,42,75,100,114,110,151,19,17,84,233,6,41,130,32,117,93,7,184, +133,180,81,9,170,229,186,118,166,240,70,182,81,37,68,163,209,21,63,97,57, +158,223,240,169,184,99,15,133,83,148,158,166,212,24,169,198,72,45,74,231, +70,136,194,18,129,164,74,134,132,167,23,128,119,212,21,206,76,133,165,114, +137,231,142,157,60,63,22,89,145,146,242,239,67,123,218,77,130,127,160,219, +69,3,108,54,14,190,118,98,86,36,117,83,67,157,104,107,30,126,227,244,241, +83,99,111,28,58,127,234,212,169,215,15,158,186,81,117,170,136,71,8,117, +247,183,181,174,223,169,170,132,169,115,181,219,236,202,13,237,147,16,66, +8,153,157,60,141,211,140,89,90,152,138,134,134,199,198,47,159,40,35,76, +46,78,226,101,199,12,26,219,86,119,246,108,240,154,51,78,67,218,109,202, +151,202,200,97,188,184,16,55,217,108,117,14,216,224,22,229,0,0,1,0,73,68, +65,84,78,201,72,34,1,0,16,207,233,24,64,82,116,3,39,56,173,28,94,14,112, +64,201,96,147,53,82,209,200,88,60,33,75,69,242,106,91,145,36,73,16,183, +156,36,173,48,91,82,53,245,118,35,151,170,12,24,99,89,150,43,167,74,42, +243,208,150,70,197,212,41,78,252,59,89,58,171,4,36,2,75,0,58,165,198,179, +132,155,108,218,109,118,120,75,153,7,143,159,202,208,77,144,189,16,21,7, +54,248,96,242,204,49,91,125,203,145,189,251,99,132,171,167,217,6,0,35,23, +6,157,94,15,84,140,161,149,164,54,214,153,73,140,235,124,194,249,189,251, +27,86,183,36,245,230,79,124,236,93,11,193,20,38,152,237,127,241,185,199, +31,220,179,180,255,119,115,163,231,190,251,204,129,61,123,110,171,170,14, +90,41,84,134,16,90,191,126,125,127,107,29,66,168,152,56,113,108,18,175, +237,108,32,33,187,144,94,32,177,163,16,12,229,53,176,58,137,128,100,119, +50,41,68,162,161,3,199,143,157,31,234,237,187,182,101,170,183,119,149,221, +194,251,235,156,153,84,196,34,66,182,72,15,18,149,205,0,0,1,0,73,68,65, +84,202,146,130,17,33,8,148,156,203,102,139,170,219,103,11,71,51,4,66,36, +199,155,24,100,230,169,188,142,68,154,86,151,199,47,178,20,31,7,32,85,13, +211,36,96,140,75,247,103,220,82,22,82,9,86,208,73,229,231,21,201,173,98, +119,137,227,169,84,234,70,38,20,77,211,140,165,69,234,251,124,188,241,67, +20,146,40,84,164,160,72,233,41,172,231,56,142,44,47,57,5,200,93,26,58,250, +194,11,191,244,241,117,145,161,169,240,240,225,151,126,250,203,199,31,251, +208,213,120,47,66,8,141,156,127,115,104,34,90,46,183,86,125,2,0,239,237, +251,224,103,255,114,195,109,15,42,23,126,247,55,127,243,55,159,249,204, +131,45,108,168,197,9,8,161,28,100,246,157,72,175,93,229,248,237,225,241, +75,103,206,95,27,152,164,232,216,116,188,210,174,175,133,219,223,249,249, +15,191,125,43,0,80,70,11,153,10,165,141,237,22,121,41,43,210,141,45,27, +71,78,140,207,79,142,95,26,28,77,38,156,187,222,249,238,159,191,120,16, +43,153,114,245,189,117,141,190,250,230,141,107,218,153,179,216,240,0,0, +1,0,73,68,65,84,214,15,52,123,172,170,205,160,196,147,169,177,169,165,241, +64,38,83,40,70,178,26,0,96,128,98,81,19,120,40,200,192,208,12,207,32,139, +137,5,130,20,57,134,225,57,179,73,0,0,140,161,32,41,146,172,42,170,94,62, +82,241,150,130,27,198,184,75,176,162,131,80,233,183,151,254,26,141,198, +42,77,86,202,144,12,47,202,249,236,210,201,151,73,223,46,48,200,168,65, +3,208,145,174,82,11,123,11,246,45,100,235,187,45,206,101,133,4,217,153, +68,58,238,106,216,248,234,254,67,57,47,55,102,202,167,29,59,254,225,235, +239,253,200,251,63,253,232,39,183,149,73,123,225,153,39,94,100,208,23,191, +248,197,42,26,106,127,255,250,59,223,121,230,153,103,190,240,175,191,253, +196,206,186,185,56,216,108,192,10,198,64,244,114,110,48,236,138,219,100, +60,56,59,185,119,100,129,121,199,135,63,213,138,103,15,157,36,59,156,241, +147,83,226,166,254,107,39,248,214,186,144,24,99,32,29,84,88,51,175,246, +40,33,90,162,89,128,130,53,243,236,43,23,86,247,119,247,168,234,233,99, +226,32,36,130,0,0,1,0,73,68,65,84,231,173,119,108,236,45,166,130,193,56, +235,239,104,44,239,148,242,248,154,49,198,235,250,176,170,105,23,46,47, +229,20,14,48,96,192,243,51,193,58,43,29,205,97,181,160,240,172,184,152, +87,5,150,150,20,201,108,177,104,186,202,81,152,22,144,42,171,6,158,42,40, +160,105,0,8,16,2,164,234,36,9,165,105,184,255,122,203,255,255,13,43,175, +5,184,81,4,178,156,167,106,124,89,88,88,40,159,196,85,249,201,210,249,131, +225,177,11,188,156,44,198,130,6,150,44,120,118,23,132,190,36,217,97,244, +181,225,158,143,9,117,27,68,195,213,189,68,186,126,114,140,249,200,231, +62,57,51,116,112,70,165,215,52,121,10,246,129,173,235,60,198,196,18,39, +38,229,225,99,255,246,157,31,191,122,41,214,224,181,35,101,233,196,153, +161,211,167,79,111,217,178,165,118,48,173,132,254,254,254,165,104,106,227, +166,245,255,250,229,127,58,127,225,68,93,147,159,113,110,252,251,47,124, +252,107,255,215,143,155,122,172,9,218,65,199,167,70,200,238,230,252,217, +167,158,63,121,199,14,239,209,33,175,95,34,142,0,0,1,0,73,68,65,84,125, +160,211,85,89,199,90,180,8,33,86,48,59,125,78,94,16,166,82,164,171,48,17, +11,40,139,69,230,206,59,183,241,76,58,151,205,245,247,244,72,169,192,228, +116,198,221,236,43,121,140,225,96,88,52,138,8,33,209,104,53,154,108,44, +85,240,216,40,183,141,138,36,52,130,64,5,21,8,4,4,210,92,118,33,148,209, +156,28,89,40,74,50,201,57,5,50,145,41,240,6,1,203,10,197,80,138,6,12,141, +174,78,184,33,130,184,229,124,183,183,58,171,228,166,80,150,167,108,54, +91,40,20,76,165,93,164,21,159,207,28,123,142,73,7,124,235,238,48,154,45, +6,103,29,228,147,180,146,199,169,48,110,190,219,226,105,21,175,238,153, +196,24,35,218,200,155,220,109,126,195,29,91,218,146,231,198,44,22,54,20, +225,59,215,183,78,159,63,15,72,26,220,127,129,237,90,167,23,243,190,237, +143,252,245,187,87,255,63,255,243,105,214,102,140,40,98,127,91,253,91,196, +189,0,160,191,195,79,81,66,106,102,68,34,136,117,123,30,28,126,225,103, +131,83,227,223,250,215,47,44,12,226,68,190,45,0,0,1,0,73,68,65,84,207,174, +123,240,253,247,13,152,95,61,93,236,177,7,95,58,58,195,153,64,198,110,65, +91,178,187,86,136,143,67,133,67,42,216,172,60,133,76,22,27,34,40,81,201, +46,41,45,107,60,146,175,169,217,234,110,106,117,27,247,158,29,95,213,236, +61,121,228,96,48,17,105,107,110,3,128,108,58,203,153,12,229,102,55,153, +237,54,187,203,106,115,196,194,179,38,1,21,101,170,228,210,171,154,46,203, +186,203,68,165,115,58,102,104,167,129,140,101,100,130,164,104,134,204,100, +37,154,97,56,10,105,58,16,4,65,252,169,72,210,31,30,242,42,247,218,96,48, +136,16,146,36,41,30,143,155,205,102,184,218,18,51,39,94,118,137,132,80, +223,197,88,189,36,203,83,36,197,8,34,111,52,207,30,123,41,159,138,187,218, +250,42,199,14,175,203,64,1,0,203,89,17,155,230,96,234,248,129,195,151,134, +8,57,143,221,54,205,185,251,221,143,223,199,69,102,242,70,255,134,6,61, +25,23,255,226,239,63,119,252,204,232,166,158,166,101,65,148,99,64,9,101, +84,85,181,232,89,191,126,211,166,17,97,165,182,0,0,1,0,73,68,65,84,77,54, +131,192,169,145,193,201,133,201,56,34,138,169,129,205,253,188,18,189,120, +69,223,122,155,55,139,214,38,146,195,44,223,56,125,113,239,154,13,219,75, +56,165,208,101,202,224,170,173,44,92,149,126,151,137,19,237,94,210,233, +104,245,178,71,70,131,23,78,156,237,234,235,63,119,228,124,99,183,47,159, +229,55,111,105,31,25,26,159,154,8,48,70,131,201,98,36,43,240,148,126,27, +252,245,6,129,150,139,105,145,3,150,134,76,30,8,0,64,80,84,192,101,231, +82,89,108,98,201,108,94,146,53,48,240,148,170,131,200,211,8,33,146,36,160, +20,122,186,197,236,238,21,228,250,70,244,173,104,229,149,18,25,134,105, +105,105,145,101,57,147,201,44,46,46,198,98,229,57,16,149,164,8,61,159,208, +11,41,189,152,78,69,131,67,251,127,51,124,228,165,58,183,75,158,62,127, +3,179,209,216,182,107,123,199,218,205,91,239,236,38,114,241,11,243,73,69, +172,87,195,113,134,198,0,176,188,96,22,3,0,124,246,209,221,19,199,94,252, +209,191,252,11,66,8,178,227,85,196,215,218,70,133,62,167,0,0,1,0,73,68, +65,84,254,0,176,250,158,71,255,254,239,255,126,38,16,109,234,238,196,0, +8,64,215,151,167,43,62,244,208,109,0,156,215,238,127,109,178,48,113,240, +0,66,104,239,129,195,223,249,206,119,126,240,131,31,76,198,164,202,184, +67,21,206,6,19,128,177,142,212,89,15,29,249,233,79,127,218,237,181,168, +203,36,226,133,37,153,179,58,98,161,72,52,184,52,57,114,170,28,35,40,227, +49,153,237,109,205,117,173,77,158,150,6,167,129,83,121,90,77,230,20,13, +107,197,124,49,93,144,52,172,139,28,137,53,149,229,104,4,128,117,140,72, +146,64,229,157,220,183,144,24,193,91,251,110,85,80,69,122,165,33,165,170, +42,0,248,253,254,158,158,158,92,46,87,40,20,2,129,64,32,16,160,64,66,74, +70,207,134,244,124,92,207,197,98,83,131,135,127,245,253,23,126,242,157, +60,45,250,87,111,139,6,102,224,6,107,221,27,92,117,187,31,254,232,215,191, +254,245,219,118,236,217,220,212,173,76,189,254,195,39,158,124,237,226,232, +245,68,198,94,253,229,139,23,167,163,123,143,78,103,1,222,185,253,44,131, +131,0,0,1,0,73,68,65,84,235,225,143,126,244,163,43,82,94,21,210,252,202, +39,30,218,188,121,61,7,0,140,173,179,213,6,24,10,209,44,0,96,12,109,102, +42,52,17,56,180,56,114,248,200,241,241,41,190,8,144,203,5,246,190,120,180, +54,26,82,142,29,148,240,111,29,104,220,116,239,123,223,247,190,247,141, +102,145,72,27,33,35,169,0,70,103,93,79,79,35,141,33,60,59,146,144,169,11, +23,46,228,148,234,120,138,209,108,55,154,29,102,171,179,177,222,86,239, +53,49,164,10,0,137,180,4,170,146,204,201,36,199,219,173,6,73,197,4,128, +166,105,186,174,107,154,118,139,45,39,89,134,155,140,181,127,160,183,89, +26,179,75,204,237,232,232,240,251,253,201,100,50,145,72,16,132,138,148, +4,206,133,244,108,88,207,133,117,41,151,145,116,103,231,154,75,199,247, +51,102,219,210,169,151,101,89,126,11,211,30,0,62,252,232,174,53,29,142, +13,187,235,23,46,157,237,94,183,51,190,76,21,96,0,200,47,68,13,155,63,241, +127,127,245,249,215,246,159,91,204,110,125,239,23,190,245,195,31,126,251, +153,105,35,147,219,0,0,1,0,73,68,65,84,163,161,226,13,233,172,44,75,196, +24,132,134,123,118,181,129,216,20,191,248,93,25,3,198,224,91,229,33,34, +103,216,36,189,148,12,216,253,221,159,252,228,39,63,251,217,207,66,96,12, +174,159,96,174,245,28,203,244,191,243,237,155,105,146,119,154,83,111,158, +25,6,0,92,74,39,153,166,206,181,90,54,178,16,79,166,35,129,201,201,201, +218,42,91,109,110,187,195,227,117,138,126,55,3,176,188,114,38,149,200,198, +18,89,6,97,77,215,75,69,233,184,164,71,111,57,88,97,45,192,77,67,74,181, +128,43,160,244,183,183,183,183,183,183,151,36,117,170,56,15,249,37,156, +11,225,92,8,164,140,153,35,220,172,230,107,105,215,11,9,28,28,78,70,67, +149,72,170,30,202,52,236,121,244,211,223,253,238,119,63,253,254,123,54, +250,205,192,88,151,51,20,242,66,83,183,219,4,253,108,120,240,212,124,233, +170,16,233,210,224,241,19,211,85,56,107,99,96,149,137,70,214,113,255,99, +15,254,251,47,15,2,96,209,183,74,9,31,198,214,205,107,215,183,98,12,28, +0,128,165,211,105,129,197,129,199,0,0,1,0,73,68,65,84,27,27,27,60,242,234, +11,181,22,88,21,157,229,103,127,127,159,203,230,187,86,36,109,16,89,88, +191,166,171,144,138,44,140,79,71,195,139,251,14,157,47,189,84,139,169,80, +96,58,154,202,151,254,58,156,30,187,195,93,239,98,12,172,46,178,122,105, +32,79,100,138,24,235,136,164,72,2,224,86,148,34,128,155,198,147,202,80, +230,126,237,3,220,120,50,139,229,57,50,155,64,233,225,210,26,8,44,167,53, +29,46,14,94,92,179,125,167,150,13,171,88,203,38,163,165,245,73,181,115, +106,149,69,151,59,253,150,62,47,198,87,215,20,138,98,118,244,104,48,181, +217,43,177,83,139,137,75,151,127,249,3,233,76,139,147,136,132,82,144,95, +0,225,154,91,183,34,242,202,183,235,119,63,26,33,222,104,110,244,65,49, +233,86,12,228,150,54,183,55,19,157,125,17,96,51,0,112,146,126,254,204,241, +137,145,244,92,36,115,251,3,239,169,55,222,188,119,113,214,198,213,86,8, +132,50,20,128,167,222,179,20,13,99,0,32,41,70,74,22,25,215,166,1,247,200, +104,68,197,152,66,40,222,79,2,4,0,0,1,0,73,68,65,84,155,74,38,210,121,77, +78,57,204,66,153,36,171,205,101,181,129,84,204,39,211,89,4,88,213,1,0,36, +89,163,136,210,137,98,183,34,172,60,186,85,77,108,193,245,49,164,114,182, +146,60,97,140,43,15,134,42,127,133,49,54,185,155,73,61,65,202,97,40,4,81, +113,9,228,100,86,214,235,91,26,174,156,63,5,185,16,1,10,232,26,92,107,84, +57,52,252,6,220,88,57,149,115,126,242,139,31,177,97,140,217,70,175,122, +238,127,126,238,211,1,166,72,122,204,197,76,98,126,228,205,139,180,209, +215,235,221,251,207,63,218,247,189,111,126,250,211,255,184,162,78,42,19, +95,81,52,220,187,107,87,119,139,61,189,56,28,20,26,59,188,188,17,92,109, +205,89,9,0,32,147,227,145,68,112,190,222,61,241,185,203,47,30,25,5,57,113, +100,239,222,74,218,110,68,112,157,219,72,2,120,234,61,110,183,171,116,36, +47,208,140,102,180,46,27,251,8,1,128,172,128,209,209,200,209,90,165,100, +151,62,103,57,193,106,54,154,205,34,77,97,138,192,178,172,200,234,242,192, +118,235,133,192,220,25,206,0,0,1,0,73,68,65,84,184,255,128,217,146,21,53, +68,85,122,233,76,183,170,175,16,66,98,211,22,77,87,40,45,70,231,70,137, +226,18,82,82,0,208,222,96,110,106,176,226,252,18,129,174,91,122,11,82,248, +244,254,231,14,13,135,148,183,60,46,184,66,178,205,111,123,252,61,59,55, +174,26,44,184,250,55,53,172,123,240,227,255,248,223,191,150,150,252,91, +122,220,25,34,181,152,117,172,237,54,255,242,208,56,198,241,21,107,87,41, +100,229,38,100,28,221,73,150,246,112,0,0,247,222,121,251,19,79,62,249,244, +211,63,188,82,224,4,193,96,182,155,62,245,201,247,71,15,31,156,56,127,233, +194,165,75,223,250,206,111,160,98,172,172,21,217,202,226,188,94,15,13,128, +72,193,106,175,135,76,14,85,244,55,163,129,207,68,102,57,94,168,148,236, +242,91,134,229,89,150,55,25,121,81,100,72,2,19,168,44,72,248,15,52,97,255, +183,193,202,187,185,75,176,98,4,185,170,194,165,191,44,187,124,172,118, +21,6,206,221,19,51,247,114,217,19,36,0,169,199,220,102,223,189,183,251, +220,46,205,225,165,124,142,116,125,0,0,1,0,73,68,65,84,161,16,36,129,4, +116,221,170,146,41,104,26,125,229,68,107,235,131,245,108,181,55,87,57,198, +149,161,105,253,238,198,117,187,236,199,102,54,116,112,103,79,204,129,208, +104,159,127,249,248,197,118,206,96,251,217,203,251,108,117,38,111,194,183, +70,200,30,123,118,124,134,166,223,243,241,79,117,249,156,149,58,169,118, +248,227,29,109,247,237,81,75,91,211,121,239,64,124,225,185,176,170,62,254, +185,207,205,31,253,117,2,16,24,77,158,92,226,240,129,179,108,139,159,152, +95,138,36,23,135,79,14,222,126,247,61,85,60,172,210,226,215,128,177,248, +92,160,37,39,142,190,57,149,211,45,45,0,8,161,72,42,97,241,250,10,57,53, +157,204,152,44,70,185,152,151,101,217,104,182,86,114,146,101,121,0,64,80, +44,33,213,244,234,150,186,21,224,230,231,113,223,136,226,74,78,5,2,1,183, +219,93,203,59,138,166,37,194,80,72,7,197,226,56,129,37,142,82,221,14,222, +192,41,128,49,82,179,121,157,163,154,182,91,93,117,0,128,49,14,14,30,27, +201,136,66,114,80,108,223,214,100,167,135,243,188,0,0,1,0,73,68,65,84,162, +74,216,78,31,58,182,88,224,234,156,34,170,17,241,50,25,109,13,86,134,50, +210,52,89,231,54,234,129,99,207,237,27,220,52,96,230,91,239,251,218,151, +63,253,133,207,124,207,225,103,3,121,187,197,202,8,5,61,57,113,234,153, +23,222,220,182,109,93,101,45,42,181,44,198,216,110,189,118,204,247,206, +157,59,119,239,222,109,231,97,225,212,203,207,253,246,229,183,223,209,255, +242,68,94,69,121,132,116,138,182,47,46,133,23,130,250,233,211,7,162,10, +223,238,119,189,133,169,87,73,118,46,19,103,40,49,129,201,230,122,23,9, +16,139,46,178,230,122,46,51,39,233,172,104,20,178,177,112,34,93,176,88, +45,181,82,78,82,20,73,82,36,73,2,96,116,235,173,116,251,207,81,83,101,100, +148,65,20,197,27,125,98,233,126,59,94,255,223,72,36,81,72,34,113,138,81, +23,40,45,78,41,97,74,13,147,132,92,185,9,112,122,161,32,242,117,2,149,30, +154,8,131,146,28,63,190,239,55,79,61,53,57,60,58,177,144,44,101,184,120, +226,100,85,233,149,122,107,67,191,151,116,18,101,85,0,0,1,0,73,68,65,84, +5,216,246,192,221,119,14,120,154,110,127,40,126,250,197,111,127,251,219, +167,206,127,199,173,195,195,159,251,196,103,63,251,89,152,56,116,254,228, +108,33,57,183,239,212,244,216,208,112,109,93,106,199,187,50,232,198,134, +61,239,255,171,47,125,229,55,107,30,218,229,18,136,187,30,253,216,199,63, +254,168,207,109,112,54,116,116,55,58,198,198,39,64,78,236,255,237,111,95, +120,225,64,249,219,185,201,153,218,193,20,99,44,229,211,177,140,218,217, +212,68,98,12,0,28,67,71,230,39,242,132,80,88,62,133,146,96,13,246,185,153, +137,88,86,201,36,194,203,216,176,166,168,122,217,59,166,40,234,79,233,196, +210,170,128,33,186,126,237,81,213,144,55,55,55,87,121,191,91,229,231,36, +69,1,99,193,197,104,142,107,19,50,131,4,82,41,92,212,49,34,245,130,44,52, +210,237,247,27,45,118,0,64,40,255,226,207,191,255,202,201,241,219,154,235, +103,194,66,55,55,242,219,31,63,123,248,242,220,98,6,55,118,13,244,181,218, +1,224,232,43,251,10,66,189,207,41,150,139,40,23,87,186,74,194,8,0,0,1,0, +73,68,65,84,38,137,18,157,171,214,244,27,57,145,76,77,158,28,153,158,73, +179,27,26,226,142,174,141,34,66,87,46,28,251,253,254,97,131,67,153,9,9, +133,241,215,82,217,169,253,135,206,59,218,122,205,234,204,193,179,153,102, +91,242,204,152,84,231,94,249,216,9,93,211,12,54,231,99,143,221,211,97,55, +89,112,224,87,63,223,55,52,189,248,206,157,173,195,243,112,239,174,142, +244,124,146,84,138,75,178,130,228,140,187,109,85,110,126,88,176,56,199, +47,143,56,27,253,149,13,94,210,178,86,103,125,125,189,199,98,96,74,91,31, +89,138,84,165,162,206,154,229,76,206,100,53,43,197,60,208,188,207,41,38, +19,146,201,200,197,18,105,29,81,12,169,23,21,32,64,71,36,73,188,101,36, +226,143,8,43,159,14,88,126,88,209,183,135,26,70,155,76,166,202,252,101, +12,233,88,88,41,230,131,103,95,167,61,143,105,108,1,97,21,3,66,88,37,131, +135,144,174,18,214,102,139,115,249,206,83,156,155,77,164,162,142,250,13, +175,238,63,148,245,242,99,166,124,214,181,243,191,253,247,63,255,35,36, +121,14,0,0,1,0,73,68,65,84,232,227,159,234,135,84,185,160,75,23,207,100, +146,61,59,183,92,91,147,127,35,247,126,251,123,255,114,251,123,225,211, +223,252,249,159,223,251,192,87,191,249,212,215,191,240,184,200,34,115,91, +139,203,239,120,245,247,111,186,118,211,11,151,70,163,35,83,153,214,59, +63,219,31,185,56,66,110,109,151,206,15,27,55,244,122,86,172,123,243,170, +254,114,17,13,107,118,173,95,124,35,203,217,206,78,199,49,182,149,28,169, +217,137,161,201,148,106,37,138,147,115,139,153,83,103,249,249,216,84,48, +107,189,114,122,106,98,73,103,152,187,239,190,27,233,69,32,249,202,254, +89,194,198,136,182,250,38,43,66,40,78,44,105,120,57,144,137,73,138,212, +242,217,148,196,113,116,65,150,121,2,75,69,157,226,89,130,162,48,0,186, +21,5,233,102,231,113,87,145,92,249,183,146,29,201,100,178,252,92,153,30, +31,59,157,12,45,50,177,233,108,60,104,113,122,163,13,159,213,117,85,46, +22,234,108,189,114,195,59,72,41,87,58,184,3,33,132,8,43,219,252,240,223, +126,236,3,207,124,229,35,231,2,159,82,146,0,0,1,0,73,68,65,84,11,137,60, +85,111,235,236,117,155,208,71,239,90,141,139,83,223,251,212,119,71,82,234, +165,52,255,254,247,221,63,124,250,204,230,205,13,169,43,103,221,171,214, +87,81,82,203,224,255,247,11,143,97,140,217,169,163,31,253,232,145,143,253, +221,63,250,162,111,126,230,51,15,171,234,111,56,33,189,229,157,31,218,168, +28,250,171,103,3,35,210,145,95,253,199,137,15,223,255,87,101,29,87,219, +74,215,245,34,198,122,231,67,15,1,192,197,201,169,190,78,51,6,9,0,176,193, +220,227,115,81,170,58,62,60,198,81,141,75,129,104,178,0,241,44,86,25,179, +195,198,15,143,205,26,25,157,227,77,54,183,157,184,193,250,102,155,219, +3,0,146,90,140,133,147,14,67,157,78,97,149,224,85,57,175,232,24,9,28,66, +88,213,48,82,101,2,81,20,73,148,92,198,91,74,154,86,24,221,106,135,176, +74,103,164,114,188,43,191,45,173,190,133,26,15,107,238,232,115,68,98,206, +191,254,78,131,40,24,156,117,168,144,162,164,172,150,8,146,157,15,89,60, +173,102,111,219,181,204,180,145,53,228,13,211,254,0,0,1,0,73,68,65,84,186, +59,252,134,61,91,219,147,231,198,204,86,38,20,230,58,215,183,206,156,59, +15,132,60,27,241,124,232,27,95,111,84,195,97,107,151,144,25,242,244,111, +26,63,176,55,150,137,77,135,89,183,215,72,93,63,101,81,37,82,8,161,157, +247,223,255,192,3,15,212,89,141,111,254,248,155,63,126,225,197,111,126, +243,139,227,167,207,173,223,185,86,84,163,23,134,180,59,238,110,146,184, +219,95,57,242,130,213,218,146,28,63,212,210,189,124,238,69,49,116,153,50, +184,112,141,229,91,2,140,177,199,102,115,216,4,4,0,136,54,112,233,177,5, +108,18,136,102,159,37,173,219,110,187,107,155,144,79,130,158,201,201,228, +206,219,183,166,51,121,154,208,231,231,163,206,122,55,117,227,5,85,24,99, +169,88,100,205,174,200,82,204,228,180,171,249,132,203,97,83,21,157,23,88, +12,12,96,5,33,226,106,244,14,223,234,22,247,138,86,103,165,112,160,171, +80,254,4,33,20,141,70,199,199,199,161,102,178,165,144,77,90,4,146,228,56, +67,227,42,214,234,18,76,86,131,205,229,244,183,204,29,6,50,47,96,0,0,1, +0,73,68,65,84,248,249,204,155,175,192,245,182,206,250,62,47,139,16,24,253, +119,237,217,65,187,93,185,241,151,255,199,215,191,190,148,138,102,56,222, +178,106,189,207,2,128,129,65,108,145,67,51,97,41,65,146,131,19,9,146,68, +80,99,32,215,42,206,242,243,223,62,249,31,79,62,249,228,71,254,225,199, +249,171,145,226,171,3,57,124,233,195,247,96,204,79,46,206,78,37,97,242, +224,1,0,216,187,111,223,119,191,251,221,39,159,124,114,50,38,65,141,162, +186,86,4,101,104,91,213,214,216,187,217,152,93,152,158,158,94,213,229,129, +112,212,192,1,6,192,154,28,15,5,95,120,225,133,214,58,67,161,168,86,234, +188,255,143,185,239,142,142,171,184,30,190,243,202,190,237,189,175,86,189, +119,201,150,123,199,96,99,27,48,16,122,128,128,67,79,2,33,33,161,252,72, +72,72,242,75,161,164,18,2,161,153,94,76,177,49,216,6,247,34,23,89,178,36, +75,178,138,213,203,106,165,237,189,189,249,254,88,121,253,180,187,18,124, +231,124,231,67,247,156,221,51,111,222,188,59,119,238,220,185,115,231,61, +63,227,32,0,0,1,0,73,68,65,84,78,75,56,162,146,112,242,133,98,1,159,206, +202,53,203,4,124,137,68,100,119,186,195,177,41,83,157,34,16,197,227,147, +4,138,225,100,62,207,5,72,227,79,74,219,98,102,239,153,181,90,45,77,211, +253,253,253,46,151,171,170,170,138,243,38,66,209,52,27,112,32,68,0,128, +215,237,24,109,59,137,8,210,168,148,77,116,30,131,53,215,164,203,69,146, +183,106,57,207,58,66,5,93,7,206,12,158,25,138,46,172,201,140,117,218,188, +97,152,112,217,68,38,144,4,133,253,19,110,50,56,44,54,173,14,56,135,235, +15,140,174,90,85,7,0,221,173,173,17,145,169,36,71,1,41,194,148,212,48,86, +206,43,156,151,23,31,234,199,39,235,80,208,238,3,32,48,134,229,6,227,169, +65,71,232,92,219,40,201,111,108,163,3,188,49,58,102,115,125,154,253,179, +45,107,103,234,67,227,97,134,167,184,226,182,219,16,66,245,61,147,133,249, +238,64,4,59,124,30,133,90,93,182,120,65,77,161,230,116,83,75,192,199,210, +4,1,17,15,208,201,70,61,23,51,159,115,83,153,80,162,136,226,65,34,140,0, +0,1,0,73,68,65,84,130,135,79,242,0,145,108,196,11,12,67,16,128,89,20,239, +216,102,170,139,239,10,210,247,110,144,226,102,156,73,182,226,255,93,93, +93,133,133,133,145,72,132,166,233,241,241,241,64,32,32,145,72,16,66,163, +141,95,202,200,16,41,16,3,34,112,36,56,210,222,240,245,235,207,182,156, +56,82,181,225,22,93,86,110,128,20,11,165,242,4,54,224,212,147,76,36,205, +42,170,94,181,106,149,39,68,207,47,46,238,252,114,235,145,174,115,231,7, +39,149,249,85,155,74,217,179,221,126,158,219,163,201,87,54,28,237,28,110, +248,98,120,164,127,48,34,29,109,60,222,23,80,86,23,105,82,53,40,76,151, +173,170,162,76,141,70,77,2,80,136,22,136,229,42,189,244,203,151,254,184, +244,242,249,103,123,153,101,213,236,153,35,173,65,194,226,12,69,25,94,225, +207,126,121,231,186,53,139,14,125,176,107,233,37,139,185,189,103,90,86, +196,137,207,80,10,85,166,252,215,94,123,61,192,10,53,10,33,41,80,232,149, +66,163,2,6,71,189,128,128,23,10,246,245,116,187,34,60,177,84,76,208,255, +122,38,0,0,1,0,73,68,65,84,93,236,15,98,195,150,9,169,88,148,138,156,97, +24,30,77,1,34,128,141,196,48,162,121,52,176,44,32,130,156,213,213,247,157, +192,140,125,237,55,82,201,85,176,241,59,184,180,90,173,217,108,22,137,68, +12,195,116,116,116,116,116,116,16,16,69,225,248,170,146,9,214,107,101,67, +94,87,144,21,101,149,182,28,254,130,167,208,142,158,252,34,50,253,172,18, +72,233,82,111,187,118,69,117,161,102,241,186,194,240,196,112,221,210,181, +17,0,69,182,33,216,253,82,164,116,179,73,203,3,0,204,147,246,7,165,60,138, +108,171,223,190,253,253,23,191,77,113,226,100,243,1,128,175,157,95,105, +96,4,166,203,54,86,191,250,233,81,192,88,150,89,21,178,237,33,99,235,114, +242,116,180,70,201,199,24,33,85,133,81,211,213,213,124,112,215,167,105, +49,39,205,150,196,51,186,255,135,119,220,121,211,134,120,231,137,208,197, +57,142,201,209,1,150,207,247,216,38,108,182,137,177,193,238,174,190,17, +140,113,212,55,225,10,77,179,47,185,195,103,140,49,2,224,11,37,36,69,33, +128,184,118,160,113,237,192,0,0,1,0,73,68,65,84,199,115,111,26,247,91,157, +11,144,250,152,20,51,54,54,102,50,153,226,188,48,153,76,0,16,191,241,45, +64,68,137,136,3,252,150,41,86,134,60,82,134,200,84,240,53,230,28,214,239, +192,35,45,78,219,132,198,96,74,139,159,11,171,174,185,103,229,213,24,33, +116,170,125,28,41,120,206,142,64,197,93,122,51,213,11,0,160,40,216,116, +203,173,229,114,56,78,144,24,227,247,63,175,47,47,41,44,203,96,129,209, +164,206,222,164,78,185,96,140,25,132,214,221,252,139,193,247,222,171,46, +51,64,196,167,117,145,212,53,101,243,138,236,45,7,219,16,170,4,0,97,0,159, +56,178,175,163,197,214,63,238,90,115,245,237,102,233,52,218,102,178,157, +17,66,185,185,121,4,79,2,16,159,19,194,0,8,4,226,113,187,157,245,177,148, +132,138,218,157,44,21,96,205,210,129,110,187,182,176,40,45,99,19,205,21, +99,204,143,159,17,24,191,181,100,238,157,236,62,227,90,0,110,31,7,41,166, +116,146,185,167,215,235,147,170,39,126,107,32,73,2,17,115,160,192,24,248, +44,224,183,64,99,31,198,8,0,0,1,0,73,68,65,84,200,141,1,90,155,78,43,152, +24,235,179,70,49,235,113,88,185,237,239,27,201,173,43,213,97,44,223,116, +197,125,37,58,16,78,125,5,6,57,0,64,233,194,141,87,221,120,95,243,137,83, +141,157,19,56,48,122,230,100,155,103,178,107,10,115,112,252,232,215,71, +189,233,16,38,200,190,235,198,27,235,42,244,238,161,102,151,178,184,204, +44,148,65,134,84,112,58,174,18,188,66,228,7,38,163,230,138,161,142,227, +219,246,183,67,216,158,14,211,52,206,196,209,170,213,106,149,140,15,0,64, +75,178,179,141,0,160,81,82,11,150,173,201,47,42,48,234,244,126,39,85,90, +146,27,8,5,124,2,190,74,52,155,88,36,201,22,129,48,203,126,43,118,253,255, +132,217,198,110,137,152,41,29,155,78,182,226,143,220,147,184,184,159,11, +36,18,42,230,68,33,11,4,199,80,96,12,135,93,158,16,171,50,25,219,27,142, +97,239,56,1,209,248,170,146,11,159,68,172,29,7,185,100,164,197,137,16,170, +190,113,149,6,99,196,104,43,42,10,43,42,10,166,210,35,0,128,218,76,17,0, +32,23,130,213,60,0,0,1,0,73,68,65,84,128,253,187,143,251,194,254,175,183, +191,253,159,255,188,135,162,238,142,150,115,13,95,188,50,19,23,18,217,17, +242,188,17,138,206,16,2,0,220,120,197,154,23,182,110,69,200,114,186,103, +88,36,145,202,181,242,255,121,252,71,99,123,118,117,157,58,243,199,167, +158,122,250,143,111,38,62,76,117,14,65,146,150,165,68,25,25,186,172,44, +189,54,167,184,253,244,153,8,96,18,123,50,115,36,125,231,134,32,22,227, +49,20,25,11,142,245,180,183,183,183,39,48,36,120,155,176,192,210,114,99, +238,192,108,235,147,32,101,89,18,55,30,56,229,81,171,213,48,157,161,113, +70,200,76,197,100,204,65,69,38,136,160,5,133,44,40,226,4,128,210,60,149, +201,32,5,191,133,64,33,46,102,20,158,56,249,213,39,7,219,199,195,223,164, +2,167,42,73,156,127,249,229,203,55,109,90,193,196,233,180,249,124,206,64, +98,92,143,0,248,42,195,64,111,103,91,253,215,227,65,12,0,131,3,150,39,238, +189,247,129,7,30,72,91,204,248,163,200,80,121,197,165,43,226,55,7,8,50, +23,158,61,27,49,24,250,0,0,1,0,73,68,65,84,126,252,238,187,127,125,221, +147,79,168,226,104,165,50,147,119,242,171,47,143,11,115,115,249,161,209, +113,199,240,158,237,159,66,74,195,227,226,228,198,103,100,232,40,90,34, +100,125,78,151,39,0,2,185,217,204,196,166,150,74,66,44,28,32,165,165,165, +165,238,96,216,53,62,202,229,60,183,25,79,61,194,212,222,146,180,117,247, +93,65,250,213,183,169,205,2,102,48,50,226,143,118,187,61,233,171,120,152, +159,185,36,132,129,140,218,200,200,4,25,153,208,72,195,151,44,214,231,104, +98,69,102,62,4,198,72,8,3,186,232,86,9,77,244,246,66,246,7,95,30,143,31, +48,145,58,210,78,173,164,120,140,8,99,0,200,206,140,54,109,255,21,216,252, +62,103,32,224,176,2,64,235,238,221,85,57,69,102,35,218,209,233,68,0,32, +210,249,5,89,53,37,186,23,62,173,135,192,8,183,212,220,98,214,84,204,75, +228,242,239,127,255,251,165,151,94,42,83,3,223,117,254,139,151,126,143, +157,118,75,118,182,141,96,253,118,59,41,209,237,220,121,172,173,47,250, +167,63,253,105,219,254,212,162,235,59,0,0,1,0,73,68,65,84,166,36,6,206, +132,28,0,106,151,46,93,90,87,145,161,80,13,54,55,121,37,242,32,75,134,130, +209,24,201,67,113,239,128,219,226,242,134,7,7,199,163,108,196,227,114,113, +121,158,96,108,106,22,115,1,102,60,217,29,56,122,53,73,45,165,6,130,193, +32,247,100,247,4,6,190,84,99,239,59,46,244,119,16,16,37,112,128,207,80, +25,90,74,42,136,2,198,40,230,245,197,24,250,194,170,18,132,144,165,249, +88,71,124,85,73,254,210,108,25,149,218,207,206,98,59,35,132,12,229,139, +165,66,118,200,25,110,171,255,164,190,163,115,50,40,136,185,61,109,109, +195,94,240,182,248,85,6,54,76,11,144,174,116,237,150,91,175,123,231,79, +79,102,46,185,188,233,180,37,35,91,65,166,115,195,114,179,136,255,247,158, +31,50,46,185,105,235,11,111,47,216,114,3,217,223,113,217,150,159,95,185, +186,218,54,49,136,133,121,247,95,87,253,217,129,150,229,21,134,143,223, +120,247,212,217,161,170,170,226,56,146,250,189,135,205,185,89,169,124,75, +128,206,108,54,104,148,4,193,250,71,38,119,127,247,235,0,0,1,0,73,68,65, +84,133,122,131,215,97,87,40,164,126,175,31,137,84,68,196,19,163,40,175, +195,19,141,69,89,68,242,104,42,181,58,32,69,237,125,183,144,254,172,18, +152,213,147,4,41,165,138,95,238,158,84,7,241,199,152,40,195,230,9,201,189, +13,4,132,0,179,4,14,16,56,0,152,37,89,159,31,201,201,156,53,114,205,212, +202,249,51,71,227,103,149,52,77,8,171,245,225,254,198,227,199,154,26,143, +149,148,215,160,233,179,55,220,118,153,36,103,217,133,149,2,149,44,199, +36,21,25,138,14,55,142,175,93,204,4,244,235,31,188,38,251,208,41,155,132, +7,66,33,96,126,70,77,177,54,155,25,60,49,64,103,26,180,122,131,148,74,41, +102,82,32,158,81,52,18,22,41,245,119,220,113,149,89,35,215,177,3,111,190, +177,179,169,123,232,150,117,133,173,253,80,89,40,114,14,216,201,96,192, +70,211,66,240,169,243,202,221,231,79,139,84,134,161,190,65,109,110,22,153, +110,137,41,87,163,208,20,35,21,71,122,172,1,65,112,210,98,115,138,25,34, +24,33,141,122,177,211,30,36,104,62,1,16,255,207,121,0,0,1,0,73,68,65,84, +225,64,4,196,124,194,31,8,242,120,188,88,52,138,72,18,102,221,107,255,93, +65,250,29,1,169,125,51,204,202,235,184,31,50,145,152,171,126,21,185,75, +24,109,5,241,198,86,4,24,176,11,240,133,111,49,102,196,197,164,32,225,210, +245,159,109,59,246,85,223,153,239,47,202,104,109,237,233,232,170,255,228, +192,160,208,72,80,250,234,37,213,102,141,66,55,149,157,183,231,235,38,242, +210,229,57,9,58,147,58,220,210,130,66,84,88,4,0,50,105,110,93,65,248,171, +63,254,235,47,93,66,130,174,229,22,176,104,253,101,7,127,242,233,240,26, +236,182,245,13,183,31,188,237,71,143,165,218,52,73,197,41,168,174,139,199, +72,0,36,11,214,47,28,222,227,21,106,142,159,159,4,80,199,45,179,206,222, +51,77,163,62,37,17,84,245,14,184,142,158,166,186,198,206,79,132,233,35, +199,8,121,238,188,2,10,24,117,42,135,19,143,180,84,39,112,90,84,122,163, +221,19,96,105,134,181,219,112,84,13,0,36,197,83,43,132,54,103,32,232,15, +134,89,76,71,99,40,22,67,20,53,19,10,157,236,0,0,1,0,73,68,65,84,215,78, +226,142,195,183,186,223,109,166,142,57,33,97,126,191,31,210,245,56,30,135, +45,26,14,140,157,57,204,91,114,88,104,255,90,127,238,169,169,27,222,176, +59,204,242,72,69,150,92,61,181,170,4,124,3,118,231,132,210,48,127,207,215, +7,189,122,193,226,106,218,88,181,249,135,15,173,127,248,238,199,130,215, +207,211,83,2,183,199,134,52,165,155,202,66,103,218,201,229,203,115,248, +41,148,112,137,196,24,175,95,93,129,16,186,100,121,157,141,212,216,206, +185,1,0,59,123,177,108,17,128,27,133,130,49,25,191,169,169,91,17,110,96, +139,215,125,124,164,47,223,125,184,114,195,109,73,170,46,173,95,7,33,4, +140,106,227,141,55,34,132,154,186,123,106,203,228,0,1,0,224,9,101,183,222, +123,95,142,8,191,241,225,30,33,191,48,230,115,71,162,172,140,79,187,195, +126,247,144,189,207,227,173,172,214,35,116,145,106,196,113,20,33,68,229, +154,77,8,33,145,28,252,225,8,15,161,145,49,167,72,163,140,6,1,16,34,16, +138,132,35,60,177,44,18,137,18,177,112,12,80,176,69,142,201,0,0,1,0,73, +68,65,84,220,177,52,167,20,18,204,178,210,141,203,77,238,63,76,87,6,241, +24,183,219,173,84,42,83,117,216,88,235,209,241,206,102,182,191,209,51,57, +78,242,244,97,227,66,159,122,133,87,189,134,181,183,121,179,110,33,243, +175,82,24,167,172,10,136,69,78,116,211,63,252,217,67,125,173,251,6,89,166, +174,64,27,148,21,44,172,49,248,15,29,232,115,184,143,236,62,49,100,239, +63,122,180,251,186,245,197,199,58,136,154,249,25,188,148,29,177,9,178,185, +18,80,88,94,87,93,86,166,18,240,178,179,77,102,157,228,221,215,222,109, +59,215,97,240,142,88,53,249,14,171,143,175,54,222,118,239,77,33,207,208, +217,237,173,159,239,249,100,48,162,173,42,20,34,196,143,99,232,58,219,169, +214,169,147,172,70,46,115,12,42,165,70,37,4,64,136,226,203,4,158,253,7, +58,44,35,231,43,10,116,182,144,98,213,134,101,140,219,166,203,20,89,3,17, +9,102,218,188,238,98,131,120,172,125,156,214,201,185,109,55,129,51,129, +153,38,73,158,64,228,245,71,84,74,9,66,4,143,130,96,32,133,184,66,224,0, +0,1,0,73,68,65,84,42,16,241,99,225,16,159,207,16,136,160,25,6,99,28,255, +230,255,65,253,255,191,131,244,94,128,36,107,105,166,255,56,96,140,19,7, +180,195,244,166,236,29,104,69,99,109,153,139,215,103,103,101,169,77,89, +152,169,136,82,101,110,143,154,89,243,47,201,194,159,202,178,23,37,88,137, +249,134,85,151,173,207,148,194,83,79,253,108,189,146,242,195,212,9,148, +217,74,161,216,235,215,151,108,252,249,159,254,187,201,40,124,247,184,53, +174,3,46,146,225,235,77,242,23,164,54,214,5,11,202,231,205,43,175,88,186, +105,97,101,6,128,236,163,195,142,133,181,25,8,97,132,0,33,180,52,59,250, +249,174,61,242,156,156,238,166,230,190,142,253,29,95,188,247,244,211,79, +99,140,143,237,61,26,226,184,211,184,89,76,11,211,210,130,210,252,236,170, +165,90,112,88,173,86,172,208,211,3,167,36,124,192,0,2,169,200,31,136,218, +162,88,43,161,252,174,137,145,241,201,88,18,157,177,228,253,194,113,228, +38,147,134,34,104,177,144,135,129,96,248,60,150,160,4,124,58,114,225,99, +52,245,72,95,37,45,0,0,1,0,73,68,65,84,155,91,240,109,239,45,129,116,78, +203,56,32,132,40,138,26,28,28,204,204,204,132,233,90,193,227,178,25,5,136, +18,138,25,149,9,0,8,231,4,32,16,9,133,173,199,154,202,174,93,45,16,138, +184,122,174,46,126,10,150,216,124,217,218,149,59,78,239,105,56,122,114, +164,219,80,68,49,172,70,166,84,25,229,12,206,212,72,246,158,232,144,102, +92,210,189,237,241,134,172,71,239,153,47,5,112,52,125,240,213,174,230,14, +43,66,207,63,255,60,215,194,75,165,19,99,124,223,163,143,2,192,103,71,123, +10,141,98,78,2,84,243,189,31,30,109,248,210,218,77,20,23,85,121,206,14, +211,124,197,251,251,79,156,59,253,133,23,182,168,102,30,48,114,85,53,195, +83,110,190,227,14,140,241,241,30,91,113,157,238,235,125,135,99,30,7,37, +41,17,79,90,93,50,129,54,74,88,221,193,136,150,31,27,108,134,204,170,4, +27,113,212,239,244,130,66,198,199,51,25,209,136,20,8,201,144,223,227,14, +199,104,26,72,106,206,25,218,9,248,230,25,92,148,50,154,75,133,88,44,134, +49,236,182,32,178,0,0,1,0,73,68,65,84,30,29,29,237,233,233,153,134,4,71, +104,134,102,3,14,54,232,102,131,238,64,40,216,215,124,124,176,171,213,40, +34,59,183,254,38,45,78,132,36,121,171,150,137,9,130,164,121,52,77,159,137, +25,202,151,231,199,95,88,48,43,243,250,0,160,96,233,165,195,13,157,0,150, +29,255,221,113,236,136,11,103,20,230,231,75,235,7,252,48,189,15,74,64,130, +254,56,108,94,86,128,248,134,229,203,171,234,234,170,248,0,32,206,96,134, +246,62,251,194,171,183,253,240,90,50,36,138,230,173,121,236,177,199,48, +0,27,139,190,249,193,151,125,35,3,111,255,235,95,105,57,144,90,247,8,161, +197,5,234,194,186,117,214,190,46,145,58,7,72,169,94,232,243,70,88,149,136, +154,244,241,24,130,24,233,159,56,248,197,23,141,103,45,161,176,51,142,115, +120,204,29,129,217,0,33,196,23,73,229,114,57,143,207,144,4,132,67,41,247, +77,207,13,248,134,29,1,241,48,215,152,77,181,70,1,192,102,179,229,231,231, +187,92,174,80,40,228,243,249,130,193,160,88,44,198,24,143,77,173,42,145, +29,77,30,58,0,0,1,0,73,68,65,84,0,34,112,36,48,124,246,212,158,255,254, +161,229,216,190,154,205,91,180,25,89,65,158,140,47,146,164,173,248,201, +222,94,65,241,134,251,31,184,30,131,100,101,113,236,191,207,110,237,56, +223,210,31,212,8,164,152,20,101,205,91,89,56,184,253,51,147,232,252,30, +201,166,155,151,140,153,175,188,107,227,162,218,163,167,156,229,121,178, +180,165,72,43,94,57,57,198,204,76,35,15,0,64,36,38,237,219,118,53,48,42, +229,202,162,240,72,184,168,186,72,83,145,147,49,50,228,183,147,1,116,174, +254,72,135,131,148,230,232,117,81,30,37,130,25,38,148,146,98,106,107,107, +243,178,116,44,162,36,2,111,183,71,84,174,67,167,122,157,70,165,62,20,102, +179,22,172,8,141,181,132,121,164,115,108,204,230,137,69,89,158,90,45,34, +103,216,106,193,141,161,72,130,32,41,138,34,89,118,206,77,223,194,236,123, +112,185,225,164,250,64,211,71,115,241,248,140,140,140,162,162,162,248,225, +44,189,189,189,125,125,125,4,68,81,216,57,117,86,137,215,202,134,189,206, +0,75,234,242,155,247,125,105,33,81,157,0,0,1,0,73,68,65,84,198,168,244, +195,39,118,198,143,203,73,133,226,121,139,150,213,154,120,0,87,173,202, +19,3,96,150,141,132,195,139,22,47,47,89,89,8,128,0,116,18,241,201,61,251, +71,150,148,232,245,117,63,120,242,119,127,63,112,158,93,92,40,5,111,79, +98,64,4,190,254,227,103,70,211,34,79,45,114,213,198,219,125,125,205,45, +231,250,85,165,151,76,54,108,77,148,253,222,27,151,57,250,93,119,255,246, +233,207,247,124,213,216,211,214,112,244,224,145,134,190,233,3,139,16,151, +3,73,104,249,0,124,67,229,21,243,114,41,1,227,27,159,64,2,17,47,236,144, +11,177,4,243,28,67,142,193,81,167,128,79,97,12,16,116,14,91,221,92,60,169, +188,157,134,127,206,73,17,192,236,107,1,210,10,62,87,57,37,194,177,88,44, +241,42,55,55,215,104,52,198,229,137,136,175,42,241,77,157,85,130,131,30, +49,67,20,101,168,165,250,12,54,224,132,225,38,167,109,34,201,158,141,99, +206,42,46,171,44,210,196,143,119,71,162,220,121,87,254,240,177,167,158, +186,110,93,209,234,154,218,69,53,178,201,217,157,0,0,1,0,73,68,65,84,70, +0,48,10,115,15,158,146,151,40,108,109,157,125,159,60,124,249,224,206,223, +100,101,197,78,189,125,242,233,7,30,120,224,129,223,13,6,130,16,24,58,217, +50,22,65,168,229,100,19,112,102,126,184,255,192,177,117,158,254,199,63, +254,241,171,187,196,124,221,252,108,237,93,119,221,133,16,2,139,7,194,33, +143,180,192,40,135,133,42,71,235,169,161,247,223,249,172,171,119,114,184, +175,49,65,103,104,242,252,225,253,187,218,199,253,144,2,211,36,64,156,185, +108,81,21,79,44,50,152,100,158,32,242,65,4,241,121,170,140,34,163,70,4, +177,192,120,159,53,202,6,38,199,250,123,7,199,184,223,206,84,53,196,156, +156,45,73,127,3,78,194,116,77,253,32,169,144,241,52,52,77,115,95,97,140, +11,10,10,242,243,243,73,146,37,226,55,224,248,44,224,183,224,144,139,68, +208,122,234,184,65,206,176,94,107,148,101,61,246,11,155,3,131,227,144,210, +22,167,30,5,166,21,11,204,12,0,0,72,133,153,203,234,204,12,198,30,161,73, +92,32,214,178,222,246,35,159,128,162,224,246,202,148,212,119,0,0,1,0,73, +68,65,84,123,238,252,213,51,59,246,54,239,81,213,214,214,20,80,199,142, +15,245,156,60,248,201,59,207,133,1,206,28,111,244,135,108,45,167,90,130, +223,194,107,128,49,94,117,231,195,47,191,252,242,115,219,142,111,188,201, +228,227,11,100,182,230,1,27,232,98,66,214,226,20,155,234,238,188,190,206, +217,119,244,131,54,223,201,47,222,1,128,145,166,142,3,253,190,111,163,36, +178,115,205,90,17,169,200,42,110,60,176,127,52,200,168,244,18,0,64,0,19, +125,253,182,152,192,164,225,79,88,189,33,159,207,231,115,59,38,173,73,156, +79,101,203,28,236,221,102,187,149,43,17,3,51,152,71,137,112,220,11,144, +234,124,226,11,69,164,215,129,130,8,199,183,105,133,60,174,32,43,214,106, +218,78,28,82,43,5,4,138,1,27,157,66,226,237,254,240,205,237,78,128,248, +185,108,9,165,24,207,125,94,249,180,109,153,60,128,97,247,120,78,213,122, +224,235,22,148,152,254,246,183,191,17,1,183,218,169,244,43,178,246,30,58, +36,10,90,21,254,186,197,171,85,106,173,249,239,239,239,180,31,249,248,242, +40,178,0,0,1,0,73,68,65,84,112,195,61,87,177,177,24,78,55,14,77,85,135, +241,183,15,95,187,8,96,209,150,63,60,123,109,117,222,63,127,122,255,138, +121,102,210,104,214,211,197,0,80,94,189,248,224,158,62,17,61,249,218,123, +13,154,176,187,124,233,247,202,116,51,110,65,230,130,136,7,24,11,205,90, +41,95,147,163,83,208,46,103,16,3,40,140,122,150,114,132,195,106,159,19, +151,45,202,112,76,142,249,60,145,80,148,85,104,244,204,133,109,151,73,163, +197,180,117,241,157,67,250,29,1,192,145,253,153,232,230,198,240,19,87,108, +79,255,151,26,11,40,203,251,16,153,50,134,80,36,2,0,85,197,122,169,82,4, +62,11,1,225,139,168,0,222,125,123,151,162,68,171,249,250,216,130,69,75, +140,226,228,153,25,152,62,4,91,178,124,117,51,91,132,49,147,181,228,134, +225,79,30,193,88,91,115,249,146,186,129,79,175,250,229,214,98,9,70,8,77, +78,80,203,215,46,144,107,35,1,137,242,175,255,218,154,107,154,135,153,83, +181,181,117,73,197,132,116,93,73,34,230,149,199,127,6,0,151,223,140,239, +153,180,15,36,0,0,1,0,73,68,65,84,127,252,149,91,47,203,104,141,223,203, +165,204,83,217,63,12,134,73,245,186,194,104,103,199,252,108,9,128,3,64, +145,132,36,173,5,13,0,101,243,166,214,26,232,212,4,162,16,41,144,231,106, +157,67,195,67,230,28,249,112,215,144,84,73,243,101,218,128,103,12,51,10, +33,107,151,169,12,220,111,209,116,255,48,204,37,152,237,36,174,153,6,17, +169,86,84,124,182,4,82,212,146,32,115,73,184,129,21,198,108,241,183,42, +177,112,249,60,173,89,21,53,101,139,32,56,70,34,196,57,171,4,45,190,233, +145,123,238,94,248,240,131,79,130,172,104,115,157,138,75,82,146,138,2,128, +170,121,107,149,238,41,55,239,95,254,242,23,0,24,240,227,172,69,242,199, +158,121,33,91,79,150,174,188,122,185,10,194,238,224,53,171,151,126,220, +218,230,146,120,59,155,90,201,177,145,137,254,214,35,77,125,113,199,35, +112,108,166,153,106,37,145,239,191,255,247,135,254,208,100,235,153,33,0, +0,80,8,201,54,135,242,135,229,38,105,71,39,152,9,231,137,143,223,31,26, +12,134,114,202,46,89,160,102,113,228,0,0,1,0,73,68,65,84,86,169,87,233, +82,157,186,169,188,5,0,141,66,8,0,58,77,76,168,144,9,61,227,46,111,136, +22,34,150,164,104,154,206,212,100,12,140,122,21,42,193,240,208,48,41,148, +233,149,98,46,231,191,209,41,243,157,192,255,245,137,165,220,194,36,18, +139,197,98,110,154,196,191,64,87,20,80,215,1,235,167,98,118,42,102,215, +72,252,43,106,68,217,170,32,17,180,16,65,11,129,194,136,243,213,217,175, +223,253,231,243,207,175,157,111,30,28,104,187,72,70,200,214,209,210,157, +68,67,28,146,214,83,103,9,17,136,114,164,142,174,182,182,182,81,103,32, +194,215,91,155,62,136,191,186,233,123,151,23,106,5,64,243,119,236,105,150, +178,147,91,119,55,64,104,28,113,0,56,38,121,106,145,227,111,5,60,213,202, +133,83,151,54,235,197,217,218,101,5,38,41,68,66,44,132,189,227,161,140, +136,161,36,47,83,49,124,236,235,109,175,189,118,224,196,224,76,60,76,5, +189,70,76,34,190,57,51,147,98,131,81,138,31,141,132,1,0,104,138,138,6,93, +14,31,159,33,67,225,16,66,49,30,245,117,245,0,0,1,0,73,68,65,84,183,253, +226,146,223,164,70,53,71,224,155,207,79,130,233,173,22,165,243,124,184, +92,174,212,175,0,128,199,99,132,117,15,78,158,17,232,39,62,5,0,72,76,22, +0,32,0,146,144,94,60,171,4,65,208,99,183,142,243,39,125,230,133,171,131, +167,91,198,42,170,140,76,96,20,112,108,176,223,114,186,254,16,100,45,251, +254,250,162,84,194,96,186,190,124,236,175,127,141,167,9,1,84,149,197,62, +57,122,86,23,28,195,8,48,0,146,100,24,42,22,62,114,189,250,134,63,31,171, +97,169,99,13,182,9,132,170,46,255,193,21,243,50,18,72,58,79,125,85,84,119, +105,42,155,226,200,139,115,167,52,229,36,33,47,53,241,37,0,178,16,14,210, +124,5,207,182,250,218,219,37,129,145,157,231,109,65,49,12,14,180,4,106, +132,61,45,221,149,117,75,82,81,165,85,129,8,161,188,138,10,140,177,125, +184,103,120,168,215,32,203,140,209,8,72,33,98,253,68,140,245,186,92,124, +153,202,235,15,10,40,20,97,129,207,103,230,154,145,4,51,233,164,180,250, +51,169,47,224,214,101,124,10,186,179,48,0,0,1,0,73,68,65,84,43,119,28,146, +250,68,105,238,10,209,146,39,8,20,33,81,132,194,46,138,117,81,172,139,138, +217,201,152,141,225,147,52,255,226,70,193,249,87,63,240,155,63,253,137, +12,146,210,72,228,203,125,231,3,24,131,183,187,185,219,163,54,169,163,144, +88,85,11,159,188,242,10,87,172,103,50,26,120,24,223,242,240,63,7,250,172, +243,54,85,189,247,229,161,126,91,16,0,140,102,51,230,49,69,66,234,116,135, +173,205,78,66,96,100,255,193,211,174,145,166,63,255,249,207,0,16,158,232, +124,235,237,47,182,110,221,154,202,10,110,12,0,56,195,14,3,15,3,64,105, +142,98,44,38,43,46,144,217,188,0,20,197,15,77,92,117,221,186,124,65,180, +103,100,164,241,76,207,246,237,219,79,158,27,10,59,135,185,132,165,149, +128,139,185,80,2,141,57,183,171,207,109,200,52,66,100,82,173,146,51,52, +17,97,41,138,192,98,1,21,137,176,4,129,162,81,22,102,237,61,190,19,72,127, +111,73,218,222,61,245,85,66,170,122,123,123,13,6,67,146,174,138,23,149, +36,201,96,148,196,140,220,253,27,178,251,0,0,1,0,73,68,65,84,41,170,21, +59,142,16,136,37,16,139,112,36,202,226,176,126,165,188,236,42,30,195,0, +0,4,134,142,181,19,243,230,103,8,251,90,7,122,172,94,82,191,112,113,22, +227,31,248,224,243,150,179,103,135,148,34,64,50,179,200,118,90,97,202,59, +215,212,116,178,207,59,208,112,176,184,170,42,73,107,166,62,174,172,202, +21,106,138,182,125,184,221,144,83,85,81,164,159,244,11,107,178,161,249, +148,197,74,195,245,15,62,114,253,82,93,211,153,209,96,87,91,147,203,211, +54,16,210,121,91,218,37,27,79,30,221,182,109,247,233,107,150,105,15,181, +134,178,140,210,180,172,168,168,94,28,95,34,39,148,243,190,236,37,22,23, +153,223,126,227,99,123,40,162,226,133,41,99,169,179,183,195,230,141,145, +162,44,97,108,244,220,120,84,234,181,183,156,239,13,51,50,21,49,126,186, +59,104,208,164,217,33,121,145,183,8,104,30,99,208,41,8,0,169,92,53,54,110, +137,98,74,192,195,4,35,36,32,22,8,134,209,212,197,240,115,238,36,174,25, +79,189,73,43,49,169,201,226,16,223,17,144,236,156,74,203,0,0,1,0,73,68, +65,84,36,106,8,33,251,248,72,200,235,182,28,253,20,153,74,40,42,134,11, +30,65,128,49,16,76,207,27,1,243,149,100,222,21,66,241,212,214,102,16,102, +157,254,236,201,223,13,238,88,172,211,59,240,84,6,137,44,253,128,133,216, +249,229,91,31,202,155,122,143,180,14,46,94,8,175,189,252,217,149,183,222, +154,118,112,144,234,140,248,243,83,79,197,169,101,91,198,128,135,49,128, +58,24,48,43,1,57,0,243,180,67,173,199,74,54,255,164,117,199,182,227,153, +252,43,127,92,157,115,251,75,184,187,251,179,250,195,22,231,188,21,243, +51,184,69,78,21,86,90,102,30,60,242,70,163,242,134,76,25,193,178,140,121, +193,170,47,63,254,140,165,121,6,33,72,21,170,75,202,151,126,186,175,207, +54,110,245,200,21,227,163,22,109,196,211,223,227,153,95,54,237,30,243,36, +222,10,68,18,110,46,70,163,25,0,194,65,183,199,225,80,41,37,36,69,11,4, +252,80,40,2,115,127,231,100,146,65,157,16,142,84,219,136,203,8,171,213, +154,153,153,153,202,29,87,215,41,251,232,144,148,70,135,202,176,77,0,0, +1,0,73,68,65,84,254,161,22,145,46,195,167,94,199,70,35,1,143,43,119,69, +37,82,47,224,73,57,187,228,4,25,107,87,22,219,0,14,143,51,203,175,93,208, +244,225,88,16,33,223,68,98,186,3,65,160,127,82,180,176,165,161,117,196, +19,43,7,88,242,253,199,111,219,178,69,172,93,113,253,253,87,173,206,156, +54,2,159,73,131,34,132,150,86,25,1,160,164,34,127,249,178,197,221,110,208, +0,64,192,179,248,230,141,135,15,110,255,197,143,175,217,254,254,215,106, +17,200,1,160,160,160,212,115,162,171,229,56,64,229,44,35,86,0,192,152,186, +114,105,181,64,64,213,222,124,115,60,70,69,250,165,185,203,228,42,219,196, +56,96,138,22,18,84,206,130,106,240,201,202,52,132,223,109,15,6,253,147, +190,168,138,31,179,219,253,42,205,197,195,36,147,108,134,36,205,74,243, +68,252,104,192,23,140,144,56,22,10,133,120,60,30,204,208,188,191,67,152, +237,206,73,238,128,51,169,98,146,74,30,139,197,100,50,89,106,35,235,63, +242,41,227,25,53,212,174,145,40,117,34,141,9,249,28,116,44,68,79,228,178, +3,0,0,1,0,73,68,65,84,6,156,46,81,177,76,151,21,191,75,41,241,73,237,178, +101,75,151,46,13,176,210,181,203,202,78,190,243,220,174,147,245,157,221, +157,30,190,145,8,129,72,4,52,68,162,178,202,59,30,254,97,70,200,98,39,0, +199,180,191,122,250,129,80,243,129,243,150,208,162,234,188,153,172,165, +180,222,151,188,162,172,144,99,232,241,135,30,217,254,241,103,129,204,138, +130,202,170,165,249,188,255,190,218,162,145,6,117,181,139,53,60,192,24, +171,105,231,59,239,238,26,30,31,155,136,10,51,5,110,74,168,76,69,30,143, +209,234,140,10,1,149,120,91,80,94,158,109,146,73,132,36,137,4,74,81,180, +175,215,17,97,125,236,196,232,68,84,145,151,45,97,121,89,66,137,64,74,7, +122,155,7,85,38,41,65,208,48,179,76,36,40,71,136,160,105,58,198,98,30,143, +100,49,96,12,8,165,95,245,240,29,194,55,220,128,195,37,55,201,103,159,8, +99,140,199,198,198,186,186,186,0,96,100,100,132,251,42,24,240,72,69,60, +130,34,25,141,145,18,138,133,106,131,88,147,161,204,41,245,28,251,211,137, +137,24,0,0,1,0,73,68,65,84,168,107,231,107,169,216,16,66,87,95,90,40,5, +88,255,189,5,153,50,153,174,100,205,197,92,4,194,216,200,184,94,6,0,88, +1,208,186,231,237,248,18,59,210,209,125,108,255,222,157,31,127,14,233,70, +242,73,116,38,194,17,191,109,245,234,213,75,106,87,151,174,188,164,127, +251,171,255,243,247,173,204,96,147,50,131,247,222,251,141,23,146,33,121, +254,101,231,26,246,189,241,233,254,64,208,245,246,219,111,191,243,206,231, +169,28,64,23,32,41,94,200,104,242,179,20,136,18,101,230,24,181,2,138,146, +11,252,214,145,248,102,126,163,148,6,74,32,103,88,191,111,226,84,227,32, +204,208,0,18,129,68,99,22,48,60,130,164,227,199,12,207,53,49,130,111,227, +79,154,197,23,156,136,55,24,12,5,5,5,125,125,125,86,171,117,108,108,44, +113,151,18,129,131,36,10,68,237,189,108,192,21,117,12,219,135,207,215,191, +251,215,250,119,255,102,46,155,39,184,176,64,39,109,118,11,55,220,241,139, +95,252,226,246,107,175,189,98,105,221,218,181,117,0,128,132,153,120,108, +183,59,4,255,51,82,119,0,0,1,0,73,68,65,84,99,246,113,0,8,251,61,255,120, +246,217,211,32,206,173,51,191,241,242,123,135,27,251,93,97,123,199,193, +47,166,48,248,135,102,161,31,33,164,44,188,172,185,185,185,109,92,124,253, +124,253,237,143,253,225,181,215,222,238,207,205,91,184,118,157,247,216, +95,93,8,57,123,122,0,192,156,87,248,220,31,126,81,36,64,160,202,104,108, +108,108,58,184,219,238,115,158,105,104,76,235,121,74,202,107,202,60,160, +164,69,229,185,89,85,139,134,135,199,179,231,87,251,163,16,241,71,0,0,99, +90,166,5,183,51,132,196,172,125,120,104,120,116,228,204,241,179,0,0,16, +241,59,173,67,125,125,92,82,185,195,151,120,152,162,200,248,57,19,115,10, +210,143,221,96,186,193,4,233,102,58,185,198,83,119,119,183,201,100,82,40, +20,122,189,62,174,150,188,94,175,199,227,241,118,31,146,131,139,100,4,56, +26,193,17,191,165,167,109,231,187,175,141,184,130,217,249,133,153,243,87, +90,38,236,50,181,46,213,8,227,242,209,104,212,101,100,104,41,138,202,48, +230,154,244,209,231,95,126,103,120,50,181,191,58,130,0,0,1,0,73,68,65,84, +42,55,41,116,5,27,38,44,103,150,94,126,243,250,34,246,208,25,226,238,199, +239,159,104,249,108,199,235,59,207,141,179,81,145,114,178,231,116,67,195, +152,169,36,139,78,41,87,130,254,203,47,191,124,195,134,69,226,11,101,185, +242,178,37,18,137,234,178,43,54,111,185,251,238,47,79,15,84,230,81,125, +54,109,93,49,211,222,100,33,188,253,66,204,240,121,54,135,50,99,199,75, +31,174,187,242,178,84,132,169,12,140,11,65,28,121,73,73,137,82,72,9,248, +114,235,249,131,198,172,34,132,16,9,222,129,113,82,194,7,138,4,76,42,100, +200,39,150,11,135,135,38,3,14,79,148,162,131,49,16,243,73,127,128,229,209, +100,234,0,40,173,169,254,157,195,183,90,51,153,36,70,113,224,198,104,181, +23,47,253,44,46,46,54,155,205,14,135,195,233,116,198,239,82,2,159,5,123, +199,177,207,130,67,110,17,143,168,44,204,30,183,142,177,1,167,107,223,139, +54,235,24,164,136,111,42,37,213,213,149,165,185,202,5,151,221,88,168,87, +110,220,116,69,60,197,175,255,240,135,107,23,132,235,90,182,0,0,1,0,73, +68,65,84,102,242,1,140,133,53,122,25,26,111,236,34,202,55,55,236,223,245, +230,215,199,39,250,78,88,9,130,10,219,32,93,71,144,148,75,82,248,237,151, +94,186,108,253,234,182,11,55,205,3,64,91,187,181,107,194,231,142,162,198, +115,35,124,69,206,255,254,249,177,135,158,122,126,252,252,145,36,58,83, +135,35,73,69,3,128,121,43,174,28,116,132,1,128,18,203,28,190,176,150,79, +5,17,38,5,140,74,199,111,237,30,84,152,76,145,136,80,159,149,229,247,7, +17,27,246,248,102,91,252,52,167,196,8,190,113,29,119,90,142,164,90,6,147, +147,147,220,177,27,0,148,151,151,3,192,153,83,44,25,118,160,192,24,142, +127,26,116,210,36,106,61,126,232,214,37,203,88,159,53,138,177,199,102,85, +235,140,220,44,102,241,95,3,192,207,127,254,115,140,113,91,155,40,16,155, +182,131,12,0,124,76,134,33,43,239,161,171,111,120,226,239,167,235,126,117, +221,111,238,120,191,78,21,64,177,104,125,143,239,135,63,188,46,181,44,51, +137,23,66,232,246,141,43,206,143,102,21,7,37,0,22,98,204,205,14,0,0,1,0, +73,68,65,84,12,144,157,79,173,185,252,97,211,200,231,127,219,235,226,231, +213,110,186,225,190,198,79,95,111,63,215,185,235,173,221,125,17,223,175, +159,126,150,59,64,73,171,188,185,217,101,42,120,0,0,148,134,193,118,177, +136,28,113,196,100,124,218,111,193,163,142,80,5,133,132,82,103,111,95,44, +207,164,15,7,92,46,135,79,175,17,35,132,128,141,134,99,136,166,230,214, +21,202,73,240,127,209,221,38,25,1,92,80,42,149,144,174,110,24,129,128,140, +57,80,200,2,129,49,8,140,225,144,203,25,136,17,50,197,217,250,125,216,59, +78,160,40,102,163,23,113,250,44,39,246,125,150,106,34,36,161,69,8,149,151, +87,212,85,25,226,43,150,176,48,43,30,47,12,141,90,123,251,249,10,117,150, +37,108,7,184,182,54,183,105,207,193,3,159,237,63,115,226,160,53,4,0,158, +93,175,189,6,0,73,39,2,192,116,19,36,225,254,200,51,102,21,231,42,129,111, +92,187,113,249,252,69,43,254,241,235,95,252,253,131,253,241,244,122,25, +200,249,34,123,152,23,50,46,251,245,163,247,191,125,184,131,207,253,216, +0,0,1,0,73,68,65,84,47,116,1,39,87,164,0,34,137,112,90,187,106,241,146, +34,82,102,116,5,105,62,29,24,179,133,213,2,42,16,9,233,178,203,203,50,148, +124,62,67,144,36,69,243,236,46,175,215,237,0,192,137,59,221,230,154,107, +59,1,233,117,82,106,219,130,20,245,144,72,9,23,78,81,78,197,32,213,231, +82,227,78,8,95,152,111,11,71,0,160,174,34,67,32,225,99,255,212,170,146, +11,74,46,116,234,139,237,111,238,111,57,219,55,201,106,11,55,148,233,221, +88,153,159,167,226,26,58,73,22,3,47,62,26,230,27,86,45,70,12,64,105,69, +230,233,55,119,4,93,215,15,107,105,5,0,2,228,101,194,103,251,113,97,9,115, +160,105,104,137,252,228,238,175,78,142,98,60,175,92,61,58,218,179,98,243, +74,17,132,6,234,63,62,202,95,115,115,141,142,75,51,112,181,35,79,94,92, +33,7,128,186,138,86,169,86,219,217,63,57,149,18,128,142,70,153,236,28,4, +16,232,237,218,221,216,55,17,241,242,11,86,174,223,176,64,197,155,162,54, +236,28,236,108,239,155,12,73,235,150,47,73,147,187,146,0,0,1,0,73,68,65, +84,16,207,172,250,23,21,25,49,138,168,51,181,250,168,123,216,226,210,40, +228,114,177,228,108,71,127,113,129,70,40,98,216,160,219,139,73,68,69,41, +146,68,136,226,242,97,174,193,55,156,199,157,26,159,84,157,241,64,252,22, +101,72,105,223,162,172,197,145,166,136,32,102,139,175,68,82,8,249,11,42, +85,38,121,36,51,87,6,129,49,18,1,160,11,162,25,24,62,112,184,167,98,243, +79,79,110,251,179,79,48,145,237,213,116,225,90,115,158,138,154,89,154,19, +255,241,237,77,230,133,27,55,250,132,143,255,246,99,127,249,170,184,167, +82,36,16,249,162,150,9,175,178,231,211,125,193,172,190,27,255,250,194,235, +191,190,223,168,91,184,251,163,207,172,34,222,141,85,226,143,79,182,47, +218,188,33,213,1,203,45,90,60,230,214,91,111,5,128,246,246,238,24,33,139, +59,223,75,10,179,247,181,187,0,228,40,26,241,241,130,130,194,178,96,239, +153,3,123,157,70,52,217,106,19,223,125,203,149,227,109,231,27,251,39,100, +216,218,53,94,82,107,146,204,98,217,16,192,83,169,121,16,126,81,214,86, +0,0,1,0,73,68,65,84,101,194,238,152,117,176,123,146,199,232,132,162,24, +0,142,177,124,1,63,4,12,130,88,40,20,3,204,178,24,243,24,1,73,204,197,62, +46,253,108,73,42,103,147,6,107,73,159,120,60,158,120,32,73,212,248,186, +82,155,162,74,224,62,74,2,0,2,173,84,181,118,161,12,112,40,22,178,0,6,2, +41,47,178,196,55,78,41,43,215,172,200,187,231,178,255,76,182,181,237,107, +62,30,39,5,165,243,142,166,55,204,25,117,245,229,215,237,109,15,207,91, +189,24,7,7,0,112,101,181,217,38,93,249,211,187,86,191,254,198,54,155,61, +51,95,139,254,253,239,127,131,171,245,221,191,191,214,222,61,120,116,100, +204,19,90,182,56,139,6,152,38,169,201,104,57,49,165,165,5,0,16,6,40,169, +173,209,101,40,99,219,255,243,207,151,163,124,101,157,128,20,247,245,246, +210,160,44,200,200,60,179,221,147,91,37,108,30,118,78,78,132,242,86,108, +94,166,152,252,162,165,23,76,85,51,146,157,136,161,4,106,5,38,195,82,127, +20,121,99,132,146,160,217,160,21,4,50,146,162,4,12,186,234,11,9,0,0,1,0, +73,68,65,84,246,68,163,129,64,136,97,200,72,44,70,32,132,241,156,115,41, +165,241,39,165,26,188,48,93,169,166,22,64,36,18,165,125,203,23,8,153,121, +15,56,84,171,166,86,1,196,108,84,212,78,178,118,50,108,37,35,86,146,136, +196,87,149,96,140,177,64,224,37,245,241,163,244,212,101,101,83,131,150, +224,40,23,103,106,22,73,38,8,198,248,103,63,187,101,85,21,249,183,95,190, +50,26,10,102,47,191,210,115,242,163,199,31,127,252,142,155,150,20,242,71, +6,108,83,24,106,151,223,246,232,253,55,88,130,110,65,117,129,99,224,248, +224,201,3,175,191,254,58,23,201,44,252,194,24,243,0,204,249,121,17,231, +240,146,53,181,106,177,192,78,75,139,11,21,155,111,255,209,143,126,116, +243,242,34,141,81,29,162,249,98,191,199,17,18,49,133,122,33,22,25,120,17, +87,42,103,210,230,130,16,82,232,50,76,38,147,84,46,37,9,158,84,46,244,135, +217,196,12,27,65,241,4,124,62,142,197,112,44,54,139,134,251,174,32,253, +142,0,152,174,219,225,162,53,147,158,250,64,32,48,211,66,31,103,219,0,0, +1,0,73,68,65,84,43,89,209,122,106,225,147,36,10,83,40,76,98,23,57,37,82, +118,42,102,99,24,146,230,95,152,24,23,102,242,98,254,80,104,138,109,90, +140,1,92,231,118,30,123,245,185,231,158,127,126,43,151,18,72,241,182,39, +204,228,11,9,248,121,75,215,218,249,106,33,163,221,180,121,165,70,163,121, +231,148,167,172,214,248,242,227,143,78,37,64,0,0,4,205,102,234,148,157, +167,154,191,254,248,131,250,250,250,125,77,231,123,78,236,125,235,173,157, +9,204,169,150,50,87,148,197,134,202,238,182,250,158,254,152,87,172,202, +155,191,122,199,107,175,109,253,104,87,243,208,208,162,235,47,119,159,105, +82,73,20,52,143,84,208,8,33,94,144,164,147,144,204,84,150,4,114,149,76, +0,0,82,133,142,17,8,248,12,25,79,74,16,36,0,66,128,99,44,70,196,156,187, +75,105,182,179,111,19,129,153,100,40,161,174,226,46,124,110,124,66,254, +40,138,230,171,10,67,229,63,243,121,61,170,254,151,46,164,112,69,88,154, +86,152,165,106,195,5,252,234,224,249,19,251,142,87,221,190,50,62,22,35, +245,100,215,0,0,1,0,73,68,65,84,67,16,28,61,252,249,65,155,89,30,13,142, +88,130,88,102,107,250,199,219,95,63,242,200,35,113,98,184,84,37,153,201, +0,210,43,238,190,81,214,50,204,0,204,219,116,195,60,128,47,154,70,140,37, +155,22,151,188,247,232,163,143,222,254,147,159,33,171,39,8,16,63,29,125, +210,39,113,23,92,246,226,157,87,253,253,211,221,205,187,63,104,182,65,225, +188,249,117,197,218,153,138,204,213,205,215,221,253,20,0,124,61,226,165, +25,113,161,65,236,19,10,40,190,246,171,247,62,167,51,84,109,221,35,188, +72,148,194,24,16,18,68,102,83,114,169,166,39,23,100,18,17,198,24,48,48, +12,49,181,26,30,17,56,46,80,115,76,45,205,230,153,76,0,87,170,146,36,44, +30,224,222,94,202,181,165,92,147,227,147,67,231,251,191,122,171,151,88, +51,46,92,111,203,185,199,150,115,175,45,247,126,63,33,115,101,92,75,228, +110,16,137,47,46,0,90,184,88,116,236,189,231,0,192,222,213,133,1,32,16, +112,203,233,128,68,34,18,186,234,155,45,193,72,208,237,118,255,249,207, +175,142,215,98,222,89,0,0,1,0,73,68,65,84,186,38,32,193,247,208,100,203, +158,109,169,100,3,192,138,202,140,4,61,27,106,76,12,95,127,219,67,15,233, +245,122,70,168,41,212,13,255,243,245,237,209,8,26,155,116,41,4,94,153,186, +0,0,126,178,94,235,213,95,242,226,115,91,94,223,117,236,163,231,158,130, +20,109,145,106,233,199,227,47,49,138,0,96,253,117,215,93,187,97,101,153, +201,152,169,23,43,204,121,58,181,68,228,15,199,171,62,72,3,119,3,54,87, +70,147,76,64,72,39,79,8,33,32,40,134,225,241,104,18,16,34,73,146,68,192, +178,236,76,21,247,93,193,108,158,201,36,43,59,169,153,114,25,202,189,184, +142,107,90,58,186,78,57,44,35,2,223,100,160,199,41,215,25,221,218,27,216, +104,36,232,115,103,47,174,22,232,150,241,100,38,46,79,87,95,119,45,171, +220,247,196,19,79,56,162,138,37,149,10,16,8,164,52,21,140,197,64,152,117, +236,80,231,242,7,114,117,36,57,62,208,184,171,185,160,154,30,29,232,221, +121,245,45,143,67,200,114,100,215,254,189,109,131,24,155,31,126,248,123, +73,125,220,57,69,159,0,0,1,0,73,68,65,84,113,106,137,30,122,232,33,0,80, +92,191,97,172,13,169,199,133,231,155,187,139,214,101,157,62,217,135,80, +25,248,188,170,194,82,70,206,151,140,29,117,41,124,143,252,232,118,215, +164,245,63,239,126,113,177,142,253,3,32,202,230,150,157,27,78,112,105,197, +213,87,3,128,197,19,137,249,58,237,17,164,227,133,153,88,148,247,237,152, +156,250,200,77,67,211,4,6,160,41,132,89,96,49,70,115,108,165,219,140,212, +112,85,75,106,193,146,194,220,127,224,48,215,61,216,78,219,122,12,213,203, +51,139,42,148,230,124,97,200,37,12,187,133,1,187,149,170,161,37,70,145, +72,146,192,131,16,98,52,69,27,110,188,79,38,147,229,84,87,16,0,192,55,46, +95,110,188,233,199,191,122,242,201,39,151,148,81,141,31,236,176,178,124, +2,77,156,110,31,62,190,237,181,118,107,248,247,191,255,125,151,29,144,174, +166,127,124,124,162,243,148,243,155,76,218,68,140,34,127,205,29,87,173, +46,43,202,10,184,187,212,5,43,163,109,59,30,125,244,81,44,20,57,122,187, +194,110,71,182,53,58,169,136,22,218,161,0,0,1,0,73,68,65,84,42,17,149,124, +255,165,103,127,241,215,175,186,142,189,242,220,237,15,60,128,49,198,161, +137,195,167,134,146,74,157,148,75,130,0,189,132,214,150,22,156,27,243,98, +207,72,152,150,67,58,72,234,160,83,251,184,84,228,23,222,38,47,11,158,11, +144,230,132,137,36,245,147,8,167,170,98,184,80,242,201,201,73,175,215,171, +80,36,175,56,235,59,254,133,70,136,132,230,18,158,210,64,50,2,138,166,25, +145,68,40,85,142,28,249,212,57,58,160,47,91,144,74,208,210,165,75,151,86, +228,139,105,90,107,200,41,95,80,246,219,159,255,118,223,254,93,15,222,186, +224,139,15,90,111,248,205,99,93,167,247,3,210,242,189,19,235,126,252,199, +246,47,254,221,67,229,130,195,243,224,83,191,184,98,137,240,195,78,170, +216,32,161,56,185,115,41,73,109,12,34,5,127,226,252,215,205,188,133,75, +77,204,100,144,109,247,138,34,167,118,126,178,175,35,168,144,235,84,66, +83,126,85,69,22,251,254,158,230,64,227,185,121,91,30,249,100,207,49,113, +224,76,243,144,118,94,185,62,201,62,131,233,121,173,58,135,0,0,1,0,73,68, +65,84,234,57,145,17,201,136,14,110,127,183,171,125,36,107,222,18,131,132, +199,101,96,90,195,8,165,115,149,113,95,93,140,193,24,230,222,61,184,179, +221,128,195,181,109,33,165,131,231,22,207,110,183,243,120,60,183,219,61, +58,58,170,209,104,18,168,70,26,119,41,132,20,45,81,1,34,112,52,228,176, +140,180,239,221,54,114,174,49,191,178,46,52,57,168,169,94,61,83,103,164, +208,232,244,26,17,65,73,236,189,29,34,149,106,16,76,90,116,246,213,183, +63,253,213,29,43,247,117,135,120,124,221,154,75,107,47,175,148,127,126, +120,136,182,52,205,91,183,1,79,156,253,236,221,206,48,21,46,204,50,38,97, +75,91,205,0,64,242,37,70,133,140,144,154,106,106,170,22,45,90,52,104,13, +46,46,213,216,65,63,32,82,150,49,97,86,145,89,110,12,181,156,67,75,230, +73,218,142,183,94,187,178,204,92,108,250,195,31,254,161,175,187,52,87,121, +113,201,98,146,84,77,207,154,228,71,189,148,44,163,172,40,139,71,0,151, +129,73,173,49,137,84,152,161,143,187,152,5,65,64,138,32,21,85,43,255,0, +0,1,0,73,68,65,84,126,231,144,254,212,155,153,108,163,4,36,113,100,124, +124,60,47,47,207,239,247,99,140,109,54,155,223,239,143,223,103,58,218,248, +165,140,8,94,184,75,41,48,218,217,188,247,221,23,91,91,206,20,47,88,97, +44,174,158,244,4,101,106,29,204,204,20,132,80,245,162,69,117,117,117,19, +1,178,166,64,102,119,225,47,143,214,19,76,6,131,161,118,89,173,32,50,222, +212,56,129,67,238,237,123,246,236,57,54,192,32,106,188,101,239,248,232, +208,80,76,23,60,187,83,151,95,17,47,200,217,134,102,173,81,151,90,37,0, +132,72,101,206,144,49,241,199,226,76,173,38,187,104,193,130,114,137,80, +81,152,169,30,245,82,21,198,224,209,211,174,220,229,139,231,169,92,109, +94,115,174,33,24,230,47,249,222,138,76,0,56,248,206,71,116,6,37,21,76,155, +69,78,26,219,35,132,212,198,44,179,89,207,35,191,97,37,197,76,101,135,153, +39,21,102,97,218,119,5,51,238,8,152,201,66,226,246,116,9,136,175,44,142, +111,47,25,30,30,230,241,120,29,29,29,0,128,32,138,34,78,236,117,71,22,184, +0,0,1,0,73,68,65,84,27,143,143,52,112,216,231,11,179,185,243,150,183,55, +30,207,44,173,113,53,238,212,100,21,48,12,51,11,83,226,57,174,42,209,1, +232,238,187,111,197,7,159,127,94,156,153,191,115,231,81,128,11,231,7,42, +10,141,2,159,88,85,108,206,38,122,63,29,234,243,9,22,210,246,61,31,31,252, +226,224,217,156,213,63,184,254,210,66,22,227,0,128,48,157,211,53,169,32, +241,134,177,170,218,132,177,17,203,92,32,144,2,234,58,183,227,173,237,54, +7,160,96,121,89,81,226,43,173,136,55,108,241,53,188,242,215,162,251,111, +47,17,41,18,159,115,81,113,89,135,166,15,92,82,19,204,164,71,103,18,184, +185,38,70,144,118,71,0,76,87,179,73,241,105,251,248,96,48,152,40,118,70, +70,6,66,40,30,19,32,98,68,196,1,254,177,169,221,34,33,183,66,64,138,130, +214,194,202,117,108,192,30,179,15,56,172,99,122,115,246,44,13,52,137,215, +215,111,218,4,0,24,35,49,39,201,221,15,62,168,2,8,186,206,190,124,168,120, +221,173,183,149,81,167,143,26,87,133,240,232,254,16,12,197,86,0,0,1,0,73, +68,65,84,19,7,47,175,10,188,115,176,245,215,117,213,0,105,59,160,52,25, +197,195,133,153,114,140,241,218,75,22,138,236,10,111,91,63,79,147,43,19, +154,195,142,222,120,2,109,14,191,177,63,102,204,138,14,117,91,6,90,235, +21,234,241,133,151,223,129,49,70,200,213,123,242,244,161,246,161,31,252, +224,7,105,91,224,76,194,145,86,164,82,29,46,115,25,102,91,11,0,51,52,220, +212,244,66,161,16,56,45,9,0,204,102,51,66,200,70,98,34,228,64,65,102,234, +251,144,59,20,99,123,70,173,149,182,129,152,28,88,54,22,112,219,16,202, +153,194,239,179,156,56,121,114,225,234,43,83,185,201,181,216,48,198,85, +85,69,0,0,226,252,13,27,212,137,89,179,248,9,197,6,57,192,100,64,100,206, +191,237,134,155,62,249,223,63,52,90,162,195,29,157,56,60,121,242,243,207, +62,168,183,60,243,204,255,36,201,19,226,140,79,185,5,140,39,152,87,145, +15,144,95,188,18,206,90,130,42,41,127,178,229,127,142,15,86,47,202,20,74, +52,242,129,67,125,57,37,197,129,206,214,128,176,165,134,254,80,0,0,1,0, +73,68,65,84,108,245,170,154,109,7,122,77,147,39,156,250,66,246,220,132, +57,71,189,253,72,235,21,11,76,64,43,146,112,114,25,56,147,66,226,2,226, +56,243,190,49,241,119,11,51,238,8,192,23,0,210,169,40,238,35,198,216,235, +245,38,69,198,63,17,74,101,20,235,32,130,22,8,140,17,238,118,8,187,252, +97,188,164,54,103,114,172,7,252,22,18,5,56,56,131,13,187,118,188,249,225, +238,87,94,121,229,229,29,135,135,207,119,181,245,76,70,82,52,226,52,50, +24,109,89,89,65,121,121,129,234,98,214,0,0,32,150,56,219,27,20,34,208,4, +200,206,33,241,186,234,220,206,147,77,173,77,174,108,3,239,173,221,103, +1,166,174,17,199,33,91,99,253,105,63,0,66,200,218,177,159,107,62,167,66, +185,158,15,0,151,94,177,88,202,16,0,192,168,117,204,176,51,32,43,23,120, +71,201,44,3,35,48,184,154,190,156,20,229,44,88,48,207,23,244,103,86,174, +241,59,61,40,226,62,119,222,22,157,62,95,249,109,12,237,84,62,163,233,72, +230,218,248,63,14,51,158,196,5,28,77,236,35,55,221,0,0,1,0,73,68,65,84, +144,8,207,196,8,137,100,202,51,196,29,211,1,64,252,46,37,94,232,60,237, +235,36,35,86,41,53,81,85,172,208,75,66,243,75,148,16,24,35,81,24,18,187, +109,130,195,251,15,118,149,111,126,248,228,201,147,135,247,31,107,63,113, +248,192,201,161,16,186,8,92,177,78,111,117,202,202,127,252,248,157,60,140, +129,95,181,105,17,107,113,65,191,52,26,113,250,0,112,95,211,161,47,190, +58,112,166,229,228,185,83,103,122,206,124,121,230,189,151,30,122,232,33, +20,177,53,159,104,10,96,12,0,95,29,217,247,250,142,189,169,124,72,130,165, +27,238,44,213,241,49,198,192,211,92,126,197,10,185,217,232,166,249,218, +12,37,128,155,10,182,132,50,74,148,60,208,102,70,79,53,212,223,184,105, +201,196,96,87,255,176,107,106,101,86,196,213,211,103,79,50,21,18,225,36, +117,8,233,68,39,213,8,75,37,239,187,133,25,79,44,133,20,175,198,76,9,0, +96,96,96,64,175,215,167,118,25,164,170,208,217,181,91,16,238,71,16,35,112, +64,36,228,21,102,9,84,226,24,224,248,13,17,1,63,6,0,0,1,0,73,68,65,84,56, +188,196,13,56,224,108,63,217,202,172,191,101,229,109,155,55,173,48,43,219, +199,135,253,96,168,174,48,240,166,103,151,118,120,28,135,120,36,15,33,140, +177,169,108,193,211,247,220,158,187,234,206,162,133,57,174,206,118,16,134, +157,164,113,233,138,69,219,222,60,172,206,22,244,244,88,53,89,217,182,96, +224,240,135,175,29,183,224,203,22,153,62,126,191,167,159,39,90,63,175,152, +139,106,214,82,243,180,153,106,33,143,228,11,69,42,189,200,121,98,247,164, +157,137,133,164,166,76,186,168,124,153,192,221,209,100,193,21,121,186,247, +182,237,112,122,70,219,27,78,151,150,151,5,34,132,80,194,16,211,249,6,233, +20,85,146,127,1,82,132,105,110,118,112,105,122,183,212,161,77,82,27,74, +13,43,20,138,180,35,35,62,95,72,215,220,231,150,215,77,173,42,137,218,200, +168,157,140,217,201,136,149,12,95,92,85,2,0,88,32,244,18,6,25,3,0,160,46, +43,11,199,17,251,135,96,250,228,249,44,194,157,196,247,191,190,241,198, +150,205,153,181,89,82,87,56,88,144,175,211,197,15,113,164,63,0,0,1,0,73, +68,65,84,28,225,112,248,200,201,151,204,128,120,165,107,239,189,247,94, +157,66,42,83,25,139,10,115,90,91,26,189,242,226,205,235,214,38,161,74,148, +157,219,209,115,65,206,131,226,226,18,61,159,96,164,102,69,213,70,254,88, +219,137,142,161,126,139,175,160,178,174,249,240,89,63,192,252,197,155,54, +46,47,231,169,202,143,53,116,56,109,19,40,133,129,73,156,76,26,214,112, +223,206,125,157,52,219,73,92,220,240,236,237,32,177,35,0,166,215,40,0,200, +203,174,158,100,180,228,254,75,16,0,96,23,0,0,6,192,128,0,51,194,124,146, +47,156,66,33,52,243,216,145,112,24,1,15,3,128,22,192,13,206,246,29,187, +154,122,97,146,205,126,226,137,155,82,51,229,246,164,92,51,153,195,229, +168,117,223,231,29,78,184,105,209,166,213,35,254,183,143,158,102,165,57, +151,20,201,207,15,0,66,168,166,48,171,169,108,229,149,27,86,142,239,125, +73,93,123,89,137,81,212,182,253,245,191,125,126,236,165,151,94,74,104,133, +36,14,36,101,20,143,231,97,198,80,177,0,249,32,162,142,184,24,113,158,1, +94,0,0,1,0,73,68,65,84,197,161,207,182,30,97,68,117,58,83,226,170,104,181, +78,183,164,8,246,213,143,0,128,107,178,101,201,202,205,73,69,128,148,182, +145,246,145,75,192,76,138,249,59,132,25,117,82,18,164,53,77,18,97,141,70, +195,85,200,92,131,128,166,105,169,121,94,184,240,78,103,198,141,20,10,81, +40,72,65,144,194,46,28,243,211,114,83,252,244,59,140,49,66,154,224,249, +19,123,185,103,88,5,199,142,214,79,180,141,5,92,231,143,58,0,252,131,39, +126,245,171,95,165,14,140,83,205,38,142,121,167,116,143,13,47,88,184,132, +207,215,45,185,249,71,47,188,240,66,115,231,160,174,98,157,179,249,203, +23,94,120,1,0,144,59,16,2,208,11,34,106,165,84,73,187,143,158,105,95,182, +108,217,243,239,239,111,252,244,37,72,129,89,204,68,140,177,94,4,230,146, +146,242,92,125,69,73,142,206,148,51,204,23,139,120,138,168,55,196,61,36, +218,122,254,76,222,130,205,135,79,183,227,168,175,255,204,9,46,3,67,238, +49,72,81,54,73,138,144,75,192,92,19,35,152,101,182,4,210,53,250,116,228, +67,231,0,0,1,0,73,68,65,84,153,160,171,171,43,126,37,119,18,6,175,195,230, +115,217,134,142,237,244,40,87,184,233,98,154,7,1,121,77,80,94,195,122,250, +189,250,245,40,111,179,50,179,42,193,160,192,88,253,87,251,247,94,177,233, +114,123,87,215,200,232,160,195,27,117,96,237,173,143,254,236,234,26,223, +174,81,100,219,241,245,57,146,58,216,104,89,92,173,162,169,169,211,242, +218,247,190,255,234,203,111,47,189,228,146,84,242,226,49,134,202,249,213, +69,6,222,133,74,218,184,178,134,71,75,34,131,109,199,218,123,243,23,94, +26,109,59,244,149,53,178,88,29,220,63,105,88,41,59,119,194,53,127,203,45, +235,60,254,254,175,190,24,223,254,222,191,173,76,113,85,129,58,173,129, +146,20,195,213,16,134,236,130,188,188,44,196,99,244,42,69,203,129,15,71, +66,81,129,192,96,86,67,255,136,7,241,229,249,249,6,247,112,191,215,61,110, +139,106,207,181,55,70,5,106,149,132,1,128,137,145,145,193,81,135,68,165, +162,9,196,69,155,214,132,250,198,234,248,78,224,155,111,121,159,137,104, +46,139,13,6,67,215,231,183,144,0,0,1,0,73,68,65,84,218,183,182,238,211, +78,203,48,105,233,244,76,14,43,180,6,123,198,61,56,26,9,250,189,153,243, +171,121,134,181,140,194,204,173,131,53,215,93,203,42,247,62,241,196,19, +246,168,98,105,165,2,4,2,153,237,184,73,1,194,152,190,117,235,105,237,217, +238,204,171,31,28,218,191,163,225,176,136,178,13,125,220,48,249,204,51, +79,116,182,156,237,181,198,30,125,244,209,88,76,253,204,51,143,204,66,33, +55,188,234,7,15,174,196,184,201,10,243,175,168,107,56,56,57,94,146,97,63, +221,30,89,154,17,118,159,71,168,230,178,60,230,108,89,221,237,223,123,224, +245,191,252,177,69,182,164,167,243,232,238,227,253,47,190,248,98,90,157, +148,86,85,3,64,121,174,6,99,92,189,176,204,77,169,77,122,25,6,87,124,35, +12,32,36,160,121,190,88,140,81,200,23,148,150,183,244,7,193,32,5,0,127, +152,71,17,1,139,59,148,45,79,115,227,214,76,18,60,83,221,125,39,144,190, +119,251,54,132,114,59,178,177,177,177,196,183,220,52,158,129,179,200,114, +206,188,96,109,86,110,161,58,54,174,194,238,0,0,1,0,73,68,65,84,35,87,24, +116,8,67,78,129,119,220,33,89,197,87,100,138,197,82,46,30,70,91,188,241, +166,7,164,82,105,94,77,37,9,24,248,198,21,171,51,7,109,224,181,12,146,86, +186,234,214,43,80,243,206,7,30,248,222,232,137,3,237,237,222,76,45,241, +214,158,54,36,203,94,124,213,15,244,122,125,102,166,97,224,194,233,234, +73,110,176,212,226,196,31,107,117,72,85,178,225,137,123,111,10,41,138,69, +238,78,27,147,75,13,126,253,204,51,207,0,95,224,27,236,209,73,113,174,29, +159,61,241,121,147,163,252,63,79,221,118,202,130,188,231,15,78,21,48,48, +92,223,152,188,105,46,41,235,120,238,249,85,43,231,149,151,235,213,34,160, +101,197,197,89,137,100,100,44,22,246,5,129,179,19,65,174,164,50,77,138, +88,108,218,168,37,97,233,39,217,106,115,80,140,96,118,139,251,219,143,60, +245,122,253,216,216,88,170,102,242,185,236,70,33,65,10,132,98,165,1,0,16, +69,3,32,145,76,209,125,232,3,183,46,187,114,243,93,9,228,137,79,126,249, +203,95,2,64,255,185,179,46,104,186,92,206,0,0,1,0,73,68,65,84,164,45,205, +44,188,255,190,159,68,93,33,227,154,141,72,87,122,205,21,188,127,62,247, +101,86,161,240,171,109,71,213,133,180,58,156,89,194,63,247,217,251,187, +62,217,253,33,0,140,95,184,224,10,33,4,129,17,204,55,114,21,94,210,208, +146,91,156,82,93,70,97,190,173,109,20,150,46,94,244,241,137,174,247,234, +173,34,203,1,187,255,102,139,4,24,101,81,145,182,0,4,161,119,94,125,183, +108,176,173,158,221,150,87,187,241,137,205,186,246,30,180,184,246,98,111, +206,101,93,146,37,55,213,79,81,34,163,81,4,128,226,236,214,107,21,157,29, +231,32,191,60,241,161,197,29,242,13,56,115,77,216,235,98,220,46,151,49, +51,15,210,245,6,115,182,107,131,111,227,79,154,41,134,107,34,244,244,244, +16,4,17,137,68,38,39,39,229,114,121,130,137,35,141,187,20,66,154,150,170, +17,34,216,104,208,101,155,232,58,250,229,120,111,91,118,94,81,96,124,64, +91,179,6,102,240,121,202,213,90,189,90,68,210,18,239,88,191,161,120,113, +201,90,189,243,163,183,94,222,125,212,236,47,120,20,224,0,0,1,0,73,68,65, +84,241,132,180,66,16,153,106,235,170,63,125,183,62,175,70,141,105,211,182, +109,91,63,57,57,190,128,236,250,104,223,224,252,218,66,140,49,248,251,246, +236,233,49,22,101,242,82,86,52,36,194,220,28,117,34,242,63,123,206,110, +185,229,198,213,171,87,159,238,156,92,81,169,122,245,205,237,99,82,99,190, +152,37,68,153,85,230,88,107,71,108,65,149,208,180,226,150,75,12,196,224, +224,241,87,223,220,161,173,89,157,173,76,179,22,50,73,112,185,49,82,169, +8,97,76,209,180,76,165,162,121,168,181,189,19,139,244,38,181,8,99,60,110, +155,200,85,138,70,108,193,8,142,178,164,210,106,25,20,136,197,110,135,83, +40,18,194,244,102,192,109,15,115,74,164,190,213,93,74,48,125,230,11,166, +55,56,0,136,68,34,185,185,185,54,155,205,235,245,134,66,161,248,93,74,0, +112,225,46,37,49,32,132,35,129,145,246,211,123,223,250,71,75,99,67,233, +178,245,134,130,114,71,32,38,85,105,210,102,151,128,138,186,186,218,218, +124,189,74,170,226,241,65,162,110,242,19,127,124,236,142,211,198,186,185, +116,0,0,1,0,73,68,65,84,231,162,15,253,248,102,130,166,69,52,232,202,47, +205,212,80,191,126,248,78,167,189,51,208,208,85,180,48,107,215,139,31,143, +6,7,206,156,114,84,174,170,21,164,84,109,90,251,79,164,206,118,219,173, +229,249,217,8,161,170,124,147,54,175,252,236,177,3,75,86,93,41,180,247, +5,69,153,149,230,216,177,70,103,225,170,69,205,59,118,33,77,113,69,165, +38,194,91,112,205,242,76,0,56,242,225,167,230,210,162,111,180,159,184,165, +227,11,133,81,175,245,124,79,167,88,32,8,138,13,102,133,0,33,228,179,13, +27,50,179,135,251,6,101,106,25,197,136,178,244,194,145,97,123,148,37,194, +81,130,207,103,9,130,2,0,192,177,104,20,147,36,1,156,246,48,119,224,155, +207,42,137,195,44,141,0,33,100,183,219,1,32,43,43,171,188,188,60,20,10, +69,163,209,190,190,190,11,119,41,57,176,111,156,245,78,176,94,43,27,246, +121,66,172,161,180,174,237,228,33,90,44,113,156,222,25,10,5,147,178,75, +152,26,92,127,160,20,196,153,11,87,223,118,219,109,47,63,251,40,230,155, +37,55,68,88,0,0,1,0,73,68,65,84,22,74,207,109,217,178,5,228,2,158,119,228, +244,87,219,110,191,253,118,0,200,155,255,189,53,155,148,143,255,237,45, +71,65,245,202,133,139,26,14,188,242,187,191,191,100,153,28,249,240,213, +87,33,165,106,185,45,59,14,55,92,182,34,145,0,99,252,208,147,79,110,92, +154,93,92,59,175,166,72,131,248,6,0,111,231,158,143,55,47,87,159,216,119, +130,228,24,56,26,17,111,204,217,179,243,31,255,246,67,100,124,112,104,168, +171,101,38,102,38,24,136,16,226,73,77,243,151,174,31,119,137,170,115,167, +166,120,141,122,83,107,123,183,92,163,156,74,79,243,120,108,140,39,16,105, +148,148,199,106,183,89,173,94,127,4,0,205,205,91,148,226,240,205,43,56, +147,172,215,120,100,146,72,197,125,220,241,112,126,126,190,201,100,138, +70,163,23,239,82,242,143,225,248,117,74,33,143,140,79,168,8,127,118,73, +25,235,119,196,38,123,29,214,100,83,157,219,251,36,245,74,137,192,165,247, +62,246,202,43,175,28,109,234,206,200,53,73,99,150,23,95,124,241,133,23, +222,5,240,78,244,243,255,180,119,191,0,0,1,0,73,68,65,84,222,221,127,94, +145,157,143,1,234,86,111,249,159,123,86,54,125,126,240,232,201,147,95,30, +108,183,121,172,71,246,93,156,89,227,90,51,169,37,74,84,124,65,101,117, +121,158,10,248,218,85,43,107,171,139,11,223,61,216,156,93,153,53,17,134, +176,51,16,151,114,77,38,51,50,238,151,152,99,195,62,95,219,201,174,201, +161,182,49,119,196,54,208,135,49,238,174,223,195,101,81,82,175,132,49,94, +179,166,86,112,225,45,95,170,17,139,197,90,147,97,108,204,50,62,210,143, +35,145,24,77,3,0,176,152,37,249,98,149,38,22,246,135,130,254,24,11,177, +232,28,189,41,240,155,111,47,229,246,98,104,186,123,41,193,125,183,219, +157,36,91,249,249,249,0,208,114,4,19,97,7,10,48,24,3,32,128,144,43,198, +66,115,75,91,213,146,229,49,175,150,197,49,191,219,9,156,190,242,212,129, +207,23,172,190,130,219,117,206,100,245,99,140,95,122,234,78,132,208,226, +141,119,62,248,224,131,4,97,108,172,255,234,216,126,119,93,134,204,222, +51,130,244,128,0,32,224,31,217,117,76,182,146,143,87,80,0,0,1,0,73,68,65, +84,184,228,139,29,123,73,148,255,193,139,219,236,54,111,70,105,65,109,89, +105,114,7,23,182,97,90,57,75,118,243,171,242,17,42,144,183,245,207,91,82, +43,229,187,156,29,191,107,24,174,172,51,11,197,106,121,111,75,44,75,81, +56,218,59,238,19,154,151,45,173,248,234,244,176,122,226,140,6,123,123,135, +149,71,94,123,77,81,184,112,243,124,13,48,154,4,51,83,11,18,143,207,201, +201,193,24,203,248,252,24,37,236,235,155,148,25,148,145,248,221,220,108, +152,34,17,133,129,102,152,96,48,18,102,49,73,135,72,154,38,230,88,7,247, +13,235,147,226,192,45,63,186,48,45,207,229,187,68,34,73,82,93,241,0,95, +36,38,189,46,20,34,226,130,4,97,143,55,204,230,20,102,119,180,52,153,205, +26,2,34,128,99,23,190,10,54,125,242,214,214,175,27,207,246,77,68,84,121, +247,92,181,50,169,27,74,50,212,184,42,234,239,127,255,59,0,28,216,245,113, +206,250,121,11,64,186,125,247,1,231,218,171,192,230,11,50,124,167,44,228, +28,25,137,90,253,39,78,32,177,177,250,126,68,250,7,0,0,1,0,73,68,65,84, +68,219,136,101,176,33,52,86,93,223,50,240,211,159,254,244,98,117,6,70,218, +218,38,11,106,138,152,116,107,142,19,153,222,123,239,189,0,0,192,95,117, +249,2,9,67,2,0,79,169,29,238,111,208,215,205,143,246,52,80,121,107,120, +124,153,179,229,37,94,217,162,144,157,240,187,219,239,216,114,125,95,159, +199,51,222,59,26,37,138,114,85,73,13,50,173,186,53,154,140,81,82,20,240, +120,101,34,81,152,2,140,72,161,144,138,197,32,134,96,106,221,41,194,136, +36,97,202,61,53,135,32,253,57,147,179,8,59,183,82,19,145,126,191,63,109, +79,36,53,22,82,172,147,138,78,18,33,43,10,141,67,196,5,8,114,51,36,69,121, +106,236,183,16,16,74,116,252,56,56,178,119,255,185,242,171,30,62,113,226, +196,209,3,245,169,244,204,68,88,130,140,85,235,175,217,176,105,209,130, +229,203,234,22,102,99,190,33,95,62,244,242,167,103,36,66,217,61,143,255, +73,102,204,175,44,212,232,11,106,111,251,233,253,42,54,242,254,199,95,77, +156,63,213,229,64,193,177,214,63,254,241,33,60,53,178,0,0,1,0,73,68,65, +84,143,0,128,0,118,111,63,114,122,255,167,207,62,251,108,146,12,165,29, +10,44,186,236,214,98,45,3,0,152,86,49,35,110,185,73,207,248,199,213,122, +25,128,27,5,206,69,181,217,213,21,165,166,28,65,231,4,202,201,209,71,66, +129,227,39,142,159,235,29,65,8,65,216,145,196,162,36,228,98,153,82,38,226, +25,12,42,138,160,133,2,26,33,130,39,146,57,109,147,17,32,227,85,69,16,100, +124,219,228,156,82,72,48,203,216,109,150,241,72,106,100,234,22,37,0,192, +24,199,8,38,218,254,14,131,124,128,89,2,251,41,146,212,40,121,89,122,198, +160,83,144,129,97,127,140,140,175,42,193,24,131,171,253,212,89,102,221, +247,87,223,182,121,211,138,76,85,72,163,225,207,48,99,58,11,85,8,33,224, +43,138,43,243,5,0,42,93,184,111,82,98,98,44,239,127,184,247,185,231,30, +47,210,250,143,156,101,215,44,55,247,118,12,248,20,11,126,115,223,138,127, +158,192,243,244,190,99,167,218,143,30,237,204,171,48,183,53,142,88,250, +78,15,251,163,205,13,13,250,210,165,74,214,89,121,130,0,0,1,0,73,68,65, +84,1,36,41,167,212,142,15,99,140,16,79,46,150,152,115,84,221,231,218,242, +171,11,39,235,119,187,124,146,152,95,88,89,166,55,229,148,29,173,63,212, +107,11,87,230,170,235,27,186,81,208,193,80,49,123,128,114,184,162,10,153, +32,77,73,102,226,51,34,216,88,148,207,23,208,36,68,98,136,68,44,205,99, +200,57,182,69,9,102,90,51,137,166,123,216,82,223,38,153,195,161,80,40,41, +89,60,165,80,83,16,208,46,2,28,164,176,147,98,157,10,161,191,166,128,103, +18,91,233,64,55,25,153,160,136,8,34,136,41,101,195,23,120,8,189,140,15, +8,33,117,105,105,87,123,235,254,157,219,182,190,252,254,76,90,33,65,88, +18,157,137,71,117,233,166,251,175,191,172,242,234,219,42,51,101,143,254, +239,139,187,90,45,241,13,4,8,32,59,55,27,241,5,19,157,253,72,169,17,251, +253,120,178,125,119,167,29,0,129,170,244,241,167,159,246,77,118,126,244, +225,30,248,166,249,249,68,76,97,93,158,148,70,197,117,203,180,12,41,209, +21,40,171,46,227,217,186,92,94,107,255,152,193,57,169,194,0,0,1,0,73,68, +65,84,183,202,64,142,53,245,6,0,202,170,87,100,43,121,45,103,187,130,94, +155,136,137,14,245,15,244,116,158,153,137,195,73,145,24,99,137,84,202,240, +16,198,152,5,68,209,116,36,28,137,95,134,158,250,213,119,8,223,246,172, +18,152,97,101,82,188,166,227,183,151,38,213,37,0,240,24,190,176,238,199, +19,250,171,41,236,161,176,135,140,57,121,177,81,10,123,200,152,131,138, +217,121,60,146,98,132,83,18,41,54,243,112,48,124,225,152,80,231,161,109, +31,126,244,213,144,51,230,12,141,215,127,240,74,90,210,211,154,50,73,245, +157,109,202,187,235,145,71,244,26,149,84,153,183,110,85,46,96,12,128,17, +2,12,160,13,77,156,252,120,167,79,110,114,186,7,206,116,76,205,126,96,132, +158,250,205,111,217,193,230,17,15,7,75,48,253,92,16,55,50,47,47,159,7,140, +166,176,178,184,44,115,253,150,235,78,119,143,31,253,252,205,172,194,210, +2,165,56,190,108,18,241,21,66,109,105,73,182,162,191,127,164,173,185,99, +194,229,59,63,60,129,99,129,84,154,211,86,4,0,225,243,253,173,84,90,0,0, +1,0,73,68,65,84,6,5,12,77,144,20,73,18,73,150,220,92,128,52,118,82,170, +64,196,97,166,2,35,132,98,177,88,218,142,31,99,44,205,94,44,93,242,75,130, +96,253,198,203,24,228,160,80,136,66,33,10,123,48,27,160,21,70,153,74,127, +33,47,109,232,252,201,125,39,7,47,124,200,42,242,215,124,255,254,91,122, +15,52,156,61,107,123,236,177,191,188,183,239,92,96,140,227,173,9,142,113, +137,156,197,126,2,128,7,183,124,111,105,69,89,77,153,142,143,80,205,178, +101,128,16,2,132,195,206,246,110,215,45,63,253,73,118,81,158,220,31,12, +197,211,99,140,4,166,106,141,178,245,252,196,71,47,253,110,10,85,208,122, +232,248,64,40,221,182,136,36,167,51,0,40,249,24,0,86,87,151,223,114,215, +125,91,183,126,57,33,147,243,25,117,196,27,2,0,185,114,106,91,55,79,162, +47,173,94,218,59,48,236,178,12,244,180,181,117,116,116,76,120,130,0,0,108, +24,0,198,198,38,210,50,95,44,147,198,109,37,138,162,230,218,6,92,152,73, +39,165,14,251,227,192,173,57,110,60,49,243,148,80,57,167,0,0,1,0,73,68, +65,84,174,80,138,162,88,90,17,92,248,252,136,246,94,143,126,131,219,116, +181,219,116,77,144,16,186,117,107,81,246,165,98,233,197,61,243,243,23,242, +235,223,255,27,0,216,187,186,64,154,105,202,45,84,139,97,232,240,254,189, +199,207,168,68,129,150,99,77,65,90,248,198,223,126,117,255,253,79,2,0,132, +109,7,119,31,243,167,115,159,206,212,6,16,66,60,128,156,226,226,69,229, +58,16,154,49,79,83,88,20,125,252,238,219,126,176,177,46,0,16,138,223,183, +131,16,198,88,16,2,219,121,139,46,35,231,39,63,249,245,155,123,218,71,58, +78,157,104,26,9,115,10,216,213,210,234,79,151,69,210,227,109,119,222,118, +237,165,149,20,37,246,12,125,109,137,10,19,41,4,50,181,128,7,90,1,101,117, +248,39,61,225,176,223,97,115,6,49,198,56,22,234,105,107,114,218,38,162, +120,90,107,76,10,164,125,252,206,33,253,250,164,89,204,76,110,178,68,216, +110,183,43,149,74,148,210,221,56,173,99,206,241,33,203,231,255,178,56,8, +49,201,250,51,174,240,137,107,157,116,169,196,144,189,55,223,6,0,0,1,0, +73,68,65,84,11,37,91,132,166,26,134,185,120,129,174,57,91,75,71,157,111, +125,248,249,231,13,3,42,157,32,140,12,85,21,134,182,19,135,236,140,198, +227,236,62,113,104,252,138,187,214,68,29,94,38,234,110,118,42,117,129,211, +135,234,173,197,203,106,133,28,209,239,58,250,149,202,156,11,51,244,209, +9,250,149,82,62,38,4,171,87,20,231,151,47,187,238,154,107,126,253,218,206, +53,149,85,67,67,54,97,116,176,173,119,96,97,77,205,151,123,15,50,18,179, +204,219,70,209,248,200,68,108,99,153,248,247,207,191,106,1,201,202,170, +252,56,182,211,135,14,233,202,202,4,233,6,149,105,217,85,92,61,63,219,164, +13,71,89,169,144,28,177,184,88,36,48,26,101,110,171,45,128,80,110,121,85, +142,134,231,242,83,74,153,0,0,156,1,97,150,129,246,96,129,144,78,211,200, +185,42,112,174,245,110,223,124,234,205,236,49,105,227,19,143,174,243,141, +238,115,39,204,139,214,133,157,19,60,185,54,16,112,176,177,40,184,108,222, +226,43,149,170,12,161,72,204,77,204,215,22,111,184,177,168,253,176,55,17, +150,0,0,1,0,73,68,65,84,153,103,20,89,85,84,116,170,155,19,243,144,169, +112,177,148,210,85,204,207,57,191,125,103,204,105,63,122,234,40,65,228, +95,157,175,105,216,247,251,14,228,89,103,52,69,99,62,123,76,114,231,247, +138,246,188,251,254,145,206,33,140,241,165,215,111,201,146,38,11,125,82, +51,72,228,251,191,191,252,37,198,216,239,7,89,40,244,225,193,19,255,141, +250,64,149,249,127,168,251,206,48,185,142,42,209,83,55,119,223,206,121, +186,39,231,168,25,105,36,89,193,146,101,201,65,178,101,227,64,176,193,216, +216,216,176,192,178,111,129,71,122,187,203,178,236,194,178,15,118,89,88, +96,3,182,193,44,6,27,27,28,101,91,209,178,114,28,105,164,25,77,206,185, +115,238,190,177,222,143,30,181,90,221,61,35,239,126,223,123,158,119,230, +251,230,171,174,91,183,78,213,169,83,39,221,10,22,199,240,225,238,150,161, +174,159,15,167,227,196,19,15,149,86,180,126,233,209,157,111,254,234,239, +247,95,72,254,248,199,127,155,219,247,162,138,181,144,110,0,80,238,212, +99,140,237,246,152,138,120,2,99,193,22,191,93,0,0,1,0,73,68,65,84,0,224, +84,133,103,1,178,171,24,84,133,82,66,51,33,74,99,82,147,74,44,157,138,91, +236,37,239,167,254,149,0,203,157,11,144,55,189,138,90,121,139,178,39,28, +54,155,205,133,18,126,240,240,75,54,86,230,43,90,57,71,37,165,213,17,88, +101,52,188,86,103,152,58,245,78,34,232,181,215,174,202,150,204,38,54,109, +218,180,177,181,70,207,176,46,79,137,203,202,235,213,217,174,183,94,255, +202,119,191,187,122,117,237,240,149,179,103,250,213,239,255,245,35,255, +251,103,239,126,252,177,109,65,191,227,139,95,222,217,251,111,175,156,156, +26,153,156,152,92,127,235,186,222,97,226,76,255,57,255,196,197,5,177,108, +227,170,114,184,209,100,200,77,52,53,85,84,181,174,223,189,123,247,179, +207,238,255,212,215,62,235,48,208,231,222,123,229,135,223,122,106,122,60, +188,113,83,213,180,175,116,93,59,107,32,121,66,13,61,119,202,95,141,103, +15,28,122,117,227,166,29,97,17,88,34,31,5,186,62,240,8,57,172,140,16,50, +155,141,22,179,6,1,200,178,82,90,97,239,29,158,73,234,232,114,233,0,0,1, +0,73,68,65,84,69,252,50,109,182,25,57,41,225,13,8,138,20,147,77,60,19,143, +70,85,146,20,36,149,166,8,242,234,89,128,69,189,138,21,2,197,13,183,60, +1,147,151,200,253,153,41,41,73,210,228,228,100,238,235,139,125,198,18,205, +178,56,21,81,211,81,53,29,75,38,19,195,103,223,29,62,127,196,237,116,40, +115,3,69,131,141,153,97,168,104,104,110,171,183,211,0,165,235,118,125,248, +201,79,124,250,211,159,126,252,175,158,105,234,168,69,122,233,183,175,238, +187,115,213,226,181,2,144,78,69,180,73,195,170,85,13,181,244,177,75,243, +18,130,31,254,235,191,254,244,39,63,140,92,62,54,23,191,190,181,225,145, +239,126,247,187,55,236,20,0,252,244,167,127,81,161,133,178,146,186,38,183, +250,204,139,111,246,121,227,192,218,165,112,74,76,76,236,127,245,224,229, +161,241,217,217,81,81,36,239,250,147,239,253,229,159,127,245,216,72,112, +162,247,196,158,61,123,242,170,66,75,135,81,178,63,75,202,74,176,36,10, +33,175,223,23,148,73,2,0,8,134,167,13,238,114,151,78,73,167,21,101,54,24, +102,0,0,1,0,73,68,65,84,68,154,109,46,33,30,139,39,146,201,120,44,153,150, +114,171,80,175,58,70,43,7,150,115,1,242,62,128,228,230,231,205,57,150,101, +25,134,153,158,158,238,237,237,205,45,73,128,130,148,164,154,12,168,201, +176,154,12,249,134,186,142,188,240,179,183,254,243,231,41,138,247,180,109, +244,78,142,228,34,202,66,118,24,48,198,192,90,27,54,221,246,204,51,207, +252,234,239,158,44,173,191,221,164,78,140,39,248,43,222,24,48,22,20,74, +10,12,163,211,91,124,163,163,179,97,230,248,161,190,140,231,142,248,234, +181,37,214,238,225,224,229,125,47,94,173,50,54,188,239,224,120,92,253,245, +219,167,81,177,239,33,133,128,16,122,248,139,255,59,74,58,239,189,227,86, +78,227,78,15,189,240,252,161,177,160,97,227,95,125,249,9,20,76,38,77,86, +59,15,127,241,231,187,6,206,142,6,102,6,7,7,7,207,92,158,82,146,129,75, +167,223,205,173,1,138,133,39,174,195,139,85,157,78,167,213,88,205,6,14, +0,72,78,31,243,207,134,5,117,33,148,164,40,138,36,64,207,209,178,32,198, +14,149,236,136,0,0,1,0,73,68,65,84,147,105,132,176,36,164,146,201,148,138, +85,0,188,242,174,156,124,31,235,147,242,84,91,209,97,152,159,159,175,170, +170,18,4,129,166,233,133,133,133,84,42,149,72,36,226,241,120,98,236,164, +1,162,36,195,1,32,44,165,194,11,115,151,46,156,55,85,181,200,201,88,205, +234,13,243,151,143,27,170,86,81,20,133,174,23,129,185,245,231,225,93,183, +117,247,182,205,155,67,97,181,179,179,45,116,250,205,189,1,165,140,140, +222,254,133,239,62,114,239,237,65,239,100,44,44,172,221,178,70,3,48,125, +184,107,65,21,166,79,92,62,112,244,192,88,202,178,170,92,221,255,236,201, +187,255,246,175,252,83,115,171,106,60,168,64,239,20,246,61,243,232,230, +155,110,106,111,46,167,0,144,216,159,214,182,70,135,222,234,25,25,43,49, +219,117,6,77,109,107,139,30,197,47,29,153,92,191,174,42,25,21,46,78,133, +43,81,248,200,233,43,243,73,84,81,102,36,137,107,139,224,206,28,121,165, +180,178,41,46,3,67,228,51,22,201,234,230,231,231,17,101,172,40,179,145, +0,0,4,142,122,19,248,18,189,175,0,0,1,0,73,68,65,84,130,172,161,169,132, +144,82,85,133,37,9,5,16,73,107,13,90,50,149,16,8,146,192,4,137,176,154, +185,10,247,191,49,222,255,247,96,201,51,221,96,9,173,92,148,244,201,100, +210,100,50,241,60,111,48,24,100,89,118,187,221,211,211,211,130,32,168,243, +23,12,138,159,160,104,0,0,41,25,241,121,231,134,251,221,37,206,138,182, +181,102,179,41,50,220,69,122,90,117,6,227,82,245,47,229,25,173,109,175, +162,1,44,182,68,239,4,177,233,142,29,255,241,15,63,59,117,242,208,23,31, +189,229,210,217,153,182,45,107,52,0,61,231,187,82,9,223,190,55,79,184,218, +171,102,167,227,117,236,212,47,127,246,251,99,254,248,95,63,249,64,110, +31,11,255,103,177,228,74,98,132,80,85,203,230,142,250,50,41,52,32,233,171, +46,13,135,42,248,192,59,239,158,92,95,107,62,183,144,14,244,14,250,129, +152,9,5,202,89,113,112,88,155,148,66,22,51,19,159,30,59,121,97,164,174, +174,18,32,117,182,47,214,123,230,132,96,169,40,53,178,133,4,116,58,157, +78,167,57,123,76,167,10,255,76,133,0,0,1,0,73,68,65,84,206,108,179,90,173, +20,75,197,66,97,146,162,84,160,56,29,131,16,195,209,72,144,9,173,150,145, +36,156,89,235,182,210,56,105,201,19,38,114,205,109,88,54,98,9,0,137,68, +34,91,216,233,116,2,64,83,83,83,99,99,35,73,98,66,137,160,180,23,82,94, +72,121,177,24,71,8,245,245,246,104,213,132,154,244,43,88,73,197,194,248, +42,0,64,215,177,189,133,141,201,53,87,115,31,217,154,239,249,242,99,247, +53,148,215,180,56,40,189,94,255,199,179,83,130,247,2,0,0,120,7,166,253, +4,139,181,181,213,131,211,211,167,246,29,19,57,94,95,83,222,209,80,253, +210,107,47,126,246,179,159,205,71,145,24,221,119,116,172,232,12,201,99, +169,237,15,126,241,145,143,124,228,158,157,183,174,238,92,95,91,90,250, +79,47,116,117,222,218,57,143,234,239,251,212,227,58,149,176,182,182,182, +183,235,239,191,239,214,192,224,149,225,43,211,233,232,66,88,4,148,152, +225,180,142,15,223,191,205,59,210,167,20,80,21,114,148,96,46,97,121,45, +111,53,91,74,60,30,134,211,241,28,84,139,103,59,0,0,1,0,73,68,65,84,7,0, +144,115,0,55,65,16,176,242,212,219,114,235,184,51,128,174,95,203,81,116, +18,167,211,105,163,209,88,104,65,71,70,142,233,146,131,8,169,24,99,36,39, +194,161,88,239,192,164,221,227,22,83,241,138,50,123,44,28,100,203,87,155, +23,29,93,241,242,91,47,60,255,246,113,175,207,119,110,42,214,81,87,246, +254,61,148,206,45,91,54,109,218,52,19,18,26,203,76,255,244,211,255,120, +231,205,83,173,219,239,114,212,155,34,179,100,85,189,125,213,170,206,186, +109,205,9,63,249,208,103,30,18,99,49,45,171,249,241,143,255,208,113,115, +173,81,99,0,128,153,209,97,3,237,125,245,88,122,205,26,15,5,48,125,233, +168,193,89,1,197,148,123,54,93,91,233,180,150,84,182,182,182,206,69,241, +246,117,173,189,239,253,199,201,115,221,245,110,179,163,161,222,83,91,119, +108,207,41,214,164,244,246,121,57,157,168,242,85,38,113,220,175,173,172, +112,153,66,147,189,186,146,58,142,44,226,57,22,253,73,144,4,77,211,90,142, +34,16,9,0,20,73,73,233,164,162,98,146,101,72,196,192,52,238,0,0,1,0,73, +68,65,84,4,248,106,52,120,229,192,141,247,187,229,241,77,209,96,70,36,18, +201,28,152,148,151,175,119,86,80,190,40,200,153,79,79,24,201,18,32,84,91, +97,182,57,204,56,229,35,145,148,93,85,130,196,185,247,142,12,52,221,253, +133,115,175,255,68,208,250,159,184,123,243,50,141,129,98,171,95,110,235, +108,197,184,229,236,240,60,195,56,110,187,227,38,172,68,6,158,251,205,206, +135,158,169,49,64,36,54,8,0,16,237,179,133,70,159,59,112,116,251,42,205, +207,223,60,193,45,184,190,252,181,91,186,143,31,73,182,149,32,48,200,190, +247,126,126,192,80,233,123,165,39,160,221,121,107,103,161,97,94,40,140, +63,186,107,19,0,108,221,190,117,212,143,46,12,204,87,142,93,220,119,112, +168,202,100,137,169,102,222,105,179,186,44,67,253,115,229,141,105,131,142, +3,160,73,158,15,39,100,11,75,21,37,96,97,142,70,171,197,87,23,33,113,12, +5,0,28,199,138,10,208,36,129,84,5,86,222,58,220,37,79,7,44,58,99,138,6, +99,0,160,112,73,73,6,52,165,107,165,203,88,163,113,133,74,156,0,0,1,0,73, +68,65,84,68,0,3,32,108,213,105,182,174,117,149,216,84,155,147,130,180,151, +204,169,2,199,231,105,107,235,182,77,213,79,108,255,231,224,192,64,24,32, +247,232,225,92,164,133,222,80,110,78,102,49,26,198,24,33,227,231,127,242, +244,159,61,246,168,88,177,241,199,95,191,13,16,0,99,62,248,214,224,151, +254,253,233,31,254,201,189,174,117,171,17,145,249,54,2,39,186,103,1,233, +230,134,122,15,191,51,209,209,232,60,255,211,231,59,54,118,186,240,236, +229,41,122,85,189,61,59,145,10,233,147,121,84,191,118,87,3,66,187,118,1, +0,172,221,8,63,253,197,111,254,116,251,246,87,247,141,220,118,91,103,239, +176,159,81,103,51,173,228,8,54,150,22,0,168,108,83,139,90,105,121,149,95, +55,84,44,71,1,168,138,132,87,222,37,184,240,254,163,0,176,236,186,128,204, +142,128,194,215,57,123,125,218,220,134,113,154,196,17,82,141,88,116,169, +206,70,174,196,152,38,68,63,33,250,8,66,202,154,141,136,211,196,145,83, +207,1,198,216,210,208,48,210,223,251,222,219,175,254,230,153,151,40,18, +212,251,0,0,1,0,73,68,65,84,10,209,21,245,3,242,130,55,217,50,255,242,235, +95,255,251,223,126,78,162,140,205,237,205,28,231,42,107,209,189,242,244, +79,254,229,91,79,100,246,119,195,162,229,135,0,184,100,36,24,10,46,36,69, +182,217,166,236,31,10,65,124,232,196,133,217,92,164,121,30,101,238,255, +220,230,253,233,83,143,0,99,170,225,166,127,249,203,95,178,122,214,232, +112,207,142,205,97,140,5,44,40,233,107,55,162,46,227,214,228,86,91,104, +155,34,68,200,146,12,43,47,56,185,228,250,36,40,136,36,45,229,60,35,132, +108,54,27,20,200,127,132,16,203,114,220,170,199,195,182,91,41,28,167,112, +130,84,34,132,26,33,113,132,146,3,148,28,228,88,76,177,87,215,124,241,110, +6,137,210,85,82,71,78,190,249,198,158,163,126,145,10,165,231,79,252,254, +153,188,150,100,32,75,229,172,245,86,40,57,50,160,231,28,27,183,111,228, +1,54,108,170,143,123,189,207,190,246,158,194,57,229,64,66,64,104,62,48, +159,41,83,189,110,235,253,15,255,143,141,85,250,170,155,182,206,93,222, +151,81,31,239,76,166,195,43,0,0,1,0,73,68,65,84,83,19,21,98,111,187,237, +67,159,250,212,167,22,194,105,213,84,42,71,188,8,41,106,50,73,105,216,101, +42,201,171,1,10,6,98,49,147,32,105,150,93,129,87,188,45,121,86,73,110,199, +10,59,153,7,94,175,119,169,74,244,85,55,179,107,254,140,32,20,146,80,72, +72,80,56,65,225,4,137,35,132,226,103,140,78,157,217,113,181,102,187,52, +126,225,248,133,153,171,84,195,150,154,173,31,126,244,190,137,163,221,35, +227,226,95,252,197,15,95,120,119,32,61,127,249,90,51,82,179,8,33,33,71, +245,20,21,27,121,77,178,181,124,232,187,223,253,46,56,214,220,189,161,147, +246,190,243,253,111,127,251,244,68,34,114,125,49,100,109,244,196,38,167, +227,0,16,24,120,247,165,239,127,243,155,207,189,222,85,216,181,60,40,116, +45,17,66,155,234,109,52,24,141,90,47,164,131,1,73,175,203,185,39,168,144, +182,69,101,237,82,232,86,32,220,32,10,144,27,150,92,138,159,178,158,127, +81,91,152,162,105,74,231,22,218,190,234,175,250,60,73,40,36,161,164,157, +183,200,8,226,214,50,6,99,147,0,0,1,0,73,68,65,84,13,80,186,69,167,55,102, +223,90,181,154,62,251,250,47,0,32,52,50,130,244,101,174,242,106,19,143, +102,207,28,59,120,252,76,181,155,30,57,127,89,224,76,191,250,231,191,250, +194,227,127,114,170,103,38,60,117,233,233,31,253,103,98,217,99,132,10,167, +120,38,241,133,71,31,93,191,170,100,231,131,237,30,157,238,238,221,247, +19,8,101,54,146,165,130,139,171,84,86,85,185,47,15,251,32,57,123,250,237, +49,190,180,116,166,191,103,240,194,153,179,189,11,185,245,244,188,251,66, +22,203,82,131,157,41,185,170,182,102,255,190,147,250,138,22,163,118,201, +189,243,133,134,68,81,85,176,146,225,6,187,185,243,180,88,81,75,16,33,52, +54,54,150,97,38,184,190,231,177,160,47,22,244,206,157,120,35,204,212,164, +145,93,181,212,37,45,27,125,134,157,188,217,129,27,30,211,148,180,179,44, +151,101,214,210,50,43,37,135,95,126,125,255,190,139,211,22,7,43,34,103, +107,147,115,224,194,153,148,177,108,118,170,251,236,73,127,103,135,190, +190,172,1,225,224,222,113,216,232,138,239,223,89,30,108,79,0,0,1,0,73,68, +65,84,119,116,129,52,152,121,210,172,55,2,0,8,129,139,7,246,184,106,91, +114,27,150,219,206,188,150,151,214,173,217,184,113,99,83,141,199,192,178, +21,229,110,139,221,252,202,79,191,57,129,75,156,158,218,91,111,50,158,60, +119,65,17,152,125,47,236,153,163,211,125,167,39,90,42,140,147,243,44,76, +13,64,109,137,14,81,233,133,222,127,251,253,224,241,227,239,28,25,242,221, +178,166,121,25,68,24,99,141,209,49,49,19,90,189,170,78,207,46,78,220,60, +190,201,163,115,81,143,167,104,23,86,20,220,96,85,73,38,177,148,133,148, +133,140,157,84,8,145,177,203,17,239,156,22,73,233,185,126,222,86,146,54, +173,167,133,8,21,154,73,55,61,104,180,57,57,205,226,217,203,25,2,177,246, +250,219,31,168,31,252,217,207,204,101,45,180,60,157,177,84,116,180,106, +45,109,109,106,116,252,240,39,15,237,249,151,159,28,155,154,155,150,2,99, +148,206,244,232,174,120,248,133,185,249,137,126,191,255,88,232,21,175,100, +248,202,83,235,207,30,61,191,183,123,84,146,164,202,142,187,31,217,226, +206,134,216,0,0,1,0,73,68,65,84,189,26,150,32,125,174,181,139,49,110,106, +106,6,0,9,224,195,159,124,96,203,93,143,253,234,141,43,140,117,45,217,253, +195,241,141,79,26,218,215,254,245,63,255,93,169,6,247,246,188,27,155,30, +158,236,235,190,98,113,111,132,88,207,68,255,131,95,251,236,229,67,111, +220,211,222,94,216,235,66,140,183,222,186,33,55,47,87,222,23,165,249,82, +236,82,116,38,175,16,184,177,76,66,75,248,168,144,211,225,169,169,41,155, +205,86,216,195,217,243,7,232,248,188,163,117,163,206,104,211,90,93,144, +138,104,244,70,13,207,79,117,29,73,71,67,214,138,6,40,152,193,235,215,175, +95,83,95,174,99,57,151,219,105,55,107,244,200,7,243,253,105,206,120,121, +50,102,55,198,124,250,45,95,125,180,243,15,123,250,239,222,217,18,10,152, +62,249,248,205,253,207,191,62,69,19,72,8,87,118,52,15,143,200,81,148,50, +104,181,238,138,70,139,203,170,165,242,101,106,94,34,55,77,2,84,212,117, +0,64,71,131,29,0,218,87,149,198,233,106,178,107,207,197,73,223,149,9,239, +142,38,227,123,73,97,67,0,0,1,0,73,68,65,84,240,224,5,222,84,19,25,159, +141,138,170,28,142,215,110,108,191,185,177,145,51,153,124,114,194,127,233, +188,201,85,182,20,13,11,145,22,205,201,99,145,60,166,201,181,5,151,24,174, +15,24,222,215,74,183,66,114,160,235,93,95,147,201,228,245,122,179,10,46, +11,233,84,220,169,161,9,138,162,116,102,44,165,16,171,153,25,232,198,170, +226,50,242,161,169,94,140,119,47,69,26,79,117,93,38,223,181,246,1,215,90, +248,234,87,191,74,186,137,91,239,175,63,243,226,225,255,124,77,217,80,103, +3,4,128,16,8,66,92,207,4,0,248,212,236,233,174,25,193,119,233,11,223,251, +129,25,0,167,102,35,196,117,99,144,219,254,101,98,54,215,250,94,114,211, +125,110,212,251,209,45,175,236,191,52,141,88,213,218,196,77,36,195,29,171, +237,83,127,12,84,122,60,34,33,10,40,115,152,60,57,214,117,108,223,201,11, +227,226,142,221,157,254,209,153,170,250,34,211,35,155,147,59,39,11,141, +132,188,86,161,130,175,129,203,12,214,7,14,55,216,205,189,148,176,205,163, +72,52,26,229,121,109,176,199,6,0,0,1,0,73,68,65,84,222,231,243,165,82,169, +242,242,242,156,50,10,73,145,106,58,2,0,88,76,248,135,123,142,253,254,223, +19,162,250,224,151,190,87,226,44,15,204,77,217,220,185,133,243,61,175,44, +246,31,252,224,7,153,252,50,243,161,32,83,54,52,28,4,198,134,130,201,20, +203,234,105,194,166,215,27,44,29,103,78,141,154,24,221,223,126,243,155, +72,20,111,186,115,135,85,158,24,29,248,237,83,95,250,151,133,112,200,101, +182,44,54,88,240,245,140,67,107,131,189,176,95,121,236,149,121,212,114, +231,163,205,119,96,0,72,161,120,237,218,29,227,213,85,210,52,39,114,154, +50,7,189,255,192,208,103,119,215,97,140,167,71,39,212,210,13,51,131,23, +79,142,56,228,227,103,38,199,123,157,213,205,141,181,141,217,154,51,85, +5,23,230,45,78,23,42,8,157,23,82,245,134,114,116,101,42,184,247,245,221, +109,249,76,132,144,32,8,165,165,165,177,88,76,146,164,120,60,158,78,167, +121,158,71,8,121,175,28,211,19,2,201,106,176,24,199,114,42,234,95,232,189, +212,205,185,106,176,16,175,88,181,125,200,86,100,0,0,1,0,73,68,65,84,110, +161,239,172,161,188,41,123,95,101,161,210,204,234,214,108,102,107,231,45, +235,58,58,36,133,106,110,170,75,244,238,125,117,36,94,109,163,87,125,232, +243,187,183,172,37,229,96,48,202,217,203,44,213,101,101,15,221,218,240, +234,211,191,216,242,103,63,251,246,83,119,171,21,235,148,121,81,95,106, +10,246,14,242,6,117,96,74,41,113,27,168,156,105,144,59,126,217,68,174,96, +64,8,81,152,177,86,87,242,26,90,163,97,250,67,236,173,107,171,222,253,227, +243,237,183,110,19,103,103,23,252,33,201,84,243,177,219,92,251,15,76,177, +4,78,138,115,151,39,148,212,204,101,141,189,68,199,105,50,245,204,79,207, +204,207,207,0,99,230,53,212,50,76,80,72,129,194,159,121,246,198,202,129, +229,100,210,13,237,193,172,226,200,172,5,200,28,238,62,59,59,75,146,228, +232,232,40,198,152,64,10,33,199,32,58,142,89,43,0,86,197,4,207,144,165, +54,189,197,93,166,166,163,216,63,22,13,250,109,46,247,50,50,188,40,201, +30,188,107,29,0,116,220,181,117,190,31,55,173,169,249,175,240,105,215,0, +0,1,0,73,68,65,84,209,95,127,243,63,89,241,31,191,253,212,72,143,255,193, +199,30,51,97,12,177,43,154,210,155,43,172,240,111,223,251,194,15,206,17, +222,75,111,50,205,159,31,239,58,85,149,104,211,81,12,206,225,158,66,212, +121,130,33,247,167,139,3,87,219,218,152,46,200,90,45,247,239,222,240,163, +127,252,71,64,230,91,90,217,240,244,20,179,182,156,153,235,75,54,90,239, +188,165,253,181,253,145,116,226,252,165,145,113,99,170,39,28,94,224,60, +237,13,14,30,1,204,250,19,78,171,182,144,146,203,88,217,133,108,157,205, +95,105,204,244,190,78,152,40,204,204,235,124,230,6,156,76,78,230,16,92, +65,16,8,130,16,72,21,73,81,72,171,8,3,6,12,98,130,36,137,161,43,61,141, +171,59,213,100,80,1,37,21,15,3,184,139,142,229,13,155,110,172,186,249,99, +85,0,0,59,54,181,165,25,230,183,199,39,202,45,129,87,95,124,145,85,20,187, +141,71,25,59,137,55,89,17,104,170,252,253,19,49,153,150,78,247,94,78,36, +9,81,84,103,134,46,60,240,200,39,115,153,169,16,233,77,153,140,107,0,0, +1,0,73,68,65,84,82,3,188,182,210,12,0,13,235,239,108,153,138,211,246,202, +106,143,48,219,125,68,136,235,147,149,118,43,96,94,203,88,141,250,155,214, +221,124,236,114,176,111,104,161,178,173,100,226,242,96,245,150,22,12,144, +251,213,53,143,83,151,25,130,220,24,230,138,98,157,60,184,241,169,55,25, +40,244,44,114,159,166,211,233,188,50,110,183,27,0,194,4,80,138,23,73,2, +6,64,128,65,138,199,69,172,183,219,71,123,47,218,44,60,129,84,192,57,119, +76,71,198,190,243,79,191,106,89,181,74,48,148,126,252,246,155,150,177,39, +242,224,238,135,31,190,202,10,119,126,237,107,95,163,40,170,165,115,107, +84,73,100,103,177,203,218,56,51,123,73,39,185,140,171,180,195,167,102,78, +188,246,27,178,102,173,95,10,78,237,125,235,247,199,131,127,255,247,127, +6,197,44,146,165,6,59,155,126,240,193,7,1,0,228,228,67,255,115,227,247, +191,253,143,79,253,197,147,179,151,22,247,242,178,26,70,3,96,244,52,174, +217,208,102,241,190,53,62,183,192,107,8,132,96,162,251,100,69,251,198,92, +42,128,19,15,0,0,1,0,73,68,65,84,222,77,71,102,71,131,74,75,117,249,82, +216,243,248,9,138,153,83,43,1,138,220,239,150,107,43,64,142,32,45,252,159, +125,139,205,249,14,144,91,149,201,93,77,14,29,69,178,170,96,0,132,65,150, +16,34,234,42,173,70,179,30,165,3,36,72,215,144,74,211,79,255,228,247,181, +183,61,113,113,223,211,162,54,248,241,219,111,66,5,110,240,242,67,155,41, +255,15,255,240,15,153,204,119,14,117,179,87,159,54,185,173,177,158,99,17, +199,71,215,123,2,35,8,1,201,238,250,232,71,188,23,95,58,114,248,74,77,137, +245,245,19,19,149,196,92,251,198,141,0,48,29,140,150,90,12,133,214,247, +50,216,129,210,2,198,223,252,155,255,9,0,182,181,166,180,224,175,169,212, +0,68,0,16,171,231,105,18,69,72,50,148,2,45,7,72,158,239,29,136,93,30,223, +83,219,209,30,159,24,119,150,151,57,61,250,57,239,188,201,213,150,71,55, +40,166,191,254,123,146,251,255,25,228,115,82,158,173,144,43,225,11,255, +103,75,74,146,4,5,60,135,16,226,221,171,212,65,153,81,163,128,105,250,251, +121,0,0,1,0,73,68,65,84,1,16,152,180,204,154,22,171,219,172,218,93,44,8, +126,130,88,252,164,141,16,194,9,31,99,105,220,188,190,226,225,155,191,19, +30,29,13,99,108,186,126,218,45,101,25,44,21,62,221,181,163,3,0,176,182, +172,179,133,181,24,165,244,91,98,229,206,18,27,19,0,64,96,105,112,24,160, +127,210,79,213,221,250,169,7,236,95,121,225,244,70,229,210,228,240,123, +251,15,159,175,127,240,75,119,84,24,134,251,207,222,245,224,227,80,32,122, +11,17,21,70,218,56,214,214,209,2,82,154,168,112,167,142,30,57,255,158,50, +30,103,173,6,74,5,0,16,132,164,156,168,170,176,76,143,120,121,36,204,44, +132,44,102,20,8,153,154,107,152,184,111,142,183,185,10,141,161,92,44,121, +254,242,138,98,35,88,74,187,21,118,102,41,200,20,160,40,42,251,51,27,62, +1,0,198,90,19,209,215,50,201,30,18,0,48,152,117,250,206,38,30,64,84,165, +32,0,38,144,17,208,213,49,96,216,4,178,235,88,64,128,76,213,213,151,134, +7,122,39,70,166,102,197,135,30,189,127,169,248,74,110,101,213,149,60,0, +0,1,0,73,68,65,84,3,150,156,199,154,210,214,58,12,18,221,177,227,67,46, +39,199,132,50,188,139,0,64,166,12,153,101,135,29,131,179,254,245,205,227, +233,146,159,252,221,214,111,188,48,250,238,185,137,128,56,76,148,117,202, +131,199,118,63,242,249,229,233,144,59,246,24,227,236,144,211,156,163,182, +60,249,174,144,72,165,180,77,173,171,19,179,67,0,128,41,218,85,222,24,77, +206,151,56,117,137,4,83,219,222,66,197,199,176,221,194,145,242,196,252, +188,18,142,187,203,42,120,110,113,43,65,238,12,89,138,195,86,20,44,185, +62,41,67,151,108,34,87,79,231,21,3,128,204,217,80,25,64,57,192,176,28,221, +248,209,152,113,13,137,19,36,78,144,74,148,84,163,164,26,35,148,16,33,135, +73,66,70,232,234,177,27,188,139,33,164,236,25,138,177,243,251,15,28,58, +151,36,248,112,122,225,244,31,158,131,235,13,5,0,192,98,56,183,1,144,195, +76,121,205,67,8,33,198,84,191,105,149,1,0,107,171,62,247,185,143,55,54, +86,50,0,149,37,164,52,114,228,217,231,14,4,140,148,1,161,134,172,204,118, +221,0,0,1,0,73,68,65,84,250,74,208,240,46,132,4,153,125,232,51,95,120,241, +249,63,142,15,95,24,9,97,72,205,60,253,131,31,228,78,143,165,232,144,47, +39,24,115,121,251,45,59,119,239,110,174,180,148,87,148,121,60,101,192,152, +136,200,200,182,109,219,90,234,108,12,0,207,34,0,208,241,26,82,78,200,90, +135,44,203,201,208,194,244,232,232,232,232,92,46,25,151,162,249,50,141, +249,64,96,185,179,111,179,83,161,104,151,10,21,95,30,195,101,136,171,171, +218,74,180,60,69,16,10,73,200,36,36,73,156,36,113,130,84,99,148,26,101, +89,202,104,207,158,143,110,149,38,123,206,244,204,95,173,13,153,43,55,236, +122,240,142,233,147,189,211,126,250,219,223,254,231,151,143,14,71,231,123, +187,142,239,123,241,197,55,17,66,72,240,13,244,12,93,221,6,125,3,153,113, +237,39,107,197,24,239,218,181,81,11,80,218,113,251,150,155,235,22,82,134, +5,143,199,130,0,178,159,35,236,37,102,147,182,146,160,63,244,196,227,111, +116,13,116,191,115,94,50,24,126,251,250,57,95,120,250,154,186,17,124,71, +112,243,84,46,0,0,1,0,73,68,65,84,115,47,235,41,208,173,24,99,160,141,141, +181,214,140,172,118,122,220,78,167,171,212,238,168,111,109,56,116,232,208, +229,201,112,230,102,28,42,179,235,70,78,147,12,223,212,212,4,162,16,151, +16,72,49,89,17,66,1,255,244,244,52,20,76,149,60,154,175,28,120,191,235, +56,151,159,1,69,5,111,134,160,20,69,113,150,42,169,230,19,17,207,71,72, +66,38,9,153,36,20,18,39,20,44,19,198,82,94,103,200,242,95,83,11,117,113, +239,243,0,16,25,31,71,58,183,221,83,110,212,192,66,247,153,119,143,29,111, +171,51,157,253,195,219,130,181,116,116,160,103,168,251,244,177,75,83,161, +185,177,243,39,46,166,175,215,110,249,114,107,137,133,68,139,41,214,186, +230,158,79,126,235,91,159,189,243,166,245,245,171,218,50,207,50,5,16,128, +195,93,105,48,104,195,67,151,207,188,119,120,96,106,42,60,61,216,115,185, +119,223,107,127,248,155,191,249,27,0,64,82,164,111,208,39,164,102,207,92, +156,205,171,63,23,105,185,219,64,230,252,180,153,56,91,69,157,213,106,53, +27,205,157,196,221,159,152,0,0,1,0,73,68,65,84,235,90,0,128,212,234,98, +241,148,66,107,100,33,138,49,86,9,198,93,93,85,81,102,14,39,18,161,80,140, +165,32,37,1,150,22,143,69,145,37,25,23,195,178,66,224,198,49,238,44,228, +185,12,185,76,19,10,133,76,38,83,94,25,140,113,50,26,78,69,67,11,23,143, +196,180,141,41,194,133,120,91,202,180,58,101,90,171,198,38,196,205,63,213, +84,221,202,178,92,214,180,119,123,204,132,24,121,115,223,123,135,123,103, +77,54,86,66,246,134,58,251,72,239,69,213,94,61,50,54,72,107,74,203,13,209, +50,155,59,26,159,59,235,163,215,123,228,3,123,15,142,165,89,179,142,176, +100,142,206,17,253,103,94,251,125,105,243,234,220,6,231,153,77,69,27,95, +227,54,216,156,78,2,33,155,137,215,232,44,83,83,179,171,218,93,61,93,11, +171,214,216,7,186,22,36,36,86,54,55,158,216,119,146,50,24,251,46,12,222, +212,238,57,49,33,218,148,209,231,94,124,211,84,93,23,29,235,173,175,43, +57,187,103,175,190,186,145,37,175,81,41,87,156,231,161,118,185,92,6,94, +131,225,45,89,132,0,0,1,0,73,68,65,84,16,162,0,48,193,5,7,135,72,171,91, +155,246,251,163,113,150,194,188,209,72,202,201,96,88,36,105,93,137,195, +224,139,137,56,153,138,37,19,64,209,32,203,36,67,163,149,231,181,101,224, +198,123,75,50,144,43,117,10,29,150,172,197,157,91,24,33,20,157,234,143, +5,188,116,220,39,36,194,122,139,45,105,218,170,42,178,16,143,150,174,255, +6,103,171,102,51,59,185,174,2,109,169,222,182,187,102,236,151,191,52,121, +26,25,121,46,9,8,0,120,82,225,82,241,239,125,239,123,0,176,255,217,103, +38,230,130,49,74,28,153,31,214,125,244,78,192,111,49,76,122,252,240,229, +67,211,47,204,137,198,111,125,105,199,224,72,240,141,191,252,75,65,168, +188,243,11,15,220,86,105,41,218,17,40,152,18,153,116,125,185,9,16,106,111, +183,83,20,210,112,54,140,47,2,0,176,156,81,137,134,67,232,87,191,251,9, +132,47,62,119,104,205,93,59,13,255,241,252,113,253,214,117,91,118,84,140, +78,199,156,156,2,233,112,128,210,71,21,48,208,249,4,132,2,105,93,24,95, +208,91,149,158,7,143,255,0,0,1,0,73,68,65,84,233,249,133,53,53,117,151, +46,93,50,215,53,140,143,206,48,106,146,212,232,40,134,1,0,82,81,40,150, +160,56,3,67,224,180,152,146,17,210,105,53,43,144,141,224,253,220,91,82, +116,90,103,41,146,121,20,8,4,50,219,75,242,94,89,184,124,20,69,230,29,77, +107,121,157,94,107,118,64,58,78,41,34,41,38,102,198,231,164,84,194,228, +174,204,197,149,121,101,245,234,213,109,213,30,29,203,57,92,118,135,145, +171,104,172,144,189,99,39,123,135,187,199,35,37,150,84,80,183,254,211,247, +214,191,123,116,114,219,182,186,160,87,123,207,125,29,131,175,190,169,212, +212,184,13,138,190,178,114,124,84,112,212,121,190,242,80,213,235,111,77, +116,118,214,144,5,218,182,232,220,200,51,150,29,14,43,69,106,214,110,106, +101,57,87,44,201,237,254,200,218,174,125,7,38,98,170,76,8,11,65,109,123, +45,59,57,228,175,106,114,246,13,138,15,61,176,206,215,63,234,182,146,99, +145,100,131,131,123,235,157,67,189,189,147,205,205,53,133,117,22,182,33, +75,40,13,133,4,25,44,70,189,232,17,205,105,0,0,1,0,73,68,65,84,211,233, +100,105,42,238,159,87,72,157,222,170,81,100,82,175,33,18,41,149,211,243, +66,34,65,208,44,137,8,142,215,34,0,192,138,162,194,74,223,131,91,24,158, +41,58,161,243,50,51,145,201,220,105,151,129,116,50,174,227,72,146,97,88, +155,135,212,234,53,70,171,214,226,72,165,83,118,13,153,154,184,180,148, +75,136,16,114,85,84,85,151,153,48,198,136,43,217,244,209,79,143,141,141, +205,249,35,53,205,13,209,201,125,191,126,237,80,99,169,30,50,87,47,72,82, +218,108,233,30,24,232,186,116,190,171,107,42,22,159,222,125,255,253,2,129, +184,248,220,249,203,195,7,222,124,3,114,60,6,44,4,114,251,152,231,28,228, +250,170,217,102,220,182,165,138,229,171,254,236,219,223,30,30,159,78,32, +107,54,250,133,0,228,112,10,16,170,210,107,166,67,41,14,49,140,170,40,138, +66,167,23,130,137,240,249,83,103,114,217,20,0,162,115,3,189,243,137,220, +156,44,10,206,232,170,45,115,103,115,42,234,235,107,106,220,70,173,86,175, +101,128,160,1,20,33,22,225,57,66,72,139,112,0,209,184,0,0,1,0,73,68,65, +84,215,94,95,145,50,105,185,40,192,251,207,79,165,82,51,51,51,0,224,243, +249,178,118,15,0,32,144,41,154,82,133,56,22,19,88,136,71,3,115,61,7,94, +58,252,226,191,99,139,167,164,126,85,196,55,191,140,151,155,11,95,255,250, +215,191,242,216,46,155,103,117,67,133,217,232,110,154,12,73,136,177,33, +127,50,197,178,122,156,92,187,122,245,247,126,248,111,201,104,146,20,66, +175,188,248,226,175,95,58,93,182,161,226,244,27,47,15,121,83,167,6,188, +125,239,189,177,88,11,34,207,159,188,152,44,152,12,185,54,77,94,12,48,219, +145,255,245,197,71,55,181,182,181,53,218,129,54,2,2,96,44,120,254,13,9, +192,85,105,24,136,144,156,190,130,225,245,116,60,30,140,204,245,76,206, +116,159,235,57,180,247,112,40,56,126,181,242,248,224,228,100,230,36,120, +40,152,132,69,187,76,145,44,175,165,129,160,244,122,173,134,227,98,41,129, +162,201,76,33,132,16,198,8,193,146,113,153,15,10,242,181,91,30,29,51,153, +185,10,174,48,129,49,22,4,129,101,217,72,36,18,141,159,166,220,47,0,0,1, +0,73,68,65,84,70,49,198,162,40,114,28,135,16,10,12,157,230,9,145,96,181, +128,16,86,196,224,212,200,201,253,123,8,179,7,137,137,210,166,213,222,225, +75,122,79,109,118,85,73,110,27,150,250,89,219,220,217,210,208,192,48,154, +234,202,50,113,236,224,239,187,3,91,238,186,163,231,138,127,114,164,231, +163,187,90,135,198,209,232,236,8,54,183,124,108,91,217,192,233,158,237, +143,127,46,25,159,238,122,227,192,161,115,99,81,194,28,233,223,111,116, +212,88,236,150,124,124,57,88,10,141,244,220,180,203,174,195,4,75,81,164, +205,229,209,115,137,125,87,66,235,91,156,47,236,187,216,220,177,62,61,112, +102,14,25,220,54,118,38,197,112,132,77,107,53,43,115,115,135,79,159,190, +52,153,40,55,196,199,198,136,142,86,15,66,36,228,152,7,133,88,10,233,76, +211,20,197,48,146,36,107,180,90,164,138,130,172,50,116,230,94,37,252,255, +205,110,238,44,228,105,1,40,54,210,201,100,210,229,114,69,163,81,151,203, +53,61,61,205,113,220,252,252,60,198,24,129,138,148,56,164,67,106,230,109, +89,70,228,125,118,0,0,1,0,73,68,65,84,224,104,162,204,109,215,89,157,170, +24,199,129,177,88,56,104,177,59,11,209,21,53,240,179,112,235,166,102,140, +113,211,109,183,175,43,105,3,128,67,51,47,12,123,233,51,195,165,50,66,127, +254,141,111,24,1,112,108,128,177,54,59,12,80,67,73,151,75,55,89,146,125, +39,47,119,61,218,161,251,229,254,174,199,213,32,33,202,231,70,34,31,249, +200,174,107,93,144,66,192,100,86,195,73,8,49,121,182,96,94,103,107,155, +106,1,227,230,141,247,122,207,247,35,141,203,22,212,218,29,154,233,139, +73,131,213,66,36,20,94,82,72,115,201,166,77,181,161,203,167,234,170,239, +40,199,81,89,88,128,138,154,116,116,70,136,225,49,95,120,245,234,213,133, +46,75,94,103,115,11,32,132,140,70,35,0,168,44,75,19,84,94,201,27,14,223, +255,51,120,95,118,82,209,116,46,232,116,186,76,135,17,66,165,165,165,54, +155,77,150,101,140,49,65,168,132,146,0,33,8,233,32,164,67,144,10,49,20, +57,214,223,99,213,209,106,42,172,96,156,142,231,237,54,203,71,7,75,168, +3,132,16,169,92,108,79,0,0,1,0,73,68,65,84,239,106,205,52,248,79,254,242, +47,191,241,141,111,68,100,190,185,163,33,99,242,92,253,34,2,40,157,210, +187,61,159,252,248,246,178,144,159,108,110,111,229,201,129,147,231,79,190, +115,100,224,242,57,175,0,0,177,183,158,126,26,0,64,240,93,58,223,39,34, +36,6,198,102,187,223,57,60,18,206,182,164,208,168,202,182,112,91,103,35, +0,247,185,111,62,80,198,65,235,218,178,177,190,190,16,178,201,8,16,2,12, +192,150,53,122,123,122,134,166,226,4,66,102,131,46,48,187,48,54,56,24,137, +68,34,201,212,64,119,119,87,215,240,82,156,90,84,3,0,0,65,210,215,20,49, +65,172,40,54,130,165,190,224,46,5,75,133,103,162,209,104,222,46,165,178, +178,50,140,241,104,15,16,82,28,73,52,6,12,114,12,203,201,184,164,178,6, +227,120,255,165,14,3,75,32,5,22,239,117,1,140,49,138,77,255,232,63,94,168, +111,106,22,244,238,7,182,174,46,156,115,69,131,188,217,50,119,172,109,3, +0,33,195,66,172,3,224,10,0,0,207,135,71,7,233,91,58,16,66,58,12,55,146, +219,7,0,0,1,0,73,68,65,84,8,161,20,145,28,141,208,165,213,196,233,203,211, +107,12,151,6,230,211,227,63,255,249,186,246,210,158,139,66,101,103,83,240, +114,239,161,209,49,150,154,131,218,199,11,113,21,133,204,35,189,187,227, +201,39,59,0,96,112,112,20,147,70,64,104,97,176,123,125,147,233,196,254, +43,233,202,122,4,144,150,24,217,94,187,173,173,102,98,168,119,33,42,106, +240,188,164,148,120,167,189,165,149,85,144,163,242,160,32,206,82,72,132, +21,40,144,96,169,147,221,151,178,230,150,178,96,50,226,55,91,67,54,205, +104,52,4,78,32,41,12,98,136,144,194,32,39,16,34,234,171,236,38,147,6,210, +65,2,201,0,217,201,151,58,178,231,64,229,150,135,123,123,123,251,47,93, +41,100,217,162,52,45,108,103,102,37,9,166,77,27,111,233,224,48,6,182,108, +67,117,252,15,47,31,156,177,216,108,8,16,2,78,107,136,164,67,145,52,123, +254,208,153,211,23,38,119,126,241,79,41,138,98,89,102,232,210,222,95,190, +124,96,112,218,31,78,215,90,229,248,247,190,249,205,175,127,253,223,242, +16,189,148,66,70,175,0,0,1,0,73,68,65,84,159,24,122,125,125,117,125,181, +133,2,176,219,108,231,134,102,161,212,102,48,89,163,137,148,134,145,56, +173,9,0,212,68,188,121,253,250,53,29,158,185,80,120,106,106,225,194,133, +11,35,51,1,37,25,204,208,51,21,143,70,19,34,92,175,248,178,136,138,70,86, +87,8,44,185,170,36,155,147,23,193,203,78,29,200,233,79,56,28,182,219,237, +133,62,17,111,45,35,3,239,130,172,18,74,2,0,116,44,221,80,109,178,235,21, +187,75,3,82,136,64,153,165,0,24,33,4,145,17,175,224,222,208,81,122,255, +77,95,139,140,143,199,16,50,44,65,184,60,201,159,215,152,108,32,167,166, +161,18,0,48,214,117,220,245,137,215,191,243,175,27,238,92,3,82,18,16,170, +174,182,249,81,203,99,31,219,180,231,205,131,161,16,46,49,194,103,62,243, +25,136,13,190,198,91,202,75,108,201,169,33,222,85,129,100,105,245,125,31, +218,85,231,127,103,52,176,163,202,66,93,223,128,27,202,3,132,16,13,96,173, +110,97,167,3,142,170,90,94,103,149,103,39,172,109,214,217,217,48,128,85, +38,206,92,75,26,0,0,1,0,73,68,65,84,117,58,14,40,224,194,147,97,206,232, +210,81,17,175,47,168,73,32,127,122,198,226,169,210,202,9,137,162,13,60, +3,5,86,212,82,131,178,66,96,185,179,111,11,21,121,81,185,138,49,206,59, +214,61,155,207,56,155,37,140,72,53,78,168,113,66,141,153,117,82,103,147, +174,196,164,16,82,152,144,66,36,82,224,170,205,129,105,38,9,86,158,5,0, +48,86,86,78,143,14,157,126,111,255,43,47,190,149,173,42,43,150,150,10,65, +21,90,175,89,131,230,91,223,250,220,29,55,153,223,250,213,219,17,73,112, +119,220,34,12,28,254,209,143,126,116,247,157,237,85,236,194,184,127,177, +134,210,154,155,118,108,238,32,25,162,190,189,22,18,243,128,177,128,113, +247,158,179,231,123,134,15,238,217,147,75,150,101,244,14,228,8,48,132,208, +45,183,220,210,94,235,6,224,16,14,4,168,82,101,174,111,239,222,189,140, +18,189,116,97,176,231,210,4,2,196,106,117,117,117,85,86,134,98,120,202, +94,81,103,166,113,212,63,55,63,51,158,150,85,80,229,180,32,23,213,227,43, +19,138,115,82,192,82,82,255,0,0,1,0,73,68,65,84,81,99,48,3,215,140,190, +156,167,121,167,222,100,95,103,141,30,209,220,154,228,43,72,72,146,144, +34,212,24,161,198,73,53,70,40,17,66,142,18,132,130,178,167,222,104,237, +52,41,203,210,226,96,196,47,31,61,126,178,71,209,24,35,130,239,204,43,191, +65,8,245,140,249,229,216,220,181,86,137,225,44,22,84,240,1,7,138,104,34, +21,233,221,115,138,134,99,44,91,110,237,116,58,157,127,232,138,84,183,149, +191,244,221,191,2,128,5,209,8,113,81,2,144,37,4,0,160,164,187,14,190,254, +244,239,142,105,18,11,93,239,252,97,60,172,132,197,112,207,161,215,23,121, +37,237,237,238,91,40,228,233,92,202,228,73,202,181,13,166,80,82,218,112, +199,238,59,238,184,131,175,110,163,98,243,49,197,96,112,233,179,20,164, +204,206,196,194,124,66,166,12,182,18,167,167,66,81,48,6,41,30,73,75,169, +84,58,45,95,135,98,217,77,186,31,32,44,119,191,219,127,73,132,102,55,5, +64,206,172,37,73,18,115,54,201,212,172,245,30,32,144,10,160,18,32,35,44, +33,192,4,8,12,231,154,98,0,0,1,0,73,68,65,84,50,235,160,74,55,104,117,6, +0,192,152,187,248,246,193,132,181,180,218,193,35,132,102,7,187,163,154, +230,59,238,217,234,61,119,97,214,175,190,188,231,160,55,78,182,84,114,151, +206,159,126,239,68,95,91,91,3,164,102,251,251,125,122,151,141,186,30,105, +81,175,7,0,16,226,234,214,180,18,12,95,237,50,218,43,106,219,218,218,226, +105,181,166,170,226,246,187,239,250,214,183,190,213,184,233,30,185,251, +64,183,204,218,162,190,160,190,146,75,198,7,134,199,141,85,29,85,171,93, +202,228,244,45,143,124,58,54,116,232,244,209,225,227,23,167,107,91,236, +90,138,74,138,180,217,200,193,245,242,41,247,127,158,220,98,116,54,167, +126,241,51,128,150,101,220,21,21,101,101,118,13,75,146,4,195,179,106,48, +148,194,66,196,110,230,252,33,65,203,130,74,104,204,122,22,33,36,36,211, +32,39,146,42,205,32,44,43,34,73,209,0,160,170,10,198,170,186,242,226,73, +203,221,57,89,104,243,22,150,204,20,11,135,195,133,85,103,200,170,43,105, +214,57,26,100,207,29,113,251,118,18,201,236,14,93,220,0,0,1,0,73,68,65, +84,36,146,73,66,33,32,165,98,153,208,187,116,70,107,182,112,77,29,217,115, +248,21,0,136,78,77,129,214,97,117,186,245,28,4,250,47,28,235,58,211,222, +200,123,123,251,5,163,45,20,240,37,124,227,71,46,78,5,231,70,251,123,134, +132,235,101,207,248,240,36,20,145,70,215,140,229,45,237,215,246,92,175, +171,177,210,140,25,0,190,243,157,239,212,153,97,237,93,245,114,36,94,95, +110,11,141,204,0,66,91,31,124,252,11,159,216,121,91,91,9,109,174,181,233, +33,62,29,228,106,55,218,217,240,222,129,216,225,189,111,15,133,83,39,127, +247,219,147,239,190,219,117,101,230,26,161,148,212,244,248,116,33,5,160, +128,173,51,196,100,41,222,110,209,2,193,218,28,22,163,65,63,237,143,104, +244,90,144,177,162,100,252,89,138,164,69,32,0,35,85,18,69,140,21,73,193, +138,36,42,170,170,40,120,229,137,164,165,239,82,130,235,135,36,79,104,195, +245,212,201,250,110,133,47,198,195,129,133,222,211,62,221,246,144,110,75, +220,121,71,204,117,119,212,125,95,154,48,36,156,183,19,115,179,247,188, +0,0,1,0,73,68,65,84,165,155,89,78,147,45,191,118,251,150,245,13,182,95, +253,234,87,207,188,125,50,140,16,0,2,140,69,157,225,166,59,63,214,63,22, +176,184,28,243,221,93,21,14,15,73,38,79,245,15,17,36,61,218,243,238,111, +95,222,59,58,61,6,0,239,188,115,12,11,83,189,135,46,136,0,32,250,207,158, +26,46,26,50,200,66,158,201,133,49,182,54,221,253,169,123,182,58,91,154, +227,193,201,250,85,173,153,226,28,64,166,25,18,101,32,72,242,129,251,214, +71,246,142,111,184,101,77,98,178,191,235,156,191,111,104,232,114,119,31, +128,176,208,119,1,0,144,28,29,25,24,151,229,216,209,183,223,134,37,44,132, +92,141,188,152,69,178,102,171,81,111,117,114,28,111,54,27,88,22,37,2,19, +139,79,64,85,128,99,176,162,0,98,88,141,40,72,178,172,16,8,1,34,208,202, +59,32,240,253,238,82,130,98,190,104,54,17,139,197,236,118,59,20,12,155, +111,164,39,17,244,162,192,68,42,236,213,25,205,113,243,14,172,200,98,42, +225,106,171,39,140,141,180,198,156,91,9,99,174,220,116,63,243,136,207,0, +0,1,0,73,68,65,84,123,229,212,139,47,26,170,235,24,121,62,5,64,34,84,227, +209,190,119,241,204,151,191,252,101,0,56,242,226,11,211,254,56,203,235, +71,70,70,185,123,118,104,120,115,121,153,110,236,247,251,223,20,131,18, +176,27,118,116,120,180,74,20,64,183,208,123,184,43,89,215,89,19,235,190, +82,182,182,57,207,132,42,106,195,102,19,180,177,188,156,127,109,140,184, +165,185,50,67,25,4,8,104,128,50,59,244,31,62,3,155,54,203,46,83,12,0,68, +49,174,145,204,174,10,255,208,120,208,87,210,127,165,247,204,240,116,125, +67,217,236,216,5,81,170,28,159,73,68,247,236,49,121,234,54,119,212,23,210, +106,41,155,161,162,162,2,0,20,163,185,206,230,142,11,10,207,16,52,173,147, +41,173,1,146,49,149,0,64,88,74,97,173,158,32,17,150,37,21,35,114,133,201, +165,226,39,187,103,18,5,166,6,90,106,0,36,73,226,121,190,176,246,192,192, +89,28,153,183,215,117,104,56,86,99,178,33,33,73,41,34,33,38,146,108,169, +214,100,231,52,154,220,202,51,36,110,109,109,109,170,40,107,222,240,199, +0,0,1,0,73,68,65,84,225,25,206,230,176,90,244,172,201,229,192,209,133,227, +221,125,221,227,145,82,187,24,209,182,223,191,213,115,177,219,187,254,166, +42,191,151,220,182,189,97,240,98,23,217,208,226,212,38,98,108,115,169,126, +34,105,107,82,71,250,134,9,178,196,83,59,117,246,84,146,52,217,108,252, +117,94,130,20,1,146,43,108,234,213,94,19,78,29,131,121,87,157,75,7,0,128, +168,182,181,237,20,128,193,230,32,83,129,247,78,13,219,111,217,92,199,39, +70,167,83,28,210,43,68,194,102,47,151,81,36,78,86,168,82,220,229,52,251, +166,189,83,145,152,209,209,206,105,164,196,244,112,93,83,203,53,42,169, +34,34,168,66,170,230,1,65,210,0,192,80,4,66,136,98,88,2,17,20,1,105,25, +104,144,84,21,35,68,146,36,34,41,10,173,60,187,123,201,115,38,243,92,33, +40,176,63,114,115,146,201,100,158,94,203,36,82,137,168,142,69,36,203,113, +142,114,138,55,176,58,3,103,180,232,29,165,169,254,19,211,135,126,151,203, +178,121,81,43,187,167,172,188,196,0,0,192,218,59,118,62,24,2,186,253,52, +0,0,1,0,73,68,65,84,10,133,36,89,169,168,175,15,140,190,243,155,55,222, +43,177,46,90,187,18,0,167,179,207,143,140,204,135,81,207,133,9,202,101, +153,247,199,35,41,99,133,145,141,39,69,209,204,204,4,83,249,29,17,252,131, +189,35,66,129,229,151,237,181,181,122,109,139,139,95,124,68,235,23,245, +32,109,110,189,237,190,24,216,182,214,152,116,8,16,99,118,81,19,219,239, +125,248,129,7,110,197,34,205,234,236,187,119,239,174,118,59,236,238,70, +171,217,0,128,55,222,124,243,174,221,91,102,98,32,37,252,93,93,93,0,128, +228,68,192,23,84,175,54,102,121,194,102,51,105,2,3,197,178,52,13,24,33, +138,3,69,86,85,69,85,255,255,217,165,4,203,198,190,114,3,134,153,180,70, +163,9,6,131,86,171,53,207,151,1,80,72,154,194,98,2,16,0,134,68,52,52,63, +112,81,145,196,170,150,78,130,34,99,33,191,193,98,47,172,191,208,182,120, +242,201,39,51,233,246,230,254,36,99,63,122,106,18,88,155,53,229,125,239, +226,132,211,136,31,252,200,255,168,210,193,161,211,147,122,167,62,152,172, +228,97,0,0,1,0,73,68,65,84,116,113,34,45,161,50,138,76,7,35,146,26,177, +184,76,47,255,211,63,240,77,155,93,53,13,78,58,230,174,170,6,128,238,115, +87,74,90,106,216,37,66,83,217,54,228,122,97,153,255,79,61,117,159,127,232, +28,152,169,8,104,183,108,223,246,210,115,207,82,214,146,219,27,232,190, +224,44,64,25,0,66,105,169,189,185,238,248,57,1,0,128,97,198,79,142,234, +90,113,48,24,28,154,244,151,242,145,201,209,148,206,110,33,115,44,241,165, +250,155,139,23,99,172,97,72,0,13,168,0,138,68,16,132,34,75,152,36,11,215, +80,124,176,112,3,59,169,48,22,80,24,242,134,171,167,0,4,131,193,100,50, +89,90,90,154,45,64,128,138,84,73,21,34,4,96,12,16,95,152,28,56,119,36,38, +168,50,134,214,45,59,189,131,93,218,181,59,110,72,145,92,238,220,176,253, +126,0,48,25,199,13,148,174,101,75,217,232,149,116,231,166,29,111,255,246, +5,45,39,126,242,147,159,68,40,174,246,236,13,55,213,182,233,196,225,244, +188,150,168,47,177,122,7,204,171,71,207,158,188,18,22,140,101,88,78,0,0, +1,0,73,68,65,84,54,50,19,243,115,163,225,116,145,211,66,150,10,51,22,22, +35,89,237,43,191,57,88,182,251,147,214,42,211,170,134,133,77,59,118,4,253, +253,149,177,241,19,39,78,212,183,182,153,153,184,156,229,12,89,166,226, +2,97,112,27,217,217,209,169,153,210,6,109,200,55,214,59,104,88,83,95,254, +126,250,91,8,20,1,64,208,0,128,11,110,148,91,9,240,95,94,51,89,20,88,150, +205,88,220,12,195,204,205,205,249,253,126,0,8,6,131,4,82,145,156,196,233, +168,154,142,226,116,4,43,130,160,128,167,190,149,53,152,177,148,192,193, +241,68,52,156,55,65,151,10,45,230,178,239,154,182,74,0,48,215,237,248,228, +189,219,43,92,101,46,86,96,24,230,232,128,79,4,189,232,27,74,169,96,47, +229,211,241,94,89,111,51,65,210,88,94,253,231,159,191,203,22,95,136,2,62, +122,178,135,101,168,36,0,68,39,97,9,47,61,47,224,153,215,6,115,121,179, +171,177,99,109,133,9,0,54,110,223,14,0,22,91,99,227,150,157,99,99,99,73, +208,87,118,84,156,189,52,176,48,116,236,148,215,172,0,0,1,0,73,68,65,84, +30,0,2,163,163,42,39,205,245,14,164,17,29,10,249,41,189,21,33,130,97,168, +169,161,238,83,167,186,70,102,23,23,65,72,137,192,112,223,133,137,185,107, +107,34,82,201,84,110,99,10,233,79,82,20,65,16,203,8,212,15,4,150,188,229, +61,23,178,196,205,115,158,115,45,110,0,176,88,44,14,135,131,101,89,150, +101,39,39,39,83,169,20,66,42,82,146,72,12,131,16,1,33,10,114,90,199,82, +145,201,65,187,153,87,211,81,21,112,58,17,203,212,131,132,133,165,240,222, +176,133,247,61,246,216,199,62,246,49,29,75,33,128,164,158,68,132,22,120, +71,160,251,10,93,98,211,176,92,98,97,150,209,26,28,113,136,233,74,204,149, +27,54,175,118,19,8,245,31,239,249,245,31,78,77,140,117,255,205,15,126,240, +230,225,174,177,177,65,40,198,196,133,198,34,0,108,220,185,69,79,229,179, +254,39,62,241,137,114,3,240,174,86,26,180,181,85,214,67,251,246,117,143, +165,217,18,173,111,94,108,223,120,147,129,166,37,4,102,123,101,93,165,155, +225,120,171,158,30,153,94,140,164,134,237,251,0,0,1,0,73,68,65,84,60,197, +162,81,206,90,39,72,209,69,44,74,42,28,140,230,28,187,81,156,8,69,233,240, +193,194,127,33,10,0,75,68,44,33,103,55,55,0,88,44,22,0,208,235,245,24,227, +201,17,64,114,18,196,8,96,0,192,32,167,20,12,160,225,167,6,123,155,218, +219,17,194,248,234,89,37,88,12,189,240,236,31,231,21,101,243,45,119,212, +212,53,88,53,203,125,160,205,53,212,178,79,215,84,89,0,224,166,219,239, +173,175,175,7,128,154,218,85,54,11,71,107,156,148,119,175,148,178,251,244, +200,141,144,222,229,2,192,156,175,247,108,186,179,106,141,102,100,207,169, +13,119,62,114,126,239,94,97,14,249,38,71,251,39,188,91,238,125,180,202, +180,100,228,169,208,141,47,76,111,221,176,1,99,124,252,248,113,71,89,163, +221,170,13,165,198,15,191,243,150,203,98,70,4,139,1,212,180,151,144,133, +133,128,15,84,147,2,64,2,80,20,147,142,120,53,6,3,66,40,25,246,107,117, +60,2,80,1,136,28,212,69,149,239,74,227,164,247,21,224,90,190,209,8,33,85, +85,139,106,40,154,177,196,247,131,0,0,1,0,73,68,65,84,101,9,156,68,114, +4,164,48,72,17,36,167,68,140,234,42,237,90,158,69,98,132,64,114,110,197, +97,197,252,217,47,126,241,220,145,253,103,47,12,231,86,142,132,249,188, +33,44,106,232,100,18,245,245,141,153,116,199,174,7,203,12,0,96,94,183,165, +227,153,95,31,10,233,93,122,116,117,13,139,198,234,40,157,221,185,166,182, +122,77,165,255,252,201,39,62,178,141,1,246,244,249,17,34,49,187,239,232, +72,122,254,242,143,126,244,163,194,192,230,251,81,247,89,134,219,188,121, +115,93,185,213,172,211,86,119,222,118,239,221,119,147,58,23,73,241,122, +57,50,60,19,25,15,240,27,215,173,114,24,217,197,107,129,72,66,145,227,138, +12,177,72,40,232,13,76,206,204,133,146,194,53,68,170,156,78,45,158,40,148, +245,248,242,52,195,10,129,37,191,224,22,114,198,50,186,166,48,106,144,233, +45,103,114,144,56,69,40,113,36,71,145,28,1,53,85,225,214,155,120,165,178, +68,11,82,152,64,202,181,194,128,220,141,157,0,112,207,134,202,240,216,224, +117,184,196,96,119,223,66,106,233,93,70,34,57,0,0,1,0,73,68,65,84,175,55, +121,137,188,145,174,92,179,213,81,209,120,107,103,91,117,243,42,132,16, +80,122,66,239,222,212,90,49,234,21,216,154,213,119,108,114,29,59,54,12, +122,163,167,109,199,35,143,62,32,246,246,39,25,125,67,67,195,247,191,255, +236,201,153,104,104,162,239,232,158,61,239,157,235,187,158,26,226,137,211, +39,225,122,246,202,35,66,174,153,133,49,238,108,171,102,0,220,245,118,85, +101,145,60,215,63,60,30,77,47,246,61,28,9,155,74,170,212,176,55,30,9,203, +148,145,36,8,146,64,170,144,152,158,158,246,135,18,0,170,144,22,113,54, +68,129,85,65,188,110,129,192,202,129,37,207,42,41,106,249,222,80,168,230, +249,122,172,173,94,30,199,44,78,128,130,1,192,200,51,37,141,122,12,170, +42,71,0,128,64,60,66,87,235,204,252,97,92,214,190,174,124,226,178,40,199, +103,187,187,78,95,30,125,232,241,199,1,96,114,54,90,223,116,109,185,119, +94,51,150,146,22,217,98,247,223,191,61,147,184,211,3,0,80,85,95,110,45, +45,127,254,215,123,244,20,142,9,81,114,60,87,53,225,106,0,0,1,0,73,68,65, +84,153,232,104,44,115,233,128,39,205,201,185,20,217,209,119,161,103,109, +21,61,56,58,40,207,158,186,60,133,202,116,134,133,254,179,167,47,12,223, +251,240,195,0,105,49,56,222,235,19,55,21,107,73,174,3,95,72,13,173,173, +174,221,6,147,216,159,34,12,213,214,197,219,167,100,85,198,4,103,53,82, +33,133,34,88,141,199,101,156,159,139,33,130,212,106,181,41,33,38,75,188, +144,142,99,48,138,66,138,97,53,64,144,20,18,21,21,147,196,138,91,54,185, +228,189,37,133,67,181,84,187,115,37,86,46,255,97,140,25,163,91,210,215, +0,72,4,36,9,72,234,168,40,161,38,73,53,65,42,49,82,142,17,132,122,221,180, +70,0,8,1,77,115,2,30,31,27,31,31,12,155,61,158,119,142,15,134,37,20,247, +141,156,61,186,255,244,165,201,220,246,228,201,200,66,63,43,87,94,230,62, +93,189,190,133,69,250,6,187,161,204,83,98,52,218,146,101,78,75,124,18,33, +128,72,136,218,185,254,173,103,246,127,244,43,95,187,60,25,160,194,222, +89,217,243,161,207,125,97,247,198,202,152,43,68,200,0,0,1,0,73,68,65,84, +190,147,99,50,203,30,58,61,130,82,193,153,174,193,230,142,117,80,236,227, +93,33,137,10,153,187,172,110,117,125,77,77,153,219,154,9,126,232,56,102, +110,168,219,171,26,5,65,150,162,1,85,85,37,85,17,83,201,100,34,169,200, +152,160,89,78,163,143,197,147,170,162,164,82,105,21,3,34,136,220,147,97, +86,14,44,121,147,70,81,200,181,46,115,115,136,171,11,212,243,236,98,154, +102,152,234,59,98,83,26,99,228,12,129,84,21,40,200,92,187,169,2,2,76,179, +36,201,44,126,48,185,182,29,80,146,5,142,8,142,244,247,92,153,36,74,121, +143,147,62,45,72,145,217,113,69,97,194,66,188,169,134,159,153,195,77,181, +5,87,18,136,33,196,152,179,99,153,235,108,66,129,242,205,164,55,223,117, +87,166,252,225,174,1,114,236,204,190,223,255,226,130,163,233,137,175,60, +116,41,216,119,228,205,151,191,240,137,219,255,120,133,80,245,21,102,45, +70,9,241,252,133,65,186,205,41,171,227,209,26,79,175,79,221,176,77,123, +233,224,239,84,182,76,181,148,172,201,217,116,155,219,41,19,139,121,0,0, +1,0,73,68,65,84,162,66,99,60,175,76,134,147,28,238,122,135,27,16,66,129, +249,57,25,97,175,63,152,146,137,120,44,109,247,148,38,131,190,12,203,24, +120,141,34,164,5,73,146,20,134,33,86,232,18,165,27,236,156,44,58,207,242, +132,22,66,72,81,148,194,26,50,5,52,142,70,174,238,30,130,192,105,211,26, +2,201,4,82,8,164,144,144,198,88,38,120,155,86,191,120,33,32,162,77,51,87, +78,189,253,250,235,129,209,65,159,40,17,52,226,61,238,214,150,150,133,185, +160,217,168,49,151,118,238,250,232,19,53,156,112,101,124,116,104,60,36, +2,140,15,244,35,132,252,99,87,142,29,56,0,0,32,44,28,56,124,118,36,144, +202,162,46,42,71,243,228,83,230,233,182,53,13,174,250,213,59,30,250,204, +87,190,242,144,25,160,163,197,35,198,98,123,142,95,70,172,141,72,142,133, +146,8,88,150,112,151,212,86,85,245,93,188,18,83,84,209,204,219,81,112,58, +162,187,50,48,30,138,250,131,147,125,71,247,237,43,180,225,10,253,187,194, +121,152,11,22,167,203,233,116,43,152,180,152,12,12,161,127,230,158,0,0, +1,0,73,68,65,84,71,6,189,243,41,41,19,23,80,1,43,130,32,35,132,101,69,93, +190,146,15,16,150,91,233,150,151,200,123,154,75,172,84,42,149,247,5,55, +43,3,8,130,144,100,192,156,45,72,181,82,132,44,241,85,34,95,163,166,253, +105,235,122,194,185,142,55,151,44,86,66,233,230,71,122,101,128,201,217, +148,179,174,217,172,6,82,170,131,96,169,135,63,118,167,71,159,154,140,232, +234,107,44,209,222,209,133,180,136,72,75,101,181,117,252,210,165,24,50, +13,190,247,86,255,124,108,33,46,43,72,122,235,213,227,172,179,164,222,99, +9,143,30,61,179,160,41,183,22,89,121,135,114,66,98,185,253,178,58,29,162, +172,90,141,28,0,112,230,242,213,171,87,143,249,18,171,106,235,210,35,7, +222,125,239,252,84,138,100,99,42,161,211,125,238,115,15,105,82,193,241, +96,178,190,68,127,101,214,176,121,247,246,246,82,250,252,254,163,126,204, +11,200,64,10,129,137,145,94,155,171,52,151,104,88,78,134,226,170,134,187, +238,210,210,220,246,228,17,205,160,215,107,53,44,69,98,73,198,188,78,71, +118,37,145,23,0,0,1,0,73,68,65,84,49,52,72,73,146,161,37,133,36,9,64,4, +73,17,72,85,129,200,220,207,189,146,196,210,251,186,109,34,15,114,71,34, +147,200,68,38,243,10,0,64,50,22,145,133,84,120,224,156,140,65,167,15,197, +173,183,99,69,150,197,180,181,182,138,53,53,82,26,83,110,253,187,63,254, +113,0,56,113,97,172,181,181,74,157,13,207,12,159,243,133,224,160,134,175, +114,201,128,76,0,16,98,20,42,45,171,12,32,0,64,48,63,223,23,132,202,123, +63,181,243,249,95,60,11,80,89,110,215,167,98,94,16,173,253,3,125,243,108, +73,186,209,145,93,105,144,103,8,23,237,99,125,153,41,55,243,174,91,111, +197,24,243,55,109,227,38,3,55,223,182,109,202,118,240,232,217,193,125,199, +140,219,58,93,98,122,82,164,52,180,216,111,210,212,67,90,14,162,178,155, +119,110,59,242,222,113,222,16,27,92,80,7,39,94,115,180,110,221,84,107,185, +120,241,98,123,123,59,18,3,51,62,141,197,200,45,165,251,80,65,188,23,0, +104,86,111,101,116,8,33,21,64,99,180,134,99,113,150,80,16,162,84,205,42, +119,0,0,1,0,73,68,65,84,213,140,40,202,92,34,182,146,216,8,150,186,7,183, +80,53,20,186,75,185,57,12,195,20,22,67,8,37,189,227,201,80,80,195,50,44, +175,167,120,147,40,38,176,170,32,33,17,211,87,24,24,3,195,176,121,138,6, +0,54,173,174,194,24,35,79,211,206,39,58,1,224,185,63,30,44,113,87,142,95, +60,242,138,175,75,54,150,58,89,33,225,79,3,64,60,157,32,20,73,241,212,152, +53,248,150,182,202,36,2,115,169,155,245,37,226,11,125,65,81,213,178,105, +16,195,239,29,60,121,203,174,93,121,29,201,235,90,222,64,230,62,69,8,185, +26,214,56,235,49,66,168,124,205,109,31,95,189,227,63,95,57,168,106,154, +248,104,42,4,70,27,49,19,73,129,134,161,41,171,71,199,65,9,164,98,20,83, +86,223,178,166,44,253,86,247,212,100,116,96,58,16,55,7,98,198,148,111,124, +56,218,86,187,45,143,200,55,180,205,51,144,185,206,221,164,215,33,132,18, +201,36,67,18,24,43,8,136,194,17,249,192,33,95,187,45,35,135,138,230,100, +254,135,66,33,189,94,95,152,31,28,137,254,59,114,0,0,1,0,73,68,65,84,190, +72,166,195,230,234,102,218,96,35,24,142,0,160,88,142,209,240,145,225,139, +137,144,215,228,169,65,87,33,143,5,49,162,50,153,29,205,213,118,147,37, +52,59,70,113,92,75,219,90,103,137,121,182,107,239,92,50,61,53,227,215,154, +248,120,136,168,172,47,9,77,77,200,4,146,104,87,5,61,54,35,144,122,91,101, +34,145,212,198,66,87,38,166,70,199,131,206,234,42,77,177,111,196,133,19, +166,80,9,230,245,183,189,169,154,2,154,9,142,13,19,238,230,18,211,59,111, +30,152,77,40,202,244,220,92,40,108,22,36,213,172,7,210,232,182,18,11,126, +156,158,155,179,183,221,20,14,250,117,116,114,46,160,152,93,30,158,16,50, +223,95,139,66,222,164,45,36,56,66,136,161,105,18,129,36,171,136,32,136, +149,23,82,90,110,245,109,30,20,141,98,103,64,163,209,100,121,34,55,95,18, +211,26,150,194,98,10,75,105,44,165,132,116,114,182,191,107,250,202,89,179, +211,77,75,201,68,36,180,84,4,33,111,140,239,120,224,129,221,187,119,55, +121,12,229,118,231,135,63,243,185,192,189,94,104,0,0,1,0,73,68,65,84,169, +254,254,242,218,86,197,80,106,138,244,190,250,210,75,153,66,8,184,210,182, +210,19,131,49,167,219,132,36,169,239,100,175,162,211,165,35,51,195,67,35, +189,39,222,124,246,217,103,247,95,154,3,128,67,135,14,65,14,187,228,97, +132,37,36,113,174,157,235,90,85,63,214,125,210,92,214,208,92,87,182,107, +203,166,245,107,205,162,119,124,148,102,245,24,112,198,53,85,85,119,163, +39,57,49,208,80,98,182,216,75,42,106,154,73,2,0,201,51,147,243,178,20,3, +0,41,149,76,36,99,217,46,35,85,152,153,152,200,29,130,60,33,154,59,40,36, +73,18,43,111,43,55,44,101,113,191,31,43,59,151,184,193,96,48,157,78,99, +140,99,177,88,238,38,147,240,84,159,150,70,4,205,32,64,160,72,161,185,137, +254,51,239,206,76,77,57,43,235,140,174,178,208,220,36,111,247,100,232,146, +75,190,66,247,36,59,156,25,198,239,236,236,172,42,117,80,152,177,154,68, +65,196,231,250,103,205,37,102,85,53,52,180,175,214,164,117,21,30,101,124, +46,157,78,249,129,101,65,244,7,82,38,124,128,168,0,0,1,0,73,68,65,84,180, +111,208,171,175,46,109,55,197,199,122,47,159,29,158,140,164,25,183,81,166, +57,67,161,214,203,99,157,66,45,15,0,148,70,207,17,216,102,181,185,203,203, +1,64,103,43,173,109,110,78,10,172,203,166,229,245,6,61,35,77,205,199,76, +101,101,110,189,58,21,229,44,6,57,20,167,203,29,60,34,216,249,43,19,42, +45,13,143,37,120,82,136,9,114,42,33,240,90,18,17,16,247,250,34,130,156, +146,177,65,67,2,42,190,198,230,106,252,22,17,57,39,112,173,40,126,186,241, +215,146,66,249,84,232,226,106,181,90,187,221,46,138,162,40,138,193,96,48, +18,89,92,35,129,64,69,114,12,196,152,42,198,85,49,142,101,81,80,144,185, +172,122,110,106,140,64,24,194,147,169,68,44,15,75,46,186,92,246,202,107, +18,66,168,218,99,140,134,230,130,193,32,107,96,144,169,12,1,34,17,90,183, +177,66,11,128,24,163,134,225,54,221,249,160,206,90,185,170,165,193,55,28, +211,218,154,66,100,233,204,64,160,253,230,123,135,123,6,98,170,252,242, +203,47,255,246,183,111,44,100,143,112,162,216,16,0,0,1,0,73,68,65,84,207, +189,138,49,7,151,88,40,134,17,66,24,83,141,87,47,113,203,190,213,217,236, +180,149,148,150,216,117,64,235,107,106,60,193,193,75,167,122,134,163,190, +5,65,134,200,244,64,102,18,150,120,32,20,163,16,143,69,80,9,82,23,152,94, +136,199,194,222,249,64,208,39,148,84,85,9,130,0,170,28,142,166,213,171, +53,11,162,156,219,182,92,10,192,10,99,35,88,202,78,202,181,93,150,49,87, +225,170,160,10,4,2,6,131,65,171,213,234,116,186,100,50,73,81,84,56,28,142, +199,227,74,120,82,163,198,136,204,90,54,69,72,198,98,17,239,156,94,203, +185,107,26,57,6,37,35,33,194,88,162,213,27,49,198,32,6,16,165,133,101,5, +18,20,200,197,144,119,138,224,204,2,216,118,109,107,111,173,206,30,140, +132,17,101,178,179,222,3,7,78,63,244,240,71,28,188,168,213,147,30,60,125, +178,219,191,170,197,60,61,60,117,231,182,213,58,139,97,108,120,146,87,99, +211,26,91,189,46,241,211,31,63,39,42,66,154,49,43,243,125,58,171,43,131, +72,8,12,157,186,112,37,249,125,67,70,0,0,1,0,73,68,65,84,201,57,108,60, +157,219,176,92,93,147,103,170,3,0,16,140,158,215,208,4,110,91,189,78,213, +153,28,70,83,34,52,65,153,60,26,154,36,212,248,152,79,181,234,8,76,1,173, +49,25,80,114,60,152,100,56,189,134,136,207,196,165,74,167,69,21,99,161, +56,82,176,160,229,56,80,69,65,196,12,125,237,252,174,162,99,177,114,160, +136,118,43,202,67,121,114,8,174,167,172,170,170,26,141,38,147,207,243,60, +203,178,162,40,210,52,45,7,71,52,74,8,101,60,16,69,72,38,146,190,133,133, +64,36,166,33,21,179,197,152,78,38,40,107,57,175,55,33,132,80,122,246,205, +151,222,62,209,213,133,56,3,171,51,107,168,197,154,81,65,4,40,183,85,118, +79,109,101,101,37,199,242,110,243,53,149,10,20,111,54,114,6,135,93,140, +198,223,57,120,80,52,151,78,13,123,99,132,108,50,179,108,77,71,179,69,56, +117,222,143,82,115,145,89,159,55,56,27,36,76,214,233,139,117,247,124,250, +212,222,223,197,217,18,225,202,96,223,112,255,76,130,173,244,88,166,78, +158,60,22,36,219,223,61,125,151,0,0,1,0,73,68,65,84,106,43,140,92,241,47, +1,217,246,20,14,170,198,96,2,0,147,134,68,8,217,75,42,226,130,170,165,17, +73,171,11,11,233,82,51,27,150,176,193,104,50,48,169,254,153,88,83,93,165, +86,67,185,12,172,63,46,25,117,154,201,233,89,154,198,4,128,32,35,146,0, +154,94,14,245,138,130,226,22,55,186,186,44,38,147,89,152,64,215,199,63, +98,177,171,11,214,174,230,91,44,22,163,209,72,209,52,129,211,72,142,131, +20,3,41,6,74,74,84,193,225,178,51,28,141,196,24,129,212,92,122,132,68,221, +199,62,245,169,75,103,142,117,95,25,207,102,98,140,51,139,224,148,130,120, +76,182,37,141,213,86,184,94,248,35,132,40,198,178,233,182,219,154,155,155, +55,214,85,105,162,19,11,11,161,242,182,206,192,197,83,7,187,6,197,137,193, +222,201,132,108,46,169,174,171,50,37,19,103,34,86,167,17,254,228,177,15, +233,165,224,165,158,201,36,198,222,201,137,168,4,125,62,169,165,115,67, +153,137,147,164,216,127,155,190,153,86,217,117,20,66,8,147,250,202,82,59, +175,37,99,2,72,4,178,194,0,0,1,0,73,68,65,84,205,209,233,120,88,237,40, +55,35,44,165,85,6,211,186,128,47,40,3,152,173,46,167,213,24,10,69,177,44, +166,82,66,34,158,136,69,67,133,189,94,129,112,227,59,2,10,173,236,66,217, +96,48,24,114,95,204,38,56,131,133,192,105,66,73,32,37,78,40,113,164,8,8, +17,21,78,182,220,197,131,28,37,144,146,115,229,25,114,213,174,2,140,119, +172,46,141,77,141,65,174,34,147,162,7,142,143,231,154,12,121,2,50,251,117, +34,111,2,0,192,230,205,155,1,224,206,39,159,124,228,145,71,106,109,166, +198,50,135,209,104,77,184,29,13,30,98,211,206,219,41,18,75,188,141,72,39, +19,34,6,0,36,137,216,106,244,39,147,67,61,253,19,115,17,193,168,105,178, +138,135,126,119,32,28,153,28,186,178,144,2,17,114,65,142,231,182,231,134, +100,4,0,0,198,234,48,16,156,161,179,214,197,17,154,4,98,205,86,203,92,32, +22,9,45,76,78,78,186,116,26,5,0,0,1,0,197,234,13,58,22,99,72,196,19,152, +160,226,73,1,176,178,72,147,171,40,151,194,248,65,193,132,194,200,187,0, +0,1,0,73,68,65,84,114,39,76,20,13,108,20,133,88,44,86,148,154,140,185,82, +193,152,200,44,81,82,18,58,141,218,92,107,114,24,48,146,227,72,142,35,164, +32,200,253,10,6,128,80,73,227,42,55,203,136,114,124,178,251,228,107,47, +188,0,0,169,171,223,154,150,178,253,243,252,190,60,121,153,219,163,146, +182,117,59,119,238,108,234,88,213,177,233,174,63,254,226,231,62,217,208, +89,233,89,93,170,121,243,149,87,0,33,196,176,14,139,211,227,116,110,218, +122,211,196,124,132,229,104,39,207,184,56,197,183,144,234,234,157,12,36, +227,179,19,99,231,223,61,153,169,48,52,57,58,114,230,240,75,47,253,102, +33,38,33,37,1,5,22,113,209,6,3,0,80,92,166,164,187,204,129,24,158,2,210, +168,215,32,132,98,42,162,9,26,75,138,10,64,51,76,134,32,4,205,233,116,122, +73,18,83,201,100,44,22,79,36,83,43,142,131,174,66,241,85,37,185,58,46,155, +147,77,23,18,40,27,150,204,171,135,54,184,36,173,27,64,34,112,138,192,41, +158,145,60,118,138,192,73,66,137,19,74,130,32,212,232,237,12,0,0,0,1,0, +73,68,65,84,204,5,56,0,0,128,50,225,127,68,83,156,128,167,39,103,102,38, +18,182,138,138,67,103,70,230,130,105,0,0,49,124,228,237,183,51,53,35,209, +223,51,224,91,42,136,10,203,6,250,16,66,235,155,43,1,224,243,159,255,252, +3,187,118,181,54,216,171,214,180,218,53,212,239,254,120,48,198,88,156,236, +108,199,230,59,144,150,222,189,190,92,76,203,0,188,163,26,166,22,40,141, +7,194,115,190,153,169,104,210,59,63,29,17,167,186,47,76,71,164,217,176, +227,195,31,126,96,108,38,129,197,208,204,66,172,208,124,89,198,178,204, +102,122,156,70,157,209,89,94,94,110,48,234,9,130,6,209,187,16,136,0,202, +44,153,0,146,162,1,99,134,32,84,32,56,94,199,80,215,98,4,43,77,211,21,223, +57,9,215,119,62,239,127,182,64,150,171,18,137,68,161,36,64,8,209,52,67, +151,110,78,241,245,36,136,36,136,4,78,81,56,70,128,64,224,20,129,147,20, +77,146,244,226,7,19,140,174,42,58,89,22,56,98,110,106,184,111,112,116,96, +120,216,215,223,51,53,27,70,72,88,69,87,101,185,0,0,1,0,73,68,65,84,184, +50,158,66,232,149,87,14,6,4,9,75,209,217,133,152,80,236,16,72,200,17,168, +75,201,212,188,242,233,168,55,22,139,89,181,148,170,49,221,242,137,167, +14,255,230,223,199,167,22,198,3,9,62,46,136,0,122,187,121,62,24,117,235, +41,105,102,92,214,216,155,58,42,71,135,103,166,69,77,93,149,35,21,27,26, +13,162,114,3,138,249,230,38,102,174,110,14,145,98,35,227,249,103,0,229, +178,84,33,25,51,143,44,70,45,198,184,180,166,190,212,229,225,24,10,33,146, +227,88,88,60,46,19,16,0,73,44,86,177,244,104,126,144,240,190,86,186,221, +176,76,102,33,64,209,87,56,71,35,89,113,27,34,48,65,168,4,8,4,82,8,164, +18,32,0,86,72,173,153,227,23,13,44,68,233,23,70,186,143,28,60,24,158,28, +15,74,50,65,145,188,219,253,225,135,31,85,105,141,197,200,129,28,27,239, +25,8,139,162,81,35,140,140,6,125,227,131,23,207,238,235,238,159,240,143, +245,30,126,251,237,69,38,78,250,78,189,251,38,0,156,236,155,40,244,61,115, +33,47,159,160,222,117,111,121,0,0,1,0,73,68,65,84,184,146,146,146,169,121, +221,157,171,75,0,224,19,159,253,236,99,15,222,150,146,212,6,23,27,16,128, +181,57,53,2,174,212,241,82,34,198,218,45,156,150,159,59,247,60,56,202,57, +83,153,205,69,141,245,157,115,187,121,68,16,67,125,103,207,245,12,247,119, +159,6,130,50,240,72,190,62,244,85,84,144,231,197,17,32,103,14,243,26,26, +35,74,171,229,56,118,113,119,30,77,17,42,94,52,0,0,0,195,202,250,232,6, +239,63,198,157,219,237,92,211,4,93,255,221,173,144,40,4,65,168,64,97,146, +77,178,21,92,106,76,48,182,201,26,143,42,70,69,99,51,178,173,210,26,157, +139,184,40,222,59,62,32,3,204,122,5,123,101,173,1,135,82,138,197,231,157, +185,103,247,86,167,54,61,62,29,19,149,36,103,50,133,124,83,161,180,189, +181,221,169,80,181,81,49,32,141,206,69,73,240,197,105,147,77,59,120,226, +248,104,82,115,238,228,145,133,176,212,212,82,179,212,39,174,66,157,200, +232,236,85,85,85,130,74,85,151,218,178,29,180,235,88,141,17,157,243,210, +213,54,94,100,217,184,53,0,0,1,0,73,68,65,84,175,53,216,77,234,255,161, +238,77,155,36,59,146,3,49,247,56,222,157,103,229,81,103,31,213,119,55,208, +104,0,141,1,6,224,204,240,24,114,150,28,114,204,118,69,19,77,107,70,253, +41,125,212,55,153,140,146,108,101,18,77,92,206,238,74,228,12,135,179,51, +32,6,87,3,125,160,207,234,234,186,43,43,239,124,247,123,17,161,15,175,58, +251,85,102,86,1,144,76,66,173,91,89,217,123,241,34,35,60,60,60,220,61,60, +34,60,118,210,210,202,249,185,245,15,191,148,92,35,164,230,24,225,133,171, +111,105,209,222,122,92,93,169,176,71,47,134,21,236,247,68,99,48,232,182, +90,3,67,231,251,219,15,43,115,11,19,18,40,95,53,30,179,102,144,207,207, +25,65,0,4,100,156,249,126,32,21,104,156,131,82,89,150,111,212,195,255,127, +193,73,156,52,65,244,188,241,52,209,140,52,77,51,127,82,158,201,148,82, +145,239,69,254,104,176,118,215,167,245,20,156,168,254,65,172,47,135,164, +102,86,22,176,113,91,43,206,83,74,199,69,173,94,189,122,233,210,165,97, +162,95,190,236,236,166,206,0,0,1,0,73,68,65,84,186,82,32,129,5,195,205, +205,237,125,31,20,141,7,174,226,225,232,210,239,253,43,136,194,63,253,195, +55,211,184,183,185,79,126,244,78,233,63,255,199,187,162,196,101,32,144, +198,173,141,206,187,127,246,147,239,191,249,198,165,162,134,22,106,84,31, +227,57,173,169,167,97,101,101,50,78,38,53,10,191,252,229,47,237,185,243, +23,86,42,196,170,44,47,52,56,139,7,29,223,94,190,230,61,123,70,75,126,2, +115,75,77,231,238,199,237,197,51,44,72,27,205,34,18,167,121,115,213,218, +217,247,135,173,141,0,97,232,43,211,41,245,214,191,114,170,245,105,122, +142,169,58,33,62,39,140,60,68,164,148,42,145,32,18,36,132,51,10,135,130, +233,116,113,210,108,199,87,94,59,204,124,158,208,253,81,20,205,44,199,239, +108,135,195,62,151,113,50,216,211,156,18,77,2,144,34,9,253,192,185,96,27, +135,187,74,242,142,71,165,212,155,215,151,16,65,205,175,22,150,110,156, +123,75,253,221,63,254,110,121,105,9,185,191,122,161,242,235,255,237,223, +253,55,255,237,127,189,214,114,87,109,20,221,57,251,0,0,1,0,73,68,65,84, +148,126,2,177,18,5,163,82,44,62,189,247,156,232,41,161,243,6,7,4,44,44, +47,119,31,253,118,207,85,159,175,199,127,249,151,127,152,231,167,137,142, +84,74,245,219,7,149,122,35,159,146,107,29,127,255,218,217,203,117,115,252, +67,29,172,215,190,255,86,55,80,21,150,56,13,243,183,255,248,119,177,228, +213,242,13,70,109,25,15,149,14,0,135,155,209,65,201,139,215,223,253,242, +211,223,241,146,229,238,143,214,90,31,146,202,133,119,174,54,64,132,152, +139,148,50,109,63,205,180,205,1,128,48,61,141,60,174,77,6,146,251,182,253, +253,255,29,156,116,55,55,204,18,75,51,25,107,230,221,220,0,16,15,90,36, +116,157,229,203,74,164,204,41,139,192,5,36,220,48,59,207,191,12,236,210, +226,107,239,225,209,213,134,87,175,212,204,94,127,246,227,119,1,128,195, +112,190,62,127,195,127,248,55,127,243,55,151,223,251,201,153,82,49,216, +251,143,130,255,126,163,177,124,243,189,15,44,237,139,15,62,56,255,127, +253,167,45,153,42,69,1,17,119,247,70,27,123,126,197,162,119,194,119,5,18, +0,0,1,0,73,68,65,84,214,187,209,195,15,139,11,213,208,104,208,246,179,155, +31,252,73,30,61,68,92,127,250,56,66,187,57,103,225,148,51,29,0,174,93,187, +49,77,156,170,137,213,43,23,0,224,202,229,213,75,175,223,62,136,128,107, +16,182,62,220,83,13,187,134,217,110,0,180,106,150,14,139,37,75,184,93,190, +116,233,214,130,186,183,150,10,165,184,240,247,247,219,161,162,5,77,85, +235,139,121,76,198,15,110,16,59,166,54,221,47,150,101,29,39,186,78,3,156, +20,217,61,239,2,128,163,92,53,193,112,227,61,147,121,182,80,74,37,113,84, +224,148,80,138,134,165,210,40,73,211,225,254,166,72,147,74,181,22,140,250, +51,237,226,124,95,142,31,86,22,139,0,112,243,123,223,187,249,189,239,1, +64,162,212,165,171,115,191,125,208,46,138,173,127,252,95,255,151,127,251, +215,127,181,213,245,197,193,139,103,91,75,111,158,45,2,64,194,74,214,217, +11,191,119,85,253,143,159,173,175,166,228,201,147,187,157,160,124,174,18, +127,120,247,249,25,39,89,58,127,25,0,32,25,61,125,186,47,16,215,182,191, +57,3,172,0,0,1,0,73,68,65,84,7,243,53,27,142,81,220,39,192,165,215,111, +3,64,93,7,0,88,94,49,69,161,89,159,179,0,220,177,222,209,24,75,147,36,148, +177,2,142,120,232,230,216,222,234,48,46,61,187,60,18,157,229,50,167,70, +17,0,164,76,8,225,74,41,191,119,208,75,248,52,39,157,54,190,153,134,147, +34,187,79,168,240,105,66,143,237,235,108,201,118,58,63,130,36,148,168,52, +84,73,164,146,208,109,111,175,125,254,219,71,159,127,20,9,85,152,63,211, +63,216,203,142,18,28,231,211,59,142,124,28,241,218,237,159,148,120,241, +234,219,183,110,92,93,253,159,254,143,95,140,162,116,105,25,159,125,246, +207,136,232,238,236,164,105,207,169,148,0,200,242,90,203,47,148,223,249, +195,159,46,219,230,141,15,126,244,240,201,243,237,167,79,62,250,229,223, +255,15,255,253,127,215,137,184,83,176,201,49,53,42,165,134,59,143,38,80, +202,127,157,64,233,202,155,127,112,253,226,74,189,98,41,94,88,93,93,82, +10,73,150,199,170,170,222,102,222,170,49,139,205,122,201,214,237,202,176, +63,216,223,57,120,124,179,16,88,0,0,1,0,73,68,65,84,240,224,193,131,71, +235,222,160,115,176,183,183,223,238,217,165,146,133,161,124,73,144,124, +119,156,114,152,33,147,166,217,101,90,109,79,128,16,130,82,58,24,12,194, +48,108,54,155,190,239,155,166,9,0,8,10,85,162,98,79,37,1,0,128,72,34,9, +118,125,177,181,253,226,226,220,59,241,206,163,208,180,237,66,17,167,196, +18,204,18,129,19,152,188,123,227,60,0,204,157,133,55,0,0,32,177,223,128, +71,79,254,254,239,255,190,159,90,127,252,198,252,23,47,58,191,89,91,243, +10,70,25,177,96,49,167,82,179,76,190,104,177,148,153,123,189,244,175,255, +237,207,254,195,23,207,205,176,103,90,136,0,219,247,63,90,186,241,46,0, +244,219,173,114,237,208,108,186,251,232,126,133,46,95,111,218,19,109,207, +247,235,12,196,168,57,55,103,204,205,149,16,177,80,169,40,163,100,45,186, +95,220,123,146,58,171,89,6,110,104,140,27,134,198,12,67,179,139,12,201, +98,153,137,65,183,19,74,162,32,17,245,178,163,99,34,49,127,23,234,9,213, +157,30,56,105,181,36,131,19,144,126,105,35,74,68,0,0,1,0,73,68,65,84,101, +15,18,82,42,149,40,165,166,105,182,219,237,52,77,7,131,65,191,223,71,148, +40,67,149,120,42,241,32,241,32,141,13,78,29,6,149,122,83,37,129,12,135, +113,120,120,127,30,196,189,227,106,249,134,192,139,11,175,191,243,67,219, +182,87,47,157,111,156,123,107,9,55,59,161,237,47,212,172,12,83,64,4,176, +25,71,195,90,185,118,11,172,66,247,238,227,145,64,68,4,244,54,159,140,254, +247,191,249,155,127,250,228,249,139,175,62,125,254,248,238,221,39,109,68, +255,192,173,229,101,65,222,193,49,97,222,77,147,37,75,175,54,154,115,69, +195,119,123,26,197,148,179,67,167,226,225,56,1,64,32,86,41,238,117,218, +29,63,34,90,115,121,165,226,152,18,8,215,244,56,149,211,245,142,171,59, +133,108,4,199,89,220,211,41,211,255,39,242,0,128,227,56,227,148,78,167, +67,8,65,162,80,70,144,184,217,213,102,32,34,4,108,181,90,205,229,21,149, +216,72,20,140,231,110,233,240,87,255,231,111,186,113,124,253,214,59,11, +75,43,37,125,210,191,2,83,54,220,204,41,204,91,74,159,11,0,0,1,0,73,68, +65,84,239,255,254,239,103,137,215,127,248,39,215,1,190,218,234,151,164, +247,82,185,32,0,98,220,71,0,12,253,186,12,189,20,0,0,227,254,253,135,143, +175,255,193,219,107,119,191,228,231,241,241,167,119,87,223,104,132,238, +54,115,154,55,230,109,152,37,29,225,27,116,231,152,86,86,161,220,217,28, +220,124,163,194,1,20,175,20,29,223,164,5,141,107,110,0,65,191,61,95,179, +246,54,187,202,52,56,131,108,2,76,24,79,162,20,116,45,223,246,211,15,223, +238,46,165,153,68,156,152,193,102,25,178,216,55,251,155,136,34,36,73,170, +136,5,0,32,227,88,66,177,90,110,183,246,74,54,193,252,69,74,128,253,72, +255,233,127,245,231,255,225,111,255,118,16,144,119,111,44,193,44,182,30, +39,78,91,111,19,186,47,123,189,186,84,66,44,39,169,191,122,249,188,109, +52,155,139,222,96,239,96,253,222,199,221,199,56,170,148,157,236,154,43, +145,46,191,249,254,227,199,119,237,194,50,179,12,171,121,254,237,235,205, +225,139,39,133,165,27,0,254,250,135,255,242,209,198,193,143,127,250,179, +36,146,40,199,0,0,1,0,73,68,65,84,120,231,201,194,229,155,211,102,226,88, +68,77,51,122,246,127,97,229,210,194,203,48,224,136,216,152,179,1,108,0, +32,105,145,98,186,213,234,40,211,184,184,84,13,5,140,130,200,1,144,105, +2,138,159,160,200,78,54,34,191,43,152,125,74,9,242,19,242,89,180,203,231, +207,75,251,124,34,0,112,77,199,56,70,145,40,5,8,10,100,138,136,115,37,211, +41,216,42,245,178,45,18,227,210,234,103,175,1,192,251,215,230,239,109,109, +193,141,165,87,56,248,47,238,61,56,24,37,137,61,119,238,141,43,139,211, +20,156,73,241,60,211,115,102,53,22,45,0,184,120,237,252,221,209,65,180, +249,2,203,231,150,174,87,212,78,7,17,64,51,120,255,241,207,254,234,175, +43,26,220,255,221,135,170,86,3,0,146,68,5,219,24,108,63,120,142,141,191, +250,171,63,124,248,213,151,59,247,159,62,216,140,223,253,209,53,135,217, +249,122,191,22,135,137,249,236,56,167,83,44,32,162,237,199,205,102,51,141, +221,253,173,23,177,68,0,153,196,49,242,194,9,146,239,180,241,80,6,51,180, +27,28,7,33,20,130,0,0,1,0,73,68,65,84,237,134,153,22,247,113,67,16,142, +182,83,47,204,145,209,125,162,178,107,220,148,169,211,115,203,197,162,3, +150,77,64,248,4,245,60,77,178,231,198,133,43,205,253,181,56,245,219,79, +30,222,125,188,249,39,63,251,89,138,248,224,193,243,210,98,37,24,108,186, +23,22,29,54,137,192,244,188,239,4,21,220,92,90,74,138,231,223,190,214,240, +133,239,58,165,198,66,227,249,206,112,137,39,255,242,203,95,81,187,212, +208,15,127,164,0,252,48,218,108,199,78,113,25,0,184,219,38,205,107,73,111, +237,238,102,109,73,118,90,123,159,191,232,240,63,249,87,127,58,216,188, +191,124,225,53,0,232,180,90,197,70,99,188,68,147,39,221,113,106,58,251, +63,63,63,175,148,82,50,213,117,157,129,70,68,58,136,149,110,144,9,58,207, +156,53,159,42,150,154,177,103,242,132,193,61,145,56,158,160,78,135,61,204, +94,89,113,41,214,231,0,82,132,16,33,178,53,177,88,103,142,158,146,164,71, +100,128,68,193,145,97,13,160,148,162,76,75,212,222,238,211,181,103,251, +197,197,243,255,254,159,239,14,42,32,93,0,0,1,0,73,68,65,84,238,187,201, +153,155,31,252,193,143,127,124,198,198,141,205,222,24,1,165,20,164,222, +230,250,54,28,101,113,200,241,214,180,185,218,88,90,90,106,216,0,96,81, +171,62,95,7,128,115,11,133,165,27,223,211,82,151,16,92,56,115,46,227,104, +195,176,70,187,109,147,199,145,223,7,128,148,58,118,181,250,7,63,188,214, +185,191,215,122,114,103,225,214,207,94,59,51,183,190,215,94,123,188,243, +47,159,221,95,111,15,58,123,173,116,106,210,126,92,79,79,160,135,136,204, +40,75,41,29,219,142,220,97,168,12,141,145,124,230,105,47,192,116,55,125, +231,240,173,239,230,206,195,88,175,101,110,161,9,243,5,0,184,85,38,205, +55,35,99,137,64,76,33,70,21,18,136,136,138,8,132,68,133,140,17,202,198, +46,56,4,64,64,68,145,38,58,57,232,186,88,93,125,251,157,155,85,24,236,239, +141,50,94,14,168,244,219,46,36,195,246,139,167,31,125,116,7,17,33,117,119, +55,247,146,89,218,22,142,14,232,188,77,211,172,90,121,36,179,255,127,244, +211,159,254,248,253,55,154,205,249,213,48,109,192,27,0,0,1,0,73,68,65,84, +197,34,0,176,165,235,224,30,52,154,133,116,247,254,207,127,254,115,46,125, +183,221,166,186,137,128,195,194,82,197,70,141,235,238,160,53,234,240,196, +117,61,119,116,176,253,248,163,143,191,232,248,2,101,212,238,5,48,5,121, +255,208,180,140,71,196,133,133,133,82,65,39,220,172,20,237,108,27,210,88, +164,157,66,190,153,134,99,181,219,180,80,61,110,90,135,136,140,177,105, +155,0,0,40,101,70,237,114,192,11,228,197,255,140,0,0,9,0,32,74,9,68,2,33, +70,81,183,156,195,204,204,238,110,222,249,56,222,188,185,228,244,19,97, +81,75,47,150,162,4,74,49,245,221,104,111,235,206,175,186,15,177,176,88, +180,248,218,239,238,116,221,104,32,229,195,23,157,101,173,181,191,121,47, +85,111,185,189,131,74,165,62,205,202,211,207,144,19,168,51,31,106,149,236, +104,67,177,236,244,156,230,15,47,94,192,23,61,63,41,148,233,198,87,159, +252,110,174,114,99,85,237,118,16,0,17,76,94,184,112,53,158,191,118,153, +41,21,152,206,91,239,188,97,2,64,58,218,125,238,85,139,189,125,202,139, +0,0,1,0,73,68,65,84,234,160,45,230,231,139,185,185,158,0,33,118,54,119, +151,206,157,155,166,246,56,155,110,29,9,212,113,156,217,112,10,97,246,78, +183,252,32,206,167,231,179,229,59,32,77,211,113,158,60,231,41,165,40,165, +154,93,23,181,219,65,249,45,130,138,160,74,156,75,2,181,216,185,128,229, +85,206,95,94,174,168,85,43,150,16,81,244,229,179,126,121,121,169,164,252, +160,189,127,239,179,59,190,166,168,173,3,162,163,167,24,25,203,43,229,24, +227,150,171,44,11,182,55,118,5,101,186,89,252,213,135,159,123,110,255,147, +79,62,249,205,111,62,135,188,238,8,118,91,207,31,127,248,225,135,211,109, +60,78,48,228,255,223,88,93,253,170,131,75,215,110,125,240,193,7,141,229, +11,63,252,55,127,185,55,100,55,87,106,38,34,40,5,136,144,198,115,151,46, +63,252,237,23,119,159,117,202,181,165,67,119,17,179,76,234,7,238,193,110, +215,13,250,253,254,176,243,197,71,247,65,196,237,86,199,107,183,6,94,176, +185,215,86,50,238,119,143,92,37,125,156,101,61,102,178,124,167,76,104,240, +83,228,89,248,57,0,0,1,0,73,68,65,84,2,51,236,164,147,71,192,196,108,37, +123,224,156,79,171,115,68,76,227,40,244,70,195,173,199,3,114,206,167,43, +126,229,93,175,250,254,200,186,169,26,223,163,11,239,235,229,149,124,231, +189,255,199,127,252,163,31,253,168,178,124,241,220,234,98,179,217,88,173, +39,241,160,213,101,118,125,190,184,120,249,214,219,239,125,96,7,173,40, +22,92,183,66,17,10,48,246,215,183,176,52,87,105,156,251,209,247,223,92, +94,92,236,116,58,81,127,103,152,0,38,253,95,254,221,223,41,165,182,186, +254,227,47,239,247,70,163,123,143,15,38,244,205,180,245,58,253,92,92,188, +170,31,238,83,132,138,109,0,192,95,252,197,15,28,102,47,44,207,115,196, +185,249,101,36,201,151,191,248,39,187,110,148,11,58,36,226,101,248,85,93, +47,248,163,97,138,186,240,221,81,24,155,243,21,238,186,189,97,160,14,118, +130,51,87,175,185,158,135,50,25,13,92,241,18,13,223,11,228,81,227,105,218, +188,131,220,40,157,105,185,126,231,240,141,118,186,77,76,232,166,7,244, +104,52,154,216,54,153,229,241,58,193,38,130,232,0,0,1,0,73,68,65,84,187, +126,183,133,193,64,68,190,206,168,48,154,160,52,21,251,80,60,167,89,69, +254,50,86,73,94,185,52,170,14,39,192,13,187,216,60,115,118,117,85,8,125, +165,89,216,107,39,243,11,115,75,117,246,233,157,245,133,58,87,230,202,239, +189,255,166,23,196,203,11,118,107,189,87,63,83,237,61,125,170,36,137,227, +158,95,156,135,231,95,116,88,243,206,71,255,232,99,137,208,210,239,253, +225,7,119,191,120,144,88,197,166,163,231,167,117,57,189,115,172,11,180, +106,113,156,154,6,58,69,135,0,104,134,169,233,250,245,55,94,123,188,117, +112,246,252,57,58,218,125,218,245,45,171,104,114,18,244,183,187,67,103, +185,128,30,1,221,42,87,173,240,209,206,240,220,249,243,169,119,176,227, +39,171,243,115,42,30,238,238,236,128,110,200,40,52,116,26,132,169,102,104, +100,138,99,32,167,221,78,176,49,78,9,28,187,143,59,131,227,28,72,19,226, +71,215,245,153,45,76,70,29,240,123,78,99,165,88,169,25,133,10,151,177,102, +152,150,83,116,183,30,245,55,31,195,44,35,253,16,232,225,69,19,148,166, +0,0,1,0,73,68,65,84,13,141,87,206,85,56,43,156,93,44,50,0,86,104,46,56, +170,184,114,73,182,159,253,226,23,191,120,239,189,235,58,64,145,120,34, +117,183,54,135,93,63,214,44,123,127,127,127,179,139,239,190,255,198,191, +254,233,15,108,4,137,8,136,231,139,202,125,254,226,206,199,159,174,61,126, +22,166,254,43,118,73,6,143,215,58,39,76,247,96,86,207,141,77,224,106,169, +136,136,63,120,231,141,154,205,170,43,11,5,198,24,65,0,176,237,5,87,66, +209,225,161,34,92,231,193,8,246,251,145,201,96,110,105,174,68,98,211,52, +53,179,88,170,44,250,110,191,181,223,233,14,34,133,232,141,188,137,74,243, +164,158,38,236,105,83,109,112,66,76,183,252,144,157,73,77,200,201,146,177, +76,154,200,51,220,93,55,153,226,133,57,106,216,72,25,161,108,216,222,13, +189,161,99,89,34,24,153,245,21,56,94,74,231,109,127,199,210,8,0,34,54,151, +22,117,166,113,8,35,160,95,174,181,207,172,174,218,166,127,111,203,37,50, +188,254,254,143,206,21,147,221,29,175,15,218,226,202,146,33,134,219,48, +88,211,191,0,0,1,0,73,68,65,84,173,48,29,236,61,125,241,194,34,50,64,236, +116,146,129,31,148,180,209,112,175,245,241,151,155,231,207,47,42,149,10, +197,117,139,211,163,12,125,156,157,59,237,212,25,83,128,25,133,122,181, +172,51,2,0,186,83,160,2,74,37,125,179,39,154,85,190,251,162,199,117,112, +202,5,211,44,149,74,229,207,190,120,84,107,20,189,97,180,184,88,241,2,202, +25,4,126,148,134,163,48,28,142,2,233,88,102,228,187,148,107,175,132,80, +26,33,101,227,234,102,15,188,83,0,95,19,217,125,130,99,142,203,102,24,198, +248,98,46,56,66,113,73,40,85,105,168,210,88,165,209,160,181,177,113,239, +227,181,123,159,165,132,57,181,69,183,223,157,169,70,225,40,213,166,13, +204,249,75,55,110,223,190,189,88,47,107,0,118,243,186,74,216,194,202,252, +167,255,249,151,31,222,127,33,52,237,134,37,62,253,248,99,5,128,8,72,72, +177,88,220,80,165,119,111,45,21,235,203,111,126,240,174,187,223,127,250, +100,139,37,61,55,26,124,245,197,103,159,174,237,17,225,125,254,219,223, +78,182,58,117,91,99,82,210,160,0,0,1,0,73,68,65,84,221,76,122,37,95,62, +120,144,167,198,196,116,100,154,189,0,96,97,169,172,180,66,189,92,212,9, +84,151,106,23,22,138,251,251,222,139,141,231,27,27,27,103,42,78,10,8,169, +4,0,110,152,181,138,73,1,145,91,86,117,69,67,145,132,35,119,224,14,6,3, +63,78,149,82,74,137,56,78,71,35,79,156,86,165,54,134,217,55,224,76,40,230, +236,97,66,169,229,115,134,97,152,36,73,16,4,89,148,146,220,184,81,168,18, +149,134,42,13,85,26,129,72,99,9,188,56,215,217,219,34,154,22,183,158,7, +190,55,81,203,184,46,56,70,183,142,211,111,94,57,147,61,188,247,198,149, +165,149,75,101,199,153,95,185,194,181,210,242,141,179,36,116,63,252,248, +126,128,8,86,243,173,239,125,239,245,171,151,56,0,34,22,12,76,89,145,207, +95,121,255,189,75,95,238,134,23,175,95,44,74,255,224,249,214,32,12,255, +233,159,62,30,38,208,219,120,0,0,143,158,111,64,116,176,177,59,2,128,184, +191,181,57,18,19,184,225,209,117,146,60,86,121,246,90,170,90,8,90,181,86, +118,74,168,36,251,0,0,1,0,73,68,65,84,106,75,23,206,204,149,45,22,134,225, +32,5,141,112,75,139,20,188,220,179,132,0,0,26,85,148,144,32,138,208,112, +68,26,135,145,200,170,17,18,41,129,241,238,128,83,168,215,50,152,45,147, +242,131,111,38,3,193,209,14,54,77,179,88,44,102,119,78,12,135,67,215,117, +149,82,174,235,34,42,144,9,36,161,74,67,149,4,32,19,141,145,162,201,157, +82,69,165,145,140,220,56,244,179,50,49,61,140,44,48,115,218,114,156,201, +153,23,153,183,111,223,190,178,186,250,131,55,206,166,113,98,24,134,138, +35,97,85,178,79,103,14,183,68,2,40,197,197,200,169,148,152,110,12,158,142, +2,0,20,98,235,241,122,128,200,149,187,189,215,217,120,254,252,223,255,187, +191,109,247,7,187,187,173,167,15,63,3,136,90,143,182,86,47,92,62,161,249, +51,83,102,234,160,82,109,229,242,229,203,118,177,72,9,47,54,106,91,123, +109,203,228,240,138,159,16,0,133,36,200,249,92,165,152,29,145,84,72,184, +70,144,32,5,41,132,72,211,248,229,125,203,167,14,78,218,11,48,109,89,79, +100,252,145,81,127,0,0,1,0,73,68,65,84,24,147,44,8,2,199,113,178,93,37, +174,235,50,198,186,221,110,22,195,14,101,12,194,7,80,32,34,37,18,130,164, +219,110,207,53,155,42,13,1,94,237,42,129,212,251,228,195,59,131,36,89,189, +114,163,222,152,119,180,87,85,228,49,201,27,10,121,52,32,199,85,50,13,0, +32,17,229,51,203,77,103,206,57,220,127,207,156,149,69,0,128,198,124,245, +238,78,239,179,221,29,66,150,52,0,100,52,214,137,99,154,163,246,102,184, +177,169,155,55,223,251,139,149,57,93,109,124,245,159,17,96,115,191,253, +124,0,111,148,117,191,187,183,177,190,115,245,173,183,166,237,167,105,124, +242,98,105,98,16,34,226,124,173,160,148,98,70,105,117,165,4,0,32,19,203, +177,8,61,44,132,32,136,84,142,185,75,137,36,18,74,165,146,18,153,10,129, +148,32,72,165,104,214,230,83,165,239,142,189,223,45,131,9,59,41,63,236, +242,175,249,56,110,142,227,24,134,49,55,55,87,169,84,8,1,132,24,68,0,105, +0,34,0,25,199,10,12,199,238,181,219,144,4,132,200,60,41,6,33,251,189,81, +185,135,147,0,0,1,0,73,68,65,84,63,250,163,231,143,238,175,109,236,143, +107,65,68,20,1,156,184,210,148,183,168,148,82,86,253,202,123,239,189,87, +168,47,173,20,245,102,179,122,152,137,23,151,23,138,12,177,176,176,170, +90,95,181,92,94,185,218,52,0,129,217,58,163,23,111,190,215,92,186,248,71, +239,172,144,180,91,48,0,17,207,158,61,115,233,218,219,36,242,210,146,83, +130,225,246,179,251,59,7,131,251,207,54,251,219,79,97,170,11,103,106,156, +49,233,38,168,151,127,0,0,32,188,80,180,109,219,34,0,134,101,25,134,70, +149,55,116,125,149,213,160,36,40,101,105,52,78,132,2,160,76,163,136,82, +41,56,158,26,223,21,124,187,251,221,242,207,249,156,65,48,99,165,9,178, +59,237,84,140,34,4,17,160,12,80,38,136,164,90,50,139,69,3,68,144,237,79, +26,151,83,93,90,69,128,91,171,181,176,189,127,4,153,164,127,208,241,5,128, +74,189,147,173,132,49,86,136,248,246,219,151,180,41,175,35,5,0,106,126, +240,231,127,241,147,159,188,119,99,209,65,145,248,160,45,175,148,63,253, +79,63,191,52,114,45,197,0,0,1,0,73,68,65,84,117,235,214,150,203,156,116, +203,139,94,254,10,161,102,130,166,51,72,131,78,92,184,245,251,127,32,68, +176,254,224,217,239,254,249,159,239,62,57,216,126,248,217,254,206,139,47, +191,252,50,47,123,84,242,42,122,36,76,173,247,229,229,235,180,196,66,165, +52,93,231,76,99,140,197,81,156,13,50,164,156,130,96,186,14,74,34,33,8,10, +240,176,220,19,232,240,157,192,215,239,190,133,175,91,51,1,0,195,152,125, +219,53,183,74,8,9,170,8,101,128,50,210,185,156,175,89,5,19,138,22,193,100, +128,248,202,232,204,86,111,1,160,186,114,174,202,89,34,130,214,179,251, +191,254,135,127,216,57,112,19,128,237,214,72,0,160,8,183,95,236,134,179, +136,216,109,207,216,188,59,49,171,154,152,129,170,214,139,207,127,251,168, +182,80,46,159,189,250,231,255,250,207,126,254,243,159,7,49,89,62,119,241, +179,95,255,243,199,247,158,2,96,26,36,132,178,52,78,83,170,43,99,209,214, +225,230,106,205,211,22,193,170,138,254,122,36,211,39,143,159,71,110,167, +31,65,234,30,28,106,249,209,154,122,26,157,0,0,1,0,73,68,65,84,193,195, +181,78,190,198,227,140,167,188,176,31,39,102,147,53,33,4,165,154,161,49, +0,64,66,117,221,24,185,158,97,26,57,11,233,191,132,213,18,152,165,224,97, +214,146,66,126,96,69,81,52,157,31,17,153,211,144,128,68,197,68,249,8,177, +161,201,249,26,183,117,137,34,68,25,146,35,247,185,190,124,98,140,167,170, +125,176,185,181,213,187,249,195,31,63,126,177,211,241,211,113,248,137,110, +187,63,236,119,84,110,80,42,165,32,117,183,214,119,38,2,44,29,215,224,124, +23,26,213,133,75,13,135,49,91,41,245,211,159,254,244,98,211,169,158,185, +82,43,232,165,130,53,128,170,30,125,57,80,166,62,10,92,116,72,220,242,34, +80,169,32,78,229,214,237,215,10,130,250,188,168,151,207,220,126,243,198, +179,157,246,238,122,235,195,15,63,252,236,209,102,16,133,237,253,205,94, +32,166,61,23,175,228,214,137,184,81,110,22,203,115,72,53,131,103,93,131, +148,105,133,66,230,245,204,66,187,18,56,101,167,111,51,56,214,199,61,209, +242,153,118,229,56,103,254,228,100,62,63,51,75,26,193,70,242,0,0,1,0,73, +68,65,84,194,104,40,144,4,18,2,41,129,152,64,66,84,130,42,34,42,38,148, +144,220,101,149,128,8,74,41,33,82,78,122,67,31,203,203,22,87,101,112,187, +109,47,155,118,101,197,118,54,214,183,158,63,249,228,147,79,94,49,147,136, +16,49,207,73,40,163,60,50,51,193,105,156,189,118,251,53,155,1,61,58,237, +186,245,238,187,87,206,45,21,45,251,214,251,127,22,80,231,92,21,183,123, +105,17,218,31,255,226,31,144,51,179,251,85,152,64,192,148,129,224,20,75, +64,89,50,26,248,222,176,208,104,92,168,89,133,106,35,77,162,12,207,222, +65,39,43,54,5,49,65,88,56,170,1,167,113,43,149,108,114,244,171,82,202,48, +52,4,64,146,113,212,233,50,183,225,132,243,110,106,150,75,41,131,9,187, +27,0,226,56,158,169,254,41,101,172,126,61,180,206,35,40,4,137,144,162,74, +16,18,2,177,2,65,52,91,211,173,151,134,167,57,220,127,241,224,222,61,191, +221,114,133,164,196,208,108,39,22,232,36,68,4,73,86,107,22,98,9,21,125, +177,209,34,169,247,224,249,30,164,222,198,62,109,151,0,0,1,0,73,68,65,84, +231,255,244,203,7,15,159,109,245,142,68,88,83,169,219,110,117,197,81,229, +50,45,18,166,219,53,49,237,90,41,23,106,23,151,183,215,30,46,93,184,250, +147,63,253,241,239,30,180,207,94,59,251,240,206,151,93,48,76,132,44,183, +78,140,198,107,111,200,81,58,140,57,0,44,174,92,170,90,76,41,21,118,135, +169,8,159,127,241,85,144,38,222,104,216,218,121,121,209,175,136,94,60,121, +178,182,246,56,76,100,232,251,144,147,241,19,29,1,83,108,119,216,103,135, +146,233,116,193,177,94,128,9,201,156,79,156,30,13,218,97,12,178,25,163, +132,59,13,106,206,201,3,20,66,105,222,179,76,48,39,128,169,177,136,133, +37,198,95,46,145,106,165,130,158,166,81,244,120,35,45,53,151,245,104,167, +189,255,228,177,215,98,28,104,209,22,9,2,128,72,18,68,4,195,44,52,230,223, +184,168,255,195,175,159,85,153,9,149,243,189,254,51,169,10,194,239,62,122, +250,236,202,205,119,246,186,94,25,250,91,47,98,167,81,165,249,249,65,226, +1,127,117,86,100,98,50,165,142,113,83,241,178,7,47,212,0,0,1,0,73,68,65, +84,194,194,149,69,40,54,86,0,224,123,175,95,2,0,125,251,163,230,226,213, +178,45,71,93,165,136,142,178,219,219,217,56,63,175,63,221,57,40,151,202, +99,205,83,158,99,253,193,200,40,67,232,250,194,75,147,225,208,171,213,211, +94,155,51,168,158,191,84,96,73,207,21,42,240,184,105,146,151,149,74,0,156, +218,176,59,97,237,157,90,248,118,55,42,195,172,213,92,0,24,239,79,154,0, +165,20,33,100,184,183,65,180,85,33,18,133,76,17,166,144,81,84,196,57,67, +117,39,175,73,111,125,255,251,74,169,181,205,206,226,82,13,6,33,167,124, +251,96,52,212,202,23,230,155,173,135,157,56,133,23,107,123,1,106,101,32, +104,27,160,241,121,42,55,123,172,84,41,191,117,253,173,251,15,90,128,196, +41,150,126,249,203,15,177,50,255,206,66,58,232,108,220,123,104,222,190, +122,126,140,201,222,243,181,132,208,173,86,255,251,223,255,126,190,33,211, +92,149,199,31,145,157,89,94,206,127,186,245,238,187,217,215,5,26,33,211, +235,245,138,165,70,47,218,3,167,186,160,113,91,70,195,38,21,66,176,0,0, +1,0,73,68,65,84,81,36,10,58,213,76,109,175,7,142,85,146,163,161,212,106, +115,13,57,24,186,72,245,36,242,252,94,151,20,75,38,19,29,183,95,168,215, +41,128,59,26,81,66,244,169,181,203,9,244,114,88,157,58,222,58,54,18,215, +244,243,113,121,224,232,221,220,249,79,113,20,4,163,129,114,59,201,224, +128,165,81,98,158,77,248,66,146,154,194,89,101,70,225,213,54,183,156,24, +184,112,166,102,80,48,202,205,198,234,245,55,223,125,119,169,185,48,103, +57,122,178,119,239,55,191,26,38,90,108,88,44,25,33,0,68,145,205,208,36, +82,4,49,0,32,0,229,154,242,189,197,57,210,31,246,244,114,29,64,25,186,234, +15,59,31,254,226,23,27,59,221,80,138,214,129,251,98,127,100,219,246,175, +190,92,203,7,31,61,162,145,83,127,66,215,76,107,249,241,167,146,163,3,192, +242,226,92,117,233,28,34,171,55,231,116,110,24,106,35,76,20,0,80,195,242, +188,16,120,89,38,17,53,13,198,181,222,214,3,106,216,229,138,5,113,208,109, +239,26,6,163,148,237,239,237,109,190,216,241,252,24,125,141,229,253,0,0, +1,0,73,68,65,84,40,75,162,240,100,22,57,109,243,181,60,28,43,147,38,68, +253,204,196,241,112,17,66,140,41,158,183,147,146,81,55,242,60,167,182,40, +147,136,106,166,72,98,5,138,90,246,104,239,69,108,58,229,165,243,19,229, +191,234,54,114,200,100,103,23,10,8,176,176,186,124,165,190,164,148,218, +29,132,201,102,103,235,241,151,251,107,156,150,107,87,75,228,249,214,11, +177,188,226,38,81,119,115,179,3,11,131,238,93,150,148,4,64,181,126,254, +210,74,101,251,206,158,185,176,240,98,125,27,104,162,104,181,121,118,233, +242,130,243,233,39,119,133,8,128,154,19,109,1,0,191,181,215,9,163,190,176, +111,94,62,59,179,237,51,53,35,0,220,184,113,24,213,228,220,213,219,135, +63,160,6,141,83,205,52,70,138,53,109,232,189,112,77,171,36,252,144,214, +75,103,230,173,225,168,59,8,165,110,22,230,170,206,96,239,160,80,155,243, +6,125,138,73,18,121,97,172,106,181,26,0,120,158,55,222,245,37,69,74,40, +203,211,246,180,73,166,147,226,39,141,135,224,68,103,143,179,141,255,231, +3,106,44,96,48,93,0,0,1,0,73,68,65,84,65,174,3,18,127,164,171,136,176,42, +213,77,80,10,8,1,64,175,119,96,234,44,14,6,19,69,229,43,157,112,183,20, +235,135,199,223,22,74,198,70,171,96,218,88,111,212,137,93,170,206,161,151, +166,95,62,90,31,133,230,200,139,101,178,247,193,59,175,127,250,160,5,0, +128,0,66,12,71,59,195,80,199,4,90,187,136,188,60,223,112,0,224,237,219, +175,187,59,143,30,181,130,65,172,191,246,214,89,147,154,227,138,122,7,163, +157,254,72,26,225,40,62,91,200,173,216,204,52,161,242,15,179,172,46,190, +176,80,179,57,41,93,184,32,84,18,152,102,193,168,248,157,190,239,160,109, +217,197,130,211,234,69,92,42,0,0,110,51,10,12,65,1,73,128,233,44,73,132, +10,135,125,69,48,74,132,198,41,2,8,145,38,169,224,154,78,78,235,182,238, +147,226,39,77,104,232,19,26,112,220,29,191,66,164,58,163,74,28,198,196, +137,67,127,212,218,110,239,237,156,123,237,182,101,21,2,119,100,21,38,3, +121,31,71,160,113,237,149,70,35,49,27,23,87,202,89,226,242,249,43,129,176, +28,240,168,0,0,1,0,73,68,65,84,90,171,47,86,202,86,176,185,254,226,209, +218,230,48,100,192,44,240,147,231,157,128,155,165,155,111,221,126,244,249, +221,70,163,216,217,136,180,151,103,54,218,7,195,253,129,52,169,191,214, +42,149,147,254,246,254,99,199,174,175,92,188,184,189,190,161,159,121,115, +245,156,221,29,248,133,186,5,83,218,45,112,135,217,245,24,211,120,78,144, +14,0,74,115,78,150,139,34,175,45,212,163,20,52,144,97,48,216,219,221,163, +212,40,213,234,60,148,99,9,3,0,64,152,229,148,52,25,14,67,31,137,86,44, +104,195,64,112,78,225,229,76,58,21,146,19,192,151,103,194,78,21,51,125, +77,172,146,9,249,52,109,150,142,201,231,121,158,101,89,97,24,142,195,4, +2,100,177,74,36,164,81,38,220,18,127,120,176,191,67,205,194,160,189,215, +60,123,33,232,237,232,150,77,41,61,78,80,79,248,20,178,60,197,114,25,120, +156,199,231,242,133,11,89,134,107,111,44,221,125,240,224,194,217,58,35, +70,181,224,238,246,173,154,41,30,127,241,197,187,239,190,1,16,117,31,127, +158,164,23,178,155,14,117,170,6,0,0,1,0,73,68,65,84,35,82,94,184,250,238, +213,185,100,243,119,247,186,66,182,87,223,250,209,227,15,127,14,213,69, +230,152,207,95,220,239,133,243,183,222,184,222,219,126,94,89,58,15,0,169, +215,238,28,236,63,124,209,94,92,189,98,39,131,72,233,149,162,145,199,112, +76,168,137,14,158,32,166,206,64,175,148,162,144,206,205,45,2,64,44,21,213, +156,86,119,32,83,6,135,133,0,69,133,8,68,72,201,116,0,200,22,118,17,145, +82,20,18,8,42,41,21,42,5,136,132,156,46,71,192,215,207,221,38,68,197,180, +15,38,75,33,132,4,65,16,199,113,150,152,173,159,32,2,170,20,196,203,216, +129,82,112,74,108,219,48,108,71,165,177,138,188,56,12,12,203,70,68,72,125, +96,214,113,61,49,193,187,69,91,59,78,88,190,118,237,90,246,176,120,243, +189,37,196,193,168,234,61,93,255,228,139,135,245,229,149,197,179,165,187, +159,221,41,90,236,210,202,138,76,189,130,1,20,13,196,81,108,207,23,76,252, +224,157,215,62,223,23,245,51,43,195,150,119,182,98,236,246,250,201,179, +141,181,189,110,194,34,121,103,248,0,0,1,0,73,68,65,84,74,151,42,233,227, +205,232,189,31,254,240,95,254,229,206,153,166,237,246,130,49,39,205,212, +233,211,212,131,28,207,233,134,147,189,106,4,65,179,117,22,107,150,73,1, +52,93,3,114,24,173,11,16,65,8,5,76,189,252,109,42,164,146,64,9,81,8,74, +1,61,69,194,232,16,190,41,95,231,109,166,153,142,0,211,52,41,165,165,82, +41,59,69,57,26,141,134,195,33,162,2,149,40,17,129,136,64,132,160,4,33,100, +212,235,105,68,129,136,1,64,164,201,97,105,194,255,234,206,157,79,62,249, +100,125,125,107,231,96,148,47,60,111,130,76,24,112,121,4,242,207,227,159, +148,10,149,235,183,110,25,134,110,105,172,113,254,90,221,22,97,24,126,246, +100,179,86,43,12,124,72,2,175,120,182,194,17,65,41,96,154,14,128,8,139, +43,171,0,160,139,161,44,174,128,8,134,221,126,183,27,95,121,247,45,29,241, +189,27,23,242,43,21,175,6,149,8,102,36,126,29,25,179,148,74,185,236,216, +134,82,74,55,77,195,48,9,0,32,3,194,136,8,135,67,55,203,13,0,10,64,227, +181,155,139,174,0,0,1,0,73,68,65,84,52,21,50,115,136,34,153,177,225,231, +187,133,175,63,17,48,211,4,158,41,153,116,93,71,68,199,113,116,93,167,148, +114,206,145,0,170,20,101,12,25,51,201,52,149,192,12,125,52,232,130,136, +16,85,158,37,221,16,171,245,122,167,211,139,83,49,174,119,162,150,49,26, +51,185,121,226,117,140,249,107,87,206,215,28,13,0,46,221,120,251,246,237, +219,86,181,90,109,158,121,244,225,175,63,186,55,60,223,40,235,8,99,73,240, +178,92,132,32,192,98,233,237,91,55,22,203,142,98,212,228,74,41,165,23,139, +70,234,197,131,173,143,62,250,232,193,158,11,50,122,254,232,81,86,75,187, +231,159,64,189,241,235,4,158,211,182,60,1,80,72,13,157,107,166,198,24,31, +31,194,37,0,132,82,0,37,149,4,132,83,198,69,0,199,105,183,9,238,153,54, +140,166,243,79,8,134,108,199,82,74,41,166,41,200,232,176,233,50,70,66,74, +5,147,107,154,18,33,162,204,70,120,86,93,177,177,140,232,222,190,125,19, +32,206,15,125,252,127,225,154,155,249,195,55,86,23,1,224,71,127,244,242, +114,183,104,0,0,1,0,73,68,65,84,131,172,222,90,179,198,148,202,182,37,216, +165,178,239,3,34,32,231,202,11,1,44,68,44,24,40,5,98,70,42,66,253,32,126, +247,230,133,143,215,219,35,72,7,129,216,216,25,46,52,57,99,36,246,6,157, +131,222,194,185,115,121,204,1,96,119,119,119,97,97,33,47,44,167,167,126, +19,168,114,70,131,48,85,192,15,205,109,0,198,88,20,39,140,115,41,210,140, +61,255,139,177,147,38,108,109,152,98,175,124,202,204,86,41,165,152,110, +99,180,11,234,240,22,14,78,101,185,168,155,58,152,6,5,17,35,190,82,79,10, +176,187,249,88,43,26,79,21,43,86,11,113,123,207,154,95,52,194,221,64,150, +11,69,166,105,102,190,228,9,28,142,227,170,105,238,159,158,40,40,165,106, +141,42,0,32,47,95,187,96,2,128,232,7,204,169,119,194,20,118,31,1,188,214, +26,249,231,46,157,125,190,53,48,207,22,53,68,100,166,85,153,83,148,89,82, +30,116,130,243,215,95,127,241,228,177,102,150,168,114,162,225,86,223,37, +114,191,91,230,177,93,157,207,42,234,237,110,142,252,88,180,32,184,246, +152,0,0,1,0,73,68,65,84,186,203,89,45,199,251,211,243,36,5,0,211,41,1,192, +120,247,36,82,166,83,6,0,168,168,84,47,133,232,105,130,111,17,97,98,76, +250,137,20,152,229,5,200,178,49,171,162,0,72,182,112,171,98,157,171,122, +69,179,52,5,42,6,21,231,119,149,32,128,238,148,110,190,249,102,16,70,0, +90,56,24,116,15,6,207,119,221,129,239,15,247,58,79,238,221,251,252,243, +175,220,20,148,74,54,31,63,158,192,10,68,212,61,232,29,103,55,228,123,110, +250,235,43,14,99,135,55,29,214,202,102,121,174,90,43,151,151,206,45,252, +250,55,159,12,165,212,237,170,183,243,240,147,79,62,137,134,195,0,209,52, +45,4,64,74,5,119,12,174,230,116,229,237,15,71,163,161,155,24,43,87,175, +41,72,250,7,193,211,175,190,122,188,182,27,13,90,157,145,90,189,112,33, +246,131,248,168,157,48,147,141,224,168,148,130,92,247,188,50,10,73,22,225, +253,212,219,73,51,245,218,244,224,206,11,42,165,20,165,20,142,118,213,161, +118,215,11,66,43,43,144,248,114,75,9,66,138,42,69,149,16,135,16,48,177, +0,0,1,0,73,68,65,84,21,19,130,72,94,93,14,84,152,155,7,128,215,174,156, +111,20,141,230,66,57,236,60,219,143,249,252,188,229,182,14,36,231,101,7, +215,159,109,6,195,189,190,27,223,191,127,127,99,167,3,0,144,29,176,151, +97,183,211,63,114,149,160,8,243,152,76,60,76,192,196,240,200,160,100,107, +195,222,65,125,110,126,190,89,103,0,23,206,213,27,149,202,239,30,174,207, +21,138,135,23,29,17,141,167,174,23,163,142,20,116,142,50,145,188,162,115, +88,174,217,237,78,215,44,149,132,239,249,126,98,149,138,12,224,204,66,141, +168,4,17,15,14,250,99,50,42,165,64,38,19,246,224,196,100,98,214,172,2,79, +225,21,239,240,173,118,223,194,209,94,25,207,164,16,49,155,175,77,228,207, +56,140,148,206,38,122,147,128,32,168,0,4,130,32,40,16,82,128,132,112,51, +11,122,15,0,10,192,235,238,175,63,123,150,85,97,23,45,157,177,34,72,11, +69,170,81,47,142,187,253,174,99,64,171,53,88,121,237,53,198,88,228,141, +218,253,0,68,216,57,232,121,222,112,208,217,20,0,126,248,114,155,183,100, +56,0,0,1,0,73,68,65,84,14,37,194,214,250,147,142,151,2,192,176,63,156,110, +209,196,120,152,217,234,75,175,127,223,141,233,74,125,14,0,230,22,206,95, +188,120,241,7,223,187,89,172,214,203,5,29,169,177,208,44,87,107,133,253, +7,159,239,39,170,80,181,128,48,34,6,81,2,32,165,211,88,28,12,6,220,48,2, +161,144,114,0,96,186,238,119,14,182,159,61,243,135,131,84,38,195,193,224, +160,181,13,0,160,196,200,139,243,242,252,213,24,6,144,34,153,70,108,122, +182,113,74,96,246,141,202,48,203,69,9,71,101,114,190,73,82,202,113,224, +155,252,87,165,20,225,22,112,135,250,27,169,62,79,133,139,217,30,35,80, +169,86,3,123,158,155,47,67,40,83,115,212,217,19,74,117,187,67,95,8,45,77, +133,94,173,243,136,20,11,97,119,64,109,251,181,215,110,150,11,124,191,155, +52,26,229,102,173,22,141,250,161,210,203,22,244,123,129,229,208,97,63,56, +240,18,22,134,221,246,193,238,126,223,46,153,173,237,189,16,180,98,193, +110,109,237,56,115,149,241,136,113,59,123,154,229,228,237,36,200,235,173, +88,194,119,0,0,1,0,73,68,65,84,184,163,68,88,92,172,23,172,201,13,51,150, +193,129,48,67,103,186,93,174,47,44,248,33,109,206,89,67,79,89,178,187,179, +221,162,166,165,134,157,165,75,215,154,181,98,224,142,20,240,130,163,3, +64,16,132,41,43,44,53,140,97,44,135,157,129,102,217,126,36,56,196,221,190, +15,40,69,18,101,119,111,100,21,249,174,79,53,158,68,65,156,8,169,8,163, +4,142,42,132,83,200,76,95,127,74,105,204,49,39,204,218,210,52,157,169,245, +179,103,164,186,40,95,143,132,5,72,21,82,133,12,253,109,40,95,102,252,213, +130,23,34,94,126,253,117,0,120,250,116,221,208,180,253,141,237,218,181, +235,5,197,158,119,69,181,102,171,202,234,230,230,166,81,154,43,144,208, +143,148,166,191,226,98,68,212,237,162,93,74,87,46,214,247,238,60,27,49, +160,132,116,122,38,104,37,130,195,65,88,69,0,1,192,94,162,218,63,104,237, +31,244,253,36,121,253,245,215,97,106,132,228,57,108,130,177,38,124,164, +227,175,231,150,203,0,48,87,38,58,44,45,92,168,172,239,28,52,230,171,59, +47,252,232,125,169,0,0,1,0,73,68,65,84,214,81,51,22,108,182,221,26,108, +67,48,95,169,72,37,52,67,71,38,131,94,64,117,187,82,173,118,15,218,164, +232,72,17,40,17,251,177,148,36,214,85,152,0,103,154,134,8,128,74,164,72, +168,74,210,84,215,40,124,3,53,253,221,194,177,94,0,156,154,123,207,108, +64,150,200,249,145,75,176,198,63,20,73,44,132,136,122,251,82,41,174,69, +177,177,12,74,201,52,49,107,101,212,237,137,25,95,38,30,46,94,60,7,0,80, +41,1,0,64,201,98,158,93,94,188,251,249,29,170,145,186,83,43,149,181,167, +95,61,40,223,186,161,164,18,66,138,84,4,233,161,87,29,132,72,153,84,186, +41,194,97,175,235,105,132,45,22,201,193,104,72,16,64,68,237,237,205,181, +237,254,234,245,27,160,21,58,7,189,114,145,118,3,48,57,140,47,1,135,212, +109,13,73,227,104,184,183,252,115,254,255,180,90,44,21,116,0,29,0,206,45, +214,1,192,24,190,64,77,99,5,235,156,225,111,181,134,59,137,154,43,107,3, +47,150,134,194,36,165,166,3,0,12,41,0,216,133,114,201,129,190,206,226,237, +184,0,0,1,0,73,68,65,84,7,140,42,207,3,37,131,88,42,29,1,164,144,132,217, +38,75,227,80,40,61,239,212,62,157,50,233,164,51,184,249,65,153,255,58,237, +54,204,223,91,146,111,103,226,143,162,97,151,18,52,77,83,211,77,170,210, +236,207,237,123,65,255,96,102,175,76,148,220,156,179,25,53,110,189,253, +198,205,155,55,231,203,134,89,89,168,149,237,59,119,238,152,213,106,56, +216,123,190,185,151,93,134,108,138,64,18,194,152,70,148,50,157,234,98,211, +81,4,52,167,158,186,35,137,232,247,246,14,58,254,219,111,156,219,220,239, +32,98,243,204,165,203,151,175,110,61,123,214,29,70,110,103,247,176,82,17, +12,221,104,26,129,124,171,243,244,153,198,54,255,188,120,230,204,98,179, +202,185,193,172,234,185,115,231,80,211,44,171,4,65,111,115,123,160,85,108, +200,188,234,57,102,96,140,154,12,8,215,43,21,155,100,70,167,20,76,227,128, +148,80,38,179,219,39,114,132,154,233,185,253,110,97,246,94,128,177,245, +48,115,238,54,61,32,198,50,105,226,83,26,249,36,141,180,82,141,48,14,0, +144,38,203,34,198,195,0,0,1,0,73,68,65,84,128,72,185,142,178,159,4,35,165, +154,211,170,36,95,209,248,245,21,38,212,92,58,119,110,81,41,68,12,250,173, +152,216,103,42,69,160,70,117,177,176,217,26,58,22,91,94,188,92,228,170, +55,104,115,68,160,102,137,139,150,71,53,63,54,27,103,9,39,90,212,141,185, +70,16,128,234,139,37,58,28,244,187,94,127,103,175,75,139,243,23,26,16,187, +221,39,79,250,151,46,157,159,137,73,134,67,175,219,169,84,231,38,70,218, +116,219,39,44,176,204,153,84,158,171,152,133,82,42,147,144,168,67,34,34, +83,105,232,134,41,128,9,136,42,141,17,117,42,149,4,128,151,124,66,144,164, +74,77,108,220,198,89,243,205,239,22,190,254,222,146,137,175,51,211,147, +36,201,31,121,27,151,32,101,170,51,130,136,74,10,0,16,105,226,15,186,74, +164,86,165,110,24,118,28,6,186,105,193,44,11,96,218,70,153,40,92,41,181, +120,246,226,43,12,74,75,48,216,45,52,151,158,62,184,175,32,169,47,157,1, +64,80,106,174,102,173,109,181,203,133,66,26,6,42,213,172,68,165,136,122, +102,127,152,162,41,0,0,1,0,73,68,65,84,226,43,66,66,183,117,48,44,46,85, +18,111,24,10,39,116,7,41,83,91,173,57,135,38,165,106,21,101,156,133,113, +202,53,95,110,236,183,169,85,46,153,95,127,183,194,52,185,204,66,9,0,24, +225,142,13,74,41,211,182,40,82,157,185,169,48,45,147,2,33,84,141,148,212, +82,138,12,16,16,165,144,0,68,77,57,5,102,242,241,119,14,179,119,186,229, +95,103,218,76,19,160,105,90,28,199,156,243,201,97,154,177,102,26,34,97, +0,144,4,222,176,211,82,204,144,216,169,52,22,195,81,135,235,70,22,129,249, +100,186,28,103,181,228,225,226,153,5,0,168,149,237,44,36,232,1,32,5,160, +86,213,48,59,142,1,65,183,253,248,25,42,93,179,49,187,159,56,149,8,64,1, +45,115,20,4,144,138,157,150,178,202,75,151,86,216,103,79,90,13,135,73,110, +87,141,160,231,170,162,45,159,126,245,236,242,107,175,33,162,183,191,237, +204,159,75,229,164,48,152,16,228,51,201,56,13,186,161,3,64,161,50,63,254, +185,233,216,221,190,107,21,138,42,137,145,16,21,9,165,81,165,148,146,144, +232,0,0,1,0,73,68,65,84,36,188,20,72,227,90,78,161,169,52,251,142,128,153, +66,98,130,82,249,215,140,141,146,36,73,211,212,178,172,52,77,51,125,135, +0,160,36,200,228,112,189,68,9,9,80,176,13,174,25,32,83,149,4,73,28,233, +134,57,61,51,154,70,9,142,97,241,137,231,140,141,148,82,245,122,5,0,0,180, +91,111,222,72,69,4,9,182,61,240,145,241,164,215,243,210,53,15,104,148,106, +181,170,21,130,94,98,171,103,207,238,238,109,2,211,41,163,78,154,36,200, +252,40,173,26,208,106,15,228,176,47,184,125,231,254,147,66,109,193,116, +227,230,57,189,192,102,200,158,227,38,182,211,104,79,16,22,114,99,131,105, +198,92,205,0,128,4,37,34,37,144,32,66,146,10,194,95,237,162,249,218,81, +253,93,193,183,88,5,156,48,51,243,175,154,166,25,134,161,148,202,118,41, +73,41,195,48,12,130,0,80,1,8,16,41,136,20,68,2,74,114,74,252,209,72,99, +36,219,72,41,69,10,47,249,64,70,238,222,230,218,238,238,238,110,187,15, +83,150,239,52,27,77,127,61,206,116,96,84,47,47,177,118,202,98,0,0,1,0,73, +68,65,84,156,185,120,241,204,82,189,186,112,241,6,164,94,20,41,48,139,149, +114,217,166,174,20,228,249,230,222,66,197,66,64,145,198,58,16,42,212,225, +90,161,138,250,67,113,230,194,234,82,89,215,0,34,138,22,83,0,241,243,123, +247,158,60,95,143,226,120,123,125,125,38,122,121,42,157,96,208,76,120,180, +199,192,53,13,145,24,58,139,194,40,85,148,16,156,230,188,211,6,95,175,221, +102,194,132,60,79,146,68,211,180,236,36,110,28,199,154,166,5,65,128,135, +230,180,0,21,67,166,17,148,84,64,144,49,223,29,150,120,249,149,255,31,17, +32,238,246,186,1,232,201,176,79,117,5,181,242,196,220,251,56,119,14,28, +53,138,143,107,66,150,103,174,104,0,192,245,155,55,1,32,16,96,82,88,185, +126,243,225,221,187,137,85,238,250,170,187,189,209,239,48,90,169,174,208, +100,40,164,76,34,76,83,151,24,139,52,219,40,0,148,18,42,99,127,176,95,185, +116,163,204,163,78,171,229,197,106,167,229,214,231,40,167,230,222,222,30, +53,236,122,185,112,136,131,140,21,209,36,0,57,126,200,21,254,167,0,0,1, +0,73,68,65,84,51,197,76,77,61,206,64,152,38,226,128,105,156,204,234,144, +211,38,153,190,145,229,56,1,211,227,35,111,33,101,167,40,179,155,2,189, +33,160,74,114,219,9,132,2,44,58,6,161,12,100,138,168,198,37,41,17,123,35, +88,92,93,210,137,138,131,72,0,80,128,118,171,85,107,52,0,192,29,142,36, +213,139,182,6,160,218,173,131,44,113,2,225,9,86,59,65,81,102,233,6,81,153, +96,189,250,250,235,136,216,27,13,154,205,202,210,217,179,173,81,84,212, +226,157,167,91,79,7,105,76,75,139,52,121,241,252,69,85,39,8,0,8,74,138, +225,64,204,85,16,82,153,248,225,226,249,139,187,155,27,92,183,251,187,155, +148,202,36,16,85,139,108,108,183,206,159,63,31,71,110,199,213,27,13,103, +92,47,28,93,24,200,235,190,60,242,249,12,150,101,30,230,156,213,198,83, +5,199,198,227,206,96,166,39,105,218,232,155,185,238,6,0,132,49,4,9,42,5, +149,157,227,150,182,197,53,166,44,131,130,74,32,23,171,4,165,36,186,195, +168,66,36,154,105,128,76,134,173,157,94,191,147,87,148,110,0,0,1,0,73,68, +65,84,223,233,251,137,20,190,235,6,81,234,199,18,85,212,218,59,232,121, +175,206,171,77,143,239,153,214,201,9,211,195,12,42,133,210,210,217,179, +136,216,44,26,212,40,86,203,166,93,170,83,102,85,23,107,144,132,123,61, +55,69,144,2,4,225,136,24,37,0,132,72,106,233,28,202,154,10,123,62,213,10, +231,207,173,216,140,184,253,145,238,56,143,159,109,37,66,184,163,110,187, +239,30,98,149,93,2,116,212,41,5,47,239,37,203,11,167,105,183,103,62,125, +166,84,62,13,112,210,41,165,137,231,233,215,12,148,82,217,174,126,152,82, +70,84,51,85,12,36,99,38,0,206,208,40,114,0,0,149,93,59,193,94,121,231,40, +69,13,133,84,163,246,246,40,213,26,14,243,125,101,21,139,131,193,136,114, +234,13,218,195,118,207,184,124,73,68,158,102,234,35,207,175,216,218,43, +138,171,164,215,243,75,21,219,247,98,167,96,127,67,153,148,111,111,254, +33,43,118,126,233,92,246,154,120,29,198,88,144,196,64,169,161,212,190,135, +213,2,217,92,95,55,108,77,151,126,16,3,34,34,103,26,177,209,228,249,0,0, +1,0,73,68,65,84,117,16,9,35,36,142,66,1,198,153,249,10,211,65,41,159,18, +4,0,127,228,82,131,168,16,185,163,19,245,170,70,17,134,65,156,166,82,218, +133,146,198,136,122,57,219,157,198,121,26,195,211,198,73,39,249,184,79, +254,148,207,35,132,200,139,229,241,87,162,57,138,90,0,10,65,32,8,74,178, +56,19,18,148,0,37,16,21,193,195,181,73,32,58,248,67,47,148,34,14,2,207, +247,221,97,207,29,134,190,159,248,158,27,164,148,243,133,149,243,37,77, +198,94,88,172,22,84,226,3,0,162,56,216,218,90,95,95,7,153,248,94,32,148, +20,169,16,199,216,221,121,105,58,78,57,161,129,227,62,147,50,165,148,26, +102,169,92,208,235,11,213,65,167,101,150,154,54,7,67,55,53,199,238,189, +120,50,76,208,42,26,136,160,0,16,208,105,46,52,42,124,48,138,0,160,88,170, +85,138,182,82,10,146,56,73,164,239,14,98,41,162,48,24,116,122,67,63,142, +131,32,12,211,68,72,74,65,8,21,135,145,60,138,85,158,129,242,228,157,32, +245,41,129,111,122,182,36,15,211,14,232,199,122,195,12,0,0,1,0,73,68,65, +84,108,127,210,140,210,53,51,177,27,34,232,176,116,0,217,57,19,128,44,42, +25,0,80,174,103,119,41,33,34,0,51,29,24,117,91,103,231,23,101,203,21,36, +46,86,155,181,102,117,127,123,191,96,242,36,169,72,0,153,132,126,68,10, +13,199,117,187,97,26,145,104,224,69,130,27,188,59,112,189,65,171,109,50, +74,116,231,176,52,113,120,95,234,75,108,131,97,183,51,244,87,86,86,198, +184,229,245,248,76,41,149,253,80,47,52,207,23,160,221,11,42,58,5,40,212, +204,96,16,179,241,45,54,149,58,236,29,184,69,139,135,126,12,8,166,109,6, +163,126,20,167,210,141,211,106,35,43,5,0,184,65,134,49,112,3,211,40,150, +177,210,53,226,250,3,32,140,113,98,219,21,157,72,0,24,246,60,34,133,99, +89,0,144,196,9,211,38,157,115,167,217,72,130,111,229,5,152,9,217,64,159, +216,51,153,31,253,212,40,161,179,128,152,201,109,56,124,200,220,75,90,137, +228,88,176,82,46,59,26,110,237,182,134,113,74,41,98,52,108,237,238,156, +57,211,44,217,26,32,40,41,147,106,197,108,119,0,0,1,0,73,68,65,84,40,112, +3,119,103,107,215,20,202,15,147,81,223,175,159,61,183,188,188,172,113,86, +40,207,71,161,55,26,184,94,183,223,27,132,32,194,160,239,38,242,112,113, +87,201,120,208,233,70,73,178,182,182,182,181,127,120,245,76,232,185,35, +47,30,143,239,9,97,48,49,63,175,85,50,203,151,52,154,11,136,71,50,207,215, +29,74,180,82,65,71,106,22,203,5,131,51,0,148,166,206,168,38,83,49,240,66, +68,164,140,197,113,76,152,169,2,15,53,67,51,184,140,125,212,45,195,52,134, +195,225,208,13,226,20,148,146,160,100,24,132,158,235,35,65,145,166,113, +252,106,191,222,24,78,39,27,193,215,70,44,157,9,19,2,9,17,199,55,5,78,123, +47,9,33,132,233,210,90,76,141,5,193,203,66,155,75,245,186,68,46,244,58, +53,75,249,162,136,102,207,53,22,9,213,42,149,162,99,219,197,146,197,64, +110,238,30,12,130,132,131,136,70,157,238,40,85,148,56,86,193,141,71,126, +36,18,101,234,28,0,192,177,76,64,88,90,168,91,156,138,196,245,67,55,13, +163,78,111,20,14,70,74,45,11,198,0,0,1,0,73,68,65,84,253,189,173,199,143, +159,39,34,69,173,112,118,117,149,115,110,234,60,150,10,0,124,119,56,26, +141,58,61,31,0,92,47,198,163,238,227,9,133,146,111,120,209,96,211,233,182, +117,24,200,192,42,86,23,22,22,236,98,145,81,102,178,129,72,5,0,16,198,73, +34,129,25,2,8,227,76,166,138,235,54,50,134,84,171,23,77,170,226,56,22,92, +51,45,83,143,194,72,183,172,56,78,211,56,150,82,69,113,146,249,79,146,228, +229,174,183,41,53,125,74,224,27,221,168,60,45,87,103,250,187,167,203,145, +82,40,41,19,111,8,212,2,144,168,23,65,41,37,133,86,112,152,94,30,239,42, +201,151,188,184,184,152,61,104,22,216,21,181,215,238,115,138,90,201,138, +212,144,26,37,162,23,154,181,82,179,98,188,104,165,6,141,163,4,178,181, +99,204,98,48,34,152,142,225,13,164,31,131,178,121,60,28,38,68,47,21,232, +192,77,100,26,108,60,127,126,225,252,249,97,16,106,144,236,110,238,235, +26,67,36,186,206,68,50,232,13,209,178,181,227,118,181,238,236,236,47,46, +54,103,146,111,20,229,63,227,0,0,1,0,73,68,65,84,166,163,72,41,85,41,88, +0,80,174,191,84,166,132,53,151,106,169,4,144,22,163,210,27,68,186,83,76, +163,196,79,19,219,46,216,182,237,5,135,214,54,213,76,66,128,160,2,5,92, +51,226,40,74,17,64,8,64,20,82,17,60,12,88,122,10,37,211,73,218,109,194, +140,56,206,17,2,199,216,128,74,41,17,133,177,239,162,76,33,9,56,163,68, +9,162,4,145,34,81,122,236,79,30,143,156,201,142,11,245,138,165,49,102,150, +27,11,103,170,101,167,88,176,1,64,113,171,98,233,186,165,181,54,214,215, +214,214,34,197,12,150,74,64,68,164,134,83,229,106,16,163,197,117,73,105, +183,223,119,253,100,216,243,4,130,174,235,79,159,62,13,162,208,239,183, +253,88,238,247,220,20,84,183,239,37,65,48,232,237,75,165,0,96,127,191,123, +180,249,98,103,227,177,63,26,132,98,114,25,53,79,153,137,86,76,80,67,41, +5,64,149,82,140,128,99,91,140,40,221,50,45,67,163,32,56,103,195,225,176, +63,240,169,198,80,201,32,138,95,93,27,64,40,18,100,20,65,41,32,140,115, +170,220,254,10,0,0,1,0,73,68,65,84,150,153,16,25,199,157,58,137,116,178, +118,155,201,28,211,254,180,252,215,9,202,202,36,68,17,113,211,230,134,133, +76,35,132,82,202,169,166,75,127,32,67,111,162,174,175,29,103,136,104,234, +12,0,16,121,177,234,24,118,165,92,176,86,87,87,5,112,187,90,216,111,117, +130,68,34,53,116,155,202,4,9,215,25,129,185,133,149,11,23,46,56,182,70, +185,213,92,92,44,22,139,77,135,15,6,225,252,217,51,156,81,162,18,4,154, +138,20,0,118,218,131,97,107,187,223,109,247,221,200,27,29,58,129,68,228, +121,170,112,113,117,169,61,12,213,49,210,58,207,97,51,173,174,137,201,32, +42,98,88,38,0,88,5,43,59,125,197,184,102,112,162,27,12,166,214,134,15,67, +181,30,186,69,179,66,178,213,130,83,199,75,39,105,183,105,165,54,53,212, +142,60,76,107,64,41,37,35,4,144,16,74,148,146,74,201,40,240,148,148,186, +105,35,98,154,196,92,155,188,206,107,166,232,158,246,160,40,165,56,211, +170,141,6,0,88,28,21,43,153,186,208,10,38,2,80,189,80,45,42,106,48,116, +111,135,71,0,0,1,0,73,68,65,84,166,44,175,51,216,77,220,133,70,185,181, +63,4,128,70,163,1,50,0,102,107,12,107,37,59,20,144,2,24,78,177,50,87,98, +60,233,15,216,165,213,249,181,131,97,73,185,81,208,143,89,149,7,3,67,43, +2,55,147,209,110,88,88,50,233,145,189,185,121,117,54,237,4,153,137,243, +180,42,44,22,15,163,181,16,110,216,28,226,68,100,57,40,125,185,70,66,8, +72,133,185,21,19,117,42,215,113,191,94,38,29,135,238,4,123,205,246,44,103, +41,74,42,41,149,20,105,20,250,195,190,59,28,4,190,139,148,137,192,157,62, +40,55,147,89,243,253,52,173,91,51,154,214,231,230,138,142,73,1,128,234, +133,162,161,51,162,21,106,5,139,10,33,58,163,72,166,254,230,218,218,254, +254,126,123,152,80,153,166,2,16,65,64,86,44,2,64,205,225,220,114,8,101, +60,137,82,36,61,55,157,175,90,49,2,183,13,165,208,164,137,23,102,251,66, +69,30,201,147,157,132,99,36,199,217,142,243,59,140,129,51,130,0,134,105, +112,206,17,128,80,74,9,5,153,198,73,170,32,251,249,108,248,180,145,28,0, +0,1,0,73,68,65,84,31,253,119,14,199,250,147,102,122,47,38,70,97,62,49,77, +83,66,136,148,242,200,158,238,44,175,20,72,0,148,0,80,10,80,51,45,66,185, +82,18,210,88,138,148,113,109,186,82,56,94,223,77,12,125,200,117,88,30,37, +138,168,148,42,214,231,75,136,125,215,55,43,213,249,66,105,99,99,195,214, +29,211,162,155,235,107,6,35,212,176,14,117,69,42,21,16,25,71,82,112,61, +133,212,52,76,221,2,0,66,145,51,138,136,132,115,41,4,0,75,194,81,26,166, +251,125,183,92,169,232,68,13,60,209,108,86,167,37,205,76,132,79,144,190, +51,155,172,148,58,244,146,48,166,148,202,130,40,188,244,65,156,46,54,130, +19,180,219,184,147,166,181,219,56,101,226,191,148,82,74,153,205,87,25,99, +105,154,2,2,130,68,37,64,8,4,0,37,41,65,2,146,115,138,74,40,4,41,4,100, +203,39,74,41,17,13,6,3,164,58,80,94,46,216,112,148,113,225,235,70,225,76, +14,203,126,88,178,77,68,11,0,206,156,57,3,0,105,66,47,215,231,247,218,61, +199,208,0,57,82,208,175,97,55,142,0,0,1,0,73,68,65,84,113,171,231,87,49, +30,110,110,3,106,154,129,72,52,126,88,41,128,82,138,33,75,20,32,98,20,68, +190,31,59,142,195,68,48,232,71,146,178,84,137,104,20,2,38,169,226,150,109, +243,151,7,139,135,189,65,161,90,206,31,162,253,38,196,132,89,236,168,148, +84,144,109,45,65,0,32,100,182,31,248,187,133,255,39,62,238,153,61,58,14, +90,154,113,82,20,69,99,227,19,148,80,47,197,19,32,73,165,138,195,128,90, +22,102,206,202,195,50,133,235,122,177,98,194,247,40,55,161,240,234,86,221, +153,230,197,24,38,196,216,116,202,244,79,40,211,149,82,243,181,108,43,28, +72,128,218,194,249,221,238,168,92,41,140,34,240,37,218,22,15,100,166,151, +49,22,2,145,8,144,148,83,0,144,146,40,189,88,171,149,70,221,54,24,198,124, +133,181,189,16,221,190,160,152,10,162,8,161,137,231,70,80,157,171,196,145, +175,160,12,83,227,33,255,48,45,132,32,55,0,198,159,50,177,125,234,108,236, +163,240,77,163,40,31,215,85,48,69,142,76,187,101,235,39,81,136,0,18,64, +100,115,129,11,40,192,0,0,1,0,73,68,65,84,144,236,68,133,105,112,68,130, +234,200,246,1,144,105,20,66,181,81,229,68,37,81,42,1,8,192,112,48,40,150, +74,136,24,250,129,36,220,50,24,162,26,244,251,165,114,101,140,198,180,229, +11,179,58,47,15,147,26,4,17,16,23,231,138,74,41,107,252,41,76,0,128,3,134, +65,12,150,130,84,112,74,149,82,140,41,76,17,0,8,72,166,235,132,64,50,240, +152,110,149,42,213,100,212,78,68,146,132,170,62,87,246,226,24,148,234,15, +70,5,219,230,116,210,220,156,214,113,19,66,20,102,14,224,163,221,113,218, +236,164,111,234,227,206,179,203,184,217,121,139,114,108,252,230,11,57,188, +254,71,201,195,63,80,136,72,9,104,156,2,188,58,200,175,148,2,165,8,215, +9,81,0,132,105,28,100,26,12,123,65,16,140,188,40,149,50,142,162,225,112, +24,165,18,100,226,14,189,81,152,66,142,214,136,24,133,209,52,98,19,72,78, +52,115,90,99,230,59,210,54,56,0,216,166,6,98,184,191,215,14,65,211,57,65, +68,179,80,129,104,180,191,191,47,153,46,162,168,219,29,33,34,113,188,115, +228,0,0,1,0,73,68,65,84,5,224,12,8,82,66,56,1,240,188,208,210,184,110,58, +36,187,226,238,68,10,79,48,196,132,229,52,13,223,68,209,127,39,240,237, +226,2,76,39,98,14,32,215,151,89,6,194,120,118,207,4,128,68,144,148,130, +101,114,141,33,130,4,37,225,85,44,60,4,36,192,168,82,224,13,123,221,129, +43,194,104,228,10,110,24,97,16,70,137,8,253,97,28,5,82,41,153,198,76,231, +81,20,31,65,73,38,158,27,72,153,250,94,0,71,125,60,199,33,63,33,71,199, +57,39,18,185,237,204,57,186,36,154,238,148,179,104,167,72,184,109,234,0, +160,89,14,73,70,97,138,122,217,160,99,14,86,73,169,94,145,97,16,11,0,128, +98,193,166,4,102,178,242,9,184,29,135,222,248,211,204,244,239,28,190,145, +118,155,105,109,76,43,248,25,121,152,161,162,108,158,173,0,129,18,164,26, +1,84,168,178,155,221,96,124,140,75,33,195,36,136,18,37,69,146,196,50,6, +16,42,193,20,210,88,198,177,193,24,47,59,115,38,149,145,151,152,182,25, +39,145,66,19,148,24,28,116,66,41,203,37,241,115,52,62,0,0,1,0,73,68,65, +84,39,137,61,9,14,33,68,0,208,89,120,30,55,66,142,179,192,178,87,194,12, +189,96,44,20,32,145,175,198,156,93,169,89,153,223,97,121,5,0,82,153,166, +132,2,0,211,56,33,108,208,29,2,167,113,148,48,121,132,161,39,36,250,196, +243,215,218,118,199,161,125,122,224,164,248,73,121,85,117,50,234,51,207, +101,35,34,161,92,49,67,82,253,240,215,168,14,163,111,161,2,84,136,36,55, +13,33,92,75,67,111,84,40,150,45,157,75,68,195,46,150,171,53,221,48,76,157, +114,195,2,0,41,210,56,37,166,169,99,170,82,33,210,200,77,145,155,166,41, +132,200,140,146,32,78,17,32,140,82,0,113,68,44,201,52,24,246,182,183,183, +123,61,87,28,117,73,143,243,228,85,219,184,95,199,20,200,174,200,154,54, +98,148,82,20,169,97,26,4,64,55,109,83,215,57,5,205,176,184,198,236,2,119, +253,48,253,6,183,214,230,167,111,39,51,208,68,237,167,10,78,138,11,144, +61,159,48,111,26,67,118,151,242,76,67,18,181,130,2,128,240,96,252,45,155, +87,3,34,18,134,228,143,123,182,169,0,0,1,0,73,68,65,84,213,73,46,203,50, +49,8,122,131,81,162,168,173,33,70,225,168,159,84,171,101,0,72,125,80,74, +137,52,142,226,208,107,135,36,149,73,98,169,32,45,84,231,52,162,80,198, +73,12,18,69,26,39,94,175,155,162,102,48,22,121,146,57,92,4,145,27,166,115, +101,51,10,147,249,165,165,214,214,30,49,245,146,193,97,170,63,166,155,60, +77,129,25,86,240,75,134,27,219,67,165,185,185,151,5,114,8,189,227,170,152, +72,153,24,174,51,233,140,83,75,8,167,138,165,190,221,41,37,56,70,181,19, +66,38,198,247,248,149,48,157,80,77,241,130,100,5,0,144,212,148,204,86,200, +36,181,137,89,201,75,2,194,116,187,80,70,66,45,203,180,157,162,105,106, +148,64,183,63,242,99,65,81,37,161,235,133,18,41,157,111,206,35,195,40,149, +2,24,163,175,122,189,84,176,57,37,186,201,36,10,145,164,110,28,135,221, +129,239,249,74,38,137,2,96,26,0,204,207,23,99,55,144,211,107,177,50,137, +162,195,56,70,199,25,52,211,115,248,124,99,199,210,43,47,57,202,69,135, +205,34,240,150,221,217,87,0,0,1,0,73,68,65,84,204,18,102,218,109,19,153, +103,106,198,83,2,199,238,190,61,193,24,156,254,116,194,68,67,73,41,226, +80,160,33,137,46,120,81,50,71,16,19,245,18,209,139,153,78,204,79,0,1,160, +92,46,59,166,14,72,117,187,80,42,151,25,163,150,70,53,75,215,53,194,13, +139,27,142,82,170,94,171,168,68,82,76,135,125,119,56,28,2,32,136,67,195, +139,114,157,41,140,4,80,157,41,162,98,137,8,210,15,18,5,56,232,247,21,40, +84,194,245,194,131,131,142,80,34,242,70,173,86,23,0,194,48,74,147,87,247, +249,77,52,39,140,39,167,138,42,7,112,140,119,113,162,180,9,153,55,109,51, +76,79,126,199,66,104,122,226,57,147,218,223,45,28,43,147,166,229,112,254, +211,196,252,40,111,39,29,25,190,82,138,36,2,41,148,72,80,41,32,58,81,138, +40,41,145,195,120,7,247,203,50,39,200,154,125,42,58,150,82,138,48,195,41, +86,108,83,55,13,29,17,129,114,219,208,152,193,33,13,211,52,141,21,213,152, +148,217,38,37,202,77,6,97,10,58,55,8,97,0,138,48,45,26,237,245,212,0,0, +1,0,73,68,65,84,244,19,144,145,72,211,110,63,48,28,61,246,6,133,202,92, +18,249,190,27,48,34,135,94,44,146,48,150,18,100,210,222,219,3,0,161,114, +12,145,250,126,144,36,129,219,105,181,0,32,227,183,156,20,145,48,139,93, +38,186,63,111,120,157,48,68,39,254,79,191,206,236,154,83,2,223,34,98,233, +68,122,126,252,29,110,157,153,90,60,82,34,1,41,40,215,40,227,132,82,130, +153,145,205,100,28,166,81,112,130,166,31,23,50,182,183,178,62,224,44,227, +63,98,152,26,215,236,74,173,86,173,86,17,169,110,91,163,161,199,117,14, +64,152,78,65,226,255,221,220,181,53,183,138,195,224,79,178,177,129,144, +164,105,51,179,255,255,215,109,207,76,183,61,73,115,49,216,150,246,129, +92,8,164,233,236,203,158,250,33,67,192,128,36,75,242,103,33,219,166,96, +231,216,215,243,213,106,53,159,123,99,203,231,245,218,20,101,237,140,45, +170,194,66,187,8,55,91,61,53,237,97,87,54,243,253,62,180,251,96,171,234, +245,239,215,99,27,129,244,254,235,23,128,182,237,14,251,109,215,134,36, +43,2,187,1,0,0,1,0,73,68,65,84,244,250,250,186,15,55,59,217,117,109,27, +218,36,103,105,196,51,192,158,194,121,124,161,22,15,68,253,149,252,127, +166,79,250,6,113,95,140,233,46,24,188,52,243,104,239,145,203,177,72,62, +125,46,98,6,32,34,146,162,170,26,107,65,44,146,141,177,83,63,63,37,99,84, +161,39,137,207,17,132,194,64,217,175,158,60,17,9,192,214,63,175,172,0,92, +205,244,237,247,219,219,190,153,55,125,228,106,181,108,144,187,254,88,201, +26,87,0,234,4,2,52,190,232,194,49,136,150,222,132,195,209,105,134,245,255, +124,108,106,155,9,8,98,203,166,94,150,250,182,107,5,150,123,218,52,137, +224,216,197,194,91,0,199,221,103,98,239,10,51,34,254,91,112,51,5,221,15, +144,245,197,168,126,154,103,250,6,39,221,53,163,105,231,45,34,95,202,171, +175,169,10,85,201,41,182,161,107,91,85,48,179,196,155,0,227,183,166,54, +194,179,35,130,251,51,167,221,26,206,7,245,172,42,203,178,203,112,222,81, +127,47,245,41,172,96,100,137,113,251,121,204,134,184,103,217,152,213,250, +175,36,84,108,208,216,41,0,0,1,0,73,68,65,84,123,62,4,89,190,60,173,159, +159,234,89,61,107,150,70,211,97,243,190,217,30,172,227,246,24,4,8,251,207, +46,245,134,116,205,115,36,0,57,126,124,124,0,136,249,17,107,83,244,51,244, +229,67,236,56,194,145,163,154,63,167,124,57,155,123,106,28,151,50,69,130, +125,62,201,116,253,26,34,2,20,184,202,76,65,108,77,206,137,173,33,205,34, +50,154,117,57,122,209,148,164,209,213,187,244,95,110,241,245,204,15,46, +1,0,91,95,22,12,20,206,129,210,190,101,45,140,1,1,40,157,217,109,54,235, +245,26,18,219,54,139,192,156,182,168,133,47,140,169,150,221,97,235,69,99, +138,174,42,1,10,161,85,5,161,72,97,151,18,66,151,138,202,29,15,97,177,90, +125,188,191,251,186,113,214,221,37,53,132,64,108,135,222,107,90,231,138, +53,239,193,137,31,168,73,223,127,45,153,14,28,166,184,178,255,149,65,185, +62,15,253,162,31,10,85,64,153,217,16,177,181,125,76,9,67,151,46,41,28,247, +33,132,208,198,255,68,210,227,202,211,75,101,85,18,96,92,85,54,203,151, +151,98,20,104,167,0,0,1,0,73,68,65,84,229,172,44,1,33,34,87,55,5,201,251, +251,251,174,211,153,79,187,77,63,159,137,84,20,108,9,88,191,44,164,223, +154,84,181,223,102,157,136,64,210,181,241,68,179,230,148,97,128,231,231, +103,127,14,0,116,49,95,104,86,85,233,66,23,147,2,146,227,126,127,179,219, +201,104,88,51,252,157,118,112,95,177,249,167,202,55,241,164,33,218,29,158, +193,173,37,209,121,195,137,11,147,57,231,156,115,239,247,79,179,219,208, +75,159,68,85,243,77,230,33,0,85,137,49,102,229,24,99,206,105,42,169,156, +175,209,226,7,234,242,0,117,77,120,59,241,94,121,218,126,236,35,17,216, +46,86,43,107,237,204,23,174,158,51,100,187,59,68,181,5,14,49,229,246,184, +131,106,191,44,134,18,101,205,253,123,72,85,217,53,79,171,186,116,172,122, +89,6,206,90,138,225,176,249,189,9,93,76,49,182,97,15,64,160,41,73,221,52, +165,227,46,165,186,242,109,18,220,11,2,143,28,207,180,43,252,158,193,255, +183,124,163,73,211,225,216,165,76,249,100,102,102,54,198,240,9,102,159, +64,4,65,100,223,47,168,0,0,1,0,73,68,65,84,1,189,72,139,141,33,62,185,170, +75,170,4,65,114,66,225,253,124,222,84,222,245,233,247,109,219,246,79,78, +49,158,97,135,134,227,117,11,172,17,169,143,165,63,116,159,183,151,104, +177,126,169,74,223,3,169,197,98,65,68,196,110,185,90,49,19,179,109,150, +47,108,173,47,204,199,239,253,242,101,225,8,187,237,182,203,144,179,215, +96,21,195,74,128,26,123,125,191,72,23,226,108,177,52,154,83,23,4,102,187, +221,198,36,49,166,16,66,23,163,138,33,230,156,226,40,82,58,28,174,226,214, +57,253,228,114,39,171,100,234,99,167,21,238,154,200,232,198,65,224,251, +212,199,245,34,49,204,150,153,112,50,197,211,211,20,196,182,48,4,16,27, +67,42,169,13,57,231,152,68,84,114,206,57,117,73,84,53,199,152,14,109,188, +33,64,37,198,52,85,247,187,127,239,53,9,3,168,189,29,98,219,254,249,77, +93,49,169,170,206,231,243,249,114,89,248,210,2,101,237,24,168,170,138,65, +69,97,193,92,20,172,74,89,50,192,154,98,239,60,179,8,250,201,107,10,37, +46,171,106,49,243,43,68,11,208,0,0,1,0,73,68,65,84,34,0,193,48,91,40,23, +22,32,3,81,29,59,248,17,253,23,13,27,130,167,159,214,193,61,90,137,235, +1,178,27,98,225,97,199,55,2,188,160,235,87,20,2,192,100,97,136,111,178, +73,174,218,102,160,138,20,219,172,228,12,197,164,108,77,78,137,216,230, +212,9,12,160,200,98,172,33,189,14,21,219,182,245,133,201,49,89,75,177,203, +133,187,191,10,239,144,163,225,128,104,122,240,213,189,0,102,179,10,0,91, +191,88,120,0,222,21,68,68,93,42,44,126,111,55,206,123,111,57,59,124,126, +126,46,231,243,40,128,100,21,8,211,41,229,129,152,1,114,174,240,14,177, +61,77,212,236,135,41,183,131,149,175,232,121,48,12,250,227,229,209,218, +183,35,45,25,86,152,250,173,139,79,190,61,195,10,58,207,218,2,129,140,161, +203,204,63,26,166,1,18,65,68,20,80,17,161,12,40,148,84,85,84,4,69,225,45, +91,67,16,17,95,186,182,139,10,37,104,216,31,133,40,49,229,28,21,142,6,159, +95,70,37,197,174,139,169,174,235,97,51,76,27,230,171,22,26,114,135,219, +6,85,36,212,141,0,0,0,51,73,68,65,84,118,133,33,162,213,211,178,63,111, +203,18,93,218,110,183,101,221,168,238,143,251,157,245,37,229,115,60,147, +112,74,134,56,7,15,8,152,230,213,62,86,157,31,168,70,0,254,5,128,179,83, +7,233,186,128,144,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_61 = 1046; +static unsigned char xml_res_file_61[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,221,73,68,65,84,72,137,141,149,223,107,92,85,16, +199,63,115,206,185,155,221,166,205,175,141,107,109,176,149,40,86,250,203, +128,149,210,130,34,104,95,251,36,8,125,147,150,252,3,226,191,226,139,24, +244,175,208,71,159,11,234,83,147,10,82,180,74,53,54,63,155,205,102,239, +189,231,204,248,112,239,38,105,118,19,59,112,97,152,115,102,190,115,190, +51,119,70,238,126,245,43,203,219,202,90,18,130,8,226,5,113,158,208,12,252, +243,227,35,220,88,134,56,97,32,130,208,203,35,99,153,3,7,146,5,240,14,130, +199,5,71,10,30,23,60,174,145,17,77,112,133,66,82,67,13,204,56,36,134,193, +11,70,51,80,85,82,52,84,181,58,122,193,103,88,92,84,35,13,153,13,83,131, +164,144,42,100,169,208,208,168,231,62,187,49,163,177,95,94,208,50,97,54, +148,217,139,0,233,232,89,125,223,146,242,218,237,75,148,69,73,44,18,81, +19,26,149,84,148,115,15,94,159,151,107,119,111,252,158,122,249,148,149, +233,196,151,184,209,118,195,146,161,69,100,238,246,37,250,102,20,8,165, +23,74,71,127,67,61,219,183,166,185,250,233,123,155,177,151,183,173,126, +137,141,64,113,199,196,199,48,44,26,154,71,230,63,186,136,33,224,28,206, +249,20,82,164,255,12,54,175,159,229,202,157,107,107,177,151,79,90,76,152, +142,120,193,177,228,25,85,86,201,72,69,228,252,173,121,74,21,162,184,60, +37,144,4,253,13,216,186,126,142,171,119,174,109,197,189,178,109,49,13,213, +163,106,64,163,46,228,240,135,42,22,21,205,35,115,11,115,204,180,252,230, +116,72,148,207,65,186,137,238,170,177,254,206,89,46,127,114,113,77,139, +56,99,73,171,194,215,18,50,12,111,54,229,212,46,139,200,2,200,251,34,114, +83,132,9,64,107,120,76,48,75,182,251,238,205,243,179,229,108,139,135,27, +123,100,150,0,161,187,227,209,55,206,241,118,169,235,143,126,254,115,74, +66,216,174,234,33,132,95,214,35,156,159,237,196,172,185,144,132,143,241, +238,67,115,210,30,197,158,8,252,20,19,172,149,52,176,131,76,69,232,118, +251,104,167,205,91,11,186,245,120,101,245,85,167,246,47,24,97,205,2,77, +66,114,101,44,73,214,83,179,77,49,218,149,227,80,89,200,106,205,236,72, +103,10,116,123,5,105,226,12,23,46,234,234,95,79,158,191,137,179,199,33, +120,135,117,115,75,73,163,105,42,205,36,146,82,237,173,152,202,190,142, +86,129,228,40,182,59,80,182,215,5,119,218,211,58,21,30,236,238,233,108, +80,51,210,86,15,141,10,102,78,21,193,116,63,61,173,149,65,12,19,8,2,222, +9,50,64,169,239,38,131,211,13,65,183,133,66,249,194,55,28,161,233,133,206, +164,100,141,144,141,7,239,166,50,199,43,141,76,142,178,83,177,224,33,11, +142,71,79,35,155,189,136,72,117,207,234,110,152,108,56,26,98,236,244,210, +162,154,126,39,6,97,188,215,160,221,241,69,215,233,223,101,98,185,136,180, +118,35,87,129,6,16,247,249,23,212,121,242,242,15,109,149,133,239,184,142, +33,86,209,103,10,19,77,199,152,8,187,123,197,189,104,186,52,240,11,59,166, +252,182,205,147,190,233,83,204,126,0,90,192,153,154,230,195,83,70,49,214, +136,242,129,117,252,247,222,135,106,186,26,156,105,58,90,222,232,238,197, +123,121,100,169,26,234,53,128,115,224,132,228,32,9,146,3,93,224,217,48, +65,85,219,148,51,178,236,27,1,68,48,51,78,101,194,24,198,110,158,22,243, +200,210,160,9,6,89,133,186,195,16,25,234,202,58,110,117,85,204,136,227, +45,188,217,184,11,30,115,66,75,32,96,244,138,248,121,17,249,246,104,240, +125,128,227,229,32,184,78,141,227,204,48,195,113,202,211,16,193,149,74, +81,166,251,165,142,14,14,39,13,187,154,18,49,37,78,79,98,230,49,60,38,190, +105,43,142,137,76,40,212,22,163,202,55,3,22,70,201,241,47,48,192,148,92, +102,145,13,61,48,129,77,239,9,99,194,151,9,190,30,250,233,94,10,96,176, +6,219,29,198,84,247,67,84,0,246,208,181,229,202,86,174,43,131,204,79,90, +203,39,212,160,2,177,67,251,176,158,234,57,194,67,249,159,101,255,18,0, +135,82,179,17,182,151,148,255,0,250,27,66,145,188,185,81,236,0,0,0,0,73, +69,78,68,174,66,96,130}; + +static size_t xml_res_size_62 = 1055; +static unsigned char xml_res_file_62[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,230,73,68,65,84,72,137,141,148,205,110,85,85,20, +199,127,107,239,115,90,110,91,218,210,150,166,210,72,77,67,66,131,64,76, +36,65,25,49,144,41,35,19,19,39,78,140,47,224,220,23,48,241,1,32,40,62,133, +15,224,192,4,7,26,13,24,140,38,106,36,6,104,105,107,203,253,56,103,239, +245,119,112,206,189,45,244,150,184,70,231,236,125,206,250,173,245,95,31, +182,240,217,67,8,134,118,247,241,156,137,217,241,228,144,50,100,71,117, +2,135,65,237,76,77,22,8,49,52,185,240,65,205,202,245,13,82,63,33,207,120, +18,181,196,124,112,214,103,2,129,8,68,192,56,106,2,9,220,157,156,132,187, +35,29,190,31,226,52,230,231,198,130,1,236,247,155,55,59,68,145,144,132, +215,153,212,175,215,62,184,186,224,158,252,12,8,83,115,79,86,147,165,235, +88,72,176,16,142,134,223,70,174,58,147,187,131,249,203,31,94,253,227,222, +235,235,150,171,122,213,147,147,60,147,170,76,93,213,188,118,227,2,202, +109,102,99,24,161,222,235,99,102,163,232,69,19,185,234,76,234,14,22,47, +189,255,246,246,238,181,83,60,243,72,29,232,215,209,168,48,250,18,171,55, +46,224,85,66,249,21,25,96,47,38,32,7,165,76,234,14,230,46,222,188,188,185, +125,101,133,254,83,40,114,34,132,152,9,1,97,172,95,63,143,15,18,74,106, +10,127,76,25,194,139,222,213,56,239,213,139,151,110,94,222,217,185,114, +134,254,51,176,12,57,67,178,48,168,221,56,123,109,157,220,70,46,29,239, +28,160,24,250,151,212,104,89,165,133,55,223,59,191,185,181,177,66,247,177, +40,106,167,78,145,83,69,198,58,113,187,115,113,21,31,36,240,166,80,163, +240,218,194,155,134,5,108,66,47,70,186,103,145,171,60,183,241,206,250,214, +214,27,103,232,62,234,19,114,38,33,234,110,228,220,82,135,181,119,207,254, +250,112,171,218,36,218,180,29,248,54,32,32,254,149,244,157,185,190,15,210, +143,209,184,95,162,157,162,233,24,225,57,47,159,123,107,245,241,214,242, +34,221,71,59,132,182,77,1,162,25,63,61,55,152,93,90,156,92,136,139,213, +88,73,124,197,92,139,100,159,149,96,191,238,63,253,225,175,205,157,2,132, +92,235,107,231,79,255,254,108,246,36,189,39,123,4,19,47,75,91,90,19,172, +143,243,221,126,232,198,118,48,235,42,90,189,79,145,251,42,40,36,152,154, +42,238,237,101,99,247,207,109,74,68,30,186,241,23,125,104,248,16,14,250, +195,130,14,122,37,198,100,166,218,66,76,196,160,34,6,138,56,17,168,156, +79,139,221,222,221,25,137,253,74,196,195,234,210,14,173,139,36,154,41,62, +196,14,195,143,12,176,96,33,16,48,35,20,1,147,40,76,224,240,245,64,97,226, +228,84,188,21,59,198,94,229,12,231,91,109,135,45,77,21,108,156,41,168,147, +163,60,94,165,170,214,233,218,153,79,217,167,171,228,229,147,93,107,186, +8,32,201,111,247,114,200,211,157,242,142,77,136,189,190,99,161,25,240,96, +162,126,28,249,123,219,159,148,107,244,60,51,105,106,132,106,173,0,42,176, +159,205,120,16,202,248,207,98,44,171,231,221,220,0,172,205,113,144,248, +210,234,204,76,167,184,67,136,236,215,78,176,102,35,246,150,69,127,51,127, +196,166,190,197,88,26,86,98,40,78,155,196,30,208,195,172,62,97,74,3,57, +69,115,110,180,77,210,66,60,118,38,139,91,94,22,244,106,97,102,132,40,242, +130,63,40,179,158,99,60,31,191,223,91,185,218,160,66,224,64,162,81,38,13, +228,182,162,234,114,34,126,213,153,52,42,129,185,96,178,156,118,51,138, +110,15,141,26,97,12,200,14,240,97,204,29,24,84,206,221,202,253,227,16,141, +137,78,132,169,136,149,22,66,105,248,252,116,179,18,70,229,61,222,142,0, +70,16,32,185,221,169,92,159,204,150,134,126,9,200,226,9,17,145,34,233,212, +28,38,63,52,28,227,173,56,238,98,8,201,112,123,210,108,110,166,199,231, +219,59,165,14,111,247,65,88,98,66,155,188,188,148,255,23,96,8,17,176,51, +208,23,241,98,248,102,66,250,205,134,13,209,154,194,50,108,61,109,127,56, +74,121,37,96,4,18,142,115,95,226,96,148,71,132,225,18,25,159,194,255,2, +52,142,56,42,181,141,57,123,201,254,3,252,130,60,1,189,90,102,230,0,0,0, +0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_63 = 1510; +static unsigned char xml_res_file_63[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,173,73,68,65,84,72,137,141,150,109,140,84,87,25, +199,127,231,220,123,103,238,188,238,204,190,117,119,217,93,96,187,236,74, +132,218,88,40,138,110,137,105,106,108,98,109,144,82,171,130,36,180,69,170, +65,212,165,181,38,245,3,126,49,182,88,173,4,176,82,73,220,38,166,27,72, +140,6,18,211,180,5,73,44,182,169,33,150,5,89,151,178,204,50,12,179,192, +206,204,206,204,206,125,153,59,247,248,97,216,237,203,46,193,39,121,238, +61,31,206,249,253,239,243,156,123,158,231,8,165,20,183,51,33,54,46,215, +136,126,38,24,9,119,32,133,116,74,149,108,141,153,127,43,53,124,230,182, +107,111,37,32,196,250,68,162,117,233,224,189,95,29,216,188,238,190,21,139, +251,250,218,72,36,99,8,1,133,66,153,177,177,44,39,143,143,100,78,29,123, +251,79,133,201,177,23,148,250,243,181,5,65,74,169,121,110,154,79,60,249, +245,193,183,236,191,140,40,53,86,86,42,85,86,106,188,160,212,7,185,186, +143,23,148,154,40,43,117,161,168,212,209,179,74,109,124,250,132,111,134, +182,237,92,136,53,47,130,59,238,124,238,247,59,126,53,248,228,151,215,38, +81,22,216,54,160,64,8,152,157,41,230,30,96,6,65,11,194,235,167,10,188,244, +204,175,135,179,99,187,31,187,101,138,218,239,124,238,192,206,3,63,223, +126,87,151,164,84,0,165,64,202,58,88,168,58,84,204,165,240,67,65,4,68,163, +48,50,225,243,226,142,221,135,175,142,237,126,116,158,64,52,178,109,243, +227,47,63,63,180,98,105,130,98,190,14,22,128,103,87,72,234,147,228,221, +38,244,80,124,78,225,163,66,254,205,113,36,10,103,62,40,114,232,7,207,14, +150,139,251,95,156,19,48,196,134,208,186,167,190,151,187,255,225,251,205, +66,198,187,249,165,2,36,132,237,51,252,244,59,61,92,202,148,25,58,174,225, +27,173,159,8,67,213,35,17,160,124,69,164,81,114,252,216,223,57,249,187, +189,109,85,117,100,82,7,104,108,239,217,217,251,185,123,205,139,231,178, +184,118,21,77,147,0,72,41,105,54,108,138,37,139,166,184,193,174,13,6,191, +57,252,95,50,229,36,162,190,53,204,102,192,247,125,20,32,167,36,75,239, +94,201,200,162,101,79,3,187,116,128,197,247,173,125,188,48,53,195,212,197, +20,154,38,209,52,13,41,36,66,10,34,201,10,66,10,220,106,13,83,215,249,217, +214,37,188,122,116,156,191,190,227,226,43,57,23,129,175,20,190,239,227, +123,30,225,230,36,29,107,86,111,5,118,233,17,177,169,235,158,31,253,176, +247,226,249,11,204,92,191,134,17,48,62,38,208,98,56,115,57,247,125,69,197, +170,178,229,225,126,122,22,165,217,125,240,60,149,170,172,131,125,31,165, +20,85,207,67,203,231,9,220,209,150,140,202,173,43,245,64,60,190,194,211, +67,100,175,164,240,102,10,232,134,142,166,105,104,82,67,74,129,213,44,234, +251,49,119,112,192,113,92,6,86,117,113,164,191,137,77,207,190,193,88,218, +70,249,62,181,154,79,205,175,225,43,69,227,226,30,2,77,241,229,210,104, +136,181,91,165,44,133,244,105,102,74,57,44,187,138,101,123,88,142,139,237, +184,212,106,62,11,153,82,138,68,44,204,209,125,15,209,18,87,88,150,131, +229,184,88,182,75,185,226,226,120,62,122,36,220,165,11,67,87,181,210,53, +74,99,175,129,10,32,26,150,161,69,58,49,204,4,70,176,129,106,181,117,65, +129,89,187,154,185,66,190,48,77,177,88,194,179,75,120,214,20,94,37,75,44, +110,163,12,3,221,243,188,171,186,153,64,143,182,227,229,51,168,226,37,188, +153,107,120,50,138,101,196,168,244,173,154,7,149,66,34,132,224,221,119, +79,179,254,251,195,100,174,92,6,183,8,94,1,220,28,248,54,146,47,224,43, +117,89,58,142,253,190,102,198,8,55,245,131,17,135,96,178,254,214,195,32, +116,84,205,249,240,88,41,133,166,107,24,1,141,61,123,135,25,120,228,183, +100,82,41,168,86,64,213,64,24,160,69,145,13,75,9,37,187,113,221,202,89, +89,206,190,148,241,236,153,209,198,222,53,96,196,64,134,64,143,213,199, +122,12,169,135,80,212,127,197,160,25,164,230,86,216,178,99,63,207,188,240, +15,92,223,4,35,122,115,126,28,244,40,104,33,26,58,239,198,247,184,81,154, +216,115,86,2,100,71,71,94,105,237,95,141,209,184,12,8,128,140,212,93,139, +32,180,80,189,12,132,131,164,211,105,214,108,56,200,208,177,73,148,22,3, +45,14,50,10,90,20,100,24,132,9,102,51,45,159,254,34,211,147,87,14,1,72, +128,92,58,189,87,97,149,58,239,249,26,4,18,32,130,245,20,233,17,140,160, +73,64,87,156,124,251,12,107,191,117,132,115,41,27,52,13,116,3,12,19,140, +48,104,97,208,76,16,38,77,253,3,4,163,13,42,159,78,61,63,87,139,0,26,7, +126,249,232,202,7,191,49,124,238,205,19,220,56,255,47,208,35,96,152,132, +195,58,171,150,199,57,61,90,65,9,3,33,4,94,173,134,227,56,248,190,95,47, +185,158,11,110,153,72,219,34,250,190,244,0,19,239,29,223,126,227,196,143, +95,254,152,0,64,231,198,67,123,122,86,61,56,248,159,183,78,113,227,194, +251,224,215,208,205,32,137,68,146,100,50,73,56,28,70,74,137,227,56,76,79, +79,147,203,229,176,42,21,80,138,88,107,23,189,3,159,231,122,234,244,208, +229,225,77,91,102,153,243,26,78,231,183,255,184,167,231,179,95,25,156,28, +153,32,51,242,30,225,128,160,163,189,157,150,230,22,162,241,24,154,212, +176,44,139,92,110,138,236,100,150,92,190,72,188,187,143,182,187,122,201, +92,120,231,15,233,87,191,249,196,71,121,11,246,228,228,250,125,143,245, +174,94,183,63,102,180,38,163,86,133,6,77,209,24,143,18,143,205,10,84,200, +21,75,228,237,42,121,221,96,202,201,89,169,179,255,220,153,63,188,237,224, +39,89,183,110,250,15,252,34,212,210,179,228,169,238,222,79,125,183,183, +123,73,95,87,34,65,71,66,160,9,200,78,67,42,87,96,108,34,117,41,117,113, +244,149,235,227,227,251,252,191,253,164,176,32,231,255,186,182,108,62,208, +173,199,162,253,129,144,217,129,144,194,181,236,140,87,42,141,170,161,237, +169,219,173,253,31,151,169,176,141,218,30,108,211,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_64 = 1316; +static unsigned char xml_res_file_64[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,4,235,73,68,65,84,72,137,141,150,109,108,84,85,26, +128,159,115,238,189,211,59,51,119,166,51,5,74,91,104,145,90,10,70,80,179, +8,238,170,72,140,209,104,98,52,104,240,35,74,54,65,69,220,196,101,119,235, +215,15,99,130,127,204,42,186,49,70,89,87,37,145,77,86,137,70,99,162,137, +49,17,144,40,104,98,226,87,81,187,131,173,83,75,153,210,206,71,231,235, +206,116,238,189,175,63,42,136,82,194,156,228,156,95,231,60,207,57,239,123, +114,222,163,68,132,179,53,165,54,158,103,224,92,216,18,141,116,161,149, +174,151,170,25,159,202,87,34,123,190,57,235,218,51,9,148,218,144,72,180, +47,29,88,123,253,186,77,235,175,88,185,164,191,191,131,68,50,134,82,80, +40,148,73,165,50,28,216,55,56,126,232,189,131,255,43,76,164,158,18,121, +251,248,156,32,17,57,173,219,246,221,247,220,52,176,183,246,206,160,72, +170,44,146,46,139,140,20,68,126,200,205,246,145,130,200,104,89,228,72,81, +228,221,195,34,27,31,220,31,216,225,45,219,230,98,157,118,130,133,231,62, +250,159,251,159,30,184,231,154,75,147,136,11,181,26,32,160,20,156,152,169, +78,14,96,183,128,209,2,31,28,42,240,236,67,255,218,147,73,109,191,237,140, +33,234,60,247,209,157,219,118,62,190,245,130,110,77,169,0,34,160,245,44, +88,201,44,84,157,12,225,175,66,20,56,14,12,142,6,60,115,255,246,55,142, +165,182,223,114,154,192,137,110,217,116,215,139,79,238,94,185,52,193,100, +38,160,209,16,2,223,159,133,163,80,252,34,82,39,20,191,110,204,180,12,28, +71,19,117,224,155,31,138,236,250,235,35,3,229,226,11,207,156,20,88,234, +230,240,250,251,254,146,187,234,198,171,236,194,184,71,189,238,98,171,18, +253,243,39,81,74,255,54,249,167,230,239,151,28,254,63,187,16,29,105,71, +2,33,218,166,217,247,222,71,28,248,247,115,29,13,121,115,194,4,104,235, +236,221,214,247,199,181,246,240,183,25,102,106,13,2,223,99,237,138,22,54, +223,124,225,156,23,227,247,237,169,215,198,25,58,154,65,0,157,213,44,189, +104,21,131,139,150,61,8,60,96,2,44,185,226,210,187,10,217,10,217,225,52, +134,161,81,34,148,22,181,53,5,7,40,21,43,28,159,116,9,130,128,192,243,136, +204,79,210,117,201,154,205,192,3,102,84,221,217,189,250,239,127,235,27, +254,254,8,149,201,227,88,33,11,173,21,197,146,217,180,96,186,56,77,230, +88,22,17,161,225,121,24,249,60,161,133,29,73,71,111,94,101,134,226,241, +149,158,25,38,115,52,141,87,41,96,90,38,166,97,80,173,180,54,45,168,148, +203,20,242,121,124,63,192,15,124,2,17,218,150,244,18,154,23,63,207,180, +90,99,157,110,41,67,97,236,11,148,217,74,40,146,196,50,3,26,13,175,105, +193,204,76,3,215,173,227,139,224,251,62,13,95,136,122,1,102,52,210,109, +42,203,20,191,116,156,82,234,117,144,16,170,117,25,118,114,5,213,114,172, +105,65,173,238,82,44,78,225,213,74,120,110,22,175,154,33,22,175,33,150, +133,233,121,222,49,211,78,96,58,157,120,249,113,164,248,35,110,189,66,53, +63,175,105,65,113,98,136,226,240,1,240,10,48,147,131,160,134,230,50,2,145, +159,116,189,94,251,218,176,99,68,230,45,7,43,14,45,73,48,29,148,14,53,45, +16,105,128,248,160,44,48,28,116,235,82,194,201,30,102,102,170,135,117,57, +243,236,184,87,171,12,181,245,93,2,86,12,116,24,140,40,232,150,166,5,232, +240,236,230,76,7,140,48,173,139,47,34,240,152,42,141,238,56,172,1,50,67, +131,47,183,47,95,131,213,182,12,8,129,142,96,89,118,211,124,211,10,131, +142,128,178,193,158,207,130,243,47,103,122,226,232,46,0,19,32,55,54,246, +92,55,238,99,139,87,223,16,27,249,228,45,208,54,7,191,58,198,211,175,28, +68,105,141,82,115,131,69,192,247,125,190,28,202,130,97,131,239,49,111,249, +106,90,156,86,201,143,125,252,36,156,242,216,181,173,251,231,45,171,174, +187,117,207,183,31,238,103,42,245,229,108,136,76,27,180,1,74,97,24,26,173, +53,10,69,32,130,239,123,136,8,248,1,4,51,80,175,16,237,88,68,255,149,87, +51,250,249,190,173,83,251,255,241,226,111,4,0,139,55,238,218,209,123,241, +117,3,223,237,61,196,212,145,175,33,240,49,237,22,18,137,36,201,100,146, +72,36,130,214,154,122,189,206,244,244,52,185,92,14,183,90,5,17,98,237,221, +244,173,251,19,147,233,47,118,255,180,231,206,63,159,96,158,86,112,22,223, +241,234,142,222,63,92,59,48,49,56,202,248,224,231,68,66,138,174,206,78, +22,204,95,128,19,143,97,104,3,215,117,201,229,178,100,38,50,228,242,69, +226,61,253,116,92,208,199,248,145,207,94,25,251,239,237,119,159,202,155, +179,38,39,55,60,127,91,223,154,245,47,196,172,246,164,227,86,105,53,132, +182,184,67,60,118,66,80,37,87,44,145,175,53,200,155,22,217,122,206,77,31, +254,116,91,254,141,45,47,253,158,117,230,162,127,245,19,225,5,189,231,220, +215,211,183,226,222,190,158,115,250,187,19,9,186,18,10,67,65,102,26,210, +185,2,169,209,244,143,233,225,161,151,39,71,70,158,15,222,127,184,48,39, +167,169,111,203,166,157,61,102,204,89,30,10,219,93,40,173,102,220,218,184, +87,42,13,201,238,173,233,179,173,253,25,145,180,96,102,170,35,60,27,0,0, +0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_65 = 1528; +static unsigned char xml_res_file_65[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,191,73,68,65,84,72,137,141,150,109,140,92,85,25, +199,127,231,190,204,222,153,185,51,59,179,221,93,246,189,116,217,110,69, +91,36,150,109,165,218,54,126,192,64,98,72,80,11,52,208,152,240,82,139,9, +86,93,80,63,16,147,250,197,136,5,67,12,52,32,54,177,70,98,193,104,76,48, +33,38,208,70,133,106,4,137,176,173,45,187,237,118,150,237,238,204,190,204, +204,206,204,206,204,157,123,239,121,252,48,219,173,181,109,234,73,206,189, +57,57,231,252,254,247,121,238,243,60,231,40,17,225,122,77,169,93,55,155, +184,159,110,137,199,122,48,148,225,149,171,217,144,229,127,137,28,253,240, +186,123,175,37,160,212,61,169,84,231,186,209,45,95,218,190,103,231,142, +141,107,135,135,187,72,165,19,40,5,197,98,133,241,241,44,127,62,54,54,115, +226,143,239,188,82,204,141,255,68,228,247,115,87,5,137,200,21,221,113,30, +121,244,203,163,111,213,255,48,38,50,94,17,201,84,68,38,139,34,103,243, +205,62,89,20,153,170,136,76,148,68,94,63,41,178,235,201,227,218,137,238, +221,127,53,214,21,22,220,112,211,83,47,61,254,204,232,163,95,220,150,70, +106,80,175,3,2,74,193,197,149,106,245,1,78,11,152,45,240,167,19,69,158, +251,238,79,143,102,199,15,220,127,77,23,117,223,244,212,161,253,135,126, +184,239,150,126,131,114,17,68,192,48,154,96,37,77,168,90,117,225,37,65, +20,184,46,140,77,105,158,125,252,192,107,179,227,7,238,189,66,192,141,239, +221,243,240,139,79,31,217,184,46,69,169,208,4,163,53,133,92,6,165,52,202, +112,72,117,244,130,130,252,124,150,122,101,30,101,216,180,182,247,17,115, +93,0,226,46,124,120,182,196,225,111,126,127,180,82,122,225,89,0,11,192, +86,95,137,238,124,236,27,47,117,117,164,152,248,40,88,249,82,133,87,153, +102,247,14,72,37,92,206,94,168,240,206,100,72,168,21,195,169,69,70,182, +173,65,148,205,43,111,230,168,212,227,160,64,230,133,206,246,36,91,31,184, +239,25,91,125,245,215,190,252,54,103,1,180,117,15,238,31,250,236,22,231, +220,169,44,141,186,143,105,26,205,0,40,79,112,219,39,111,7,108,58,219,162, +188,254,207,60,13,63,96,247,72,148,225,181,109,216,17,135,174,127,44,50, +54,59,135,214,26,1,140,69,131,117,183,110,98,172,119,253,147,192,19,22, +192,218,29,219,30,46,46,46,179,120,46,131,105,26,152,166,137,161,12,28, +191,66,16,10,40,77,205,11,152,159,91,160,225,251,120,158,67,16,106,108, +160,84,44,49,55,231,163,69,208,90,163,131,128,88,123,154,158,173,35,15, +1,79,88,113,245,96,255,230,111,127,107,232,220,233,9,150,231,231,176,35, +246,170,64,167,85,68,53,131,8,209,154,92,46,135,239,7,136,238,93,253,219, +149,74,137,108,118,169,105,129,8,126,16,96,22,10,68,110,232,74,187,198, +67,155,172,72,50,185,49,176,162,100,47,100,8,150,139,88,182,133,105,154, +152,134,73,50,94,4,101,0,10,209,154,66,177,64,24,132,32,93,171,145,87,171, +150,41,20,124,68,107,194,80,19,234,16,45,66,219,218,65,34,107,146,55,91, +118,107,162,187,86,206,82,156,126,31,101,181,18,137,165,49,77,193,52,67, +124,167,193,197,96,20,173,169,86,171,232,80,95,150,55,65,195,163,94,243, +208,26,66,17,194,48,196,15,133,120,160,177,226,177,126,75,217,150,132,229, +57,202,227,191,1,137,160,90,215,99,198,251,176,157,20,141,136,5,40,148, +2,68,83,171,214,208,90,154,9,178,226,35,191,225,81,169,148,9,2,143,160, +94,38,168,45,18,84,179,36,146,117,196,182,177,130,32,152,181,156,20,150, +219,77,80,152,65,74,231,9,150,231,8,12,151,70,170,123,21,36,104,102,167, +78,35,162,16,182,172,38,92,117,105,154,252,249,83,208,40,65,80,132,70,30, +116,29,131,207,161,69,62,54,60,175,254,129,233,36,136,173,217,0,118,18, +90,210,205,183,21,3,21,185,228,11,17,240,202,80,91,73,241,149,166,253,6, +248,85,144,16,148,13,166,139,209,186,142,104,122,128,70,163,122,210,168, +100,159,155,9,234,203,103,218,134,182,130,157,0,35,10,86,2,236,4,98,196, +155,238,89,225,99,185,96,197,47,21,34,32,20,123,101,125,178,57,111,70,105, +237,187,21,29,176,80,158,58,120,210,0,200,158,25,123,185,115,195,8,118, +219,122,32,2,70,28,140,56,134,237,98,217,22,182,109,99,219,102,19,110,37, +136,197,162,205,49,128,209,2,166,11,70,12,148,3,78,59,29,159,250,60,75, +185,11,135,87,75,69,126,122,250,103,253,212,126,208,183,249,238,196,228, +219,191,3,90,192,138,49,91,182,57,246,151,49,98,81,155,183,223,155,4,195, +4,37,188,250,198,105,238,110,52,168,123,62,167,166,170,96,198,154,70,133, +1,107,54,108,166,197,109,149,194,244,95,159,190,172,216,181,109,255,241, +189,155,238,186,239,232,169,55,143,179,112,250,61,176,226,152,142,195,80, +175,67,139,101,146,175,25,20,43,160,148,34,238,104,122,146,224,249,13,62, +154,241,240,235,1,52,42,196,187,122,25,254,194,29,76,189,123,108,223,194, +241,239,188,120,153,0,64,223,174,195,7,7,111,187,107,244,223,111,157,96, +97,226,3,208,33,150,211,66,42,149,38,157,78,19,139,197,48,12,3,207,243, +88,90,90,34,159,207,83,171,86,65,132,68,103,63,67,219,111,103,62,243,254, +145,143,143,62,248,181,43,202,245,170,200,3,191,60,56,248,153,59,71,115, +99,83,204,140,189,75,44,162,232,233,238,166,163,189,3,55,153,192,52,76, +106,181,26,249,252,34,217,92,150,124,161,68,114,96,152,174,91,134,152,153, +248,251,47,166,127,181,251,145,255,230,93,245,76,78,223,243,252,253,67, +35,59,95,72,216,157,105,183,86,165,213,20,218,146,46,201,196,69,129,42, +249,82,153,66,221,167,96,217,44,122,249,90,230,228,223,246,23,94,219,251, +243,255,101,93,251,208,191,227,71,209,142,193,27,31,27,24,250,196,215,135, +6,110,28,238,79,165,232,73,41,76,5,217,37,200,228,139,140,79,101,206,103, +206,157,121,121,126,114,242,121,253,198,247,138,87,229,252,95,215,150,61, +135,6,172,132,187,33,18,117,122,80,134,106,212,234,51,65,185,124,70,142, +236,203,92,111,239,127,0,47,28,209,136,136,133,235,226,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_66 = 3136; +static unsigned char xml_res_file_66[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,22,0,0,0,22,8,6,0,0, +0,196,180,108,59,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18,1,210,221,126, +252,0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67, +67,32,112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61, +247,222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38, +42,33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142, +142,128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202, +251,225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157, +179,207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196, +198,225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126, +60,60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15, +234,66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166, +0,64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39, +127,230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101, +136,68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45, +0,48,73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133, +41,0,4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16, +231,42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40, +206,73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243, +204,0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182, +14,95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116, +126,209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160, +117,247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69, +161,144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103, +194,95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129, +71,4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252, +183,11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154, +140,243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62, +223,53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226, +247,0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253, +71,160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0, +68,160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96, +54,132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134, +205,176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184, +14,61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136, +1,98,138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20, +81,34,75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186, +145,59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185, +168,55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26, +61,140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,1,91,73,68,65,84,120,218,180,149,63,79,131,80,20,197,15,136, +33,162,214,52,233,80,39,71,55,117,244,3,176,201,98,252,179,152,24,23,18, +7,119,63,132,171,155,155,198,116,210,193,196,197,79,224,168,117,48,53,33, +166,113,41,216,166,225,137,32,82,121,14,230,97,250,231,225,43,224,217,46, +220,252,238,125,135,3,72,134,110,222,0,88,69,177,186,133,161,155,132,22, +44,67,55,137,194,70,216,54,225,142,175,86,231,208,106,185,66,171,54,30, +45,0,64,2,150,101,137,219,236,56,68,216,3,198,17,2,87,42,179,104,183,223, +132,192,146,52,0,102,23,70,169,211,241,132,55,102,152,161,141,203,229,233, +76,49,232,118,223,71,111,204,192,174,235,231,202,217,88,86,0,64,169,52, +149,122,159,144,64,236,225,45,28,92,163,121,188,150,212,158,247,145,207, +99,38,10,96,102,239,18,254,233,6,0,64,211,212,84,160,239,135,124,43,14, +107,117,88,182,135,230,235,175,207,218,238,5,130,179,77,4,193,103,54,143, +101,89,194,209,206,114,210,48,191,127,5,0,8,207,183,0,0,170,58,153,10,12, +195,72,244,5,161,136,106,219,73,21,69,189,108,30,15,166,194,57,89,239,171, +21,101,34,21,216,235,125,165,231,152,167,56,142,179,125,43,216,164,191, +242,204,19,165,148,145,250,193,195,13,249,36,143,19,161,194,193,89,78,145, +88,241,112,255,196,109,90,90,89,68,253,174,33,4,124,182,94,126,78,249,95, +63,211,239,1,0,69,58,179,150,190,83,152,101,0,0,0,0,73,69,78,68,174,66, +96,130}; + +static size_t xml_res_size_67 = 3145; +static unsigned char xml_res_file_67[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,22,0,0,0,22,8,6,0,0, +0,196,180,108,59,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18,1,210,221,126, +252,0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67, +67,32,112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61, +247,222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38, +42,33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142, +142,128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202, +251,225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157, +179,207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196, +198,225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126, +60,60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15, +234,66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166, +0,64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39, +127,230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101, +136,68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45, +0,48,73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133, +41,0,4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16, +231,42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40, +206,73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243, +204,0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182, +14,95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116, +126,209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160, +117,247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69, +161,144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103, +194,95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129, +71,4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252, +183,11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154, +140,243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62, +223,53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226, +247,0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253, +71,160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0, +68,160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96, +54,132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134, +205,176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184, +14,61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136, +1,98,138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20, +81,34,75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186, +145,59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185, +168,55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26, +61,140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,1,100,73,68,65,84,120,218,98,244,113,73,61,194,192,192,160,199, +64,93,112,130,193,199,37,245,211,127,42,3,31,151,212,79,44,48,43,94,190, +252,132,211,122,9,9,126,134,23,47,62,18,229,212,155,215,239,50,48,48,48, +48,192,13,102,98,98,196,169,248,213,171,79,68,135,1,204,28,162,12,22,17, +225,101,120,243,230,51,81,6,51,50,162,25,12,19,192,6,222,190,253,66,180, +139,97,198,96,184,88,80,144,155,172,100,240,254,253,87,236,46,134,25,252, +241,227,55,138,210,25,73,65,193,192,192,192,192,199,199,137,87,254,211, +167,239,248,35,207,184,106,55,195,217,54,87,12,141,95,190,252,32,63,140, +157,90,14,48,48,48,48,98,77,33,92,92,236,120,13,252,246,237,39,246,160, +8,157,120,156,129,145,129,145,129,129,225,63,131,98,238,54,134,47,223,127, +51,124,253,245,135,225,251,226,16,6,6,6,6,134,239,223,127,145,23,198,235, +138,172,25,28,26,247,51,48,48,48,50,60,154,230,131,161,129,157,157,21,175, +129,63,127,254,70,9,82,38,228,160,56,212,232,196,240,31,202,70,199,191, +127,255,193,139,97,234,48,194,24,230,133,107,125,158,88,93,196,194,194, +140,215,197,127,254,252,197,159,142,113,129,127,255,254,145,87,86,192,108, +34,148,158,113,129,255,255,255,195,76,66,53,24,83,1,101,128,137,148,36, +68,117,131,201,241,5,60,40,46,95,188,133,83,145,158,129,58,195,165,11,55, +137,50,240,254,221,199,16,95,210,168,50,189,4,24,0,37,4,198,234,225,17, +112,1,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_68 = 1568; +static unsigned char xml_res_file_68[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,5,231,73,68,65,84,72,137,141,150,125,140,84,87,25, +135,159,115,238,189,179,119,62,119,102,151,133,253,166,208,101,215,77,129, +18,145,214,54,82,130,155,26,219,160,166,181,96,141,16,181,165,72,77,42, +234,182,74,76,99,2,218,24,43,214,52,13,165,95,96,164,177,113,131,169,169, +218,168,52,124,216,84,193,4,91,91,118,161,184,203,46,251,61,187,179,115, +103,118,102,118,238,220,153,59,247,248,199,192,82,93,8,158,228,189,255, +220,115,158,223,123,126,231,190,239,185,66,41,197,141,134,16,155,59,53, +66,183,86,5,3,141,72,33,157,108,62,94,102,238,125,165,122,206,222,112,237, +245,4,132,184,47,26,93,188,172,251,182,77,235,183,109,184,107,229,210,246, +246,122,162,177,48,66,64,58,157,163,191,63,206,219,39,122,39,78,189,249, +247,215,210,83,253,63,83,234,119,211,215,4,41,165,22,132,105,110,127,228, +254,238,227,133,55,122,149,234,207,41,53,156,83,106,40,173,212,69,171,18, +67,105,165,70,114,74,13,100,148,250,99,159,82,155,159,56,233,153,254,29, +187,174,197,90,176,131,37,55,63,249,210,99,63,239,126,228,51,119,198,80, +54,20,10,128,2,33,224,202,76,49,255,0,179,10,180,42,56,122,42,205,179,223, +251,69,79,188,127,207,131,215,181,168,225,230,39,15,236,58,176,119,231, +234,22,73,54,13,74,129,148,21,176,80,21,168,152,183,240,170,32,2,66,33, +232,29,241,120,230,177,61,71,38,251,247,108,89,32,16,10,238,216,246,240, +139,79,31,94,185,44,74,38,5,115,118,17,215,245,136,69,76,132,168,8,168, +143,100,62,55,107,225,204,14,33,164,134,12,52,81,93,91,71,48,4,103,47,102, +56,244,173,221,221,185,204,243,207,204,11,24,226,139,254,13,143,126,211, +234,250,66,151,153,158,112,65,128,147,29,199,239,43,81,144,45,248,171,140, +74,246,74,204,103,92,163,95,226,129,245,126,132,102,242,218,209,56,25,173, +3,229,41,130,53,146,19,111,254,149,183,95,120,174,190,164,126,59,165,3, +212,52,44,223,213,246,201,219,204,193,115,113,138,133,18,154,38,185,99, +233,40,91,186,154,232,57,222,199,177,243,81,170,195,65,132,184,98,16,172, +238,244,104,169,15,35,245,32,141,177,81,6,254,29,71,1,50,41,89,182,102, +21,189,77,43,158,0,30,215,1,150,222,117,231,195,233,228,28,201,193,97,52, +77,162,105,26,153,218,34,118,81,242,192,198,37,116,182,166,249,209,175, +227,132,66,145,121,129,116,147,139,82,13,0,228,243,14,211,137,4,158,231, +225,185,46,129,69,49,26,111,95,247,16,240,184,30,20,91,91,214,126,231,219, +109,131,31,14,48,151,152,198,240,25,104,154,70,177,77,67,211,52,242,142, +226,214,206,122,126,185,59,202,215,246,254,139,124,201,15,2,236,156,129, +144,18,0,199,113,136,79,38,81,74,81,114,93,180,84,10,223,146,250,88,72, +62,180,74,250,34,145,149,174,238,39,62,62,69,42,149,194,178,44,44,203,194, +117,29,164,166,33,165,196,41,122,68,171,35,252,101,255,167,185,165,185, +64,114,122,138,76,218,66,74,13,0,183,232,144,78,165,176,146,22,233,84,138, +196,228,36,142,235,225,171,141,116,74,163,58,220,96,103,227,164,199,222, +99,46,107,97,23,74,216,5,23,137,66,147,21,1,41,37,101,165,40,149,5,47,237, +189,151,175,111,170,163,202,7,202,171,124,129,229,178,139,109,59,216,78, +17,187,80,36,151,47,226,184,30,122,48,208,162,11,67,87,229,236,52,217,254, +223,128,242,33,170,87,160,5,155,17,170,171,2,215,64,106,18,41,36,66,84, +44,89,20,241,152,77,151,185,92,26,148,93,151,76,102,6,183,144,197,181,147, +184,249,56,225,72,1,101,24,72,215,117,39,117,51,138,30,106,0,215,65,101, +46,225,78,191,139,42,101,17,82,71,138,10,220,231,243,225,243,25,252,224, +169,131,108,223,253,123,198,39,18,243,22,149,138,89,50,131,39,201,143,28, +163,56,126,28,47,249,46,18,23,79,169,81,221,113,10,31,104,102,152,64,109, +7,153,92,14,170,170,65,84,129,212,209,180,138,61,129,128,73,209,177,217, +180,245,41,222,122,103,28,16,248,116,184,82,203,170,92,6,85,6,97,128,22, +66,134,27,240,199,90,153,41,142,245,201,92,252,217,9,183,48,119,161,166, +237,118,48,194,32,253,160,135,65,26,72,41,136,132,3,12,14,13,211,217,245, +99,222,58,157,169,188,211,131,40,97,94,109,152,72,48,34,160,135,64,243, +83,221,188,6,207,101,38,59,178,175,79,2,196,47,244,190,178,184,99,29,70, +205,10,192,7,50,72,48,20,196,244,251,249,195,209,211,172,249,220,65,70, +167,205,203,240,74,104,186,31,46,159,137,110,24,32,3,32,76,48,23,81,119, +203,167,152,157,26,63,4,160,3,88,99,99,207,181,96,255,176,121,237,231,195, +67,127,123,29,168,226,245,63,157,227,252,197,36,47,31,25,64,225,191,60, +243,234,120,127,192,34,145,176,240,60,143,51,103,39,64,51,161,236,82,219, +177,150,170,80,181,74,141,189,243,244,127,53,187,154,245,63,221,178,234, +158,47,245,156,59,118,146,153,15,255,137,225,15,33,204,32,69,167,12,66, +224,51,12,124,62,31,66,8,220,114,25,83,119,184,127,99,11,229,114,153,55, +78,140,144,74,164,8,214,55,209,190,241,110,70,206,156,216,57,115,242,187, +47,46,104,215,205,155,15,237,91,254,137,123,186,207,31,63,197,204,192,7, +224,149,209,205,42,162,209,24,177,88,140,64,32,80,41,60,199,97,118,118, +22,203,178,176,243,121,80,138,240,226,22,218,214,223,65,98,248,189,195, +163,61,91,191,186,160,93,207,139,124,229,87,251,150,127,252,179,221,83, +189,35,76,244,158,33,224,19,52,54,52,80,183,168,142,80,36,140,38,53,108, +219,198,178,146,196,167,226,88,169,12,145,214,118,234,87,183,49,49,240, +143,131,99,175,126,121,251,71,121,215,188,147,99,247,237,127,176,109,221, +134,231,195,198,226,88,200,206,83,173,41,106,34,33,34,225,43,2,121,172, +76,150,84,161,68,74,55,72,58,150,61,220,119,122,87,234,200,142,151,255, +151,117,253,75,255,238,159,248,235,150,223,244,104,107,219,199,190,209, +214,122,83,123,75,52,74,99,84,160,9,136,207,194,176,149,166,127,100,248, +210,240,224,133,87,18,67,67,251,189,63,127,63,125,77,206,255,245,219,178, +237,64,171,30,14,117,248,252,102,35,66,138,162,93,152,112,179,217,11,234, +240,206,225,27,173,253,15,165,91,203,75,105,36,145,113,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_69 = 3692; +static unsigned char xml_res_file_69[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,3,135,73,68,65,84,120,218,100,204,255,79,148,117,0,7,240,247, +231,243,121,190,220,115,247,220,29,119,220,55,78,100,102,130,161,75,23, +110,197,2,182,216,34,106,142,86,234,154,49,155,101,203,205,229,152,81,153, +172,49,41,89,204,162,13,135,180,209,86,109,169,201,26,22,51,151,53,26,211, +84,202,88,67,87,103,140,128,82,180,131,248,114,220,29,220,221,115,207,243, +124,62,253,210,15,125,121,253,1,47,210,246,108,45,116,93,199,217,179,23, +148,233,197,140,99,42,101,166,126,248,250,20,194,171,203,80,16,10,67,146, +117,184,188,126,0,192,173,177,17,164,22,102,144,74,204,34,179,156,194,195, +59,155,33,37,22,19,176,140,60,20,85,178,2,110,181,234,179,238,67,231,163, +107,215,1,220,66,211,142,58,15,99,148,189,251,201,87,9,211,88,134,101,100, +32,108,19,7,246,189,164,44,164,13,123,114,103,179,77,65,8,76,219,70,205, +131,247,113,135,131,149,246,125,120,194,237,80,221,216,187,189,225,8,183, +196,108,50,185,28,111,120,96,115,103,38,157,194,194,252,31,232,122,179, +69,7,23,47,254,185,98,113,0,32,173,187,170,81,182,121,11,20,69,197,254, +87,59,139,10,67,222,61,107,139,124,21,119,126,143,111,43,208,101,164,243, +28,133,171,75,32,201,202,153,252,82,188,213,167,171,205,195,163,119,58, +30,173,42,157,250,96,240,6,176,37,228,8,54,108,12,222,221,242,76,173,60, +240,209,219,248,216,143,203,191,181,85,138,225,43,23,197,83,213,235,69, +72,99,34,20,13,138,195,143,87,138,238,77,158,47,188,12,254,218,178,66,197, +43,227,30,193,57,72,169,139,169,113,195,174,83,29,142,123,107,74,220,209, +207,223,169,223,135,159,47,176,184,33,163,111,98,21,122,251,135,177,123, +77,1,246,120,51,208,156,68,28,74,248,222,26,74,27,21,211,147,11,187,86, +44,190,136,19,71,155,208,243,250,110,28,111,111,66,255,42,114,69,156,174, +17,93,143,133,197,220,243,65,177,180,85,19,23,35,16,203,219,60,162,209, +65,196,27,21,1,145,56,88,25,87,1,185,177,234,46,8,206,33,93,26,250,6,46, +221,45,223,156,75,111,216,175,137,10,12,93,198,118,127,16,44,11,16,78,64, +9,32,150,13,188,183,94,32,171,166,65,41,241,61,89,94,64,2,1,47,94,120,100, +35,232,185,111,199,158,24,250,62,118,122,244,215,219,27,136,170,102,114, +49,1,191,13,48,3,200,229,0,51,79,192,5,1,39,128,179,60,10,139,115,250,147, +41,157,98,170,179,102,240,234,56,145,246,62,253,208,128,47,82,52,160,135, +139,193,143,28,109,159,201,194,239,13,2,150,69,97,229,1,211,36,16,66,0, +12,144,24,69,78,112,43,54,49,255,190,49,159,220,196,109,132,105,203,177, +51,88,231,212,80,234,80,192,41,233,73,101,9,94,249,46,129,197,60,129,109, +19,228,4,240,218,24,195,53,79,20,44,18,65,255,213,155,99,0,70,186,143,29, +238,233,61,222,214,79,132,145,197,236,167,93,112,70,34,120,121,235,115, +193,29,78,54,153,162,212,29,4,199,154,114,39,98,19,57,84,215,5,96,232,33, +88,30,21,13,61,35,7,127,92,17,157,130,115,1,0,148,51,25,11,197,101,72,250, +139,209,113,99,116,238,203,60,111,141,234,12,193,168,19,76,99,144,61,50, +152,42,129,82,19,237,125,215,207,93,95,17,39,103,111,253,34,240,55,34,56, +7,0,36,166,199,161,104,46,200,154,134,198,112,168,165,62,168,28,40,113, +178,144,44,19,228,117,41,209,27,75,13,158,79,242,142,165,244,210,53,135, +203,131,255,5,0,96,100,82,96,146,2,42,73,184,95,87,43,242,2,53,38,160,221, +54,196,148,204,112,105,62,151,143,83,38,225,159,254,21,0,128,109,91,160, +132,129,80,130,250,128,86,152,86,169,54,62,147,77,206,89,118,154,16,130, +255,250,107,0,227,81,135,82,1,246,232,87,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_70 = 894; +static unsigned char xml_res_file_70[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,70,114,32,49,50,32,68,101,122,32,50,48,48,51,32,50,49, +58,52,50,58,48,50,32,43,48,49,48,48,158,131,49,239,0,0,0,7,116,73,77,69, +7,211,8,27,10,52,46,133,125,36,144,0,0,0,9,112,72,89,115,0,0,10,240,0,0, +10,240,1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0, +2,214,73,68,65,84,120,218,165,147,91,72,147,97,24,199,255,223,183,111,155, +115,50,39,74,154,169,216,242,196,200,164,36,236,34,200,44,66,170,11,189, +138,180,72,73,37,130,69,4,38,132,116,83,100,23,222,120,145,134,148,32,138, +23,169,97,168,69,16,116,16,131,200,3,150,194,92,147,202,67,155,59,184,211, +183,237,59,237,123,251,92,32,88,121,229,115,249,190,239,243,227,255,252, +159,247,15,236,178,168,191,15,156,78,167,222,110,183,215,209,52,125,78, +163,209,228,9,130,64,220,110,183,85,20,197,17,159,207,55,208,216,216,200, +239,72,11,133,66,39,109,86,219,170,24,150,137,224,145,201,79,251,42,89, +91,114,16,206,37,145,31,139,203,100,232,217,144,109,124,124,252,200,127, +21,248,253,129,211,17,54,50,150,154,152,161,237,152,190,141,9,12,195,71, +121,17,137,9,48,8,123,113,193,104,65,173,169,9,175,222,143,133,162,66,180, +188,174,174,110,102,11,48,55,55,103,212,235,146,172,153,41,57,233,150,217, +10,176,134,21,168,73,34,56,145,32,42,73,96,197,40,156,130,27,21,154,106, +220,207,239,66,223,72,175,77,140,137,197,205,205,205,2,179,9,8,4,2,215, +10,115,205,233,237,159,110,33,156,252,11,135,147,202,81,111,186,135,61, +9,89,113,117,97,49,132,46,107,27,58,108,15,113,204,115,10,197,69,37,5,227, +111,70,47,42,87,189,244,230,3,21,173,170,10,251,163,248,200,140,128,145, +116,104,48,181,65,75,233,112,231,237,21,52,142,158,133,134,214,194,98,190, +11,3,140,232,113,119,192,148,101,130,98,106,213,102,111,92,1,163,82,23, +126,247,47,34,66,133,161,227,147,112,245,229,9,40,230,35,89,159,138,155, +165,15,176,224,154,197,227,217,118,208,49,6,115,161,121,48,148,26,202,150, +138,182,0,28,207,209,250,196,4,68,69,17,2,19,131,172,39,32,90,25,29,21, +195,160,8,133,218,23,149,88,151,156,136,37,16,196,100,64,82,124,81,20,80, +91,0,159,111,227,91,225,190,227,165,178,164,6,11,94,25,137,70,140,34,168, +126,94,166,40,145,226,141,114,34,16,145,57,148,24,15,193,229,118,194,227, +241,216,55,123,233,63,0,159,178,155,0,42,19,46,193,43,108,196,157,231,37, +17,147,181,43,248,92,239,128,168,150,33,34,166,220,177,104,200,184,129, +201,233,73,5,44,140,110,1,12,201,134,71,51,11,83,190,166,140,22,228,48, +102,56,120,23,130,60,7,243,147,52,20,116,167,42,91,224,176,198,123,81,115, +224,50,50,151,246,99,118,126,102,153,162,168,190,109,31,169,191,191,191, +154,146,233,193,163,7,203,84,131,124,15,250,214,187,224,8,110,196,103,206, +77,205,129,37,187,5,185,182,2,12,189,30,228,194,81,246,204,192,192,192, +196,63,89,232,236,236,172,102,67,236,211,252,236,130,148,188,172,124,176, +76,72,113,94,49,45,72,48,49,245,1,95,173,95,28,132,34,53,74,243,187,29, +195,212,218,218,154,230,245,122,175,19,153,156,103,84,140,137,227,56,226, +15,250,23,121,158,31,145,101,185,91,201,66,112,183,9,222,86,191,1,216,18, +102,195,252,90,176,179,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_71 = 1345; +static unsigned char xml_res_file_71[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,111,32,50,56,32,68,101,122,32,50,48,48,51,32,49,57, +58,51,53,58,49,57,32,43,48,49,48,48,80,162,195,116,0,0,0,7,116,73,77,69, +7,211,2,24,0,5,17,160,212,60,134,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10, +240,1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,4, +153,73,68,65,84,120,218,181,84,123,76,83,103,20,63,125,63,70,161,64,75, +91,168,157,82,229,209,202,6,18,160,3,140,102,206,24,41,33,110,127,204,45, +75,156,44,153,155,91,196,136,219,52,217,140,154,197,25,216,80,30,162,1, +135,24,55,12,143,57,98,168,144,97,16,133,48,7,86,59,19,101,194,144,9,37, +182,165,15,90,122,75,31,183,237,221,119,155,176,49,121,185,57,79,114,238, +247,58,223,239,119,190,243,59,185,0,207,217,40,79,27,88,90,250,83,24,0, +94,230,243,184,58,166,157,238,126,38,139,56,203,98,177,173,135,14,189,253, +238,82,247,168,139,29,148,149,253,242,194,220,53,135,29,198,20,172,16,190, +39,123,101,93,107,220,170,232,177,226,3,111,169,173,150,73,238,114,137, +45,72,80,113,242,218,167,4,205,54,245,205,215,87,20,179,123,123,138,114, +108,99,15,70,239,172,223,184,26,138,118,231,51,48,10,27,38,77,227,177,59, +118,236,139,88,138,128,78,126,206,156,190,153,51,227,118,242,253,184,71, +231,158,113,169,120,210,176,227,137,107,21,180,182,243,237,89,232,120,144, +140,57,114,164,33,47,70,26,254,210,74,116,67,63,3,48,230,3,40,42,61,154, +125,161,228,184,182,176,112,95,86,125,253,73,219,162,47,112,185,173,231, +83,54,42,52,156,184,232,9,73,162,180,37,239,245,12,90,162,132,7,14,187, +117,237,108,160,215,231,186,144,152,32,97,95,233,190,3,250,0,192,112,239, +77,162,185,252,196,184,217,100,24,48,26,108,254,154,154,83,11,86,131,70, +126,54,110,120,195,69,141,138,42,72,127,45,149,146,145,34,163,8,80,150, +56,147,1,131,15,245,235,86,138,214,40,83,83,85,110,130,240,87,232,110,255, +214,212,123,181,115,58,35,35,67,213,92,85,174,253,182,174,76,57,56,168, +251,113,100,228,174,55,59,103,247,229,77,155,182,11,186,186,26,7,22,234, +34,202,39,197,103,126,222,255,213,135,42,1,19,192,234,6,120,228,2,240,161, +185,12,73,221,84,89,71,232,110,13,108,105,108,172,189,90,80,160,230,17, +68,248,112,140,144,239,124,57,53,105,4,199,89,22,28,23,37,164,166,191,152, +97,52,154,252,58,237,93,61,65,48,84,149,149,251,45,127,105,176,119,111, +57,63,156,207,144,139,89,0,70,15,192,31,24,128,135,0,112,15,13,67,213,15, +45,246,71,163,163,181,116,154,176,143,140,221,186,85,253,129,7,199,133, +153,89,89,98,38,147,185,102,210,106,133,254,235,67,16,167,218,6,116,131, +157,217,209,166,185,209,212,92,109,249,135,200,118,187,237,179,131,159, +239,20,58,208,252,129,209,13,20,30,7,228,124,128,143,119,30,214,114,120, +194,87,47,93,58,231,36,227,170,171,79,173,199,60,222,210,124,181,154,194, +100,179,193,227,245,130,132,205,2,26,103,16,78,31,56,12,193,192,12,76,59, +205,147,243,186,40,34,2,86,55,124,127,25,187,127,127,232,182,195,108,28, +207,85,111,121,103,195,174,55,169,62,63,62,174,105,169,114,206,6,91,204, +150,162,244,220,92,138,219,231,3,156,32,32,72,138,143,7,64,150,40,3,209, +42,49,252,218,123,221,228,245,78,86,207,35,168,172,228,111,223,245,126, +39,165,190,174,33,64,174,125,65,124,72,200,163,127,73,80,252,216,220,224, +32,65,40,188,193,32,88,49,12,40,52,26,224,104,15,15,4,32,74,42,1,10,34, +28,189,23,25,237,156,198,76,243,8,0,138,131,181,103,255,222,212,104,190, +59,22,12,122,126,7,96,220,155,221,83,42,149,43,38,244,122,65,18,2,116,184, +221,192,9,11,3,54,135,3,92,58,29,252,136,148,70,165,130,199,227,153,190, +165,213,250,23,32,152,111,237,237,45,205,179,243,204,204,76,5,149,74,237, +192,48,44,198,102,54,67,188,82,9,108,46,55,68,66,106,1,40,123,243,227,199, +48,58,60,172,65,225,196,178,191,138,185,150,150,150,150,141,134,158,216, +216,88,217,36,2,239,106,109,5,204,225,128,136,168,40,136,16,8,64,132,156, +138,202,117,174,164,196,132,94,241,197,147,247,151,252,155,166,164,164, +228,163,86,108,18,139,197,220,169,169,41,212,109,118,32,199,72,212,21,185, +155,55,7,101,114,57,117,202,102,11,232,250,250,58,3,56,190,231,70,79,207, +195,39,49,22,45,81,82,82,82,33,42,75,77,100,100,36,195,96,48,132,192,29, +40,115,68,128,161,245,81,31,142,215,138,68,34,33,139,197,178,93,235,238, +158,90,12,103,193,23,196,199,199,31,228,241,120,199,144,83,109,54,91,8, +28,141,4,18,177,13,29,23,33,31,91,174,180,139,25,85,42,149,150,163,210, +4,211,211,211,9,68,68,240,249,124,82,180,113,228,219,254,43,232,172,49, +37,18,201,197,228,228,100,66,161,80,16,168,238,4,157,78,39,91,253,4,114, +222,179,130,243,132,66,97,103,66,66,66,40,107,84,26,50,235,126,228,105, +207,10,28,50,46,151,91,33,151,203,67,89,35,97,73,193,62,130,167,104,225, +127,99,121,52,26,109,2,141,23,145,75,254,79,224,231,110,127,2,154,182,229, +168,238,223,11,59,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_72 = 962; +static unsigned char xml_res_file_72[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,3,137,73,68,65,84,72,137,165,150,79,76,92,85,20,198, +127,247,189,55,243,102,134,98,177,137,117,90,172,85,145,54,65,211,0,3,200, +96,67,13,117,69,212,133,209,189,46,220,185,194,104,234,66,18,93,104,141, +141,43,255,36,166,186,176,171,186,113,213,10,93,212,50,168,73,97,168,64, +181,25,66,41,85,160,37,160,208,90,58,188,121,127,238,113,1,12,164,243,135, +169,126,201,89,221,119,238,119,190,239,156,123,239,83,34,194,189,48,77, +83,69,34,145,29,34,168,130,197,10,160,20,248,65,224,230,28,199,177,138, +125,80,93,253,192,238,222,222,222,15,44,203,178,138,21,176,29,194,118,88, +165,82,169,33,165,212,55,136,72,65,196,227,241,67,142,147,147,255,131,147, +39,191,62,7,212,20,85,32,34,218,182,195,56,78,14,173,117,137,58,5,74,56, +24,139,69,113,28,103,21,192,168,68,242,196,68,166,72,17,149,100,86,64,224, +56,14,153,204,4,217,108,150,185,185,57,124,223,39,151,203,145,78,167,241, +60,143,149,149,59,100,179,217,146,249,69,45,218,172,82,152,159,159,103, +120,120,136,254,254,62,92,215,197,113,114,196,98,81,106,106,106,56,117, +234,91,66,161,48,221,221,221,116,117,117,21,228,86,68,80,91,91,203,177, +99,239,146,74,13,210,217,121,152,144,21,34,100,91,44,223,190,197,228,149, +9,26,155,154,9,219,118,126,195,123,81,214,34,173,133,133,133,69,82,169, +65,142,116,118,242,96,205,46,60,215,227,167,129,65,196,11,248,103,229,46, +150,21,70,68,208,122,51,100,139,130,2,130,173,83,35,162,25,27,27,163,165, +37,65,44,90,141,39,154,233,63,255,224,214,221,21,250,206,246,83,95,95,143, +105,41,180,214,136,108,9,45,101,44,50,20,58,79,32,28,125,254,40,33,35,132, +152,154,169,204,36,227,191,93,97,105,225,38,251,159,120,156,71,247,63,134, +231,121,69,173,221,48,172,128,192,64,161,208,1,128,31,104,44,211,64,208, +92,205,76,113,113,228,103,150,22,150,104,106,74,240,76,71,7,65,224,161, +117,161,247,186,172,2,32,8,214,86,45,195,0,20,83,147,19,252,50,146,230, +239,217,101,154,219,154,105,109,107,195,20,240,131,160,88,58,34,58,127, +80,138,18,168,117,129,171,174,195,213,201,73,210,233,33,150,111,47,209, +216,216,76,71,178,29,195,52,241,124,191,232,230,0,186,156,69,107,21,16, +0,76,95,187,70,206,245,88,94,188,67,99,162,149,228,225,36,98,128,235,121, +101,175,89,173,101,27,5,202,8,165,135,71,36,0,117,121,116,140,167,26,27, +72,182,39,177,176,240,93,23,148,162,220,77,33,162,75,43,120,225,165,23, +237,158,158,158,55,130,32,80,151,46,253,202,222,125,251,120,54,153,196, +48,193,243,115,121,137,229,32,235,99,91,64,240,241,241,79,34,175,188,252, +106,239,129,131,7,223,28,29,27,231,145,120,156,150,182,86,204,176,137,239, +149,246,188,80,129,176,33,33,127,208,78,156,248,212,126,56,190,251,253, +250,3,245,239,12,92,56,63,179,115,103,181,223,220,154,192,178,44,124,215, +71,139,220,87,108,180,217,0,248,232,195,227,85,10,249,178,174,238,201,183, +82,3,169,241,211,167,191,251,170,161,161,33,176,195,54,65,16,20,125,148, +182,143,117,5,93,71,158,59,52,127,243,198,247,206,106,246,245,190,31,206, +222,248,226,243,207,222,187,126,125,250,76,172,106,135,21,248,193,218,177, +255,15,145,159,162,209,209,209,248,95,139,139,29,77,137,196,202,249,11, +63,190,61,51,59,115,102,207,158,189,79,199,98,81,51,26,141,150,121,209, +74,163,170,170,138,112,216,142,2,40,17,193,52,205,186,144,101,61,148,115, +221,139,34,34,145,72,100,87,123,123,251,107,134,97,132,54,219,85,57,44, +211,52,102,103,103,127,207,100,50,231,84,169,123,92,41,101,172,247,232, +254,127,43,214,10,247,1,254,5,16,25,130,89,89,26,144,136,0,0,0,0,73,69, +78,68,174,66,96,130}; + +static size_t xml_res_size_73 = 3553; +static unsigned char xml_res_file_73[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,2,252,73,68,65,84,120,218,76,147,77,111,27,85,20,134,159,123, +239,140,237,36,254,138,29,199,109,8,136,82,211,46,64,84,34,65,17,44,80, +36,196,130,66,73,165,22,4,74,23,253,11,93,177,224,31,176,98,195,26,86,20, +144,34,144,26,88,33,1,81,17,31,73,203,170,133,130,179,104,104,28,143,235, +226,184,118,51,158,153,59,247,176,200,7,156,245,57,207,121,95,233,125,149, +136,32,34,28,78,179,185,249,156,214,234,85,223,247,23,226,56,126,66,68, +116,54,155,221,142,227,100,195,166,246,219,211,167,78,253,114,184,171,148, +66,137,8,205,230,38,34,114,58,28,133,31,212,106,181,55,38,203,101,237,251, +62,74,41,0,68,4,107,45,187,187,125,130,78,231,123,101,204,123,46,73,127, +61,115,230,89,188,3,216,51,173,246,206,218,236,99,179,21,107,45,59,65,128, +56,135,18,13,6,112,160,181,194,24,195,100,185,188,120,119,235,238,90,33, +95,122,13,248,78,137,8,43,95,126,245,195,204,204,241,151,141,54,88,235, +48,70,237,203,83,0,10,16,68,246,149,24,165,80,158,199,223,91,91,155,231, +151,222,108,120,0,189,127,122,47,78,86,170,236,61,26,98,180,70,107,131, +50,26,173,212,193,57,32,66,42,130,56,33,55,62,134,136,156,4,246,45,132, +97,152,220,239,4,190,181,22,99,12,158,241,48,70,163,180,70,41,14,190,59, +82,39,184,52,37,28,133,244,251,125,1,208,0,229,114,73,5,65,7,231,4,155, +166,88,107,177,214,146,166,41,54,117,164,206,225,172,195,165,22,109,12, +157,157,128,137,252,4,71,10,70,163,145,42,228,243,196,113,68,173,90,37, +147,27,195,247,61,148,54,40,125,96,195,9,137,77,184,223,237,96,140,34,181, +78,29,1,198,243,121,217,105,181,137,163,17,70,107,202,101,97,48,72,41,20, +38,208,158,33,28,238,1,48,124,244,144,230,157,77,252,92,150,169,90,141, +35,11,26,229,53,78,158,32,8,58,172,93,255,17,101,60,142,213,167,73,70,17, +225,112,143,98,177,72,38,147,225,167,159,55,104,5,109,158,110,60,133,231, +103,254,179,208,235,245,6,253,190,174,204,207,63,143,82,154,230,159,119, +208,158,38,26,89,16,97,108,34,139,179,142,133,23,230,177,54,165,221,126, +64,169,20,165,71,128,91,183,111,253,246,250,217,179,175,92,91,253,26,133, +230,242,229,75,212,235,117,218,237,0,82,71,117,186,198,112,48,228,234,231, +159,209,233,116,57,191,116,142,245,141,27,127,1,251,81,94,89,89,185,112, +251,247,63,62,110,52,26,133,40,142,104,111,183,201,141,231,136,34,11,90, +200,101,179,68,81,196,116,109,10,173,13,91,91,247,146,19,79,62,126,101, +121,121,249,35,117,80,166,250,250,250,250,91,159,94,253,226,125,65,31,187, +120,97,137,233,218,52,15,7,187,56,7,133,66,129,254,110,143,107,171,223, +208,237,118,251,239,190,243,246,135,139,139,139,159,0,247,14,1,30,48,21, +134,225,194,141,155,55,207,181,182,91,47,229,114,185,217,193,112,47,235, +156,80,42,229,227,56,138,58,213,106,101,125,110,110,110,181,88,44,94,7, +90,64,172,254,87,103,5,100,128,10,48,147,36,201,241,212,218,146,128,50, +198,12,50,153,76,0,108,3,15,128,240,48,225,255,14,0,236,234,131,23,133, +156,177,149,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_74 = 3479; +static unsigned char xml_res_file_74[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,10,79,105,67,67,80,80,104,111,116,111,115,104,111,112,32,73,67,67,32, +112,114,111,102,105,108,101,0,0,120,218,157,83,103,84,83,233,22,61,247, +222,244,66,75,136,128,148,75,111,82,21,8,32,82,66,139,128,20,145,38,42, +33,9,16,74,136,33,161,217,21,81,193,17,69,69,4,27,200,160,136,3,142,142, +128,140,21,81,44,12,138,10,216,7,228,33,162,142,131,163,136,138,202,251, +225,123,163,107,214,188,247,230,205,254,181,215,62,231,172,243,157,179, +207,7,192,8,12,150,72,51,81,53,128,12,169,66,30,17,224,131,199,196,198, +225,228,46,64,129,10,36,112,0,16,8,179,100,33,115,253,35,1,0,248,126,60, +60,43,34,192,7,190,0,1,120,211,11,8,0,192,77,155,192,48,28,135,255,15,234, +66,153,92,1,128,132,1,192,116,145,56,75,8,128,20,0,64,122,142,66,166,0, +64,70,1,128,157,152,38,83,0,160,4,0,96,203,99,98,227,0,80,45,0,96,39,127, +230,211,0,128,157,248,153,123,1,0,91,148,33,21,1,160,145,0,32,19,101,136, +68,0,104,59,0,172,207,86,138,69,0,88,48,0,20,102,75,196,57,0,216,45,0,48, +73,87,102,72,0,176,183,0,192,206,16,11,178,0,8,12,0,48,81,136,133,41,0, +4,123,0,96,200,35,35,120,0,132,153,0,20,70,242,87,60,241,43,174,16,231, +42,0,0,120,153,178,60,185,36,57,69,129,91,8,45,113,7,87,87,46,30,40,206, +73,23,43,20,54,97,2,97,154,64,46,194,121,153,25,50,129,52,15,224,243,204, +0,0,160,145,21,17,224,131,243,253,120,206,14,174,206,206,54,142,182,14, +95,45,234,191,6,255,34,98,98,227,254,229,207,171,112,64,0,0,225,116,126, +209,254,44,47,179,26,128,59,6,128,109,254,162,37,238,4,104,94,11,160,117, +247,139,102,178,15,64,181,0,160,233,218,87,243,112,248,126,60,60,69,161, +144,185,217,217,229,228,228,216,74,196,66,91,97,202,87,125,254,103,194, +95,192,87,253,108,249,126,60,252,247,245,224,190,226,36,129,50,93,129,71, +4,248,224,194,204,244,76,165,28,207,146,9,132,98,220,230,143,71,252,183, +11,255,252,29,211,34,196,73,98,185,88,42,20,227,81,18,113,142,68,154,140, +243,50,165,34,137,66,146,41,197,37,210,255,100,226,223,44,251,3,62,223, +53,0,176,106,62,1,123,145,45,168,93,99,3,246,75,39,16,88,116,192,226,247, +0,0,242,187,111,193,212,40,8,3,128,104,131,225,207,119,255,239,63,253,71, +160,37,0,128,102,73,146,113,0,0,94,68,36,46,84,202,179,63,199,8,0,0,68, +160,129,42,176,65,27,244,193,24,44,192,6,28,193,5,220,193,11,252,96,54, +132,66,36,196,194,66,16,66,10,100,128,28,114,96,41,172,130,66,40,134,205, +176,29,42,96,47,212,64,29,52,192,81,104,134,147,112,14,46,194,85,184,14, +61,112,15,250,97,8,158,193,40,188,129,9,4,65,200,8,19,97,33,218,136,1,98, +138,88,35,142,8,23,153,133,248,33,193,72,4,18,139,36,32,201,136,20,81,34, +75,145,53,72,49,82,138,84,32,85,72,29,242,61,114,2,57,135,92,70,186,145, +59,200,0,50,130,252,134,188,71,49,148,129,178,81,61,212,12,181,67,185,168, +55,26,132,70,162,11,208,100,116,49,154,143,22,160,155,208,114,180,26,61, +140,54,161,231,208,171,104,15,218,143,62,67,199,48,192,232,24,7,51,196, +108,48,46,198,195,66,177,56,44,9,147,99,203,177,34,172,12,171,198,26,176, +86,172,3,187,137,245,99,207,177,119,4,18,129,69,192,9,54,4,119,66,32,97, +30,65,72,88,76,88,78,216,72,168,32,28,36,52,17,218,9,55,9,3,132,81,194, +39,34,147,168,75,180,38,186,17,249,196,24,98,50,49,135,88,72,44,35,214, +18,143,19,47,16,123,136,67,196,55,36,18,137,67,50,39,185,144,2,73,177,164, +84,210,18,210,70,210,110,82,35,233,44,169,155,52,72,26,35,147,201,218,100, +107,178,7,57,148,44,32,43,200,133,228,157,228,195,228,51,228,27,228,33, +242,91,10,157,98,64,113,164,248,83,226,40,82,202,106,74,25,229,16,229,52, +229,6,101,152,50,65,85,163,154,82,221,168,161,84,17,53,143,90,66,173,161, +182,82,175,81,135,168,19,52,117,154,57,205,131,22,73,75,165,173,162,149, +211,26,104,23,104,247,105,175,232,116,186,17,221,149,30,78,151,208,87,210, +203,233,71,232,151,232,3,244,119,12,13,134,21,131,199,136,103,40,25,155, +24,7,24,103,25,119,24,175,152,76,166,25,211,139,25,199,84,48,55,49,235, +152,231,153,15,153,111,85,88,42,182,42,124,21,145,202,10,149,74,149,38, +149,27,42,47,84,169,170,166,170,222,170,11,85,243,85,203,84,143,169,94, +83,125,174,70,85,51,83,227,169,9,212,150,171,85,170,157,80,235,83,27,83, +103,169,59,168,135,170,103,168,111,84,63,164,126,89,253,137,6,89,195,76, +195,79,67,164,81,160,177,95,227,188,198,32,11,99,25,179,120,44,33,107,13, +171,134,117,129,53,196,38,177,205,217,124,118,42,187,152,253,29,187,139, +61,170,169,161,57,67,51,74,51,87,179,82,243,148,102,63,7,227,152,113,248, +156,116,78,9,231,40,167,151,243,126,138,222,20,239,41,226,41,27,166,52, +76,185,49,101,92,107,170,150,151,150,88,171,72,171,81,171,71,235,189,54, +174,237,167,157,166,189,69,187,89,251,129,14,65,199,74,39,92,39,71,103, +143,206,5,157,231,83,217,83,221,167,10,167,22,77,61,58,245,174,46,170,107, +165,27,161,187,68,119,191,110,167,238,152,158,190,94,128,158,76,111,167, +222,121,189,231,250,28,125,47,253,84,253,109,250,167,245,71,12,88,6,179, +12,36,6,219,12,206,24,60,197,53,113,111,60,29,47,199,219,241,81,67,93,195, +64,67,165,97,149,97,151,225,132,145,185,209,60,163,213,70,141,70,15,140, +105,198,92,227,36,227,109,198,109,198,163,38,6,38,33,38,75,77,234,77,238, +154,82,77,185,166,41,166,59,76,59,76,199,205,204,205,162,205,214,153,53, +155,61,49,215,50,231,155,231,155,215,155,223,183,96,90,120,90,44,182,168, +182,184,101,73,178,228,90,166,89,238,182,188,110,133,90,57,89,165,88,85, +90,93,179,70,173,157,173,37,214,187,173,187,167,17,167,185,78,147,78,171, +158,214,103,195,176,241,182,201,182,169,183,25,176,229,216,6,219,174,182, +109,182,125,97,103,98,23,103,183,197,174,195,238,147,189,147,125,186,125, +141,253,61,7,13,135,217,14,171,29,90,29,126,115,180,114,20,58,86,58,222, +154,206,156,238,63,125,197,244,150,233,47,103,88,207,16,207,216,51,227, +182,19,203,41,196,105,157,83,155,211,71,103,23,103,185,115,131,243,136, +139,137,75,130,203,46,151,62,46,155,27,198,221,200,189,228,74,116,245,113, +93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,54,238,105,238, +135,220,159,204,52,159,41,158,89,51,115,208,195,200,67,224,81,229,209,63, +11,159,149,48,107,223,172,126,79,67,79,129,103,181,231,35,47,99,47,145, +87,173,215,176,183,165,119,170,247,97,239,23,62,246,62,114,159,227,62,227, +60,55,222,50,222,89,95,204,55,192,183,200,183,203,79,195,111,158,95,133, +223,67,127,35,255,100,255,122,255,209,0,167,128,37,1,103,3,137,129,65,129, +91,2,251,248,122,124,33,191,142,63,58,219,101,246,178,217,237,65,140,160, +185,65,21,65,143,130,173,130,229,193,173,33,104,200,236,144,173,33,247, +231,152,206,145,206,105,14,133,80,126,232,214,208,7,97,230,97,139,195,126, +12,39,133,135,133,87,134,63,142,112,136,88,26,209,49,151,53,119,209,220, +67,115,223,68,250,68,150,68,222,155,103,49,79,57,175,45,74,53,42,62,170, +46,106,60,218,55,186,52,186,63,198,46,102,89,204,213,88,157,88,73,108,75, +28,57,46,42,174,54,110,108,190,223,252,237,243,135,226,157,226,11,227,123, +23,152,47,200,93,112,121,161,206,194,244,133,167,22,169,46,18,44,58,150, +64,76,136,78,56,148,240,65,16,42,168,22,140,37,242,19,119,37,142,10,121, +194,29,194,103,34,47,209,54,209,136,216,67,92,42,30,78,242,72,42,77,122, +146,236,145,188,53,121,36,197,51,165,44,229,185,132,39,169,144,188,76,13, +76,221,155,58,158,22,154,118,32,109,50,61,58,189,49,131,146,145,144,113, +66,170,33,77,147,182,103,234,103,230,102,118,203,172,101,133,178,254,197, +110,139,183,47,30,149,7,201,107,179,144,172,5,89,45,10,182,66,166,232,84, +90,40,215,42,7,178,103,101,87,102,191,205,137,202,57,150,171,158,43,205, +237,204,179,202,219,144,55,156,239,159,255,237,18,194,18,225,146,182,165, +134,75,87,45,29,88,230,189,172,106,57,178,60,113,121,219,10,227,21,5,43, +134,86,6,172,60,184,138,182,42,109,213,79,171,237,87,151,174,126,189,38, +122,77,107,129,94,193,202,130,193,181,1,107,235,11,85,10,229,133,125,235, +220,215,237,93,79,88,47,89,223,181,97,250,134,157,27,62,21,137,138,174, +20,219,23,151,21,127,216,40,220,120,229,27,135,111,202,191,153,220,148, +180,169,171,196,185,100,207,102,210,102,233,230,222,45,158,91,14,150,170, +151,230,151,14,110,13,217,218,180,13,223,86,180,237,245,246,69,219,47,151, +205,40,219,187,131,182,67,185,163,191,60,184,188,101,167,201,206,205,59, +63,84,164,84,244,84,250,84,54,238,210,221,181,97,215,248,110,209,238,27, +123,188,246,52,236,213,219,91,188,247,253,62,201,190,219,85,1,85,77,213, +102,213,101,251,73,251,179,247,63,174,137,170,233,248,150,251,109,93,173, +78,109,113,237,199,3,210,3,253,7,35,14,182,215,185,212,213,29,210,61,84, +82,143,214,43,235,71,14,199,31,190,254,157,239,119,45,13,54,13,85,141,156, +198,226,35,112,68,121,228,233,247,9,223,247,30,13,58,218,118,140,123,172, +225,7,211,31,118,29,103,29,47,106,66,154,242,154,70,155,83,154,251,91,98, +91,186,79,204,62,209,214,234,222,122,252,71,219,31,15,156,52,60,89,121, +74,243,84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, +46,249,220,96,219,162,182,123,231,99,206,223,106,15,111,239,186,16,116, +225,210,69,255,139,231,59,188,59,206,92,242,184,116,242,178,219,229,19, +87,184,87,154,175,58,95,109,234,116,234,60,254,147,211,79,199,187,156,187, +154,174,185,92,107,185,238,122,189,181,123,102,247,233,27,158,55,206,221, +244,189,121,241,22,255,214,213,158,57,61,221,189,243,122,111,247,197,247, +245,223,22,221,126,114,39,253,206,203,187,217,119,39,238,173,188,79,188, +95,244,64,237,65,217,67,221,135,213,63,91,254,220,216,239,220,127,106,192, +119,160,243,209,220,71,247,6,133,131,207,254,145,245,143,15,67,5,143,153, +143,203,134,13,134,235,158,56,62,57,57,226,63,114,253,233,252,167,67,207, +100,207,38,158,23,254,162,254,203,174,23,22,47,126,248,213,235,215,206, +209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235,25,175, +219,198,194,198,30,190,201,120,51,49,94,244,86,251,237,193,119,220,119, +29,239,163,223,15,79,228,124,32,127,40,255,104,249,177,245,83,208,167,251, +147,25,147,147,255,4,3,152,243,252,99,51,45,219,0,0,0,4,103,65,77,65,0, +0,177,142,124,251,81,147,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0, +0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95, +197,70,0,0,2,178,73,68,65,84,120,218,84,147,205,110,28,69,16,199,127,213, +221,187,243,185,51,179,216,94,239,70,182,176,76,140,9,68,9,28,125,2,30, +194,18,15,192,19,112,15,24,8,202,3,240,36,92,200,33,9,28,16,188,0,57,68, +142,21,11,41,1,197,31,27,219,140,179,179,51,211,221,28,178,30,145,146,170, +74,42,233,255,83,85,169,74,188,247,0,124,115,231,235,47,63,253,252,179, +47,140,86,149,181,142,171,186,32,111,130,247,62,8,2,241,158,224,151,71, +15,126,186,179,247,237,143,0,134,133,173,175,175,125,181,190,190,118,163, +174,91,156,179,8,130,136,160,148,224,189,71,43,133,233,105,170,121,67,63, +136,182,128,183,1,195,97,49,106,234,150,139,243,115,148,122,35,70,4,1,68, +132,94,212,231,159,195,23,92,92,252,75,154,38,195,43,93,7,200,6,89,82,207, +42,234,166,198,104,253,150,88,27,205,95,207,14,153,207,26,86,150,151,177, +214,70,87,58,5,240,195,119,223,199,40,29,132,121,2,222,227,172,93,184,163, +109,91,78,94,30,81,215,115,134,195,33,58,236,161,148,50,247,238,222,221, +234,0,69,145,223,84,74,100,122,124,130,23,193,3,120,193,24,67,91,183,160, +13,121,86,224,188,197,205,45,227,201,42,217,160,184,213,1,226,36,185,53, +26,141,104,235,57,90,41,148,81,172,44,15,17,173,8,147,144,165,34,39,12, +34,178,116,64,16,25,86,199,99,172,184,143,59,192,195,135,143,62,124,119, +99,3,99,2,250,189,62,189,94,72,146,167,128,195,232,30,213,188,198,57,75, +152,68,68,81,202,48,207,56,216,127,118,163,91,162,214,234,3,241,16,167, +9,226,161,245,150,242,252,146,116,144,83,205,102,68,81,68,150,101,32,130, +199,97,130,136,32,52,155,29,96,235,253,173,247,250,65,159,52,29,224,157, +163,31,6,24,17,188,83,228,131,28,165,192,123,1,181,184,7,165,217,222,222, +94,235,70,88,93,29,175,60,127,241,156,36,141,137,227,8,172,197,122,133, +21,75,85,189,166,117,150,32,10,232,153,0,239,28,211,211,19,38,147,107,121, +215,129,82,42,190,255,243,125,6,105,202,233,116,74,51,175,137,7,3,178,52, +229,162,44,81,222,209,88,75,81,20,132,65,200,124,222,160,180,152,14,176, +191,255,180,218,127,242,36,88,90,122,135,223,126,255,131,131,131,167,108, +110,108,50,185,54,97,122,54,165,153,55,120,224,147,219,183,41,134,5,233, +205,11,162,227,235,174,3,60,126,252,231,203,147,163,227,188,44,75,218,166, +33,142,34,148,86,56,107,233,233,30,58,84,128,112,118,246,138,203,178,100, +118,88,82,100,205,43,0,241,222,35,34,203,123,123,123,31,237,236,236,140, +178,44,155,196,113,50,54,70,47,105,173,115,163,117,223,131,181,214,206, +170,170,58,171,170,234,168,44,47,255,158,78,79,127,221,221,221,61,148,171, +183,253,159,245,129,20,72,128,16,144,69,189,1,94,3,151,139,236,0,254,27, +0,117,73,16,195,100,100,116,215,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_75 = 887; +static unsigned char xml_res_file_75[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,111,32,52,32,74,97,110,32,50,48,48,52,32,49,57,58,48, +56,58,52,48,32,43,48,49,48,48,20,91,120,127,0,0,0,7,116,73,77,69,7,211, +8,8,11,55,55,137,85,77,213,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18,1, +210,221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,208, +73,68,65,84,120,218,165,82,93,72,83,97,24,126,247,191,213,102,233,164,185, +230,223,252,171,212,57,149,36,77,215,208,11,149,137,212,205,48,40,47,194, +64,251,161,40,47,70,42,182,98,4,74,224,15,145,20,171,139,44,188,41,176, +46,52,9,116,253,49,92,153,44,153,185,90,51,167,204,220,116,110,59,115,231, +108,167,179,211,153,160,72,66,66,189,240,94,124,188,207,251,124,207,243, +242,0,252,103,209,118,2,244,245,77,30,68,81,164,193,239,71,30,51,153,145, +126,12,3,163,78,87,219,184,49,103,236,68,160,84,158,106,81,169,178,154, +73,146,214,148,155,155,42,114,187,221,7,36,18,37,91,46,175,114,154,205, +195,30,250,223,150,117,186,49,53,73,162,39,80,52,2,34,17,31,2,1,20,138, +139,115,248,106,245,49,45,130,32,189,81,204,54,130,222,222,78,186,203,133, +21,145,36,121,84,44,102,156,169,175,87,72,227,226,120,192,231,179,240,137, +137,249,46,202,2,204,205,57,1,69,209,167,81,60,243,79,130,140,12,245,76, +48,184,38,209,235,159,44,217,236,63,82,166,123,134,129,203,98,67,74,114, +58,171,166,166,250,74,36,66,130,199,19,11,56,30,174,166,224,15,214,9,58, +58,134,216,92,174,176,39,28,198,87,100,178,88,233,155,215,195,204,67,202, +114,105,221,89,41,88,169,31,191,121,1,60,99,67,96,50,141,64,98,162,12,140, +198,41,192,176,144,103,211,2,130,132,20,249,249,194,166,186,186,156,86, +58,157,193,156,182,217,32,43,83,10,4,9,128,6,195,16,70,80,160,31,86,129, +253,251,12,48,24,68,208,104,156,76,114,56,2,151,55,9,124,190,192,244,224, +224,135,69,159,47,12,76,38,45,234,15,166,86,1,62,186,66,176,232,197,33, +16,37,193,1,112,34,132,113,56,236,46,147,169,123,193,225,208,99,155,55, +136,143,223,61,91,91,91,196,137,250,163,188,1,16,196,218,215,85,216,77, +195,194,148,84,2,252,56,29,36,60,18,88,12,186,187,188,92,214,182,245,102, +235,10,48,44,236,179,217,92,212,50,65,237,210,32,61,53,147,19,154,24,141, +44,255,18,192,26,99,15,236,139,17,128,231,149,30,132,162,132,253,43,173, +138,91,91,9,214,131,148,150,86,61,106,54,127,57,82,80,144,158,128,83,82, +243,242,242,232,179,159,199,105,203,239,159,129,255,211,75,88,120,55,20, +225,239,226,146,199,75,73,70,242,252,120,161,182,36,153,115,227,173,211, +176,53,202,52,141,102,192,171,84,230,199,56,157,62,200,206,78,1,30,143, +160,154,77,53,135,82,136,44,9,30,157,190,39,38,23,47,65,163,106,47,12,24, +80,194,225,189,205,188,59,219,190,145,3,210,110,95,186,102,181,62,111,64, +144,213,135,149,149,138,59,118,251,66,196,98,177,105,229,242,28,173,197, +98,53,25,12,134,235,164,166,48,0,247,71,52,208,160,22,118,188,16,159,7, +104,106,223,22,223,210,210,54,65,85,85,203,108,69,69,75,127,244,93,82,114, +181,176,172,236,36,111,99,78,158,75,186,112,179,179,251,231,197,102,205, +246,229,127,169,223,158,105,64,153,156,76,148,88,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_76 = 681; +static unsigned char xml_res_file_76[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,45,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,106,101,117,46,32,53,32,100,233,99,46,32,50,48,48,50,32, +49,50,58,50,49,58,49,48,32,43,48,49,48,48,96,59,210,134,0,0,0,7,116,73, +77,69,7,211,1,21,20,0,6,240,149,228,165,0,0,0,9,112,72,89,115,0,0,10,240, +0,0,10,240,1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5, +0,0,1,255,73,68,65,84,120,218,99,96,24,242,128,17,155,96,122,122,58,223, +155,55,111,130,25,25,25,109,222,191,127,191,254,243,231,207,59,79,157,58, +245,27,167,1,81,81,81,214,108,108,108,29,2,2,2,31,229,229,229,53,126,253, +250,165,200,194,194,194,196,197,197,197,240,247,239,95,134,243,231,207, +95,187,121,243,102,222,145,35,71,246,162,27,192,12,34,100,101,101,247,24, +24,24,24,70,68,68,168,9,11,11,11,241,242,242,50,254,248,241,131,225,213, +171,87,12,207,159,63,103,224,228,228,20,5,226,88,62,62,62,109,30,30,158, +51,175,95,191,254,0,51,128,5,68,0,157,201,164,170,170,202,112,231,206,29, +16,27,108,235,237,219,183,25,174,94,189,202,32,36,36,196,160,174,174,206, +208,211,211,3,114,109,104,83,83,139,223,187,247,239,102,125,255,250,185, +110,214,236,57,31,192,46,144,150,150,62,245,237,219,183,192,15,31,62,112, +177,179,179,51,0,93,194,96,98,100,204,240,244,197,23,134,223,63,191,51, +188,126,243,146,65,78,86,150,225,234,181,59,12,134,166,78,44,170,86,254, +230,103,142,238,82,191,112,238,204,74,176,1,79,129,64,80,80,112,251,253, +251,247,3,77,77,77,121,190,126,254,200,112,227,241,79,134,216,248,8,6,94, +117,123,134,125,107,231,48,8,8,240,51,252,21,210,98,80,208,84,102,248,198, +204,204,112,251,234,117,233,83,135,119,119,48,193,252,178,103,207,158,203, +192,128,180,219,179,123,247,189,139,87,110,49,72,154,88,49,220,255,204, +192,240,151,159,151,129,133,157,243,242,150,205,155,183,63,124,241,154, +225,248,99,6,134,171,143,24,24,62,191,0,250,23,22,136,48,112,239,222,189, +119,192,64,220,242,247,207,207,96,102,21,47,190,87,95,153,25,94,222,189, +207,112,97,215,162,238,223,127,255,23,252,255,240,68,237,245,227,103,58, +79,78,175,249,116,249,236,209,132,167,207,158,63,196,154,14,146,147,19, +53,255,50,241,237,230,147,80,147,126,118,253,208,161,39,143,239,123,158, +56,121,234,27,72,206,217,201,65,13,24,208,175,206,157,191,248,129,1,31, +176,179,179,225,180,177,182,84,197,149,216,134,17,0,0,4,223,217,134,133, +215,167,132,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_77 = 524; +static unsigned char xml_res_file_77[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,158,73,68,65,84,56,203, +141,146,221,43,4,81,24,135,247,95,92,23,184,208,34,146,34,159,89,118,149, +44,237,82,34,54,37,27,210,216,104,98,177,53,37,214,199,90,231,194,133,40, +249,152,93,187,107,228,70,202,119,217,227,194,188,126,103,98,134,134,53, +167,158,154,57,51,231,247,158,243,156,215,229,110,149,75,134,227,185,205, +238,133,44,243,207,131,104,134,121,103,79,89,199,204,9,107,159,62,102,109, +145,35,214,50,121,200,124,17,198,196,191,68,228,250,142,43,184,148,75,133, +215,111,152,19,154,71,119,83,182,0,81,217,41,117,67,73,102,11,240,71,47, +196,164,35,106,6,182,236,1,190,185,180,241,81,73,101,50,83,137,171,215, +193,213,75,62,176,2,98,121,30,90,204,242,126,57,205,3,11,103,188,55,122, +194,155,38,14,56,92,104,112,225,177,2,36,213,8,24,83,180,194,116,242,150, +23,99,88,185,230,112,161,193,69,222,12,104,12,239,27,1,162,242,127,116, +74,231,28,46,52,184,208,204,0,108,167,175,126,100,143,117,73,42,127,124, +121,3,156,63,60,11,10,38,247,130,167,2,127,121,125,123,196,34,13,46,172, +128,175,7,184,16,147,90,124,71,189,27,83,242,58,42,17,250,130,208,23,132, +99,18,122,131,208,23,132,190,32,244,5,193,5,161,120,131,21,32,169,70,64, +40,150,35,156,211,17,112,241,110,6,192,133,17,32,42,59,5,46,172,251,196, +118,198,225,66,67,95,144,211,1,23,63,155,226,211,197,159,11,116,129,46, +208,141,247,170,224,198,47,1,16,86,108,124,133,136,225,9,172,217,3,224, +194,241,17,220,109,178,61,0,46,100,184,48,4,213,14,110,83,117,48,65,149, +253,235,84,209,163,80,121,119,156,202,124,203,84,234,141,137,43,20,200, +31,250,21,35,123,224,34,87,98,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_78 = 745; +static unsigned char xml_res_file_78[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,68,111,32,56,32,74,97,110,32,50,48,48,52,32,49,49,58,49, +55,58,51,52,32,43,48,49,48,48,72,183,249,154,0,0,0,7,116,73,77,69,7,212, +1,8,10,18,7,86,168,149,96,0,0,0,9,112,72,89,115,0,0,11,18,0,0,11,18,1,210, +221,126,252,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,66,73,68, +65,84,120,218,165,147,205,107,19,65,24,198,159,221,236,154,96,77,91,83, +99,241,3,171,98,123,80,80,16,138,7,207,162,160,169,7,69,61,25,168,160,82, +240,175,17,212,139,168,127,65,161,20,189,9,138,84,16,122,236,197,88,108, +155,102,19,211,108,55,201,126,207,236,108,124,103,55,77,209,210,83,7,94, +134,153,225,249,189,207,251,206,12,112,192,161,252,191,209,123,120,177, +128,200,155,67,161,88,194,240,232,36,56,7,140,90,5,245,141,5,196,225,107, +229,59,182,247,5,244,202,151,238,224,244,196,123,220,190,63,134,177,2,208, +172,1,166,9,56,14,176,190,14,124,249,220,130,185,85,86,150,241,113,15,32, +17,95,189,54,143,242,83,13,245,85,160,177,6,116,73,104,123,20,46,65,60, +244,2,134,104,105,137,235,27,198,93,101,5,159,164,78,77,196,143,78,21,80, +60,241,14,15,30,107,168,174,0,150,1,68,130,14,232,48,142,211,12,52,43,140, +65,191,114,89,111,229,14,127,232,156,193,209,1,0,142,242,28,55,102,142, +193,160,172,102,3,240,67,128,81,237,156,17,136,0,156,96,66,164,80,30,65, +59,123,174,216,136,241,108,23,112,36,63,131,241,147,72,172,239,88,246,2, +32,32,72,184,3,139,250,144,8,185,124,14,92,205,148,164,84,75,0,35,249,41, +152,127,128,118,151,144,25,178,30,167,130,144,165,0,57,75,72,36,33,17,162, +144,67,232,250,20,45,250,128,128,41,176,232,118,28,202,172,168,105,221, +210,46,235,59,8,164,11,89,78,234,36,244,66,154,122,202,174,3,163,90,161, +171,154,78,172,75,128,236,158,172,91,190,1,202,150,128,36,64,134,96,240, +236,0,174,207,43,3,128,104,152,139,234,239,213,105,5,60,189,217,30,1,68, +156,90,78,178,74,251,82,204,209,105,185,112,219,30,60,55,94,28,52,49,19, +226,21,251,246,213,74,178,186,94,26,62,69,224,83,4,105,102,234,3,167,6, +111,111,217,104,212,172,109,85,197,155,1,64,249,137,86,214,104,62,177,127, +44,11,196,210,110,144,10,67,2,176,48,89,59,166,141,90,181,141,122,213,18, +217,110,52,123,211,134,185,231,41,139,243,184,103,12,15,189,29,157,156, +24,201,13,101,33,66,106,24,53,208,161,154,29,203,199,230,102,167,157,235, +178,217,235,62,230,247,253,76,107,199,49,222,2,94,136,67,90,73,213,244, +11,81,220,131,231,176,95,142,23,47,100,51,120,121,203,69,243,160,63,248, +159,241,23,68,229,79,41,23,72,123,24,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_79 = 62919; +static unsigned char xml_res_file_79[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,242,0,0,1,242,8,2,0, +0,0,94,125,4,71,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24, +0,0,0,7,116,73,77,69,7,215,11,11,18,54,5,133,234,34,195,0,0,0,7,116,69, +88,116,65,117,116,104,111,114,0,169,174,204,72,0,0,0,12,116,69,88,116,68, +101,115,99,114,105,112,116,105,111,110,0,19,9,33,35,0,0,0,10,116,69,88, +116,67,111,112,121,114,105,103,104,116,0,172,15,204,58,0,0,0,14,116,69, +88,116,67,114,101,97,116,105,111,110,32,116,105,109,101,0,53,247,15,9,0, +0,0,9,116,69,88,116,83,111,102,116,119,97,114,101,0,93,112,255,58,0,0,0, +11,116,69,88,116,68,105,115,99,108,97,105,109,101,114,0,183,192,180,143, +0,0,0,8,116,69,88,116,87,97,114,110,105,110,103,0,192,27,230,135,0,0,0, +7,116,69,88,116,83,111,117,114,99,101,0,245,255,131,235,0,0,0,8,116,69, +88,116,67,111,109,109,101,110,116,0,246,204,150,191,0,0,0,6,116,69,88,116, +84,105,116,108,101,0,168,238,210,39,0,0,1,0,73,68,65,84,120,156,236,189, +91,179,28,87,118,38,246,173,181,119,102,85,157,11,110,36,155,183,238,233, +110,221,103,44,133,61,242,120,28,19,225,23,191,56,66,225,23,255,68,191, +251,15,216,14,63,104,28,142,145,195,118,140,20,30,89,82,116,75,77,138,100, +243,2,224,224,156,83,183,204,220,123,173,245,249,33,179,10,135,32,64,118, +163,65,128,40,212,199,98,161,42,79,86,214,206,202,111,175,92,123,93,5,192, +173,91,183,150,203,165,170,70,196,98,177,232,186,110,54,155,13,195,128, +35,142,216,225,236,236,44,165,148,115,110,219,118,54,155,181,109,155,115, +78,41,1,80,213,166,105,198,237,77,211,52,77,51,110,127,234,254,170,250, +91,109,23,145,111,255,222,166,105,198,237,77,211,168,234,124,62,7,32,247, +238,221,251,135,127,248,135,119,222,121,7,128,153,229,156,1,148,82,218, +182,125,149,191,226,17,175,9,34,226,169,219,85,245,251,59,62,201,145,217, +207,130,140,59,153,153,153,205,231,243,213,106,117,126,126,62,110,124,234, +7,158,181,93,68,126,235,33,31,241,195,195,179,174,172,126,17,242,0,0,1, +0,73,68,65,84,239,158,166,36,199,125,198,231,111,167,215,19,135,37,249, +157,199,225,14,227,219,223,228,248,55,247,31,143,159,155,166,1,176,92,46, +239,221,187,55,254,161,214,218,52,205,179,104,122,164,239,97,227,89,215, +119,148,154,178,195,126,123,223,247,242,52,60,177,255,248,17,17,113,247, +253,246,155,18,125,228,229,55,143,95,74,249,230,193,1,212,90,111,30,231, +137,155,131,140,159,28,201,125,243,28,94,212,77,228,136,3,195,77,17,139, +223,65,217,120,214,113,110,110,255,78,101,227,89,200,183,110,221,26,245, +233,136,88,175,215,183,110,221,26,191,227,168,132,188,153,248,78,37,100, +47,119,191,253,131,251,183,79,108,127,130,166,227,113,110,238,243,196,241, +159,122,28,146,223,220,225,230,241,69,85,31,62,124,184,88,44,198,37,36, +128,241,54,241,124,179,228,136,67,197,77,229,225,38,167,247,172,250,13, +229,218,94,217,120,214,241,247,223,178,223,254,205,141,223,137,105,174, +68,68,68,228,156,151,203,229,233,233,233,145,211,71,124,39,158,74,208,253, +130,239,137,37,96,68,140,251,223,137,160,211,47,0,0,1,0,73,68,65,84,84, +119,121,3,163,202,240,45,199,249,150,237,227,193,199,227,143,199,17,85, +29,134,33,231,236,238,227,174,55,37,252,17,71,188,142,56,174,11,143,56, +64,28,105,125,196,1,226,72,235,35,14,16,71,90,31,113,128,56,210,250,136, +3,196,145,214,71,28,32,142,180,62,226,0,161,251,192,191,103,121,35,143, +56,226,181,195,81,90,31,113,128,56,210,250,136,3,196,145,214,71,28,32,142, +180,62,226,0,113,164,245,17,7,136,35,173,143,56,64,28,105,125,196,1,226, +72,235,35,14,16,71,90,31,113,128,56,210,250,136,3,196,145,214,71,28,32, +142,180,62,226,0,113,164,245,17,7,136,35,173,143,56,64,28,105,125,196,1, +226,72,235,35,14,16,71,90,31,113,128,56,210,250,136,3,196,145,214,71,28, +32,142,180,62,226,0,113,164,245,17,7,136,35,173,143,56,64,28,105,125,196, +1,34,63,209,179,3,47,171,93,198,243,85,177,255,38,66,42,160,227,67,1,1, +72,152,225,235,205,112,94,63,188,228,203,113,96,200,223,189,203,15,27,102, +166,154,4,4,195,153,84,89,197,5,10,0,0,1,0,73,68,65,84,69,229,181,231,244, +17,191,35,94,49,173,127,119,81,212,106,43,162,16,1,25,225,160,64,15,167, +67,200,81,84,63,31,94,25,173,95,212,5,19,217,157,130,64,147,50,140,116, +17,125,229,51,246,119,196,145,208,191,11,94,255,37,99,128,213,89,29,16, +64,3,82,60,106,248,171,30,214,17,175,18,63,32,145,246,172,214,102,223,137, +0,68,85,0,2,134,76,205,208,3,20,117,207,253,251,188,129,248,161,72,235, +231,47,211,154,32,57,73,146,0,214,133,143,150,221,122,160,189,208,177,253, +16,112,44,99,251,91,225,7,36,173,159,15,230,78,8,168,125,141,7,23,215,87, +203,205,201,249,45,109,110,45,94,251,51,59,226,249,241,202,46,190,97,16, +136,64,20,2,170,16,8,128,24,104,77,147,85,196,9,98,210,38,156,224,208,183, +179,150,68,64,84,181,212,32,208,54,250,85,77,172,112,143,171,194,79,150, +237,229,218,239,4,183,45,231,183,227,164,33,109,131,60,171,152,71,96,46, +64,141,200,192,141,91,249,235,114,79,127,93,198,249,3,193,43,163,53,65, +0,2,225,155,131,154,49,0,0,1,0,73,68,65,84,120,205,68,32,0,208,184,171, +16,0,194,1,145,177,133,53,161,41,65,210,184,79,0,157,97,59,12,109,59,191, +184,46,180,193,35,174,170,94,110,236,209,166,12,102,80,249,249,217,201, +162,73,146,26,64,20,224,200,10,85,32,94,209,25,31,241,242,240,202,104,173, +80,0,4,64,8,0,25,27,85,67,37,70,14,10,67,118,75,63,21,104,211,18,216,14, +62,4,66,210,213,214,150,155,162,41,54,67,120,45,22,188,142,118,229,249, +218,155,245,214,251,232,255,244,157,230,124,158,179,100,144,50,46,39,21, +144,163,134,250,70,224,213,217,173,161,4,72,4,25,116,64,4,42,34,202,24, +9,40,162,148,52,234,38,213,169,89,250,129,23,215,155,245,16,204,243,77, +137,205,32,169,201,213,45,34,149,224,58,242,6,121,77,169,101,187,42,245, +211,139,213,59,247,22,103,72,97,131,100,112,52,0,34,166,217,115,196,65, +227,85,210,122,255,10,16,66,32,163,50,221,64,18,33,85,16,132,25,186,193, +187,126,72,237,188,27,202,197,178,116,6,157,163,247,212,57,82,202,67,117, +55,100,172,77,165,0,0,1,0,73,68,65,84,12,142,43,227,245,192,171,129,253, +182,74,221,254,243,87,250,135,255,226,71,139,38,193,145,50,68,24,20,85, +193,81,94,191,1,120,101,180,142,32,68,68,116,212,64,136,233,209,33,51,80, +29,125,101,113,20,139,245,118,88,111,183,169,165,5,183,53,185,164,140,182, +139,216,84,147,240,77,33,2,131,241,186,212,235,62,86,67,25,250,130,210, +255,211,23,221,191,233,254,224,110,66,14,66,144,4,129,152,140,219,71,28, +58,94,165,243,124,92,221,79,106,70,192,204,61,98,99,217,157,93,177,109, +177,26,82,41,219,193,183,29,179,131,34,125,213,16,201,176,237,80,55,93, +159,155,184,28,92,233,213,252,186,231,170,151,174,175,94,6,169,229,163, +207,31,60,90,149,247,155,60,175,181,153,5,131,14,79,154,142,74,200,155, +128,87,183,100,148,105,201,24,64,177,232,135,210,151,82,205,86,182,40,238, +219,190,110,139,135,100,228,89,245,84,208,134,52,30,177,41,165,88,81,181, +113,231,57,228,114,61,100,184,153,173,250,88,117,232,134,138,210,39,235, +239,95,92,47,55,93,127,58,106,78,186,33,0,0,1,0,73,68,65,84,211,90,22,11, +179,136,74,211,148,51,218,87,117,202,71,188,52,252,214,180,38,249,77,27, +42,201,190,150,156,82,78,89,166,13,46,16,136,148,232,147,170,80,25,146, +164,193,206,199,109,45,134,240,110,136,222,100,59,96,213,75,177,57,52,109, +203,166,186,75,106,44,183,219,222,232,17,148,229,166,204,130,53,228,122, +136,206,19,114,219,87,12,3,103,196,103,93,56,181,248,172,148,24,106,245, +66,27,132,117,214,47,110,255,251,191,249,155,15,254,252,39,127,246,225, +219,155,190,244,204,103,39,39,45,106,49,3,160,170,34,178,143,53,63,226, +192,240,60,210,250,9,102,143,126,221,54,39,157,86,100,225,30,100,136,136, +138,36,109,20,10,209,16,6,160,130,32,42,177,29,172,47,117,168,28,92,186, +138,190,122,9,65,196,224,168,6,4,107,112,91,157,34,78,217,12,182,13,86, +202,245,182,246,46,200,232,135,82,134,50,51,246,133,78,154,75,49,55,51, +115,243,168,100,117,139,229,166,255,234,114,245,147,59,167,185,89,144,110, +181,180,8,50,137,200,83,39,231,17,7,131,23,240,35,168,205,0,0,1,0,73,68, +65,84,166,132,164,73,79,38,35,64,202,168,60,171,38,36,2,78,12,14,11,6,164, +90,12,165,12,134,161,90,113,22,202,96,220,84,175,1,209,212,87,25,42,168, +44,198,117,231,46,48,98,217,213,24,88,67,150,157,245,46,146,181,31,106, +41,101,86,177,41,18,16,139,48,119,51,119,175,17,149,81,194,249,240,114, +243,79,159,95,188,127,251,236,253,183,103,16,150,161,54,72,76,138,157,211, +238,24,60,116,168,120,97,74,72,132,137,170,138,138,106,82,37,48,58,63,6, +27,181,103,108,74,29,44,42,209,215,218,13,37,235,105,49,41,206,10,244,206, +109,241,26,164,70,95,218,161,210,17,189,197,106,235,46,172,129,229,214, +152,114,37,86,61,6,135,102,12,5,181,96,78,108,6,134,48,8,15,210,35,34,192, +0,130,148,71,155,250,203,47,151,63,121,103,125,231,238,157,69,66,53,179, +102,1,137,113,181,186,63,145,35,185,15,15,207,169,132,224,134,192,219,189, +205,128,80,18,0,2,14,88,192,131,203,149,83,100,112,223,86,27,130,21,24, +42,187,18,139,54,15,142,226,81,22,191,234,168,0,0,1,0,73,68,65,84,201,206, +184,46,40,30,20,108,7,246,133,14,110,107,44,59,51,73,149,178,236,34,37, +24,177,238,80,136,228,40,21,86,80,5,131,9,1,130,1,32,4,156,28,241,13,218, +109,173,255,124,89,62,190,88,255,254,79,202,124,46,97,213,124,46,240,81, +177,30,153,189,63,169,35,173,15,9,207,175,132,60,25,42,153,114,0,78,56, +97,129,98,44,213,170,249,245,198,40,106,196,224,110,208,80,45,144,10,154, +69,177,24,60,74,200,182,98,213,179,175,12,196,166,183,190,152,65,182,230, +203,206,76,97,144,101,23,141,84,131,110,122,51,74,211,230,90,35,106,80, +89,34,70,87,14,40,66,81,36,97,22,48,161,22,153,127,181,217,124,124,177, +126,180,90,223,210,20,230,121,126,150,193,81,78,31,215,139,7,140,23,166, +132,56,80,28,125,241,161,122,117,214,96,181,48,143,117,0,2,11,22,163,129, +20,22,139,82,163,74,55,84,47,134,33,116,91,98,185,245,174,120,64,215,93, +233,106,53,200,214,98,217,91,36,152,232,170,196,156,230,144,237,96,14,109, +197,195,34,156,201,163,20,39,8,252,0,0,1,0,73,68,65,84,132,67,84,40,0,53, +148,145,148,89,130,98,136,60,191,30,186,207,47,215,23,87,87,239,181,115, +56,116,86,230,109,26,241,196,61,231,133,252,154,71,252,64,240,156,210,250, +9,197,20,64,9,116,197,55,221,208,13,213,66,28,26,144,160,120,74,128,88, +248,16,52,51,35,74,241,190,12,181,209,82,163,184,20,79,219,130,237,224, +221,16,1,172,135,232,75,53,209,173,199,182,152,103,9,197,182,134,74,4,196, +156,46,204,193,32,73,144,112,250,24,199,36,147,163,82,16,170,84,247,64, +51,235,93,174,54,253,106,179,237,123,38,104,170,214,102,81,213,136,175, +197,241,29,53,144,3,67,142,136,241,26,239,9,58,82,182,250,32,34,42,42,162, +143,227,55,136,148,116,12,122,30,181,231,98,50,148,90,204,122,133,7,205, +105,154,3,106,33,230,116,231,166,118,22,172,33,37,116,112,237,42,187,34, +197,26,143,249,106,179,237,139,71,74,125,197,229,166,244,37,52,231,7,165, +4,97,30,213,163,34,213,193,44,12,212,203,26,0,198,200,145,109,233,0,136, +104,25,44,148,42,145,129,192,42,255,0,0,1,0,73,68,65,84,133,10,130,116, +130,72,128,204,180,26,22,91,156,220,95,251,71,95,246,63,61,155,189,115, +107,6,43,181,2,64,206,25,187,133,193,222,223,249,90,227,88,87,228,38,50, +118,63,196,19,63,135,168,10,4,162,128,76,191,24,65,194,232,17,8,194,33, +78,169,22,197,188,122,56,212,156,22,172,14,15,90,208,140,230,209,85,90, +176,6,134,136,193,165,171,236,170,151,234,197,135,117,87,250,26,174,232, +13,155,190,244,53,196,88,107,4,97,227,17,156,230,240,96,16,49,218,86,0, +10,49,133,154,18,2,114,114,85,142,133,111,176,139,45,9,77,78,138,74,245, +120,120,189,185,220,204,110,159,206,165,86,205,170,170,238,238,238,251, +19,63,170,218,7,134,60,154,5,110,110,26,223,234,84,168,64,98,10,31,5,131, +36,170,199,200,90,39,156,98,129,106,97,206,42,98,33,213,89,28,230,172,206, +98,97,30,171,2,115,148,224,224,236,13,157,69,87,188,84,47,130,109,239,125, +13,23,233,13,235,226,125,13,81,12,46,36,45,96,1,115,169,1,15,4,17,24,69, +53,192,221,11,232,97,30,202,0,0,1,0,73,68,65,84,0,132,8,66,32,66,0,49,50, +26,66,145,72,179,26,84,213,161,198,39,15,174,62,251,209,236,157,187,183, +169,67,110,210,19,180,62,36,66,31,69,245,136,103,74,235,125,120,114,4,34, +224,17,30,140,96,141,157,178,17,59,187,135,143,132,86,51,22,147,193,88, +157,197,57,212,48,143,229,32,22,28,140,131,115,240,29,173,205,67,82,103, +58,56,12,24,92,10,83,5,72,169,54,26,161,97,33,35,185,157,18,68,136,79,9, +7,16,8,101,55,66,21,136,144,227,178,113,20,221,0,32,69,154,234,150,84,135, +144,79,47,183,31,95,116,191,247,227,104,146,213,90,85,213,204,114,206,227, +194,241,48,60,142,7,112,10,47,16,249,169,102,13,0,132,16,8,142,230,103, +140,10,70,68,4,178,51,42,195,118,182,60,11,122,160,84,169,46,131,73,111, +44,142,222,56,24,171,177,171,169,250,40,170,57,56,59,143,193,88,156,2,173, +145,140,82,41,149,8,209,16,56,232,212,32,28,116,96,122,16,65,248,158,211, +24,165,245,52,236,70,100,90,40,238,255,70,5,8,157,27,55,164,206,103,148, +0,0,1,0,73,68,65,84,10,86,73,15,123,249,228,106,120,176,234,111,207,102, +238,110,102,177,195,222,134,253,242,126,242,35,190,127,228,189,63,101,255, +28,17,34,82,35,77,180,38,61,88,131,30,12,210,33,30,98,84,35,140,176,96, +241,48,231,0,86,227,96,209,91,12,142,222,162,183,168,30,189,177,26,7,103, +239,81,130,197,163,4,107,144,238,230,52,103,141,176,49,71,6,99,92,83,154, +178,102,192,192,196,239,0,108,90,49,142,42,182,236,211,1,118,21,65,56,234, +33,251,212,91,151,134,162,238,17,146,171,44,62,189,174,159,62,188,250,23, +183,239,213,154,71,105,29,17,55,79,252,240,240,38,123,79,31,211,122,20, +93,251,139,93,107,140,75,49,7,109,148,217,100,80,138,51,98,47,167,81,44, +250,226,213,172,0,213,162,55,239,61,6,71,231,49,88,84,247,90,83,245,168, +230,53,188,6,60,34,24,193,160,59,131,140,136,8,78,92,13,192,41,74,48,4, +33,12,48,72,39,131,244,144,41,229,17,147,74,61,98,92,74,142,107,199,29, +179,5,2,72,147,82,178,106,148,20,237,217,253,4,2,177,7,0,0,1,0,73,68,65, +84,213,213,167,95,93,116,63,62,61,109,155,148,146,153,141,122,136,170,142, +103,125,72,26,54,14,119,174,254,134,248,154,221,250,166,244,114,247,81, +0,6,16,83,198,33,2,168,230,163,74,224,68,117,20,139,82,189,84,171,162,197, +163,152,23,231,232,21,31,204,171,7,61,220,99,252,47,200,32,131,193,201, +140,129,241,246,47,128,42,148,99,138,248,104,143,38,119,59,143,159,34,19, +101,47,172,177,191,106,148,253,53,36,199,63,77,218,183,38,213,240,160,40, +243,108,185,180,139,171,229,80,202,200,102,119,143,105,70,77,119,167,151, +250,171,31,241,61,35,19,116,88,66,54,146,212,8,152,139,136,74,142,240,168, +193,74,24,197,40,213,105,17,219,234,54,89,42,164,82,139,115,160,84,73,163, +221,163,24,74,160,186,88,104,132,48,98,3,186,160,138,154,72,64,64,10,67, +35,250,36,30,28,181,106,66,16,148,64,98,110,144,70,205,55,17,128,66,84, +16,22,225,147,17,4,248,186,40,218,88,76,170,182,136,138,96,162,168,52,221, +178,157,207,187,52,47,101,219,74,244,30,31,243,27,129,193,0,0,1,0,73,68, +65,84,95,197,255,123,209,252,187,211,110,38,66,99,63,36,93,220,5,230,90, +134,121,46,21,72,41,61,81,237,251,245,165,251,235,59,242,23,130,201,138, +55,62,143,202,244,168,218,142,70,189,32,34,24,132,147,30,28,109,32,30,59, +3,28,195,28,102,211,70,143,240,8,119,120,200,184,179,71,0,47,161,44,239, +222,220,247,216,2,232,72,70,56,52,144,92,196,37,117,230,23,171,174,235, +114,157,89,164,68,175,244,194,148,136,192,46,247,225,251,31,234,17,47,3, +10,140,230,178,233,222,63,133,43,97,52,75,239,28,43,65,115,86,143,106,97, +38,213,96,21,181,178,86,212,74,51,152,137,79,202,198,72,110,142,214,192, +136,239,159,40,147,116,222,167,40,78,138,148,107,91,66,13,41,52,155,180, +85,102,215,131,124,242,96,181,90,13,67,239,172,14,43,81,251,136,18,112, +40,143,156,62,36,236,238,185,59,29,218,201,241,49,202,227,26,163,227,48, +202,232,205,246,112,135,79,14,23,140,94,64,115,184,79,31,220,169,224,28, +103,200,75,40,160,36,79,252,59,146,26,168,146,7,186,108,67,165,0,0,1,0, +73,68,65,84,138,35,133,54,38,185,234,252,186,234,71,247,87,15,174,203,186, +119,15,192,141,181,119,27,156,230,147,31,253,72,238,3,129,42,84,144,70, +219,239,40,170,141,168,59,67,135,79,62,145,201,51,98,1,138,18,26,163,139, +36,70,165,69,40,83,247,22,66,33,10,36,72,26,115,190,190,247,51,248,186, +217,121,167,65,81,180,245,80,104,18,205,78,101,158,245,152,125,113,61,124, +118,85,30,117,24,92,220,195,173,120,45,230,97,129,155,180,62,146,251,117, +135,98,23,71,177,151,214,70,26,195,246,234,71,140,14,17,113,138,67,38,109, +229,6,171,41,132,144,144,253,3,178,171,26,249,253,215,153,254,250,23,236, +203,141,144,34,4,147,170,142,169,58,169,245,52,91,14,241,203,135,219,47, +54,182,54,20,15,171,230,230,238,48,215,35,167,15,9,99,116,222,180,100,28, +213,134,192,228,190,30,163,62,2,211,99,148,211,35,195,3,177,139,10,113, +76,11,203,177,226,233,254,177,163,248,247,13,217,207,162,175,125,189,2, +10,230,36,73,193,8,164,148,154,121,69,250,229,197,250,215,174,169,237,35, +0,0,1,0,73,68,65,84,171,225,186,68,111,81,205,221,72,151,136,39,219,157, +29,241,90,99,188,156,99,228,244,13,3,200,104,18,217,91,69,48,186,239,198, +144,162,209,138,61,174,39,39,93,154,8,222,208,78,39,179,243,75,209,84,229, +105,111,70,3,182,0,73,36,9,192,80,81,205,25,146,190,92,118,143,186,178, +169,94,60,220,199,124,98,5,211,55,135,251,134,219,200,94,107,100,151,112, +56,168,100,8,85,35,82,4,33,85,37,16,49,218,50,198,84,193,8,120,24,147,67, +40,42,138,36,136,128,50,20,20,21,165,168,48,9,199,176,103,130,194,112,209, +233,30,32,28,125,39,187,199,211,49,126,225,24,85,56,205,142,175,57,203, +159,4,159,248,195,46,112,132,210,213,156,106,156,136,54,205,60,203,176, +246,2,206,79,31,213,197,127,250,232,225,127,126,39,126,239,15,223,174,69, +243,201,105,110,98,216,124,53,59,191,131,93,52,223,247,17,37,242,172,120, +232,103,77,253,227,164,250,93,112,80,30,227,39,240,216,72,178,83,84,68, +20,130,213,118,120,120,189,89,245,102,100,41,67,25,122,200,47,24,156,174, +0,0,1,0,73,68,65,84,20,53,112,84,66,14,3,7,76,235,177,116,229,40,122,19, +36,65,51,52,67,245,114,181,253,248,254,242,98,99,198,84,250,190,219,110, +71,90,191,4,102,31,101,240,203,193,65,211,122,12,137,18,129,42,82,150,148, +145,26,81,92,247,254,233,229,240,96,75,151,236,94,251,126,27,144,125,148, +200,247,52,154,99,248,235,203,196,193,210,90,31,107,30,123,81,221,32,53, +89,146,177,253,170,147,47,55,49,132,8,233,181,214,27,145,79,55,241,170, +79,226,136,231,196,193,210,122,39,173,199,190,6,73,52,35,101,164,70,21, +152,159,94,90,251,233,101,127,181,238,233,22,110,165,142,89,96,190,143, +203,157,14,241,125,50,251,56,115,190,63,28,44,173,101,122,236,219,137,41, +52,67,83,82,73,243,243,181,55,159,220,95,126,117,113,105,181,128,81,170, +221,20,213,227,17,190,111,78,127,127,7,63,226,96,105,253,216,134,184,119, +121,138,64,84,128,212,206,134,208,135,215,235,171,235,85,173,149,12,51, +191,185,94,60,114,238,117,199,247,79,107,78,225,34,143,95,236,187,122,61, +13,5,195,168,71,0,0,1,0,73,68,65,84,34,224,88,35,146,49,49,147,124,142, +149,220,0,49,97,136,11,76,53,36,9,114,203,102,62,155,205,74,215,35,47,62, +185,230,223,124,229,247,121,119,91,181,229,48,12,131,187,3,24,181,17,124, +87,70,122,181,222,124,8,24,65,2,134,168,140,10,172,61,12,240,199,179,42, +64,199,208,59,98,51,116,4,140,232,134,24,39,155,83,150,130,165,196,32,18, +34,165,86,24,132,34,46,181,214,90,171,187,31,231,216,115,224,160,123,205, +238,242,193,128,201,18,1,17,147,70,218,57,235,16,208,71,203,205,87,23,87, +239,126,120,86,251,46,231,118,159,183,43,34,227,243,183,36,165,55,185,221, +125,1,193,208,177,140,14,34,165,177,203,66,184,135,16,105,188,81,180,179, +4,206,84,4,204,66,162,10,102,0,18,57,31,122,17,105,91,5,64,69,104,168,38, +42,26,52,47,225,23,58,84,28,172,18,178,183,132,128,130,49,160,92,68,68, +107,90,232,252,20,154,92,243,103,15,151,191,250,252,129,67,135,126,99,102, +55,87,141,191,193,122,78,129,4,10,220,225,161,164,144,136,80,194,32,177, +195,0,0,1,0,73,68,65,84,88,148,206,135,33,105,210,156,135,144,18,18,34, +128,186,11,32,140,209,51,74,32,32,54,139,220,50,143,226,61,167,76,137,138, +82,81,246,95,115,52,203,60,7,14,86,90,11,101,47,173,167,252,45,81,104,234, +181,205,173,120,191,1,230,95,174,174,126,245,96,213,83,195,199,156,93,115, +247,39,170,78,62,19,65,200,110,206,140,166,113,16,238,80,245,8,104,19,34, +1,60,234,188,27,134,118,190,240,82,135,190,220,186,61,171,86,221,237,92, +102,99,229,149,119,103,51,0,110,4,37,101,201,148,210,111,20,244,38,237, +7,192,67,169,168,246,210,112,176,180,78,72,99,62,3,48,50,91,169,9,4,117, +14,120,206,138,52,191,94,205,126,189,142,135,91,187,123,130,169,208,211, +55,108,124,207,132,7,114,130,10,36,239,86,10,210,91,204,114,42,152,151, +138,148,176,236,240,233,87,203,229,182,111,231,139,194,121,223,151,91,67, +169,86,204,203,121,151,35,44,34,250,119,91,183,232,183,195,105,59,251,224, +110,106,32,45,79,144,149,250,88,255,249,254,156,68,135,138,131,165,181, +231,135,221,132,0,0,1,0,73,68,65,84,80,64,217,101,164,239,2,66,148,104, +114,116,54,203,202,104,216,156,223,31,240,143,95,92,189,247,99,213,89,173, +181,222,204,75,255,22,197,26,0,116,138,186,173,152,34,114,183,5,171,109, +180,196,163,171,186,233,107,228,102,51,216,131,235,82,66,23,41,175,35,117, +37,173,123,29,6,41,5,39,78,179,112,247,139,242,80,36,15,155,225,206,252, +180,54,231,119,21,39,166,139,252,181,123,197,88,242,225,240,170,62,124, +127,56,88,90,43,198,68,119,0,83,85,51,8,69,181,213,228,235,210,102,116, +85,209,158,95,148,238,111,63,250,252,79,110,191,181,152,159,142,198,135, +177,250,181,251,212,180,96,172,173,250,20,36,1,48,16,203,206,58,215,42, +186,220,250,229,245,86,20,235,109,223,21,99,242,18,216,122,131,148,67,230, +219,176,222,93,61,122,227,80,232,25,181,138,155,172,183,165,157,231,213, +58,190,72,219,53,23,167,236,111,105,253,163,159,222,189,235,125,211,52, +41,61,78,47,58,42,33,191,57,14,150,214,59,51,226,142,215,66,64,64,105,154, +100,97,169,129,147,72,63,6,194,246,0,0,1,0,73,68,65,84,179,141,245,159, +124,121,113,181,62,121,255,174,237,87,141,35,82,74,223,202,36,6,216,21, +187,90,119,171,42,61,243,213,166,92,92,175,79,78,78,6,107,12,201,153,42, +163,11,154,199,198,251,136,174,239,251,148,116,24,202,48,88,78,109,53,15, +143,25,23,50,59,43,142,71,155,237,218,46,172,187,56,207,117,189,72,255, +213,162,159,207,231,139,197,98,63,175,142,180,254,205,241,253,211,122,159, +115,243,155,197,91,191,40,152,148,27,89,5,187,84,8,77,195,106,149,206,63, +188,40,5,105,141,116,61,183,126,217,188,245,191,220,191,253,193,7,229,60, +174,251,154,135,91,31,212,176,219,221,195,118,241,222,3,91,220,69,8,35, +134,218,204,102,8,130,142,156,135,40,31,247,243,171,235,1,218,92,94,203, +114,61,180,243,220,151,68,61,223,186,117,165,12,30,161,121,240,88,117,67, +13,166,134,197,164,239,177,17,150,33,74,177,173,22,51,115,15,77,73,151, +87,181,186,164,60,112,97,233,189,109,141,229,63,230,255,221,235,239,189, +149,255,135,255,178,185,67,204,80,165,26,218,131,16,8,241,0,0,1,0,73,68, +65,84,197,88,106,208,199,250,91,68,45,190,104,147,10,16,7,108,211,122,30, +28,176,180,126,58,52,37,17,21,85,74,146,148,67,82,103,113,189,25,46,150, +246,206,226,36,149,1,253,86,102,57,232,168,37,165,5,88,147,164,212,182, +16,117,114,61,88,206,122,181,229,23,23,155,213,122,211,204,78,150,93,217, +20,43,98,219,190,14,213,154,185,108,6,27,44,92,185,173,92,118,86,156,218, +104,181,218,245,117,144,50,148,90,74,237,80,205,44,220,23,179,121,82,90, +13,17,56,170,155,185,133,52,101,219,215,191,251,248,242,237,147,252,103, +239,157,254,139,219,205,188,109,166,182,128,176,36,72,80,10,180,73,99,81, +148,32,245,216,244,250,6,222,56,90,231,220,16,34,106,76,73,115,27,218,174, +203,112,127,217,127,190,156,253,254,59,137,54,68,191,210,246,220,204,188, +219,234,217,237,12,2,66,77,1,60,216,198,131,85,97,151,47,215,229,193,202, +54,93,93,128,27,211,109,228,28,121,227,209,87,151,176,117,111,93,141,42, +92,23,94,110,234,224,144,70,194,189,239,237,44,188,20,228,83,76,131,0,0, +1,0,73,68,65,84,43,197,78,199,222,168,30,119,23,76,26,102,174,194,133,75, +184,49,204,179,24,230,87,155,205,127,248,197,131,235,109,253,227,183,23, +255,250,167,39,39,86,129,34,154,167,40,114,72,86,101,208,93,112,212,79, +190,142,55,142,214,33,99,119,95,149,148,147,204,189,158,108,141,23,189, +124,182,201,29,218,91,94,80,182,224,105,141,64,233,25,128,164,26,188,222, +246,93,52,159,95,118,95,173,74,52,249,98,89,152,219,77,77,67,77,155,202, +77,101,82,89,23,233,171,248,224,235,206,183,53,10,176,42,124,180,241,222, +32,77,82,178,235,121,46,28,10,75,225,41,96,134,112,246,213,82,146,176,154, +19,79,67,132,85,16,222,184,75,203,211,119,62,238,134,7,191,184,252,213, +103,15,222,121,251,79,126,54,111,91,219,134,102,5,105,131,136,34,53,34, +74,143,212,28,85,144,175,225,141,163,53,67,68,5,162,162,73,211,156,179, +115,19,221,74,254,116,179,184,234,211,219,98,234,5,160,107,147,36,5,99, +107,205,245,166,255,252,114,189,246,252,96,27,215,131,8,155,203,33,75,228, +212,196,143,60,0,0,1,0,73,68,65,84,101,175,153,126,189,25,150,93,213,153, +174,251,50,148,170,218,174,59,246,198,2,172,43,175,58,244,78,181,144,136, +174,103,73,28,6,150,194,65,194,44,220,163,212,72,10,186,55,137,61,60,33, +146,134,183,44,125,201,179,133,69,122,184,169,23,143,214,255,242,147,82, +222,209,15,79,79,79,180,105,5,225,125,148,161,57,201,99,57,171,163,172, +126,2,111,28,173,141,108,69,84,53,52,33,101,153,159,82,179,181,205,39,189, +126,177,242,31,75,93,204,189,175,222,166,38,231,89,95,236,178,203,143,214, +246,235,203,161,19,174,171,246,145,103,200,198,102,83,228,170,39,204,47, +86,229,106,221,235,92,54,125,29,170,105,78,219,222,139,133,171,244,22,203, +226,53,152,144,162,122,215,27,26,27,6,43,197,34,217,88,99,187,134,37,149, +48,107,18,139,164,36,145,133,166,80,247,190,91,158,220,186,43,39,119,46, +203,240,191,253,167,79,63,121,43,255,203,31,191,245,95,188,203,247,238, +180,109,51,183,97,104,72,32,24,78,182,71,53,228,38,222,56,90,143,246,16, +77,41,66,161,9,192,242,194,46,0,0,1,0,73,68,65,84,121,33,210,202,108,246, +40,228,225,118,217,47,188,141,88,119,67,154,137,204,228,226,122,121,191, +156,175,7,94,148,228,77,222,56,135,234,174,165,239,251,71,214,94,109,76, +154,116,185,245,203,206,37,124,221,91,95,141,82,187,161,186,83,50,45,216, +151,26,196,88,64,222,190,241,240,112,79,84,210,107,100,11,23,79,225,73, +104,176,59,109,108,55,221,201,249,157,26,172,249,228,111,191,188,254,245, +37,254,191,135,110,63,139,127,247,231,127,240,86,3,151,4,15,36,65,56,61, +36,31,245,144,199,120,243,104,45,162,73,25,73,68,9,161,102,209,44,205,188, +164,166,179,245,88,181,108,219,15,141,228,84,236,226,170,123,16,139,10, +41,50,11,105,123,235,183,219,222,106,108,150,203,71,190,88,174,59,157,97, +213,215,245,96,130,186,234,75,87,106,72,30,6,11,70,10,146,52,51,2,201,85, +144,118,61,122,166,188,198,49,164,176,10,5,240,96,101,104,113,113,83,82, +212,243,176,174,213,232,245,242,242,170,105,91,164,179,135,148,207,126, +189,254,121,255,197,239,253,252,231,119,126,129,222,151,185,0,0,1,0,73, +68,65,84,148,156,202,41,204,48,158,89,110,226,77,197,15,142,214,36,68,36, +169,6,233,50,85,105,87,213,23,117,225,36,233,80,171,0,210,180,100,100,149, +156,83,78,114,186,216,254,34,22,31,250,219,255,182,214,183,155,235,213, +112,231,23,195,252,62,223,211,102,181,92,109,61,146,153,44,183,220,14,77, +221,74,87,78,62,222,186,199,172,44,109,48,29,98,86,214,86,61,5,117,53,20, +64,136,84,107,128,160,206,0,20,131,72,228,182,237,75,1,36,183,237,48,246, +135,84,77,67,29,255,21,164,18,34,210,64,165,239,109,213,52,77,158,247,143, +86,109,158,49,4,206,126,176,240,246,127,252,236,238,221,143,183,119,195, +127,126,75,235,86,155,219,11,70,136,12,238,179,199,147,229,141,199,15,142, +214,47,13,178,239,200,40,42,170,109,66,80,86,158,239,15,226,154,187,36, +91,181,138,65,60,202,224,149,168,97,155,190,174,135,40,110,221,80,215,125, +120,140,125,250,188,24,171,211,2,65,190,136,245,27,1,137,8,119,169,226, +2,64,84,198,112,89,0,139,219,255,243,223,124,116,94,146,133,20,118,0,0, +1,0,73,68,65,84,239,253,197,159,126,56,247,237,173,194,246,108,30,67,47, +205,145,205,143,241,102,210,122,108,129,39,99,7,3,85,77,170,51,21,67,126, +88,210,71,61,174,152,152,155,141,70,39,61,132,155,142,67,120,31,120,180, +45,171,193,7,151,237,80,87,125,10,142,101,191,199,126,170,140,152,154,71, +254,150,99,121,220,18,7,35,163,9,128,238,163,123,222,233,116,29,43,210, +18,192,160,179,191,250,244,210,184,142,249,230,191,255,227,179,51,91,187, +228,14,249,228,88,179,225,6,222,60,90,115,140,238,155,154,59,234,254,198, +205,232,60,63,176,54,213,188,212,156,67,92,104,232,129,217,117,199,193, +209,49,30,117,182,28,188,15,233,138,109,45,113,215,63,50,40,14,112,106, +91,243,219,5,145,126,147,134,187,76,55,120,128,140,208,112,213,60,181,233, +214,205,122,21,231,239,255,135,47,87,248,63,127,249,223,252,201,191,126, +139,195,245,229,195,243,119,127,70,247,233,128,71,102,191,137,180,126,6, +204,180,75,249,178,206,212,230,125,202,77,4,89,35,170,136,94,245,210,59, +58,242,106,192,243,196,239,74,0,0,1,0,73,68,65,84,170,96,32,186,138,226, +8,202,142,124,99,227,236,231,226,211,205,218,220,55,227,188,37,113,170, +216,57,85,247,76,73,20,42,67,127,114,251,253,71,93,253,235,79,62,255,191, +126,121,113,246,126,185,155,181,97,87,35,239,91,92,31,153,253,230,209,90, +128,49,234,106,108,150,190,75,169,218,70,102,213,92,144,250,48,70,86,122, +132,121,36,241,171,173,15,129,66,189,238,185,53,152,104,239,169,152,239, +202,195,78,197,55,229,185,92,35,187,142,124,216,199,27,238,168,173,35,205, +133,83,105,207,16,136,114,158,155,238,234,98,214,182,181,158,253,79,127, +245,203,217,191,249,209,95,252,103,239,246,171,107,54,183,85,149,228,216, +146,239,13,103,246,155,71,107,96,10,233,35,1,50,36,34,60,100,72,51,120, +52,93,201,94,125,72,146,164,128,37,34,75,89,110,107,13,24,210,106,240,193, +65,69,169,152,164,232,24,141,72,232,88,242,143,160,252,150,246,99,17,236, +230,24,176,43,162,191,111,211,52,150,27,15,170,96,204,249,157,235,25,134, +78,221,57,191,251,151,255,252,224,252,124,216,162,45,140,0,0,1,0,73,68, +65,84,120,235,108,243,111,223,138,70,61,34,246,25,107,111,56,179,223,76, +90,3,187,38,51,36,130,161,33,21,173,250,80,124,232,221,96,202,148,7,201, +61,164,65,89,246,213,40,33,232,139,215,16,36,186,35,37,217,105,13,220,55, +100,18,192,158,103,44,242,181,72,221,145,218,99,19,86,153,54,48,8,161,16, +125,180,231,167,233,225,163,251,126,114,7,120,235,175,62,173,63,149,143, +254,252,191,251,3,221,229,61,140,9,243,223,145,218,115,232,248,193,209, +90,85,194,25,228,120,91,31,115,199,249,98,12,103,192,227,102,210,16,81, +64,29,112,199,224,222,242,171,80,181,148,215,108,154,170,169,138,68,128, +188,84,134,164,234,52,175,78,9,40,130,73,179,69,217,31,104,252,103,247, +13,55,245,227,239,30,52,121,99,137,57,238,63,29,48,190,94,7,123,42,229, +189,105,251,240,184,221,44,174,174,47,242,189,197,151,215,95,253,229,63, +218,95,252,183,255,245,159,181,215,210,45,111,181,185,57,189,109,204,149, +152,129,64,239,222,190,129,246,236,31,28,173,95,21,44,118,173,239,24,92, +24,213,48,0,0,1,0,73,68,65,84,20,40,69,72,16,158,199,226,245,227,76,147, +169,87,239,43,244,234,169,176,6,21,169,105,156,234,38,95,94,109,254,143, +191,254,252,214,31,217,143,78,155,211,89,214,106,46,149,77,243,38,231,171, +31,105,61,193,92,67,36,40,46,176,209,88,23,163,210,140,152,218,76,98,207, +236,87,56,78,133,134,59,82,202,243,69,79,129,44,30,118,87,255,235,255,243, +183,239,200,237,63,255,195,31,159,47,178,15,69,178,106,74,46,145,147,238, +60,246,79,182,64,56,108,186,31,105,61,193,153,130,66,74,140,37,115,118, +93,115,114,13,114,223,92,88,56,181,217,121,101,144,234,100,68,86,109,26, +26,209,158,197,226,206,223,223,191,254,203,191,219,156,220,186,251,246, +217,201,157,228,51,53,157,154,198,63,169,5,237,43,233,28,105,253,70,64, +145,199,198,210,19,21,118,134,9,113,217,247,46,27,45,131,120,97,122,254, +243,32,27,32,106,66,10,80,93,152,155,211,59,215,117,243,127,255,243,230, +253,119,47,127,118,231,244,244,173,102,22,193,48,104,170,30,237,75,232, +205,253,195,195,49,145,245,239,217,0,0,1,0,73,68,65,84,154,113,66,22,209, +49,155,106,124,63,117,156,150,160,4,133,84,78,133,162,36,4,241,234,244, +16,117,228,166,45,97,230,21,102,40,85,84,45,165,127,238,102,255,241,163, +135,191,250,226,81,177,112,43,86,6,2,197,248,68,45,250,87,53,236,151,140, +35,173,39,36,50,145,137,161,164,146,10,170,64,117,215,225,113,172,35,140, +157,93,230,213,241,67,66,115,211,212,168,65,91,52,154,221,232,21,26,62, +127,231,23,95,92,125,252,197,197,96,94,250,190,239,183,0,252,113,39,193, +199,3,126,19,214,145,71,90,79,16,82,25,2,10,67,16,187,234,122,124,92,0, +126,106,75,9,124,179,107,222,75,4,131,170,10,119,21,156,206,218,153,138, +48,32,196,233,189,135,171,254,226,122,109,230,165,12,101,24,72,248,55,122, +134,188,9,156,198,43,164,245,227,133,203,88,209,122,108,158,254,234,126, +241,170,168,42,166,226,73,93,213,69,92,224,0,53,168,99,44,83,140,5,127, +19,144,95,157,114,93,231,253,245,102,45,233,220,98,118,109,81,79,230,53, +102,179,244,94,182,207,217,234,129,232,82,61,0,0,1,0,73,68,65,84,95,127, +177,254,104,157,102,139,91,177,188,242,205,166,201,139,190,239,199,114, +221,17,225,187,112,168,131,199,81,90,191,166,120,60,175,40,0,16,78,209, +102,221,215,95,63,184,188,218,246,38,24,74,63,12,253,215,62,115,163,4,235, +75,28,234,43,192,145,214,175,25,166,126,14,147,63,114,106,218,77,1,76,84, +231,143,214,245,239,62,250,252,215,151,171,42,178,29,54,125,183,220,51, +248,77,208,61,246,56,210,250,53,131,80,118,97,130,147,29,146,2,138,32,160, +121,126,53,240,111,63,249,234,87,15,151,91,106,241,26,182,125,162,141,234, +27,210,28,231,72,235,215,12,143,237,50,50,9,109,170,80,208,136,16,218,161, +249,167,7,203,95,124,121,121,93,88,107,36,114,172,151,249,166,53,124,58, +210,250,53,131,66,228,166,239,112,84,45,68,154,20,142,176,60,251,106,107, +255,240,249,197,23,87,219,190,56,157,99,117,227,177,38,201,155,195,236, +35,173,95,51,200,62,206,111,52,56,238,44,145,77,114,243,1,179,217,198,240, +79,159,95,124,118,255,122,189,169,62,196,200,233,133,123,179,72,0,0,1,0, +73,68,65,84,223,162,203,194,65,224,72,235,215,12,123,43,58,190,238,194, +87,37,188,34,103,64,30,92,173,46,174,214,93,95,235,240,184,115,200,111, +220,234,233,16,240,202,250,50,142,11,243,41,199,68,198,186,120,143,93,98, +223,196,247,62,206,215,4,21,201,4,14,82,12,98,137,204,76,153,249,162,228, +179,91,11,121,240,203,69,43,87,60,255,247,191,186,94,55,139,174,251,188, +95,173,89,204,251,26,189,183,152,37,38,53,205,146,43,138,161,24,204,225, +113,35,40,177,71,116,240,30,81,1,7,60,16,241,109,49,139,223,114,201,94, +225,117,60,134,58,29,10,52,131,38,146,129,100,86,86,235,237,245,114,109, +183,201,40,37,6,9,137,96,19,125,150,198,131,89,114,158,66,160,120,35,118, +92,0,100,20,16,66,81,168,76,121,244,2,40,211,235,100,31,60,210,250,80,144, +230,244,170,210,10,164,86,94,94,174,190,186,255,232,143,79,230,105,230, +5,174,112,194,42,156,34,1,82,48,143,241,210,223,136,87,148,192,232,64,149, +169,153,241,212,155,15,0,95,179,118,7,71,90,31,8,104,164,197,107,0,0,1, +0,73,68,65,84,68,50,169,170,13,4,8,185,94,109,191,248,234,225,246,189,119, +23,243,176,26,158,57,54,9,19,81,77,76,170,49,210,116,167,167,239,83,132, +19,1,81,64,16,49,217,18,1,4,119,225,48,79,130,252,33,74,241,35,173,15,4, +73,50,3,73,51,233,16,237,135,250,229,131,7,87,235,211,156,178,229,198,60, +242,220,208,54,18,46,160,54,13,242,201,216,97,120,4,167,194,13,18,206,148, +19,0,163,16,146,19,72,152,200,252,181,170,94,121,164,245,161,96,172,155, +170,176,106,80,113,250,131,71,15,191,122,120,114,110,203,129,171,116,178, +208,249,172,198,109,157,183,0,164,201,205,217,91,16,17,85,136,34,37,136, +98,44,33,43,170,16,64,84,3,162,99,150,116,202,120,246,178,241,40,173,143, +248,254,32,1,161,40,171,23,104,80,227,226,234,209,23,247,243,207,212,60, +221,181,186,168,125,83,120,75,102,13,192,104,114,83,238,65,20,154,161,13, +82,11,109,68,179,136,134,44,48,155,67,68,107,133,36,93,204,1,69,41,209, +156,62,253,107,127,144,58,247,145,214,7,131,117,42,58,84,0,0,1,0,73,68, +65,84,144,49,1,211,43,64,34,54,219,245,163,171,71,114,119,131,161,163,206, +201,28,179,115,143,134,116,105,178,151,11,17,133,182,72,51,73,115,209,150, +169,133,164,62,102,243,249,28,162,125,173,162,105,54,156,64,116,40,67,115, +239,247,159,250,173,73,155,151,124,158,191,9,126,112,180,126,92,210,124, +42,111,254,166,68,190,255,134,24,124,75,40,36,3,77,214,4,161,104,5,212, +226,210,135,135,148,12,214,243,213,199,171,56,251,172,253,0,203,79,151, +91,182,39,51,73,80,73,222,43,34,55,9,139,52,115,191,18,81,161,10,149,158, +70,13,4,64,203,144,33,67,180,113,64,18,182,13,144,178,135,250,125,119,66, +115,106,230,162,141,83,161,57,165,166,208,115,211,138,54,129,172,105,166, +205,2,104,98,172,73,65,217,249,40,20,59,155,74,165,237,47,236,205,166,123, +133,14,96,234,235,115,195,223,52,85,129,251,6,248,173,137,198,63,56,90, +31,241,237,72,41,5,133,19,37,8,6,25,12,71,200,216,123,93,2,8,194,195,171, +89,169,94,122,31,90,79,230,76,222,122,48,198,55,139,72,0,0,1,0,73,68,65, +84,71,130,163,213,102,6,17,104,66,82,145,132,49,147,19,18,164,32,3,26,1, +145,20,8,136,134,135,172,190,12,39,52,33,207,69,27,163,64,50,115,227,81, +145,91,213,198,145,68,231,169,153,67,178,59,243,233,41,39,59,139,66,146, +72,18,73,16,81,205,34,34,163,81,124,82,96,198,178,136,62,154,21,71,159, +29,119,111,118,133,89,158,78,95,62,163,50,196,145,214,175,25,178,230,0, +130,186,187,158,1,58,194,17,170,161,17,34,33,18,128,185,71,173,125,31,221, +149,111,225,108,173,106,164,147,176,20,202,176,86,230,167,35,173,37,37, +104,134,170,64,40,66,38,166,12,81,4,137,204,220,0,202,136,28,93,10,66,146, +196,12,210,8,5,146,212,178,120,73,185,21,109,18,19,116,166,205,28,72,112, +82,207,0,33,4,146,32,153,146,68,147,136,34,223,166,200,56,145,198,192,173, +209,28,51,114,88,198,45,72,211,118,25,59,4,131,99,121,175,167,233,241,79, +101,246,145,214,175,25,166,156,74,193,152,22,35,8,34,0,79,68,10,34,168, +17,234,14,55,218,224,67,69,208,108,226,0,0,1,0,73,68,65,84,23,221,133,111, +106,141,166,41,226,105,17,166,84,134,101,141,115,138,104,202,212,36,41, +67,117,180,123,64,90,228,12,40,3,34,9,222,64,20,30,88,156,75,4,36,33,10, +36,167,16,74,18,105,50,43,216,32,26,101,2,6,120,1,114,114,178,175,132,8, +148,146,33,25,218,136,38,136,186,81,100,252,108,18,201,220,145,85,114,3, +64,68,41,163,128,87,142,138,203,88,140,156,66,145,155,169,165,55,149,144, +111,50,251,72,235,215,13,83,201,62,202,20,192,23,2,167,132,18,26,65,11, +177,154,162,194,69,56,160,118,28,150,209,211,41,214,48,218,5,169,20,167, +43,98,13,21,104,198,78,90,143,81,220,154,230,154,50,161,26,132,36,77,45, +68,233,129,20,238,132,36,141,25,37,91,8,36,169,103,0,137,141,104,227,76, +80,87,4,144,205,217,12,192,36,170,157,58,230,239,83,68,233,43,136,136,102, +72,130,102,32,17,10,72,30,155,48,76,85,45,148,162,16,33,199,138,221,130, +201,198,206,41,255,127,231,70,218,19,250,9,102,31,105,253,186,129,143,255, +39,9,58,223,155,64,71,0,0,1,0,73,68,65,84,232,164,169,23,218,16,53,180, +110,89,59,184,11,59,241,206,235,198,6,26,97,30,222,247,33,18,98,17,10,108, +71,37,132,41,81,51,38,49,41,72,45,114,22,168,4,128,132,220,142,210,218, +147,122,16,146,152,103,144,38,40,144,132,148,169,13,216,138,54,193,4,173, +160,65,114,120,0,99,44,248,40,167,3,41,192,128,164,140,30,162,227,118,68, +3,73,68,162,8,124,10,128,163,40,84,49,190,0,40,45,0,64,101,170,61,180,179, +31,200,100,129,185,201,108,236,228,247,145,214,175,25,84,132,28,175,240, +184,88,52,120,13,43,82,123,150,173,23,143,97,227,117,139,112,160,71,244, +94,123,171,82,25,153,110,197,60,137,74,49,202,92,250,105,201,168,74,205, +152,42,255,136,136,34,101,136,210,9,201,200,13,160,240,208,148,25,1,201, +169,153,65,91,132,64,115,202,185,202,66,154,86,180,17,100,209,89,226,28, +200,8,2,21,162,144,76,182,228,140,104,193,6,154,18,20,146,192,12,58,212, +33,13,36,9,5,76,251,222,126,196,244,154,34,194,93,236,202,84,253,80,56, +105,44,23,244,0,0,1,0,73,68,65,84,170,38,56,42,33,7,4,21,37,24,83,229,249, +64,120,184,133,155,122,9,43,168,70,235,195,122,80,40,5,172,30,238,94,77, +194,205,220,37,92,92,74,136,32,135,136,8,21,76,8,221,27,248,192,96,202, +148,68,39,36,209,219,113,201,136,205,87,8,66,50,154,153,164,86,40,144,44, +185,9,57,145,220,106,106,137,12,157,177,89,64,50,131,72,78,73,148,28,104, +137,66,153,65,26,68,74,49,131,36,168,67,9,5,149,68,162,104,74,45,246,150, +19,238,130,8,9,48,70,211,224,227,66,181,99,193,184,113,176,175,76,9,145, +0,2,136,177,179,197,84,206,238,181,10,48,120,42,158,25,58,252,140,110,4, +124,70,141,14,73,207,216,191,14,170,73,85,57,153,184,36,165,164,41,111, +236,81,110,90,43,14,139,147,148,81,221,54,67,3,174,86,29,86,171,211,235, +79,197,109,85,238,160,220,255,87,183,30,166,212,74,104,29,108,209,232,108, +150,34,106,169,72,141,120,104,111,67,74,169,145,164,52,4,129,72,16,25,87, +160,62,54,194,17,64,89,85,32,89,196,97,16,51,13,135,176,0,0,1,0,73,68,65, +84,133,38,247,70,180,133,54,208,28,166,218,156,194,83,104,35,169,21,157, +51,90,209,38,73,178,205,26,146,69,91,201,115,77,115,164,185,104,11,205, +145,206,32,58,185,54,49,35,102,163,134,29,54,74,247,68,109,132,141,104, +35,4,68,201,205,78,71,79,208,44,227,11,17,141,13,68,32,9,76,162,105,50, +158,236,112,148,214,47,24,250,12,7,129,63,203,163,244,204,233,145,40,74, +81,142,165,181,73,8,9,167,143,109,119,73,247,96,208,58,43,27,192,97,247, +53,174,157,93,132,1,37,167,205,105,187,57,159,13,152,106,189,62,142,227, +223,247,187,193,36,248,118,33,124,163,205,97,146,56,50,253,125,87,72,51, +88,65,29,223,142,54,9,9,82,148,94,40,73,166,174,77,74,142,114,95,9,133, +56,210,40,100,21,84,38,72,56,217,64,20,26,36,133,194,52,202,99,133,52,128, +78,227,224,110,129,8,221,213,68,226,215,30,223,37,21,143,180,126,209,120, +6,77,159,69,247,103,74,253,212,76,169,138,99,116,29,25,65,50,96,42,16,24, +97,53,224,209,175,172,123,68,52,140,78,93,0,0,1,0,73,68,65,84,90,187,253, +44,202,163,98,155,48,71,244,167,121,125,111,190,186,55,235,167,33,17,140, +152,74,116,83,249,216,209,49,189,218,179,120,63,46,0,147,58,59,218,40,162, +64,116,74,149,25,39,130,6,168,176,4,81,168,83,39,215,13,213,32,9,4,36,49, +92,130,12,72,16,225,148,132,72,144,132,100,136,224,120,107,80,131,40,50, +39,105,61,101,54,16,163,147,40,181,227,10,121,215,211,132,251,1,124,11, +142,180,126,193,96,60,163,32,152,62,189,34,239,179,46,144,99,178,223,98, +87,55,97,244,41,38,15,21,87,43,172,157,176,96,184,68,119,17,81,154,229, +125,239,54,49,24,204,32,221,189,89,255,86,91,110,229,178,215,65,227,134, +168,158,158,177,91,131,113,250,119,34,241,126,121,118,179,79,19,28,140, +93,209,29,157,20,93,161,140,116,191,57,13,48,6,106,67,36,97,202,174,25, +63,22,144,68,100,72,2,27,73,156,118,166,83,18,85,33,2,205,136,81,242,7, +52,131,10,205,50,149,96,22,97,112,170,252,35,207,254,229,128,35,173,95, +56,158,245,99,63,235,136,153,35,91,0,0,1,0,73,68,65,84,182,153,158,241, +9,199,40,101,41,50,22,2,9,70,144,161,117,72,161,28,54,49,172,52,186,216, +94,162,187,80,31,100,213,113,48,12,129,40,119,218,250,254,44,238,54,200, +240,41,160,102,228,236,238,6,190,255,202,27,74,8,119,29,248,118,35,221, +103,205,128,83,156,222,142,81,178,223,97,220,103,170,0,30,130,32,67,232, +16,8,28,163,75,156,99,49,67,31,183,19,190,251,112,26,117,41,80,5,36,13, +84,64,160,2,42,98,252,38,142,137,57,130,0,68,24,187,74,86,66,249,182,194, +221,71,90,191,96,232,51,120,237,207,82,54,158,165,90,211,71,241,60,90,43, +64,135,25,195,164,191,20,21,110,87,209,93,51,58,172,31,234,250,145,178, +248,48,176,6,188,158,74,247,97,187,253,201,169,221,158,209,131,170,73,244, +107,25,44,187,114,158,123,37,100,106,88,38,163,70,36,55,251,136,60,150, +214,59,25,169,50,229,89,143,65,29,18,50,117,217,30,237,113,24,75,76,77, +238,147,241,104,123,205,225,166,126,60,30,150,34,132,144,66,137,105,4,163, +179,28,138,221,226,125,89,202,0,0,1,0,73,68,65,84,157,101,124,15,129,144, +177,151,220,56,210,250,101,34,226,233,45,236,66,158,30,192,41,241,44,93, +124,140,244,240,233,54,237,230,117,48,171,216,60,164,192,214,203,216,94, +215,232,185,185,224,250,82,80,157,85,196,27,221,222,75,215,63,57,221,252, +248,214,112,186,24,6,198,185,54,42,20,9,25,251,70,78,153,138,178,111,190, +119,83,116,223,144,208,187,77,187,45,194,93,249,0,170,80,65,25,75,9,48, +77,161,29,28,3,239,166,42,224,162,143,3,57,70,239,201,116,186,188,177,237, +198,151,137,78,19,97,172,87,165,156,94,43,57,106,53,2,161,240,230,172,248, +54,28,105,253,130,97,181,62,117,187,52,79,255,169,35,158,222,35,61,105, +144,206,48,208,25,22,86,108,232,162,22,239,175,3,136,110,137,237,181,197, +128,237,154,221,134,226,212,42,176,150,221,89,179,190,55,223,222,61,177, +89,91,182,5,59,37,68,30,179,235,107,174,139,29,175,167,222,214,55,45,33, +188,201,250,41,202,148,178,99,151,8,101,76,94,184,161,233,238,10,78,237, +166,195,99,171,202,190,121,30,34,47,17,0,0,1,0,73,68,65,84,37,111,40,237, +187,63,98,156,54,178,155,45,20,25,95,67,118,3,27,11,111,188,182,150,144, +39,170,74,60,126,245,67,11,185,118,11,8,37,137,106,18,81,58,188,192,171, +251,48,93,84,55,88,21,27,50,34,171,20,93,148,237,246,157,15,63,220,118, +253,182,235,223,126,231,71,67,41,219,237,54,230,103,97,131,134,53,74,33, +135,90,3,218,180,115,139,107,235,74,110,22,41,180,187,94,159,165,124,75, +210,229,253,165,245,23,89,11,182,247,177,189,0,13,157,163,135,166,179,202, +175,110,53,151,255,234,246,195,63,186,189,253,224,150,100,228,92,78,222, +102,49,237,179,130,146,128,164,132,134,36,151,36,2,5,196,161,59,183,135, +80,69,84,96,143,109,36,0,110,208,62,5,4,208,8,113,145,4,25,215,180,84,54, +143,117,107,241,209,183,77,81,97,30,13,56,178,111,155,58,201,218,81,183, +222,121,51,232,163,132,14,177,201,123,56,166,162,169,142,250,92,218,89, +109,118,147,98,92,39,136,132,63,94,61,134,64,119,11,89,0,63,64,90,191,46, +24,3,225,119,18,110,36,222,133,127,0,0,1,0,73,68,65,84,167,161,146,25,81, +202,0,171,138,80,175,44,189,71,213,164,213,151,232,250,254,145,150,97,224, +80,106,203,112,71,223,55,26,66,247,97,203,176,166,201,94,74,177,208,56, +137,245,35,12,3,154,198,195,176,186,28,196,201,98,215,247,117,123,161,25, +169,118,81,75,2,221,43,194,6,150,147,211,203,15,78,182,239,223,242,187, +103,222,100,11,70,8,53,51,41,84,68,85,116,31,230,188,139,232,255,129,201, +137,23,137,35,173,159,19,170,10,142,190,83,76,86,6,6,25,39,9,86,182,177, +93,137,56,106,239,235,107,175,67,228,68,18,181,14,177,172,165,160,122,95, +47,131,180,82,165,191,211,36,169,203,43,218,208,158,157,73,173,232,11,206, +206,219,205,70,106,73,141,144,125,108,47,5,91,247,13,250,71,205,102,0,68, +141,240,32,66,88,36,21,145,248,227,179,203,159,156,219,207,111,151,123, +179,42,116,0,16,164,6,89,144,85,178,72,26,35,136,166,136,38,217,61,79,202, +195,120,82,175,176,121,200,139,197,145,214,207,137,125,32,153,200,206,223, +49,42,75,214,161,172,49,245,156,107,255,0,0,1,0,73,68,65,84,92,103,22,233, +87,118,125,1,175,205,124,206,97,3,81,177,75,53,139,128,149,7,65,160,214, +186,58,211,54,243,250,17,106,207,187,119,197,3,93,143,225,124,123,121,77, +80,84,9,131,117,197,182,240,45,134,173,171,90,87,97,34,110,153,221,217, +162,220,58,183,156,202,159,156,119,63,58,177,119,154,50,19,47,4,1,85,168, +74,82,166,49,181,107,103,252,30,213,227,199,50,123,172,116,115,88,56,210, +250,57,49,117,167,125,108,172,154,86,2,195,122,21,219,181,244,171,228,27, +108,175,116,115,161,17,51,204,135,171,7,179,249,60,130,73,164,209,236,91, +2,128,57,250,19,102,197,118,137,50,184,95,147,130,106,222,63,130,21,145, +68,38,80,16,64,17,148,172,114,110,109,7,119,205,233,246,140,39,209,189, +119,167,188,127,207,179,172,126,58,203,39,50,52,165,134,66,18,82,147,155, +148,178,160,193,144,5,89,168,99,176,169,236,130,224,4,55,90,246,241,25, +197,109,94,87,28,105,253,220,216,133,148,237,84,212,145,231,94,171,208, +165,118,182,185,192,250,33,215,87,86,135,199,152,114,156,0,0,1,0,73,68, +65,84,235,43,96,88,241,252,188,108,59,228,220,204,23,214,15,72,9,16,148, +109,161,39,26,173,116,219,11,73,89,52,217,181,99,142,156,103,86,9,151,70, +155,232,122,212,114,54,159,27,150,174,235,247,111,207,63,56,151,133,109, +223,63,175,239,221,161,245,235,243,124,39,121,132,131,0,154,220,52,179, +54,177,65,109,18,154,36,73,37,41,199,101,216,168,135,60,78,127,198,13,47, +12,15,68,227,62,210,250,57,177,243,63,239,61,110,147,77,88,52,53,41,17, +145,162,156,180,218,222,57,237,183,92,175,86,50,75,231,139,102,88,93,1, +150,60,213,178,149,118,150,114,182,178,197,208,205,207,79,211,76,151,235, +117,154,47,78,22,231,203,126,171,171,117,158,205,88,6,165,221,94,52,144, +117,78,221,219,103,231,239,159,73,223,94,190,255,214,252,157,219,136,237, +131,59,11,185,219,206,215,93,64,11,196,1,72,3,153,75,158,69,147,106,11, +107,115,106,146,182,89,154,196,156,144,114,104,130,166,105,193,123,16,28, +126,10,142,180,126,78,144,220,57,230,228,6,71,196,61,18,144,85,99,128,142, +182,0,0,1,0,73,68,65,84,207,22,179,15,78,79,222,57,159,245,219,205,195, +135,15,7,235,110,157,223,170,101,8,98,62,95,184,213,217,98,222,52,237,114, +213,59,227,108,49,155,183,105,88,175,78,79,79,238,189,245,22,136,123,185, +89,44,90,175,155,38,245,239,220,201,77,116,51,200,135,239,230,247,87,155, +235,229,245,173,179,213,98,230,215,29,230,129,134,69,12,62,31,52,121,202, +64,11,105,168,185,38,181,12,228,164,57,105,74,146,18,53,65,21,73,169,73, +38,147,153,8,14,101,153,120,19,71,90,63,39,122,82,4,73,36,129,66,144,74, +204,152,26,57,109,203,208,104,204,127,114,58,255,211,15,236,167,247,88, +236,206,195,119,239,230,116,169,210,252,225,91,115,145,54,28,87,215,143, +206,78,231,183,238,156,255,205,223,255,253,221,59,63,253,209,219,111,103, +193,240,179,123,179,156,155,148,182,63,202,239,233,127,44,221,101,142,238, +188,157,207,117,30,86,40,155,100,143,162,137,243,123,32,188,27,48,63,129, +10,182,165,204,206,193,168,10,36,160,13,204,195,230,196,34,39,205,154,179, +53,89,154,233,158,56,56,0,0,1,0,73,68,65,84,148,178,34,43,179,32,77,137, +132,33,206,160,79,5,59,228,57,205,32,250,117,239,141,76,110,110,64,71,13, +126,239,205,153,252,41,191,237,253,193,119,142,75,236,98,172,190,22,115, +248,12,28,105,253,226,32,0,97,78,204,78,117,126,235,186,92,223,223,212, +247,238,181,183,78,22,137,92,220,126,63,231,217,157,243,109,147,23,34,233, +234,234,222,124,209,156,158,44,78,110,157,157,156,44,238,156,159,211,189, +223,108,218,156,26,77,219,205,90,30,254,227,144,77,77,22,57,55,76,70,241, +73,188,142,201,216,211,53,158,212,101,32,183,154,18,218,36,109,142,38,177, +73,200,194,52,242,88,31,251,55,198,216,141,137,133,95,51,238,1,135,163, +90,31,105,253,188,208,199,110,13,236,110,232,227,61,189,153,157,156,69, +197,195,237,229,175,174,203,143,238,202,221,183,210,187,39,92,90,81,205, +25,156,55,210,52,57,74,155,179,102,241,183,111,159,39,213,6,225,180,140, +104,68,179,70,86,230,102,134,166,1,52,43,82,132,139,9,93,24,141,38,236, +2,137,146,200,216,152,93,32,243,151,156,56,182,0,0,1,0,73,68,65,84,217, +72,107,52,9,109,138,89,102,155,209,164,241,25,141,34,43,210,110,14,220, +176,92,127,87,136,231,235,137,35,173,159,19,55,10,109,237,2,112,68,168, +72,139,51,69,27,115,241,249,187,159,85,251,197,163,242,118,59,252,193,89, +214,64,2,178,68,22,159,101,46,102,170,42,2,182,74,122,101,13,97,52,202, +38,33,41,178,82,8,97,0,174,226,73,217,36,38,149,212,72,242,41,72,78,128, +36,163,12,22,17,153,55,204,9,109,150,54,161,77,50,203,108,27,52,9,243,6, +57,97,150,209,38,100,101,82,170,138,42,199,216,167,253,41,224,177,41,228, +16,112,164,245,115,34,137,124,45,100,103,180,98,11,242,201,29,239,42,218, +5,222,250,112,216,200,199,221,23,31,174,252,253,179,249,188,141,121,59, +179,102,180,184,97,214,166,156,50,68,102,16,51,107,154,156,146,196,172, +205,57,137,128,116,52,51,105,26,72,154,165,104,1,23,9,166,220,54,24,12, +99,96,178,48,9,84,37,9,68,56,75,209,36,153,101,157,53,104,19,102,89,102, +19,161,53,39,105,178,52,153,105,213,221,61,108,0,0,1,0,73,68,65,84,18,216, +20,17,81,157,134,252,255,179,247,110,189,146,93,201,153,88,92,214,90,251, +150,153,231,86,117,234,194,170,102,147,221,205,150,90,210,204,104,132,145, +228,177,7,214,211,0,126,240,95,240,147,49,128,13,248,213,126,240,192,111, +254,17,254,13,6,252,230,7,3,6,12,120,124,209,88,178,173,177,36,118,183, +250,82,100,177,88,172,203,185,230,109,239,189,214,138,8,63,172,204,172, +83,69,182,102,154,125,78,145,162,24,56,172,74,102,229,217,185,115,229,183, +99,199,138,248,226,139,210,202,253,205,169,48,2,124,11,235,47,109,184,197, +194,43,18,49,2,0,102,95,195,144,66,96,223,30,173,107,62,93,216,19,91,63, +181,230,158,92,26,48,16,9,104,214,172,96,64,132,200,8,72,100,204,142,29, +169,154,152,129,153,0,76,66,5,217,27,160,103,101,5,195,12,32,8,90,5,221, +197,59,76,198,4,140,128,136,181,51,239,160,14,80,121,168,28,84,12,193,131, +99,11,132,204,232,139,202,13,66,201,94,23,78,209,150,70,250,13,44,51,126, +11,235,47,105,180,237,142,218,158,29,242,11,0,0,1,0,73,68,65,84,16,45,183, +236,33,33,118,158,2,137,57,6,220,83,184,255,140,46,254,166,215,135,7,169, +233,166,232,136,157,121,207,236,99,8,13,145,51,181,148,82,8,158,152,136, +123,3,37,38,10,85,53,15,234,189,26,123,202,78,13,5,212,144,153,26,46,239, +83,48,10,76,200,132,136,208,48,121,71,117,160,202,65,96,245,44,37,81,29, +24,153,193,49,108,154,170,94,145,254,183,76,173,215,152,168,223,16,251, +22,214,95,210,190,224,190,189,173,204,56,207,1,99,175,17,208,65,53,187, +200,249,227,229,101,222,67,36,231,124,112,30,216,17,11,176,15,132,222,84, +213,128,157,39,71,172,98,96,161,10,190,86,31,42,205,193,48,212,108,206, +80,152,12,216,121,117,18,97,155,3,97,196,130,108,68,168,28,123,135,193, +83,112,230,201,28,161,35,101,4,38,220,132,224,4,175,237,17,113,155,186, +190,106,223,148,84,200,141,195,186,204,185,44,63,182,185,103,151,27,237, +18,12,8,144,16,73,169,40,16,18,185,40,153,76,11,159,188,8,100,150,91,124, +82,0,216,188,190,104,254,148,102,87,79,121,201,0,0,1,0,73,68,65,84,140, +104,95,76,219,191,105,75,160,175,202,230,0,12,27,103,71,57,9,54,231,190, +1,21,47,145,32,101,152,124,36,225,127,58,27,255,228,118,243,195,3,178,97, +1,205,94,187,63,245,26,247,188,190,156,175,219,198,87,85,5,0,3,51,17,17, +209,122,189,110,14,30,100,253,176,194,23,19,186,149,146,147,176,108,88, +43,153,64,125,153,34,4,15,206,161,102,243,222,170,192,57,103,199,217,59, +104,2,4,71,129,209,33,58,114,76,200,150,11,219,159,12,137,17,129,55,169, +95,76,240,186,127,222,242,67,126,69,139,241,175,105,27,5,136,237,196,164, +237,193,127,237,139,134,119,190,3,1,182,29,191,240,111,59,208,141,195,186, +168,79,109,233,7,248,170,127,130,216,12,76,139,58,14,138,65,222,180,11, +144,17,152,25,144,129,97,145,142,0,2,208,141,138,133,25,40,24,193,166,249, +237,235,109,104,37,165,134,116,158,220,139,149,188,219,242,65,211,128,71, +99,11,85,237,61,78,141,17,177,192,218,123,79,68,204,236,156,243,99,157, +86,33,0,215,68,76,152,13,3,65,200,244,106,14,49,0,0,1,0,73,68,65,84,0,142, +208,52,120,112,142,4,36,56,10,142,8,48,4,243,12,193,179,119,228,192,8,173, +44,59,109,43,160,72,155,140,30,252,29,88,183,223,212,222,14,172,183,3,5, +118,173,116,128,69,26,176,244,78,148,54,9,5,208,205,53,142,6,69,224,22, +181,200,100,88,17,158,40,154,176,219,198,210,146,90,251,154,141,46,217, +22,58,138,178,58,1,146,17,131,233,179,52,249,197,185,124,255,160,122,112, +80,179,137,18,132,110,226,124,216,243,107,68,172,235,26,0,134,97,96,102, +34,170,170,202,165,61,28,39,142,171,9,112,118,148,1,3,130,79,134,204,137, +52,56,118,76,66,226,29,134,64,25,169,107,136,153,60,147,35,32,83,4,45,100, +84,130,13,172,169,12,5,32,216,122,151,111,78,36,253,121,187,121,88,195, +118,123,114,165,141,25,192,12,121,131,79,220,213,50,12,8,77,10,111,121, +163,22,81,30,169,217,22,189,219,14,162,87,121,214,175,25,174,203,121,149, +27,46,17,16,131,178,145,157,216,228,209,124,241,108,12,191,83,117,83,91, +2,98,232,90,117,93,96,216,143,46,75,142,0,0,1,0,73,68,65,84,193,154,175, +88,21,15,108,221,177,133,137,145,120,76,6,14,141,89,153,48,17,120,135,142, +49,19,122,7,193,91,70,171,61,51,145,99,36,52,220,210,61,8,141,128,16,182, +82,209,184,237,105,252,134,163,250,109,104,240,237,26,163,0,182,196,55, +53,43,202,247,219,242,92,225,185,111,187,153,161,8,30,130,109,188,120,97, +233,191,118,89,192,78,4,224,107,102,84,52,253,55,56,98,219,168,56,131,184, +233,139,113,252,120,193,167,41,204,234,166,117,232,131,143,190,118,56,22, +88,35,98,137,64,152,25,17,167,114,36,243,25,198,106,162,164,12,25,145,0, +0,205,19,70,68,239,128,201,50,152,99,171,156,37,211,128,76,104,140,128, +168,8,10,168,165,82,195,182,77,69,226,86,149,236,239,129,221,60,172,175, +180,217,154,129,217,102,243,136,42,104,134,170,101,90,188,201,70,72,139, +149,204,202,62,19,138,4,29,169,177,169,232,118,234,43,0,108,71,186,126, +45,39,184,238,18,194,80,180,24,205,28,2,176,131,117,14,191,188,180,159, +159,235,241,253,102,175,70,199,100,76,85,252,222,143,28,0,0,1,0,73,68,65, +84,93,35,98,211,52,187,168,186,32,123,98,251,125,51,193,16,90,113,192,154, +144,17,72,21,3,131,3,112,12,76,144,13,152,53,56,37,51,135,74,136,27,181, +37,84,64,101,68,226,50,241,249,106,195,173,109,133,65,254,54,157,141,191, +235,118,227,176,190,218,64,190,73,137,152,170,42,27,128,26,110,198,65,100, +205,57,139,168,154,100,22,85,17,19,51,181,34,221,166,162,170,214,20,247, +188,147,225,223,48,65,255,86,25,148,183,111,87,2,164,178,83,46,30,211,90, +151,6,242,143,47,134,159,188,24,127,247,238,225,195,218,49,2,50,214,174, +46,222,186,228,64,10,178,17,177,145,189,38,76,204,85,53,34,154,122,114, +6,34,226,42,66,54,116,140,68,192,6,76,16,156,145,129,99,68,68,164,146,109, +42,170,233,175,105,205,88,153,152,180,45,188,124,99,169,214,0,240,54,96, +189,147,125,51,131,43,143,201,212,76,177,168,142,167,36,41,102,17,17,145, +196,89,53,137,38,131,108,152,204,146,152,168,22,169,197,18,175,108,194, +70,0,48,228,175,23,170,223,176,45,233,19,116,76,195,198,0,0,1,0,73,68,65, +84,177,2,25,137,78,215,242,116,30,215,22,208,7,52,241,4,37,228,40,80,102, +102,239,253,38,19,226,106,231,130,177,247,102,4,72,204,102,156,153,61,33, +48,58,135,132,0,12,142,208,49,154,130,227,146,233,0,45,43,254,26,106,95, +73,198,236,202,137,223,194,250,223,205,182,254,88,212,196,72,12,21,80,17, +124,113,185,34,144,115,249,193,148,41,231,121,26,198,97,100,164,214,7,31, +147,158,157,195,24,67,168,150,26,23,231,231,135,183,142,23,171,190,95,172, +167,251,135,203,126,88,175,251,220,180,192,140,6,6,132,174,161,106,106, +174,85,242,32,103,194,45,184,134,17,106,75,164,18,193,143,16,2,94,160,49, +154,7,240,8,172,69,182,5,109,211,149,125,99,38,69,223,218,100,147,164,37, +4,170,0,170,121,238,163,25,52,123,191,124,118,242,236,50,93,28,249,195, +73,205,117,101,121,116,206,1,0,51,183,109,91,14,210,182,237,208,28,183, +127,246,33,230,207,210,254,253,189,161,199,220,157,73,104,235,23,48,10, +59,50,80,48,13,129,16,204,32,187,128,136,27,53,152,47,78,204,0,0,1,0,73, +68,65,84,41,2,120,21,96,24,148,40,4,96,155,131,250,187,134,230,175,152, +111,189,203,153,239,24,11,133,60,41,155,168,67,76,18,228,104,113,212,113, +212,148,58,138,16,151,105,136,131,65,28,198,52,95,72,202,226,67,150,209, +46,231,25,71,237,7,88,15,106,43,24,70,24,70,148,41,33,72,76,128,174,154, +30,88,90,37,240,161,106,197,41,120,45,157,214,162,25,16,128,43,230,160, +194,133,141,188,169,167,149,124,55,124,177,132,210,91,178,118,2,125,92, +155,251,201,227,103,255,228,59,239,231,177,71,27,235,110,127,151,253,32, +34,216,246,219,152,18,49,35,145,2,108,242,63,219,246,195,237,225,202,70, +240,27,221,188,245,101,237,26,131,144,13,152,139,96,16,153,17,168,154,170, +154,138,152,36,75,131,141,107,235,87,218,175,52,69,79,35,47,22,113,185, +202,57,203,24,109,185,146,24,7,0,100,244,171,149,201,28,99,242,67,132,241, +148,98,242,49,226,56,5,83,89,174,192,135,202,238,37,243,81,176,218,59,26, +188,135,106,4,81,100,167,154,21,157,86,193,24,193,60,0,198,55,175,123,0, +0,1,0,73,68,65,84,41,186,173,8,98,201,169,200,175,18,228,189,105,99,163, +80,53,49,241,82,154,191,248,232,228,159,255,254,119,142,124,110,109,196, +201,65,193,43,17,109,211,251,0,0,14,29,122,15,206,73,25,22,3,64,72,68,4, +68,102,134,160,102,4,69,255,250,53,157,211,111,13,224,122,189,181,237,50, +163,166,104,6,42,168,98,34,150,35,228,1,211,10,135,5,244,115,88,45,44,246, +163,70,29,6,28,7,146,236,115,22,235,37,174,226,56,10,1,165,52,14,151,57, +11,100,29,87,152,82,214,148,211,170,117,204,176,94,131,247,16,32,39,48, +65,231,50,100,165,238,136,38,9,124,109,106,74,94,204,25,86,188,169,101, +110,89,106,6,8,134,191,82,36,253,230,13,125,22,163,118,50,228,254,241,234, +236,175,63,91,62,236,234,163,64,57,231,18,91,151,253,226,166,53,18,145, +152,208,57,99,7,155,66,244,6,247,176,171,107,109,14,187,77,11,125,139,235, +43,118,109,176,70,36,2,80,176,130,30,212,12,146,77,50,165,100,105,212,113, +5,195,2,134,57,14,151,52,46,104,236,123,85,47,86,20,0,0,1,0,73,68,65,84, +37,73,89,114,202,113,4,81,70,245,14,36,170,164,228,205,250,97,48,53,82, +27,98,212,44,96,10,235,65,130,71,85,212,212,159,60,139,81,128,194,224,65, +250,158,166,75,136,17,235,9,34,129,171,1,88,144,29,131,145,51,135,198,14, +145,16,129,20,176,52,103,127,21,230,92,215,47,86,147,163,253,229,42,44, +252,254,255,249,139,147,119,167,71,147,119,170,89,149,16,49,231,92,246, +142,37,14,129,178,217,100,6,230,87,50,59,8,80,38,125,33,108,103,80,108, +255,251,54,8,121,221,174,51,19,178,157,212,176,29,63,149,163,164,132,227, +2,226,104,195,82,251,133,13,11,27,151,16,215,148,199,60,130,106,206,253, +186,95,47,200,172,169,252,180,118,53,87,142,90,31,252,217,217,57,2,176, +115,243,249,188,244,120,127,244,217,121,101,214,180,181,154,206,151,39, +144,12,66,221,63,235,157,137,165,49,167,68,245,148,67,224,122,66,136,140, +70,232,204,121,13,141,133,10,56,108,246,75,95,97,162,219,77,64,151,30,5, +8,199,106,246,255,124,250,252,238,132,13,14,254,195,23,230,176,32,0,0,1, +0,73,68,65,84,38,21,111,93,28,54,0,20,175,156,85,28,226,134,158,7,229,228, +223,60,100,41,211,26,194,102,46,248,183,182,181,235,141,173,97,91,125,17, +147,164,57,106,78,56,92,66,28,117,189,146,126,33,195,74,227,0,18,81,179, +75,67,240,174,169,177,51,14,14,15,246,102,77,29,76,165,171,154,166,109, +158,63,107,156,115,117,85,157,157,157,150,204,215,241,116,138,104,7,251, +123,49,199,199,159,126,22,129,192,215,207,78,206,42,114,67,92,14,115,76, +171,75,9,193,117,51,82,177,60,146,107,213,87,96,201,112,98,104,101,114, +148,126,117,223,125,130,192,85,173,195,130,29,136,134,19,155,254,171,95, +46,129,235,63,122,48,152,217,110,203,184,139,179,179,8,155,21,225,165,45, +71,169,80,10,224,213,172,140,87,121,232,47,158,104,255,247,214,174,15,214, +175,86,181,208,56,84,69,84,50,196,181,197,81,227,90,99,47,105,84,73,166, +106,96,19,206,179,174,174,67,3,214,118,117,184,117,184,223,181,181,74,182, +36,211,201,100,130,99,8,190,107,187,211,22,153,217,57,126,112,124,247,78, +157,179,0,0,1,0,73,68,65,84,55,167,120,235,232,112,136,195,173,206,169, +11,202,225,195,191,137,171,149,206,5,98,236,85,7,29,41,73,34,112,38,234, +155,67,208,108,76,230,28,176,3,32,5,34,251,202,18,182,49,67,91,215,105, +253,178,170,170,245,136,48,185,245,232,197,229,157,83,25,199,17,0,174,122, +107,40,76,24,209,205,24,185,109,126,11,97,183,53,176,157,167,222,18,190, +190,77,134,188,102,215,6,107,73,81,212,164,84,189,53,99,238,121,156,219, +184,150,254,66,198,81,199,104,121,148,97,89,217,248,157,187,7,239,61,184, +251,241,163,143,186,174,107,219,246,234,110,73,145,146,165,249,114,217, +78,166,136,56,164,28,218,137,170,26,145,119,131,119,148,242,218,49,126, +255,187,239,148,72,244,189,195,122,185,30,94,156,156,126,248,179,71,31, +61,59,141,60,213,116,4,121,104,242,114,181,122,94,77,143,72,142,72,19,42, +68,101,101,55,217,219,63,207,35,1,17,48,91,225,0,137,65,50,20,128,238,186, +150,226,11,205,233,121,38,198,238,88,37,123,234,33,46,121,186,255,151,47, +199,255,229,241,78,135,212,200,0,0,1,0,73,68,65,84,226,223,251,126,59,147, +181,172,70,154,188,63,178,143,195,229,254,148,108,236,23,119,127,64,143, +126,60,185,92,128,155,141,112,70,178,10,116,55,218,103,91,130,135,32,26, +2,33,48,2,137,125,241,20,132,175,37,191,224,215,176,95,205,183,198,205, +172,25,220,176,138,182,244,35,128,235,220,50,110,59,47,54,172,59,149,242, +35,146,114,138,146,147,35,108,166,221,196,119,135,7,123,147,201,228,187, +223,253,110,169,168,165,148,114,206,219,234,186,94,205,6,64,209,219,221, +82,219,84,117,23,125,22,115,206,29,31,223,154,76,167,221,100,246,222,162, +95,139,251,244,98,120,244,217,217,242,244,5,28,220,22,66,4,142,201,60,250, +110,239,88,208,45,22,115,108,42,216,16,71,17,55,179,38,222,82,202,239,202, +52,162,82,125,36,48,253,241,211,203,239,28,31,30,55,53,105,30,151,23,220, +206,28,49,36,5,112,136,14,145,182,172,142,146,238,248,124,12,253,13,231, +226,125,57,187,54,88,19,161,106,25,158,167,160,2,146,77,162,229,145,76, +81,18,91,110,235,176,223,77,246,187,218,200,51,23,0,0,1,0,73,68,65,84,112, +48,107,171,170,50,209,130,212,146,225,218,145,215,10,166,85,117,151,22, +40,104,246,222,155,89,41,200,169,106,161,4,137,136,115,110,127,230,219, +186,122,8,148,209,63,122,122,130,113,249,36,205,23,235,19,61,51,202,153, +218,156,144,114,86,55,217,247,85,107,170,136,91,137,197,237,196,30,176, +95,53,201,232,218,172,16,111,75,218,2,11,97,213,216,204,254,175,143,87, +247,142,251,135,251,221,61,159,105,113,230,24,185,109,87,73,43,172,144, +2,146,7,216,12,181,45,2,218,88,50,213,87,120,140,223,38,173,63,111,215, +153,9,65,128,45,166,147,73,180,52,90,26,9,196,147,133,64,7,147,234,248, +96,54,109,171,202,97,202,57,165,164,170,170,42,34,101,83,72,68,197,97,35, +110,130,200,18,105,236,156,180,170,122,191,25,44,84,60,189,170,102,201, +8,200,32,142,180,170,43,190,51,173,244,225,15,31,28,61,158,167,159,60,122, +178,190,56,115,239,124,64,68,121,24,83,142,213,237,123,148,21,200,16,208, +152,54,195,94,141,223,74,26,193,54,45,189,88,152,125,14,162,69,106,215, +0,0,1,0,73,68,65,84,76,204,224,167,23,240,231,159,44,191,127,107,58,187, +67,129,71,140,75,171,235,8,190,2,34,172,145,156,1,148,214,32,3,84,221,176, +113,175,214,96,202,220,217,111,19,33,87,237,250,188,53,128,110,74,30,2, +154,33,71,200,163,229,1,115,174,24,219,202,31,77,155,195,105,83,5,167,57, +197,152,170,170,42,240,221,197,21,197,115,87,85,117,213,103,151,199,59, +88,135,16,0,96,87,191,72,41,213,77,75,160,227,26,52,71,111,105,191,102, +127,255,200,240,248,183,177,145,249,217,95,61,122,202,151,79,201,57,169, +197,198,106,117,162,213,222,29,227,108,30,0,169,248,104,44,163,136,111, +88,225,153,10,161,174,192,146,28,178,2,168,9,68,222,255,240,89,255,231, +31,93,188,211,29,236,31,4,200,41,165,209,234,61,147,128,88,35,134,13,96, +105,67,99,162,157,174,199,21,182,233,183,129,200,27,118,141,85,70,3,19, +83,5,21,208,12,154,64,18,74,2,75,93,237,15,167,237,225,164,238,2,19,65, +34,18,102,48,187,90,49,46,17,69,161,104,138,200,134,23,97,86,89,13,234, +173,0,0,1,0,73,68,65,84,194,238,2,110,51,43,61,127,5,211,165,138,129,46, +4,70,71,160,201,59,231,40,139,0,16,251,9,210,31,254,232,253,187,183,111, +61,190,28,127,118,242,177,117,67,211,54,121,204,184,174,193,87,86,6,194, +58,67,96,52,67,53,117,55,235,238,202,8,216,50,63,148,136,16,138,183,54, +104,186,231,171,249,255,253,241,197,15,142,234,7,179,169,87,177,97,112, +205,190,41,3,6,68,183,33,246,16,150,68,78,73,96,111,136,175,59,157,18,195, +111,189,245,85,187,62,88,111,134,15,43,168,162,10,170,160,101,212,220,4, +127,48,237,110,29,76,167,77,96,20,21,40,189,122,50,142,187,77,161,115,174, +132,206,222,251,170,170,68,4,182,155,197,156,51,108,163,17,0,40,93,36,227, +56,238,2,149,4,236,202,60,113,231,171,170,162,148,35,244,98,232,198,254, +123,247,143,223,127,239,253,159,62,61,189,248,215,127,249,217,234,132,251, +35,170,103,218,79,64,18,32,20,225,12,68,71,6,168,160,111,163,255,109,195, +131,6,36,32,3,98,83,169,28,165,232,127,254,114,245,23,143,211,229,194,221, +0,0,1,0,73,68,65,84,47,254,193,253,110,234,209,198,129,115,82,101,0,111, +192,86,34,23,196,162,91,179,195,52,192,235,109,116,223,218,21,187,70,111, +189,19,76,40,164,34,69,83,48,237,186,102,54,157,236,77,39,21,105,28,7,201, +130,174,114,206,181,211,0,0,34,82,66,231,178,23,4,128,16,66,129,53,51,3, +192,142,180,89,220,115,161,219,15,195,176,251,93,110,166,154,211,122,1, +146,163,11,181,177,121,37,84,184,213,85,79,159,191,112,100,239,63,188,251, +163,211,121,126,114,182,30,23,171,190,111,111,29,24,2,248,0,154,80,115, +233,139,39,181,155,166,158,227,38,103,177,233,116,220,245,240,178,102,117, +225,108,190,120,244,98,126,178,60,126,119,47,144,137,164,104,80,155,209, +86,125,9,138,210,222,54,185,133,159,131,242,183,208,126,205,174,47,193, +199,6,170,106,34,162,38,128,202,206,2,98,237,48,206,38,173,10,40,134,170, +10,10,125,213,212,228,56,246,99,8,193,57,87,246,136,37,174,40,207,148,172, +200,206,31,151,40,101,189,94,3,192,213,230,168,130,114,51,3,168,106,135, +205,236,86,237,0,0,1,0,73,68,65,84,57,231,16,194,56,142,166,89,68,150,227, +185,235,66,91,133,137,226,159,188,123,235,253,91,123,127,117,161,127,246, +248,68,198,207,98,172,17,164,174,38,38,24,83,118,206,55,237,36,98,95,218, +19,204,172,80,178,9,153,144,242,53,177,72,18,210,54,175,42,102,34,0,224, +60,56,191,94,174,64,115,123,176,247,211,231,159,252,98,254,189,135,183, +154,61,24,14,19,44,195,47,24,30,2,63,8,225,241,4,90,136,67,148,165,15,15, +147,156,165,97,8,32,1,45,139,33,3,58,234,99,70,49,239,177,196,105,195,48, +138,64,55,107,135,245,58,1,120,135,57,27,24,212,222,73,150,156,173,174, +252,40,105,219,72,188,157,186,1,8,0,250,149,177,102,190,216,126,53,223, +186,244,182,225,166,73,2,117,163,28,3,0,55,228,162,182,171,132,128,216, +54,77,8,129,213,118,156,75,53,51,145,16,66,201,102,148,48,186,72,100,148, +56,228,243,176,222,144,215,0,138,183,46,191,136,155,166,175,205,190,179, +192,186,236,68,85,21,192,93,92,246,154,200,98,222,159,117,254,168,93,84, +227,9,90,123,0,0,1,0,73,68,65,84,171,31,63,121,126,49,159,135,253,154,136, +250,213,194,50,87,237,140,153,22,171,75,232,252,231,165,249,223,66,45,163, +106,218,81,214,198,188,212,250,95,255,248,163,99,127,239,159,253,240,222, +24,151,80,49,177,51,226,210,175,85,40,45,104,160,64,138,148,84,84,77,181, +36,42,81,145,41,103,5,82,83,37,210,140,42,6,137,44,17,146,34,57,82,49,53, +100,70,69,212,12,153,182,132,120,68,176,77,19,100,169,119,124,35,252,254, +53,243,173,119,61,78,176,137,5,169,110,26,239,189,197,140,0,196,228,156, +115,204,134,86,249,170,248,102,0,216,33,181,100,166,11,172,95,29,23,177, +184,115,0,40,168,77,41,241,86,0,169,188,50,132,80,96,29,99,44,119,0,149, +0,216,142,125,30,23,11,7,50,155,117,23,2,239,238,251,225,204,96,232,51, +206,173,102,224,90,181,6,82,197,76,234,182,19,176,192,112,219,236,126,243, +55,247,134,67,116,106,190,234,171,163,127,245,55,79,15,42,251,253,15,222, +241,253,121,213,77,60,56,4,18,85,177,140,172,37,25,228,24,209,121,154,72, +251,169,0,0,1,0,73,68,65,84,73,34,138,72,96,196,0,228,28,147,50,1,154,41, +129,103,52,131,12,224,25,3,152,120,172,8,179,130,50,120,34,69,4,134,77, +123,66,33,127,81,185,108,190,65,251,206,107,172,50,110,229,221,74,253,172, +16,222,185,248,93,82,48,64,114,206,85,80,249,42,24,130,35,231,189,15,33, +92,237,225,131,109,5,241,243,176,46,160,47,176,46,177,120,201,9,22,183, +93,178,34,229,58,41,62,126,24,116,74,245,116,202,67,21,150,103,207,209, +134,251,83,255,7,239,223,165,26,63,57,153,159,94,138,15,13,82,142,253,5, +132,122,182,183,215,39,43,55,227,93,11,235,219,41,59,247,253,88,87,77,82, +210,201,157,147,197,229,159,63,185,252,233,243,179,127,112,144,96,52,175, +132,128,150,115,182,232,73,208,204,68,89,122,6,139,42,89,212,57,7,6,146, +34,179,51,196,108,42,42,82,218,37,76,1,76,192,82,78,206,179,154,168,101, +213,34,142,154,69,181,8,165,110,168,218,91,69,33,132,111,72,67,250,245, +193,186,12,254,131,34,36,68,134,108,196,70,236,216,49,51,80,229,227,153, +153,0,0,1,0,73,68,65,84,241,174,204,78,189,247,134,224,144,75,2,164,128, +56,132,240,134,183,126,35,182,46,62,184,92,6,0,176,171,50,150,203,0,0,68, +100,23,201,0,192,172,171,78,231,61,82,152,182,117,160,56,142,195,237,186, +250,221,247,238,135,198,246,43,250,217,233,120,145,22,99,95,131,111,209, +145,200,136,234,183,90,106,8,27,9,19,0,176,155,22,215,137,9,14,38,77,127, +185,128,186,133,131,7,191,156,255,242,207,126,246,233,15,255,253,239,242, +72,173,121,135,78,77,77,165,220,2,85,4,134,158,189,151,81,82,6,70,82,201, +113,212,16,210,128,148,146,164,4,137,135,156,114,140,102,195,48,166,40, +17,192,101,83,201,217,140,34,33,100,53,52,9,190,218,244,126,152,2,22,5, +184,27,254,168,111,209,174,211,91,111,93,246,198,91,27,21,229,123,100,102, +242,206,17,17,17,106,97,94,162,99,231,189,47,64,116,206,237,96,93,30,148, +96,186,0,116,151,162,46,176,46,177,120,129,245,110,187,201,204,57,103,239, +125,217,74,18,81,87,209,98,144,40,84,181,147,217,225,173,52,172,22,244, +232,213,0,0,1,0,73,68,65,84,66,134,62,193,143,238,202,189,195,119,247,63, +93,252,233,163,211,229,229,243,112,251,33,49,174,206,206,124,119,108,96, +37,134,42,159,231,237,124,203,86,53,46,16,196,5,56,130,118,111,217,79,254, +223,71,39,255,209,31,126,64,6,106,12,88,248,5,49,136,72,78,177,31,210,128, +1,194,101,159,215,99,154,96,157,83,26,251,126,2,213,194,100,28,37,70,24, +25,115,198,113,180,145,33,69,178,44,26,28,24,231,60,42,7,231,48,91,52,83, +84,46,209,22,34,18,20,6,108,185,150,191,210,118,207,107,178,235,140,173, +113,35,163,120,101,111,77,148,83,54,51,34,166,45,157,152,153,217,179,39, +95,130,144,141,126,192,54,182,254,85,91,198,2,226,146,222,134,43,222,186, +60,46,224,222,69,50,204,92,163,116,109,139,202,4,234,155,174,170,2,69,169, +150,121,214,94,220,187,115,12,117,243,228,114,117,254,124,180,52,80,105, +137,55,3,43,93,97,155,221,246,102,238,208,77,163,187,110,98,26,2,69,128, +49,162,131,102,255,227,147,243,31,127,114,57,185,59,75,6,36,54,148,99,73, +109,0,0,1,0,73,68,65,84,198,17,99,70,72,99,92,172,47,232,101,207,97,112, +207,79,225,114,13,123,251,32,25,211,0,135,41,140,154,250,117,26,71,216, +139,40,66,195,160,211,72,41,17,37,89,103,143,168,57,107,215,184,224,57, +103,48,21,109,18,66,137,19,55,234,215,69,254,253,198,201,49,111,197,174, +189,141,0,183,180,135,205,248,134,97,28,114,78,30,137,16,9,169,132,209, +190,242,100,84,156,235,14,214,37,86,198,43,182,57,46,34,108,211,216,37, +198,160,43,86,0,189,115,225,37,140,97,102,200,105,111,111,175,243,221,122, +181,88,246,243,138,61,85,220,45,82,53,127,110,28,111,77,171,135,199,7,143, +23,231,47,215,43,245,147,182,157,38,123,37,13,179,75,50,191,141,124,48, +185,126,56,235,42,132,0,49,230,186,157,94,188,176,159,124,244,252,247,14, +154,136,153,82,26,199,81,123,51,77,125,111,139,139,203,159,95,130,175,221, +39,207,211,217,2,246,23,43,80,201,17,238,164,196,57,175,214,48,142,176, +24,178,170,12,3,76,251,148,82,134,17,150,67,36,180,156,83,215,96,85,89, +43,128,122,34,0,0,1,0,73,68,65,84,206,89,37,187,35,32,2,199,224,24,188, +3,231,208,49,34,66,253,117,147,52,252,82,118,125,124,107,85,41,37,105,34, +36,71,236,145,60,113,190,148,44,160,251,30,52,245,174,57,242,126,143,44, +78,152,18,250,130,203,93,228,176,235,125,130,45,148,175,54,99,239,8,125, +184,149,205,5,128,166,105,118,14,123,23,154,79,38,19,51,139,145,2,166,154, +82,85,115,56,56,20,17,140,241,248,112,34,225,214,121,175,199,173,255,227, +119,186,73,90,255,213,139,225,175,47,94,172,173,166,246,52,129,131,106, +90,87,179,42,185,60,72,38,166,166,178,180,186,174,37,250,98,75,139,209, +79,115,216,179,24,49,175,37,15,50,123,255,127,248,5,77,235,167,255,201, +31,86,123,103,252,217,167,125,85,233,39,231,206,252,253,71,207,158,254, +100,65,206,225,203,23,212,247,112,144,143,134,184,94,174,151,135,107,92, +47,67,28,21,76,222,209,163,216,47,87,171,245,221,227,118,185,156,15,3,28, +231,64,152,64,241,104,175,162,133,141,189,5,223,172,105,200,217,28,193, +119,223,57,148,249,165,230,42,31,138,0,0,1,0,73,68,65,84,173,229,7,223, +169,32,14,61,78,0,19,97,100,50,6,65,67,214,64,16,6,91,18,123,102,64,38, +69,177,194,152,197,18,146,111,25,208,91,119,246,149,55,53,92,119,222,122, +131,192,162,173,72,128,152,21,178,2,16,51,111,179,234,68,184,13,74,118, +205,78,59,131,45,166,175,250,108,252,213,203,180,211,214,216,118,138,216, +46,74,217,253,226,46,207,93,85,21,241,241,8,125,69,245,253,67,93,246,249, +69,94,253,60,194,8,10,25,0,13,146,140,16,17,176,140,195,18,141,55,238,188, +118,57,121,66,32,66,164,172,41,38,125,58,182,31,126,214,67,172,123,154, +174,87,231,207,230,235,149,210,211,75,120,121,169,38,139,203,75,72,9,198, +124,30,115,26,19,12,178,150,12,41,66,140,48,200,139,56,128,36,200,176,92, +173,204,49,216,217,32,57,153,192,114,189,32,128,245,18,8,251,65,32,37,96, +132,136,189,87,13,10,179,85,32,53,28,134,170,198,42,16,161,56,132,218,1, +177,129,102,64,222,80,121,55,137,79,43,93,148,95,207,156,224,53,118,158, +111,148,88,54,213,95,28,141,0,0,1,0,73,68,65,84,187,70,98,32,54,116,163, +114,204,128,200,62,56,34,48,52,118,140,204,142,139,107,222,4,33,229,203, +125,3,214,240,183,2,122,251,190,175,94,182,67,54,108,189,123,185,114,74, +153,221,123,159,115,6,109,155,116,206,128,213,190,130,205,78,205,127,184, +90,205,83,244,90,39,112,106,104,89,132,196,177,35,148,49,15,1,253,117,45, +209,23,154,119,174,176,149,16,137,156,71,203,146,114,159,210,159,62,90, +236,201,188,59,236,46,23,126,56,201,151,17,78,227,240,228,20,6,133,229, +18,114,6,34,190,88,171,1,0,195,197,170,12,138,196,68,118,182,130,56,2,19, +184,85,88,44,250,166,118,107,197,20,1,1,6,3,71,52,246,10,6,249,37,228,12, +142,160,7,171,137,91,202,234,141,13,102,156,15,14,235,9,56,208,222,35,112, +167,68,162,146,48,212,64,108,192,96,168,182,101,36,126,45,49,13,215,234, +173,109,83,138,221,100,66,216,200,1,187,33,243,58,153,2,59,199,133,179, +79,206,237,148,156,11,236,118,152,254,124,72,253,107,217,213,186,99,137, +73,138,147,46,116,144,16,185,69,0,0,1,0,73,68,65,84,214,66,124,93,246,86, +55,41,104,228,184,56,238,240,251,119,167,239,156,230,79,62,91,112,118,88, +55,137,131,0,131,149,237,129,128,70,184,97,88,227,166,47,8,17,145,157,71, +19,149,164,57,125,116,62,254,114,134,151,199,247,95,198,189,229,201,83, +117,112,17,249,116,109,2,238,229,197,24,2,213,117,183,28,123,118,174,10, +126,209,47,57,132,174,155,248,154,114,86,116,198,174,90,1,47,228,50,70, +135,73,114,86,176,188,204,196,196,166,132,128,203,103,201,57,168,2,69,131, +150,161,117,16,115,172,29,236,121,72,206,69,96,77,125,32,64,54,173,37,167, +88,213,19,66,134,242,83,180,178,144,8,233,235,153,55,185,62,190,53,162, +2,17,26,22,142,60,57,32,103,228,5,234,213,104,73,128,107,78,102,72,200, +222,27,190,22,99,192,21,16,127,9,52,191,97,111,120,107,216,18,89,205,44, +165,20,197,194,30,113,92,141,151,47,91,214,239,28,77,191,127,180,126,244, +242,114,57,212,22,2,85,141,185,10,12,85,213,200,152,233,166,55,141,168, +6,101,228,2,17,50,33,209,184,228,175,0,0,1,0,73,68,65,84,4,144,164,34,40, +250,241,233,252,199,47,81,242,173,152,112,241,210,94,166,177,167,201,193, +237,239,46,226,139,110,50,235,38,51,184,184,244,85,152,76,59,60,63,109, +187,233,100,50,245,161,90,173,122,66,223,180,147,97,136,205,193,16,152, +115,30,212,98,78,125,223,175,162,168,99,143,196,139,139,71,33,248,172,188, +88,246,21,217,126,11,253,122,60,156,213,231,2,35,225,98,68,16,232,60,176, +39,67,54,97,167,108,101,190,18,50,34,3,50,253,125,128,245,166,231,31,119, +83,165,184,32,59,81,181,26,117,72,162,165,185,138,144,189,83,20,124,221, +96,27,76,127,233,19,216,81,180,119,153,193,205,137,149,148,226,214,109, +239,49,33,52,26,171,249,197,75,136,195,157,186,254,225,81,56,185,237,254, +252,83,89,166,85,26,2,54,149,81,16,17,64,244,222,235,77,79,92,18,217,242, +14,202,172,23,6,231,81,181,34,248,228,60,253,31,31,197,31,76,126,239,254, +7,97,254,147,191,168,181,61,186,247,65,59,187,239,186,23,77,219,181,147, +174,91,44,66,8,237,164,235,46,172,129,144,31,0,0,1,0,73,68,65,84,47,155, +80,215,77,67,236,220,197,188,174,155,110,178,183,90,175,157,243,78,109, +24,215,204,38,22,47,47,46,84,181,105,38,76,238,252,227,202,57,206,18,95, +60,251,132,109,136,102,167,151,54,31,71,143,176,178,180,183,148,10,225, +160,5,10,44,224,60,147,139,153,25,2,50,35,150,25,234,101,106,213,215,51, +14,185,214,216,122,195,184,124,21,91,3,177,81,53,196,245,24,69,213,172, +36,255,153,69,229,141,36,221,27,206,27,182,78,247,202,241,127,141,32,251, +234,139,119,105,111,68,244,222,55,13,244,9,212,77,186,163,123,50,44,26, +192,31,28,84,252,253,91,47,180,249,120,217,247,105,176,74,201,177,137,89, +22,246,111,131,132,205,128,70,100,101,80,142,1,32,129,243,193,59,165,135, +191,76,231,183,111,253,225,31,125,247,143,15,31,254,35,197,64,147,227,39, +31,63,159,230,218,121,231,234,208,96,67,204,88,213,213,164,10,228,216,121, +231,131,175,176,106,59,223,116,58,228,122,178,231,20,19,144,15,212,120, +84,174,17,121,50,153,129,81,93,181,196,152,242,56,134,189,47,18,149,0,0, +1,0,73,68,65,84,67,182,161,162,241,197,167,191,24,86,48,243,218,159,219, +249,42,118,30,134,17,144,53,139,118,53,7,31,189,55,64,23,10,61,10,54,45, +213,95,207,98,251,181,126,109,184,251,235,85,185,209,144,146,88,202,162, +102,134,128,132,68,36,10,87,1,125,53,170,254,188,74,222,46,168,248,242, +231,181,61,56,51,59,142,169,207,70,109,61,59,132,224,98,191,188,51,9,211, +182,254,179,245,244,226,211,231,39,243,210,88,233,115,210,44,6,249,198, +233,63,132,104,136,70,36,128,170,106,186,233,225,61,63,191,156,28,29,61, +62,31,247,46,229,63,152,62,188,245,195,22,213,62,126,49,159,204,84,192, +27,40,123,66,95,3,18,59,103,84,239,185,218,135,208,118,109,221,205,38,211, +41,57,30,179,204,246,247,91,87,163,35,231,192,5,70,246,128,220,182,147, +24,37,65,93,213,97,226,41,87,211,174,70,214,213,34,105,26,150,73,22,57, +198,49,166,228,193,1,84,46,51,98,236,252,126,39,6,232,156,48,43,161,1,1, +168,34,226,55,28,214,163,70,81,200,72,74,8,206,99,174,164,44,122,35,0,0, +1,0,73,68,65,84,208,41,42,81,90,156,11,62,73,225,8,248,54,46,166,57,85, +18,192,117,37,84,40,93,186,59,150,41,124,17,124,191,52,160,119,124,169, +93,143,66,85,85,195,96,147,202,231,156,200,235,168,30,172,221,223,207,188, +88,252,103,31,156,252,167,31,126,10,237,239,85,30,229,252,19,119,248,189, +184,210,35,188,60,145,9,188,186,96,95,93,184,215,133,246,104,136,0,164, +194,133,42,202,172,133,214,50,193,241,226,151,123,141,255,233,120,248,223, +255,127,139,127,241,219,205,33,175,92,189,63,185,149,144,99,219,182,204, +124,126,126,222,52,77,211,52,47,94,188,232,186,166,109,219,182,109,125, +77,77,211,116,93,215,86,142,136,154,166,81,27,219,182,109,154,230,249,243, +231,0,112,120,120,40,34,103,103,103,85,85,17,145,172,247,153,185,174,239, +127,240,123,135,57,103,93,189,248,232,209,47,46,86,243,167,23,39,23,166, +39,113,30,235,170,205,169,154,116,93,166,153,234,68,86,179,182,106,155, +6,145,83,22,213,145,200,17,32,2,131,41,170,18,2,33,69,51,42,229,51,196, +226,84,134,64,94,0,0,1,0,73,68,65,84,216,137,0,233,26,59,70,223,150,78, +200,107,93,27,219,180,124,17,15,232,99,94,143,25,38,65,17,199,24,181,106, +174,82,197,222,166,142,105,193,122,73,146,120,239,69,36,132,16,66,0,179, +119,143,15,159,142,102,105,68,230,44,25,28,197,95,193,184,190,198,144,114, +119,28,123,227,201,192,222,218,4,176,90,141,47,107,189,136,254,168,13,183, +166,174,158,222,170,170,170,235,58,239,253,222,222,94,129,242,108,54,243, +222,183,109,91,215,245,114,185,172,170,170,192,157,136,38,147,73,249,167, +170,170,74,223,254,193,193,65,97,215,20,58,100,241,26,165,41,41,231,28, +14,219,81,44,143,235,97,190,31,244,226,252,124,249,232,211,85,32,155,133, +48,109,157,238,7,71,62,176,7,43,92,98,175,144,1,105,27,62,126,225,167,249, +10,236,26,97,77,187,15,102,128,134,100,68,64,196,206,171,132,121,159,46, +214,233,59,7,157,145,140,99,116,65,191,42,6,228,206,115,171,110,54,241, +57,231,156,115,5,252,251,239,250,199,159,232,147,179,222,185,89,150,72, +30,251,183,32,110,182,158,220,94,1,0,0,1,0,73,68,65,84,85,70,64,123,165, +126,106,8,142,140,92,51,42,130,172,94,14,240,120,73,119,107,190,183,23, +128,154,182,109,39,147,73,85,85,227,56,22,101,172,131,131,131,170,170,170, +170,10,33,44,151,203,114,161,94,94,94,50,115,193,119,249,167,182,109,205, +108,54,155,153,89,219,182,37,239,217,52,77,225,35,20,186,88,221,132,4,158, +76,226,250,114,184,252,236,163,85,127,218,47,216,250,79,94,194,180,81,51, +10,190,38,228,49,106,83,211,116,210,34,174,16,118,233,145,18,119,219,87, +168,183,92,236,26,183,140,69,210,115,167,131,129,69,18,12,136,205,133,197, +16,79,215,121,132,170,97,17,209,128,87,199,127,109,106,40,191,121,106,239, +223,241,60,161,4,217,219,50,100,85,85,57,103,201,246,143,190,51,249,171, +243,211,79,159,173,160,62,84,137,85,237,199,204,238,138,30,7,220,128,23, +218,221,56,237,141,39,37,70,115,224,106,104,121,77,227,95,159,14,119,92, +250,103,199,179,104,161,105,154,2,107,85,45,110,184,170,170,182,109,11, +117,172,56,242,242,184,16,19,10,13,157,104,35,3,220,0,0,1,0,73,68,65,84, +153,11,233,160,140,242,40,206,187,108,163,203,155,18,145,136,168,243,23, +235,232,153,9,36,46,239,175,6,131,113,142,58,158,12,63,93,230,68,65,154, +137,33,171,135,164,200,161,17,231,202,212,9,218,6,3,96,104,96,95,161,136, +39,192,181,234,132,108,139,227,6,134,106,200,64,12,204,72,30,152,122,29, +206,123,189,24,116,82,121,118,250,70,69,250,237,95,220,229,230,123,181, +179,38,143,246,254,62,253,214,17,254,233,207,115,70,15,57,121,226,17,3, +109,198,161,110,78,113,155,59,188,190,48,164,92,204,87,87,0,17,0,42,246, +203,140,4,142,154,42,137,253,197,179,197,29,78,127,242,15,187,9,85,206, +185,226,107,203,53,89,136,98,37,80,46,196,221,130,99,17,41,216,45,179,76, +17,177,105,26,216,142,160,46,127,94,77,67,109,90,253,49,172,215,145,152, +28,147,229,59,253,32,54,174,45,199,231,63,127,17,243,194,175,82,55,239, +137,169,243,226,4,234,188,158,56,111,72,155,121,154,176,221,244,223,176, +232,202,191,213,174,213,91,3,64,225,240,2,26,161,109,66,50,167,92,0,0,1, +0,73,68,65,84,4,28,217,152,213,183,23,99,255,217,249,234,176,157,237,183, +149,228,4,175,231,206,118,200,126,59,62,219,174,168,148,20,199,166,149, +220,202,235,31,221,173,102,181,59,37,246,144,88,18,144,7,45,233,44,124, +13,122,215,136,234,87,178,8,69,26,103,179,29,245,161,129,156,65,83,37,171, +36,240,120,205,63,190,224,211,228,239,54,84,215,117,65,243,174,107,174, +174,235,221,172,176,18,129,148,36,125,193,113,161,70,238,52,177,118,215, +115,89,129,157,242,27,150,70,105,87,231,20,21,204,64,77,116,88,247,26,99, +234,251,249,252,7,121,125,50,234,201,89,223,7,31,161,131,70,108,200,82, +103,7,96,72,198,84,194,39,43,119,226,111,136,183,198,13,75,0,96,211,162, +75,64,4,70,128,132,204,84,117,171,117,255,233,203,139,119,15,235,195,105, +51,244,125,91,215,87,131,144,183,108,87,211,228,197,219,73,11,205,226,228, +7,247,246,246,167,205,153,56,135,64,41,146,159,32,234,166,150,254,202,85, +95,247,169,152,237,102,130,26,66,161,197,36,5,240,141,139,49,164,57,184, +122,216,101,105,0,0,1,0,73,68,65,84,105,118,7,143,214,167,127,253,116,126, +240,160,171,235,186,192,180,124,4,219,202,99,151,227,237,210,74,59,169, +183,157,120,208,78,193,16,183,44,72,34,170,235,186,92,30,69,82,203,163, +143,119,143,201,243,144,163,228,172,105,128,44,253,114,61,230,127,154,215, +47,242,229,47,101,253,209,124,117,86,19,76,219,16,147,23,167,136,70,2,68, +155,41,99,6,240,5,18,243,111,215,174,183,141,160,152,65,1,248,174,52,131, +76,190,26,5,206,231,203,126,140,128,56,142,195,245,189,239,151,180,93,225, +102,67,79,169,145,23,227,157,253,166,107,43,92,146,67,192,156,201,115,217, +0,191,209,144,126,157,167,241,186,136,205,142,180,190,234,35,212,77,112, +88,217,200,225,160,231,253,211,113,254,211,39,167,127,116,39,20,76,239, +208,92,220,109,241,187,175,157,229,182,183,8,0,10,19,125,199,89,223,93, +15,176,245,217,187,187,22,197,60,107,235,102,218,13,121,204,146,37,14,100, +184,94,174,147,113,94,191,88,62,247,243,79,87,227,106,61,140,57,165,144, +146,151,42,146,110,221,147,149,171,230,251,148,0,0,1,0,73,68,65,84,30,231, +175,94,59,141,1,241,191,254,151,255,146,136,83,86,64,18,53,81,3,192,108, +168,101,238,109,233,4,50,80,51,53,19,248,226,231,19,128,154,170,9,152,98, +25,252,0,12,224,70,170,47,206,207,246,38,205,40,26,185,190,117,231,238, +20,215,239,84,195,0,12,166,196,133,161,202,8,188,41,81,222,240,205,203, +118,51,135,136,118,80,96,230,4,28,76,169,95,123,230,127,243,233,252,37, +221,134,253,219,213,226,83,101,103,166,0,186,33,217,97,9,59,93,212,181, +130,24,8,130,18,152,195,141,112,239,160,8,232,0,89,209,25,57,224,96,228, +5,156,198,184,217,81,169,18,160,103,71,0,154,243,200,145,130,67,83,18,109, +136,41,39,137,107,135,146,73,173,63,71,135,43,245,41,14,173,45,82,191,250, +203,83,154,175,47,126,248,195,247,14,105,238,198,243,233,222,193,42,113, +26,115,219,120,179,87,157,22,229,99,238,246,130,155,111,122,235,206,223, +40,17,148,32,27,0,66,8,68,20,85,66,211,32,177,99,143,192,77,211,57,31,154, +174,59,205,167,7,183,238,86,11,42,153,248,0,0,1,0,73,68,65,84,213,209,217, +233,170,107,171,28,47,235,0,147,174,81,27,200,121,102,6,83,38,116,149,71, +231,50,24,83,85,148,59,17,29,178,39,246,128,12,128,64,190,120,58,32,6,114, +27,238,20,18,162,223,57,65,164,205,147,0,104,232,118,165,107,68,66,220, +238,77,203,209,182,207,111,37,15,54,31,246,230,103,158,3,76,166,211,126, +232,137,57,14,250,228,233,243,239,181,179,165,41,151,78,128,43,121,110, +250,138,250,50,94,145,82,136,67,8,123,157,219,239,224,201,34,91,78,72,76, +132,155,190,25,51,83,221,233,238,18,109,64,99,134,6,40,136,90,88,211,50, +160,82,233,157,218,141,76,36,181,82,86,69,176,82,155,195,141,90,67,241, +13,98,57,91,202,186,153,185,147,148,0,37,66,26,16,61,196,53,228,104,100, +58,174,84,248,231,143,94,60,121,254,193,221,187,1,128,215,253,136,206,213, +77,13,91,162,249,111,238,21,118,241,247,46,235,87,178,251,223,189,123,15, +213,175,49,172,222,255,33,173,221,229,227,207,146,204,37,143,202,88,246, +41,72,104,80,86,232,171,103,138,76,12,11,13,0,0,1,0,73,68,65,84,188,133, +225,208,208,182,221,217,203,165,15,97,236,233,241,243,211,203,135,179,89, +91,79,180,140,49,54,81,37,17,68,36,114,111,191,169,98,23,100,51,51,178, +171,217,223,222,231,251,51,253,155,249,160,209,216,7,216,200,19,131,22, +10,169,106,97,207,19,133,77,240,128,38,5,233,102,6,165,105,74,183,183,29, +52,211,114,175,207,16,138,122,27,106,6,5,51,82,17,75,17,145,200,52,143, +131,141,163,48,171,100,203,217,52,80,154,203,56,96,242,208,175,44,143,138, +32,203,185,56,254,217,243,79,62,252,197,211,135,221,195,123,147,202,22, +171,80,99,59,155,229,126,196,109,199,208,111,104,180,27,53,182,21,174,40, +23,204,123,124,111,61,218,186,221,79,26,243,229,116,92,126,10,195,207,99, +28,188,243,89,81,129,202,149,170,34,136,76,95,245,32,250,27,135,181,152, +137,106,85,215,64,172,28,86,3,127,122,25,15,186,73,45,74,100,34,70,89,192, +210,174,165,229,43,65,54,17,49,3,186,64,8,71,157,123,48,227,61,90,44,146, +186,182,6,52,221,168,104,0,32,40,69,47,107,137,0,0,1,0,73,68,65,84,2,130, +153,129,22,77,47,220,140,125,80,208,141,247,101,175,42,88,68,243,202,85, +96,74,136,150,86,134,0,170,42,17,204,16,65,37,75,138,172,21,128,217,106, +161,195,90,152,77,68,69,52,84,56,158,194,56,64,40,176,142,134,0,203,133, +58,158,175,23,63,254,197,39,63,56,222,223,255,222,93,39,134,195,58,55,117, +138,169,217,246,228,95,215,178,236,162,181,114,204,134,27,168,148,90,63, +75,15,117,82,141,23,159,210,73,236,151,63,115,9,66,182,36,202,140,197,75, +49,1,185,183,17,5,252,45,118,227,111,79,232,250,126,49,157,76,23,235,193, +184,178,122,246,179,167,23,135,123,221,145,67,115,219,76,183,169,170,168, +145,25,226,13,95,232,111,144,4,119,255,27,28,43,7,176,60,245,240,96,66, +199,33,199,62,1,77,8,198,146,184,6,220,76,230,40,121,56,19,69,132,146,201, +44,106,245,102,106,96,25,67,206,128,160,142,9,84,82,28,77,133,153,185,191, +36,4,211,140,105,4,19,64,131,156,32,142,20,59,180,100,139,115,24,150,230, +200,212,44,169,250,64,145,20,229,233,0,0,1,0,73,68,65,84,233,12,198,1,66, +128,126,109,146,140,16,150,75,117,76,42,31,126,248,243,119,102,237,123, +119,143,246,143,26,146,104,42,224,194,213,156,210,111,152,176,217,101,168, +118,187,106,68,4,168,131,79,80,135,208,117,236,31,190,243,254,63,73,109, +124,250,211,211,14,134,152,112,76,226,24,17,145,204,0,136,208,127,181,162, +103,55,79,188,36,50,0,118,46,137,154,171,4,241,227,211,243,195,103,203, +223,106,107,118,14,0,183,69,129,13,223,248,237,219,102,7,105,128,46,104, +146,150,237,225,204,61,152,242,105,180,104,72,101,127,178,29,163,106,91, +93,28,212,180,85,144,80,4,53,205,166,98,38,22,166,152,71,52,37,35,16,129, +113,141,154,201,57,92,60,3,4,212,132,105,68,205,8,74,57,82,28,113,89,131, +69,91,156,194,184,64,79,32,6,81,213,5,211,5,140,163,86,149,141,3,136,0, +19,172,86,232,93,78,242,243,159,92,76,89,255,225,123,119,239,53,15,91,74, +49,142,90,213,111,96,241,55,95,144,171,215,134,153,97,112,132,224,64,218, +154,67,152,205,238,253,78,33,8,243,72,0,0,1,0,73,68,65,84,12,241,229,217, +51,215,255,196,48,39,17,49,115,192,128,8,86,120,125,95,165,68,229,205,199, +214,102,93,215,173,214,189,2,134,102,50,172,150,194,237,39,167,203,213, +29,5,192,16,130,115,140,155,18,132,1,190,61,174,200,155,5,32,5,98,7,153, +90,167,247,247,170,7,7,205,207,230,121,149,181,9,176,25,134,168,162,98, +162,90,148,188,77,6,218,204,70,204,32,217,114,180,156,76,196,77,214,58, +12,96,226,28,131,164,188,94,154,36,23,124,188,248,140,208,64,178,166,129, +52,33,136,229,168,113,36,108,193,70,88,158,64,156,83,96,21,131,81,141,189, +97,130,24,181,174,45,142,168,134,142,97,232,73,92,0,238,227,240,201,227, +39,143,62,122,252,143,31,206,234,142,199,113,76,152,91,79,240,27,251,233, +171,182,187,60,54,199,36,200,38,12,195,94,75,46,7,145,187,149,251,157,131, +247,95,182,31,61,83,89,26,244,6,70,68,132,132,165,195,224,43,181,27,135, +117,86,221,159,117,79,78,79,32,180,117,211,173,214,125,59,59,88,142,151, +171,213,154,136,170,186,242,227,109,66,98,0,0,1,0,73,68,65,84,158,1,29, +0,177,138,42,241,219,205,135,92,249,242,128,137,129,176,114,116,208,133, +195,73,93,185,117,26,164,173,182,21,225,50,233,38,139,150,142,136,188,34, +48,82,69,73,152,162,197,81,227,104,146,33,157,167,190,7,19,242,12,57,230, +213,2,36,167,224,100,57,23,0,208,4,113,16,75,6,98,41,106,28,204,205,208, +6,88,159,65,154,163,48,137,193,160,64,222,216,32,37,195,108,49,34,0,152, +199,52,32,250,227,163,91,75,113,76,180,90,173,36,69,71,173,153,197,172, +0,116,45,152,46,51,33,118,225,199,142,177,163,136,125,140,83,78,45,123, +4,232,137,170,233,189,195,7,63,194,23,255,115,26,18,218,8,168,165,95,191, +44,230,87,94,101,220,164,251,174,140,100,197,223,252,70,182,179,214,227, +98,185,106,103,7,89,36,175,47,90,15,49,134,149,59,248,31,95,156,253,211, +206,29,58,73,235,197,138,167,221,193,113,227,128,199,133,86,126,183,25, +255,205,27,8,254,22,123,227,176,53,90,100,47,97,218,113,255,110,187,248, +126,61,63,242,242,203,56,61,27,86,155,212,186,249,0,0,1,0,73,68,65,84,160, +202,6,36,153,211,232,198,1,227,200,166,75,57,201,47,95,214,183,110,73,223, +143,243,249,65,215,14,139,197,216,247,174,30,116,24,242,56,100,21,54,173, +69,200,148,16,150,227,37,164,196,93,43,113,132,152,92,93,107,74,150,146, +250,33,205,47,184,107,125,179,215,159,158,248,182,58,220,159,156,157,188, +172,246,154,102,90,201,184,62,190,183,127,123,127,175,34,124,112,239,206, +221,227,227,187,7,211,167,79,159,238,239,239,255,206,111,223,93,140,241, +201,34,220,174,101,18,214,125,95,8,78,27,209,149,47,189,122,87,69,61,119, +191,94,240,61,9,157,105,7,0,134,234,39,154,146,30,221,254,209,243,247,254, +243,213,179,255,110,182,250,233,196,110,251,97,162,77,15,33,231,220,128, +91,2,32,2,25,208,230,207,146,147,254,53,191,166,95,57,151,241,85,27,212, +134,180,81,202,2,229,255,110,220,91,171,161,26,40,224,246,135,20,201,128, +30,159,143,119,39,139,251,21,220,155,86,21,41,196,213,8,4,144,233,154,2, +196,95,215,204,180,80,43,13,192,51,207,38,205,164,25,182,72,125,0,0,1,0, +73,68,65,84,30,240,124,77,48,128,233,184,90,85,100,208,175,135,139,83,7, +10,146,2,205,243,250,148,230,201,134,129,150,243,156,170,188,90,234,48, +172,214,2,67,15,166,230,29,128,197,161,183,156,152,8,96,32,102,89,94,34, +24,169,13,23,75,80,5,85,170,2,64,158,85,84,7,183,202,205,254,108,114,124, +235,232,222,225,244,254,157,227,166,174,243,56,28,238,77,247,39,173,229, +116,235,112,255,112,127,191,237,42,102,158,76,38,133,78,157,82,90,175,215, +5,205,165,244,120,117,245,110,98,25,119,120,42,93,207,147,189,3,88,29,243, +56,147,132,204,217,202,38,132,164,108,64,62,191,204,215,126,62,95,104,55, +15,107,32,45,213,12,220,222,24,200,144,224,84,247,126,121,150,31,52,253, +97,19,142,26,211,180,204,230,170,38,188,177,7,127,107,140,17,4,35,132,178, +117,12,193,29,31,76,143,186,12,171,19,71,2,146,198,211,231,190,245,214, +47,224,244,49,214,94,115,204,151,79,97,49,31,23,173,229,164,195,122,112, +148,198,1,114,226,217,161,228,1,36,107,134,36,217,250,53,112,242,53,164, +0,0,1,0,73,68,65,84,164,148,9,33,45,235,189,189,245,217,89,179,55,219,159, +77,47,227,178,109,171,42,132,211,139,211,217,108,250,193,123,247,110,31, +29,198,126,221,181,245,254,108,58,14,253,241,228,176,109,234,113,232,39, +93,83,215,161,95,47,187,182,105,28,141,227,56,153,76,234,186,142,49,166, +148,16,177,140,151,46,226,177,87,145,125,237,152,198,207,169,34,2,192,222, +209,61,94,127,79,230,63,206,241,194,65,218,144,238,41,217,174,175,224,106, +107,193,219,114,86,55,191,101,44,189,122,136,219,166,244,205,48,68,233, +142,63,235,95,252,252,100,124,247,32,31,118,25,77,4,124,198,138,182,99, +190,222,38,166,1,0,202,57,18,137,129,35,188,53,107,110,53,23,184,124,62, +244,3,202,8,79,63,138,123,21,198,5,124,246,40,239,117,150,98,155,70,208, +129,87,3,128,162,68,75,25,114,68,4,93,154,35,204,41,194,122,101,160,85, +83,133,218,169,228,7,247,239,221,191,119,239,211,79,171,135,239,188,243, +206,189,123,207,159,125,118,120,176,63,157,116,127,249,225,191,57,58,60, +252,222,251,187,211,98,71,0,0,1,0,73,68,65,84,239,30,238,239,167,56,48, +98,240,110,24,130,203,208,6,66,1,38,5,72,98,105,200,160,131,196,36,71,71, +71,34,178,90,173,10,113,175,104,201,238,96,189,163,64,93,251,10,93,253, +58,112,167,85,52,153,118,179,239,245,213,119,116,181,66,47,200,94,21,152, +34,2,191,14,98,123,37,4,117,243,118,243,121,107,48,43,83,27,1,8,96,195, +204,69,96,172,206,215,248,145,229,39,11,187,119,136,29,129,168,244,73,26, +191,209,74,125,219,200,46,1,61,1,32,33,216,172,118,71,149,214,227,169,203, +152,251,203,60,158,211,165,96,156,67,255,18,224,2,84,83,68,52,29,114,100, +6,64,203,227,26,16,208,179,158,157,181,183,111,249,138,150,49,79,218,250, +189,239,62,156,118,221,106,185,248,253,239,189,127,231,206,157,143,143, +166,119,239,28,31,223,190,253,105,199,179,217,172,235,218,219,179,224,152, +171,42,104,30,36,141,101,234,106,69,160,1,32,152,36,77,148,209,177,85,108, +181,19,79,93,168,11,127,122,231,56,69,164,239,251,194,121,218,121,235,107, +15,228,174,198,235,71,202,245,155,0,0,1,0,73,68,65,84,187,103,136,40,2, +133,246,97,174,191,147,253,35,10,61,177,207,153,145,50,226,102,219,182, +169,197,190,221,154,250,205,231,173,53,163,41,154,162,10,136,149,185,209, +32,226,53,71,213,147,24,62,94,208,195,53,60,152,178,99,151,12,130,8,110, +135,67,191,221,8,91,77,25,25,136,217,146,214,164,135,149,30,80,127,62,198, +180,124,25,116,41,103,167,152,22,222,134,52,159,35,115,142,216,52,181,200, +48,109,218,174,107,198,145,218,182,238,186,246,204,61,253,206,195,227,233, +180,235,215,203,105,215,190,255,222,187,77,83,157,159,157,222,222,155,116, +129,110,239,79,106,7,121,92,57,18,77,235,113,157,167,109,197,196,170,106, +42,77,21,54,59,54,227,76,104,158,192,145,49,34,179,171,170,80,213,196,212, +112,93,22,103,167,137,188,233,106,121,29,211,55,129,236,98,111,28,118,128, +84,215,119,66,253,64,124,69,85,143,24,52,146,199,215,195,15,216,214,105, +223,150,147,186,121,88,75,4,85,200,2,34,38,102,57,107,202,154,165,179,49, +33,92,140,244,87,159,46,38,208,195,131,177,191,88,137,0,0,1,0,73,68,65, +84,230,206,173,169,15,155,94,244,155,62,171,47,48,51,83,69,38,118,94,192, +2,233,126,141,183,91,250,248,23,79,228,236,89,29,242,112,246,212,99,62, +190,125,120,113,153,171,182,249,224,131,251,123,179,233,114,49,63,60,152, +29,238,239,13,235,213,222,222,116,111,54,125,252,241,147,163,163,195,182, +169,99,28,156,195,189,217,132,9,43,152,54,222,171,196,189,217,4,9,68,198, +217,108,194,76,128,208,47,251,182,109,153,157,11,161,169,27,64,140,49,138, +40,88,170,67,149,125,114,206,53,174,242,70,1,188,9,184,202,141,227,88,58, +9,74,236,177,163,224,193,149,2,225,13,193,186,92,72,187,1,222,102,38,44, +208,28,84,245,237,193,121,100,3,117,96,193,177,102,195,43,29,109,240,150, +155,118,111,62,182,214,12,82,48,45,150,213,178,88,78,154,165,211,5,105, +125,178,180,213,217,165,159,167,137,29,84,21,78,157,239,170,234,106,29, +248,45,154,21,18,19,51,43,130,3,107,3,237,181,174,169,104,21,240,254,237, +195,203,116,118,208,134,31,253,246,111,189,56,189,152,237,11,207,49,0,0, +0,1,0,73,68,65,84,31,254,240,222,116,111,54,59,125,249,98,111,218,237,117, +237,249,25,206,38,237,222,180,109,221,123,204,68,4,162,78,37,89,26,148, +160,173,157,67,23,227,216,180,245,24,199,148,83,59,105,75,129,103,50,221, +171,155,58,167,60,166,132,49,19,179,1,135,186,174,81,166,237,212,43,57, +230,38,212,17,163,35,22,145,233,116,58,159,207,75,59,99,140,177,140,99, +253,194,21,187,57,135,13,87,174,31,0,0,4,8,83,36,54,52,48,198,82,109,204, +105,199,32,183,87,191,117,19,231,242,5,230,128,3,58,231,8,28,130,104,86, +49,5,66,246,168,171,146,28,32,68,3,102,68,3,2,180,49,141,168,74,10,100, +168,86,146,239,136,134,38,106,34,144,50,138,176,42,170,144,168,168,44,70, +185,184,56,191,117,116,107,88,45,46,78,79,247,102,83,25,6,141,227,2,87, +118,190,186,43,156,52,127,248,100,145,96,21,102,183,254,241,164,94,196, +121,219,182,197,253,20,213,201,34,9,89,218,164,111,206,20,188,247,8,102, +34,162,97,38,195,240,199,239,29,253,193,127,241,31,255,196,167,71,15,0, +0,1,0,73,68,65,84,139,127,249,223,62,252,131,223,221,159,116,103,47,14, +247,219,230,189,7,239,196,126,29,135,222,28,230,60,222,61,154,17,145,104, +158,204,102,64,180,74,153,49,49,50,24,144,25,243,38,139,172,170,89,115, +213,214,73,132,157,111,187,73,206,25,140,102,147,189,245,122,157,36,119, +211,110,66,52,142,99,201,61,143,227,72,228,145,201,85,190,174,235,170,174, +181,199,210,152,200,204,179,217,172,104,33,92,237,213,45,245,162,171,248, +222,41,12,95,151,225,182,91,236,170,237,65,175,217,75,55,115,71,223,151, +139,179,32,99,219,180,189,102,66,54,44,77,244,130,160,8,132,224,9,111,246, +75,220,153,131,43,217,238,146,174,40,33,208,38,223,108,166,86,18,172,38, +6,162,90,198,141,88,153,73,81,86,82,85,85,64,20,114,182,156,52,103,17,17, +145,242,87,35,113,72,115,92,41,173,230,85,188,164,245,104,171,101,92,175, +123,20,27,101,88,103,96,54,200,63,253,155,159,237,233,120,220,54,223,189, +29,224,245,13,74,233,60,189,233,133,216,133,242,87,85,212,152,249,191,249, +175,52,203,244,152,0,0,1,0,73,68,65,84,254,75,48,29,215,171,39,31,127,148, +251,53,104,94,206,207,68,147,231,166,124,254,29,122,174,118,39,236,184, +111,59,88,151,94,247,82,195,219,141,94,216,141,25,41,20,126,51,43,176,54, +51,231,92,233,68,44,114,8,176,237,21,247,222,167,148,118,13,139,187,215, +95,125,223,155,94,171,207,175,221,166,45,96,43,166,10,176,165,155,127,69, +202,33,174,132,242,8,64,8,165,101,7,193,204,212,128,13,84,193,212,64,1, +196,64,205,164,84,69,55,144,54,19,83,81,73,34,89,216,196,36,99,142,144, +162,166,44,57,231,156,36,139,173,207,112,126,17,123,103,67,239,135,129, +197,211,114,137,171,85,66,14,224,243,178,247,77,211,76,234,231,39,243,79, +62,123,62,10,142,227,184,27,123,94,220,143,123,43,44,199,171,37,140,171, +84,227,7,135,251,167,39,39,57,199,253,182,214,138,151,203,121,213,248,230, +112,218,247,105,183,181,133,43,236,228,226,210,118,80,222,33,184,192,183, +124,174,2,77,51,107,154,166,188,190,220,160,138,224,119,169,173,120,239, +187,174,43,66,31,37,145,235,30,163,32,0,0,1,0,73,68,65,84,87,215,117,233, +48,79,41,149,215,148,35,132,16,202,123,189,113,69,189,133,69,43,11,6,72, +200,30,40,24,133,210,237,130,168,8,102,240,198,100,2,219,230,195,110,220, +28,152,109,238,17,27,21,147,66,235,217,189,189,194,6,194,165,167,75,193, +4,84,76,197,178,106,86,221,108,1,179,67,165,148,48,69,24,71,72,201,74,101, +56,103,89,95,58,25,36,137,197,145,82,26,71,201,125,15,227,208,212,13,231, +52,12,203,213,242,252,226,28,47,206,95,62,73,227,255,250,191,253,239,71, +127,242,187,206,185,221,24,141,157,31,122,11,107,177,179,157,211,101,102, +92,245,148,6,150,232,80,5,149,200,216,81,85,7,17,44,41,136,2,160,157,63, +222,33,172,60,184,234,134,175,122,235,146,108,238,186,174,116,125,119,93, +71,68,101,86,170,247,190,60,40,79,22,111,77,68,59,117,132,24,227,174,172, +88,68,66,68,164,92,18,215,30,120,252,91,109,35,16,196,1,92,99,92,129,56, +64,70,148,194,41,191,146,16,217,118,3,189,21,115,133,111,9,0,140,96,136, +76,72,160,170,127,69,253,56,0,0,1,0,73,68,65,84,194,192,6,160,102,10,134, +102,37,67,135,42,152,5,68,32,101,200,25,82,134,148,44,38,203,217,44,105, +206,54,142,22,163,165,164,41,105,76,38,89,179,4,31,250,245,218,212,52,203, +122,189,146,156,208,64,231,103,172,180,239,200,91,26,208,222,249,193,187, +119,102,123,39,207,159,174,215,239,55,77,147,115,222,113,27,74,98,228,166, +145,189,11,73,203,45,2,182,224,14,4,135,179,105,91,7,147,180,26,160,174, +234,170,170,1,169,105,154,148,82,241,190,112,69,253,44,231,188,27,83,182, +155,55,89,188,245,110,192,123,1,98,225,54,150,112,185,56,230,113,28,139, +76,194,56,142,136,216,182,45,34,150,164,7,108,131,144,2,241,221,69,178, +11,184,203,159,59,13,252,27,93,171,215,141,0,1,185,6,87,3,215,70,132,200, +8,76,101,152,41,226,102,42,56,22,87,253,150,114,92,110,119,13,97,25,102, +180,205,220,176,153,169,136,10,138,144,40,138,150,124,51,164,132,89,48, +37,204,9,83,198,24,41,70,76,41,231,40,57,75,140,154,162,230,12,41,99,78, +32,178,184,18,196,40,166,0,0,1,0,73,68,65,84,88,213,117,221,47,231,132, +16,152,18,65,215,181,33,248,179,147,245,126,87,223,217,63,194,192,60,235, +126,240,91,31,28,77,103,207,30,61,46,73,171,221,125,246,173,21,101,174, +18,131,174,22,135,79,22,151,206,123,96,82,64,68,110,154,110,210,77,145, +136,144,11,172,119,24,42,142,118,24,134,130,173,114,159,217,193,186,40, +123,148,39,119,81,214,100,50,41,47,40,142,185,232,48,21,236,2,64,209,143, +44,254,24,17,119,255,122,21,214,37,200,46,94,96,167,119,124,211,107,245, +186,33,16,252,255,236,189,91,143,36,217,145,38,246,153,217,57,238,30,17, +121,169,107,223,200,38,135,32,135,115,217,25,44,102,23,90,96,5,233,97,245, +34,9,18,244,176,18,180,144,94,36,253,0,1,250,55,2,244,11,164,7,65,47,130, +0,105,31,6,35,9,194,46,116,91,206,130,51,75,205,206,146,28,146,221,93,93, +183,204,140,139,187,159,115,204,76,15,199,195,51,42,171,179,155,85,172, +202,44,178,105,8,36,50,34,61,35,78,184,127,110,199,174,159,81,104,16,58, +151,214,25,250,126,58,169,0,0,1,0,73,68,65,84,68,66,19,135,100,13,196,236, +181,245,132,236,155,144,64,94,181,181,239,231,38,0,128,155,145,25,169,146, +230,73,61,171,162,20,104,65,202,21,220,200,137,114,166,148,40,37,206,89, +75,70,81,42,153,181,4,83,130,18,138,64,79,162,173,90,82,74,139,174,187, +115,114,220,175,100,181,92,46,186,118,123,127,245,224,232,248,40,68,136, +183,119,143,143,90,227,254,249,251,39,177,166,205,198,113,172,20,22,51, +81,203,219,62,17,179,61,58,219,214,21,34,119,63,120,223,84,83,202,139,163, +99,137,109,206,57,134,13,49,119,93,147,82,154,203,56,105,79,72,80,225,123, +104,91,31,194,186,186,152,149,199,177,106,235,67,35,164,106,244,106,132, +48,243,114,185,172,246,216,76,103,51,171,228,10,235,121,194,42,246,81,163, +219,113,25,1,112,132,52,206,141,147,129,132,136,43,15,61,94,32,138,48,191, +169,66,236,234,141,29,176,122,96,223,20,173,25,90,51,130,197,85,93,75,45, +147,39,205,208,66,154,235,131,117,100,77,164,153,1,129,26,12,149,206,9, +36,96,99,255,214,119,233,189,96,250,0,0,1,0,73,68,65,84,190,177,232,186, +37,165,229,162,189,127,239,222,118,179,94,44,186,38,198,243,101,251,222, +241,73,89,95,128,237,206,170,185,184,120,106,253,240,253,111,125,103,135, +9,214,115,36,225,134,93,198,153,144,96,138,195,180,77,191,222,142,57,83, +8,157,68,25,211,162,91,53,77,3,214,122,7,210,1,207,70,213,172,95,232,50, +30,218,214,85,191,186,123,141,240,84,119,144,247,51,38,231,16,71,37,203, +171,104,174,138,249,144,126,105,30,172,90,217,109,14,253,197,155,140,250, +79,244,77,36,149,70,162,158,75,0,251,180,185,95,22,62,3,55,70,98,22,204, +52,196,198,204,156,132,137,196,203,113,52,221,158,109,189,209,82,114,206, +37,103,43,138,146,41,103,42,101,76,90,237,4,205,154,179,230,226,106,4,146, +205,250,89,211,52,93,19,3,55,77,136,93,211,8,177,153,173,58,0,184,251,7, +223,173,225,176,85,55,213,79,222,93,198,33,109,188,33,145,246,226,162,15, +161,109,78,142,31,111,199,24,237,48,16,81,13,18,222,79,34,125,123,238,227, +97,230,162,154,16,21,28,77,105,149,62,33,0,0,1,0,73,68,65,84,1,183,109, +75,20,129,221,110,103,197,239,220,59,206,57,199,216,214,104,198,28,130, +168,218,122,183,219,85,252,29,26,33,216,223,45,244,146,212,3,170,26,174, +182,71,125,177,46,166,154,215,68,116,124,124,60,47,111,230,212,235,186, +174,130,184,90,32,243,119,153,117,246,219,75,199,204,98,198,74,30,26,237, +228,131,109,190,91,232,19,105,57,235,42,240,14,14,118,34,5,156,32,226,20, +156,163,238,9,169,103,95,146,0,216,245,195,229,217,8,4,230,125,4,154,129, +240,149,52,182,87,21,225,101,4,96,202,126,130,43,69,53,213,145,61,44,158, +8,6,40,49,164,9,139,166,26,115,116,122,20,99,136,34,66,142,192,210,132, +64,128,170,90,233,241,98,26,108,111,189,123,69,15,128,154,48,175,154,108, +238,224,183,3,193,219,119,25,95,150,121,187,152,33,82,151,81,117,103,173, +117,158,111,54,0,135,138,118,134,245,225,239,47,99,26,251,16,202,97,2,252, +240,175,135,118,17,237,195,234,135,175,207,63,111,35,47,59,173,118,2,217, +188,200,75,123,250,214,100,130,245,124,133,96,254,235,0,0,1,0,73,68,65, +84,79,207,251,160,15,189,169,186,21,183,2,83,114,37,55,130,29,47,27,83, +85,21,51,35,154,24,117,69,100,28,162,136,84,40,147,131,137,220,93,201,146, +79,52,233,21,157,135,198,223,97,233,66,189,234,62,183,24,237,129,174,170, +51,209,250,77,90,141,51,146,248,69,78,209,26,98,171,171,58,116,25,253,128, +7,126,158,223,94,33,62,91,11,120,81,91,99,95,127,55,79,108,154,191,230, +225,89,186,2,241,95,230,246,190,217,19,117,185,13,113,189,195,137,137,232, +102,211,47,87,229,11,180,117,189,24,49,36,38,103,136,144,155,144,50,5,38, +85,62,90,52,102,86,84,109,95,24,93,251,50,73,153,153,220,28,106,110,234, +68,110,166,165,204,27,250,124,121,100,63,197,153,246,115,54,174,104,184, +89,141,85,100,207,41,143,151,43,120,222,42,214,105,79,40,138,125,222,184, +6,161,103,218,187,82,74,85,219,243,230,83,243,44,85,245,214,91,116,86,195, +135,190,239,33,112,231,8,6,14,246,180,43,176,198,245,72,189,162,164,111, +18,208,85,120,162,235,199,116,223,219,222,174,36,40,103,0,0,1,0,73,68,65, +84,69,187,85,185,212,214,135,193,218,24,227,157,227,35,85,45,90,84,213, +14,146,225,1,234,238,102,98,106,106,251,122,72,245,150,133,153,21,230,76, +230,12,170,140,176,172,78,179,165,49,95,108,34,170,241,93,236,219,58,106, +208,99,206,198,93,81,222,95,184,195,190,217,109,247,16,16,47,219,217,135, +127,165,3,115,118,78,158,87,88,215,23,103,55,17,251,0,197,97,174,244,10, +76,103,87,15,251,8,253,33,166,241,18,82,175,3,238,109,153,34,135,16,222, +107,235,91,86,213,56,212,214,51,134,0,136,200,162,37,85,46,133,84,217,140, +139,178,22,82,165,113,40,123,175,182,158,253,122,54,193,44,68,196,12,98, +33,16,9,187,67,152,197,105,54,145,15,99,195,85,225,213,75,88,21,97,213, +127,53,38,80,145,113,168,219,102,108,221,164,182,62,252,32,222,207,153, +174,177,185,217,24,152,227,30,87,96,93,15,59,204,56,206,111,251,242,47, +135,95,240,10,172,191,114,145,47,63,189,97,112,59,166,89,192,243,11,183, +101,232,207,18,46,23,178,215,169,245,58,49,185,147,49,133,50,228,0,0,1, +0,73,68,65,84,51,121,29,242,202,238,230,6,55,169,173,160,102,14,173,28, +162,76,204,2,77,121,239,226,26,132,73,4,4,98,110,89,174,192,122,142,160, +213,44,67,206,185,86,62,84,107,181,102,209,102,147,157,15,102,161,207,22, +200,91,61,107,135,174,237,225,106,233,32,163,62,103,200,113,48,99,137,246, +113,183,10,238,26,194,171,255,82,65,127,229,131,174,220,165,116,208,19, +116,120,59,93,249,175,195,42,148,235,190,194,219,62,69,95,32,149,60,101, +250,29,230,118,187,36,124,87,71,2,204,107,11,194,4,119,175,93,90,112,49, +54,22,119,142,173,22,205,37,171,3,78,68,206,196,196,4,3,49,195,76,64,228, +78,65,64,0,91,35,92,227,116,21,214,243,101,155,97,61,177,75,239,3,183,117, +160,201,97,20,246,149,180,215,155,146,47,4,86,93,201,225,58,177,199,253, +97,184,102,254,57,247,248,124,225,250,175,67,222,151,88,32,238,94,74,185, +98,160,127,37,202,223,182,204,150,226,190,158,218,111,125,186,110,168,102, +238,108,15,84,95,94,68,114,54,243,90,112,8,183,98,78,203,174,43,85,0,0, +1,0,73,68,65,84,6,114,98,43,25,238,12,143,194,118,176,116,21,0,38,130,142, +3,230,107,22,46,153,241,235,97,179,234,173,80,198,222,169,154,75,216,42, +92,14,107,217,234,238,81,144,218,166,13,96,135,81,173,126,116,66,206,37, +196,74,37,228,53,139,229,181,15,24,64,134,41,136,65,225,74,7,210,23,202, +21,37,61,203,21,45,59,127,145,106,68,189,124,216,252,226,97,136,253,151, +140,78,126,229,97,68,36,104,182,101,189,248,197,255,24,242,6,223,249,135, +136,247,145,251,109,187,32,148,0,106,32,53,153,70,10,99,98,185,164,179, +185,114,163,190,234,109,112,221,77,168,164,13,50,210,35,29,63,167,6,192, +18,230,45,67,205,234,180,13,34,38,170,108,201,78,244,234,155,136,79,4,104, +251,88,181,131,20,224,47,103,255,186,54,129,119,184,245,215,157,119,222, +46,103,231,239,240,50,92,33,9,255,18,148,208,62,2,80,179,15,117,203,174, +172,23,117,7,167,125,238,250,48,33,92,212,37,155,139,194,92,8,44,161,230, +70,153,11,176,39,127,172,227,61,38,4,139,153,3,196,129,193,239,227,250, +0,0,1,0,73,68,65,84,224,100,90,224,224,16,110,221,73,255,21,69,26,136,102, +179,141,110,126,158,30,255,101,92,124,16,48,52,237,119,35,22,168,157,176, +4,7,148,157,165,0,126,192,195,253,86,252,16,134,192,211,148,138,182,189, +157,125,83,181,31,215,201,181,176,158,163,22,213,239,57,140,172,29,26,18, +243,139,135,170,235,186,109,244,112,223,172,65,143,106,91,51,115,53,169, +231,84,249,188,221,207,200,110,194,66,88,152,184,210,150,2,0,131,98,36, +42,0,38,186,159,249,134,134,3,145,169,153,139,18,136,120,63,137,234,203, +228,22,183,242,95,90,114,16,11,156,108,124,60,156,255,139,178,251,108,197, +9,93,134,124,27,38,133,151,222,69,16,92,216,145,8,153,246,13,41,135,209, +195,55,184,154,0,66,113,228,228,170,48,118,10,228,201,167,139,114,107,242, +101,218,26,123,157,61,43,236,25,145,47,71,54,14,255,113,126,101,86,249, +135,127,154,180,239,129,229,83,173,142,217,102,61,60,120,214,214,34,123, +234,107,62,248,56,6,16,48,81,163,211,68,111,234,102,181,29,141,128,189, +2,163,206,96,210,63,0,0,1,0,73,68,65,84,175,226,246,123,213,139,125,91, +55,64,134,2,34,220,8,107,71,207,165,108,56,109,199,199,141,248,167,163, +28,217,234,195,16,63,166,208,49,224,22,75,177,248,98,95,209,155,95,182, +1,58,122,217,144,39,130,144,71,71,1,235,173,18,166,126,85,139,238,12,187, +89,121,207,124,20,135,253,225,21,235,243,239,56,56,125,117,82,224,149,119, +163,131,234,142,10,220,249,158,185,146,28,230,203,242,29,152,1,181,40,0, +149,38,29,4,48,216,193,142,253,32,38,135,59,187,163,34,28,14,115,135,205, +213,100,46,252,78,206,158,255,229,69,59,16,161,116,40,104,173,103,234,49, +174,121,125,150,236,47,50,31,187,126,139,67,223,28,127,155,249,148,92,192, +203,183,191,30,32,111,188,156,145,15,129,132,208,186,143,78,122,187,62, +227,87,104,107,28,40,236,249,247,195,134,80,236,193,122,5,229,151,31,240, +98,253,221,12,220,217,200,198,85,248,126,193,61,80,55,128,10,107,174,88, +133,26,140,65,138,88,255,234,128,194,12,83,240,193,80,24,66,52,53,179,49, +216,0,83,253,229,65,13,107,113,170,0,0,1,0,73,68,65,84,253,229,91,246,109, +105,107,102,192,90,36,241,109,63,182,79,23,209,161,37,106,54,122,108,249, +76,215,107,215,11,235,159,209,226,91,180,248,8,161,123,83,46,227,181,146, +119,72,79,172,60,33,108,153,8,222,184,179,185,242,141,140,37,186,78,190, +218,182,158,207,200,21,240,29,130,242,229,179,54,203,97,175,242,33,72,103, +83,239,48,237,114,104,208,31,254,11,170,98,102,56,212,225,25,105,55,110, +115,25,65,84,44,215,104,137,154,230,148,107,24,39,132,16,178,54,109,23, +67,75,8,194,45,81,67,0,253,210,170,250,214,19,10,215,9,3,34,0,179,217,48, +14,143,217,172,45,12,31,200,155,80,70,25,63,163,241,194,118,143,117,249, +72,238,124,47,158,124,35,251,157,217,255,158,223,228,48,61,244,171,74,58, +211,244,164,228,39,226,91,208,10,202,106,40,166,205,187,9,107,188,84,91, +67,47,85,222,205,175,19,81,213,202,135,160,60,76,190,28,30,57,195,250,48, +87,252,133,153,136,195,247,33,34,181,92,52,41,202,110,216,158,173,159,239, +134,173,187,13,56,107,155,199,97,216,43,0,0,1,0,73,68,65,84,38,132,168, +90,250,97,208,82,66,140,109,211,132,158,23,139,163,229,226,56,134,69,215, +30,47,22,194,16,187,57,86,248,183,37,106,187,32,45,22,34,173,59,237,138, +14,109,9,69,119,86,58,46,57,218,142,203,38,231,77,159,119,5,137,237,34, +30,253,61,188,168,92,174,43,70,120,77,41,155,146,215,170,27,182,1,190,128, +139,169,155,223,170,101,93,227,214,135,207,103,149,124,5,82,179,41,92,147, +103,135,209,189,67,117,126,229,23,92,191,217,29,134,117,231,195,204,76, +157,69,172,248,96,202,141,116,100,128,27,133,146,209,12,148,30,175,127, +190,238,31,27,141,187,180,29,203,216,180,237,144,203,243,205,121,29,105, +48,12,61,49,26,139,207,183,185,223,109,239,134,123,54,16,140,239,156,220, +143,235,69,27,187,247,239,126,96,184,151,61,231,49,159,116,39,4,152,90, +20,113,67,178,20,67,48,55,38,98,48,17,180,36,9,241,58,0,220,150,17,2,89, +110,198,45,31,255,46,63,248,219,237,191,250,239,155,241,51,156,126,199, +55,127,89,244,25,19,131,67,224,54,154,114,101,87,218,0,0,1,0,73,68,65,84, +132,244,216,158,172,237,233,15,207,78,126,112,122,255,91,190,248,120,12, +31,202,242,27,10,74,96,9,92,96,230,202,160,134,194,158,105,29,32,130,101, +120,29,45,9,160,198,145,20,100,100,90,140,84,218,154,22,16,43,72,23,176, +148,47,254,41,149,33,216,41,16,20,27,65,106,145,91,187,87,242,99,144,64, +162,79,195,23,107,194,186,48,181,115,120,202,231,79,224,235,45,241,106, +166,19,93,246,217,184,92,22,110,208,225,227,242,159,190,218,101,156,145, +61,107,223,43,136,159,255,122,5,202,135,63,127,121,169,106,37,80,48,97, +55,176,192,29,195,184,222,0,67,218,108,250,179,126,220,34,104,42,105,44, +217,133,70,77,89,147,66,0,235,115,15,120,182,80,74,49,148,100,99,78,154, +198,82,84,77,137,92,46,182,231,82,218,24,154,101,183,90,116,18,209,24,171, +163,29,203,40,20,25,12,135,169,113,168,131,231,8,213,146,127,151,132,129, +38,52,20,90,131,184,1,80,88,95,134,51,242,13,136,156,162,113,114,49,15, +238,2,39,227,243,79,139,59,154,193,219,77,115,26,226,63,95,0,0,1,0,73,68, +65,84,55,135,238,110,3,33,68,231,232,196,216,39,57,138,17,28,34,168,67, +141,224,6,48,17,46,251,89,40,98,15,30,134,151,241,220,251,103,156,123,170, +89,115,51,88,113,203,102,9,150,93,223,213,0,223,203,66,7,101,165,248,34, +88,95,57,242,229,223,15,229,186,125,144,129,98,26,152,136,100,44,206,66, +70,229,209,243,79,55,72,89,135,139,205,179,81,119,28,49,164,161,79,99,242, +148,172,79,57,73,96,119,235,199,29,224,209,66,206,89,75,241,160,37,89,78, +170,40,154,221,13,136,217,146,50,36,112,179,25,159,180,178,104,195,226, +195,7,223,64,67,146,58,212,155,86,1,131,154,171,209,45,143,97,251,34,97, +160,145,136,230,40,81,231,206,228,138,178,46,233,81,75,35,28,32,49,106, +16,6,196,132,152,17,218,123,104,168,71,218,109,178,60,67,57,199,226,20, +70,96,166,15,255,14,169,3,2,105,1,113,96,38,205,243,58,16,217,140,64,34, +117,236,19,136,133,43,153,51,12,186,182,241,73,217,126,142,180,89,56,96, +230,166,110,5,150,204,6,232,232,86,110,247,33,191,237,0,0,1,0,73,68,65, +84,55,254,255,101,145,144,67,224,94,241,225,94,118,233,230,167,47,191,207, +43,45,200,129,156,83,104,91,2,105,73,222,54,9,253,167,103,191,72,97,40, +86,182,195,166,120,98,231,62,245,187,97,39,37,12,184,200,41,135,192,14, +239,135,29,224,81,67,41,121,232,199,34,163,169,155,130,26,53,144,187,183, +206,78,67,78,154,7,189,24,63,103,107,86,237,137,197,212,198,238,180,188, +119,220,156,0,204,129,64,96,136,154,171,189,16,37,127,39,68,29,66,8,71, +20,142,157,59,34,192,118,158,77,160,53,87,237,20,17,122,216,8,140,228,29, +249,18,193,27,237,109,92,27,111,177,91,102,117,98,110,219,123,106,4,233, +164,61,70,92,9,181,144,0,192,65,130,192,76,106,192,20,165,51,117,15,100, +228,5,154,8,35,242,25,165,39,92,158,194,182,164,137,39,37,61,194,6,216, +224,62,184,21,226,27,226,37,251,66,249,106,151,241,101,112,95,81,180,115, +117,219,149,23,95,111,65,4,208,212,110,6,22,50,248,214,54,103,227,83,243, +100,174,187,178,43,158,9,188,29,215,155,170,250,71,68,0,0,1,0,73,68,65, +84,126,205,66,23,249,89,206,41,132,0,242,97,216,17,81,211,132,82,138,22, +112,242,146,213,138,171,140,86,172,36,77,188,38,100,130,16,75,19,197,210, +110,183,189,240,79,179,21,255,214,234,251,247,241,96,217,29,5,105,59,89, +82,165,104,122,189,239,240,86,69,11,36,130,151,220,220,229,230,14,114,132, +103,113,11,78,110,106,230,6,114,27,9,35,104,32,107,243,197,50,158,36,132, +5,81,235,89,97,45,59,135,216,228,39,63,82,103,110,86,180,184,195,221,41, +100,73,113,69,77,7,115,4,144,11,19,213,113,147,208,164,121,64,116,77,59, +43,61,251,142,203,5,141,79,163,93,48,37,232,192,218,195,6,183,17,150,224, +25,94,28,5,120,87,97,93,229,101,112,191,17,249,146,183,138,113,90,85,19, +99,194,120,182,123,182,179,13,44,171,105,175,125,210,4,179,245,240,252, +188,127,70,236,207,134,167,37,231,234,50,246,67,207,140,216,68,45,153,188, +177,152,74,42,102,174,97,116,181,146,139,143,35,17,24,34,8,193,131,58,74, +81,236,202,56,164,126,187,125,104,239,159,2,114,248,69,0,0,1,0,73,68,65, +84,44,238,174,154,211,135,119,191,113,36,119,132,47,93,169,119,71,140,138, +123,20,110,101,241,64,218,251,186,235,200,54,129,29,70,78,14,100,152,17, +18,242,8,244,40,49,245,199,177,51,96,65,212,32,39,215,198,77,96,29,149, +127,73,206,136,75,47,167,54,158,152,44,17,22,210,44,76,27,105,23,224,6, +89,97,14,118,45,67,26,118,188,64,25,119,150,119,130,193,117,135,178,33, +29,136,13,121,99,58,88,217,194,118,100,137,172,192,141,111,251,172,189, +178,245,248,114,228,228,202,139,151,101,183,95,250,221,190,4,214,34,1,147, +123,138,205,176,254,252,249,163,157,110,68,189,152,246,121,55,150,209,57, +175,135,103,23,253,99,146,178,203,187,156,179,184,0,54,140,61,17,162,133, +82,138,107,52,201,57,101,119,80,80,56,180,168,20,23,90,148,92,74,210,161, +36,50,102,112,227,156,169,252,162,63,219,158,61,235,206,143,87,114,119, +76,233,163,123,223,94,240,73,160,134,223,49,251,154,130,167,154,94,90,220, +227,238,94,177,6,14,137,162,94,235,189,220,61,67,13,62,192,142,199,187, +99,0,0,1,0,73,68,65,84,118,206,210,186,33,155,107,52,8,251,41,168,179,194, +133,155,102,85,224,140,210,145,29,99,92,25,181,144,142,98,155,84,186,110, +73,20,243,88,28,30,162,184,38,27,182,240,35,164,158,203,200,200,108,217, +74,175,154,157,64,227,115,211,100,214,195,6,246,194,174,48,252,218,204, +101,188,98,79,31,190,254,133,199,255,170,145,209,74,219,44,178,221,109, +158,95,60,27,74,31,69,138,234,88,210,152,7,227,52,228,237,144,215,100,197, +200,149,50,193,28,150,125,36,192,181,20,45,174,218,103,73,227,88,138,178, +184,155,151,148,21,73,232,180,148,98,89,37,132,200,129,157,119,105,61,244, +131,138,34,25,134,179,78,207,91,90,46,229,216,91,110,121,185,56,110,127, +165,47,242,166,133,168,78,78,3,55,43,138,171,226,1,70,161,97,5,79,177,48, +24,60,187,186,219,8,166,96,132,221,144,157,10,199,134,149,227,49,43,147, +70,148,200,6,183,150,104,128,110,9,13,164,69,105,153,65,121,9,136,143,153, +136,152,35,67,91,218,73,41,174,35,89,22,50,184,66,83,46,197,224,148,200, +134,14,63,0,0,1,0,73,68,65,84,183,102,217,109,36,79,84,185,71,205,221,110, +185,100,236,149,35,33,215,61,189,242,250,175,96,174,172,115,10,65,22,46, +120,220,255,236,179,205,15,251,242,184,164,60,80,63,230,93,95,46,182,249, +124,204,187,161,12,42,92,84,182,233,57,128,156,1,128,185,54,71,130,40,24, +149,77,127,78,32,138,180,30,207,136,8,66,79,182,35,228,89,224,16,99,252, +124,183,105,168,105,67,55,158,111,218,216,52,116,180,203,27,98,30,120,243, +207,158,63,250,193,243,63,35,103,2,253,163,127,243,191,106,41,174,208,53, +188,24,158,111,187,211,83,56,20,112,47,87,66,239,55,36,186,96,25,71,52, +34,239,197,213,31,218,226,79,121,247,89,244,163,100,59,119,6,137,115,32, +7,153,178,2,74,153,215,121,216,17,55,141,180,122,81,84,158,147,52,78,82, +116,116,18,146,86,101,77,113,69,97,201,161,3,71,117,241,210,19,11,231,194, +36,224,5,128,48,166,81,159,187,102,241,34,92,160,61,134,77,40,61,195,44, +127,46,181,127,96,79,132,67,32,22,50,19,176,192,64,36,224,72,6,142,13,133, +0,0,1,0,73,68,65,84,94,231,43,222,16,218,223,177,45,22,192,193,208,200, +148,134,33,245,169,140,106,58,166,113,204,227,152,134,148,134,49,15,169, +140,73,179,234,181,117,189,47,230,213,234,238,225,0,212,178,146,24,151, +66,89,145,85,138,149,146,98,211,70,23,150,40,77,144,8,2,185,187,169,187, +255,223,127,241,103,39,237,157,111,221,255,157,111,223,255,30,98,132,193, +212,164,101,179,23,48,253,150,170,153,191,80,104,98,150,11,8,157,135,133, +147,64,21,181,178,107,95,224,133,233,57,216,169,54,243,57,178,59,185,25, +52,129,152,208,128,130,107,3,25,97,9,58,88,233,136,131,67,12,29,51,107, +202,6,110,114,231,142,52,14,180,186,227,90,28,197,89,73,71,148,141,151, +209,201,93,117,159,94,161,26,24,187,153,147,240,229,242,78,194,26,76,132, +2,219,141,155,205,238,98,72,187,236,41,151,49,231,113,204,227,152,199,84, +198,92,82,209,82,76,175,163,75,102,225,105,8,143,59,42,147,177,195,225, +134,2,82,87,101,112,65,40,60,230,50,132,20,162,164,24,154,174,93,180,77, +23,185,41,63,13,252,0,0,1,0,73,68,65,84,37,176,169,187,249,15,255,230,127, +91,240,157,245,246,108,117,124,119,25,79,213,156,43,92,94,196,244,205,193, +154,64,181,2,64,26,180,39,232,238,216,174,245,146,247,121,149,185,139,98, +122,202,206,238,0,169,185,187,21,39,118,16,8,193,220,193,224,6,210,64,22, +144,14,210,58,139,112,164,210,56,200,115,118,167,18,26,119,215,49,5,122, +159,172,0,234,236,176,236,105,7,205,32,152,101,76,205,71,4,146,169,17,240, +38,78,196,151,201,187,7,107,99,38,6,193,144,250,113,189,25,206,251,180, +45,158,235,67,45,171,21,181,98,40,70,10,250,165,186,48,252,64,133,177,128, +38,3,208,13,158,77,205,75,86,238,81,98,136,201,134,78,23,77,232,132,66, +101,72,206,188,189,232,159,141,159,232,234,244,254,119,238,255,254,131, +197,195,101,92,96,72,88,92,6,176,230,184,231,77,32,155,170,182,118,8,163, +187,143,229,3,187,88,232,184,163,24,156,80,163,33,192,148,108,38,34,152, +215,250,92,114,157,184,240,200,29,32,87,128,65,1,28,33,45,184,129,68,144, +136,68,202,188,220,47,77,0,0,1,0,73,68,65,84,1,32,201,234,32,146,64,14, +201,5,187,236,90,28,238,66,112,243,60,186,41,152,124,202,89,49,168,54,101, +147,95,54,40,221,154,188,123,176,166,40,28,0,152,231,177,108,135,180,25, +173,47,164,102,69,173,168,151,98,89,189,168,107,173,230,187,238,252,217, +129,125,66,160,253,246,232,44,209,109,142,219,213,192,172,187,57,193,75, +73,197,211,88,134,38,180,49,180,129,3,179,44,98,246,206,159,12,63,251,103, +63,253,63,214,219,139,239,220,253,222,223,250,230,31,153,21,190,173,184, +44,77,227,45,65,64,123,31,171,247,189,89,217,102,77,20,201,201,39,170,48, +66,189,197,252,242,158,174,196,45,160,105,226,167,232,224,128,147,184,49, +105,4,11,56,128,152,56,56,51,156,96,206,96,98,33,162,104,110,189,185,42, +64,94,59,237,85,1,135,8,243,98,202,52,212,20,100,221,19,111,219,18,121, +247,96,141,169,200,166,88,202,218,39,237,179,141,133,61,149,148,117,76, +101,204,58,102,77,197,115,165,148,15,215,148,228,185,91,221,136,15,235, +83,38,195,29,230,123,157,86,45,135,154,57,64,0,0,1,0,73,68,65,84,20,51, +11,49,171,103,213,148,108,76,165,137,177,109,66,35,18,74,178,110,37,99, +56,255,201,243,127,126,190,126,252,228,243,95,124,244,224,189,211,120,175, +114,245,206,221,15,243,103,188,109,49,128,96,4,131,139,183,119,124,249, +144,154,85,53,170,157,64,243,224,251,250,253,64,198,54,187,114,19,228,39, +35,197,0,144,215,233,41,6,103,24,215,19,98,152,106,65,8,130,137,134,29, +52,130,234,140,138,16,65,2,67,37,37,99,82,39,158,108,235,26,45,155,238, +162,27,56,25,215,202,59,8,235,201,92,40,154,178,142,217,198,226,169,56, +204,117,122,152,154,171,187,125,213,240,74,154,127,0,179,23,10,114,113, +35,119,3,129,136,65,83,129,172,177,194,188,56,145,169,185,214,109,65,88, +186,124,12,41,189,157,21,47,227,238,124,243,228,252,239,254,254,223,195, +81,19,184,157,187,137,111,210,79,50,64,170,143,0,120,56,66,119,135,154, +37,209,161,195,88,119,167,9,152,46,251,175,238,21,172,147,229,235,196,238, +238,52,57,31,128,98,127,78,172,242,80,19,1,110,78,76,152,157,40,157,0,0, +1,0,73,68,65,84,74,44,164,3,169,85,75,3,12,24,83,237,6,33,0,110,52,105, +232,91,183,170,171,188,123,176,174,151,204,49,217,208,94,212,85,173,86, +155,97,234,49,223,23,229,48,174,61,145,87,161,86,61,70,56,113,83,149,86, +189,132,68,112,87,98,7,85,103,136,172,30,104,176,226,76,124,76,31,13,195, +249,90,207,227,194,34,243,243,167,159,61,62,123,212,164,123,239,221,121, +143,246,100,78,111,255,164,28,126,15,236,207,17,140,5,161,35,137,47,124, +215,57,24,66,128,195,121,194,180,3,213,38,175,0,36,134,83,109,2,157,60, +131,250,198,77,12,213,241,160,125,75,243,164,136,173,192,106,95,251,28, +170,19,16,51,185,131,234,240,239,203,66,211,27,139,228,93,35,239,28,172, +11,107,104,4,99,89,80,144,16,118,154,32,230,105,72,121,40,121,48,29,129, +66,112,114,246,122,45,174,57,127,246,197,175,83,178,17,216,151,240,216, +84,237,206,204,148,95,40,106,50,87,83,5,240,72,126,194,133,98,56,166,132, +245,168,182,92,255,183,63,252,175,239,158,222,255,183,30,252,23,221,189, +92,98,0,0,1,0,73,68,65,84,15,79,62,248,91,223,249,67,215,146,198,139,118, +181,4,22,250,246,187,20,162,94,12,178,34,70,235,57,132,216,47,255,129,45, +254,34,210,255,90,188,3,136,40,194,9,200,142,236,94,220,149,247,195,109, +0,0,58,51,166,84,24,51,14,79,160,3,80,221,1,251,219,0,92,45,121,83,114, +89,144,48,152,12,74,80,18,2,171,154,171,117,32,67,101,4,96,128,125,98,5, +121,83,82,183,160,90,36,236,76,36,32,254,202,113,97,239,28,172,39,97,230, +90,47,108,102,80,175,123,110,245,128,110,118,159,99,134,121,206,165,8,145, +195,85,125,189,62,75,227,248,87,219,255,167,127,240,189,15,239,125,112, +111,121,10,180,64,44,86,146,242,50,190,101,229,61,105,202,90,245,15,9,145, +67,195,97,246,95,167,242,250,175,185,188,115,176,182,106,61,18,11,71,144, +168,122,241,137,232,172,206,65,157,123,43,112,25,163,125,139,66,172,150, +179,186,66,2,179,16,219,208,111,54,235,245,95,61,255,167,57,245,223,126, +255,123,241,254,114,25,27,32,48,155,248,219,159,59,232,124,249,37,148,204, +43,0,0,1,0,73,68,65,84,173,9,18,26,139,45,73,11,197,193,8,68,34,218,3,255, +93,49,119,111,84,222,57,88,59,20,136,32,136,180,76,209,20,213,194,222,115, +188,249,13,95,167,82,70,243,92,19,58,204,96,1,200,212,242,163,221,95,70, +105,127,246,232,39,141,221,189,127,124,111,177,108,56,114,115,19,141,146, +188,183,154,13,4,176,128,27,71,164,75,123,122,138,89,223,94,95,218,237, +203,59,7,107,2,85,166,43,65,19,67,71,36,102,174,174,94,121,178,39,104,223, +28,178,213,10,1,196,48,211,172,110,133,137,92,132,215,249,241,231,23,63, +255,197,227,159,30,241,7,193,229,228,180,141,0,7,18,122,219,30,100,156, +252,51,83,18,56,137,33,102,13,32,163,41,112,93,235,50,166,56,219,91,94, +204,59,42,55,94,169,243,85,50,69,156,12,128,196,216,133,208,0,168,147,15, +246,45,211,135,14,247,91,23,51,39,22,34,81,181,52,230,148,82,206,165,20, +45,82,46,198,179,199,231,159,60,189,248,100,151,158,23,29,76,85,243,13, +172,138,247,11,51,243,154,53,109,20,241,32,156,121,219,135,168,140,0,0, +1,0,73,68,65,84,16,227,251,154,162,250,157,212,214,230,46,70,0,53,177,139, +161,161,204,230,70,52,213,120,92,102,206,112,19,190,145,27,249,52,8,150, +1,39,18,119,43,69,57,180,23,235,237,47,62,255,233,17,238,157,118,237,7, +239,159,138,220,139,177,123,251,11,170,176,38,7,152,33,0,170,109,237,169, +78,25,135,31,120,148,95,87,121,231,96,141,57,63,0,136,84,22,96,184,219, +30,209,55,237,1,153,185,43,234,112,216,24,5,30,188,148,209,181,24,159,175, +215,63,235,127,218,244,139,59,205,226,155,31,188,223,134,165,240,234,173, +47,104,254,254,123,208,74,104,72,26,47,184,52,59,246,170,251,235,232,45, +2,120,7,141,144,144,74,136,146,3,12,248,214,241,195,143,154,227,179,103, +79,242,49,15,190,45,92,40,8,135,198,17,204,24,78,124,253,46,91,153,249, +94,126,92,39,70,95,252,232,66,20,38,39,24,195,24,230,6,51,113,216,24,187, +35,156,217,191,252,233,230,135,255,223,163,31,159,39,123,190,222,236,118, +79,83,74,149,214,103,38,115,195,175,222,84,113,32,26,44,83,227,140,119, +0,0,1,0,73,68,65,84,22,180,200,33,2,64,76,16,254,230,167,247,190,175,126, +33,102,193,90,245,176,165,178,11,201,8,49,191,245,221,99,58,177,0,59,200, +193,14,194,151,157,231,155,145,119,14,214,224,74,4,12,2,132,99,219,44,163, +52,154,203,62,182,7,224,157,216,93,213,220,221,85,117,28,135,245,230,226, +252,252,124,179,94,247,125,63,207,93,192,47,221,255,246,74,34,82,169,98, +104,170,33,39,112,183,90,28,221,51,15,230,251,52,54,49,129,39,230,154,175, +165,188,123,176,150,6,123,88,71,233,142,23,247,151,237,113,30,243,129,179, +248,78,248,66,4,33,4,51,31,134,221,217,217,179,103,207,158,156,95,156,247, +125,95,135,53,190,220,156,255,230,62,185,218,206,236,112,171,62,198,226, +100,117,242,13,231,165,66,212,21,228,66,66,8,238,112,220,50,13,205,109, +201,187,7,235,90,232,65,112,128,209,158,172,30,30,47,238,150,49,217,1,235, +248,97,33,218,109,9,33,48,7,102,74,121,92,175,207,207,206,158,111,55,155, +113,28,43,172,47,215,89,15,126,115,139,117,40,28,112,33,210,251,74,219, +0,0,1,0,73,68,65,84,240,84,218,20,86,178,248,208,249,196,16,12,133,200, +132,34,121,116,144,253,22,214,239,138,84,31,158,178,155,177,181,167,139, +247,79,87,247,189,216,21,141,55,193,228,246,26,247,221,3,192,102,158,243, +184,235,215,155,205,249,102,187,233,251,97,28,199,74,83,248,150,96,61,215, +16,16,2,200,192,0,58,229,7,161,125,8,238,204,149,96,76,129,208,184,147, +243,111,141,144,119,68,12,128,17,20,48,242,112,188,124,112,247,248,97,195, +193,246,81,235,89,91,223,174,133,173,217,181,184,170,230,156,250,97,183, +217,174,215,235,139,245,197,122,24,134,148,210,21,59,228,141,106,235,125, +177,56,24,48,37,56,117,22,30,196,238,62,98,235,100,4,99,23,242,56,117,28, +124,45,229,221,251,222,14,192,9,90,75,31,86,221,189,59,199,247,187,216, +205,21,148,192,12,233,219,196,181,67,0,118,119,115,213,146,198,113,216, +237,182,235,245,186,239,251,170,176,223,82,36,4,176,90,55,139,74,21,136, +58,93,234,129,116,247,56,116,32,7,140,32,228,1,68,111,61,227,249,174,202, +187,249,100,189,177,0,0,0,1,0,73,68,65,84,189,29,176,234,22,182,113,185, +232,86,205,139,99,196,246,53,197,183,41,194,129,89,152,185,78,243,48,215, +156,243,56,142,41,165,156,115,133,117,69,246,27,230,147,190,228,208,37, +135,57,64,1,161,61,70,92,48,135,58,103,164,118,183,253,86,91,191,130,92, +119,157,252,26,121,213,247,207,81,55,125,34,59,134,202,152,198,64,229,123, +15,254,228,111,159,254,135,69,115,214,93,224,49,16,108,32,182,174,141,141, +211,238,186,247,185,46,14,125,157,92,23,231,54,115,171,109,97,211,184,156, +169,136,40,251,179,97,220,185,182,174,139,126,59,12,187,173,21,45,131,247, +125,63,135,174,231,225,13,111,176,213,128,124,137,232,104,0,196,14,139, +88,155,123,154,7,229,248,79,158,43,187,39,230,213,56,234,40,79,227,66,41, +29,189,169,207,253,245,146,215,204,50,190,189,56,4,129,130,132,125,251, +29,1,212,132,246,244,232,180,184,153,37,82,134,71,223,143,229,128,125,9, +223,247,91,145,169,140,208,29,6,55,55,53,85,80,81,213,82,74,201,37,215, +161,232,179,158,190,177,128,77,29,57,123,244,0,0,1,0,73,68,65,84,232,78, +98,119,132,62,194,193,76,76,53,61,242,53,149,87,214,34,87,152,127,223,248, +38,75,160,121,138,82,245,13,23,205,226,253,251,31,52,109,103,64,210,172, +84,16,188,182,25,145,222,196,46,75,56,164,117,113,119,55,55,50,134,194, +138,91,81,85,45,185,228,148,198,52,166,148,74,41,135,73,153,27,146,213, +251,113,117,31,210,213,41,221,34,181,191,235,107,106,133,188,254,215,254, +21,141,141,235,132,64,194,124,208,176,72,45,186,15,238,126,120,188,188, +31,164,45,166,74,133,196,65,238,118,109,107,215,91,145,137,57,22,110,102, +106,100,4,35,87,55,117,83,83,211,172,37,231,156,82,154,145,253,166,173, +234,47,149,238,161,44,30,42,119,185,24,19,9,139,59,209,187,72,60,127,19, +242,206,221,205,151,163,110,29,196,4,32,32,220,93,221,127,111,241,205,206, +142,117,112,205,10,178,186,193,10,197,47,123,175,55,33,19,15,193,94,91, +87,85,109,102,98,129,11,163,16,180,102,143,200,221,213,181,2,250,166,49, +13,120,120,128,238,129,201,178,216,62,13,235,52,79,140,36,168,189,0,0,1, +0,73,68,65,84,134,254,186,201,235,187,140,111,233,178,77,29,208,14,131, +75,16,56,96,188,10,171,111,29,127,255,174,188,31,114,187,159,59,236,68, +44,114,131,218,104,207,243,93,113,237,10,47,94,201,29,38,90,12,2,224,135, +134,245,205,173,13,72,114,42,203,135,220,28,25,152,136,9,100,230,248,186, +194,250,149,97,113,229,106,189,113,151,104,86,138,251,174,37,70,214,70, +218,63,254,198,223,57,127,242,217,102,247,217,40,107,99,46,19,187,222,77, +24,33,87,62,195,221,205,221,179,107,49,203,102,234,82,147,250,149,68,233, +197,36,255,141,185,140,22,208,45,239,251,226,196,36,50,115,113,87,253,245, +31,215,247,186,242,198,2,124,111,86,28,7,84,137,6,128,127,247,163,63,248, +248,222,239,220,95,61,88,181,171,24,34,17,153,169,218,77,37,135,15,93,70, +56,220,85,205,138,153,154,155,185,249,37,209,198,109,73,0,117,71,161,89, +176,4,48,3,110,118,61,221,196,111,186,92,171,173,175,3,110,79,99,74,189, +106,10,129,130,136,27,180,56,156,151,171,86,85,1,18,137,4,113,38,59,25, +186,0,0,1,0,73,68,65,84,3,17,7,138,197,54,238,30,165,37,112,54,139,220, +0,80,119,113,75,41,3,212,180,45,8,150,65,84,73,176,138,27,42,13,223,56, +230,24,99,232,26,0,141,29,127,120,247,247,30,124,254,211,245,58,75,60,91, +52,94,96,197,56,65,171,102,220,147,163,78,214,240,155,42,249,53,175,163, +81,213,212,80,24,57,112,238,56,243,96,103,73,135,229,98,249,233,47,158, +124,235,254,71,39,139,123,37,33,196,163,58,160,214,221,235,60,95,0,243, +47,111,80,174,100,230,137,168,27,243,6,127,50,222,249,227,163,167,255,59, +206,59,15,15,120,69,40,35,74,3,24,92,225,74,32,114,33,4,130,40,250,55,187, +164,27,150,137,87,98,10,4,95,253,235,43,27,33,102,166,170,185,100,119,152, +137,169,107,49,119,26,242,90,213,8,28,66,195,44,238,196,44,49,68,211,157, +155,199,38,17,56,103,109,98,27,66,236,135,225,206,234,40,116,2,175,237, +75,228,236,78,36,151,133,30,245,15,102,166,204,146,146,54,77,251,224,206, +251,31,127,248,59,27,121,252,120,200,163,57,51,66,34,51,2,236,0,0,1,0,73, +68,65,84,224,228,101,254,15,194,158,212,240,77,42,205,61,75,209,196,26, +227,170,170,69,173,112,41,148,139,187,49,65,220,221,221,84,243,229,191, +221,108,220,154,162,72,137,76,13,92,80,233,240,80,115,236,47,47,224,166, +187,247,111,94,94,125,118,12,224,102,170,197,221,205,139,154,151,98,230, +0,138,22,5,145,88,98,18,51,103,230,16,98,78,27,51,111,82,3,162,156,74,140, +77,8,177,239,123,146,156,82,38,226,174,235,152,131,22,101,150,150,59,66, +241,41,220,74,18,48,13,41,103,37,111,62,188,247,209,218,127,127,237,79, +135,207,183,62,58,97,84,207,92,198,73,79,239,111,224,55,189,243,210,76, +202,232,128,153,149,82,82,78,110,209,52,143,3,24,109,19,23,68,44,194,128, +222,164,61,253,130,8,73,104,65,157,123,132,99,202,198,24,8,236,115,49,194, +196,102,234,149,130,240,55,88,94,25,214,204,4,130,187,169,43,64,10,87,82, +115,72,112,175,45,35,80,55,20,85,20,136,74,206,91,51,143,30,1,164,148,163, +53,65,67,63,246,187,39,23,41,101,102,238,186,151,177,5,17,0,0,1,0,73,68, +65,84,78,36,168,170,176,180,93,215,184,16,81,215,45,68,66,41,214,112,27, +41,142,54,176,82,108,227,221,163,251,119,87,15,79,154,251,234,101,208,77, +111,59,102,222,71,30,38,114,212,55,221,196,231,251,40,31,204,221,204,107, +70,209,44,186,113,201,136,113,217,117,71,34,177,109,155,24,105,78,152,227, +166,252,144,189,20,80,128,47,85,27,120,170,37,169,238,12,38,154,166,37, +97,242,105,111,52,218,127,59,242,234,176,38,130,89,209,12,43,78,108,176, +2,83,183,172,86,74,54,119,34,184,123,41,217,221,197,68,45,169,89,177,0, +247,164,41,115,16,72,95,250,78,142,71,31,44,251,128,45,220,199,113,0,208, +52,77,227,209,129,69,183,12,33,152,161,107,187,16,226,174,239,79,228,14, +101,219,13,59,50,238,154,213,138,142,109,44,227,216,139,136,79,213,154, +78,168,89,117,55,248,155,171,91,157,54,128,125,228,113,22,5,160,106,109, +187,90,116,75,34,138,77,136,77,136,49,134,16,110,152,70,21,0,160,240,200, +180,2,58,247,228,40,96,7,5,130,56,64,84,103,93,128,97,83,84,0,0,1,0,73, +68,65,84,123,45,0,188,105,198,183,27,151,215,9,240,169,149,156,147,81,98, +144,193,82,41,106,174,158,74,41,14,23,38,135,155,41,8,1,50,104,111,170, +153,130,187,165,50,6,136,152,244,121,135,86,70,12,78,166,36,14,79,52,56, +220,168,217,38,53,181,198,90,34,86,181,166,105,69,194,110,187,59,93,156, +232,182,92,12,231,187,97,23,57,182,210,246,36,12,98,102,82,154,90,210,43, +97,185,191,249,158,235,90,7,178,15,220,177,176,144,164,216,184,9,22,113, +209,182,157,27,68,68,132,43,172,69,228,134,145,93,108,36,238,98,56,101, +89,57,93,56,21,16,64,17,224,61,166,103,52,191,125,70,181,219,150,87,134, +181,48,215,224,90,241,12,114,117,29,75,46,69,21,165,104,169,51,50,64,110, +86,8,40,46,155,97,107,86,130,6,119,29,211,16,2,139,240,110,216,101,230, +52,142,128,55,22,136,144,117,36,130,123,147,169,20,47,125,14,0,74,214,168, +13,179,108,119,187,158,159,13,227,184,235,251,161,236,170,186,33,53,1,234, +158,127,160,129,168,218,148,111,74,89,239,167,69,145,26,0,0,1,0,73,68,65, +84,153,111,43,168,137,153,68,36,132,176,88,229,150,68,6,156,52,203,197, +162,3,33,132,16,247,114,8,235,155,49,66,28,22,34,100,113,7,205,17,177,56, +212,201,137,132,188,54,134,211,11,199,254,166,35,251,149,97,29,16,68,152, +152,92,221,93,139,149,162,57,107,41,158,115,201,238,90,25,163,139,102,192, +68,120,200,73,77,163,137,153,142,105,8,202,34,180,27,118,46,139,113,28, +220,53,20,54,215,113,28,0,139,77,108,218,182,218,220,102,94,138,53,214, +136,132,109,218,153,241,118,220,141,99,114,184,67,77,139,153,10,189,212, +173,251,86,216,49,170,166,174,217,31,98,102,22,94,174,130,115,164,29,173, +154,101,215,117,194,18,66,140,113,210,211,243,148,2,191,169,177,50,196, +128,131,155,21,66,7,162,23,89,130,166,67,46,207,204,13,37,178,110,77,174, +133,245,117,151,65,32,94,88,21,133,234,92,203,92,44,185,107,182,93,101, +240,47,86,28,106,80,181,98,89,139,209,148,189,128,58,204,74,177,98,16,79, +73,135,177,87,183,232,65,77,119,195,206,92,27,107,109,19,12,254,148,0,0, +1,0,73,68,65,84,219,11,79,129,190,32,177,145,134,140,148,117,123,166,185, +164,84,198,98,73,61,143,185,31,52,15,217,251,212,251,68,187,68,230,117, +158,192,68,38,254,133,242,170,238,82,14,25,14,118,9,188,160,192,165,41, +97,153,59,241,1,79,185,57,122,47,126,243,158,62,88,208,114,37,171,101,104, +23,77,211,181,129,160,129,209,198,224,106,68,20,99,4,80,48,56,156,193,12, +169,195,48,200,8,68,234,153,192,4,153,6,194,236,99,177,118,153,170,252, +165,214,25,16,119,91,44,143,126,239,236,254,31,150,167,255,239,131,113, +89,210,113,127,148,227,168,227,216,155,141,49,64,4,102,32,66,12,77,210, +132,3,10,29,76,147,95,80,125,134,95,119,121,157,154,10,34,34,166,153,98, +233,242,180,191,116,1,28,216,39,226,84,189,142,22,40,230,106,110,42,101, +24,6,115,43,38,106,218,143,59,115,43,158,74,233,137,184,14,116,169,42,16, +238,165,148,208,54,165,228,92,146,122,49,148,164,99,210,49,123,154,131, +176,135,106,250,13,234,107,218,211,36,213,208,24,17,36,112,48,57,233,190, +57,206,164,0,0,1,0,73,68,65,84,222,35,94,46,112,218,228,101,228,46,118, +139,102,177,106,22,171,166,105,98,140,196,82,221,52,87,103,102,102,98,14, +0,120,178,7,246,51,222,28,149,90,7,128,187,57,216,109,143,107,174,106,254, +106,23,242,151,16,254,176,0,44,177,61,166,102,133,172,224,228,174,66,173, +144,86,134,213,58,164,68,157,200,188,218,32,251,247,174,215,242,205,153, +110,183,45,175,3,107,102,98,102,232,212,41,114,48,116,136,94,40,141,152, +16,87,159,153,153,22,45,197,146,90,49,55,227,113,204,163,185,101,99,117, +29,82,111,166,197,194,144,119,68,164,166,165,20,0,53,126,151,115,58,58, +58,46,211,232,58,5,172,88,153,96,125,41,151,249,237,55,56,106,138,137,247, +205,222,238,228,36,20,154,192,76,205,242,8,214,134,178,32,22,23,208,130, +168,35,143,88,29,173,218,174,107,154,40,149,118,105,111,8,176,201,180,192, +249,172,212,86,155,54,78,139,223,39,124,224,6,119,124,193,176,245,9,232, +95,182,82,230,216,222,247,246,14,242,103,96,117,119,162,46,74,195,48,38, +37,24,179,193,95,115,203,162,0,0,1,0,73,68,65,84,137,33,70,249,146,118, +229,210,51,241,219,103,96,121,19,242,234,145,16,128,153,133,133,140,252, +69,26,229,171,39,164,90,163,51,51,45,213,118,141,233,81,60,25,178,65,205, +73,173,152,39,133,194,52,217,0,130,106,73,154,221,13,68,170,37,229,148, +182,131,185,57,204,201,137,96,208,226,170,40,147,181,177,103,190,221,235, +238,55,22,224,99,236,121,237,200,225,206,2,38,65,148,216,68,90,133,72,220, +100,141,33,135,211,132,85,95,154,181,114,73,62,12,214,87,123,67,221,132, +2,131,107,82,125,58,131,245,125,25,80,160,200,116,238,46,253,58,131,187, +185,94,118,8,205,229,231,151,255,255,146,40,64,80,115,132,7,144,251,201, +254,134,56,145,7,211,222,60,1,197,81,136,156,165,150,209,78,83,74,246,66, +111,197,37,185,61,121,157,44,35,179,136,200,172,173,47,199,183,209,164, +178,231,16,239,84,238,182,31,151,67,4,102,114,34,56,169,25,113,213,18,106, +80,39,3,76,125,226,0,54,152,161,24,25,200,11,151,194,169,207,19,115,59, +184,142,29,68,69,57,239,87,29,101,205,93,0,0,1,0,73,68,65,84,85,71,184, +209,28,120,120,67,90,135,193,251,187,197,235,160,44,22,98,166,174,229,208, +72,187,162,133,251,113,163,171,227,28,79,118,190,192,249,248,100,167,177, +247,205,42,173,136,164,148,194,44,77,211,70,139,77,108,130,4,128,162,52, +194,161,182,208,90,134,217,148,242,97,6,17,204,216,12,210,216,229,89,124, +225,252,95,83,94,66,81,130,107,33,110,62,66,252,96,52,91,132,204,222,21, +27,12,217,41,193,141,1,174,129,29,3,75,51,85,3,212,179,246,130,71,249,107, +47,175,171,173,101,242,123,46,113,253,98,226,122,31,1,128,154,214,210,142, +253,212,57,171,32,169,195,164,220,235,68,58,115,76,115,63,105,98,251,157, +110,9,176,59,153,145,146,234,196,152,106,123,211,148,224,243,61,180,87, +106,251,192,195,155,139,60,152,163,198,126,225,245,190,97,6,11,129,156, +91,4,246,32,89,218,145,86,125,105,215,61,13,231,229,152,148,54,120,190, +40,75,119,74,99,2,81,215,118,200,188,232,186,24,27,6,183,77,119,180,92, +5,137,90,202,73,251,33,79,252,8,211,233,136,48,107,165,0,0,1,0,73,68,65, +84,37,1,227,176,167,183,26,190,95,153,173,100,97,179,16,195,226,99,142, +223,216,21,138,164,37,131,152,137,163,187,155,141,12,8,145,19,138,85,26, +145,125,60,132,106,101,206,111,14,201,234,235,217,214,211,20,123,247,169, +221,16,123,109,253,210,177,206,12,115,16,131,108,218,199,39,67,21,168,227, +161,12,234,251,251,195,204,216,216,201,217,137,246,126,148,153,185,25,99, +223,115,234,110,53,189,48,213,105,216,37,107,200,116,77,222,232,165,49, +159,217,209,188,222,122,68,32,42,57,8,73,38,103,207,131,15,59,219,33,51, +141,18,143,158,153,90,68,51,240,194,157,134,113,36,208,130,22,253,102,92, +148,69,144,96,234,81,226,106,177,98,150,156,210,239,126,195,74,41,90,140, +72,218,102,17,99,75,96,7,90,13,123,234,245,105,55,228,125,215,217,23,139, +59,80,156,3,154,247,73,30,238,6,167,148,199,109,26,81,130,128,24,238,28, +152,218,38,194,41,167,178,138,149,132,18,152,118,9,191,52,115,126,253,229, +53,96,189,167,225,170,121,171,47,6,243,164,96,0,136,8,237,93,141,102,55, +0,0,1,0,73,68,65,84,39,13,155,215,122,137,122,63,72,5,61,169,129,156,185, +206,66,113,38,113,114,131,18,152,166,193,26,190,15,225,193,43,53,134,79, +94,251,52,20,115,70,53,237,189,187,55,135,108,55,39,217,175,218,1,114,175, +3,218,188,131,55,230,146,21,163,90,82,99,24,138,111,242,153,22,13,214,148, +48,146,243,88,18,177,144,105,14,69,196,11,120,204,35,37,222,233,5,12,195, +48,104,218,148,162,166,20,67,187,92,28,47,22,71,49,180,32,62,214,59,181, +124,74,36,132,16,130,8,139,48,211,181,70,72,206,46,106,136,144,149,99,217, +15,234,134,221,217,238,209,58,55,13,130,128,25,93,139,229,34,48,113,201, +220,29,167,137,27,171,150,149,145,19,195,29,55,59,101,242,109,201,107,216, +214,34,96,6,65,13,166,196,78,80,120,217,91,14,245,32,154,130,36,160,202, +179,225,86,91,74,42,74,171,189,16,204,138,169,195,193,83,218,66,1,203,172, +106,90,80,32,96,103,119,99,112,195,177,212,120,106,213,46,211,199,92,102, +28,14,11,138,152,24,95,74,9,242,106,223,87,216,96,67,18,58,0,0,1,0,73,68, +65,84,1,181,90,226,201,112,120,65,41,90,228,73,46,161,241,174,11,43,206, +240,157,54,178,22,10,190,219,168,90,200,205,214,86,166,52,142,57,134,246, +8,199,158,243,80,98,144,6,206,130,232,25,110,164,238,143,198,103,34,162, +174,92,100,49,110,117,171,166,182,92,46,153,41,165,124,247,206,61,87,64, +233,244,228,142,27,185,251,176,75,119,78,239,152,18,35,220,61,125,72,46, +154,177,106,143,98,55,142,208,157,9,75,187,57,254,214,99,249,62,158,252, +160,29,150,127,126,126,126,116,212,246,155,113,236,113,239,36,116,161,45, +163,69,89,124,252,237,231,228,190,108,227,113,39,139,104,93,200,129,76, +8,121,132,59,86,71,205,102,61,30,29,133,190,31,143,86,203,82,74,63,60,15, +177,145,216,57,181,44,129,163,24,56,23,109,124,71,16,32,58,234,212,15,175, +225,76,35,7,57,145,131,235,32,69,34,33,240,43,151,193,215,18,182,189,219, +76,147,157,73,95,209,33,241,90,189,128,147,119,248,27,180,105,189,186,168, +170,27,200,18,148,188,88,73,99,224,70,72,8,199,170,54,171,74,92,0,0,1,0, +73,68,65,84,22,66,147,108,168,81,204,24,90,229,49,245,125,19,219,24,26, +161,16,165,109,98,71,16,115,11,69,216,88,179,18,200,81,180,152,155,83,242, +92,82,26,51,216,173,184,43,178,37,83,184,89,74,219,140,181,102,135,113, +159,206,93,185,100,61,62,62,213,254,124,237,187,140,163,143,239,125,155, +238,199,114,247,244,231,127,77,79,254,234,252,175,71,28,31,143,48,88,193, +168,101,217,166,237,122,184,56,219,148,192,121,244,134,211,71,239,29,181, +236,48,123,120,175,105,27,4,100,130,235,206,213,185,31,161,198,253,160, +0,86,139,59,196,1,20,140,2,44,80,97,38,14,206,132,64,36,132,232,8,64,4, +34,121,96,15,182,223,57,247,245,52,70,230,128,221,12,127,218,171,195,218, +65,96,38,217,23,253,59,110,157,230,241,86,196,201,221,139,103,87,211,146, +70,48,131,153,168,96,107,230,34,177,137,157,59,165,84,130,196,173,46,211, +48,204,176,110,66,211,196,78,72,204,124,213,158,48,113,26,51,129,146,45, +76,13,14,147,156,203,56,142,73,6,148,162,150,93,41,105,101,110,94,33,191, +251,0,0,1,0,73,68,65,84,192,198,134,190,36,179,226,9,107,45,158,134,178, +41,39,23,235,231,79,118,159,62,223,166,31,223,255,56,166,159,253,98,183, +190,192,123,27,89,242,42,125,122,246,172,228,45,65,127,254,20,66,67,215, +128,128,191,252,41,245,59,68,194,136,21,233,46,143,195,119,233,36,136,173, +194,186,107,163,244,222,53,205,166,79,171,197,50,15,38,140,16,90,115,128, +152,68,88,4,78,33,132,16,67,81,169,29,55,64,96,136,187,176,51,85,170,180, +201,84,37,175,188,206,238,168,67,190,223,190,188,94,150,145,153,133,89, +166,66,4,236,13,180,175,147,48,75,13,144,153,103,120,54,7,224,228,40,67, +50,131,136,132,220,184,163,20,19,9,91,107,93,45,90,148,28,224,20,56,196, +208,16,200,212,238,31,127,72,68,121,204,4,90,232,178,26,111,26,7,45,101, +44,163,20,43,217,44,155,231,98,149,214,143,70,46,148,75,177,2,20,210,98, +73,11,138,110,226,197,216,60,95,111,159,94,156,61,221,110,62,217,88,250, +248,123,127,255,143,190,253,247,225,187,127,252,143,255,167,159,125,250, +18,141,76,92,0,0,1,0,73,68,65,84,151,167,167,177,137,94,114,255,124,147, +134,33,13,30,220,216,75,150,39,58,108,54,67,143,109,216,236,182,195,123, +43,124,248,225,74,160,93,192,184,73,223,254,230,41,91,33,168,178,153,153, +8,154,54,178,171,23,13,170,45,186,236,36,68,236,78,100,78,132,169,114,208, +136,150,251,224,60,209,222,35,185,177,237,253,245,34,33,82,31,53,203,93, +147,202,95,55,125,61,141,173,113,7,213,12,119,205,25,122,81,114,119,114, +22,27,171,107,65,206,217,119,128,4,23,34,118,53,6,7,9,4,82,85,117,99,162, +156,10,129,150,121,73,78,76,156,232,40,151,156,198,84,100,208,98,150,145, +121,48,117,83,79,106,35,76,139,186,162,8,172,120,73,217,27,127,212,127, +226,244,204,227,249,64,233,137,63,223,50,125,116,244,205,163,240,119,79, +27,253,79,254,211,63,142,141,61,250,252,167,127,246,103,255,243,143,126, +244,195,229,178,123,239,155,167,127,243,243,255,179,107,163,102,156,253, +248,73,73,88,45,209,157,231,243,11,252,228,111,240,189,148,35,59,116,24, +55,24,88,27,33,205,186,123,69,40,0,0,1,0,73,68,65,84,250,189,134,75,177, +166,161,227,24,216,105,28,7,225,180,52,163,70,132,16,132,153,64,12,98,131, +56,152,137,184,62,175,224,62,120,122,19,242,122,60,27,44,21,214,96,223, +119,200,190,225,117,189,243,178,47,9,242,125,140,126,138,0,79,227,217,189, +182,163,215,67,204,180,168,82,144,64,4,87,99,226,96,194,96,51,125,186,253, +148,136,75,202,4,238,117,233,230,4,218,218,17,220,198,49,105,24,181,152, +23,168,12,166,110,230,219,65,71,12,90,212,13,137,71,87,207,169,36,233,31, +109,63,231,242,217,250,252,233,32,71,207,134,179,126,24,158,239,134,39, +195,197,54,250,157,59,199,93,19,238,28,135,127,247,223,254,207,255,227, +255,104,69,160,39,79,158,254,47,127,250,223,180,77,179,221,156,127,242, +243,31,43,173,61,134,159,62,234,199,17,190,69,254,89,14,108,101,52,50,236, +100,219,53,82,242,216,199,70,181,28,175,228,161,133,54,74,78,218,68,209, +197,145,245,30,2,26,67,140,20,2,49,56,48,179,179,187,131,124,10,141,123, +189,229,111,238,234,188,150,17,2,44,163,204,36,0,0,1,0,73,68,65,84,34,18, +38,166,203,104,231,215,206,8,185,44,245,66,205,155,238,203,189,189,38,242, +166,112,96,189,223,205,204,76,148,140,0,43,202,100,112,103,34,83,77,72, +76,156,181,16,200,115,214,162,166,158,188,103,161,52,38,106,172,106,107, +147,108,197,205,124,155,70,139,187,146,139,153,169,92,104,177,156,210,72, +199,35,24,253,110,253,236,188,167,180,213,109,217,245,165,236,202,230,162, +111,194,221,213,105,222,210,110,237,240,110,167,45,156,131,127,240,239, +255,59,255,165,187,245,187,205,159,255,224,255,210,188,46,229,252,7,63, +248,39,33,216,131,15,86,79,47,206,74,25,9,116,114,180,248,23,159,142,49, +40,17,198,224,37,151,147,163,242,209,206,87,29,52,99,181,8,239,97,65,169, +143,17,93,199,109,43,77,148,16,37,6,97,225,69,99,32,34,49,192,136,140,170, +13,114,83,64,121,61,88,207,244,93,95,59,37,61,11,239,203,72,171,201,56, +39,51,200,0,128,224,230,54,197,218,225,174,96,22,38,118,171,121,85,83,192, +28,106,202,45,57,1,162,238,80,228,108,185,20,229,198,160,139,140,0,0,1, +0,73,68,65,84,226,54,234,56,38,14,164,217,52,215,194,25,87,179,132,94,210, +152,83,214,162,206,91,205,101,28,83,198,209,103,107,94,140,143,135,179, +117,79,118,145,207,211,179,179,117,254,124,183,121,180,188,247,224,241, +167,143,68,120,185,90,46,22,171,167,143,207,215,235,241,222,221,7,101,188, +19,131,60,188,243,221,63,252,254,157,135,15,142,220,55,228,247,31,62,188, +115,182,251,209,63,255,243,31,12,138,174,59,234,238,60,248,217,207,127, +66,132,166,141,203,205,114,216,249,89,79,163,107,27,74,234,55,71,203,116, +190,235,238,119,212,52,88,44,176,232,168,105,184,137,28,35,137,112,115, +170,32,80,197,180,25,145,19,217,205,25,33,149,137,25,7,5,214,95,145,121, +38,148,156,69,121,65,139,77,62,47,4,10,108,193,41,131,188,186,6,181,215, +121,42,107,42,83,234,188,146,67,79,159,226,182,231,211,157,55,166,185,166, +228,21,183,170,55,21,159,190,46,160,122,221,251,155,29,94,161,125,133,21, +46,239,116,62,200,9,178,48,80,188,206,114,15,64,29,63,7,144,176,141,110, +152,210,118,177,227,0,0,1,0,73,68,65,84,232,151,82,46,32,146,38,36,45,14, +151,54,108,198,45,17,16,233,249,248,180,190,185,22,29,206,250,154,232,29, +182,3,17,145,96,232,7,69,255,36,97,164,118,76,27,223,228,229,243,247,46, +206,194,207,243,231,114,49,126,252,205,111,194,253,217,147,205,251,239, +191,39,6,31,119,219,179,71,218,102,98,186,56,255,236,228,206,201,243,139, +93,42,229,223,248,7,255,104,76,99,19,255,117,198,63,57,62,93,118,45,45, +150,242,233,255,240,223,117,139,240,241,199,31,253,232,95,253,41,193,223, +91,61,248,201,179,243,211,147,163,245,69,190,203,139,167,143,54,32,52,65, +254,224,119,127,55,63,217,105,191,254,238,183,63,238,114,32,183,167,118, +118,122,122,79,7,0,229,254,253,133,64,242,208,47,151,139,113,64,136,20, +59,150,64,96,55,152,195,96,76,48,22,97,230,26,219,246,234,99,242,158,18, +226,160,214,203,15,139,52,174,145,95,77,91,127,217,123,255,102,20,23,220, +154,188,116,237,166,98,164,169,152,12,110,110,174,151,21,230,185,104,206, +40,25,37,91,78,197,115,30,3,224,30,99,0,0,1,0,73,68,65,84,242,56,228,193, +182,244,188,125,110,170,102,138,236,37,231,179,179,179,174,109,143,223, +91,85,160,68,106,212,74,177,146,99,41,217,2,186,63,248,189,127,237,248, +100,185,219,157,47,22,241,63,248,247,254,179,110,17,137,60,182,84,74,214, +146,63,253,228,231,101,12,68,247,210,120,188,221,100,106,134,174,13,63, +254,249,179,200,222,50,62,121,114,17,5,86,202,253,247,154,33,103,45,20, +67,144,134,66,96,53,49,142,78,38,174,13,149,224,36,65,72,106,61,186,216, +27,197,203,107,166,99,152,107,43,193,101,29,198,92,27,50,31,117,48,72,241, +183,114,189,92,167,26,14,149,146,215,80,83,53,214,167,93,194,205,13,230, +53,131,11,55,131,43,213,135,41,178,234,88,210,78,7,90,243,121,56,215,82, +74,46,101,93,210,56,174,47,214,77,140,15,210,61,16,192,164,91,119,50,39, +180,88,168,234,243,39,187,251,247,239,217,216,166,93,209,17,223,248,240, +79,98,148,205,102,253,71,127,208,196,32,41,141,63,187,251,227,16,184,137, +98,90,62,249,228,23,163,124,238,18,126,250,48,19,240,115,0,0,1,0,73,68, +65,84,233,102,213,133,187,39,139,205,103,235,54,18,193,194,241,221,243, +94,76,105,185,108,209,48,139,51,135,194,49,6,17,103,37,138,64,112,143,32, +102,122,227,211,64,94,179,59,134,137,167,22,212,185,218,121,250,75,61,196, +247,140,116,191,197,245,87,200,181,27,222,149,34,246,169,53,226,178,158, +124,95,233,56,85,36,16,49,19,11,113,160,200,36,10,207,148,71,12,71,126, +172,67,41,169,228,156,215,105,59,14,195,118,189,11,18,114,42,68,0,211,120, +47,145,16,11,135,210,184,219,192,182,230,221,185,109,98,19,47,118,59,242, +101,41,153,184,57,58,250,246,209,241,81,140,252,240,254,247,99,144,182, +13,155,237,250,238,221,79,182,244,40,70,249,241,191,250,81,19,141,186,240, +244,249,103,139,78,98,148,159,61,73,112,10,161,59,113,26,144,88,176,92, +54,190,144,86,37,186,152,4,15,129,76,216,136,138,187,27,189,81,58,183,215, +138,91,19,49,201,33,172,49,103,211,235,19,0,184,228,14,253,173,124,169, +92,3,236,151,123,6,246,181,190,83,181,13,8,4,38,222,35,84,40,149,105,0, +0,1,0,73,68,65,84,156,132,196,89,148,50,17,140,74,162,97,160,221,131,216, +161,56,12,108,156,251,156,118,89,147,27,74,158,154,157,93,7,3,64,66,158, +200,204,154,19,166,148,83,46,199,167,199,23,155,77,32,201,90,186,110,17, +98,115,158,118,196,104,218,8,103,98,233,186,59,223,253,222,61,107,126,175, +105,195,209,234,35,230,12,74,20,254,58,68,111,219,240,249,163,31,19,241, +241,113,64,162,117,222,74,192,29,134,109,251,214,87,93,199,5,236,44,196, +178,175,75,180,112,235,176,222,107,235,151,139,247,232,160,207,226,183, +128,254,229,228,90,84,239,163,44,135,251,222,84,25,121,208,106,183,175, +122,87,203,68,181,172,200,1,85,148,17,219,29,46,136,44,23,117,117,128,114, +206,41,103,45,102,230,129,201,220,138,150,45,247,185,36,53,213,98,165,20, +240,240,222,251,239,171,219,217,231,79,135,52,182,28,192,52,172,183,34, +247,82,30,29,246,224,225,189,97,155,33,46,129,255,127,246,222,173,71,146, +44,57,19,251,62,179,227,30,145,153,117,237,219,204,244,220,185,32,185,188, +45,118,121,250,55,245,184,0,0,1,0,73,68,65,84,131,102,87,132,180,171,93, +72,88,64,47,186,64,239,11,61,8,208,191,210,211,190,73,250,11,18,32,74,11, +104,169,5,40,80,20,41,145,28,206,176,167,187,186,170,171,43,111,17,225, +126,204,244,96,231,28,247,136,140,200,170,204,202,174,30,205,164,117,118, +86,164,135,135,135,95,236,216,249,236,179,203,249,224,131,247,125,147,168, +253,247,190,245,27,253,146,134,205,227,199,223,34,115,183,72,34,75,17,125, +248,240,145,8,79,207,94,142,24,46,135,110,253,226,242,164,91,30,141,146, +37,67,149,52,33,148,16,185,99,74,237,182,216,58,240,53,42,115,91,67,50, +213,80,215,186,187,215,36,90,221,11,174,245,187,89,171,36,102,169,228,45, +157,13,64,201,94,119,56,40,38,116,23,136,56,37,155,108,70,89,13,114,97, +204,155,113,45,84,209,20,77,139,33,52,51,64,220,97,230,227,152,55,235,97, +61,172,187,190,223,12,155,62,227,140,151,144,88,166,199,158,47,94,116,139, +110,204,163,138,102,207,20,62,125,132,205,144,157,54,140,27,65,7,227,151, +176,247,63,122,31,162,228,183,35,140,0,0,1,0,73,68,65,84,128,124,244,222, +15,33,158,58,213,95,59,33,121,124,114,50,142,155,23,95,60,211,52,138,230, +47,190,120,230,250,32,11,135,44,171,13,58,181,78,173,79,248,185,192,214, +33,219,76,72,245,111,38,40,88,147,174,239,229,118,82,236,244,86,193,138, +3,50,105,52,74,145,145,187,187,119,209,42,85,160,74,17,80,204,101,52,25, +40,112,24,69,85,133,137,84,81,192,220,45,79,75,38,148,234,220,200,107,223, +44,191,248,217,57,212,77,204,152,207,94,253,117,191,76,221,162,135,36,135, +15,121,72,210,109,242,230,228,225,113,182,113,209,109,30,61,56,254,226, +203,87,15,31,60,60,59,93,175,134,213,135,223,248,192,104,162,118,114,252, +109,17,121,248,224,65,246,177,239,158,62,120,216,129,27,225,95,73,178,164, +89,82,118,140,57,123,206,230,118,229,218,223,90,82,91,50,176,225,224,235, +35,225,57,155,16,20,93,226,104,225,203,149,93,100,207,46,38,67,98,118,228, +209,163,145,33,1,101,244,99,220,127,160,86,251,216,110,234,181,117,77,95, +117,59,196,187,58,254,161,227,28,185,213,172,243,0,0,1,0,73,68,65,84,226, +197,243,161,145,63,49,250,241,187,253,195,89,137,76,97,251,225,200,3,71, +25,198,197,102,28,93,135,147,126,88,8,57,44,95,156,125,241,114,161,199, +93,94,142,163,89,50,95,142,118,106,253,70,215,50,2,72,41,13,235,65,161, +71,221,241,112,49,18,114,201,53,65,90,116,121,128,100,142,25,190,202,159, +254,205,39,32,142,142,143,62,247,103,221,162,187,248,252,252,248,228,248, +114,184,252,217,39,63,125,244,248,209,179,79,63,167,114,177,236,47,95,109, +82,167,151,195,37,30,216,114,185,56,93,189,208,142,143,30,156,208,224,72, +191,246,195,127,100,195,229,203,87,23,227,40,227,192,179,124,161,253,250, +40,109,86,60,63,82,53,82,152,133,202,218,169,203,178,33,85,254,223,65,47, +161,202,107,218,74,132,220,170,17,176,55,234,122,171,217,68,133,214,247, +242,117,200,28,239,177,164,24,57,162,18,212,188,188,205,215,89,173,125, +199,117,192,113,113,126,225,240,156,71,135,167,78,13,118,113,121,177,94, +175,199,180,22,87,27,92,148,195,114,1,99,234,210,152,71,21,186,38,116,70, +180,0,0,1,0,73,68,65,84,17,116,73,36,133,10,135,141,163,121,30,55,43,203, +6,138,39,29,114,206,40,121,99,173,210,137,229,114,222,66,110,174,214,140, +108,158,232,70,23,105,33,142,130,173,167,179,187,151,119,47,164,144,6,24, +8,42,33,158,109,204,50,186,88,96,25,58,89,202,140,15,107,205,78,224,193, +35,32,90,138,159,242,104,155,245,102,28,37,123,206,99,118,115,151,140,13, +135,243,65,84,250,101,63,94,230,126,217,155,27,192,113,237,161,214,158, +41,10,67,94,44,114,206,184,92,197,25,230,172,131,229,76,97,74,73,152,0, +97,180,149,168,99,144,183,85,239,155,99,107,50,192,80,180,85,96,141,17, +179,182,55,223,11,10,239,229,29,72,132,200,156,112,1,149,166,158,45,143, +58,228,60,58,140,80,9,189,161,189,73,79,217,74,186,20,110,188,75,157,3, +73,85,32,81,201,5,71,30,179,229,188,246,141,109,92,148,195,106,244,1,253, +162,7,1,149,113,157,33,174,157,208,41,137,14,243,145,171,141,15,227,40, +73,37,109,216,143,164,116,169,235,58,39,181,228,103,79,73,206,183,39,15, +66,18,204,0,0,1,0,73,68,65,84,28,110,97,173,11,10,87,145,148,146,4,161, +4,80,72,171,33,245,224,179,239,181,250,29,74,244,51,137,251,78,1,59,64, +125,28,134,44,163,137,185,128,86,107,245,34,168,119,160,213,222,68,179, +120,211,106,148,118,222,132,103,207,163,69,111,81,24,242,144,59,73,200, +244,209,205,124,244,188,194,218,70,19,17,127,121,54,30,141,20,164,94,21, +162,157,56,13,134,245,200,49,143,201,115,226,64,90,215,245,93,215,171,2, +222,87,4,34,45,41,233,230,41,66,69,110,199,132,56,0,65,233,11,26,109,110, +88,112,126,53,211,247,138,253,142,197,65,41,214,26,226,84,66,61,211,70, +29,178,140,14,19,80,32,2,201,68,201,147,127,131,99,122,115,230,205,72,186, +193,179,185,80,3,229,24,180,83,169,29,31,0,207,121,28,6,104,210,241,124, +116,203,84,118,163,166,196,212,73,172,5,52,80,178,103,154,40,178,118,92, +44,251,190,91,144,37,217,107,222,213,225,109,160,236,109,212,122,170,241, +158,7,26,11,26,218,223,46,228,94,190,122,105,113,3,119,34,26,91,103,228, +44,84,198,152,225,0,0,1,0,73,68,65,84,217,196,42,1,91,137,147,235,158,80, +123,207,43,3,225,238,136,184,114,116,201,84,106,210,36,42,32,172,45,187, +36,116,161,197,234,43,14,53,192,50,0,27,205,134,97,4,29,166,2,235,145,61, +139,139,19,41,117,125,223,169,166,60,82,85,235,40,154,85,165,220,86,147, +110,111,173,1,48,186,107,5,8,57,220,48,228,94,222,141,76,38,37,152,16,186, +163,208,32,53,87,170,133,23,94,255,92,74,183,138,210,117,165,194,92,159, +53,113,245,104,202,53,26,133,81,184,29,125,134,29,4,23,41,37,85,136,139, +48,86,175,113,152,91,54,152,251,232,46,128,136,118,41,41,40,150,93,85,80, +118,3,194,91,19,220,122,190,191,113,116,199,176,233,250,24,12,122,178,120, +180,148,165,111,242,81,234,135,97,200,57,183,16,111,224,111,17,241,104, +109,75,146,81,244,23,136,229,23,214,160,139,239,255,49,238,255,185,169, +148,16,202,148,221,93,16,243,168,150,197,72,79,34,29,85,160,148,78,186, +197,223,60,254,51,71,62,217,60,220,164,245,234,232,242,136,15,79,236,233, +208,89,160,31,64,40,0,0,1,0,73,68,65,84,4,109,74,23,226,160,79,28,53,127, +106,150,163,86,179,79,198,60,228,178,14,182,155,231,97,28,34,232,40,212, +196,36,80,90,180,75,16,161,138,75,30,177,94,143,102,66,118,235,193,55,78, +116,139,81,210,218,199,129,29,210,163,203,13,50,70,237,108,216,140,93,247, +196,125,101,177,228,13,44,40,7,55,113,83,23,186,16,82,91,119,185,139,187, +188,46,141,245,214,65,203,128,83,177,176,149,76,56,132,111,135,137,238, +229,45,133,51,147,189,245,32,188,142,128,216,254,53,206,162,149,157,222, +58,153,59,62,159,155,171,181,215,60,118,144,20,213,36,162,165,25,223,149, +252,134,123,8,242,206,164,122,54,149,234,8,83,220,58,47,79,148,25,240,181, +54,177,22,78,250,92,172,48,13,119,189,4,194,45,214,60,71,131,89,66,73,169, +11,181,158,57,36,179,155,118,143,173,223,149,180,39,32,194,218,206,192, +41,22,237,48,11,247,199,210,107,239,107,85,107,105,58,29,221,203,8,67,91, +10,249,174,190,229,166,31,96,93,157,193,61,194,67,189,106,114,167,68,37, +58,107,151,84,159,133,70,0,0,1,0,73,68,65,84,246,123,121,183,66,72,81,233, +168,38,16,143,31,52,174,149,78,250,108,234,255,122,68,89,115,177,72,149, +232,12,246,115,160,214,181,236,5,0,8,73,169,83,73,94,27,73,214,144,231, +189,124,61,194,146,11,15,9,107,29,177,116,248,132,95,103,93,82,191,22,145, +154,157,37,209,41,92,126,62,64,200,156,232,33,2,91,75,41,217,40,166,224, +94,175,191,22,41,118,184,172,77,29,216,90,26,182,14,59,253,245,47,13,35, +144,150,211,84,195,71,119,175,214,183,89,141,96,46,66,137,60,190,221,2, +221,123,121,231,210,162,115,59,140,71,227,130,227,247,215,219,8,180,197, +90,56,5,234,125,182,28,195,221,200,141,173,181,136,56,70,200,70,197,8,118, +120,120,164,15,101,52,43,141,171,133,136,102,170,90,131,251,165,237,131, +151,54,254,4,248,115,88,227,120,136,111,190,169,220,21,63,125,72,118,250, +14,77,253,86,44,59,220,20,163,114,72,204,157,178,239,211,98,169,227,240, +226,232,103,207,151,207,211,250,228,209,229,19,104,94,117,3,54,143,189, +228,84,79,15,205,128,95,201,49,203,0,0,1,0,73,68,65,84,49,90,246,236,147, +155,158,103,6,205,89,150,219,129,136,139,186,170,203,102,252,44,245,50, +230,229,232,39,235,204,213,122,5,73,24,196,198,149,231,181,219,0,228,104, +67,105,164,177,174,94,209,120,30,160,70,63,174,147,219,128,172,249,49,167, +236,153,125,166,250,30,143,188,51,169,73,202,222,30,73,108,117,148,229, +19,156,19,137,245,53,78,172,68,79,40,9,115,223,108,198,213,106,192,56,148, +94,88,119,39,183,81,235,121,196,190,250,40,210,48,117,155,99,238,65,201, +59,21,70,10,135,19,16,137,36,85,0,238,146,157,230,52,135,129,6,184,112, +155,182,10,169,22,241,171,62,77,197,145,48,69,214,212,122,109,103,103,155, +245,102,132,126,237,225,152,109,137,64,163,76,43,142,204,32,211,189,82, +191,83,41,228,116,161,174,149,165,83,129,100,147,209,56,58,179,71,133,1, +33,97,141,216,74,200,106,161,245,87,47,98,75,113,17,186,144,195,134,151, +23,190,25,28,233,142,169,153,155,243,214,219,70,56,212,90,85,39,236,51, +167,68,190,118,199,251,151,70,88,202,57,28,61,164,213,166,0,0,1,0,73,68, +65,84,244,136,200,148,2,15,205,46,230,52,103,110,212,181,132,49,98,20,3, +204,50,76,190,250,231,165,88,192,33,204,170,2,95,172,87,221,102,163,144, +59,237,18,242,54,149,231,33,213,90,235,212,216,41,254,185,183,213,239,90, +10,51,93,173,117,201,128,107,214,218,162,88,186,42,125,41,251,152,162,234, +111,82,49,115,7,34,16,98,20,1,146,192,151,155,53,86,43,218,112,199,234, +114,23,32,164,66,235,58,218,239,107,26,191,14,169,57,67,36,40,181,166,131, +51,108,77,115,214,254,163,219,244,70,235,205,253,14,76,145,10,129,1,28, +84,133,88,108,214,221,197,185,159,159,127,253,225,152,144,41,103,175,210, +118,211,61,153,189,184,215,236,119,38,147,169,157,135,199,163,248,220,89, +151,1,65,13,8,183,95,51,121,7,79,75,162,233,53,70,33,224,58,14,178,90,249, +229,106,184,219,111,185,13,8,49,147,64,72,14,75,138,227,238,145,14,79,144, +191,116,55,52,174,50,90,6,153,109,229,91,219,44,223,250,0,245,88,237,200, +44,229,172,81,151,95,165,220,148,90,190,105,245,34,48,164,0,0,1,0,73,68, +65,84,63,236,187,58,206,14,101,91,233,39,184,165,178,158,13,205,64,19,247, +68,244,162,28,95,242,75,246,207,245,232,201,201,234,88,86,150,109,204,75, +179,139,181,195,200,44,226,81,24,235,128,27,188,80,215,245,249,84,70,203, +189,44,118,108,238,44,235,107,70,31,226,253,150,81,216,146,154,128,50,210, +40,34,23,227,101,39,125,202,189,108,84,187,81,59,57,91,63,94,255,44,117, +143,254,159,164,203,62,61,80,244,98,74,103,172,233,184,161,147,46,112,168, +19,6,137,234,250,215,68,20,222,2,132,180,74,139,26,57,154,147,32,211,30, +247,242,78,100,119,186,172,214,65,53,137,2,146,157,217,90,93,162,231,171, +236,30,176,253,196,184,245,102,179,53,172,15,252,118,254,101,68,246,219, +167,219,82,225,227,230,36,143,139,108,116,100,231,224,200,14,135,133,19, +32,168,57,116,0,174,47,89,11,185,157,203,184,213,193,33,218,167,54,60,125, +21,138,220,203,187,17,214,100,248,26,204,5,73,149,142,226,46,155,204,141, +193,197,197,65,120,110,201,150,161,234,77,101,125,50,78,94,202,215,119, +166,0,0,1,0,73,68,65,84,60,201,64,46,225,69,177,37,157,148,13,55,62,73, +106,209,212,104,9,82,243,11,215,23,79,109,97,148,76,29,52,101,193,130,232, +136,36,18,75,115,43,91,31,26,188,190,213,194,45,87,35,152,171,181,136,104, +82,110,239,81,236,247,189,106,191,51,153,77,158,113,255,171,18,38,227,104, +60,207,114,153,233,42,137,54,74,164,53,108,213,201,56,203,146,203,83,251, +128,166,60,142,169,197,1,43,162,184,29,219,213,64,102,225,128,157,97,176, +207,207,30,44,242,6,186,98,26,161,6,233,4,172,13,239,34,237,47,58,227,236, +113,9,174,202,237,58,166,150,223,209,181,76,40,170,169,94,236,12,25,191, +174,196,249,94,238,84,170,66,206,152,14,17,138,119,25,227,136,243,1,151, +38,78,233,19,115,167,151,174,42,102,21,10,212,81,49,211,221,89,25,238,93, +186,54,132,0,90,215,104,100,233,2,1,93,93,46,12,144,46,75,55,186,120,151, +152,148,26,108,14,8,103,153,71,10,191,243,26,189,122,91,222,26,177,72,187, +106,27,215,245,244,121,171,193,124,47,183,20,54,123,197,210,142,200,0,0, +1,0,73,68,65,84,77,111,16,33,86,67,1,86,89,138,181,118,38,66,68,74,95,151, +250,105,119,52,172,93,179,73,90,185,117,237,169,16,59,122,75,54,186,85, +9,162,23,212,81,141,126,53,198,163,81,114,218,12,189,172,29,98,14,5,204, +117,80,147,240,29,81,117,249,77,190,243,182,32,100,250,7,132,232,86,223, +237,201,185,184,71,33,239,86,26,62,174,19,61,153,36,13,122,233,44,216,218, +161,14,58,178,80,91,146,168,239,243,245,231,6,187,24,109,115,115,167,185, +75,233,62,108,110,138,27,6,8,75,63,6,210,171,169,22,33,85,212,33,146,109, +49,12,10,25,221,13,24,20,185,103,31,76,8,1,10,218,124,116,253,151,220,129, +181,38,16,129,90,110,109,187,151,175,67,102,200,51,84,91,53,137,48,152, +16,111,237,150,45,55,192,49,247,191,170,189,7,208,172,226,100,165,189,101, +111,23,130,239,54,208,100,94,93,133,74,176,144,212,14,20,129,107,30,35, +135,127,67,205,206,161,83,7,220,205,163,139,200,27,106,214,205,213,218, +157,164,187,155,153,170,2,240,141,30,219,227,148,26,51,176,58,0,0,1,0,73, +68,65,84,250,243,139,51,23,166,212,173,134,149,25,132,105,180,44,34,230, +16,179,182,248,230,14,145,114,229,240,62,71,115,49,58,127,14,195,58,95, +117,63,236,155,238,175,226,163,15,177,114,47,196,51,204,56,48,217,70,62, +191,224,73,94,156,29,231,103,249,204,197,47,93,94,154,127,96,221,203,205, +48,12,48,232,66,140,158,71,243,13,105,231,217,72,62,120,240,224,244,244, +149,168,44,150,139,23,95,188,120,252,228,177,108,86,201,83,114,237,101, +49,186,39,73,150,165,215,254,243,243,211,15,63,252,112,179,190,236,209, +61,92,60,112,213,148,150,171,213,234,164,27,104,46,22,32,218,130,45,19, +33,116,48,186,1,153,73,164,139,86,146,6,31,198,49,137,36,81,38,129,118, +153,186,54,27,70,140,150,187,142,125,47,137,2,66,224,164,49,58,158,65,80, +208,174,238,224,130,183,91,141,160,190,168,161,216,50,244,127,238,116,240, +151,66,56,1,135,169,64,134,74,21,136,57,5,162,209,131,207,9,115,31,224, +131,219,104,240,76,32,99,112,142,164,33,173,135,113,124,113,250,229,106, +238,98,211,120,0,0,1,0,73,68,65,84,189,50,183,135,250,112,141,83,46,150, +235,188,122,181,94,139,203,131,229,9,201,245,197,186,235,210,163,254,241, +131,199,15,70,123,37,9,208,188,30,179,90,18,217,104,47,144,62,120,139,40, +125,49,139,31,151,178,8,18,0,52,119,212,221,167,92,89,16,16,196,34,172, +81,16,150,125,28,13,112,85,119,113,157,138,81,14,114,231,111,5,66,188,208, +68,37,55,149,100,153,97,42,97,255,54,7,191,151,27,10,57,235,65,86,124,49, +65,175,93,98,114,168,120,89,161,214,179,231,49,99,45,190,129,13,217,152, +157,150,125,147,57,0,118,57,124,217,117,105,204,227,226,113,186,92,173, +198,142,175,134,79,121,182,234,31,158,176,39,20,207,135,231,169,79,92,208, +151,139,207,199,207,143,95,190,92,173,86,239,61,125,239,104,121,188,25, +244,248,248,36,121,62,234,143,50,58,210,21,200,209,212,202,17,173,211,116, +210,221,162,208,110,102,38,169,120,98,2,87,68,109,140,68,159,204,149,185, +154,49,103,119,55,109,252,53,162,81,94,9,71,238,232,218,205,107,25,171, +42,207,161,85,232,47,157,111,0,0,1,0,73,68,65,84,73,226,147,105,153,198, +162,214,135,193,198,189,220,181,72,229,38,10,197,23,11,196,81,68,69,50, +1,119,203,121,216,12,155,188,94,13,212,77,30,135,97,51,172,179,140,89,198, +141,175,71,12,16,27,237,146,233,232,243,47,63,207,103,249,116,56,253,0, +239,95,242,82,77,135,151,231,195,48,28,159,28,105,210,71,203,71,155,97, +195,5,251,190,31,54,107,75,89,143,116,196,184,218,172,57,234,106,220,156, +174,206,159,62,253,48,231,14,6,56,197,37,161,180,72,218,58,229,10,245,221, +205,12,102,98,6,119,113,75,84,37,147,80,69,33,101,45,28,184,179,212,66, +136,71,243,28,7,233,108,107,177,182,3,223,102,53,130,249,89,53,107,157, +146,10,37,79,145,86,162,213,24,221,203,87,47,132,178,249,99,213,84,171, +18,74,77,34,73,156,182,25,215,151,43,185,24,206,46,198,177,119,174,242, +106,101,103,131,175,7,31,214,190,26,124,116,250,249,217,217,135,125,151, +147,140,158,145,211,133,111,86,58,94,94,124,241,189,15,191,255,179,79,63, +25,23,221,98,217,247,125,247,79,253,247,129,0,0,1,0,73,68,65,84,201,167, +159,92,174,46,30,61,126,212,9,251,197,226,60,175,109,116,101,119,212,73, +159,22,217,112,49,156,119,232,144,50,205,213,105,80,208,98,58,241,230,121, +98,202,113,49,115,203,102,217,45,67,85,128,36,236,85,146,38,175,43,54,91, +124,212,28,48,168,36,175,1,157,136,233,204,135,204,45,173,245,214,13,109, +32,68,202,58,58,196,61,8,121,247,82,3,209,17,100,20,23,161,42,115,231,178, +96,50,193,185,173,243,165,173,135,243,205,171,115,27,87,106,231,118,122, +97,167,3,215,163,15,27,219,12,158,157,188,196,229,203,203,151,235,188,202, +28,121,140,207,206,62,91,158,44,82,159,254,250,147,191,124,239,253,247, +158,190,255,240,199,63,249,113,122,192,31,254,250,119,158,190,247,244,39, +63,253,9,79,22,39,143,143,158,191,120,70,215,71,15,158,60,187,120,246,240, +228,145,48,73,30,178,118,180,44,230,201,153,33,22,220,162,209,69,118,89, +129,25,248,54,51,179,236,174,112,115,24,217,67,40,69,173,13,52,143,112, +76,137,206,136,239,144,147,0,222,30,91,135,150,12,134,30,214,0,0,1,0,73, +68,65,84,55,108,13,148,105,240,94,173,223,185,68,150,69,177,43,17,108,166, +128,11,79,38,160,242,212,55,190,222,108,86,23,195,217,10,216,240,226,194, +78,87,118,154,185,49,177,193,115,118,0,250,222,211,163,151,175,158,93,228, +115,237,244,91,31,125,227,242,197,240,7,255,254,239,255,230,239,252,230, +191,254,239,254,245,175,255,254,15,191,245,241,183,206,254,248,249,15,127, +231,227,31,253,227,31,125,239,251,223,251,227,255,245,143,63,250,232,233, +147,71,79,254,205,255,246,191,31,31,61,120,112,244,232,223,253,201,159, +126,153,215,125,191,88,226,33,188,239,156,131,203,224,210,153,140,38,98, +166,158,220,109,210,234,26,155,142,6,79,193,133,103,27,37,99,52,71,30,57, +46,85,75,7,211,186,50,78,180,140,21,130,30,209,199,186,110,118,83,184,59, +224,173,49,5,250,129,169,225,211,158,49,116,47,239,76,166,68,134,4,237, +197,77,153,152,49,102,27,55,182,30,185,56,207,167,151,118,182,178,115,151, +17,238,25,112,8,192,213,248,50,243,252,215,255,254,247,255,225,31,254,195, +63,205,42,134,69,0,0,1,0,73,68,65,84,248,209,239,253,201,159,254,219,63, +250,103,127,244,123,127,240,123,255,244,95,254,209,163,71,15,143,31,28, +255,238,191,253,157,111,127,247,219,143,30,63,250,232,27,31,246,31,241, +233,209,226,131,247,63,176,238,226,135,63,248,213,15,223,251,230,226,161, +228,209,31,156,60,252,191,255,151,191,112,138,97,48,12,230,67,182,33,231, +77,150,218,200,184,214,46,176,113,184,225,76,130,238,102,238,217,92,178, +81,212,199,222,65,81,168,68,248,6,172,43,59,109,145,110,219,40,36,77,107, +78,190,217,186,140,173,26,183,105,114,24,236,163,252,72,198,231,110,23, +232,137,172,150,147,219,40,200,40,67,112,178,235,230,230,6,47,243,77,97, +169,91,69,157,31,16,222,144,252,63,116,21,63,135,45,74,238,68,70,191,136, +48,52,12,230,57,51,231,62,91,178,252,226,225,240,228,167,221,49,186,254, +120,253,87,63,93,111,30,174,198,135,167,71,95,92,158,158,189,26,95,29,247, +203,81,120,186,250,242,247,126,244,187,255,238,79,255,228,71,255,228,223, +251,175,254,219,255,244,127,248,31,255,197,4,51,168,0,0,1,0,73,68,65,84, +251,143,191,243,241,127,241,95,254,103,20,60,253,237,7,31,124,248,222,197, +226,229,195,111,165,205,240,106,24,78,127,227,119,127,232,238,235,225,203, +191,123,118,250,244,195,227,213,250,213,167,151,195,111,253,232,239,91, +246,51,251,252,95,252,231,255,68,152,220,221,23,171,179,47,207,124,227, +50,12,103,103,175,198,13,187,254,113,242,135,103,249,172,79,61,244,72,122, +65,7,138,208,85,70,205,88,19,234,2,106,162,9,77,105,9,57,129,107,135,26, +59,66,68,133,73,69,85,84,204,71,0,165,227,129,128,178,149,75,120,55,214, +26,128,136,146,117,245,49,224,205,44,245,68,149,236,68,40,119,211,195,238, +25,149,215,73,203,112,2,32,16,23,119,117,146,71,143,78,86,158,22,93,250, +224,195,247,215,31,61,254,105,127,249,234,226,203,85,119,154,30,141,143, +60,165,133,175,242,230,63,250,231,63,250,157,223,253,173,63,252,103,191, +249,159,252,203,255,248,225,183,143,63,254,222,127,115,242,224,152,9,47, +95,190,248,214,119,191,209,245,233,207,254,226,255,252,248,155,31,143,24, +82,252,61,0,0,0,1,0,73,68,65,84,220,220,114,202,217,214,235,21,201,17,235, +113,92,103,100,101,114,3,93,28,174,98,110,248,195,127,252,251,235,203,245, +234,116,245,233,223,62,251,219,191,252,217,234,226,98,195,213,162,91,38, +73,137,73,161,52,122,118,163,65,29,90,157,177,45,62,98,234,81,127,213,204, +181,157,230,182,181,125,56,93,111,155,223,92,84,123,149,142,133,102,106, +33,216,215,43,227,68,183,114,246,211,222,243,146,57,124,103,128,230,23, +21,24,213,102,168,113,3,5,2,192,233,71,15,22,139,85,127,178,60,122,192, +147,243,229,250,179,225,167,103,56,127,240,100,249,234,242,147,127,245, +95,255,171,223,250,7,191,241,63,255,241,255,244,31,252,243,63,250,246,247, +63,134,90,191,196,243,211,79,211,34,141,178,58,59,59,125,181,250,114,35, +231,20,92,142,167,175,86,159,15,195,224,142,148,52,231,188,94,175,73,174, +125,145,7,235,251,94,165,131,83,145,186,212,39,237,224,60,121,252,232,193, +123,71,98,122,252,240,72,251,238,226,139,193,55,246,249,217,207,62,214, +143,21,162,174,204,116,184,209,172,192,185,208,191,0,0,1,0,73,68,65,84, +55,136,73,73,14,41,90,83,82,78,156,238,98,110,241,71,161,190,45,174,241, +186,53,45,18,174,204,215,87,185,142,55,145,46,245,34,137,84,32,51,210,210, +175,63,70,121,4,83,18,67,203,18,159,127,178,157,200,189,86,95,47,54,43, +180,5,74,190,181,171,15,182,58,94,30,61,57,121,210,177,27,79,94,45,190, +231,223,120,252,241,223,251,237,239,126,227,123,255,244,63,252,23,127,244, +189,31,124,231,209,175,28,127,251,123,223,250,155,159,252,245,226,184,95, +202,98,133,83,219,216,184,26,204,199,53,87,207,62,251,201,102,88,247,139, +254,211,47,47,134,97,0,209,119,189,187,111,54,27,17,89,98,57,172,188,31, +22,93,234,224,146,164,91,216,178,211,30,224,249,120,222,105,119,220,31, +245,79,229,7,191,245,109,91,201,167,63,253,226,197,159,255,213,38,191,39, +25,221,216,41,21,112,36,119,100,167,68,79,156,208,136,89,238,202,148,83, +69,163,211,140,12,181,22,45,138,218,120,139,249,221,152,172,245,91,154, +237,174,59,78,186,32,180,38,104,109,229,203,92,149,102,40,165,20,210,0, +0,1,0,73,68,65,84,131,203,192,107,78,38,171,11,129,18,180,44,83,235,157, +165,110,255,162,42,182,215,180,209,186,129,160,51,99,92,246,139,163,116, +220,47,211,71,191,246,254,71,223,248,246,15,190,251,221,239,254,240,155, +223,252,206,247,12,246,23,159,252,229,226,189,163,23,171,151,107,221,100, +183,231,95,188,88,15,167,239,189,255,116,115,121,241,179,103,159,128,150, +122,93,231,243,47,190,60,63,62,90,14,195,64,178,239,67,173,7,85,89,218, +210,214,169,207,139,46,245,116,233,164,91,219,81,167,61,129,167,79,62,218, +108,46,135,203,75,129,28,45,30,60,124,252,196,187,199,103,227,211,225,167, +107,33,146,171,154,148,234,75,247,236,99,146,174,146,12,69,115,90,114,85, +189,188,25,32,49,135,110,97,143,93,16,130,59,181,214,128,180,5,29,94,115, +12,182,95,211,166,0,36,211,183,79,41,136,55,7,33,135,6,212,47,168,86,95, +5,125,161,33,186,132,56,199,203,113,148,241,201,247,159,188,255,224,155, +31,60,126,100,114,250,217,249,39,32,29,249,241,201,163,207,159,61,59,58, +89,94,159,166,54,177,0,0,1,0,73,68,65,84,140,167,63,249,244,39,103,235, +103,95,172,159,174,215,151,159,61,255,52,37,57,121,120,178,25,86,167,23, +167,163,62,25,134,129,64,103,157,185,111,54,107,17,89,218,82,243,178,199, +162,179,158,97,173,125,221,165,30,206,238,114,233,110,189,38,119,57,31, +94,66,60,61,88,124,243,7,239,63,31,87,28,45,15,67,246,193,217,9,1,186,89, +134,238,248,242,108,20,73,217,208,202,120,106,250,96,83,232,102,182,219, +206,119,135,173,217,171,116,164,2,227,236,108,174,193,214,172,213,69,83, +157,209,206,69,177,80,237,205,137,188,129,28,170,232,248,69,101,211,69, +164,185,89,0,0,47,245,215,201,177,246,188,177,161,219,88,119,121,214,125, +225,195,217,112,118,246,171,191,242,143,62,255,252,217,144,7,91,188,247, +197,249,179,191,254,217,23,57,143,223,249,238,119,54,47,228,229,249,179, +205,184,97,159,207,55,103,47,62,251,204,44,59,93,55,221,56,14,36,59,118, +112,108,242,70,93,233,148,108,150,115,198,0,23,101,202,24,147,117,112,250, +115,85,225,227,71,15,143,22,203,156,28,175,77,23,0,0,1,0,73,68,65,84,243, +229,230,116,209,89,127,44,239,253,234,227,205,203,33,191,176,241,98,99, +88,128,16,176,186,134,37,240,56,77,220,85,179,247,22,4,95,99,127,247,51, +33,183,48,216,2,217,102,66,94,35,220,253,179,90,229,233,197,189,220,64, +68,5,142,230,89,181,27,56,218,176,96,90,118,139,110,209,95,140,171,188, +126,14,57,90,46,249,231,255,239,255,241,225,135,31,104,30,254,244,255,250, +55,79,158,60,126,255,163,147,31,255,248,111,254,236,207,63,27,196,82,82, +73,188,216,156,95,92,158,45,150,253,114,185,92,173,47,87,195,229,56,142, +34,26,37,182,46,64,34,147,228,205,48,154,144,112,167,193,40,52,24,156,239, +63,60,90,93,158,95,156,159,195,93,92,4,234,200,154,244,233,119,30,157,117, +23,103,151,151,182,54,143,52,91,34,2,49,5,64,85,12,91,117,26,59,0,117,175, +236,24,236,20,11,60,163,18,210,193,36,139,28,172,40,190,202,251,198,199, +215,171,211,7,71,253,39,207,47,178,174,151,203,147,87,231,35,184,236,250, +39,54,158,69,211,44,167,192,29,16,63,32,31,98,0,0,1,0,73,68,65,84,167,144, +234,62,70,186,10,80,194,70,18,249,88,34,132,10,204,93,89,226,164,70,232, +45,90,77,255,114,73,46,153,236,59,206,122,55,46,133,60,27,47,196,55,73, +186,60,164,47,242,133,144,11,61,58,127,126,6,192,143,249,124,245,242,211, +243,231,153,57,39,156,173,159,115,44,169,108,76,216,140,155,241,98,20,17, +243,181,170,168,184,231,172,222,29,233,82,145,176,226,162,235,8,208,61, +81,147,196,226,161,32,241,252,226,199,157,118,224,49,54,88,232,49,197,101, +28,147,242,197,243,191,61,57,122,248,254,247,143,47,22,155,213,23,103,98, +250,40,63,237,177,132,140,173,169,184,215,31,136,155,25,133,226,82,2,147, +94,176,86,206,69,131,85,8,200,86,190,235,29,130,144,174,235,123,235,83, +234,6,12,13,5,205,34,154,149,126,106,53,115,108,229,203,149,116,221,222, +4,204,54,94,59,82,239,5,135,61,153,130,230,220,205,108,244,81,44,210,240, +105,180,98,38,225,110,158,115,206,57,155,217,116,195,129,154,15,56,127, +52,5,16,212,36,77,84,192,217,62,84,30,114,131,126,88,91,0,0,1,0,73,68,65, +84,139,60,204,178,79,205,104,34,226,238,20,116,203,142,71,148,145,78,163, +204,24,1,238,76,215,59,224,116,122,113,141,66,164,150,203,225,251,50,78, +223,92,22,186,92,244,71,93,234,215,227,42,226,246,113,77,36,65,169,68,30, +107,88,87,8,43,13,105,33,116,47,175,41,116,39,69,32,14,137,188,22,129,56, +204,222,186,93,224,47,182,28,2,127,81,66,226,14,55,115,32,195,128,17,192, +80,21,52,64,109,182,28,19,53,149,44,150,175,164,49,71,91,143,242,164,74, +161,120,123,193,88,42,175,60,187,246,98,182,3,28,230,102,150,205,70,3,187, +46,185,27,196,151,15,250,108,98,167,48,207,59,77,154,216,212,101,30,164, +153,231,99,84,139,215,120,135,157,140,235,52,203,230,104,7,189,165,93,76, +218,37,233,0,186,57,202,130,55,168,3,93,138,202,66,8,65,209,105,47,183, +0,94,111,132,11,220,33,78,113,8,92,28,98,20,242,48,42,186,151,144,67,203, +152,123,85,132,194,151,149,132,140,76,171,51,32,65,32,214,71,132,183,246, +54,128,75,173,170,218,82,214,43,103,66,184,0,0,1,0,73,68,65,84,102,128, +234,99,149,61,234,46,164,214,6,55,94,19,152,50,193,4,205,150,149,99,127, +180,148,172,155,181,231,97,52,102,153,236,61,174,210,100,7,109,243,92,87, +103,170,157,162,30,17,21,52,223,218,90,19,160,171,32,209,4,82,60,72,35, +73,37,157,204,164,206,212,87,133,112,135,209,34,255,74,224,70,35,161,110, +160,70,125,51,168,213,61,118,191,110,206,185,23,216,117,106,237,5,110,128, +172,187,249,182,234,144,100,172,216,230,147,90,87,247,173,60,178,80,86, +138,146,90,94,64,132,74,138,80,133,42,162,82,22,91,148,178,79,176,8,81, +100,235,217,157,52,186,229,172,163,233,200,133,112,225,48,51,140,194,110, +110,161,235,196,222,224,204,236,205,153,76,151,80,124,198,242,103,186,198, +59,188,145,120,134,48,37,77,66,49,80,203,28,225,165,71,38,234,224,70,109, +173,236,251,173,117,132,97,4,226,148,90,228,70,167,220,241,226,34,191,112, +114,16,132,52,139,204,70,49,0,240,108,192,196,191,78,68,26,236,144,90,203, +4,26,119,49,9,183,182,108,253,174,64,34,49,193,28,46,0,0,1,0,73,68,65,84, +86,170,166,155,25,232,198,188,193,74,21,178,236,212,232,163,85,80,62,157, +16,39,220,81,125,175,173,235,157,126,199,133,176,245,92,155,171,245,27, +102,240,29,190,173,72,210,69,74,64,22,168,168,51,79,216,58,188,14,111,142, +96,100,24,90,85,107,171,74,111,2,113,184,81,196,163,229,137,24,132,112, +185,207,117,186,86,14,5,97,69,82,81,208,178,254,185,21,101,149,84,59,128, +52,237,224,220,32,238,170,245,92,89,231,63,13,97,110,189,85,76,24,162,43, +100,61,164,8,96,174,73,93,108,99,235,14,186,92,46,123,235,252,178,181,108, +154,225,162,45,167,113,98,126,139,149,222,178,213,192,78,190,245,173,145, +244,149,251,7,133,38,237,146,38,176,117,193,178,10,127,38,26,100,238,62, +114,190,165,18,240,109,250,41,233,59,113,33,247,125,207,110,37,20,169,165, +82,53,224,97,238,112,73,201,221,217,192,103,251,15,214,102,253,48,127,141, +137,10,101,170,207,102,190,229,10,19,178,77,100,213,189,202,96,81,149,44, +54,228,81,48,106,39,169,215,113,61,139,158,113,235,150,105,108,82,0,0,1, +0,73,68,65,84,159,173,141,147,174,86,99,61,17,54,91,47,82,74,201,204,68, +36,165,4,32,94,95,119,155,14,13,3,199,106,92,63,125,242,241,243,243,87, +23,23,159,47,78,210,229,106,189,232,31,94,174,94,186,103,120,46,75,22,210, +72,23,241,156,135,152,152,74,179,228,168,229,68,26,120,233,98,32,96,81, +84,79,80,169,242,218,182,107,191,228,114,40,195,216,205,170,94,41,34,145, +162,217,195,93,123,23,7,146,218,217,154,2,109,16,182,211,158,160,136,42, +53,64,180,148,162,111,157,236,20,73,113,196,162,212,62,5,29,50,11,74,113, +138,10,198,209,20,221,9,58,69,63,250,58,47,70,246,210,157,45,99,234,144, +49,117,76,17,194,4,224,194,214,127,15,238,116,208,156,181,56,166,24,239, +89,242,95,185,136,29,38,228,109,140,119,44,196,35,165,185,91,57,142,136, +68,19,8,3,5,116,136,4,109,23,5,109,226,14,41,236,135,121,237,204,41,2,119, +138,211,45,42,235,239,93,198,219,10,15,173,54,116,240,118,22,59,141,25, +226,14,158,174,186,157,0,106,105,95,169,38,197,48,198,51,0,0,1,0,73,68, +65,84,175,116,118,249,248,182,157,110,84,92,243,2,183,168,233,45,250,163, +58,136,241,183,95,57,203,55,213,129,187,3,33,132,80,84,146,138,10,181,26, +98,10,197,67,221,93,195,50,59,69,220,149,106,48,0,206,8,39,42,4,238,46, +38,78,135,35,86,200,20,87,48,178,91,238,41,190,219,8,101,255,243,189,142, +239,170,100,32,27,228,224,44,40,19,238,31,163,137,94,49,148,2,33,68,16, +125,206,3,80,151,45,44,150,52,154,58,237,64,150,9,130,82,170,210,215,182, +215,168,93,64,42,58,218,161,170,175,147,61,225,152,91,222,63,135,82,147, +166,164,73,169,141,177,22,132,207,23,115,70,185,41,109,225,30,119,23,208, +170,215,136,184,178,186,188,9,183,7,253,45,79,236,151,91,110,121,223,90, +41,72,181,199,100,168,108,104,167,176,232,168,40,203,242,165,117,173,71, +17,72,60,247,210,55,50,52,62,246,105,92,74,211,254,230,89,73,197,228,81, +106,44,94,113,60,118,20,160,249,179,215,200,196,91,191,173,56,68,180,67, +234,180,83,73,82,200,124,151,50,136,69,34,138,124,15,102,0,0,1,0,73,68, +65,84,188,226,134,186,56,32,96,177,48,72,84,217,211,29,110,226,98,112,70, +223,124,119,129,185,11,224,226,247,214,250,54,114,200,78,93,99,173,189, +218,107,160,98,12,167,66,73,42,85,169,66,85,106,221,146,72,182,45,241,160, +9,74,249,83,117,122,43,88,237,226,61,74,44,231,91,98,249,34,90,21,93,218, +220,128,73,159,155,205,222,245,29,247,75,33,248,246,150,24,220,76,28,0, +21,41,112,136,138,11,149,132,138,186,187,89,22,198,24,140,85,46,221,221, +80,24,107,19,136,193,194,108,139,40,189,128,19,167,59,10,56,185,243,21, +41,127,201,229,186,229,49,42,57,130,10,173,9,168,84,181,46,94,163,106,137, +179,75,241,217,66,89,39,75,92,172,248,236,53,171,181,102,97,6,39,130,132, +104,169,74,172,214,90,74,67,178,201,81,107,152,232,181,214,250,174,194, +49,176,56,9,170,168,50,86,255,21,23,36,116,229,70,69,76,221,0,32,163,132, +84,91,194,130,66,97,32,220,37,57,140,102,229,138,45,86,20,244,67,65,180, +123,185,94,110,145,119,62,85,165,84,96,147,116,120,52,0,0,1,0,73,68,65, +84,13,66,69,11,39,21,58,29,30,20,40,147,114,75,213,233,210,250,160,193, +15,206,160,72,85,107,236,168,53,107,244,188,81,188,87,213,185,254,1,28, +62,249,144,253,46,227,109,44,119,69,99,82,200,249,232,34,207,98,173,213, +28,10,119,45,17,1,117,51,39,220,96,177,20,4,75,51,112,133,90,176,165,86, +75,210,45,156,135,251,56,227,109,196,14,128,13,57,252,124,91,89,247,204, +88,163,44,71,87,250,208,84,71,176,242,36,219,46,224,220,208,55,245,109, +56,185,58,125,213,228,146,179,6,122,190,163,208,51,185,137,62,166,174,235, +162,247,116,152,237,113,28,83,186,13,61,226,189,103,140,134,124,114,244, +232,244,226,116,157,47,150,203,71,231,171,115,114,164,121,37,77,157,116, +145,96,29,29,238,34,89,65,128,78,129,171,187,13,235,33,34,47,132,74,92, +190,2,238,171,60,214,155,133,249,173,177,124,199,11,176,254,130,201,53, +234,187,87,10,197,86,242,249,171,86,147,34,93,181,205,66,38,162,100,50, +113,90,137,75,162,70,187,101,184,121,48,5,229,167,166,141,42,170,112,108, +0,0,1,0,73,68,65,84,176,19,168,50,41,146,122,162,11,12,112,207,139,83,248, +66,141,68,175,210,41,132,110,48,215,222,201,12,184,187,138,104,12,43,128, +145,78,65,22,0,16,77,104,218,85,236,169,101,188,181,84,52,79,41,129,83, +19,82,169,46,150,69,213,181,166,45,1,128,65,221,131,202,131,19,106,8,66, +48,5,8,169,217,226,40,197,64,166,212,250,29,115,206,231,237,151,183,190, +151,45,169,180,24,106,130,84,195,194,5,108,104,73,105,18,165,110,113,127, +115,18,112,178,226,51,7,112,110,167,81,221,62,103,161,238,208,94,204,78, +165,228,8,225,205,160,199,36,147,203,248,150,202,29,254,114,193,214,162, +98,52,136,82,33,29,52,166,66,167,51,178,216,45,80,135,187,185,128,66,19, +146,102,230,112,75,217,220,204,51,157,209,96,28,14,39,75,121,204,252,210, +25,145,155,123,208,125,151,66,114,94,241,221,144,68,117,16,85,41,225,50, +74,177,202,129,176,171,53,166,200,108,207,186,93,10,63,88,179,94,167,97, +208,166,131,57,165,59,223,220,8,145,155,40,104,225,173,223,50,207,169,252, +248,89,174,0,0,1,0,73,68,65,84,136,131,20,149,148,52,73,86,208,85,147,195, +133,174,52,99,5,199,66,24,149,238,52,154,68,214,19,98,225,4,120,210,206, +220,44,230,166,234,42,154,215,168,194,149,65,123,87,209,164,123,9,41,214, +26,152,131,144,45,198,99,246,19,225,147,185,18,55,117,87,138,136,170,108, +237,95,152,144,3,106,45,87,212,154,51,137,179,123,195,171,216,229,173,235, +28,116,27,227,29,51,70,39,41,73,167,84,194,147,116,53,227,35,186,241,0, +136,201,141,177,204,36,153,195,207,4,153,33,238,230,210,187,91,182,177, +185,14,217,65,90,157,179,218,175,123,249,74,164,66,132,178,10,77,243,5, +5,90,130,44,149,156,46,252,180,164,192,220,66,73,146,170,109,102,98,210, +242,163,138,202,91,151,24,77,33,4,165,64,28,65,161,242,98,163,212,232,14, +182,244,250,38,10,57,129,144,183,189,31,30,56,169,90,107,10,168,73,212, +44,185,120,22,83,175,106,45,164,49,114,64,90,241,23,64,120,142,134,0,230, +198,58,41,145,145,222,110,244,92,33,95,124,219,189,130,127,37,82,64,72, +249,7,6,186,60,0,0,1,0,73,68,65,84,3,213,98,162,49,208,205,238,86,54,186, +128,144,160,252,116,6,66,90,85,129,64,231,249,66,59,200,187,98,231,57,52, +151,102,196,27,10,194,214,204,252,154,7,191,203,91,191,45,8,65,197,214, +16,208,84,52,49,150,100,55,184,231,112,0,140,70,161,195,220,205,149,28, +25,43,182,151,176,34,202,210,57,38,98,146,141,217,213,221,232,227,108,244, +121,107,242,122,7,3,242,94,102,210,166,107,52,39,142,36,169,51,245,85,166, +166,190,193,123,84,84,221,144,116,89,138,105,194,30,237,103,75,173,113, +64,173,177,173,214,205,223,124,99,16,242,86,122,188,247,190,20,234,186, +12,59,161,138,184,138,154,27,16,61,44,34,143,201,233,193,120,120,144,211, +209,135,138,37,162,30,23,234,20,208,37,214,22,169,129,130,249,127,112,187, +231,179,239,82,200,105,33,140,89,56,134,21,49,171,48,104,54,109,169,154, +251,144,240,28,58,204,93,63,98,210,206,25,223,13,108,171,108,236,219,90, +86,239,250,85,175,181,100,37,223,186,33,108,146,57,231,91,36,138,100,140, +76,0,68,76,142,119,167,185,56,0,0,1,0,73,68,65,84,211,241,74,207,47,198, +51,42,124,0,93,148,157,11,162,208,136,164,208,36,155,129,6,50,138,40,72, +133,56,125,116,115,48,178,88,149,146,145,12,230,116,177,117,92,85,155,34, +35,29,119,196,24,127,85,203,93,204,247,232,99,37,3,235,240,71,220,222,105, +24,112,246,191,29,92,32,113,255,176,57,148,254,125,211,104,232,77,211,200, +111,23,109,109,183,162,177,108,118,32,188,229,30,197,232,165,140,170,220, +63,135,176,43,182,153,2,36,64,224,2,48,117,29,80,136,63,173,54,59,194,146, +197,82,179,2,104,17,40,251,156,24,44,33,69,90,72,6,200,38,69,21,104,148, +76,117,8,156,222,130,42,241,92,155,181,143,98,245,67,200,123,79,229,249, +91,72,59,78,131,71,84,137,124,112,115,136,67,221,45,188,17,247,84,172,117, +101,178,233,52,184,186,186,11,61,151,128,147,1,78,135,151,165,77,235,67, +157,224,8,43,228,158,128,201,180,95,163,183,247,94,227,124,227,161,4,206, +67,19,223,161,81,112,83,190,241,166,203,141,30,58,190,31,84,83,204,238, +193,196,143,242,108,141,102,99,0,0,1,0,73,68,65,84,192,117,9,164,142,180, +25,19,130,8,47,6,182,86,161,136,104,208,26,168,106,59,209,115,104,42,213, +208,195,100,87,80,193,7,24,206,24,209,90,136,86,123,188,245,172,234,235, +27,41,233,68,240,189,165,114,147,82,83,207,69,40,213,155,117,85,210,50, +106,36,134,238,86,242,169,205,17,13,94,133,46,153,66,55,113,35,162,153, +177,208,133,166,198,81,220,108,214,9,96,230,44,58,128,82,67,81,21,187,57, +149,202,121,13,234,60,30,124,0,180,28,204,253,217,191,255,161,81,112,83, +107,122,112,52,29,144,67,199,63,56,219,108,199,55,218,182,67,79,155,162, +237,38,79,208,26,84,73,85,173,69,153,102,254,159,84,222,186,230,54,149, +52,166,66,107,212,172,235,178,133,16,180,212,145,192,38,62,143,183,176, +197,216,17,113,144,25,9,120,131,112,76,187,212,166,217,183,213,111,134, +210,49,200,107,73,34,90,86,149,23,120,169,189,85,55,7,225,110,144,100,81, +99,23,100,8,72,152,211,224,230,116,186,192,133,209,146,202,141,110,16,223, +101,66,154,69,174,43,177,98,134,107,242,159,246,0,0,1,0,73,68,65,84,69, +34,124,51,105,122,49,239,222,66,172,59,10,127,248,170,111,104,173,111,118, +211,110,110,173,15,108,63,60,219,236,217,23,113,215,246,30,159,226,220, +9,158,19,193,132,112,198,132,84,176,65,42,129,48,225,218,92,198,226,86, +109,209,38,179,143,212,201,220,5,213,90,215,89,97,134,183,155,102,207,70, +227,27,74,170,147,251,29,68,25,107,93,150,168,36,213,164,150,90,137,187, +66,29,177,76,147,196,212,0,128,140,229,174,89,231,41,115,143,117,156,108, +103,187,148,194,233,34,69,177,99,124,187,128,147,230,150,112,60,220,43, +111,89,186,45,22,135,52,218,52,160,161,152,182,255,65,83,112,192,186,31, +28,4,55,181,190,55,219,253,224,241,229,144,194,23,26,186,252,229,219,155, +247,31,169,221,150,170,107,1,141,233,193,55,111,243,214,83,148,81,164,48, +36,2,84,184,82,24,107,105,41,215,132,86,86,36,186,136,212,150,2,213,48, +111,145,122,187,17,25,190,225,13,219,106,168,240,54,154,93,33,110,156,135, +168,168,136,10,44,50,246,156,46,145,97,90,236,128,33,212,183,139,146,66, +0,0,1,0,73,68,65,84,27,181,50,6,100,9,217,184,149,124,61,22,155,29,124, +54,246,89,106,120,109,198,181,13,173,81,194,147,94,23,32,105,111,135,177, +246,57,106,41,126,246,33,244,176,255,158,252,188,185,140,215,63,186,242, +45,211,108,119,205,236,36,179,140,144,201,219,150,25,216,104,92,94,68,19, +81,183,235,204,138,131,181,142,166,17,124,85,227,139,7,73,194,107,17,21, +154,93,158,41,113,44,106,81,85,253,70,6,96,79,190,245,173,149,187,129,251, +88,43,90,168,68,86,17,163,213,76,171,208,55,2,102,128,187,27,44,138,35, +178,9,145,37,52,189,70,100,2,121,155,75,45,221,157,158,74,123,66,30,173, +66,103,164,95,168,172,193,38,200,141,9,133,80,230,234,62,237,31,73,224, +251,100,191,21,252,249,115,25,15,233,123,188,141,106,80,102,189,17,247, +30,159,173,127,250,86,240,156,72,156,212,55,77,136,2,21,156,84,197,149, +200,187,71,131,31,21,186,20,3,127,67,108,189,227,124,162,157,219,117,114, +199,188,181,151,121,162,246,64,113,74,113,65,84,220,20,6,87,122,1,16,165, +249,33,150,0,0,1,0,73,68,65,84,165,16,23,128,231,0,49,209,172,141,161,250, +14,122,6,64,167,163,172,43,188,227,50,70,100,115,71,121,171,238,231,171, +94,166,3,149,41,218,182,225,135,146,237,129,67,46,227,65,151,235,134,106, +125,99,208,114,208,101,60,120,158,65,134,160,253,198,140,33,186,34,34,218, +76,198,100,173,73,193,126,171,236,123,113,195,44,122,194,182,5,109,75,187, +108,198,17,128,230,31,78,170,141,26,239,188,161,165,6,26,182,142,179,122, +109,147,144,107,100,244,145,20,133,0,80,234,66,143,6,110,108,68,230,104, +128,65,32,10,16,174,240,12,247,140,141,59,220,25,100,128,0,209,151,62,59, +156,209,94,66,50,148,146,205,205,225,146,203,109,41,247,156,21,205,120, +222,90,97,164,62,118,139,37,178,131,75,44,139,50,160,204,16,77,201,155, +183,76,100,151,221,17,3,0,158,61,199,247,98,219,21,39,108,246,144,234,54, +224,166,78,227,93,85,253,232,129,175,29,71,82,76,232,148,92,42,51,92,232, +114,145,55,170,73,165,103,225,176,71,138,137,250,232,204,102,2,118,218, +193,124,28,191,55,225,105,0,0,1,0,73,68,65,84,178,146,125,191,200,18,76, +161,144,10,106,89,163,23,164,166,18,238,134,148,237,49,0,82,71,208,69,189, +120,143,116,186,113,36,21,44,61,70,196,5,38,52,184,193,199,204,148,146, +106,82,37,165,44,141,43,116,169,125,204,196,93,72,70,11,130,215,232,249, +93,90,235,93,182,177,205,95,117,109,121,210,219,234,71,97,21,60,224,182, +215,54,203,112,64,139,98,59,80,108,54,29,78,79,115,158,110,134,174,167, +127,102,208,49,172,63,208,160,198,20,151,228,214,17,166,232,206,92,171, +183,190,97,231,226,234,172,222,172,207,182,229,59,64,20,70,23,217,119,47, +162,81,198,98,132,67,28,22,45,154,165,19,141,22,204,136,129,24,203,138, +195,146,106,169,14,16,137,20,120,161,136,32,31,224,167,209,182,115,123, +35,102,111,3,152,3,140,248,171,62,136,74,121,52,175,189,253,246,233,207, +173,88,228,235,53,246,206,106,25,201,29,202,40,80,72,185,89,113,5,147,39, +7,79,18,24,64,196,99,61,96,115,55,192,51,25,5,231,116,49,207,52,49,88,228, +138,236,37,248,88,172,123,86,93,155,0,0,1,0,73,68,65,84,227,174,86,70,30, +236,164,212,211,71,243,94,237,101,11,66,108,231,157,240,144,245,245,124, +117,110,7,192,3,106,125,40,170,247,85,11,153,162,182,155,32,10,165,74,55, +38,237,204,138,37,17,165,38,21,144,78,131,68,207,84,165,56,141,37,25,201, +75,6,223,85,126,186,209,121,19,133,215,42,26,103,25,81,152,185,146,241, +17,15,219,80,218,208,109,251,138,197,97,109,38,106,166,206,45,164,116,157, +153,216,83,70,112,91,251,77,84,205,46,35,87,68,68,2,254,78,181,136,82,48, +52,160,165,73,190,195,163,187,21,43,104,160,155,91,69,233,70,183,200,98, +5,208,208,120,123,193,54,141,55,197,141,217,146,81,7,92,170,131,43,65,2, +47,13,41,102,1,226,242,169,201,183,154,255,211,212,122,39,103,112,66,48, +229,226,119,247,223,149,155,198,93,238,76,182,230,236,146,37,60,58,51,124, +244,156,13,16,118,74,23,73,20,17,11,156,65,41,58,71,17,2,238,34,251,249, +105,84,134,100,222,12,4,53,63,187,117,14,41,234,78,214,102,162,68,224,140, +210,19,6,45,77,163,172,160,0,0,1,0,73,68,65,84,44,221,236,123,89,217,28, +152,84,249,141,65,246,157,245,9,145,130,246,155,86,197,5,9,33,238,110,200, +20,228,186,2,142,211,189,104,29,89,2,228,129,179,157,172,9,79,101,190,51, +210,220,167,210,243,185,114,121,177,166,238,13,92,84,194,142,148,56,16, +106,118,85,125,172,197,106,78,212,30,0,143,48,205,92,189,27,201,37,19,141, +16,195,32,92,221,232,6,141,221,95,7,93,177,235,58,24,124,149,66,53,27,225, +14,72,73,114,31,109,220,184,100,228,204,40,4,229,6,210,67,122,129,66,18, +85,85,33,78,3,92,53,150,49,118,30,224,167,201,84,136,237,194,144,84,231, +18,42,96,240,214,202,210,48,132,160,48,1,20,87,150,238,122,18,13,246,68, +44,146,172,101,138,199,212,150,78,197,117,69,139,214,236,34,131,43,114, +119,13,21,118,176,53,25,214,186,149,16,57,224,2,152,18,180,88,25,187,210, +209,4,173,204,72,94,255,179,58,154,171,181,46,187,78,16,1,245,179,104,172, +213,204,100,51,10,214,167,255,138,234,123,35,242,230,118,153,32,243,140, +216,154,83,235,4,54,0,0,1,0,73,68,65,84,146,79,50,4,237,0,68,27,42,179, +224,236,156,49,199,33,230,228,235,18,138,48,130,187,129,98,29,158,97,163, +249,74,224,20,167,153,143,128,111,204,123,233,58,241,133,104,159,132,234, +52,16,170,164,194,220,252,0,19,178,215,90,87,179,214,218,16,180,164,39, +41,238,34,234,96,41,56,68,32,149,206,155,113,212,190,101,173,27,204,198, +54,238,219,35,119,87,70,176,123,59,139,72,93,5,189,98,225,208,57,135,36, +184,59,204,204,220,115,32,108,135,187,171,195,196,3,91,11,61,7,182,158, +172,232,182,213,206,17,142,193,54,240,46,188,53,102,73,125,53,172,8,157, +249,137,51,101,164,110,57,138,245,13,153,133,123,188,190,2,160,202,246, +103,57,122,121,49,238,189,31,119,126,131,223,80,84,83,174,109,21,40,226, +140,48,174,112,72,177,60,236,152,243,102,179,30,144,173,135,47,196,7,227, +17,152,9,33,19,84,18,8,120,46,174,210,62,126,154,141,165,174,120,3,104, +125,112,68,98,48,212,46,238,101,225,142,2,66,208,28,80,155,131,235,144, +230,105,78,127,179,82,140,182,210,1,0,0,1,0,73,68,65,84,134,175,179,214, +243,63,56,51,65,111,195,144,148,177,24,186,93,150,63,15,199,35,160,85,240, +216,18,33,62,6,50,40,100,95,168,53,205,5,145,196,231,32,164,177,114,184, +10,126,183,52,102,26,158,140,30,59,216,178,167,152,48,241,108,120,212,56, +241,206,33,102,160,98,10,220,52,245,85,157,169,251,76,231,15,245,229,56, +196,43,127,213,18,29,107,225,10,119,154,10,157,84,192,232,93,98,79,170, +249,198,198,33,143,78,51,186,141,99,38,20,78,23,83,11,18,142,217,188,91, +180,116,142,29,126,122,246,123,70,131,160,145,35,243,63,27,128,216,138, +237,150,247,235,39,209,48,245,36,60,248,199,94,73,203,229,114,189,94,47, +22,11,0,36,115,206,173,217,228,141,132,57,131,4,163,237,135,136,119,201, +123,51,27,36,187,195,99,224,138,211,37,84,100,99,206,8,21,144,128,11,18, +8,119,223,96,168,23,27,8,140,10,115,151,209,170,75,87,164,36,228,136,133, +111,224,147,218,7,56,161,22,213,103,36,87,85,239,208,55,168,48,165,168, +52,1,32,123,13,223,112,75,138,147,109,69,0,0,1,0,73,68,65,84,255,231,169, +40,62,123,20,193,108,4,249,56,163,170,220,39,70,101,58,25,56,68,109,151, +64,140,47,105,69,86,243,237,5,202,76,10,209,134,221,77,141,126,206,3,224, +170,132,107,116,13,81,145,174,211,141,94,14,23,195,119,159,254,202,223, +251,193,175,51,167,159,61,251,187,191,123,246,183,207,63,127,182,126,120, +170,34,73,212,97,182,114,174,185,88,46,150,233,232,124,56,61,57,57,233, +83,111,217,8,46,250,5,201,205,102,128,229,234,70,9,85,201,84,185,145,161, +152,215,64,224,162,160,146,146,87,57,220,77,64,220,125,244,28,49,242,227, +241,81,47,125,39,11,17,201,150,221,93,69,85,147,33,207,20,126,50,99,83, +13,251,62,146,227,46,27,1,95,221,82,99,75,168,36,73,161,176,75,126,186, +111,125,42,52,92,41,97,25,205,1,150,53,97,157,174,91,211,184,207,180,216, +246,110,55,114,210,44,76,106,111,174,211,6,78,239,239,238,87,143,84,212, +122,139,231,142,65,199,45,189,157,125,108,27,37,149,127,172,5,255,231,8, +126,54,163,238,34,251,217,228,219,220,25,105,79,0,0,1,0,73,68,65,84,124, +38,28,238,210,116,80,124,102,43,171,247,85,74,5,37,74,198,181,239,150,79, +31,63,117,29,79,30,29,189,200,157,153,173,207,178,35,83,97,25,217,60,117, +186,120,184,164,169,103,210,21,96,30,93,132,73,58,148,22,145,165,190,128, +112,184,121,179,223,37,172,66,55,175,121,109,58,237,88,27,231,50,240,122, +105,20,181,173,166,51,174,123,190,241,122,217,109,4,124,179,91,182,43,243, +179,169,244,14,132,209,18,132,14,4,109,1,143,126,170,165,113,117,253,33, +224,174,146,28,14,143,54,215,209,94,82,194,172,237,69,31,94,242,188,119, +183,11,231,52,222,164,52,226,221,124,231,166,132,133,81,1,118,222,41,169, +128,87,176,207,212,31,194,183,38,10,155,86,185,217,26,85,86,243,191,119, +135,13,174,238,238,240,41,87,164,210,180,117,170,190,33,152,113,38,52,143, +154,34,2,85,152,160,239,123,139,213,114,13,73,245,225,131,71,253,81,122, +146,31,167,103,233,139,47,95,156,93,158,34,49,45,101,140,12,29,104,90,113, +181,26,82,242,174,239,146,202,152,173,235,180,221,160,139,183,0,0,1,0,73, +68,65,84,95,44,220,55,213,41,12,61,46,115,151,34,209,41,84,90,109,148,0, +0,80,42,64,24,221,0,11,151,54,169,106,146,78,83,52,109,138,125,189,222, +173,233,70,112,203,111,188,110,120,223,229,106,4,115,97,83,108,136,187, +131,145,111,29,124,130,56,92,168,197,199,130,135,187,88,60,203,90,214,229, +211,143,35,150,68,154,77,195,53,161,20,177,14,199,158,237,5,166,205,172, +174,183,163,213,221,57,87,166,173,84,167,6,45,204,107,152,190,17,136,8, +36,104,211,55,98,219,200,110,239,25,99,130,180,134,124,38,60,179,109,185, +227,117,69,155,134,246,72,103,15,229,166,205,199,32,90,86,48,1,92,168,130, +36,240,4,61,90,140,163,195,177,94,173,117,236,68,176,232,23,154,248,241, +163,239,119,195,209,194,95,162,183,172,195,249,112,58,140,3,29,174,41,231, +145,29,122,38,152,14,54,250,104,218,0,182,132,221,37,69,130,37,82,84,34, +15,66,215,210,220,172,78,113,110,238,25,112,38,161,80,85,186,174,75,162, +74,217,194,230,97,205,234,168,168,250,252,38,46,99,235,78,150,251,3,0,0, +1,0,73,68,65,84,184,231,181,109,251,45,53,251,74,148,49,40,62,53,150,122, +92,208,65,99,137,143,152,215,137,40,252,174,26,112,105,84,92,49,213,160, +195,0,111,236,250,164,151,12,245,224,129,237,91,167,51,71,192,190,79,153, +10,111,93,206,106,218,169,170,105,3,31,21,19,215,225,212,212,183,18,218, +117,86,153,194,70,0,220,105,147,125,158,127,106,114,114,183,232,168,8,39, +181,179,111,255,234,77,159,14,5,110,161,217,101,1,76,37,194,130,38,115, +247,245,229,154,162,93,74,29,85,40,31,61,252,86,143,163,167,15,63,176,52, +156,174,95,249,75,158,111,206,72,101,215,51,11,61,33,117,166,24,7,100,29, +97,195,162,23,146,168,173,19,168,97,111,33,150,80,152,16,145,200,177,118, +1,74,236,55,172,117,116,216,85,164,196,46,244,176,218,153,2,188,188,37, +221,215,89,171,112,218,175,141,50,222,94,143,247,220,193,250,93,205,233, +45,71,119,175,116,174,120,121,192,17,158,152,16,72,185,28,151,192,214,37, +134,2,159,212,162,170,91,101,50,226,139,154,149,223,221,78,206,21,113,23, +207,1,219,0,0,1,0,73,68,65,84,230,192,85,37,141,221,27,8,169,193,220,102, +221,203,222,87,190,215,203,5,54,53,157,29,159,40,137,183,109,83,53,207, +177,198,248,124,207,9,230,160,158,203,204,29,152,172,132,215,188,174,72, +254,185,97,156,129,222,57,50,144,163,243,108,85,107,207,112,81,161,115, +28,199,141,13,236,169,29,157,190,206,155,142,221,227,227,199,232,124,209, +45,18,116,61,174,36,241,239,62,251,41,136,110,1,31,54,210,137,11,83,175, +54,112,200,148,48,199,73,144,138,2,147,52,45,246,38,46,91,42,130,136,146, +219,232,219,47,72,42,93,210,46,105,23,73,7,51,220,198,122,75,170,82,115, +139,189,190,94,182,176,53,222,6,132,92,137,252,144,20,74,155,247,195,24, +70,135,16,167,183,76,142,233,199,1,186,86,62,219,75,223,246,72,217,138, +165,139,175,56,116,128,248,254,237,140,8,207,22,64,0,208,134,1,182,238, +33,220,197,247,237,30,216,122,15,230,174,216,122,23,117,219,180,106,194, +22,197,110,45,186,185,181,187,55,31,115,155,15,129,75,213,241,237,95,135, +114,78,14,137,32,196,2,24,69,0,0,1,0,73,68,65,84,205,74,237,233,116,149, +232,185,108,170,20,19,56,108,180,204,156,215,204,24,206,87,47,83,167,93, +159,132,60,210,163,229,147,111,130,78,225,197,217,74,146,24,108,51,174, +7,179,110,145,232,154,7,23,170,11,161,2,163,103,184,162,172,44,218,101, +214,117,96,64,58,40,21,69,176,52,199,73,73,186,62,245,93,234,251,212,79, +247,194,39,87,162,157,247,150,123,241,90,91,253,85,244,9,153,159,74,33, +166,42,233,16,40,169,224,165,171,131,142,64,88,113,186,131,94,64,119,40, +78,109,25,113,69,247,220,247,111,231,220,52,206,244,158,142,221,93,99,71, +105,234,62,29,12,8,158,101,91,239,166,89,18,115,221,45,86,248,202,65,202, +156,49,127,103,62,108,204,102,149,222,179,237,82,102,131,41,134,89,253, +190,235,239,251,238,77,101,148,12,70,87,253,82,138,36,2,122,64,89,129,33, +231,60,130,20,27,108,147,210,66,132,102,57,175,77,85,22,203,133,170,152, +229,223,254,141,127,224,244,211,139,87,159,189,248,236,124,117,6,199,56, +216,152,135,116,116,132,88,86,46,66,40,229,230,55,0,0,1,0,73,68,65,84,152, +22,41,154,16,100,130,22,41,50,52,41,221,25,40,165,205,170,168,104,210,164, +154,146,118,170,9,181,141,76,185,187,211,5,108,93,205,27,94,117,82,213, +185,157,46,115,196,109,116,93,28,94,210,202,1,129,136,117,54,114,240,243, +208,190,18,188,166,130,137,0,108,53,27,152,108,233,167,240,49,166,158,162, +7,17,252,163,15,185,186,79,219,223,234,98,219,234,89,94,100,100,52,135, +173,1,218,120,167,133,88,234,192,247,153,75,90,142,214,94,99,122,193,230, +207,57,180,85,223,108,99,229,60,119,96,103,40,127,43,33,171,125,15,224, +106,87,134,153,151,29,136,246,117,179,213,24,108,126,153,179,144,253,52, +119,207,159,222,144,87,36,85,20,72,200,128,100,106,22,88,231,146,59,25, +86,121,133,97,185,88,140,134,97,51,144,190,217,92,4,61,161,170,93,215,187, +229,174,147,148,250,205,233,229,241,241,241,251,203,143,30,124,248,72,147, +118,125,119,122,246,234,211,207,62,179,225,60,38,91,163,35,105,234,53,117, +73,84,53,247,85,43,196,152,168,74,73,164,140,227,186,225,238,125,91,0,0, +1,0,73,68,65,84,75,170,41,45,251,229,178,63,234,180,83,10,179,229,154,89, +89,174,169,130,216,168,233,158,223,157,162,6,50,145,214,225,22,206,169, +188,187,236,111,125,85,2,69,1,179,252,161,250,213,100,203,72,172,198,60, +194,28,86,11,97,42,108,169,71,218,255,21,211,148,21,254,94,85,42,238,16, +65,245,227,172,65,242,201,53,44,119,205,38,4,192,54,28,32,82,195,61,219, +55,125,58,129,185,203,56,223,113,231,143,3,219,15,241,235,179,148,44,84, +59,93,175,108,66,219,211,254,156,95,231,236,244,212,11,26,140,168,185,75, +160,42,78,101,130,64,180,112,142,155,22,236,84,206,241,104,134,240,226, +114,214,116,84,202,77,250,174,79,93,234,151,189,168,168,170,167,77,206, +227,48,14,235,97,61,140,195,152,199,213,56,58,134,78,70,81,77,169,239,2, +231,66,224,48,183,71,15,31,39,77,125,215,47,210,162,75,125,105,146,237, +204,165,253,254,21,112,113,107,222,122,207,109,191,11,169,204,181,120,1, +203,245,141,176,146,46,147,202,205,102,97,9,76,92,230,35,111,56,74,175, +191,221,69,28,162,0,0,1,0,73,68,65,84,18,175,156,200,142,146,181,227,214, +63,167,158,69,219,214,113,22,212,217,54,168,53,161,116,78,79,207,249,212, +29,157,140,228,0,236,71,58,123,182,31,226,215,167,175,154,190,49,196,246, +238,47,53,186,21,120,173,12,6,7,52,82,166,133,142,104,38,78,201,6,9,253, +22,165,184,75,96,39,153,29,195,61,231,236,14,51,143,192,243,178,95,172, +47,215,146,36,117,106,217,135,205,160,170,79,158,60,133,152,89,206,150, +135,60,140,121,24,242,152,45,187,219,229,197,121,215,117,139,197,209,98, +177,232,186,69,241,178,220,31,63,124,40,148,164,169,52,106,116,184,181, +100,244,109,180,186,51,61,223,136,183,222,9,149,223,25,111,61,177,32,181, +111,147,207,93,168,106,36,183,63,132,88,58,61,118,136,10,153,186,96,193, +161,116,229,217,243,222,50,135,51,252,177,61,185,211,235,234,172,109,83, +76,245,51,245,140,143,134,21,175,230,127,226,167,15,143,153,242,117,51, +24,210,120,244,118,192,157,237,135,248,245,173,227,115,126,1,147,6,180, +247,189,157,39,38,53,40,223,88,147,49,211,158,95,136,0,0,1,0,73,68,65,84, +128,74,254,10,8,55,117,168,171,32,82,70,8,184,69,130,67,118,119,119,51, +115,247,28,175,68,36,109,52,91,78,93,2,250,156,45,175,198,174,239,142,143, +143,243,0,74,234,180,95,244,39,162,37,219,220,233,175,94,190,72,93,90,244, +139,190,95,164,148,200,82,54,146,180,52,164,132,211,220,205,204,178,205, +241,131,3,82,82,196,11,227,119,27,222,90,85,239,134,9,169,40,167,157,98, +225,173,169,238,30,60,128,249,148,139,87,8,157,217,3,138,215,34,90,192, +74,213,254,173,212,152,189,82,199,248,92,31,88,8,181,171,234,146,183,192, +64,123,217,172,236,20,94,129,7,102,157,27,228,73,251,185,125,132,109,27, +62,59,153,214,78,109,239,246,157,39,52,105,255,44,7,119,251,219,107,118, +80,220,175,250,121,111,94,66,61,171,24,125,69,69,188,29,41,212,197,77,9, +53,77,84,135,148,213,78,132,144,148,146,187,229,76,43,205,1,138,142,219, +104,102,230,226,2,129,123,222,100,58,115,151,243,8,209,178,40,57,161,113, +11,8,127,242,224,189,112,12,133,20,47,169,27,206,50,129,0,0,1,0,73,68,65, +84,170,32,80,150,0,130,149,246,93,230,110,230,158,52,97,235,254,85,107, +125,59,222,250,14,243,173,119,164,168,181,36,103,180,84,32,73,171,101,162, +108,9,162,37,41,174,114,59,197,172,184,151,48,91,161,177,121,160,150,85, +169,205,242,97,166,52,219,124,227,228,219,153,181,84,105,184,79,175,155, +23,176,99,77,225,62,85,208,212,67,77,247,126,102,197,131,176,46,104,0,187, +60,250,132,26,182,183,31,226,215,75,27,154,29,52,2,20,16,130,122,184,250, +2,17,78,98,155,20,107,80,171,108,102,225,82,232,209,128,200,132,208,0,33, +51,181,142,133,214,188,104,209,60,66,183,94,111,226,207,97,51,80,104,230, +121,204,155,245,70,60,153,5,191,228,48,135,22,44,184,92,44,220,221,179, +229,209,114,116,122,142,118,4,57,149,219,27,44,23,235,195,42,86,181,222, +221,162,197,68,157,115,110,204,91,183,103,252,250,221,111,34,113,26,125, +234,204,221,114,206,52,203,217,188,164,129,148,165,25,195,137,46,191,230, +243,57,154,57,44,54,230,80,211,162,234,236,20,99,217,24,7,26,59,99,184, +0,0,1,0,73,68,65,84,206,148,116,246,66,36,205,173,241,181,234,18,95,176, +125,132,105,126,225,214,17,218,47,217,207,163,239,204,76,109,251,33,126, +125,118,18,59,232,189,229,162,108,125,53,84,154,133,168,86,22,128,83,4, +240,54,233,180,238,19,89,224,226,34,21,91,71,187,14,138,184,152,129,244, +104,82,74,34,50,163,60,59,136,60,230,203,139,85,1,27,238,151,23,171,133, +246,20,186,169,152,120,82,113,137,242,213,188,241,90,115,237,36,60,90,192, +56,49,198,205,139,111,133,211,124,166,166,149,200,221,193,12,196,77,121, +235,107,223,189,3,17,77,226,102,32,35,117,213,172,102,130,160,77,112,226, +102,148,66,82,109,205,248,109,74,62,220,252,168,241,217,53,200,29,191,216, +62,199,58,61,196,248,152,15,227,242,81,84,254,177,29,112,194,19,83,14,198, +150,173,45,213,105,19,144,157,251,110,216,209,185,29,8,178,181,253,16,191, +62,231,86,118,183,79,74,63,115,25,68,124,118,87,189,90,110,105,147,98,252, +23,121,193,0,205,119,152,144,248,223,103,55,181,129,73,146,125,223,131, +8,3,99,191,171,230,0,0,1,0,73,68,65,84,229,206,212,39,56,198,113,236,168, +112,152,103,102,112,40,235,215,145,24,21,100,237,45,169,165,143,0,13,204, +138,50,25,70,26,91,36,73,180,162,184,201,69,8,192,177,253,224,223,20,33, +167,148,82,76,46,93,215,161,174,203,248,134,31,190,42,59,208,156,44,196, +77,81,40,37,107,49,78,241,32,174,200,48,12,94,148,71,189,86,22,0,216,96, +141,153,39,26,15,132,96,222,172,68,85,163,22,216,34,37,76,85,101,176,77, +157,148,183,176,237,84,143,48,247,180,201,157,142,163,51,112,82,177,245, +220,181,11,187,134,217,129,39,162,173,162,152,216,60,225,217,201,82,99, +174,147,245,128,211,183,184,35,162,152,251,248,117,178,37,214,206,6,139, +187,195,136,82,179,49,251,46,120,150,162,34,2,23,15,168,224,112,29,46,165, +19,64,199,145,200,76,157,168,40,140,52,74,128,224,186,80,86,220,138,1,155, +48,220,209,14,55,212,84,192,117,30,72,138,139,186,8,68,33,116,33,57,248, +58,18,40,68,68,114,105,76,73,130,186,42,94,172,83,74,1,152,176,16,142,241, +83,119,6,208,82,0,0,1,0,73,68,65,84,41,45,135,59,68,230,137,170,190,117, +115,15,203,110,148,241,206,57,236,29,158,124,78,158,163,78,150,87,165,189, +133,250,252,164,4,165,27,194,106,38,85,106,82,111,177,112,49,221,54,186, +51,114,37,57,215,178,253,231,121,232,157,168,137,156,140,126,3,55,229,68, +182,249,242,67,219,235,73,99,58,218,204,187,156,222,110,179,132,28,226, +215,125,119,127,160,82,29,179,175,175,64,169,13,131,216,193,204,93,28,112, +21,53,137,54,34,109,201,34,33,35,122,82,224,236,76,173,217,106,13,67,83, +227,55,128,218,85,47,62,0,115,135,25,162,147,134,51,78,164,230,163,181, +87,108,103,140,25,89,51,121,134,21,77,207,108,247,149,23,215,202,46,193, +87,238,243,29,228,94,215,211,136,88,81,85,229,157,35,95,85,229,128,116, +87,37,121,55,3,176,115,80,25,57,233,21,79,4,90,207,19,216,192,28,154,93, +3,202,14,168,117,160,213,105,40,53,23,176,117,215,217,229,203,177,119,251, +44,204,216,142,22,230,119,7,116,85,171,47,19,210,168,135,113,148,50,130, +25,254,174,175,127,4,51,142,0,0,1,0,73,68,65,84,109,26,215,62,63,84,53, +3,197,5,22,184,185,193,161,41,9,0,87,241,164,145,197,111,194,44,70,101, +228,101,89,85,235,152,0,116,122,154,53,223,159,113,158,13,48,196,237,9, +223,66,60,92,121,70,14,153,215,246,8,210,148,184,166,86,76,168,185,89,235, +250,26,104,166,186,113,124,109,96,92,135,174,119,251,91,127,21,214,122, +254,122,103,234,108,186,142,102,149,103,106,29,220,105,72,135,110,238,13, +121,117,142,90,159,128,166,83,158,97,85,135,216,254,139,239,7,136,253,13, +36,228,64,195,223,6,82,167,63,227,197,52,12,182,248,242,67,175,177,127, +127,76,4,121,27,0,77,155,118,128,52,234,69,206,82,103,39,130,144,147,253, +118,0,220,50,234,156,26,65,196,65,93,37,153,0,34,162,170,177,66,23,164, +164,68,187,204,173,117,209,63,153,112,54,89,128,74,160,241,166,134,21,28, +78,8,110,235,86,86,235,204,157,189,155,130,3,117,132,20,13,110,234,200, +217,79,69,100,215,73,218,65,210,119,174,214,135,14,219,116,122,47,10,10, +157,102,44,173,235,238,238,173,14,168,33,0,0,1,0,73,68,65,84,11,89,20,119, +200,202,127,85,181,217,198,69,177,128,62,205,123,165,209,106,181,0,62,5, +195,175,156,225,129,233,45,244,198,183,212,11,64,93,215,122,66,67,245,13, +236,223,14,94,177,178,211,110,152,189,213,88,29,219,63,66,118,96,38,16, +236,134,180,17,208,24,250,217,104,105,136,191,120,143,112,97,2,129,130, +148,75,71,61,208,157,145,73,94,65,130,23,139,41,205,44,71,207,147,185,246, +34,20,61,172,184,4,132,110,245,125,219,206,208,244,15,183,116,123,114,79, +119,62,83,81,9,43,114,217,199,148,92,145,61,171,17,124,165,50,255,58,84, +251,221,46,201,103,176,187,18,76,197,156,71,74,150,187,155,152,155,155, +68,100,7,142,100,209,234,172,176,30,17,60,240,82,237,210,30,47,102,48,244, +218,19,187,178,125,190,122,193,76,179,233,123,249,114,0,7,120,244,89,224, +102,174,202,77,227,26,44,1,16,141,43,219,137,239,240,235,115,130,177,30, +213,56,179,225,156,6,130,85,63,99,87,173,53,149,206,10,162,181,85,13,9, +113,138,69,235,102,107,238,6,201,210,233,80,172,205,0,0,1,0,73,68,65,84, +88,162,61,169,9,219,136,207,93,201,10,79,104,180,202,13,202,12,182,180, +207,53,163,92,117,189,29,120,166,215,117,170,153,140,244,117,143,106,38, +119,186,46,227,62,241,173,41,119,250,10,110,159,100,211,114,204,158,220, +28,159,168,232,4,78,232,238,165,123,142,80,204,114,206,22,70,217,29,22, +127,79,23,178,13,198,15,181,120,60,16,157,47,53,151,104,46,227,164,126, +251,249,114,199,222,237,152,200,179,18,39,41,71,172,78,229,142,210,11,183, +162,157,59,190,238,246,24,155,180,28,91,219,1,128,82,154,142,53,250,79, +194,6,168,155,59,140,2,77,166,201,84,76,97,116,151,214,179,35,62,18,202, +167,174,59,207,174,252,78,241,126,209,225,9,20,151,191,218,146,184,165, +106,166,25,223,55,197,214,21,164,205,209,200,107,101,203,90,79,55,230,238, +44,247,92,95,231,7,223,139,61,230,59,180,115,40,198,27,82,224,134,71,179, +62,6,216,72,218,101,19,210,224,197,61,177,156,9,102,76,120,221,203,147, +158,155,209,93,57,68,132,80,106,213,105,81,231,45,3,130,131,24,134,45,179, +0,0,1,0,73,68,65,84,124,249,149,237,245,8,117,133,17,15,5,159,30,181,55, +45,119,250,52,204,252,42,191,94,191,162,156,9,130,197,172,48,202,39,85, +64,16,100,213,92,215,27,72,15,190,88,220,149,226,117,93,80,8,73,115,65, +101,66,226,246,133,54,170,107,83,168,185,90,207,155,221,181,17,234,147, +90,239,194,144,105,182,155,225,62,78,255,55,136,49,87,224,25,107,210,62, +112,45,184,78,139,197,98,179,217,244,125,31,179,124,232,211,29,70,212,111, +113,168,29,115,30,82,18,23,89,112,92,219,62,142,163,195,69,209,102,101, +21,209,78,204,38,235,62,151,56,206,85,171,179,26,199,230,95,146,237,37, +198,33,151,115,42,126,83,177,39,25,155,173,71,211,108,75,73,164,109,219, +235,121,150,110,79,219,24,158,144,22,53,228,252,161,149,212,9,96,98,178, +43,158,178,66,197,135,6,84,68,114,104,237,152,112,64,226,56,172,35,0,192, +218,214,208,40,211,48,119,154,169,64,136,46,22,126,163,184,148,192,89,25, +147,94,50,201,231,120,215,1,64,235,253,105,200,24,0,104,28,1,66,204,236, +155,190,130,0,0,1,0,73,68,65,84,69,92,156,140,238,212,52,90,29,41,136,186, +94,176,206,96,5,133,8,40,18,171,220,151,238,73,94,82,131,106,183,36,250, +86,190,245,85,109,249,234,170,99,238,88,14,157,231,213,224,255,252,197, +142,180,253,27,182,105,191,91,148,171,154,156,98,225,234,223,117,218,108, +231,51,51,32,109,26,5,102,141,22,118,206,243,208,228,121,32,180,192,137, +122,118,76,125,10,194,131,155,131,162,185,5,60,32,251,246,23,17,192,235, +138,116,181,141,175,139,132,219,232,102,40,13,91,234,65,106,147,49,78,58, +60,187,17,51,176,92,255,102,195,202,205,72,52,213,157,24,142,233,114,11, +220,185,238,58,218,239,215,152,235,253,188,245,207,161,28,58,201,54,9,238, +168,117,3,48,59,106,205,234,131,122,248,150,181,237,134,74,48,66,19,75, +17,255,147,179,70,186,19,127,13,78,117,122,229,81,99,154,76,247,136,243, +64,103,218,67,203,68,238,206,233,97,179,9,6,12,107,147,211,14,176,190,242, +189,216,191,127,146,4,56,213,233,13,135,80,156,10,113,135,149,161,228,237, +174,54,176,52,219,19,29,52,0,0,1,0,73,68,65,84,131,191,172,23,208,54,52, +143,176,118,218,107,13,129,155,107,40,147,102,111,129,147,249,52,176,125, +31,80,7,74,85,233,215,171,235,255,239,173,245,222,61,221,219,170,187,147, +211,185,163,214,145,70,220,8,68,10,39,235,93,106,68,234,220,23,82,227,32, +209,15,176,216,30,134,1,156,30,199,110,161,114,149,67,101,16,118,0,212, +215,34,139,153,135,81,116,103,63,143,126,72,14,241,238,202,4,26,74,9,56, +99,13,103,56,232,132,187,120,201,25,240,105,50,105,23,89,20,116,235,153, +92,49,214,145,5,200,194,145,20,237,174,198,26,5,123,79,134,123,26,53,219, +99,212,167,89,2,187,26,127,141,36,85,253,170,201,144,119,44,215,131,141, +185,63,234,149,55,68,244,224,155,229,9,213,127,225,149,40,156,255,55,221, +110,22,8,192,74,121,28,242,37,14,37,140,251,1,181,86,76,148,95,217,173, +184,148,94,29,215,57,227,113,80,185,107,20,102,119,127,45,142,161,85,11, +90,134,115,73,27,177,150,128,62,113,42,115,116,129,201,102,203,21,100,77, +180,130,190,166,217,213,158,107,73,226,0,0,1,0,73,68,65,84,42,83,230,166, +189,233,248,150,197,7,155,251,59,169,243,108,40,189,30,120,237,54,84,248, +5,147,249,16,141,215,129,58,184,29,239,4,192,60,81,96,213,180,135,98,115, +123,115,64,1,47,75,31,77,166,188,188,58,216,117,233,192,230,67,237,220, +189,250,81,45,197,170,206,192,205,238,98,135,203,59,112,156,214,200,97, +107,127,45,189,58,10,139,18,222,25,65,196,34,51,149,116,153,91,235,73,167, +230,42,70,223,114,219,154,181,150,56,219,109,176,81,135,253,46,104,153, +14,113,229,62,205,29,23,206,255,184,78,246,151,17,248,59,9,205,220,72,14, +141,186,217,20,189,245,226,208,7,219,187,59,154,173,162,91,38,189,129,107, +104,13,110,22,236,18,59,160,102,240,109,65,156,185,143,181,115,158,7,159, +198,254,237,237,225,151,51,169,225,28,41,3,109,151,71,63,36,193,159,92, +221,95,41,16,115,100,119,23,70,106,37,233,165,185,156,179,52,27,159,29, +185,205,78,147,89,6,8,90,115,25,231,234,93,214,117,109,160,122,215,198, +215,247,166,215,237,101,179,212,115,15,125,105,137,71,63,0,0,1,0,73,68, +65,84,122,108,120,173,195,120,199,93,157,190,62,185,170,172,135,134,193, +78,155,250,57,230,46,102,38,126,181,201,191,186,78,226,230,238,86,107,242, +80,143,83,192,74,85,232,131,195,239,192,115,224,129,48,208,44,167,163,232, +100,40,57,121,128,71,63,124,111,246,238,175,82,51,175,97,165,120,197,99, +17,35,196,32,134,183,225,93,238,220,85,215,144,179,40,230,14,8,169,73,178, +205,182,183,157,230,250,57,183,197,7,175,129,123,254,124,141,198,166,29, +133,8,95,234,174,22,148,185,67,121,243,177,119,197,157,217,146,166,196, +59,251,28,82,199,224,197,65,198,154,245,20,159,239,63,131,38,229,207,218, +24,96,247,156,125,28,128,137,54,105,198,196,42,207,49,17,103,0,136,169, +43,206,246,99,180,214,137,100,246,46,128,168,55,58,124,63,234,235,118,62, +3,81,32,72,69,161,112,184,229,22,139,137,244,254,105,22,138,4,221,153,81, +197,255,215,222,21,54,185,170,194,208,132,90,231,253,255,159,187,219,202, +251,16,18,66,32,78,109,119,247,86,154,51,115,119,188,104,21,245,16,195, +195,170,69,165,0,0,1,0,73,68,65,84,73,0,0,26,174,94,125,96,106,65,25,1, +210,101,236,108,228,202,97,68,229,193,0,123,57,136,18,114,167,111,1,207, +158,69,98,80,174,39,5,255,45,47,237,77,91,143,51,224,233,226,122,117,1, +177,8,187,189,148,234,69,242,89,244,139,81,198,11,160,78,80,217,159,197, +109,222,94,51,118,15,71,67,17,145,217,40,252,193,125,8,26,255,95,190,42, +216,222,69,123,99,122,63,168,115,55,23,225,139,55,183,131,160,118,214,45, +219,93,125,216,186,13,38,84,152,192,39,249,65,120,186,184,64,155,106,216, +81,96,36,33,86,185,237,80,95,48,91,66,218,6,240,194,52,110,23,211,121,105, +110,120,168,100,102,11,227,138,252,150,40,46,66,90,81,38,123,141,128,197, +42,27,238,162,60,13,91,12,13,155,149,127,146,107,59,198,198,226,98,243, +51,129,33,231,248,38,59,252,226,200,243,115,193,123,100,125,57,182,249, +5,189,43,111,252,19,46,225,46,41,141,1,231,29,69,168,40,195,206,233,90, +213,77,26,86,104,92,236,220,151,39,32,98,2,90,240,4,183,13,18,226,42,73, +159,15,0,0,1,0,73,68,65,84,70,171,59,39,228,25,106,179,98,54,64,101,35, +244,252,173,245,170,255,52,173,117,119,18,64,83,189,246,34,145,191,29,168, +109,181,186,171,67,252,94,180,53,10,59,253,8,180,85,134,206,120,75,97,71, +235,84,20,179,172,244,66,204,37,204,152,149,2,71,180,118,187,146,30,221, +199,197,155,83,158,48,103,4,220,114,78,9,183,4,137,86,73,196,148,100,216, +15,43,156,220,123,84,215,169,244,77,14,221,89,8,1,128,170,130,148,3,149, +149,86,2,137,106,31,181,206,182,133,31,112,66,160,125,55,159,73,238,163, +119,205,223,105,148,237,225,1,208,105,128,138,238,68,115,25,194,92,229, +23,240,233,235,215,242,152,211,178,165,13,51,230,148,112,203,101,9,129, +156,32,167,50,41,21,53,185,50,64,28,80,245,37,12,127,107,114,129,177,225, +36,41,49,173,149,169,46,15,71,239,0,155,124,32,125,140,151,157,144,176, +214,251,144,238,160,233,190,152,46,121,175,180,112,23,51,171,255,53,222, +56,123,219,18,193,180,93,210,6,7,243,197,189,114,254,232,99,78,36,61,87, +223,60,177,46,27,0,0,1,0,73,68,65,84,154,186,136,80,84,141,92,150,34,75, +66,95,232,60,14,215,55,233,173,117,150,206,68,235,91,243,51,173,155,93, +133,155,199,190,175,109,140,231,78,8,138,123,144,199,66,99,210,250,93,253, +227,230,239,33,103,172,2,139,90,25,50,230,196,115,93,54,221,75,159,214, +174,176,225,233,226,158,125,71,4,154,115,154,132,103,10,49,34,98,201,20, +207,82,85,18,187,83,101,21,104,54,215,12,63,203,114,49,219,181,26,168,56, +173,127,214,108,140,120,125,88,9,89,215,149,210,125,100,84,213,220,98,200, +79,221,154,215,213,246,203,229,186,77,5,110,55,157,135,93,107,183,92,237, +112,102,218,144,224,191,57,127,206,223,67,163,119,223,54,177,148,141,213, +220,16,242,5,96,1,26,208,85,86,124,191,235,229,63,0,234,68,128,155,94,121, +10,11,229,1,0,146,214,215,123,110,75,244,189,140,26,98,110,73,182,7,231, +141,11,113,37,95,160,156,239,25,197,249,52,25,124,179,194,77,141,82,195, +58,119,142,111,123,114,160,219,76,9,82,86,21,66,233,211,101,66,248,50,167, +117,119,172,116,55,206,0,0,1,0,73,68,65,84,113,148,33,106,50,96,161,54, +74,101,95,21,65,59,99,94,171,51,176,227,125,185,42,110,246,63,135,162,91, +215,14,193,212,166,250,13,225,5,116,123,153,220,108,88,249,220,25,29,147, +52,33,89,167,46,38,183,113,81,200,47,18,59,204,211,237,243,10,79,216,243, +90,252,11,208,20,45,27,28,249,111,25,138,67,15,92,213,3,237,158,231,208, +132,99,34,202,248,123,56,106,44,134,2,162,102,182,17,88,16,56,172,175,148, +66,168,81,70,4,142,1,33,199,129,148,48,76,102,87,132,228,234,83,215,9,153, +122,239,214,186,205,165,80,78,215,154,104,22,2,173,233,110,126,104,203, +14,60,176,6,139,164,219,219,74,7,254,41,134,65,123,173,183,24,90,51,113, +69,35,44,234,74,233,74,170,200,102,57,154,134,101,138,10,199,189,216,106, +38,219,104,8,104,237,185,33,183,26,61,132,138,143,66,40,48,180,182,244, +22,151,93,53,18,125,169,167,124,235,136,50,254,13,60,123,225,125,30,141, +158,104,180,169,94,20,71,22,37,68,17,167,191,155,132,123,132,107,141,53, +47,36,149,141,219,146,0,0,1,0,73,68,65,84,3,242,64,64,248,38,164,230,137, +75,16,53,107,171,247,82,93,97,0,232,104,61,240,173,209,41,111,93,146,215, +172,107,208,250,173,33,244,213,27,230,0,217,228,248,78,22,35,142,88,166, +228,20,57,156,130,43,25,96,163,41,39,132,156,204,66,214,30,58,223,26,60, +107,45,127,26,107,157,61,186,59,190,181,82,66,244,57,221,9,63,247,241,235, +243,91,7,246,241,180,215,103,123,110,50,221,0,150,16,38,71,158,203,162, +215,25,235,95,40,43,170,139,32,210,156,24,10,161,33,43,73,68,9,204,218, +84,99,245,212,59,69,219,41,135,97,249,160,24,180,142,120,12,203,186,174, +223,223,223,52,185,53,109,220,239,247,55,204,183,254,88,60,24,137,224,197, +178,232,200,162,235,65,213,197,105,71,253,123,133,255,74,88,156,26,69,245, +133,170,81,111,55,110,53,83,64,85,230,206,97,41,85,158,1,64,18,22,77,188, +69,234,137,40,237,5,165,2,89,90,21,55,25,19,196,53,209,92,15,131,117,25, +163,215,56,19,118,116,241,157,242,161,67,47,229,154,100,251,57,27,94,175, +88,91,184,0,0,1,0,73,68,65,84,155,60,90,126,20,86,224,123,229,92,129,55, +132,247,225,221,120,210,38,130,137,98,18,140,224,59,228,73,95,184,67,238, +39,182,159,67,205,224,11,78,159,26,71,95,159,54,180,195,183,191,211,85, +245,174,53,44,31,10,56,143,151,63,122,63,45,38,156,39,36,240,8,116,66,178, +102,149,49,115,59,246,46,183,121,231,208,57,54,175,24,233,31,112,66,94, +249,125,224,77,112,84,23,151,95,13,157,233,161,145,54,78,139,241,179,77, +180,232,31,114,26,116,78,72,24,233,15,135,225,113,159,73,209,151,244,182, +124,199,99,209,138,199,19,229,135,16,249,214,147,99,255,61,246,121,84,189, +197,213,142,74,223,137,236,185,62,188,250,95,43,33,151,203,133,132,234, +156,243,178,44,183,219,77,86,65,15,76,143,158,70,238,240,133,150,247,189, +61,30,154,237,157,43,154,195,60,103,248,193,211,26,212,149,200,34,119,47, +48,13,82,63,79,8,4,197,3,39,199,96,237,152,125,111,41,48,55,230,240,63, +147,241,164,231,184,171,192,135,99,49,233,234,65,235,15,199,28,4,72,17, +142,133,92,163,113,0,0,0,166,73,68,65,84,9,204,135,212,251,214,16,93,198, +192,201,145,214,117,189,223,239,57,103,74,185,166,244,220,48,225,129,23, +129,14,254,230,234,231,88,189,46,16,56,4,171,91,7,2,19,32,153,79,67,132, +99,2,19,32,45,203,130,188,70,4,204,162,239,4,62,28,99,37,36,16,56,53,172, +110,29,214,58,48,1,102,94,66,55,240,177,88,174,215,235,215,215,215,186, +174,192,163,145,99,12,65,224,247,240,83,212,218,63,207,88,9,9,4,78,141, +65,78,72,36,166,6,206,142,241,48,130,64,224,212,136,124,235,192,132,136, +177,140,129,9,49,206,9,9,138,7,78,141,136,50,6,38,68,136,30,129,9,17,195, +5,2,19,226,127,88,68,206,162,106,244,2,253,0,0,0,0,73,69,78,68,174,66,96, +130}; + +static size_t xml_res_size_80 = 691; +static unsigned char xml_res_file_80[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,69,73,68,65,84,56,203, +165,147,95,104,205,1,20,199,63,191,187,63,166,253,185,182,123,23,150,188, +232,218,118,175,221,221,242,224,38,158,150,162,240,226,93,73,17,86,148, +151,81,158,80,123,80,94,152,146,82,242,170,100,81,86,38,209,90,140,238, +182,43,242,176,149,116,39,238,204,159,123,237,207,61,127,60,220,9,13,41, +231,229,212,169,243,57,231,124,207,57,129,187,243,63,86,249,187,224,233, +204,137,172,153,38,84,205,85,245,206,217,244,249,157,127,2,132,150,38,247, +52,97,36,90,235,90,137,53,196,2,81,77,255,173,131,37,128,83,169,222,15, +11,178,80,44,121,137,226,66,17,17,25,251,27,32,112,119,206,140,158,116, +51,69,213,208,178,247,246,198,182,64,76,24,157,26,251,36,162,170,170,33, +17,225,202,238,235,141,75,52,80,83,214,215,198,48,55,204,29,199,2,53,195, +29,226,205,241,176,186,226,110,60,158,120,250,123,17,85,21,117,195,220, +200,21,94,243,113,238,35,226,130,185,19,10,42,48,115,214,133,99,136,200, +31,0,162,100,243,89,26,170,194,172,172,109,225,253,215,60,234,90,30,199, +231,81,83,4,37,82,23,97,207,181,93,46,34,136,40,183,15,12,4,193,207,119, +112,108,240,160,199,155,227,100,167,51,168,25,230,138,184,161,174,52,84, +133,89,83,191,22,51,199,49,6,71,30,112,247,208,96,240,203,29,136,40,234, +138,104,217,235,98,178,154,98,51,243,188,121,249,130,217,217,34,197,249, +2,110,197,31,35,28,189,119,192,69,148,21,53,43,80,51,74,94,42,107,98,138, +152,81,157,119,162,203,43,216,184,117,19,107,154,98,220,127,126,147,225, +236,67,210,221,45,231,66,223,43,39,86,182,179,42,188,138,201,207,19,196, +155,146,36,154,146,36,34,41,58,162,41,100,170,72,170,173,19,13,41,157,171, +183,161,65,137,116,199,102,128,35,149,0,37,17,4,37,243,238,25,27,162,157, +76,188,157,36,151,159,66,85,137,134,163,204,124,206,83,21,212,177,163,125, +63,0,199,187,46,211,63,222,7,220,170,169,4,144,146,160,102,36,34,73,68, +141,92,126,138,27,123,251,3,128,237,151,186,188,80,152,230,121,110,136, +209,220,35,122,182,93,165,119,96,31,53,21,203,0,230,202,0,17,158,188,26, +65,84,89,92,209,220,15,97,197,168,175,13,134,199,134,130,205,201,45,244, +143,247,81,29,84,242,40,243,0,224,98,240,175,239,156,238,110,233,5,14,3, +245,192,23,160,111,248,66,174,231,27,213,92,106,37,70,145,199,248,0,0,0, +0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_81 = 1597; +static unsigned char xml_res_file_81[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,6,0,0, +0,224,119,61,248,0,0,6,4,73,68,65,84,72,137,149,149,123,108,150,87,29,199, +63,231,185,188,207,123,239,149,94,222,182,244,182,182,86,64,39,117,23,98, +128,108,96,70,166,44,211,100,211,112,249,71,148,196,136,26,199,130,206, +65,130,91,89,36,24,162,137,46,46,76,183,185,155,154,17,201,112,49,113,154, +65,208,89,51,10,148,82,218,178,118,188,163,165,237,219,245,246,222,159, +235,121,252,163,133,205,209,44,250,251,239,252,114,242,253,252,190,231, +228,156,175,80,129,99,159,238,96,198,53,153,206,228,153,182,29,166,242, +69,46,90,46,45,241,18,182,182,55,176,161,222,225,235,39,124,98,63,252,39, +238,232,89,22,198,167,201,78,130,61,55,132,12,180,224,207,190,5,0,165,107, +17,101,22,72,31,252,197,150,230,3,50,224,35,61,255,70,239,127,43,31,220, +76,247,210,226,27,0,136,210,163,183,108,83,0,124,5,16,255,143,184,143,239, +47,51,142,231,221,210,87,124,62,73,124,57,79,62,82,250,216,150,131,16,223, +103,253,246,51,135,69,117,247,151,58,118,188,3,150,5,158,132,143,64,180, +91,36,150,166,243,144,184,158,68,74,201,141,195,243,1,41,125,28,203,69, +102,204,134,221,135,247,92,187,251,246,106,54,220,215,185,239,249,63,244, +189,140,83,220,129,27,192,87,53,196,210,208,202,199,167,243,164,196,178, +29,114,64,190,80,184,211,182,109,164,39,145,248,248,82,226,216,46,249,156, +181,245,209,95,62,112,173,181,185,148,225,177,52,66,113,249,222,158,187, +182,127,246,192,15,124,44,187,20,207,195,247,36,190,39,255,27,224,73,137, +101,217,164,129,215,246,238,253,224,47,175,253,254,223,217,108,238,49,199, +182,144,120,56,182,75,177,96,31,250,209,83,15,191,30,137,232,92,207,216, +100,164,160,160,41,252,253,82,154,43,163,25,212,218,154,123,140,218,90, +130,137,4,193,68,98,233,146,1,41,37,182,229,144,53,237,242,159,63,190,79, +118,126,225,174,202,130,157,225,145,195,79,62,101,229,50,191,179,201,98, +230,139,39,191,253,221,205,63,182,60,143,148,41,41,10,5,25,50,184,124,221, +230,76,95,1,53,108,130,98,246,72,97,33,21,11,95,179,208,128,37,235,14,133, +124,126,213,79,186,31,191,84,218,80,79,58,57,132,46,28,74,34,14,181,93, +91,118,222,123,247,238,157,245,235,27,153,201,205,81,116,193,67,65,143, +232,12,205,122,244,12,154,24,225,116,46,63,48,222,229,229,34,147,158,30, +69,13,4,80,3,98,17,224,120,18,179,104,126,117,207,19,143,29,55,98,97,138, +227,35,232,190,71,141,252,128,215,223,46,242,155,182,110,26,63,223,73,54, +63,143,237,171,160,7,144,42,216,170,202,202,6,13,89,22,165,231,141,247, +183,200,7,238,191,242,208,38,131,250,154,74,158,254,237,12,206,73,80,132, +16,56,138,250,196,174,131,251,143,27,134,142,151,26,67,205,47,16,203,142, +241,139,225,122,158,89,247,2,117,107,90,177,139,25,114,82,195,84,203,24, +177,226,204,138,40,166,17,33,163,27,84,213,134,232,218,182,233,31,254,130, +190,49,63,15,102,38,142,91,4,223,5,229,155,225,0,45,137,21,7,10,115,41, +140,72,8,93,83,48,164,73,200,206,177,194,176,17,149,81,44,213,199,20,1, +50,90,140,43,133,9,54,174,217,201,156,251,6,227,142,69,86,129,177,2,204, +74,159,111,61,184,255,84,38,205,147,150,169,224,57,139,207,65,141,234,176, +62,108,30,44,58,14,177,234,106,98,33,13,29,23,77,117,185,39,114,137,166, +129,19,188,90,185,157,84,121,128,116,110,152,71,238,59,192,230,182,106, +58,107,78,209,59,86,228,170,187,26,83,243,249,74,197,54,238,175,113,217, +176,234,193,13,231,82,231,186,250,47,46,188,202,8,136,131,33,184,163,67, +248,225,88,37,209,117,91,168,187,173,21,117,114,16,93,230,208,164,75,204, +159,37,57,95,207,195,237,91,217,181,251,56,205,106,130,108,65,35,168,128, +237,38,121,121,224,115,180,122,35,172,74,8,68,60,142,161,68,41,41,15,115, +236,252,211,151,142,111,91,88,35,14,132,161,185,140,213,237,173,90,191, +18,175,34,178,238,203,52,181,182,16,56,255,38,50,55,134,168,90,73,40,28, +164,224,78,243,179,205,105,98,77,141,212,69,117,92,55,136,74,0,197,73,147, +78,27,200,112,9,158,204,17,12,206,114,122,226,50,47,244,164,224,60,66,236, +143,192,109,101,160,106,68,59,87,169,67,90,184,166,78,174,190,151,230,182, +22,74,166,206,226,100,38,113,74,87,16,137,53,146,43,56,60,219,245,55,194, +109,42,229,149,65,114,86,8,203,211,41,218,38,54,147,232,250,44,253,87,203, +120,238,244,44,104,192,155,8,117,99,0,42,34,160,169,216,94,202,63,90,209, +228,108,42,209,173,198,177,172,143,210,190,142,210,214,4,74,84,35,87,26, +32,214,20,103,237,181,38,78,123,195,132,170,139,96,36,41,168,99,8,35,69, +101,168,192,224,123,237,188,216,179,128,81,234,225,166,253,33,255,42,191, +90,4,132,65,211,32,44,160,48,205,115,126,87,162,62,177,34,184,118,122,106, +30,61,88,78,228,246,207,16,108,172,196,244,11,188,98,245,19,111,170,167, +170,108,37,97,165,156,184,240,168,21,26,103,6,59,120,229,252,40,241,146, +2,98,156,183,242,195,220,73,17,110,2,84,13,162,2,244,128,66,126,114,254, +100,174,189,169,80,81,166,126,113,38,57,66,96,106,1,189,38,206,95,179,147, +24,141,173,124,170,169,141,144,18,35,66,136,24,85,188,212,231,241,231,247, +250,168,136,185,20,71,120,38,53,192,67,4,128,194,226,73,125,88,2,20,33, +80,21,8,8,121,36,105,58,239,182,54,87,255,105,122,160,159,83,39,223,166, +117,215,49,58,202,202,153,19,215,81,153,99,158,49,186,207,253,154,139,153, +36,13,113,72,245,178,79,9,113,68,104,75,33,118,235,119,13,66,128,16,2,77, +1,67,225,196,232,248,204,29,141,213,109,76,68,199,249,233,251,123,49,88, +77,130,45,72,191,154,67,253,71,25,23,73,86,234,176,208,207,215,20,141,35, +226,70,58,46,159,7,55,141,32,0,85,8,12,77,57,155,28,189,92,89,172,9,167, +223,53,123,121,180,111,45,115,222,8,135,70,118,144,55,166,73,88,48,222, +75,151,162,241,71,177,140,218,178,128,15,221,8,52,69,16,210,181,217,238, +83,179,117,237,58,147,115,242,2,207,39,191,131,136,79,81,62,195,196,224, +5,74,85,157,115,66,93,94,237,147,1,31,129,4,117,242,239,76,144,136,231, +212,222,120,213,52,90,82,156,253,215,5,234,52,157,180,162,112,51,34,63, +94,255,1,47,201,188,241,243,150,3,243,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_82 = 3129; +static unsigned char xml_res_file_82[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,48,0,0,0,48,8,6,0,0, +0,87,2,249,135,0,0,0,43,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,77,105,32,50,54,32,70,101,98,32,50,48,48,51,32,49,48,58, +50,54,58,52,48,32,43,48,49,48,48,88,111,71,250,0,0,0,7,116,73,77,69,7,211, +5,23,15,10,37,231,231,95,135,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,11,145, +73,68,65,84,120,218,213,89,125,112,147,245,29,255,62,79,158,39,73,147,52, +37,109,82,94,26,74,74,193,181,200,77,207,109,84,167,195,190,48,1,231,54, +198,89,149,137,226,38,222,244,116,120,211,169,12,217,89,206,63,230,157, +8,167,224,172,156,183,185,157,231,166,48,78,145,237,116,108,96,97,224,168, +12,20,43,47,165,45,101,80,104,108,218,52,77,210,36,79,158,151,125,191,207, +147,39,121,146,190,80,182,160,238,123,247,187,231,151,228,121,249,124,190, +239,223,39,0,255,231,194,76,228,164,150,22,193,153,72,132,111,192,237,181, +162,40,205,149,36,121,134,44,75,110,89,150,205,184,0,247,17,69,145,123, +36,9,218,101,89,60,98,54,187,118,53,54,78,238,248,194,9,28,63,174,212,133, +66,202,67,209,232,208,98,158,103,172,118,187,137,177,88,56,48,155,89,48, +153,76,120,134,2,146,196,64,50,41,67,44,38,192,240,176,0,67,67,81,8,133, +34,50,195,240,199,25,134,217,194,113,230,223,53,54,122,67,159,43,129,99, +199,148,170,112,24,94,72,36,34,11,220,110,142,241,120,44,96,177,48,192, +178,8,89,209,22,42,30,193,103,246,137,4,64,52,170,237,233,187,96,48,10, +61,61,23,240,24,242,23,21,89,214,44,91,54,247,183,248,56,229,178,19,64, +173,223,238,247,15,111,153,60,217,228,44,43,179,0,207,131,10,156,192,234, +160,141,123,2,43,138,128,22,0,180,132,246,189,78,130,100,112,48,10,167, +78,157,84,68,49,186,141,227,108,63,90,185,242,235,209,203,70,0,193,175, +8,4,162,175,204,154,101,229,138,139,77,192,48,26,144,92,208,58,72,2,78, +154,55,2,215,151,126,158,102,33,9,173,122,28,2,129,129,61,12,227,185,249, +209,71,231,196,243,69,128,211,55,39,78,40,215,244,246,70,154,171,170,108, +8,158,85,193,27,193,234,174,242,202,43,91,225,192,129,35,208,221,221,141, +90,143,192,228,201,110,88,184,112,33,44,89,210,136,119,97,211,46,150,17, +25,63,43,80,85,245,21,56,122,244,147,186,104,116,240,121,252,242,39,121, +183,192,7,31,40,251,92,174,196,13,149,149,22,245,179,174,121,163,219,208, +154,63,255,86,60,38,80,235,2,30,181,69,26,190,243,206,21,176,98,197,3,57, +150,80,82,215,139,192,113,50,6,185,8,173,173,173,178,197,82,212,176,106, +213,215,222,207,7,1,86,3,47,126,75,16,134,174,247,122,45,170,230,115,93, +133,200,144,171,144,159,79,155,54,25,86,173,122,16,94,122,233,69,88,179, +102,173,154,145,68,49,6,219,183,191,62,234,3,48,189,170,22,96,48,126,45, +22,22,202,202,202,216,112,56,184,58,95,22,80,9,96,154,92,82,84,196,97,138, +204,0,214,221,128,62,15,15,103,252,124,203,150,77,176,120,241,34,168,172, +156,5,117,117,13,48,111,94,13,158,155,132,112,184,63,125,93,102,49,42,120, +90,195,195,50,56,157,12,148,150,150,130,32,196,234,159,121,166,101,106, +222,8,96,97,170,113,56,248,116,208,234,224,201,10,148,26,41,88,51,153,37, +227,231,88,212,224,244,233,78,60,38,145,208,21,57,224,9,184,148,38,64,238, +100,181,82,42,102,193,110,47,224,227,113,161,38,111,4,146,73,177,140,227, +152,148,201,51,224,35,145,220,108,146,57,246,247,247,195,211,79,63,6,237, +237,31,35,113,25,238,189,247,103,99,104,95,78,19,224,48,101,144,146,172, +214,2,138,163,217,249,32,192,165,64,51,4,74,23,2,61,52,148,201,243,70,240, +36,187,119,191,7,79,61,245,40,186,69,20,188,222,114,120,228,145,167,209, +149,230,27,220,79,73,93,163,1,39,18,122,12,232,132,20,69,228,243,70,0,251, +151,190,120,92,154,17,137,112,234,131,73,243,198,88,200,37,17,8,244,81, +220,96,0,115,240,250,235,127,67,183,224,115,206,103,232,158,89,218,47,44, +100,213,150,67,20,101,140,1,1,247,202,96,222,92,8,111,122,44,26,77,168, +90,15,133,178,51,144,113,233,36,24,134,69,240,38,92,188,10,62,155,160,162, +166,85,2,175,89,64,59,98,75,130,247,23,213,243,6,6,6,240,58,241,211,60, +90,0,118,247,247,15,223,93,90,234,204,114,149,145,89,69,91,183,220,114, +59,102,162,91,211,185,94,243,119,72,107,59,23,188,199,99,82,91,146,190, +62,1,21,52,136,22,142,244,37,147,197,7,243,102,1,147,41,185,35,24,140,68, +168,208,232,154,28,111,189,240,66,19,212,212,120,224,218,107,93,240,241, +199,7,211,254,174,17,144,13,75,1,151,139,5,106,75,2,129,36,196,227,10,86, +252,19,104,57,235,175,155,155,191,151,151,118,66,37,176,116,105,101,144, +231,11,94,237,238,254,12,82,22,25,119,81,101,149,164,56,186,94,194,160, +245,108,240,244,185,180,148,85,93,39,20,18,161,183,87,128,142,142,14,56, +127,190,231,211,222,222,179,207,230,3,60,73,186,149,216,185,115,176,164, +175,239,236,225,43,174,240,150,123,60,147,178,50,144,177,168,141,12,236, +12,120,10,80,74,169,118,59,192,164,73,44,250,185,130,110,147,84,93,167, +163,227,20,246,66,71,135,107,106,230,173,41,47,247,113,44,203,249,240,25, +110,140,64,158,56,99,42,31,194,186,114,30,221,239,148,44,199,15,117,117, +249,78,62,246,24,35,79,152,0,201,219,111,247,93,223,223,223,243,215,234, +234,153,54,151,171,48,29,204,36,58,96,155,205,216,157,42,233,54,193,100, +162,52,169,160,123,104,249,63,18,17,17,120,2,43,116,2,103,2,10,90,19,90, +195,173,88,173,44,67,233,148,227,180,165,245,92,10,182,42,18,186,88,2,83, +115,2,45,22,86,48,83,157,49,155,109,59,108,54,71,243,210,165,211,142,79, +136,0,201,27,111,156,107,8,6,207,111,45,43,155,226,242,249,166,103,17,160, +86,163,168,72,253,148,14,90,2,175,181,214,138,234,227,177,152,132,41,86, +66,224,81,4,37,224,53,86,140,3,43,130,55,227,181,102,181,152,233,98,140, +55,82,8,181,43,212,111,209,231,112,56,14,126,127,0,93,238,51,137,231,205, +111,152,205,133,79,220,117,151,239,220,69,9,144,188,250,234,201,202,80, +40,176,109,214,172,138,171,189,222,169,105,215,113,58,181,35,78,107,169, +166,143,70,74,57,165,65,210,118,88,173,17,231,206,245,64,69,69,5,46,47, +76,159,110,65,119,226,128,38,80,90,186,85,141,237,9,237,233,24,143,107, +4,140,196,232,183,174,174,211,56,221,245,12,216,237,158,21,247,221,87,181, +243,162,4,72,94,126,249,240,131,118,187,117,243,220,185,213,233,116,89, +92,204,32,72,5,14,31,110,67,144,231,82,126,47,210,66,147,163,23,139,242, +5,172,176,109,117,117,245,55,249,124,110,190,162,194,138,109,3,140,152, +45,114,135,35,2,73,224,71,27,140,116,215,165,218,113,244,104,155,96,179, +21,221,249,192,3,87,111,203,202,66,163,9,203,218,254,226,247,127,38,145, +118,201,61,72,211,20,164,244,48,191,223,175,36,147,137,187,49,255,87,203, +178,109,150,44,23,150,9,66,81,73,97,97,235,204,101,203,150,15,148,151,151, +112,56,213,169,193,76,227,168,177,8,26,215,130,5,63,132,218,218,31,64,67, +195,247,85,50,185,146,105,71,36,180,190,19,174,186,234,74,115,48,216,247, +155,23,95,60,52,71,63,135,27,139,0,154,234,244,134,13,251,255,222,221,253, +239,155,202,203,189,106,231,137,29,128,202,57,138,45,42,203,90,246,55,53, +221,220,101,188,230,240,97,101,17,186,209,242,234,234,66,134,52,111,172, +208,198,69,154,166,123,81,27,158,72,132,213,150,100,180,130,169,139,102, +45,5,73,20,194,204,153,222,194,206,206,158,77,248,117,195,184,22,80,217, +113,5,235,218,219,79,73,216,250,170,213,53,18,145,176,162,202,106,75,204, +178,140,35,247,124,12,226,181,83,167,90,85,240,153,7,103,0,209,158,102, +11,26,142,104,207,48,2,238,35,120,47,105,204,170,111,236,106,227,113,17, +170,171,125,120,223,100,221,186,117,239,206,187,40,129,85,171,174,57,128, +249,122,3,142,129,10,105,0,27,62,245,102,86,108,236,113,95,101,60,183,173, +77,153,17,139,13,93,231,118,243,106,219,144,91,51,72,235,4,222,72,200,100, +162,4,16,75,167,211,145,43,211,142,103,90,114,134,210,49,62,63,242,221, +139,18,32,249,228,19,229,23,177,88,232,247,251,246,237,85,168,125,166,20, +233,114,185,240,102,177,122,227,121,216,193,94,95,80,192,176,148,38,115, +193,147,187,16,248,220,174,150,231,89,117,166,230,121,211,168,174,67,57, +198,72,128,22,197,98,105,233,36,154,97,174,155,16,129,215,94,171,151,214, +174,61,241,99,188,245,227,123,246,180,68,15,29,250,8,28,14,7,90,99,248, +59,203,151,191,111,210,207,19,4,201,71,128,244,224,211,23,101,23,2,63,90, +87,75,111,247,70,35,144,233,106,101,131,21,168,32,17,59,170,244,86,10,236, +105,19,34,160,201,19,242,147,79,46,94,111,183,59,175,60,123,246,194,230, +131,7,91,7,208,156,101,83,167,250,111,76,235,138,145,77,90,93,200,104,145, +114,250,88,224,53,11,104,4,70,115,33,77,251,153,161,72,175,57,164,36,34, +134,46,173,92,2,1,77,154,154,22,159,121,246,217,91,127,90,92,60,195,203, +113,252,205,138,98,182,234,191,225,92,28,16,4,49,157,207,105,182,208,95, +53,230,166,81,125,175,19,224,121,126,132,239,19,88,125,174,48,186,81,65, +1,139,173,73,132,26,202,94,53,209,92,10,1,93,214,173,171,69,221,194,187, +198,239,4,129,249,8,251,24,5,235,4,19,8,140,61,83,24,227,99,254,252,155, +96,202,148,50,168,172,172,54,144,83,82,19,157,113,40,210,220,137,250,44, +147,137,193,30,43,72,141,226,177,255,154,192,104,50,99,70,199,135,109,109, +147,206,12,13,9,62,155,205,60,238,96,164,255,214,208,176,4,234,235,151, +100,145,210,136,100,79,116,250,190,164,132,71,237,139,216,31,157,71,69, +177,239,93,178,11,141,39,85,85,95,21,173,86,203,115,29,29,254,9,13,69,180, +106,107,203,224,198,27,167,224,114,27,180,111,28,136,52,240,148,194,233, +149,140,211,201,193,201,147,23,176,157,137,92,176,217,98,187,242,74,128, +100,120,88,120,25,221,232,31,29,29,189,233,87,241,227,205,214,162,72,175, +37,147,160,117,183,74,42,56,179,9,208,103,179,25,128,222,26,250,253,2,28, +58,116,68,193,216,249,213,250,245,247,39,232,153,19,250,135,230,82,100, +251,246,115,158,112,56,180,203,237,118,94,85,89,233,29,225,247,163,199, +131,146,5,56,245,175,143,90,16,105,254,160,110,118,112,80,130,93,187,62, +196,193,168,125,223,156,57,245,245,15,63,60,91,188,44,4,72,222,121,167, +171,164,183,55,244,7,171,149,95,48,123,182,143,41,42,178,143,120,215,154, +1,14,57,115,180,6,158,142,21,21,102,204,106,50,244,247,75,176,127,255,191, +160,179,243,84,187,205,54,169,118,227,198,219,46,232,207,186,44,4,72,90, +90,20,83,103,231,167,43,163,209,200,218,162,34,135,119,218,180,41,224,241, +148,164,95,30,27,255,59,208,122,38,41,101,1,49,93,192,124,62,51,180,183, +135,97,207,158,189,74,40,20,252,167,197,226,186,237,249,231,27,179,134, +154,203,70,64,151,109,219,122,108,129,64,224,30,81,76,220,131,213,251,26, +236,40,77,84,201,177,159,194,2,102,82,93,134,97,180,134,173,164,164,68, +157,47,136,0,205,211,62,95,1,236,222,125,2,176,112,238,117,56,92,11,80, +243,201,220,251,95,118,2,70,105,110,254,208,27,143,39,191,137,243,238,213, +152,89,166,227,240,227,68,176,124,50,73,111,183,135,106,23,45,250,118,129, +201,196,171,214,160,172,67,99,232,214,173,45,152,247,7,126,190,121,243, +93,207,141,118,207,188,213,129,137,200,253,247,127,131,204,255,102,106, +101,201,234,213,127,58,16,12,134,174,163,70,145,102,15,155,141,71,224,113, +26,37,37,212,254,91,99,221,51,175,105,244,127,17,244,154,56,185,143,162, +86,63,122,195,193,161,235,28,69,247,226,255,188,97,67,99,231,151,158,0, +130,47,51,99,194,199,54,25,104,166,56,118,236,60,253,187,25,54,155,11,30, +31,239,186,47,5,129,166,166,247,220,201,100,108,166,13,147,190,195,193, +65,87,151,31,131,119,175,104,179,185,87,110,218,116,199,201,241,174,253, +92,99,96,44,137,68,6,23,162,239,115,148,98,91,91,143,160,230,59,67,14,71, +241,125,27,55,54,110,189,216,181,95,10,2,162,40,223,65,47,10,118,236,216, +41,48,12,247,38,207,187,126,137,41,179,123,34,215,126,225,4,30,122,232, +45,143,32,4,10,144,196,106,134,97,255,216,220,124,207,153,47,26,211,231, +42,255,1,197,242,58,57,228,221,196,12,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_83 = 683; +static unsigned char xml_res_file_83[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,61,73,68,65,84,56,203, +165,147,65,75,212,97,16,198,127,187,173,26,100,7,77,73,119,75,173,204,77, +75,205,131,105,20,21,68,16,148,26,120,48,194,67,167,190,64,116,200,75,116, +171,47,208,41,42,234,228,53,18,66,2,211,74,45,53,119,205,32,114,181,210, +77,55,83,86,36,212,255,255,157,121,223,14,70,40,69,96,62,48,151,225,97, +96,230,55,79,192,57,199,102,20,220,136,249,226,163,166,167,205,247,206, +101,254,215,128,150,135,141,245,190,111,78,26,207,188,91,219,15,92,233, +184,244,123,7,171,22,171,22,21,219,103,213,182,17,12,94,16,35,103,197,72, +116,91,102,54,145,220,8,115,11,115,36,38,199,99,207,174,189,168,1,8,1,180, +86,93,198,225,112,206,97,157,99,108,246,227,209,247,201,209,46,177,66,180, +248,0,91,51,179,16,181,168,83,242,114,242,88,94,94,57,124,236,70,237,203, +87,55,7,142,7,157,115,88,28,214,217,95,165,236,201,219,75,109,73,45,233, +133,52,25,161,12,140,8,198,26,140,26,140,10,198,8,198,55,25,0,33,43,150, +7,111,238,162,162,4,237,22,246,231,151,113,48,114,136,156,237,59,8,185, +12,198,147,19,164,230,103,152,78,205,16,222,25,65,69,72,76,140,143,12,220, +138,215,1,4,214,98,108,185,223,144,45,70,175,151,135,43,218,142,68,235, +136,37,134,233,137,245,168,58,219,212,213,214,219,81,119,181,70,53,100, +63,13,222,142,151,254,149,130,11,130,13,56,226,99,49,150,188,37,162,69, +229,248,63,12,94,218,3,192,95,242,241,230,188,117,116,2,173,237,205,78, +140,32,70,112,226,40,200,45,100,49,189,72,89,56,202,190,162,82,38,166,198, +25,30,141,147,72,36,56,24,173,64,196,50,52,56,52,146,104,255,92,13,16,50, +190,225,68,249,41,212,41,106,5,177,202,92,214,60,241,15,113,138,119,149, +16,46,136,80,88,16,193,158,182,168,85,44,22,111,197,171,218,125,62,252, +122,234,201,116,93,208,248,235,47,44,42,44,46,45,146,250,254,141,231,189, +221,204,167,231,17,39,136,21,196,41,98,21,17,69,140,26,128,64,195,157,51, +78,140,96,124,65,252,85,68,98,164,79,60,109,243,211,254,234,35,249,26,205, +207,207,167,178,186,146,228,151,36,67,253,111,99,51,157,179,53,127,80,248, +151,138,26,35,245,42,218,165,98,39,83,157,179,209,13,103,97,242,241,215, +126,53,218,173,70,43,215,81,216,108,156,127,2,159,164,108,180,35,52,212, +126,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_84 = 704; +static unsigned char xml_res_file_84[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,82,73,68,65,84,56,203, +165,147,61,104,20,97,16,134,159,217,205,221,37,155,205,197,63,136,209,194, +74,209,34,70,193,194,159,194,242,16,21,75,17,27,209,210,42,65,139,40,104, +99,41,145,136,9,88,137,229,25,16,180,180,144,24,236,108,18,81,8,22,194, +137,10,198,120,183,185,108,246,239,219,253,198,66,47,26,147,206,129,129, +129,25,158,121,95,152,17,85,229,127,162,11,224,198,131,23,35,85,207,59, +213,138,181,44,34,136,224,171,37,236,12,137,88,210,36,126,62,62,90,27,223, +20,80,245,189,83,87,206,236,223,234,121,190,252,213,243,59,69,152,26,38, +167,231,206,2,155,3,150,35,202,158,231,203,147,151,11,131,223,155,95,182, +180,51,117,20,176,69,183,91,113,122,139,114,201,197,24,177,99,83,179,11, +105,18,215,199,71,107,183,215,1,68,232,205,129,149,48,219,122,177,118,160, +203,243,170,40,74,97,45,46,190,91,46,185,36,105,238,22,104,117,114,122, +238,60,176,30,160,202,170,42,126,43,42,164,187,199,231,233,204,71,119,169, +185,236,4,177,32,34,168,173,224,136,224,58,206,206,204,200,192,216,212, +108,144,38,241,163,241,209,218,72,87,135,164,10,69,161,110,102,93,130,118, +238,92,62,125,8,207,235,251,215,178,0,18,166,166,127,114,122,238,18,240, +27,32,244,90,11,32,133,35,61,110,16,42,158,215,199,194,215,54,175,27,215, +233,175,46,17,101,134,79,139,219,57,190,235,14,71,247,239,70,196,149,53, +11,168,34,40,89,241,131,60,15,41,172,146,3,185,181,248,254,34,61,165,109, +88,82,108,185,193,183,86,132,85,139,136,86,215,0,14,246,155,22,217,78,175, +188,195,237,46,85,113,28,7,85,88,137,50,90,73,66,161,171,132,38,165,25, +37,180,72,65,5,85,218,107,128,40,74,94,76,212,231,15,26,43,67,105,106,40, +108,252,11,144,88,26,95,247,98,43,239,8,77,68,208,218,195,190,129,202,198, +59,184,119,173,118,31,224,230,212,171,225,74,151,221,13,149,65,107,33,136, +11,134,7,198,56,220,24,225,253,135,79,4,39,239,146,155,28,5,68,228,143, +133,78,68,81,242,108,162,62,127,4,149,115,130,242,246,243,85,140,49,188, +201,50,178,193,18,217,187,243,24,99,184,112,226,13,107,47,164,170,27,242, +198,228,76,99,169,25,232,114,152,104,16,38,26,132,177,182,86,254,228,98, +179,173,183,30,190,110,169,234,122,5,127,41,169,79,212,231,143,89,156,33, +199,17,4,250,21,150,233,108,21,203,106,24,63,6,144,255,125,231,159,170, +154,75,27,99,123,197,90,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_85 = 643; +static unsigned char xml_res_file_85[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,2,74,73,68,65,84,56,141,125,147,205,75,84,81,24,198, +127,231,222,59,31,58,142,218,48,9,154,36,89,70,43,45,92,23,237,34,34,170, +69,139,136,22,65,180,140,160,255,162,69,68,80,72,255,64,208,70,90,68,37, +65,4,5,97,73,69,36,90,70,230,66,48,157,105,238,124,220,143,115,239,121, +79,11,205,15,112,122,55,135,247,129,247,199,121,222,231,28,149,26,195,255, +234,209,251,199,61,158,235,150,115,94,174,191,144,45,12,230,178,185,33, +81,118,228,243,242,199,220,205,227,55,174,120,187,13,77,205,189,188,117, +168,239,224,169,206,76,97,224,204,232,233,189,121,39,91,202,102,114,94, +51,109,80,79,125,50,110,134,149,100,121,9,96,87,192,112,121,248,242,112, +233,192,177,237,154,175,125,126,4,11,116,103,187,200,171,60,77,221,140, +0,156,221,0,58,209,45,0,99,5,128,86,28,48,241,253,33,129,180,8,37,160,149, +54,9,37,164,237,13,140,36,59,250,196,196,96,33,50,26,215,4,56,196,196,38, +110,15,72,36,5,192,90,3,202,217,166,199,4,98,193,40,180,232,246,0,145,173, +100,140,21,12,22,128,200,196,164,137,198,24,135,32,13,218,3,34,163,45,128, +24,139,227,26,68,214,119,17,154,8,17,131,99,93,42,81,181,61,192,90,235, +110,156,128,250,167,225,71,117,28,87,17,154,8,63,169,3,187,164,112,117, +226,218,245,177,193,209,163,58,89,247,104,82,33,78,34,140,8,11,245,159, +172,69,107,44,54,23,73,140,222,2,20,199,75,110,113,188,148,205,143,116, +121,157,29,133,147,221,185,98,167,150,132,88,52,117,221,0,224,66,249,60, +34,194,175,214,18,129,14,73,141,236,176,208,13,148,112,136,117,162,93,139, +208,212,45,100,227,153,59,202,197,85,138,74,90,193,65,225,41,23,44,217, +237,128,6,208,7,148,69,164,195,136,217,28,182,88,20,138,66,190,11,165,20, +73,146,224,75,35,168,121,181,217,77,64,99,166,154,22,199,75,13,132,33,207, +245,246,120,78,6,139,165,218,170,80,9,254,96,140,89,124,55,63,253,161,90, +168,157,248,210,152,123,163,195,244,171,85,76,236,72,161,49,83,93,238,26, +235,77,159,63,123,113,255,238,254,123,254,216,208,168,246,163,250,171,158, +124,241,237,228,244,147,217,59,151,110,71,231,94,95,156,13,43,250,83,248, +180,254,160,62,185,82,1,80,237,190,243,106,115,141,249,223,223,0,232,205, +245,112,164,255,48,229,179,251,6,108,98,3,127,106,181,6,224,58,14,127,1, +196,123,60,253,229,95,161,221,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_86 = 628; +static unsigned char xml_res_file_86[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,2,59,73,68,65,84,56,141,125,147,63,104,83,81,20,198, +127,247,190,151,215,180,137,77,140,127,240,47,5,197,218,65,80,17,156,68, +68,7,151,142,221,218,174,138,67,7,17,220,116,23,113,81,16,65,112,45,232, +232,40,226,162,226,32,78,90,138,22,173,162,104,219,164,77,154,151,151,151, +247,222,61,199,33,165,38,80,123,166,203,129,239,199,247,125,135,107,196, +57,182,155,159,79,102,75,214,247,119,155,129,96,191,95,44,30,242,242,249, +17,171,217,177,245,119,31,6,70,110,223,152,246,183,18,173,60,127,113,163, +120,252,232,101,187,163,112,96,223,196,248,30,27,12,84,108,62,240,181,209, +68,86,235,88,63,135,44,254,252,1,176,37,160,48,122,100,114,112,244,200, +233,222,157,91,109,224,62,206,227,149,203,104,62,192,133,173,24,192,110, +5,144,184,211,234,62,4,128,44,138,104,220,189,135,134,45,52,12,145,245, +16,90,17,255,117,160,89,127,47,26,197,40,6,141,219,208,180,168,231,161, +237,246,255,1,146,165,93,161,40,166,215,99,156,160,10,98,13,210,217,6,208, +231,64,100,51,138,116,98,72,18,212,40,218,222,38,130,196,137,2,168,10,136, +69,85,187,251,168,141,102,9,234,7,100,213,149,109,28,168,120,0,234,28,198, +183,27,59,197,213,235,88,11,26,85,145,70,21,216,226,10,175,39,166,175,148, +206,158,58,37,105,186,217,135,180,99,212,101,36,11,115,184,229,37,146,175, +11,184,36,253,7,152,169,20,188,153,74,33,152,44,229,253,160,88,184,224, +15,239,24,146,78,130,118,82,92,163,9,192,192,212,20,34,66,186,184,128,180, +67,84,210,190,8,195,64,197,66,71,146,196,67,20,215,12,81,215,45,15,223, +199,88,139,174,45,227,4,140,31,0,38,232,141,208,220,128,29,20,231,6,85, +228,159,88,186,5,250,165,34,198,24,196,101,100,205,90,148,139,86,231,54, +29,60,88,109,101,51,149,66,83,96,196,230,114,59,141,239,129,40,233,74,141, +164,86,67,82,183,248,231,205,219,247,229,245,181,243,105,227,203,235,196, +166,159,172,209,71,0,166,247,55,94,173,12,237,29,27,44,93,28,191,118,115, +106,231,153,147,73,90,111,188,202,149,74,111,190,61,125,54,119,230,241, +253,248,215,165,115,115,107,173,249,217,151,85,247,240,250,247,176,102, +172,237,7,244,78,178,180,66,248,241,51,0,185,93,101,138,39,198,184,115, +184,124,32,69,163,91,191,195,58,128,177,150,191,165,209,50,50,116,23,186, +79,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_87 = 674; +static unsigned char xml_res_file_87[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,2,105,73,68,65,84,56,141,117,147,77,75,84,97,24,134, +175,247,125,207,153,51,51,157,113,156,208,25,199,49,83,81,27,149,198,178, +212,252,92,88,80,139,192,8,23,129,148,132,68,212,50,8,2,151,213,50,68,92, +246,19,90,244,11,42,136,54,109,138,130,40,162,84,164,114,44,53,63,102,212, +57,31,243,182,209,48,115,30,184,118,207,125,115,193,195,35,238,182,80,114, +142,247,52,156,94,93,89,203,61,121,190,252,169,212,142,44,29,199,238,233, +60,250,162,179,61,245,20,16,165,11,228,78,205,62,26,155,35,19,141,233,26, +187,171,191,57,221,221,100,142,199,130,112,16,165,12,82,189,231,78,221, +243,54,215,145,114,139,209,225,166,71,64,248,64,3,165,96,63,205,173,21, +15,147,201,56,185,197,31,120,11,243,100,58,170,202,218,234,2,119,214,92, +216,207,65,6,45,221,131,237,99,110,238,23,234,228,53,188,230,17,228,86, +150,171,151,235,238,3,135,255,51,112,10,176,139,50,4,45,237,201,201,84, +194,194,207,253,38,156,30,197,108,29,199,207,254,36,221,24,224,66,38,240, +192,209,176,151,253,6,131,125,189,45,231,253,245,101,112,54,128,34,90,11, +114,179,171,136,153,15,140,246,135,110,1,245,255,94,97,207,100,58,82,83, +149,229,32,221,60,97,182,145,194,66,20,61,182,191,121,232,53,205,145,26, +151,75,25,99,50,105,195,46,127,11,236,50,53,210,215,93,119,194,112,87,56, +20,112,176,215,179,8,92,164,178,136,149,65,209,4,10,5,198,134,236,97,160, +107,55,103,236,154,244,116,37,167,226,81,31,150,22,49,86,179,136,188,198, +121,220,0,110,145,64,92,64,0,112,32,81,163,25,74,27,211,175,191,120,221, +139,27,32,195,38,36,19,230,237,51,153,104,181,156,123,139,185,178,128,8, +135,208,181,49,212,141,25,212,205,143,232,84,20,34,17,16,10,92,151,43,3, +161,46,224,34,128,26,140,99,15,180,153,207,26,205,172,82,5,15,17,139,64, +52,142,136,148,35,131,17,228,242,27,68,126,22,76,11,60,23,10,46,225,40, +228,127,251,61,239,191,235,105,117,189,195,156,56,219,224,12,133,130,32, +42,45,72,36,160,170,14,146,173,160,151,193,91,133,72,5,4,4,40,15,156,60, +184,14,199,170,141,216,171,89,99,222,88,23,33,231,229,156,94,18,158,239, +91,33,45,101,112,73,98,229,133,8,126,213,90,89,32,132,239,59,14,122,123, +27,191,176,41,108,60,75,185,190,52,203,12,21,45,15,71,69,218,38,26,144, +212,250,30,30,160,53,32,52,66,130,16,59,95,168,65,23,65,250,160,235,109, +66,97,19,3,129,120,183,194,231,63,138,62,220,101,241,3,240,147,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_88 = 639; +static unsigned char xml_res_file_88[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,2,17,73,68,65,84,120,218, +124,83,207,75,27,81,16,158,221,108,49,150,210,67,4,171,164,5,79,17,210, +30,66,101,21,212,131,244,16,74,47,133,210,67,255,146,34,244,95,40,66,79, +94,122,232,169,105,104,60,40,106,17,193,171,191,64,10,129,224,33,135,182, +27,33,8,217,136,155,108,178,217,221,55,157,121,238,62,178,81,124,240,241, +246,189,157,239,155,111,102,118,53,68,4,77,211,158,2,192,19,66,10,238,95, +151,132,127,196,17,234,134,5,104,205,13,6,131,171,32,8,66,2,142,34,12,67, +244,60,15,75,165,210,23,138,157,33,232,204,147,220,72,96,158,201,174,235, +98,175,215,83,232,118,187,232,56,14,218,182,45,133,90,173,22,150,203,229, +132,8,47,45,18,144,89,124,223,151,59,35,22,104,183,219,210,69,191,223,71, +78,82,169,84,164,136,44,63,18,48,73,224,88,8,1,213,106,21,72,68,129,136, +64,239,160,88,44,14,151,12,134,97,44,208,118,106,196,189,160,70,130,174, +235,80,40,20,84,32,11,178,0,131,156,168,115,38,147,81,61,52,70,219,92,171, +213,100,70,14,100,7,252,28,19,121,55,77,83,185,72,8,68,227,132,124,62,159, +56,51,137,193,103,22,81,110,51,169,7,194,14,33,81,2,7,213,235,117,101,155, +137,236,32,30,25,159,185,196,67,251,8,38,214,39,215,197,181,48,19,83,24, +157,253,240,78,223,137,156,208,231,243,53,92,56,88,194,135,111,31,189,99, +238,173,30,88,150,165,178,59,129,3,39,221,83,88,78,47,73,135,223,175,126, +64,185,83,129,95,139,91,144,219,204,53,148,123,118,16,103,138,179,254,180, +54,240,197,126,1,179,187,51,248,199,249,139,59,23,187,56,185,157,197,173, +198,182,140,97,206,45,7,156,165,217,108,222,76,224,122,0,6,26,224,11,31, +62,158,173,194,153,251,27,94,61,94,129,55,83,175,101,92,130,23,57,16,163, +117,119,188,14,190,63,252,32,51,231,246,158,99,163,211,144,239,194,155, +113,204,211,189,252,158,217,14,147,123,188,15,187,73,167,210,240,237,229, +87,88,158,88,132,79,179,171,48,61,62,205,211,224,88,151,66,228,76,181,104, +222,207,162,223,89,191,235,31,78,101,141,177,240,34,240,134,174,152,124, +73,14,172,255,2,12,0,63,205,231,104,37,153,30,32,0,0,0,0,73,69,78,68,174, +66,96,130}; + +static size_t xml_res_size_89 = 554; +static unsigned char xml_res_file_89[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,4,103,65,77,65,0,0,175,200,55,5,138,233,0,0,0,25, +116,69,88,116,83,111,102,116,119,97,114,101,0,65,100,111,98,101,32,73,109, +97,103,101,82,101,97,100,121,113,201,101,60,0,0,1,188,73,68,65,84,120,218, +132,83,193,106,194,64,16,157,77,210,80,233,165,88,196,131,85,122,16,15, +158,132,146,246,216,91,62,194,191,234,79,40,130,7,207,189,247,80,138,39, +197,147,135,18,145,170,144,40,4,141,49,38,219,153,109,118,73,84,218,129, +199,102,179,243,222,188,157,221,101,156,115,96,140,221,3,64,25,161,195, +223,177,66,56,200,73,212,31,18,192,120,60,28,14,155,227,241,24,35,248,41, +226,56,230,97,24,242,110,183,251,138,185,15,8,141,120,130,155,10,60,17, +121,183,219,241,32,8,20,182,219,45,247,125,159,123,158,39,132,92,215,229, +189,94,47,39,66,193,82,1,81,37,138,34,49,18,164,192,122,189,22,46,246,251, +61,167,34,253,126,95,136,136,237,167,2,22,10,124,36,73,2,163,209,8,80,68, +1,137,128,107,96,219,118,118,203,96,24,198,51,14,159,134,236,5,54,18,52, +77,131,86,171,165,18,73,144,4,8,232,68,205,139,197,162,234,161,113,218, +230,201,100,34,42,82,34,57,160,111,73,164,209,178,44,229,34,39,144,30,39, +52,155,205,220,156,72,4,154,147,136,116,123,38,64,63,41,105,58,157,42,219, +68,36,7,242,200,216,112,8,183,131,129,200,181,11,133,187,183,32,200,59, +160,168,215,235,57,65,57,146,152,239,56,240,61,30,139,245,27,198,174,46, +246,96,54,155,169,234,18,52,23,66,158,39,142,12,116,29,222,195,208,189, +184,133,106,181,170,190,179,206,40,66,20,250,34,82,169,4,43,199,137,206, +28,16,113,177,88,168,102,209,152,21,226,201,239,19,48,177,8,96,63,78,5, +40,147,149,203,229,156,131,172,59,188,166,176,108,183,193,172,213,56,96, +51,199,149,10,55,112,129,99,66,130,213,2,93,215,175,233,142,103,73,217, +35,197,251,13,155,78,7,204,70,131,22,226,172,131,165,105,154,47,146,252, +111,204,231,113,250,180,225,71,128,1,0,131,106,144,75,240,255,192,141,0, +0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_90 = 475; +static unsigned char xml_res_file_90[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,1,162,73,68,65,84,56,141,133,147,49,79,219,64,24,134, +159,59,135,96,164,166,76,128,68,138,90,49,33,202,192,2,172,48,176,50,70, +34,91,135,78,101,65,237,223,232,198,200,192,148,208,8,22,132,88,16,4,24, +64,12,44,8,36,68,6,16,18,137,20,2,52,9,184,193,177,253,49,4,23,76,98,120, +37,235,62,251,238,158,123,253,222,157,18,17,210,233,244,37,33,82,74,5,106, +255,61,145,72,196,1,34,0,34,66,50,153,236,13,131,188,86,38,147,201,251, +181,126,221,233,121,242,46,64,228,121,140,126,249,193,113,28,92,215,193, +113,193,3,254,94,151,168,148,203,111,194,2,14,60,17,68,52,104,40,92,228, +248,104,255,196,188,249,65,177,144,15,155,223,200,224,217,155,66,180,1, +10,170,199,179,196,205,44,81,224,170,250,143,238,169,229,112,7,254,47,184, +162,16,13,167,7,107,12,116,29,192,68,1,70,183,249,218,182,73,238,100,47, +60,131,255,50,12,108,129,88,110,22,170,21,112,107,80,187,135,154,133,177, +243,253,253,12,36,2,185,141,223,244,153,103,80,176,96,190,7,150,198,161, +104,211,255,112,204,209,238,194,219,128,219,235,50,131,71,191,160,18,133, +10,216,147,43,56,99,115,112,7,212,53,159,87,191,53,1,2,33,22,15,211,196, +239,0,238,193,131,232,250,84,163,195,2,106,30,177,43,40,157,103,3,167,51, +0,232,29,158,102,239,112,17,211,42,225,232,118,184,169,163,49,80,102,20, +29,177,169,127,138,51,242,101,2,246,255,4,1,62,177,195,140,49,52,179,133, +106,236,36,208,104,253,167,173,69,136,1,7,226,88,136,107,160,181,1,190, +77,165,159,8,10,137,232,166,195,31,112,208,25,251,208,98,141,102,181,204, +32,149,74,229,195,6,249,245,203,235,236,235,17,40,172,152,81,187,144,52, +70,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_91 = 7960; +static unsigned char xml_res_file_91[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,231,0,0,0,66,8,2,0, +0,0,226,201,137,234,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43, +14,27,0,0,0,7,116,73,77,69,7,215,12,11,20,30,26,227,18,33,62,0,0,0,7,116, +69,88,116,65,117,116,104,111,114,0,169,174,204,72,0,0,0,12,116,69,88,116, +68,101,115,99,114,105,112,116,105,111,110,0,19,9,33,35,0,0,0,10,116,69, +88,116,67,111,112,121,114,105,103,104,116,0,172,15,204,58,0,0,0,14,116, +69,88,116,67,114,101,97,116,105,111,110,32,116,105,109,101,0,53,247,15, +9,0,0,0,9,116,69,88,116,83,111,102,116,119,97,114,101,0,93,112,255,58,0, +0,0,11,116,69,88,116,68,105,115,99,108,97,105,109,101,114,0,183,192,180, +143,0,0,0,8,116,69,88,116,87,97,114,110,105,110,103,0,192,27,230,135,0, +0,0,7,116,69,88,116,83,111,117,114,99,101,0,245,255,131,235,0,0,0,8,116, +69,88,116,67,111,109,109,101,110,116,0,246,204,150,191,0,0,0,6,116,69,88, +116,84,105,116,108,101,0,168,238,210,39,0,0,1,0,73,68,65,84,120,156,237, +157,121,152,84,213,153,240,223,115,183,170,174,174,234,125,165,155,94,216, +26,4,141,178,69,1,65,68,136,235,243,57,99,226,36,113,137,130,18,253,198, +201,98,68,103,38,51,25,51,209,228,51,15,102,198,103,76,196,72,43,201,151, +196,76,28,157,204,8,134,97,105,32,17,228,51,17,13,32,216,208,43,13,52,205, +214,91,85,221,123,207,246,206,31,167,234,82,116,179,152,177,27,191,150, +243,123,138,122,186,111,157,58,247,189,183,233,223,125,251,61,231,158,34, +136,8,26,141,70,163,25,33,24,31,119,0,26,141,70,163,249,19,208,214,214, +104,52,154,145,132,182,182,70,163,209,140,36,180,181,53,26,141,102,36,161, +173,173,209,104,52,35,9,109,109,141,70,163,25,73,104,107,107,52,26,205, +5,69,202,143,244,118,109,109,141,70,163,185,160,248,236,35,105,155,232, +187,108,52,26,141,102,4,161,115,109,141,70,163,25,73,104,107,107,52,26, +205,72,66,91,91,163,209,104,70,18,218,218,26,141,70,51,146,176,62,238,0, +52,26,141,230,227,167,163,179,241,189,61,130,246,24,52,0,0,1,0,73,68,65, +84,155,247,181,190,211,209,185,47,233,245,15,120,181,174,118,218,232,242, +186,9,181,211,46,191,228,154,143,35,186,211,208,115,72,52,26,205,197,75, +210,235,223,184,245,23,219,222,93,141,38,175,29,59,161,162,162,182,164, +164,34,28,206,54,136,1,64,0,81,130,112,189,196,209,163,135,14,29,108,61, +124,168,189,239,68,239,229,151,92,115,203,181,75,11,243,71,157,177,67,4, +32,31,45,164,99,61,172,56,207,62,71,3,109,109,141,70,115,49,162,124,189, +113,219,47,71,213,84,94,49,115,118,97,126,89,52,20,117,172,176,109,90,6, +33,166,73,36,112,33,56,151,148,73,74,25,167,76,80,206,186,123,143,237,219, +187,235,131,157,127,156,49,229,51,131,221,141,8,148,35,0,134,236,97,44, +62,107,107,107,52,154,139,142,198,214,119,86,189,250,120,172,36,251,242, +25,87,141,42,174,201,143,20,70,156,108,2,6,33,70,144,41,35,8,137,76,128, +207,209,99,24,103,152,164,140,249,148,120,46,137,187,61,123,119,190,215, +246,126,243,237,55,125,99,214,212,91,84,123,33,145,139,155,129,100,85,0, +0,1,0,73,68,65,84,148,78,181,181,53,26,141,102,200,120,125,227,243,107, +223,124,233,170,69,243,199,214,78,30,149,83,21,113,98,6,177,8,152,6,24, +0,6,1,66,128,32,72,0,148,192,4,250,28,93,142,46,7,151,98,130,99,220,23, +110,50,30,118,125,126,236,216,225,119,182,188,53,165,250,234,123,110,123, +156,11,20,242,148,75,17,33,236,12,151,184,181,181,53,26,205,69,196,170, +87,31,223,213,246,219,57,55,47,24,91,114,73,105,172,210,0,219,36,182,1, +54,1,211,23,241,163,201,230,227,201,3,9,218,211,227,118,10,41,133,20,76, +114,46,185,99,100,59,102,40,47,82,92,146,91,28,141,152,62,244,122,30,198, +251,67,241,100,223,238,183,222,37,241,172,175,220,179,34,43,28,13,246,162, +173,173,209,104,52,67,192,170,87,31,223,213,182,121,246,77,215,78,170,184, +34,63,171,196,4,199,36,33,3,236,62,255,232,193,254,63,30,137,239,55,32, +43,219,41,9,91,121,142,21,117,204,108,219,140,0,64,191,215,197,37,239,243, +186,142,38,218,186,250,218,178,157,252,203,71,79,119,56,52,158,242,0,0, +1,0,73,68,65,84,34,174,47,123,251,187,99,62,247,254,248,187,119,204,120, +246,99,15,252,60,216,145,182,182,70,163,209,124,84,54,108,251,197,27,219, +158,159,121,227,172,43,170,175,138,57,5,38,9,91,36,132,210,232,232,127, +183,163,119,103,196,46,207,11,143,201,118,138,108,18,178,12,155,128,97, +18,155,16,2,0,18,133,122,112,164,30,79,190,186,235,137,121,53,159,15,219, +81,106,118,113,187,163,191,59,230,115,250,254,155,127,172,137,77,191,227, +214,111,169,125,13,171,181,245,93,54,23,152,182,250,27,8,33,203,54,127, +220,113,104,52,23,21,141,173,239,188,182,254,153,75,23,125,106,194,168, +9,17,39,66,136,65,192,16,82,190,215,245,235,131,125,141,101,209,153,149, +57,87,22,134,171,99,86,97,204,46,204,177,139,242,156,178,28,187,48,102, +21,198,172,194,92,187,56,207,41,205,177,139,115,236,98,198,93,199,204,202, +15,151,27,96,18,150,35,250,71,219,217,189,0,56,102,250,184,93,237,13,155, +182,191,124,1,142,101,200,172,173,108,116,6,33,109,94,70,8,185,161,190, +109,168,97,224,118,108,0,0,1,0,73,68,65,84,118,116,62,54,47,35,167,113, +1,119,253,167,133,129,131,248,56,226,212,104,46,10,86,189,250,248,152,43, +199,84,151,84,228,71,114,0,16,0,132,100,239,116,190,150,160,94,85,238,220, +130,112,77,182,149,27,181,243,149,178,115,236,162,152,85,16,179,139,98, +118,97,204,46,140,217,69,49,171,48,215,41,206,181,139,187,147,135,75,178, +171,8,81,179,77,12,2,150,72,148,2,24,166,99,142,189,106,220,250,109,47, +158,232,233,28,238,99,25,250,92,123,249,83,245,109,103,113,209,112,27,170, +173,254,6,66,230,47,63,125,227,218,251,106,201,35,13,82,74,41,229,133,241, +227,57,195,64,41,1,0,133,16,42,164,224,11,21,222,176,6,166,209,92,156,188, +190,241,121,145,157,40,173,41,174,204,47,68,144,8,18,17,223,62,252,90,220, +247,106,242,231,102,91,249,17,43,39,219,202,203,182,242,162,86,94,150,25, +179,72,200,32,166,154,76,162,30,6,49,45,226,132,205,104,103,255,190,138, +156,58,0,32,106,51,24,4,12,66,8,162,140,228,101,197,170,178,126,179,249, +5,0,199,178,157,240,0,0,1,0,73,68,65,84,16,31,237,115,15,206,205,16,91, +251,250,235,175,135,181,247,61,219,144,242,145,16,66,74,4,128,1,122,26, +22,73,109,94,86,123,223,90,0,128,71,54,169,221,113,206,57,231,77,43,22, +2,74,206,185,218,146,222,121,235,202,207,124,200,60,188,173,254,134,63, +37,99,63,79,24,106,118,144,20,156,51,198,40,165,234,57,8,76,139,91,163, +25,90,146,94,255,198,109,47,87,92,81,62,182,164,88,128,144,192,17,196,190, +147,219,143,247,159,168,201,159,157,109,229,103,153,177,176,25,139,152, +57,89,102,204,36,54,0,28,77,54,109,239,252,191,107,90,159,92,245,254,125, +43,119,222,243,111,141,223,124,163,121,249,158,227,155,122,253,163,237, +189,187,138,35,213,0,128,136,234,31,16,0,32,82,74,9,178,184,174,232,221, +253,107,143,159,60,44,229,48,254,34,15,241,58,36,83,30,125,116,242,218, +181,79,63,181,114,233,156,123,70,75,9,0,68,8,0,64,137,82,37,153,105,43, +25,134,65,8,81,207,67,177,231,182,250,167,150,3,192,245,43,91,223,88,92, +173,244,167,164,95,209,61,20,0,0,1,0,73,68,65,84,89,126,215,175,19,0,140, +49,181,35,195,48,76,211,52,12,68,0,144,152,25,82,192,217,66,250,16,45,207, +27,70,187,64,0,16,156,82,63,237,104,66,136,105,154,166,105,90,150,5,233, +51,243,145,79,136,70,163,1,0,216,182,227,117,167,204,40,44,140,102,103, +153,2,169,9,220,151,137,61,157,59,106,242,103,198,156,98,199,200,10,153, +217,89,102,118,200,140,16,48,152,116,183,30,174,63,146,104,44,141,76,44, +137,76,40,10,141,225,200,133,100,135,227,251,214,182,252,11,19,44,98,231, +68,236,28,42,93,4,68,80,78,147,136,146,9,206,145,27,54,201,171,201,125, +99,243,11,159,191,229,91,195,119,68,67,156,107,163,156,251,224,138,133, +176,254,129,191,92,217,76,41,245,125,159,50,9,0,40,153,130,115,206,88,195, +163,161,144,109,219,150,101,25,134,65,150,109,82,239,29,148,211,14,30,184, +219,188,236,108,35,121,109,27,255,109,45,0,60,242,232,226,106,149,180,114, +206,213,30,83,97,80,170,246,158,206,184,149,127,17,229,25,56,115,194,123, +166,182,3,91,158,122,201,50,243,0,0,1,0,73,68,65,84,63,12,198,17,0,36,167, +212,247,125,175,225,111,243,243,243,243,242,242,98,177,88,36,18,113,28, +231,177,211,14,46,24,44,24,48,98,112,182,237,26,141,102,32,111,237,88,157, +91,29,45,204,9,113,116,5,80,14,244,253,206,29,82,154,163,115,47,115,140, +176,99,134,67,70,150,99,100,41,101,191,222,242,109,46,216,162,170,101,51, +203,238,152,148,63,127,98,225,252,73,133,243,39,21,206,191,166,234,222, +91,39,252,205,167,74,63,83,157,123,169,4,33,81,32,10,137,82,162,64,144, +8,200,133,240,124,95,162,44,24,159,247,251,157,171,93,127,224,250,83,67, +200,208,215,181,43,190,244,200,87,0,54,60,244,163,6,207,243,60,207,165, +12,0,144,165,74,1,126,211,202,255,21,189,225,153,204,55,44,191,150,124, +102,101,171,148,85,181,147,1,214,254,106,67,186,42,222,182,225,87,107,1, +96,249,154,77,233,106,244,166,53,203,1,30,185,113,222,25,6,241,218,62,88, +11,0,143,220,56,87,74,41,165,218,87,224,107,165,236,244,53,131,165,202, +53,8,0,160,114,225,192,89,112,5,9,0,0,1,0,73,68,65,84,173,103,173,84,72, +28,96,225,51,183,252,16,97,72,9,0,130,81,234,251,254,150,255,122,110,192, +217,123,250,58,107,89,170,8,223,176,140,164,106,45,233,19,53,127,217,38, +148,178,225,145,65,219,211,117,251,11,84,184,215,104,70,10,39,186,15,31, +233,109,14,23,59,57,217,132,163,199,209,167,194,221,215,245,65,65,164,202, +50,28,139,56,54,9,219,70,200,36,22,0,108,233,88,145,231,84,206,26,117,175, +99,69,37,50,1,92,162,16,200,213,195,52,172,113,5,211,39,21,207,145,168, +238,93,87,211,1,101,202,224,82,248,156,122,190,79,44,140,142,138,236,110, +220,50,124,7,53,212,185,54,160,148,115,150,60,179,0,224,135,207,252,164, +217,247,125,143,10,0,16,66,213,112,91,86,125,245,171,27,31,124,237,216, +177,99,221,221,221,241,120,220,117,221,166,21,11,97,221,253,207,54,8,113, +245,245,15,3,172,219,219,164,10,226,45,235,94,89,7,0,0,203,215,52,40,207, +182,236,223,9,176,104,124,213,192,250,184,148,178,173,105,39,0,44,154,80, +131,136,170,142,204,142,32,49,225,0,0,1,0,73,68,65,84,24,243,125,95,233, +85,169,57,48,218,41,213,162,196,180,136,3,171,14,214,49,166,254,12,58,127, +203,182,230,221,231,11,3,213,213,66,85,253,185,188,239,103,251,246,53,55, +55,183,183,183,119,117,117,245,244,172,254,42,192,211,79,189,208,194,185, +104,88,179,28,96,209,243,77,60,205,134,135,65,10,46,26,214,60,13,176,112, +69,83,112,41,90,255,48,96,106,16,33,179,112,175,75,228,26,13,188,187,119, +115,184,216,137,101,25,104,80,138,30,197,196,145,158,227,253,126,111,105, +116,172,69,108,203,80,15,7,128,28,73,52,118,37,90,46,45,190,153,73,159, +75,159,75,202,37,229,72,133,100,2,153,144,60,173,111,38,36,83,95,75,20, +2,153,64,33,144,75,224,140,179,164,231,73,144,225,34,167,185,125,199,240, +29,212,80,231,218,136,136,88,113,199,242,239,207,131,45,143,189,244,91, +223,167,92,0,0,114,74,41,101,91,94,120,120,51,192,115,127,94,92,92,156, +159,159,31,141,70,179,178,178,198,61,176,30,0,118,238,111,102,172,114,220, +117,0,63,88,189,145,82,74,42,158,29,80,0,0,1,0,73,68,65,84,105,211,158, +117,240,181,181,107,191,6,240,244,234,141,140,49,198,154,246,174,131,235, +110,157,55,138,5,168,138,135,148,65,233,63,85,68,206,124,85,189,96,154, +230,225,95,252,69,81,81,81,65,65,65,78,78,78,36,50,241,129,245,0,235,31, +24,231,56,145,72,36,22,139,229,230,230,222,250,98,147,26,24,108,173,191, +41,85,189,33,132,144,218,251,215,1,172,91,122,198,150,65,255,3,206,194, +217,195,48,82,139,211,16,130,136,51,150,45,155,46,59,126,249,165,177,213, +213,213,165,165,165,121,121,55,63,3,0,40,24,99,76,8,0,88,183,167,137,166, +185,234,59,137,239,204,74,109,95,191,183,41,184,126,204,82,219,51,208,73, +183,70,163,56,216,185,47,84,104,101,103,1,67,143,97,146,98,226,224,201, +35,76,240,226,104,181,65,44,131,152,6,177,12,48,1,160,165,247,15,69,89, +99,9,16,38,125,38,82,226,102,146,114,76,233,59,229,113,73,57,50,46,153, +144,140,35,227,41,137,51,1,130,113,22,119,61,137,60,84,100,29,238,218,215, +155,224,195,116,80,67,159,245,124,211,103,0,0,1,0,73,68,65,84,107,35,162, +148,21,183,63,184,20,96,229,243,255,122,128,115,4,0,228,148,49,198,206, +62,29,6,25,245,253,210,217,183,44,0,216,221,216,228,251,126,195,234,103, +224,175,22,124,250,202,235,254,10,96,215,190,102,74,105,195,154,127,6,152, +84,85,150,81,241,80,78,228,156,143,174,157,2,0,235,62,104,13,230,108,4, +174,36,132,88,41,204,115,7,47,121,106,58,135,56,223,248,239,169,150,169, +121,50,169,196,182,102,236,20,0,88,215,120,174,48,76,3,0,76,211,52,13,195, +248,253,247,235,38,78,92,240,205,55,79,239,93,112,234,251,222,140,123,159, +89,0,240,204,245,17,197,99,27,125,197,204,197,106,123,182,226,177,6,63, +141,10,73,161,115,109,141,6,0,78,116,31,54,34,196,118,4,67,207,71,183,215, +141,31,235,63,22,117,10,8,24,6,24,6,88,6,24,132,24,0,112,36,222,92,144, +85,237,139,36,21,73,38,93,42,61,38,92,46,61,150,241,72,231,224,62,151,62, +199,32,37,247,153,164,42,215,102,140,121,148,90,57,228,80,215,62,202,135, +235,23,112,157,89,151,70,0,0,1,0,73,68,65,84,232,235,218,41,89,92,121,247, +19,115,96,235,183,126,190,93,74,0,144,82,48,198,218,90,62,0,128,251,126, +214,212,218,218,218,209,209,113,232,208,161,206,206,206,206,206,206,195, +135,15,255,244,179,69,201,100,178,176,124,60,192,198,189,141,201,228,134, +53,207,194,131,215,76,247,220,105,215,252,111,216,248,218,250,253,238,254, +198,93,0,15,94,51,205,117,93,215,117,61,207,11,138,197,66,8,89,53,126,33, +0,252,96,205,111,211,53,16,53,101,69,77,207,176,44,203,113,156,49,139,255, +51,227,189,251,159,91,8,112,221,15,119,118,119,31,57,114,164,189,189,189, +165,165,229,165,219,74,84,135,229,95,124,37,145,72,248,190,207,57,231,188, +121,197,66,128,235,126,116,198,150,3,235,36,53,19,23,1,192,211,111,156, +61,12,219,82,51,89,44,203,60,242,202,143,235,1,0,22,255,100,111,99,99,99, +75,75,75,91,219,47,191,12,0,146,121,174,155,76,22,222,246,147,131,135,182, +47,191,70,157,214,127,185,165,160,160,224,155,13,158,239,151,220,254,179, +206,206,223,63,157,218,165,159,159,127,0,0,1,0,73,68,65,84,254,108,176, +221,15,6,93,213,181,68,231,218,26,77,99,235,59,118,33,160,65,125,116,41, +122,189,201,4,21,62,33,150,65,212,95,210,196,32,41,7,182,244,188,139,40, +169,116,169,76,82,225,82,225,82,225,81,225,50,225,81,233,81,225,49,233, +83,233,51,233,81,233,51,244,153,12,30,148,75,42,36,167,156,49,206,92,223, +23,200,205,136,209,211,59,92,183,219,12,223,29,237,149,159,91,186,4,96, +85,125,253,126,0,64,68,33,68,121,229,120,0,88,185,105,91,102,205,247,180, +1,195,25,243,238,7,88,177,126,203,150,245,43,224,254,171,167,122,158,239, +79,155,183,20,54,253,122,227,150,134,255,220,12,243,106,74,253,76,148,178, +133,16,114,244,252,219,22,2,192,63,45,127,169,45,112,104,224,74,53,95,197, +113,156,96,226,10,0,32,130,154,199,29,4,19,100,238,65,141,56,149,183,170, +25,214,233,45,131,91,42,69,74,41,177,122,193,103,23,1,192,15,206,30,134, +105,16,0,32,150,105,30,217,186,230,183,0,75,126,218,248,200,140,212,136, +40,231,92,2,0,114,240,208,222,237,0,0,1,0,73,68,65,84,234,251,190,239,123, +158,231,21,255,89,125,115,115,75,75,75,203,47,238,7,128,231,254,107,75, +74,205,165,159,251,233,129,3,237,237,237,109,191,92,122,218,246,116,96, +153,131,147,195,246,35,214,104,70,0,2,5,69,159,74,159,162,219,151,240,125, +225,49,193,1,72,250,51,103,82,179,108,125,78,61,145,240,121,220,23,73,95, +38,125,145,240,101,210,23,174,47,146,84,184,84,186,190,112,153,116,169, +240,88,74,232,30,21,94,202,233,210,227,146,49,206,152,96,62,165,2,133,153, +69,186,71,150,181,83,51,210,174,188,235,59,179,97,235,214,173,0,169,105, +115,98,250,213,247,2,64,253,221,227,191,247,150,210,31,231,156,243,182, +151,239,174,121,114,171,26,99,156,57,239,62,128,189,207,61,247,2,44,185, +122,154,178,249,212,185,247,193,150,215,159,125,125,11,204,89,52,163,216, +207,76,42,131,186,54,226,232,123,31,253,58,0,108,120,104,114,209,63,252, +46,51,146,131,63,187,61,250,119,111,42,89,167,75,213,193,108,104,41,211, +46,30,96,106,37,190,84,253,3,0,240,212,102,189,113,134,0,0,1,0,73,68,65, +84,107,3,90,6,119,15,1,0,98,213,226,71,191,113,158,48,8,0,24,196,52,71, +215,78,2,128,250,45,255,15,0,84,15,219,190,119,231,11,0,160,12,190,237, +187,227,190,187,53,40,106,179,178,154,57,0,128,66,110,123,178,250,201,183, +130,33,71,49,170,118,46,4,29,232,153,36,26,205,64,36,114,138,190,143,158, +143,158,235,11,159,187,76,112,181,124,54,0,74,76,141,57,17,176,61,158,116, +69,191,203,251,93,30,247,68,194,79,61,146,84,36,79,61,75,151,74,87,121, +156,74,151,74,143,74,151,75,230,83,95,229,218,92,112,137,28,97,228,220, +101,19,64,8,49,140,202,219,191,188,228,239,183,214,171,239,17,17,113,250, +215,235,239,121,105,201,42,120,241,238,241,47,158,214,126,201,82,41,37, +33,132,84,214,206,129,149,111,190,9,75,150,206,68,229,31,50,237,234,197, +176,242,197,55,97,246,63,206,44,229,156,33,18,66,16,81,41,88,233,18,0,96, +238,255,105,124,110,119,221,131,235,225,135,127,86,249,195,211,163,249, +218,178,204,239,82,181,11,56,53,159,47,181,46,184,80,0,0,1,0,73,68,65,84, +112,92,80,214,16,66,168,74,52,128,148,120,202,138,103,108,41,132,8,46,9, +112,205,83,251,87,236,28,255,192,249,195,128,89,11,239,135,231,94,168,191, +251,146,250,244,150,57,115,230,192,155,111,166,6,51,17,94,252,210,164,211, +206,210,156,39,239,156,137,135,182,192,143,63,95,243,227,211,182,127,247, +142,79,7,81,5,95,124,152,31,147,70,243,137,71,72,238,73,73,16,36,2,227, +17,46,153,129,44,99,226,48,170,207,122,44,12,87,157,116,143,196,66,249, +132,24,4,136,210,110,176,218,159,64,46,144,114,201,212,12,19,85,66,241, +101,42,19,23,200,61,234,51,206,40,231,92,128,64,24,86,107,15,219,10,176, +132,24,134,97,92,117,215,119,231,166,190,85,170,133,25,15,239,220,185,246, +219,179,79,107,188,228,167,141,143,205,4,37,190,170,185,55,205,5,128,37, +243,63,77,8,166,110,44,156,54,231,30,0,128,241,21,165,42,177,13,166,184, +97,250,222,66,69,205,226,213,253,253,111,252,229,233,145,60,244,31,39,226, +79,204,201,156,18,151,246,47,0,160,28,6,72,81,56,152,0,0,1,0,73,68,65,84, +187,85,47,94,115,174,48,82,255,25,4,226,85,127,221,252,243,197,65,139,123, +234,119,175,88,60,62,253,29,206,248,198,218,199,103,101,116,48,251,137, +13,47,124,182,28,229,204,71,55,171,115,154,98,206,147,155,95,252,92,5,166, +207,85,234,252,232,92,91,163,81,8,228,62,250,73,244,60,244,4,50,32,208, +114,124,15,130,148,32,212,253,50,42,221,158,88,56,235,80,95,83,146,247, +37,89,111,130,247,184,188,207,229,125,30,239,247,68,194,227,253,30,143, +123,60,225,241,184,207,19,174,218,40,18,42,31,87,115,1,251,19,46,229,106, +152,139,11,228,50,137,249,185,229,195,116,68,67,185,190,182,42,206,6,69, +103,37,74,37,235,192,179,193,28,56,117,247,182,146,187,154,80,161,80,253, +168,183,168,119,5,23,69,85,217,80,1,171,74,113,40,20,202,202,202,10,135, +195,161,80,200,52,77,68,84,181,114,207,243,24,99,136,104,154,166,227,56, +170,162,173,114,225,64,103,170,243,32,90,21,152,105,154,161,80,40,28,14, +7,111,81,241,168,105,118,106,8,116,64,203,80,238,46,29,120,0,0,1,0,73,68, +65,84,40,228,56,142,101,89,166,105,170,8,213,156,191,179,133,65,8,225,156, +171,222,60,207,11,22,33,9,206,128,105,154,144,94,185,37,56,112,117,203, +123,80,225,9,142,66,237,49,120,54,12,67,85,240,85,84,182,109,7,81,105,52, +23,33,223,121,246,139,39,170,246,228,215,201,236,66,46,17,146,45,101,73, +207,107,60,212,246,224,156,39,198,228,79,206,54,115,35,86,94,182,149,227, +24,17,151,245,255,221,166,155,166,85,205,205,13,23,168,170,55,81,55,160, +4,185,182,100,28,41,23,148,161,79,133,199,164,71,101,50,152,199,221,184, +191,139,113,206,56,43,46,11,69,115,140,190,223,152,79,62,186,189,56,247, +92,31,181,254,63,102,232,43,36,169,145,217,116,197,192,48,12,85,205,0,0, +229,59,165,161,96,181,13,227,116,212,75,74,247,170,195,32,167,206,116,250, +224,119,5,230,10,246,174,172,23,168,223,178,172,193,109,44,203,82,151,135, +212,233,200,32,16,168,218,46,165,84,141,7,180,12,46,57,170,231,160,116, +115,182,48,84,85,39,248,91,97,192,159,11,193,123,36,100,80,203,0,0,1,0, +73,68,65,84,85,168,153,227,153,129,181,131,11,109,198,93,237,68,53,11,46, +108,58,215,214,104,0,160,48,191,188,43,185,219,117,133,129,148,0,17,196, +143,132,67,0,164,229,248,251,85,185,19,184,193,56,82,46,153,101,136,44, +59,118,253,184,251,215,236,95,241,233,154,107,108,211,1,0,0,130,32,79,125, +36,130,100,2,25,151,148,73,79,205,30,81,119,72,10,228,125,253,73,198,24, +19,156,113,102,152,54,235,131,242,146,73,195,119,80,67,108,237,1,66,132, +116,26,168,156,194,57,15,92,28,228,128,131,157,27,136,27,210,30,12,68,15, +0,74,130,36,152,254,156,150,166,234,65,229,224,170,13,164,253,21,36,236, +65,108,106,239,166,105,6,46,206,124,123,176,150,147,178,246,128,158,7,183, +84,189,5,49,168,228,250,108,97,40,107,103,94,138,2,113,103,30,139,148,50, +56,69,65,216,234,12,100,158,237,96,167,153,9,117,166,247,53,154,139,153, +9,181,211,118,237,94,239,37,164,45,153,73,12,233,120,232,145,156,72,100, +107,203,218,57,99,110,226,146,50,233,83,226,89,210,118,12,24,69,43,0,0, +1,0,73,68,65,84,140,200,194,49,119,181,156,220,189,118,207,191,215,149, +93,82,18,43,181,76,27,0,148,184,5,138,35,61,157,157,61,135,227,126,252, +178,154,137,153,245,110,137,226,100,119,156,9,198,56,103,156,135,34,64, +15,202,242,146,9,195,119,80,67,105,237,76,231,42,227,4,90,9,140,25,100, +175,131,87,182,11,188,60,56,81,205,124,53,176,182,105,154,106,38,95,176, +47,72,47,233,103,219,169,63,76,130,177,74,149,35,171,30,130,231,32,0,149, +11,3,128,42,101,4,221,102,90,50,72,96,7,183,204,188,108,100,158,129,51, +134,145,121,29,82,233,127,230,57,9,186,194,140,187,240,85,155,1,169,52, +156,110,231,1,234,215,226,214,104,0,160,174,118,154,108,48,121,157,231, +199,137,19,21,104,123,34,105,22,229,197,246,180,117,188,221,222,48,187, +230,122,75,218,148,216,166,176,8,152,182,17,250,242,244,167,166,150,47, +248,215,221,255,180,163,125,117,94,36,31,1,16,37,229,172,55,217,43,17,167, +148,94,217,114,116,43,147,62,162,148,40,36,8,129,194,167,180,187,55,193, +57,149,200,220,129,0,0,1,0,73,68,65,84,103,92,68,178,9,71,38,142,134,198, +76,187,98,248,14,106,232,115,109,149,101,7,102,81,186,81,117,3,211,52,51, +111,49,87,95,100,206,121,24,80,238,8,102,212,65,134,181,131,141,65,182, +59,32,91,87,123,87,189,101,102,217,153,23,21,21,12,166,167,163,100,186, +56,200,160,51,107,56,106,191,170,231,115,180,12,66,61,71,24,144,206,139, +85,12,131,199,84,7,168,25,78,207,169,51,79,218,25,165,156,89,225,249,232, +63,80,141,102,68,51,186,188,174,32,92,217,221,183,215,59,105,24,81,6,97, +143,247,56,142,99,198,178,179,214,125,240,202,148,242,153,38,177,9,152, +233,89,219,104,25,161,25,21,139,102,84,44,58,154,56,184,171,107,91,87,188, +3,17,75,179,71,151,68,71,95,86,54,11,0,174,171,47,140,123,113,199,177,16, +133,90,64,170,227,96,55,99,140,113,193,57,207,202,9,9,202,229,209,232,164, +241,243,134,239,160,134,190,174,29,84,21,50,43,173,144,182,73,80,168,85, +96,6,144,145,168,102,190,170,222,126,198,76,83,93,33,50,243,92,165,42,151, +164,248,7,0,0,1,0,73,68,65,84,53,144,40,132,200,212,162,106,166,36,155, +89,211,8,170,22,144,54,105,112,69,25,112,92,31,178,229,185,195,200,36,56, +246,76,155,147,116,229,122,240,177,159,113,95,65,87,144,177,84,119,80,183, +209,233,182,230,34,103,214,21,55,191,190,183,133,198,18,86,2,173,44,79, +64,24,165,85,85,90,176,171,185,163,126,251,83,15,93,253,143,170,25,130, +20,200,29,51,236,24,97,147,216,37,217,149,11,198,220,158,217,143,26,153, +156,92,122,101,79,242,80,129,21,85,21,146,190,62,175,175,207,229,92,48, +206,17,100,36,7,68,151,57,117,202,205,89,225,232,240,13,43,13,113,133,36, +40,113,100,230,200,65,226,172,228,149,185,61,83,217,153,242,26,252,135, +127,240,60,192,218,198,233,55,206,100,198,160,94,29,208,185,145,158,178, +162,218,7,222,31,208,103,102,110,27,244,121,222,150,103,60,21,3,194,200, +60,144,115,156,204,76,101,15,232,249,220,63,133,204,194,189,86,182,70,179, +96,246,23,55,110,123,57,153,76,120,199,140,172,106,134,217,73,222,23,54, +136,57,110,116,201,7,102,88,96,0,0,1,0,73,68,65,84,190,3,123,94,216,246, +189,59,103,124,37,63,44,37,114,110,82,42,195,182,17,178,12,219,36,150,1, +166,65,76,0,20,40,16,164,144,156,35,29,157,55,110,199,177,15,114,162,142, +68,225,122,180,163,163,151,49,193,5,231,92,22,148,153,96,8,108,142,76,189, +245,198,97,61,162,97,169,144,4,138,12,54,194,217,117,115,54,107,127,200, +221,13,110,156,25,67,112,157,200,180,246,224,93,12,40,38,156,163,230,126, +222,150,231,13,227,28,167,66,49,192,230,231,104,124,70,251,103,30,160,182, +182,70,19,9,199,22,204,250,194,27,141,207,99,164,207,59,201,236,194,36, +239,53,12,176,156,144,57,110,116,241,238,246,63,124,111,221,215,239,156, +241,208,164,178,169,142,12,91,134,99,27,142,73,108,131,88,4,78,253,250, +8,100,18,37,71,26,13,199,250,18,9,38,163,92,136,142,3,125,158,175,156,45, +16,100,97,105,196,60,152,91,93,50,115,76,213,212,97,61,162,225,154,249, +151,169,146,143,146,90,14,232,121,64,63,231,48,102,16,67,144,231,102,182, +63,135,178,207,214,109,17,91,194,185,0,0,1,0,73,68,65,84,32,238,243,182, +60,111,24,67,66,230,174,207,125,128,26,205,69,206,130,217,95,220,246,238, +106,63,30,227,102,143,204,62,130,121,73,222,29,54,136,233,132,140,201,227, +74,219,14,117,255,243,166,111,141,47,153,124,101,205,181,87,84,94,21,13, +229,154,196,38,0,132,152,36,181,142,169,68,64,129,172,237,100,211,161,222, +182,222,132,75,185,223,222,26,79,198,25,23,66,112,41,132,28,83,87,148,67, +202,18,205,222,103,151,252,189,218,233,48,77,214,134,161,189,203,70,163, +209,104,254,255,228,189,61,155,159,255,247,191,46,186,182,194,51,142,139, +146,246,68,135,68,129,6,49,213,74,173,137,36,235,58,145,232,233,243,128, +64,101,94,77,97,118,73,101,94,173,122,35,2,156,136,119,29,79,28,237,56, +217,154,164,9,199,54,139,243,178,105,63,248,46,231,66,10,129,40,173,138, +138,210,9,227,199,246,108,61,49,183,238,142,5,115,238,87,82,45,210,214, +214,104,52,154,143,194,175,214,60,189,181,105,77,217,188,58,87,116,137, +156,246,190,35,148,138,56,34,39,64,212,218,35,74,170,160,98,0,0,1,0,73, +68,65,84,82,66,127,130,186,30,239,75,80,0,0,76,255,67,136,100,89,142,109, +198,162,142,31,151,199,187,124,193,165,148,4,164,69,32,171,188,172,124, +242,164,73,221,239,28,46,150,85,247,127,225,71,0,128,136,195,167,108,208, +214,214,104,52,23,15,171,94,125,124,111,207,206,242,43,39,123,236,132,199, +79,122,188,199,23,61,76,244,115,233,74,228,106,25,41,114,170,192,72,2,107, +3,96,127,31,239,62,198,152,15,40,77,130,33,2,33,130,161,81,101,149,151, +94,114,89,215,219,31,100,37,34,75,191,240,163,112,40,6,218,218,26,141,70, +51,132,172,122,245,219,123,143,239,172,153,61,139,27,73,143,247,120,172, +199,231,189,76,36,4,184,2,93,33,125,129,20,81,32,164,102,187,121,9,225, +185,152,232,67,41,76,144,22,160,13,210,38,104,3,56,227,106,234,234,198, +78,57,176,109,187,221,111,124,249,11,207,133,67,169,217,126,133,57,195, +181,150,170,66,91,91,163,209,92,68,32,194,170,87,31,223,117,224,237,186, +185,55,58,121,17,151,245,36,188,147,30,237,243,89,130,242,161,196,119,32, +0,0,1,0,73,68,65,84,164,68,202,132,47,56,19,146,83,202,169,47,164,68,41, +8,34,65,105,160,52,81,154,128,102,44,187,224,178,137,211,115,179,10,246, +108,248,117,145,93,114,215,109,223,15,135,162,106,121,214,225,86,54,104, +107,107,52,154,139,7,181,156,54,32,188,183,119,211,79,94,251,118,197,148, +171,70,95,58,75,154,60,158,60,222,151,60,225,179,4,101,46,227,30,227,148, +11,150,249,185,176,82,2,74,34,5,137,70,242,107,43,234,170,71,77,232,216, +189,189,233,15,27,230,207,188,243,186,57,247,65,186,219,130,225,87,54,104, +107,107,52,154,139,135,212,231,120,35,0,64,194,237,123,229,55,63,120,103, +207,198,177,151,47,26,243,169,235,192,130,120,242,100,220,237,73,184,61, +241,100,47,227,148,115,198,37,23,66,18,48,34,225,156,226,252,81,133,185, +229,217,78,180,171,117,231,7,111,255,71,121,94,245,45,11,191,54,170,164, +78,125,4,130,182,182,70,163,209,12,25,106,45,54,46,80,240,212,170,253,140, +10,198,24,245,233,177,227,7,127,183,227,229,214,174,29,37,213,151,21,87, +6,250,152,252,0,0,1,0,73,68,65,84,78,41,169,156,156,87,92,131,200,37,202, +212,224,36,49,12,98,38,250,142,31,59,184,251,232,193,247,15,53,109,31,149, +87,55,117,226,205,227,107,167,153,182,101,90,182,105,89,134,105,26,166, +81,82,16,185,48,135,163,173,173,209,104,62,177,8,41,5,23,92,8,198,120,234, +67,212,25,103,148,81,159,49,159,82,143,170,102,148,37,91,187,118,116,158, +104,60,222,119,224,68,223,129,104,110,121,52,183,92,229,228,212,139,159, +60,186,63,150,85,84,152,83,85,83,118,69,109,233,84,199,78,217,217,9,57, +166,237,88,33,203,178,109,211,178,170,171,138,47,204,65,105,107,107,52, +154,79,44,233,21,61,165,122,112,206,133,144,140,114,33,4,87,31,54,206,184, +20,82,112,129,136,82,32,162,64,9,125,201,99,113,247,4,0,32,128,99,69,138, +115,171,137,145,94,191,194,0,211,180,136,105,88,150,109,88,166,97,154,150, +101,17,211,48,12,147,24,70,89,81,246,5,56,40,109,109,141,70,243,9,71,73, +14,83,165,18,80,107,64,4,43,215,33,74,68,53,80,169,190,135,96,233,222,114, +86,0,0,0,147,73,68,65,84,173,209,192,142,8,144,90,150,36,152,202,77,64, +173,239,154,31,27,198,169,217,103,68,91,91,163,209,124,146,201,84,118,166, +133,225,212,215,167,125,166,250,169,54,233,49,70,76,175,244,147,209,85, +170,77,110,246,25,214,106,30,110,46,196,136,167,70,163,209,124,188,12,78, +79,109,43,88,97,237,127,178,212,90,111,66,124,44,202,6,157,107,107,52,26, +205,200,66,127,72,149,70,163,209,140,36,180,181,53,26,141,102,36,161,173, +173,209,104,52,35,9,109,109,141,70,163,25,73,104,107,107,52,26,205,72,66, +91,91,163,209,104,70,18,255,13,1,101,50,84,72,18,31,168,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_92 = 1455; +static unsigned char xml_res_file_92[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,24,0,0,0,24,8,3,0,0, +0,215,169,205,202,0,0,3,0,80,76,84,69,0,0,0,128,0,0,0,128,0,128,128,0,0, +0,128,128,0,128,0,128,128,192,192,192,192,220,192,166,202,240,0,0,0,0,0, +132,255,0,0,255,255,0,255,255,255,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,251,240,160,160, +164,128,128,128,255,0,0,0,255,0,255,255,0,0,0,255,255,0,255,0,255,255,255, +255,255,62,239,180,236,0,0,1,0,116,82,78,83,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,0,255,255,192,109,220,69, +0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73, +77,69,7,215,12,28,22,20,32,17,187,171,78,0,0,0,7,116,69,88,116,65,117,116, +104,111,114,0,169,174,204,72,0,0,0,12,116,69,88,116,68,101,115,99,114,105, +112,116,105,111,110,0,19,9,33,35,0,0,0,10,116,69,88,116,67,111,112,121, +114,105,103,104,116,0,172,15,204,58,0,0,0,14,116,69,88,116,67,114,101,97, +116,105,111,110,32,116,105,109,101,0,53,247,15,9,0,0,0,9,116,69,88,116, +83,111,102,116,119,97,114,101,0,93,112,255,58,0,0,0,11,116,69,88,116,68, +105,115,99,108,97,105,109,101,114,0,183,192,180,143,0,0,0,8,116,69,88,116, +87,97,114,110,105,110,103,0,192,27,230,135,0,0,0,7,116,69,88,116,83,111, +117,114,99,101,0,245,255,131,235,0,0,0,8,116,69,88,116,67,111,109,109,101, +110,116,0,246,204,150,191,0,0,0,6,116,69,88,116,84,105,116,108,101,0,168, +238,210,39,0,0,0,98,73,68,65,84,120,156,173,209,209,10,192,32,8,64,81,71, +246,180,233,255,255,107,12,150,134,149,147,193,54,186,175,7,82,18,206,135, +96,57,192,232,6,104,5,96,220,181,175,128,0,185,229,1,83,41,133,164,100, +187,40,160,131,67,178,167,18,51,117,96,133,54,250,61,108,53,217,39,128, +206,169,219,253,0,34,114,235,26,76,191,236,97,186,71,30,173,57,109,236, +2,134,169,26,64,30,137,104,190,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_93 = 6936; +static unsigned char xml_res_file_93[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,231,0,0,0,32,8,2,0, +0,0,167,245,39,187,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43, +14,27,0,0,0,7,116,73,77,69,7,215,12,23,13,52,14,159,155,73,179,0,0,0,7, +116,69,88,116,65,117,116,104,111,114,0,169,174,204,72,0,0,0,12,116,69,88, +116,68,101,115,99,114,105,112,116,105,111,110,0,19,9,33,35,0,0,0,10,116, +69,88,116,67,111,112,121,114,105,103,104,116,0,172,15,204,58,0,0,0,14,116, +69,88,116,67,114,101,97,116,105,111,110,32,116,105,109,101,0,53,247,15, +9,0,0,0,9,116,69,88,116,83,111,102,116,119,97,114,101,0,93,112,255,58,0, +0,0,11,116,69,88,116,68,105,115,99,108,97,105,109,101,114,0,183,192,180, +143,0,0,0,8,116,69,88,116,87,97,114,110,105,110,103,0,192,27,230,135,0, +0,0,7,116,69,88,116,83,111,117,114,99,101,0,245,255,131,235,0,0,0,8,116, +69,88,116,67,111,109,109,101,110,116,0,246,204,150,191,0,0,0,6,116,69,88, +116,84,105,116,108,101,0,168,238,210,39,0,0,1,0,73,68,65,84,120,156,237, +93,123,124,21,197,189,255,238,158,115,242,32,82,155,180,66,66,30,36,33, +16,121,92,219,91,222,228,113,2,36,8,218,22,107,109,209,42,84,129,4,176, +168,128,68,4,181,247,86,77,193,26,240,82,104,65,66,124,191,181,181,173, +34,49,239,96,80,111,107,63,189,165,40,132,156,60,64,111,171,244,154,180, +66,146,179,51,187,59,247,143,217,157,204,57,39,9,129,2,38,113,191,159,253, +228,67,118,231,241,251,205,176,223,249,205,119,102,54,10,99,12,14,28,56, +112,224,96,144,64,253,188,13,112,224,192,129,3,7,103,1,135,181,29,56,112, +224,96,48,193,253,121,27,112,49,208,209,209,65,136,6,152,253,206,225,138, +138,186,36,44,204,115,1,109,114,224,192,129,131,115,130,242,69,208,181, +23,47,94,252,198,27,111,2,97,0,128,190,253,85,0,19,32,143,61,182,119,225, +194,107,46,134,113,14,28,56,112,112,54,248,66,196,218,237,237,127,107,107, +187,20,88,4,116,1,12,80,1,165,151,180,97,192,39,192,139,126,127,251,69, +53,209,129,3,7,14,250,135,162,26,130,0,0,0,1,0,73,68,65,84,47,4,107,123, +60,110,32,42,44,44,54,42,202,96,140,157,62,77,116,189,55,181,36,2,160,64, +164,170,58,138,191,3,7,14,6,34,190,16,220,196,24,128,206,5,11,146,125,190, +130,35,71,242,191,246,181,175,0,29,128,209,211,165,3,198,153,84,20,7,159, +55,90,75,23,40,138,82,88,251,121,219,225,192,193,231,128,47,4,107,3,0,88, +68,132,59,38,38,50,54,54,202,227,113,245,196,203,42,224,2,220,128,11,80, +220,238,1,49,11,225,236,212,3,65,213,22,42,138,178,160,180,245,243,48,234, +236,208,163,165,220,175,158,239,22,214,246,246,188,55,48,27,231,197,224, +179,66,109,161,18,132,127,185,83,120,145,206,136,228,160,87,124,113,88, +27,166,201,0,104,154,209,203,235,173,1,167,129,83,64,39,96,158,60,249,217, +39,159,180,247,113,181,181,181,107,154,255,162,25,95,252,80,105,43,147, +209,253,168,231,187,3,6,57,87,175,7,202,94,169,106,229,191,114,59,91,142, +150,193,190,219,109,125,203,209,50,96,253,213,57,0,152,9,192,100,96,166, +141,30,125,100,152,18,235,31,0,0,1,0,73,68,65,84,172,59,129,72,118,150, +6,158,231,184,189,108,121,138,114,101,73,75,239,54,247,31,44,4,253,206, +234,76,70,134,50,6,68,68,121,161,161,170,106,159,162,135,10,120,128,138, +176,176,223,71,69,241,61,36,90,81,81,225,195,15,223,219,91,6,198,112,250, +52,54,110,252,241,154,53,119,92,8,131,131,48,127,254,252,178,178,229,59, +171,111,126,40,7,252,213,85,76,6,192,52,77,195,48,228,148,34,226,187,8, +86,245,23,201,151,207,7,202,142,182,50,54,218,166,158,218,125,197,0,128, +178,35,205,166,153,104,147,81,237,190,98,96,222,184,36,195,48,18,111,121, +67,191,5,96,204,48,12,198,24,147,253,82,85,213,118,143,113,102,52,77,107, +149,66,85,85,69,81,248,207,115,176,52,148,22,251,87,206,252,189,45,251, +151,142,102,166,105,226,248,99,87,141,41,40,47,47,88,81,50,251,245,91,146, +130,227,240,126,149,150,243,48,99,15,219,3,82,208,179,115,112,237,92,157, +114,48,112,49,68,88,91,243,251,59,186,186,104,47,79,187,52,173,31,179,10, +237,186,235,186,118,50,138,254,51,0,0,1,0,73,68,65,84,236,176,126,209,245, +14,195,232,232,45,169,174,99,225,66,156,56,209,107,130,243,139,73,119,221, +53,177,172,108,235,67,123,11,50,111,78,52,77,0,138,97,0,96,166,245,98,139, +55,243,95,164,173,11,130,228,185,215,205,71,89,241,190,234,45,89,94,206, +68,39,124,135,144,183,123,247,191,173,92,185,117,95,205,150,172,108,78, +190,199,27,15,1,121,215,206,73,52,77,211,226,44,57,192,84,109,152,166,169, +242,88,156,153,124,220,226,41,185,227,46,151,11,231,202,110,231,204,146, +204,30,63,140,248,37,175,150,189,31,53,127,123,197,17,31,165,113,156,169, +133,229,252,223,253,55,70,252,4,192,243,154,166,121,86,174,157,47,234,119, +48,160,48,68,20,146,93,143,62,58,62,45,109,86,90,90,70,79,215,91,149,111, +1,95,57,83,25,234,176,97,136,137,113,199,196,124,57,38,38,122,196,136,176, +184,56,244,118,37,38,98,248,112,40,138,235,98,248,6,48,51,123,213,238,60, +84,172,252,209,222,38,66,136,166,105,132,114,214,162,28,186,174,83,90,125, +87,120,184,199,227,113,43,69,185,193,0,0,1,0,73,68,65,84,187,221,170,170, +42,133,53,60,111,107,233,130,64,173,53,116,238,92,91,216,203,100,186,255, +121,45,121,55,160,16,126,111,65,105,107,114,234,36,0,135,124,173,166,174, +235,186,174,55,149,191,82,129,9,201,139,231,173,1,14,29,107,178,124,104, +170,248,85,5,48,97,116,28,165,148,54,149,94,29,30,25,185,161,154,16,77, +211,52,77,163,180,102,67,100,100,56,119,112,67,173,160,114,195,48,12,195, +32,132,16,210,84,250,237,168,200,200,200,176,176,48,183,219,125,87,105, +176,233,193,18,180,101,106,109,161,146,178,188,12,64,241,28,85,117,187, +221,110,119,97,21,165,148,54,149,44,112,91,45,121,102,165,193,228,50,141, +174,235,148,82,26,63,102,46,128,195,199,124,154,86,189,33,106,216,176,13, +213,148,54,237,189,202,237,118,187,92,119,213,112,203,197,122,69,160,18, +46,76,84,231,239,61,14,112,205,199,48,106,55,68,68,132,139,206,181,123, +54,176,83,100,191,122,115,138,234,186,126,174,58,146,131,1,132,33,194,218, +39,58,58,226,219,218,106,219,218,222,234,233,202,36,18,246,103,198,0,0, +1,0,73,68,65,84,20,80,248,196,58,44,204,213,91,160,97,24,0,174,0,142,0, +62,96,65,31,213,81,10,211,196,197,140,87,226,127,184,254,118,160,114,245, +47,171,253,126,191,223,223,69,40,0,70,9,165,148,16,162,249,246,46,188,100, +193,118,57,67,241,28,229,202,189,45,166,153,148,50,17,40,123,169,210,86, +197,91,43,95,42,3,80,188,175,198,214,74,107,246,21,3,235,175,242,134,74, +168,201,99,38,5,72,210,189,231,245,254,172,165,100,30,80,60,123,125,181, +165,47,215,20,206,46,6,214,87,191,177,116,52,243,46,184,19,40,127,165,188, +153,82,170,105,90,227,145,74,172,206,157,78,70,141,153,139,202,35,62,77, +211,252,126,191,191,241,131,74,96,245,156,105,132,16,74,117,202,0,24,196, +239,215,52,77,107,122,252,59,95,254,230,207,133,107,91,115,93,43,95,1,0, +147,25,134,65,41,165,205,79,124,55,230,107,183,87,73,222,231,231,151,1, +166,105,171,222,45,37,87,42,179,139,3,218,103,54,111,159,16,246,50,40,169, +186,43,50,125,85,69,64,98,225,87,111,18,179,97,67,93,144,233,0,0,1,0,73, +68,65,84,24,186,174,19,66,124,149,175,86,1,24,23,63,66,211,136,1,96,199, +85,195,135,143,191,181,18,0,96,154,134,97,84,173,183,72,213,130,164,132, +75,165,154,134,97,24,134,222,92,250,237,168,249,1,61,187,117,110,183,110, +94,83,168,4,150,133,226,217,74,225,190,30,156,210,52,77,211,8,33,148,82, +49,59,9,78,229,96,144,96,136,176,182,226,114,13,7,18,85,53,238,210,75,227, +162,163,227,194,195,227,0,113,13,3,0,197,239,215,219,219,253,39,79,118, +80,106,244,126,202,198,3,196,2,49,64,196,69,52,255,12,96,96,166,153,185, +108,251,92,224,23,219,159,108,210,52,205,79,12,0,134,65,9,33,148,54,63, +113,199,29,85,171,126,253,247,191,255,189,189,189,253,244,233,211,93,93, +93,190,221,121,40,207,223,89,109,24,89,243,215,1,229,71,124,60,44,109,46, +127,185,28,0,80,188,175,154,203,11,205,141,135,128,121,99,147,12,51,4,204, +123,213,122,160,236,104,11,159,104,183,84,244,145,55,241,150,55,42,215, +1,91,231,22,86,27,134,81,93,56,167,24,179,3,60,32,0,0,1,0,73,68,65,84,243, +30,245,109,201,54,77,211,52,71,143,203,3,42,143,54,81,74,9,169,45,219,137, +156,148,88,74,99,51,191,53,27,59,246,215,104,26,33,164,217,247,62,224,77, +137,211,8,33,132,16,195,0,96,82,66,52,173,233,233,245,119,214,0,179,31, +121,175,173,173,237,212,169,83,157,157,157,254,59,39,150,3,48,13,74,41, +165,205,79,223,185,182,6,200,217,250,135,79,63,253,244,179,207,62,235,236, +236,212,26,119,231,1,204,228,209,125,115,201,138,130,242,117,149,60,216, +228,240,61,58,15,229,249,59,171,179,54,19,223,174,60,0,107,246,159,62,221, +222,222,126,242,228,189,83,170,246,237,0,102,63,242,71,94,93,71,71,199, +155,107,193,75,226,212,28,186,242,201,219,71,215,117,253,192,125,83,214, +214,0,40,200,153,74,8,209,173,69,135,85,175,126,242,73,91,91,219,169,83, +247,207,162,85,133,185,91,1,172,173,176,60,37,190,221,121,64,121,193,206, +106,195,200,218,108,255,206,120,119,181,60,126,251,234,170,213,175,181, +181,181,181,183,183,115,223,27,118,229,89,169,141,70,96,109,156,0,0,1,0, +73,68,65,84,150,61,155,139,1,204,219,211,36,252,162,149,235,96,94,105,59, +117,199,27,167,78,181,181,181,157,60,121,239,228,174,174,174,174,46,191, +223,207,137,155,123,225,16,247,32,197,80,97,109,192,4,104,82,18,222,125, +23,62,31,150,44,145,159,50,0,136,218,191,191,53,45,109,207,248,241,123, +255,252,231,79,129,40,192,37,93,110,155,199,25,160,1,56,155,143,150,92, +120,48,198,24,139,191,177,248,103,94,212,109,120,252,128,166,113,62,96, +58,33,132,208,186,146,117,181,192,174,107,47,187,236,178,232,232,232,75, +46,185,36,50,50,50,109,101,5,128,67,141,77,148,38,164,229,2,219,94,175, +226,20,241,65,57,214,148,149,173,1,182,190,206,103,205,190,35,229,200,189, +198,59,138,10,112,122,178,232,118,158,77,210,166,217,124,164,28,107,223, +124,179,215,188,25,15,150,173,1,182,229,21,22,22,230,109,67,238,47,183, +223,20,103,149,56,202,187,48,23,120,223,215,76,8,109,109,250,0,72,79,24, +73,41,141,77,188,220,186,75,90,106,94,171,67,246,252,233,35,56,167,24,6, +32,76,88,152,0,0,1,0,73,68,65,84,3,96,152,134,97,156,120,235,245,58,96, +197,139,207,93,31,207,73,83,215,117,61,49,45,23,128,73,41,165,122,107,237, +239,106,129,130,23,158,254,126,172,222,13,147,9,5,169,122,231,202,10,96, +91,46,87,24,56,210,86,148,219,237,67,13,6,192,180,180,24,123,68,172,57, +234,211,236,248,116,230,79,62,187,127,6,161,18,186,131,110,0,40,95,145, +230,137,138,138,138,142,142,30,249,157,95,2,64,193,11,155,166,51,198,152, +201,0,228,191,208,186,97,10,33,150,180,85,189,239,17,0,119,236,127,96,38, +229,164,77,227,22,111,255,133,213,67,86,225,12,96,166,174,235,122,237,238, +219,171,128,157,223,138,137,137,137,142,142,30,62,124,248,176,97,195,248, +44,224,80,99,19,173,222,177,178,2,88,83,246,219,197,82,231,205,122,176, +227,129,89,194,41,30,98,251,249,148,37,36,220,118,136,123,144,98,136,176, +182,5,151,11,35,70,32,38,6,81,81,242,109,29,0,40,33,255,104,107,251,184, +189,253,99,93,255,12,232,0,254,9,180,217,215,255,1,23,111,27,223,217,130, +139,203,66,4,0,0,1,0,73,68,65,84,129,49,198,76,51,254,251,171,10,128,189, +143,190,120,66,215,25,0,166,19,74,41,53,122,29,96,24,37,154,54,50,227,91, +115,129,195,13,62,77,211,170,95,223,142,219,230,78,159,145,123,27,240,151, +99,77,132,144,234,125,255,5,140,79,138,229,12,34,17,183,174,235,166,153, +56,247,186,121,192,95,124,173,166,174,87,191,254,8,110,207,155,53,51,239, +118,224,112,104,94,66,8,153,241,159,175,173,6,182,111,223,142,213,175,189, +116,125,44,231,41,66,8,137,77,188,28,168,122,181,246,184,174,183,28,171, +67,190,119,170,78,41,37,83,114,10,80,187,239,192,113,66,154,125,7,128,177, +241,35,41,229,58,3,39,29,67,215,141,19,190,3,64,118,74,188,21,75,82,74, +8,33,84,55,0,24,186,174,235,180,165,161,14,200,78,137,231,209,41,79,70, +168,206,0,198,137,81,55,250,108,31,254,92,167,130,221,254,253,250,162,76, +224,209,69,113,113,113,95,253,234,87,163,55,213,216,94,16,77,211,186,135, +133,94,40,175,224,133,214,230,187,167,89,180,14,64,18,79,8,33,190,59,26, +157,28,0,0,1,0,73,68,65,84,198,195,0,86,207,153,38,56,84,211,180,216,164, +203,1,28,62,214,196,239,81,6,48,93,167,148,246,105,185,175,225,48,128,219, +230,78,151,139,18,228,108,53,16,165,194,114,17,101,243,134,10,90,199,118, +48,136,48,68,246,144,88,96,12,132,0,150,68,45,112,41,16,141,131,192,239, +197,254,191,211,128,18,30,17,53,44,82,164,233,232,248,39,95,171,191,120, +214,158,13,172,183,107,198,146,7,51,247,220,251,227,103,223,125,12,0,76, +211,160,148,254,181,249,40,128,229,207,248,238,201,112,241,5,52,190,81, +129,199,130,157,157,157,95,137,27,11,236,62,210,208,217,217,176,111,39, +86,253,106,138,191,11,57,183,98,199,175,43,26,175,203,108,248,11,176,42, +103,114,87,87,151,216,124,194,75,240,120,60,138,162,36,165,78,2,182,53, +52,153,70,227,27,219,113,219,111,167,105,126,115,246,173,248,121,104,94, +69,81,24,99,196,106,248,195,199,124,254,41,137,138,184,63,53,103,21,118, +238,58,214,162,31,172,42,65,102,209,40,93,167,138,162,170,113,201,217,216, +227,107,53,223,241,147,212,36,0,0,1,0,73,68,65,84,173,45,5,150,102,77,225, +27,25,85,213,52,236,61,34,204,4,128,177,9,35,8,33,134,97,88,187,49,52,157, +1,48,117,74,41,23,131,199,37,198,113,141,130,49,102,24,134,98,81,49,209, +52,237,163,99,135,1,172,250,213,223,254,35,67,17,45,35,130,229,206,206, +15,137,9,64,215,186,186,56,37,51,54,98,225,238,195,215,126,252,155,252, +220,123,235,1,236,186,246,178,93,88,249,210,71,247,101,40,170,170,186,221, +110,190,77,197,118,13,192,188,221,141,175,253,96,164,21,213,234,186,206, +77,178,89,155,49,195,208,173,117,69,67,227,149,17,191,223,47,237,192,211, +56,197,18,77,211,128,110,211,155,125,239,3,40,120,161,117,227,116,38,250, +5,246,214,189,15,159,211,45,187,187,20,4,239,231,235,142,181,169,206,91, +201,226,104,190,205,198,229,114,137,141,55,231,251,191,170,131,11,142,161, +21,107,247,130,221,128,15,212,135,78,31,186,248,149,139,174,107,150,126, +207,231,251,31,251,250,211,53,215,44,110,111,199,192,18,70,122,64,194,247, +10,150,1,79,148,150,54,2,10,26,172,13,0,0,1,0,73,68,65,84,224,12,21,151, +48,22,192,222,154,183,69,52,42,130,47,43,124,158,234,205,7,118,87,212,213, +85,236,70,126,214,55,252,126,77,155,236,45,64,205,111,170,234,170,127,87, +11,111,242,72,77,6,231,71,107,205,42,123,193,58,224,145,253,181,181,251, +183,227,71,115,166,81,74,200,212,156,21,189,228,173,251,241,119,119,193, +91,80,224,69,237,157,133,79,55,219,209,31,33,132,196,38,123,129,146,234, +23,78,28,67,230,130,140,56,75,8,30,153,48,22,40,173,125,249,120,3,144,145, +60,202,162,54,93,215,133,195,12,12,64,105,205,187,34,92,229,241,51,3,192, +76,33,82,236,173,121,151,219,108,79,22,12,6,48,211,208,117,61,54,49,29, +192,174,55,15,4,70,163,182,172,76,56,193,25,6,165,132,16,161,14,25,177, +215,148,54,52,52,54,54,250,158,89,14,96,119,197,91,33,19,145,160,229,195, +96,116,111,207,86,20,33,124,199,38,140,19,165,9,103,154,155,62,0,144,158, +48,82,231,226,57,179,196,175,17,241,227,0,236,169,168,23,150,11,173,131, +16,50,50,97,28,192,223,186,48,0,0,1,0,73,68,65,84,128,93,229,7,196,35,46, +91,235,186,110,24,58,31,48,96,111,68,145,245,16,39,190,30,236,248,66,176, +246,37,64,76,224,21,14,68,68,125,41,38,230,50,251,26,17,17,113,9,223,9, +109,127,208,117,192,181,140,21,184,206,88,252,64,6,14,30,60,8,0,140,153, +166,105,76,201,186,5,64,233,146,177,155,223,225,172,173,235,186,174,183, +62,191,36,185,232,32,151,47,167,121,151,3,71,118,237,42,193,178,172,201, +156,41,190,145,189,28,117,175,237,124,173,14,153,243,166,94,22,32,122,10, +230,98,140,49,150,189,96,45,112,184,248,145,159,99,213,220,153,156,182, +38,103,231,135,230,165,244,173,7,23,237,65,246,230,162,141,27,139,182,100, +163,110,195,198,231,78,8,110,50,226,102,206,207,6,74,54,110,58,128,203, +71,199,195,102,147,201,153,183,0,13,111,190,121,16,25,87,206,24,5,177,255, +154,71,171,96,12,211,114,150,2,40,93,178,229,160,45,4,183,62,191,36,115, +67,157,221,38,234,172,185,249,0,74,111,218,242,142,41,228,139,227,117,175, +215,217,237,198,102,77,106,36,126,0,0,1,0,73,68,65,84,204,41,0,176,103, +81,210,3,22,87,82,74,165,246,137,75,28,7,160,225,248,71,246,246,240,247, +182,93,177,237,15,156,114,21,69,65,66,106,54,16,200,126,103,56,244,40,238, +43,0,160,168,46,151,216,34,205,166,123,243,1,236,185,190,232,29,174,122, +153,230,219,69,153,27,234,128,130,57,51,248,29,131,15,72,58,165,116,114, +214,82,0,165,55,165,111,57,40,89,126,252,249,37,169,69,7,13,115,90,14,47, +234,166,103,91,187,59,238,224,3,9,15,28,84,148,164,148,241,0,26,78,252, +213,218,39,46,79,164,92,46,151,216,63,126,126,255,139,58,184,56,24,112, +220,116,113,96,2,102,160,138,98,154,134,162,0,208,129,147,64,251,192,148, +185,21,69,81,213,132,239,175,88,38,126,103,140,153,230,148,181,165,55,3, +192,99,75,198,142,29,59,118,236,216,180,180,180,180,180,156,141,7,192,96, +81,76,66,74,38,234,235,235,177,204,59,205,222,237,48,57,107,41,234,235, +235,145,49,111,218,72,190,209,216,142,34,133,232,201,107,76,73,207,67,101, +101,21,86,231,206,100,42,95,136,4,0,0,1,0,73,68,65,84,166,105,82,139,77, +130,242,30,127,254,135,55,150,32,179,232,254,235,70,49,22,191,232,167,155, +179,113,96,99,214,230,183,13,91,72,141,29,157,206,139,244,142,73,178,100, +10,195,48,204,81,201,214,24,148,158,20,111,199,164,134,33,199,176,211,110, +184,63,3,192,227,75,39,77,154,52,105,194,132,9,233,115,238,57,96,27,167, +170,170,170,206,90,178,57,27,64,233,146,116,238,123,106,106,170,205,234, +124,168,155,181,233,133,2,0,40,185,49,53,53,117,204,152,49,99,198,140,17, +237,99,53,14,234,239,203,157,112,197,21,87,124,253,235,143,188,7,224,137, +101,19,39,78,76,79,79,79,75,75,75,203,217,116,0,217,155,151,204,228,5,10, +178,238,145,178,229,173,147,246,89,72,197,229,114,113,93,69,81,20,96,198, +221,207,230,3,40,185,33,37,37,37,37,53,53,53,245,7,37,0,188,15,253,112, +166,189,229,218,100,214,22,65,195,152,178,246,177,155,97,59,63,113,226, +196,241,227,199,167,167,207,185,167,158,247,236,180,13,207,44,7,80,127, +79,206,184,113,227,184,239,41,214,7,214,46,0,0,1,0,73,68,65,84,55,148,0, +138,170,170,201,227,102,3,181,119,205,74,74,75,75,155,48,97,235,123,106, +55,184,66,210,61,44,57,24,108,24,90,172,173,40,8,11,3,0,215,89,159,127, +97,12,170,10,224,16,48,30,72,3,246,247,145,216,227,129,170,226,226,79,52, +45,113,115,230,226,159,102,91,191,114,213,24,83,215,29,58,84,246,147,140, +128,196,203,158,106,216,48,205,58,82,152,148,125,117,54,128,101,179,167, +119,51,227,228,204,155,1,96,108,252,72,75,19,176,183,181,49,251,48,30,199, +232,220,235,114,1,220,54,127,22,0,139,109,131,242,126,244,114,126,222,189, +245,88,250,100,201,247,70,113,182,74,184,254,167,91,178,129,210,37,203, +94,254,200,228,199,210,103,204,206,7,0,239,55,179,146,44,202,96,140,177, +184,233,243,50,0,32,51,53,81,220,12,112,88,81,70,125,119,207,33,62,44,113, +220,252,216,177,218,34,175,253,28,64,252,162,39,142,61,179,172,59,65,102, +81,125,253,22,47,160,40,176,35,220,141,199,142,213,62,152,217,67,251,40, +138,146,120,253,147,82,110,5,83,192,129,223,15,0,0,1,0,73,68,65,84,239, +44,191,95,110,202,236,45,245,79,46,138,135,221,110,86,91,245,17,107,11, +13,218,165,2,112,185,195,194,60,30,15,231,74,85,85,213,89,155,90,235,31, +242,6,148,223,242,212,245,9,65,4,106,113,255,148,117,127,250,211,190,251, +102,6,148,191,244,169,163,188,103,149,153,27,27,27,101,207,129,229,207, +124,120,239,76,69,81,70,47,126,249,183,63,234,190,45,31,154,149,209,163, +253,14,6,56,134,200,223,178,89,255,208,67,255,125,247,221,213,201,201,158, +178,50,140,24,129,187,239,198,158,61,125,164,95,8,124,105,237,218,167,183, +109,19,119,110,188,241,246,143,63,222,241,220,115,253,170,142,82,44,92, +8,175,183,104,219,182,77,255,162,229,103,4,15,141,133,26,203,137,149,147, +181,224,89,241,53,18,254,169,194,160,137,48,95,194,226,116,44,54,90,200, +33,33,108,174,228,81,97,120,120,120,100,100,100,68,68,68,120,120,56,47, +144,107,202,126,191,191,179,179,83,216,16,148,151,215,232,118,187,249,50, +38,99,76,68,238,138,162,184,92,46,126,106,81,85,85,251,52,86,69,246,159, +0,0,1,0,73,68,65,84,35,225,133,240,37,62,145,133,123,199,179,240,117,63, +121,219,6,79,28,30,30,206,75,227,46,232,246,130,155,98,127,168,196,243, +199,135,83,110,40,201,41,126,247,217,27,18,77,251,212,34,159,64,240,100, +114,251,192,14,252,133,95,98,61,150,211,28,119,208,94,41,85,221,110,119, +88,88,24,183,129,59,107,24,134,16,151,121,219,186,92,46,143,199,195,201, +90,184,64,41,101,246,201,123,110,42,103,127,72,167,204,25,251,240,217,155, +102,109,52,139,42,75,174,29,101,55,8,135,162,40,98,231,34,183,141,91,46, +119,7,183,141,55,142,232,56,46,118,3,240,120,60,17,17,17,17,246,73,75,30, +113,59,220,61,232,48,68,246,144,240,191,79,227,57,113,2,51,102,64,85,209, +217,217,119,250,208,175,73,141,30,61,188,178,50,58,35,163,231,244,193,213, +49,156,58,133,196,196,168,51,39,61,79,16,210,164,8,154,56,185,192,102,147, +32,58,80,3,161,216,95,177,16,175,168,136,169,101,78,15,205,37,151,230,178, +1,137,194,130,242,202,243,110,85,250,242,134,28,223,137,210,221,201,228, +78,0,0,1,0,73,68,65,84,96,15,48,156,205,5,171,138,210,120,26,211,52,93, +46,23,147,190,52,210,29,170,219,1,175,34,125,226,67,85,127,191,249,134, +18,192,123,117,102,130,208,160,67,173,146,221,20,35,144,24,255,130,158, +138,214,14,173,58,180,131,0,240,189,225,156,25,133,162,34,184,213,37,205, +5,131,119,16,190,243,228,198,3,64,182,162,170,170,106,187,204,107,23,85, +200,194,180,105,154,110,183,155,207,0,68,127,201,182,137,44,242,40,43,76, +114,40,123,48,98,168,176,182,97,156,6,62,50,77,207,63,254,209,159,244,159, +1,195,164,141,10,0,238,187,239,158,117,235,238,164,189,125,128,42,4,97, +97,136,138,26,118,182,118,158,27,100,70,16,209,52,236,183,78,215,117,241, +238,9,70,147,57,87,166,75,206,140,130,137,4,217,241,160,79,68,115,65,11, +86,130,67,57,65,40,210,210,22,2,3,70,145,145,199,197,194,30,177,37,49,136, +68,56,133,9,214,230,113,43,183,144,143,16,178,92,195,19,240,42,32,81,231, +255,190,120,115,214,198,3,193,173,182,226,214,69,163,44,210,54,165,92,33, +6,187,0,0,1,0,73,68,65,84,143,2,2,193,223,216,18,62,114,51,100,138,15,226, +101,153,10,229,40,53,168,131,120,51,242,88,91,20,40,179,182,42,173,4,218, +46,191,243,96,226,162,71,237,186,178,23,100,37,185,92,134,97,184,236,159, +162,119,228,126,17,85,139,54,81,165,169,131,24,141,196,77,225,20,15,222, +185,109,14,113,15,58,12,17,214,78,140,138,250,48,58,218,219,239,237,214, +167,128,233,195,135,203,119,34,35,135,69,70,94,36,22,62,43,200,156,43,166, +180,114,132,40,98,82,244,244,57,183,160,104,151,191,243,130,103,67,89,155, +79,237,165,213,51,139,191,56,183,134,133,133,1,224,34,64,80,94,161,177, +168,129,226,169,32,116,193,56,162,106,62,2,9,193,151,243,136,204,218,188, +124,93,215,249,83,33,110,40,82,100,13,64,81,131,187,221,251,179,183,159, +90,20,47,4,104,206,218,130,82,101,206,149,139,226,94,200,202,190,248,41, +32,70,166,160,66,20,123,210,192,141,228,148,45,134,1,94,172,120,42,254, +230,134,170,170,124,208,53,205,238,90,86,188,120,98,211,140,238,175,57, +138,75,16,197,107,0,0,1,0,73,68,65,84,182,229,157,34,154,75,9,156,114,201, +83,10,94,157,60,26,137,1,67,12,216,206,126,237,193,139,33,162,107,251,253, +254,142,206,78,210,239,244,30,32,42,34,34,114,216,64,164,233,32,240,23, +140,159,66,230,194,40,236,152,90,168,177,98,94,47,232,91,196,119,176,35, +101,65,49,156,254,120,50,193,89,226,166,208,166,249,236,94,126,42,159,119, +15,205,43,130,119,81,81,168,130,33,4,4,249,243,170,50,139,9,193,93,176, +54,179,181,120,193,68,114,144,43,166,14,130,61,5,37,241,42,184,230,11,155, +109,101,167,196,136,18,90,166,25,242,117,83,25,124,58,194,181,99,209,17, +114,7,113,214,230,213,241,44,65,79,197,136,24,186,8,44,122,92,108,63,23, +70,242,50,197,151,8,101,199,69,70,81,136,220,227,242,80,196,73,159,119, +177,124,38,203,193,32,194,16,137,181,249,26,203,231,109,197,5,132,80,129, +5,211,241,251,156,65,100,6,20,204,37,51,166,8,81,197,83,158,61,136,97,17, +40,52,43,129,211,112,17,26,7,113,37,147,142,26,246,17,187,201,228,40,170, +68,221,39,0,0,1,0,73,68,65,84,22,18,101,219,24,99,242,125,113,211,12,252, +211,7,50,228,160,88,64,156,211,17,113,40,164,209,72,118,77,110,31,185,156, +96,173,57,208,11,151,4,209,164,65,29,164,74,194,125,232,83,185,233,228, +147,138,188,82,78,217,34,163,8,207,131,134,210,160,30,148,123,86,174,69, +238,35,4,46,120,244,209,89,14,6,50,134,8,107,15,97,40,146,196,33,199,200, +34,88,19,52,42,238,203,148,45,152,52,232,29,70,160,2,16,26,20,203,99,131, +176,193,227,241,200,140,166,132,196,212,125,59,34,254,33,87,7,91,141,133, +29,59,247,49,2,201,144,199,9,97,137,88,155,229,148,45,15,12,30,27,242,98, +96,80,9,65,220,215,163,11,66,229,23,70,134,118,144,26,184,18,27,250,84, +212,37,244,101,121,124,18,148,205,127,42,138,226,241,120,68,116,175,6,174, +160,202,109,27,100,179,220,137,65,195,164,108,155,131,193,5,135,181,7,1, +20,91,193,148,223,177,160,240,48,8,189,177,118,63,171,11,77,220,163,13, +161,149,6,101,233,187,162,208,210,92,189,111,180,15,42,92,28,31,178,179, +0,0,0,195,73,68,65,84,38,214,160,112,82,8,41,66,67,87,237,237,122,66,178, +151,23,9,67,219,167,55,226,150,199,24,185,149,66,27,39,168,13,67,159,202, +201,68,172,205,197,25,46,7,201,203,21,34,208,22,154,140,204,218,61,90,46, +151,31,218,128,194,17,135,181,7,35,28,214,30,28,16,47,170,124,7,103,250, +166,68,80,80,220,91,201,232,233,149,62,103,27,250,102,246,243,133,30,67, +111,69,146,89,96,171,25,176,229,17,177,211,89,14,228,101,71,206,88,5,2, +9,55,232,126,31,5,246,241,84,140,43,124,218,36,207,21,20,91,38,18,218,78, +144,114,213,183,229,103,236,5,135,178,7,41,134,200,106,164,3,7,242,49,34, +177,26,201,31,169,246,102,115,190,135,100,192,198,152,194,5,249,240,148, +34,41,233,142,30,237,0,192,255,3,111,169,68,2,248,173,80,128,0,0,0,0,73, +69,78,68,174,66,96,130}; + +static size_t xml_res_size_94 = 9535; +static unsigned char xml_res_file_94[] = { +60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101, +110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101, +115,111,117,114,99,101,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +109,101,109,98,101,114,95,112,117,98,108,105,99,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,109,101,109,98,101,114,95, +112,117,98,108,105,99,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,102,105,108,101,95,101,120,112, +108,111,114,101,114,34,62,114,101,115,111,117,114,99,101,115,46,99,112, +112,36,114,101,115,95,102,105,108,101,95,101,120,112,108,111,114,101,114, +46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,109,101,109,98,101,114,95,112,114,111,116,101,99,116,101, +100,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,109,101,109,98,101,114,95,112,114,111,116,101,99,116,101,100,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,109,101,109,98,101,114,95,112,114,105,118,97,116,101,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,109,101, +109,98,101,114,95,112,114,105,118,97,116,101,46,112,110,103,60,47,111,98, +106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115, +61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,102,117, +110,99,95,112,117,98,108,105,99,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,114,101,115,95,102,117,110,99,95,112,117,98,108,105,99, +46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,102,117,110,99,95,112,114,111,116,101,99,116,101,100,34, +62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,102, +117,110,99,95,112,114,111,116,101,99,116,101,100,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,102, +117,110,99,95,112,114,105,118,97,116,101,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,102,117,110,99,95,112,114,105, +118,97,116,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60, +111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109, +97,112,34,32,110,97,109,101,61,34,101,110,117,109,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,101,110,117,109,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,101,110,117,109,101,114,97,116,111,114,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,101,110,117,109,101, +101,46,120,112,109,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,99,108,97,115,115,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,99,108,97,115,115,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,99,108,97,115,115,50,52,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,114,101,115,95,99,108,97,115,115,50,52,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,116,121,112,101,100,101,102,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,114,101,115,95,116,121,112,101,100,101,102,46, +120,112,109,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99, +116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,112,114,111,106,101,99,116,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,99,117,98,101,115,95,98,108, +117,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98, +106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112, +34,32,110,97,109,101,61,34,103,108,111,98,97,108,115,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,99,117,98,101,95, +103,114,101,101,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,110,97,109,101,115,112,97,99,101, +34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95, +110,97,109,101,115,112,97,99,101,46,112,110,103,60,47,111,98,106,101,99, +116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119, +120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,115,116,114,117,99, +116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,98,117,116,95,103,114,101,101,110,95,115,46,112,110,103,60,47,111,98, +106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115, +61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,98,111,111, +107,109,97,114,107,95,98,108,117,101,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,114,101,115,95,109,101,100,105,97,95,115,116,111,112, +46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,119,111,114,107,115,112,97,99,101,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,99,117,98,101,115,46, +112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99, +116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,102,111,108,100,101,114,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,102,111,108,100,101,114,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,112,97,103,101,95,119,104,105,116,101,95,99,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95, +119,104,105,116,101,95,99,46,112,110,103,60,47,111,98,106,101,99,116,62, +10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,112,97,103,101,95,119,104, +105,116,101,95,99,112,108,117,115,112,108,117,115,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95,119, +104,105,116,101,95,99,112,108,117,115,112,108,117,115,46,112,110,103,60, +47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108, +97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61, +34,112,97,103,101,95,119,104,105,116,101,95,104,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95,119,104, +105,116,101,95,104,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,112,97,103,101,95,119,104,105,116, +101,95,116,101,120,116,34,62,114,101,115,111,117,114,99,101,115,46,99,112, +112,36,114,101,115,95,112,97,103,101,95,119,104,105,116,101,95,116,101, +120,116,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98, +106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112, +34,32,110,97,109,101,61,34,99,114,111,115,115,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,99,114,111,115,115,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,100,111,99,117,109,101,110,116,95,100,101,108,101,116,101,34, +62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,99, +108,101,97,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60, +111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109, +97,112,34,32,110,97,109,101,61,34,98,117,105,108,100,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,99,111,103,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,102,105,110,100,95,114,101,115,117,108,116,115,34,62,114,101, +115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101, +95,102,105,110,100,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,102,105,108,101,95,118,105,101,119, +34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95, +102,111,108,100,101,114,95,116,97,98,108,101,46,112,110,103,60,47,111,98, +106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115, +61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,108,97, +115,115,95,118,105,101,119,34,62,114,101,115,111,117,114,99,101,115,46, +99,112,112,36,114,101,115,95,99,104,97,114,116,95,111,114,103,97,110,105, +115,97,116,105,111,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,111,117,116,108,105,110,101,34, +62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,116, +101,120,116,95,116,114,101,101,46,112,110,103,60,47,111,98,106,101,99,116, +62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120, +66,105,116,109,97,112,34,32,110,97,109,101,61,34,112,97,103,101,95,99,108, +111,115,101,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114, +101,115,95,102,105,108,101,99,108,111,115,101,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,112, +97,103,101,95,110,101,119,34,62,114,101,115,111,117,114,99,101,115,46,99, +112,112,36,114,101,115,95,102,105,108,101,110,101,119,46,112,110,103,60, +47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108, +97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61, +34,115,97,118,101,95,97,108,108,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,114,101,115,95,115,97,118,101,95,97,108,108,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,112,97,103,101,95,115,97,118,101,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95,115,97,118, +101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,112,97,103,101,95,111,112,101,110,34,62,114,101, +115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,102,111,108, +100,101,114,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111, +98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97, +112,34,32,110,97,109,101,61,34,102,111,108,100,101,114,50,52,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,102,111, +108,100,101,114,50,52,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,114,101,102,114,101,115,104,34, +62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,114, +101,102,114,101,115,104,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,114,101,108,111,97,100,34,62, +114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,114, +101,118,101,114,116,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,115,97,118,101,95,97,115,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,115,97,118, +101,95,97,115,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60, +111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109, +97,112,34,32,110,97,109,101,61,34,99,117,116,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,99,117,116,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,99,111,112,121,34,62,114,101,115,111,117,114,99,101,115,46,99,112, +112,36,114,101,115,95,99,111,112,121,46,112,110,103,60,47,111,98,106,101, +99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34, +119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,112,97,115,116, +101,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,112,97,115,116,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,117,110,100,111,34,62,114,101, +115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,117,110,100, +111,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,114,101,100,111,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,114,101,115,95,114,101,100,111,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,98,111,111,107,109,97,114,107,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,114,101,115,95,98,111,111,107,109,97,114,107,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,98,111,111,107,109,97,114,107,95,110,101,120,116,34,62,114,101, +115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,98,111,111,107, +109,97,114,107,95,117,112,46,112,110,103,60,47,111,98,106,101,99,116,62, +10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,98,111,111,107,109,97,114, +107,95,112,114,101,118,105,111,117,115,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,114,101,115,95,98,111,111,107,109,97,114,107,95, +100,111,119,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32, +60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,98,111,111,107,109,97,114,107,95, +114,101,109,111,118,101,95,97,108,108,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,114,101,115,95,98,111,111,107,109,97,114,107,95, +100,101,108,101,116,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,98,117,105,108,100,95,97,99,116, +105,118,101,95,112,114,111,106,101,99,116,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,104,97,109,109,101,114,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,115,116,111,112,95,98,117,105,108,100,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,115,116,111,112,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,101,120,101,99,117,116,101,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,114,101,115,95,103,101,97,114,95,114,117,110,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,115,116,111,112,95,101,120,101,99,117,116,101,100,95,112,114, +111,103,114,97,109,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,103,101,97,114,95,115,116,111,112,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +99,108,101,97,110,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,103,97,114,98,97,103,101,46,112,110,103,60,47,111,98, +106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115, +61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,102,105, +110,100,95,105,110,95,102,105,108,101,115,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,102,105,110,100,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,102,105,110,100,95,97,110,100,95,114,101,112,108,97,99,101,34,62, +114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,115, +101,97,114,99,104,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32, +60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,114,101,112,108,97,99,101,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,114,101, +112,108,97,99,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32, +60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,119,111,114,100,95,119,114,97,112, +34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95, +119,114,97,112,95,97,114,114,111,119,46,112,110,103,60,47,111,98,106,101, +99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34, +119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,111,117,116,112, +117,116,95,119,105,110,34,62,114,101,115,111,117,114,99,101,115,46,99,112, +112,36,114,101,115,95,111,117,116,112,117,116,95,119,105,110,46,112,110, +103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32, +99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,100,101,98,117,103,95,119,105,110,100,111,119,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,100,101,98,117,103, +95,119,105,110,100,111,119,115,46,112,110,103,60,47,111,98,106,101,99,116, +62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120, +66,105,116,109,97,112,34,32,110,97,109,101,61,34,111,112,101,110,95,114, +101,115,111,117,114,99,101,34,62,114,101,115,111,117,114,99,101,115,46, +99,112,112,36,114,101,115,95,111,112,101,110,95,114,101,115,111,117,114, +99,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98, +106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112, +34,32,110,97,109,101,61,34,111,112,101,110,95,116,121,112,101,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,111,112, +101,110,95,116,121,112,101,46,112,110,103,60,47,111,98,106,101,99,116,62, +10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,115,121,109,95,119,105,122, +95,98,109,112,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36, +114,101,115,95,115,121,109,95,119,105,122,95,98,109,112,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,97,114,114,111,119,95,110,101,120,116,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,110,101,120,116,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,97,114,114,111,119,95,98,97,99,107,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,112,114,101,118,105,111,117, +115,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,100,101,98,117,103,103,101,114,95,115,116,97,114, +116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,100,101,98,117,103,103,101,114,95,115,116,97,114,116,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,100,101,98,117,103,103,101,114,95,115,116,111,112,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,100,101,98,117,103, +103,101,114,95,115,116,111,112,46,112,110,103,60,47,111,98,106,101,99,116, +62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120, +66,105,116,109,97,112,34,32,110,97,109,101,61,34,100,101,98,117,103,103, +101,114,95,112,97,117,115,101,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,114,101,115,95,100,101,98,117,103,103,101,114,95,112,97, +117,115,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111, +98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97, +112,34,32,110,97,109,101,61,34,100,101,98,117,103,103,101,114,95,115,116, +101,112,105,110,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,100,101,98,117,103,103,101,114,95,115,116,101,112,105, +110,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,100,101,98,117,103,103,101,114,95,115,116,101,112, +111,117,116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114, +101,115,95,100,101,98,117,103,103,101,114,95,115,116,101,112,111,117,116, +46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,100,101,98,117,103,103,101,114,95,110,101,120,116,34,62, +114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,100, +101,98,117,103,103,101,114,95,110,101,120,116,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,100, +101,98,117,103,103,101,114,95,116,97,98,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,114,101,115,95,98,117,103,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +104,101,108,112,95,105,99,111,110,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,114,101,115,95,104,101,108,112,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +99,111,100,101,95,102,111,114,109,97,116,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,109,97,103,105,99,45,119,97, +110,100,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,33, +45,45,9,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,99,111,100,101,95,102,111, +114,109,97,116,34,62,114,101,115,47,109,97,103,105,99,45,119,97,110,100, +46,112,110,103,60,47,111,98,106,101,99,116,62,32,10,9,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,99,111,100,101,95,102,111,114,109,97,116,95,111,112,116, +105,111,110,115,34,62,114,101,115,47,102,111,114,109,95,98,108,117,101, +46,112,110,103,60,47,111,98,106,101,99,116,62,32,45,45,62,10,32,32,60,111, +98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97, +112,34,32,110,97,109,101,61,34,99,111,100,101,95,102,111,114,109,97,116, +95,111,112,116,105,111,110,115,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,114,101,115,95,115,105,103,110,97,116,117,114,101,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,115,118,110,95,114,101,112,111,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,115,118,110,95,114,101,112,111, +46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101, +99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,100,111,99,117,109,101,110,116,95,114,111,111,116,34,62, +114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,100, +114,105,118,101,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32, +60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,108,111,99,97,108,115,95,118,105, +101,119,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101, +115,95,108,111,99,97,108,115,95,118,105,101,119,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,119, +97,116,99,104,101,115,34,62,114,101,115,111,117,114,99,101,115,46,99,112, +112,36,114,101,115,95,119,97,116,99,104,101,115,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,102, +114,97,109,101,115,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,102,114,97,109,101,115,46,112,110,103,60,47,111,98,106, +101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61, +34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,98,114,101, +97,107,112,111,105,110,116,34,62,114,101,115,111,117,114,99,101,115,46, +99,112,112,36,114,101,115,95,98,114,101,97,107,112,111,105,110,116,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,110,101,119,95,112,108,117,103,105,110,95,119,105,122,95,98,109, +112,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,112,117,122,122,108,101,46,112,110,103,60,47,111,98,106,101,99,116,62, +10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,112,108,117,103,105,110,95, +97,100,100,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114, +101,115,95,112,108,117,103,105,110,95,97,100,100,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,112, +108,117,103,105,110,50,52,34,62,114,101,115,111,117,114,99,101,115,46,99, +112,112,36,114,101,115,95,112,108,117,103,105,110,50,52,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,113,117,101,115,116,105,111,110,95,97,110,100,95,97,110,115,119,101, +114,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,113,117,101,115,116,105,111,110,95,97,110,100,95,97,110,115,119,101, +114,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,116,104,114,101,97,100,115,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,116,104,114,101,97,100, +115,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106, +101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34, +32,110,97,109,101,61,34,111,112,101,110,101,100,95,119,105,110,100,111, +119,115,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101, +115,95,112,105,99,116,117,114,101,115,46,112,110,103,60,47,111,98,106,101, +99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34, +119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,115,118,110,95, +111,107,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101, +115,95,102,111,108,100,101,114,95,103,114,101,101,110,46,112,110,103,60, +47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108, +97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61, +34,115,118,110,95,109,111,100,105,102,105,101,100,34,62,114,101,115,111, +117,114,99,101,115,46,99,112,112,36,114,101,115,95,102,111,108,100,101, +114,95,114,101,100,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,115,118,110,95,99,111,110,102,108, +105,99,116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114, +101,115,95,101,114,114,111,114,46,112,110,103,60,47,111,98,106,101,99,116, +62,10,32,32,60,33,45,45,32,9,10,9,32,60,111,98,106,101,99,116,32,99,108, +97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61, +34,115,118,110,95,111,107,34,62,114,101,115,47,97,99,99,101,112,116,46, +112,110,103,60,47,111,98,106,101,99,116,62,10,9,32,60,111,98,106,101,99, +116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,115,118,110,95,99,111,110,102,108,105,99,116,34,62,114, +101,115,47,101,114,114,111,114,46,112,110,103,60,47,111,98,106,101,99,116, +62,10,9,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120, +66,105,116,109,97,112,34,32,110,97,109,101,61,34,115,118,110,95,109,111, +100,105,102,105,101,100,34,62,114,101,115,47,101,120,99,108,97,109,97,116, +105,111,110,46,112,110,103,60,47,111,98,106,101,99,116,62,32,32,45,45,62, +10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66, +105,116,109,97,112,34,32,110,97,109,101,61,34,99,95,111,107,34,62,114,101, +115,111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101, +95,103,114,101,101,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10, +32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105, +116,109,97,112,34,32,110,97,109,101,61,34,99,95,109,111,100,105,102,105, +101,100,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101, +115,95,112,97,103,101,95,114,101,100,46,112,110,103,60,47,111,98,106,101, +99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34, +119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,95,99,111,110, +102,108,105,99,116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,112,97,103,101,95,101,114,114,111,114,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,99,112,112,95,111,107,34,62,114,101,115,111,117,114,99,101,115,46, +99,112,112,36,114,101,115,95,112,97,103,101,95,103,114,101,101,110,46,112, +110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116, +32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109, +101,61,34,99,112,112,95,109,111,100,105,102,105,101,100,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95, +114,101,100,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111, +98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97, +112,34,32,110,97,109,101,61,34,99,112,112,95,99,111,110,102,108,105,99, +116,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,112,97,103,101,95,101,114,114,111,114,46,112,110,103,60,47,111,98,106, +101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61, +34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,104,95,111, +107,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101,115, +95,112,97,103,101,95,103,114,101,101,110,46,112,110,103,60,47,111,98,106, +101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61, +34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,104,95,109, +111,100,105,102,105,101,100,34,62,114,101,115,111,117,114,99,101,115,46, +99,112,112,36,114,101,115,95,112,97,103,101,95,114,101,100,46,112,110,103, +60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99, +108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101, +61,34,104,95,99,111,110,102,108,105,99,116,34,62,114,101,115,111,117,114, +99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95,101,114,114, +111,114,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98, +106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112, +34,32,110,97,109,101,61,34,116,101,120,116,95,111,107,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95, +103,114,101,101,110,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32, +32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116, +109,97,112,34,32,110,97,109,101,61,34,116,101,120,116,95,109,111,100,105, +102,105,101,100,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,112,97,103,101,95,114,101,100,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,116, +101,120,116,95,99,111,110,102,108,105,99,116,34,62,114,101,115,111,117, +114,99,101,115,46,99,112,112,36,114,101,115,95,112,97,103,101,95,101,114, +114,111,114,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111, +98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97, +112,34,32,110,97,109,101,61,34,110,101,119,95,99,108,97,115,115,95,116, +105,116,108,101,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112, +36,114,101,115,95,110,101,119,95,99,108,97,115,115,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +99,108,97,115,115,50,52,34,62,114,101,115,111,117,114,99,101,115,46,99, +112,112,36,114,101,115,95,99,108,97,115,115,50,52,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +110,101,119,95,119,120,95,112,114,111,106,101,99,116,34,62,114,101,115, +111,117,114,99,101,115,46,99,112,112,36,114,101,115,95,119,120,50,52,46, +112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99, +116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110, +97,109,101,61,34,119,120,95,112,114,111,106,101,99,116,95,104,101,97,100, +101,114,34,62,114,101,115,111,117,114,99,101,115,46,99,112,112,36,114,101, +115,95,119,120,112,114,111,106,101,99,116,46,112,110,103,60,47,111,98,106, +101,99,116,62,10,60,47,114,101,115,111,117,114,99,101,62,10}; + +void InitXmlResource() +{ + + // Check for memory FS. If not present, load the handler: + { + wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one")); + wxFileSystem fsys; + wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file")); + wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file")); + if (f) delete f; + else wxFileSystem::AddHandler(new wxMemoryFSHandler); + } + + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_member_public.png"), xml_res_file_0, xml_res_size_0); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_file_explorer.png"), xml_res_file_1, xml_res_size_1); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_member_protected.png"), xml_res_file_2, xml_res_size_2); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_member_private.png"), xml_res_file_3, xml_res_size_3); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_func_public.png"), xml_res_file_4, xml_res_size_4); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_func_protected.png"), xml_res_file_5, xml_res_size_5); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_func_private.png"), xml_res_file_6, xml_res_size_6); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_enum.png"), xml_res_file_7, xml_res_size_7); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_enumee.xpm"), xml_res_file_8, xml_res_size_8); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_class.png"), xml_res_file_9, xml_res_size_9); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_class24.png"), xml_res_file_10, xml_res_size_10); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_typedef.xpm"), xml_res_file_11, xml_res_size_11); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cubes_blue.png"), xml_res_file_12, xml_res_size_12); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cube_green.png"), xml_res_file_13, xml_res_size_13); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_namespace.png"), xml_res_file_14, xml_res_size_14); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_but_green_s.png"), xml_res_file_15, xml_res_size_15); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_media_stop.png"), xml_res_file_16, xml_res_size_16); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cubes.png"), xml_res_file_17, xml_res_size_17); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_folder.png"), xml_res_file_18, xml_res_size_18); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_white_c.png"), xml_res_file_19, xml_res_size_19); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_white_cplusplus.png"), xml_res_file_20, xml_res_size_20); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_white_h.png"), xml_res_file_21, xml_res_size_21); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_white_text.png"), xml_res_file_22, xml_res_size_22); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cross.png"), xml_res_file_23, xml_res_size_23); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_clean.png"), xml_res_file_24, xml_res_size_24); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cog.png"), xml_res_file_25, xml_res_size_25); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_find.png"), xml_res_file_26, xml_res_size_26); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_folder_table.png"), xml_res_file_27, xml_res_size_27); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_chart_organisation.png"), xml_res_file_28, xml_res_size_28); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_text_tree.png"), xml_res_file_29, xml_res_size_29); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_fileclose.png"), xml_res_file_30, xml_res_size_30); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_filenew.png"), xml_res_file_31, xml_res_size_31); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_save_all.png"), xml_res_file_32, xml_res_size_32); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_save.png"), xml_res_file_33, xml_res_size_33); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_folder24.png"), xml_res_file_34, xml_res_size_34); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_refresh.png"), xml_res_file_35, xml_res_size_35); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_revert.png"), xml_res_file_36, xml_res_size_36); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_save_as.png"), xml_res_file_37, xml_res_size_37); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_cut.png"), xml_res_file_38, xml_res_size_38); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_copy.png"), xml_res_file_39, xml_res_size_39); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_paste.png"), xml_res_file_40, xml_res_size_40); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_undo.png"), xml_res_file_41, xml_res_size_41); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_redo.png"), xml_res_file_42, xml_res_size_42); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_bookmark.png"), xml_res_file_43, xml_res_size_43); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_bookmark_up.png"), xml_res_file_44, xml_res_size_44); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_bookmark_down.png"), xml_res_file_45, xml_res_size_45); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_bookmark_delete.png"), xml_res_file_46, xml_res_size_46); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_hammer.png"), xml_res_file_47, xml_res_size_47); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_stop.png"), xml_res_file_48, xml_res_size_48); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_gear_run.png"), xml_res_file_49, xml_res_size_49); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_gear_stop.png"), xml_res_file_50, xml_res_size_50); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_garbage.png"), xml_res_file_51, xml_res_size_51); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_find.png"), xml_res_file_52, xml_res_size_52); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_search.png"), xml_res_file_53, xml_res_size_53); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_replace.png"), xml_res_file_54, xml_res_size_54); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_wrap_arrow.png"), xml_res_file_55, xml_res_size_55); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_output_win.png"), xml_res_file_56, xml_res_size_56); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debug_windows.png"), xml_res_file_57, xml_res_size_57); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_open_resource.png"), xml_res_file_58, xml_res_size_58); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_open_type.png"), xml_res_file_59, xml_res_size_59); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_sym_wiz_bmp.png"), xml_res_file_60, xml_res_size_60); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_next.png"), xml_res_file_61, xml_res_size_61); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_previous.png"), xml_res_file_62, xml_res_size_62); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_start.png"), xml_res_file_63, xml_res_size_63); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_stop.png"), xml_res_file_64, xml_res_size_64); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_pause.png"), xml_res_file_65, xml_res_size_65); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_stepin.png"), xml_res_file_66, xml_res_size_66); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_stepout.png"), xml_res_file_67, xml_res_size_67); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_debugger_next.png"), xml_res_file_68, xml_res_size_68); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_bug.png"), xml_res_file_69, xml_res_size_69); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_help.png"), xml_res_file_70, xml_res_size_70); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_magic-wand2.png"), xml_res_file_71, xml_res_size_71); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_signature.png"), xml_res_file_72, xml_res_size_72); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_svn_repo.png"), xml_res_file_73, xml_res_size_73); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_drive.png"), xml_res_file_74, xml_res_size_74); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_locals_view.png"), xml_res_file_75, xml_res_size_75); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_watches.png"), xml_res_file_76, xml_res_size_76); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_frames.png"), xml_res_file_77, xml_res_size_77); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_breakpoint.png"), xml_res_file_78, xml_res_size_78); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_puzzle.png"), xml_res_file_79, xml_res_size_79); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_plugin_add.png"), xml_res_file_80, xml_res_size_80); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_plugin24.png"), xml_res_file_81, xml_res_size_81); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_question_and_answer.png"), xml_res_file_82, xml_res_size_82); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_threads.png"), xml_res_file_83, xml_res_size_83); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_pictures.png"), xml_res_file_84, xml_res_size_84); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_folder_green.png"), xml_res_file_85, xml_res_size_85); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_folder_red.png"), xml_res_file_86, xml_res_size_86); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_error.png"), xml_res_file_87, xml_res_size_87); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_green.png"), xml_res_file_88, xml_res_size_88); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_red.png"), xml_res_file_89, xml_res_size_89); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_page_error.png"), xml_res_file_90, xml_res_size_90); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_new_class.png"), xml_res_file_91, xml_res_size_91); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_wx24.png"), xml_res_file_92, xml_res_size_92); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$res_wxproject.png"), xml_res_file_93, xml_res_size_93); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$._resources.xrc"), xml_res_file_94, xml_res_size_94); + wxXmlResource::Get()->Load(wxT("memory:XRC_resource/resources.cpp$._resources.xrc")); +} diff --git a/LiteEditor/resources.xrc b/LiteEditor/resources.xrc new file mode 100644 index 0000000000..7939d457ab --- /dev/null +++ b/LiteEditor/resources.xrc @@ -0,0 +1,116 @@ + + res/member_public.png + res/file_explorer.png + res/member_protected.png + res/member_private.png + res/func_public.png + res/func_protected.png + res/func_private.png + res/enum.png + res/enumee.xpm + res/class.png + res/class24.png + res/typedef.xpm + res/cubes_blue.png + res/cube_green.png + res/namespace.png + res/but_green_s.png + res/media_stop.png + res/cubes.png + res/folder.png + res/page_white_c.png + res/page_white_cplusplus.png + res/page_white_h.png + res/page_white_text.png + res/cross.png + res/clean.png + res/cog.png + res/page_find.png + res/folder_table.png + res/chart_organisation.png + res/text_tree.png + res/fileclose.png + res/filenew.png + res/save_all.png + res/page_save.png + res/folder.png + res/folder24.png + res/refresh.png + res/revert.png + res/save_as.png + res/cut.png + res/copy.png + res/paste.png + res/undo.png + res/redo.png + res/bookmark.png + res/bookmark_up.png + res/bookmark_down.png + res/bookmark_delete.png + res/hammer.png + res/stop.png + res/gear_run.png + res/gear_stop.png + res/garbage.png + res/find.png + res/search.png + res/replace.png + res/wrap_arrow.png + res/output_win.png + res/debug_windows.png + res/open_resource.png + res/open_type.png + res/sym_wiz_bmp.png + res/next.png + res/previous.png + res/debugger_start.png + res/debugger_stop.png + res/debugger_pause.png + res/debugger_stepin.png + res/debugger_stepout.png + res/debugger_next.png + res/bug.png + res/help.png + res/magic-wand2.png + + res/signature.png + res/svn_repo.png + res/drive.png + + res/locals_view.png + res/watches.png + res/frames.png + res/breakpoint.png + res/puzzle.png + res/plugin_add.png + res/plugin24.png + res/question_and_answer.png + res/threads.png + res/pictures.png + + res/folder_green.png + res/folder_red.png + res/error.png + + + res/page_green.png + res/page_red.png + res/page_error.png + res/page_green.png + res/page_red.png + res/page_error.png + res/page_green.png + res/page_red.png + res/page_error.png + res/page_green.png + res/page_red.png + res/page_error.png + res/new_class.png + res/class24.png + res/wx24.png + res/wxproject.png + diff --git a/LiteEditor/setters_getters_base_dlg.cpp b/LiteEditor/setters_getters_base_dlg.cpp new file mode 100644 index 0000000000..8131f3396f --- /dev/null +++ b/LiteEditor/setters_getters_base_dlg.cpp @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "setters_getters_base_dlg.h" + +/////////////////////////////////////////////////////////////////////////// + +SettersGettersBaseDlg::SettersGettersBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxVERTICAL ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Class Name:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizer3->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_textClassName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); + bSizer3->Add( m_textClassName, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("Select members from the list below :"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + bSizer3->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); + + wxArrayString m_checkListMembersChoices; + m_checkListMembers = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListMembersChoices, 0 ); + bSizer4->Add( m_checkListMembers, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_buttonCheckAll = new wxButton( this, wxID_ANY, wxT("Check &All"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonCheckAll->SetDefault(); + bSizer5->Add( m_buttonCheckAll, 0, wxALL, 5 ); + + m_buttonUncheckAll = new wxButton( this, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_buttonUncheckAll, 0, wxALL, 5 ); + + bSizer4->Add( bSizer5, 0, wxEXPAND, 5 ); + + bSizer3->Add( bSizer4, 1, wxEXPAND, 5 ); + + m_staticText31 = new wxStaticText( this, wxID_ANY, wxT("Preview:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31->Wrap( -1 ); + bSizer3->Add( m_staticText31, 0, wxALL, 5 ); + + m_textPreview = new LEditor(this, wxID_ANY, wxDefaultSize, wxEmptyString, wxEmptyString, false); + m_textPreview->SetUseTabs( false ); + m_textPreview->SetTabWidth( 4 ); + m_textPreview->SetIndent( 4 ); + m_textPreview->SetTabIndents( false ); + m_textPreview->SetBackSpaceUnIndents( false ); + m_textPreview->SetViewEOL( false ); + m_textPreview->SetViewWhiteSpace( false ); + m_textPreview->SetMarginWidth( 2, 0 ); + m_textPreview->SetIndentationGuides( false ); + m_textPreview->SetMarginWidth( 1, 0 ); + m_textPreview->SetMarginWidth( 0, 0 ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDER, wxSCI_MARK_BOXPLUS ); + m_textPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) ); + m_textPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPEN, wxSCI_MARK_BOXMINUS ); + m_textPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) ); + m_textPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERSUB, wxSCI_MARK_EMPTY ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEREND, wxSCI_MARK_BOXPLUS ); + m_textPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) ); + m_textPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDEROPENMID, wxSCI_MARK_BOXMINUS ); + m_textPreview->MarkerSetBackground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) ); + m_textPreview->MarkerSetForeground( wxSCI_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERMIDTAIL, wxSCI_MARK_EMPTY ); + m_textPreview->MarkerDefine( wxSCI_MARKNUM_FOLDERTAIL, wxSCI_MARK_EMPTY ); + m_textPreview->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); + m_textPreview->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); + bSizer3->Add( m_textPreview, 1, wxEXPAND | wxALL, 5 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, -1, wxT("Options:") ), wxHORIZONTAL ); + + m_checkStartWithUppercase = new wxCheckBox( this, wxID_ANY, wxT("Function name starts with upper case letter"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer1->Add( m_checkStartWithUppercase, 0, wxALL, 5 ); + + bSizer3->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( bSizer3, 1, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_buttonCheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SettersGettersBaseDlg::OnCheckAll ), NULL, this ); + m_buttonUncheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SettersGettersBaseDlg::OnUncheckAll ), NULL, this ); +} diff --git a/LiteEditor/setters_getters_base_dlg.h b/LiteEditor/setters_getters_base_dlg.h new file mode 100644 index 0000000000..bd7ae801ad --- /dev/null +++ b/LiteEditor/setters_getters_base_dlg.h @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __setters_getters_base_dlg__ +#define __setters_getters_base_dlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef __VISUALC__ +#include +#endif //__VISUALC__ +#include +#include +#include +#include +#include "editor.h" + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SettersGettersBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class SettersGettersBaseDlg : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText2; + wxTextCtrl* m_textClassName; + wxStaticText* m_staticText3; + wxCheckListBox* m_checkListMembers; + wxButton* m_buttonCheckAll; + wxButton* m_buttonUncheckAll; + wxStaticText* m_staticText31; + LEditor* m_textPreview; + wxCheckBox* m_checkStartWithUppercase; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnCheckAll( wxCommandEvent& event ){ event.Skip(); } + virtual void OnUncheckAll( wxCommandEvent& event ){ event.Skip(); } + + + public: + SettersGettersBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Generate Setters/Getters for class"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 655,518 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + +}; + +#endif //__setters_getters_base_dlg__ diff --git a/LiteEditor/setters_getters_dlg.cpp b/LiteEditor/setters_getters_dlg.cpp new file mode 100644 index 0000000000..f5a574f148 --- /dev/null +++ b/LiteEditor/setters_getters_dlg.cpp @@ -0,0 +1,229 @@ +#include "precompiled_header.h" +#include "setters_getters_dlg.h" +#include "macros.h" +#include "language.h" +#include "wx/tokenzr.h" + +SettersGettersDlg::SettersGettersDlg(wxWindow* parent) +: SettersGettersBaseDlg(parent) +{ + ConnectCheckBox(m_checkStartWithUppercase, SettersGettersDlg::OnCheckStartWithUpperCase); + ConnectCheckList(m_checkListMembers, SettersGettersDlg::OnCheckStartWithUpperCase); +} + +void SettersGettersDlg::Init(const std::vector &tags, const wxFileName &file, int lineno) +{ + //convert the tags to string array + m_file = file; + m_lineno = lineno; + m_members = tags; + + wxArrayString members; + for(size_t i=0; iGetName() + wxT(" : [Getter]")); + members.Add(tags.at(i)->GetName() + wxT(" : [Setter]")); + + m_tagsMap[tags.at(i)->GetName() + wxT(" : [Getter]")] = tags.at(i); + m_tagsMap[tags.at(i)->GetName() + wxT(" : [Setter]")] = tags.at(i); + } + + //append all members to the check list + m_checkListMembers->Clear(); + m_checkListMembers->Append(members); + + //uncheck all items + for(unsigned int i=0; iGetCount(); i++) + { + m_checkListMembers->Check(i, false); + } + + if(tags.empty() == false){ + m_textClassName->SetValue(tags.at(0)->GetParent()); + } + + //set the preview + m_textPreview->SetReadOnly(false); + m_textPreview->Create(wxEmptyString, m_file); + m_textPreview->GotoLine(m_lineno); + m_textPreview->SetReadOnly(true); + UpdatePreview(); +} + +void SettersGettersDlg::OnCheckStartWithUpperCase(wxCommandEvent &event) +{ + wxUnusedVar(event); + UpdatePreview(); +} + +wxString SettersGettersDlg::GenerateFunctions() +{ + wxString code; + GenerateSetters(code); + if(code.IsEmpty() == false){ + code.Prepend(wxT("//Setters\n")); + code << wxT("\n\n"); + } + wxString settersCode; + GenerateGetters(settersCode); + if(settersCode.IsEmpty() == false){ + code << wxT("//Getters\n"); + code << settersCode << wxT("\n"); + } + return code; +} + +void SettersGettersDlg::GenerateGetters(wxString &code) +{ + for(size_t i=0; iGetCount(); i++) + { + TagEntryPtr tag; + if(m_checkListMembers->IsChecked((unsigned int)i)){ + wxString item = m_checkListMembers->GetString((unsigned int)i); + //get the tag for this + std::map::iterator iter = m_tagsMap.find(item); + if(iter != m_tagsMap.end()){ + tag = iter->second; + //geenerate function for this tag + if(item.EndsWith(wxT("[Getter]"))){ + code << GenerateGetter(tag) << wxT("\n"); + } + } + } + } +} + +void SettersGettersDlg::GenerateSetters(wxString &code) +{ + for(size_t i=0; iGetCount(); i++) + { + TagEntryPtr tag; + if(m_checkListMembers->IsChecked((unsigned int)i)){ + wxString item = m_checkListMembers->GetString((unsigned int)i); + //get the tag for this + std::map::iterator iter = m_tagsMap.find(item); + if(iter != m_tagsMap.end()){ + tag = iter->second; + //geenerate function for this tag + if(item.EndsWith(wxT("[Setter]"))){ + code << GenerateSetter(tag) << wxT("\n");; + } + } + } + } +} + +wxString SettersGettersDlg::GenerateSetter(TagEntryPtr tag) +{ + bool startWithUpper = m_checkStartWithUppercase->IsChecked(); + + Variable var; + if(LanguageST::Get()->VariableFromPattern(tag->GetPattern(), var)) + { + wxString func; + wxString scope = _U(var.m_typeScope.c_str()); + func << wxT("void "); + if(startWithUpper){ + func << wxT("Set"); + }else{ + func << wxT("set"); + } + wxString name = _U(var.m_name.c_str()); + FormatName(name); + func << name << wxT("(const "); + + if(!scope.IsEmpty() && !(scope == wxT(""))){ + func << scope << wxT("::"); + } + + func << _U(var.m_type.c_str()) + << _U(var.m_templateDecl.c_str()) + << _U(var.m_starAmp.c_str()) + << wxT("& "); + + wxString tmpName = _U(var.m_name.c_str()); + tmpName.StartsWith(wxT("m_"), &tmpName); + + func << tmpName << wxT(") {this->") << _U(var.m_name.c_str()) << wxT(" = ") << tmpName << wxT(";}"); + return func; + } + return wxEmptyString; +} + +wxString SettersGettersDlg::GenerateGetter(TagEntryPtr tag) +{ + bool startWithUpper = m_checkStartWithUppercase->IsChecked(); + + Variable var; + if(LanguageST::Get()->VariableFromPattern(tag->GetPattern(), var)) + { + wxString func; + wxString scope = _U(var.m_typeScope.c_str()); + func << wxT("const "); + if(!scope.IsEmpty() && !(scope == wxT(""))){ + func << scope + << wxT("::"); + } + func << _U(var.m_type.c_str()) + << _U(var.m_templateDecl.c_str()) + << _U(var.m_starAmp.c_str()) + << wxT("& "); + if(startWithUpper){ + func << wxT("Get"); + }else{ + func << wxT("get"); + } + + wxString name = _U(var.m_name.c_str()); + FormatName(name); + func << name << wxT("() const {return ") << _U(var.m_name.c_str()) << wxT(";}"); + return func; + } + return wxEmptyString; +} + +void SettersGettersDlg::FormatName(wxString &name) +{ + name.StartsWith(wxT("m_"), &name); + wxStringTokenizer tkz(name, wxT("_")); + name.Clear(); + while(tkz.HasMoreTokens()){ + wxString token = tkz.NextToken(); + wxString pre = token.Mid(0, 1); + token.Remove(0, 1); + pre.MakeUpper(); + token.Prepend(pre); + name << token; + } + +} + +void SettersGettersDlg::UpdatePreview() +{ + m_code.Clear(); + m_code = GenerateFunctions(); + m_textPreview->SetReadOnly(false); + //remove previous preview + if(m_textPreview->CanUndo()) m_textPreview->Undo(); + m_textPreview->BeginUndoAction(); + m_textPreview->InsertTextWithIndentation(m_code, m_lineno); + m_textPreview->EndUndoAction(); + m_textPreview->SetReadOnly(true); +} + +void SettersGettersDlg::OnCheckAll(wxCommandEvent &e) +{ + wxUnusedVar(e); + for(unsigned int i=0; i< (unsigned int)m_checkListMembers->GetCount(); i++){ + m_checkListMembers->Check(i); + } + UpdatePreview(); +} + +void SettersGettersDlg::OnUncheckAll(wxCommandEvent &e) +{ + wxUnusedVar(e); + for(unsigned int i=0; i< (unsigned int)m_checkListMembers->GetCount(); i++){ + m_checkListMembers->Check(i, false); + } + UpdatePreview(); +} diff --git a/LiteEditor/setters_getters_dlg.h b/LiteEditor/setters_getters_dlg.h new file mode 100644 index 0000000000..1e7deac3d1 --- /dev/null +++ b/LiteEditor/setters_getters_dlg.h @@ -0,0 +1,43 @@ +#ifndef __setters_getters_dlg__ +#define __setters_getters_dlg__ + +/** +@file +Subclass of SettersGettersBaseDlg, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "setters_getters_base_dlg.h" +#include "manager.h" +#include "ctags_manager.h" + +/** Implementing SettersGettersBaseDlg */ +class SettersGettersDlg : public SettersGettersBaseDlg +{ + std::vector m_members; + wxFileName m_file; + int m_lineno; + std::map m_tagsMap; + wxString m_code; + +protected: + void OnCheckStartWithUpperCase(wxCommandEvent &event); + void OnCheckAll(wxCommandEvent &e); + void OnUncheckAll(wxCommandEvent &e); + + wxString GenerateFunctions(); + wxString GenerateSetter(TagEntryPtr tag); + wxString GenerateGetter(TagEntryPtr tag); + void FormatName(wxString &name); + void UpdatePreview(); + void GenerateGetters(wxString &code); + void GenerateSetters(wxString &code); + +public: + /** Constructor */ + SettersGettersDlg(wxWindow* parent); + const wxString &GetGenCode() const {return m_code;} + void Init(const std::vector &tags, const wxFileName &file, int lineno); +}; + +#endif // __setters_getters_dlg__ diff --git a/LiteEditor/shell_window.cpp b/LiteEditor/shell_window.cpp new file mode 100644 index 0000000000..39e802c02e --- /dev/null +++ b/LiteEditor/shell_window.cpp @@ -0,0 +1,153 @@ +#include "shell_window.h" +#include "macros.h" +#include "wx/combobox.h" +#include "wx/timer.h" +#include + +#ifndef wxScintillaEventHandler +#define wxScintillaEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScintillaEventFunction, &func) +#endif + +DEFINE_EVENT_TYPE(wxEVT_SHELLWIN_LINE_ENTERED) +DEFINE_EVENT_TYPE(wxEVT_SHELLWIN_CTRLC) + +ShellWindow::ShellWindow(wxWindow *parent, wxEvtHandler *handler) +: wxPanel(parent) +, m_handler(handler) +, m_cur(wxNOT_FOUND) +{ + Initialize(); + ConnectEvents(); + //GetSizer()->Fit(this); + GetSizer()->Layout(); +} + +void ShellWindow::Initialize() +{ + wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); + SetSizer(sizer); + + int caretSlop = 1; + int caretZone = 20; + int caretStrict = 0; + int caretEven = 0; + int caretJumps = 0; + + m_outWin = new wxScintilla(this); + sizer->Add(m_outWin, 1, wxEXPAND, 0); + + m_outWin->SetXCaretPolicy(caretStrict | caretSlop | caretEven | caretJumps, caretZone); + + caretSlop = 1; + caretZone = 1; + caretStrict = 4; + caretEven = 8; + caretJumps = 0; + m_outWin->SetYCaretPolicy(caretStrict | caretSlop | caretEven | caretJumps, caretZone); + m_outWin->StyleSetBackground(0, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + m_outWin->StyleSetBackground(wxSCI_STYLE_DEFAULT, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + m_outWin->SetMarginWidth(1, 0); + m_outWin->SetMarginWidth(2, 0); + + wxFont defFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont font(defFont.GetPointSize(), wxFONTFAMILY_TELETYPE, wxNORMAL, wxNORMAL); + + m_outWin->StyleSetFont(0, font); + m_outWin->SetReadOnly(true); + m_inWin = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER); + m_inWin->SetFont(font); + sizer->Add(m_inWin, 0, wxEXPAND|wxTOP, 5); +} + +ShellWindow::~ShellWindow() +{ +} + +void ShellWindow::ConnectEvents() +{ + // Connect events + ConnectCmdTextEntered(m_inWin, ShellWindow::OnEnterPressed); + ConnectKeyDown(m_inWin, ShellWindow::OnKeyDown); +} + +void ShellWindow::AppendLine(const wxString &text) +{ + // the next 4 lines make sure that the caret is at last line + // and is visible. This is done before adding the data + m_outWin->SetSelectionEnd(m_outWin-> GetLength()); + m_outWin->SetSelectionStart(m_outWin->GetLength()); + m_outWin->SetCurrentPos(m_outWin->GetLength()); + m_outWin->EnsureCaretVisible(); + + // add the text to the control + m_outWin->SetReadOnly(false); + m_outWin->AddText( text ); + m_outWin->SetReadOnly(true); + + // the next 4 lines make sure that the caret is at last line + // and is visible. This is done before adding the data + m_outWin->SetSelectionEnd(m_outWin->GetLength()); + m_outWin->SetSelectionStart(m_outWin->GetLength()); + m_outWin->SetCurrentPos(m_outWin->GetLength()); + m_outWin->EnsureCaretVisible(); +} + +void ShellWindow::Clear() +{ + m_outWin->SetReadOnly(false); + m_outWin->ClearAll(); + m_outWin->SetReadOnly(true); +} + +void ShellWindow::OnEnterPressed(wxCommandEvent &ev) +{ + wxCommandEvent e(wxEVT_SHELLWIN_LINE_ENTERED, GetId()); + e.SetEventObject(this); + e.SetString(m_inWin->GetValue()); + m_handler->ProcessEvent(e); + + //add this command to the history + m_inWin->Clear(); + if(m_history.Index(e.GetString()) == wxNOT_FOUND){ + m_history.Add(e.GetString()); + m_cur = (int)m_history.GetCount()-1; + } +} + +void ShellWindow::OnKeyDown(wxKeyEvent &event) +{ + if((event.GetKeyCode() == wxT('c') || event.GetKeyCode() == wxT('C')) && event.GetModifiers() == wxMOD_CONTROL ){ + //Ctrl+C is down + wxCommandEvent e(wxEVT_SHELLWIN_CTRLC, GetId()); + e.SetEventObject(this); + m_handler->ProcessEvent(e); + return; + } + switch(event.GetKeyCode()) + { + case WXK_UP: + { + if(m_cur < (int)m_history.GetCount() && !m_history.IsEmpty()){ + if(m_cur+1 < (int)m_history.GetCount() && !m_history.IsEmpty()) m_cur++; + wxString itemToDisplay = m_history.Item((size_t)m_cur); + m_inWin->SetValue(itemToDisplay); + m_inWin->SetSelection(m_inWin->GetLastPosition(), m_inWin->GetLastPosition()); + } + break; + } + case WXK_DOWN: + { + if(m_cur >= 0 && !m_history.IsEmpty()){ + if(m_cur-1 >= 0 && !m_history.IsEmpty()) m_cur--; + wxString itemToDisplay = m_history.Item((size_t)m_cur); + m_inWin->SetValue(itemToDisplay); + m_inWin->SetSelection(m_inWin->GetLastPosition(), m_inWin->GetLastPosition()); + } + break; + } + default: + break; + } + event.Skip(); +} diff --git a/LiteEditor/shell_window.h b/LiteEditor/shell_window.h new file mode 100644 index 0000000000..66811e759a --- /dev/null +++ b/LiteEditor/shell_window.h @@ -0,0 +1,45 @@ +#ifndef SHELL_WINDOW_H +#define SHELL_WINDOW_H + +#include "wx/wxscintilla.h" +#include "wx/event.h" +#include + +class wxScintilla; +class wxTextCtrl; +class wxSplitterWindow; + +extern const wxEventType wxEVT_SHELLWIN_LINE_ENTERED; +extern const wxEventType wxEVT_SHELLWIN_CTRLC; + +class ShellWindow : public wxPanel +{ + wxEvtHandler *m_handler; + wxScintilla *m_outWin; + wxTextCtrl *m_inWin; + wxArrayString m_history; + int m_cur; + bool m_keepFocus; + +protected: + void ConnectEvents(); + void Initialize(); + +public: + ShellWindow(wxWindow *parent, wxEvtHandler *handler); + virtual ~ShellWindow(); + + //Setters + void SetHandler(wxEvtHandler*& handler) {this->m_handler = handler;} + + //Getters + const wxEvtHandler* GetHandler() const {return m_handler;} + const wxTextCtrl* GetInWin() const {return m_inWin;} + const wxScintilla* GetOutWin() const {return m_outWin;} + + void AppendLine(const wxString &text); + void Clear(); + void OnKeyDown(wxKeyEvent &event); + void OnEnterPressed(wxCommandEvent &e); +}; +#endif // SHELL_WINDOW_H diff --git a/LiteEditor/simpletable.cpp b/LiteEditor/simpletable.cpp new file mode 100644 index 0000000000..f72549afb9 --- /dev/null +++ b/LiteEditor/simpletable.cpp @@ -0,0 +1,268 @@ +#include "simpletable.h" +#include //wxGetTextFromUser +#include "manager.h" +#include +#include "debuggermanager.h" +#include "globals.h" + +SimpleTable::SimpleTable( wxWindow* parent ) + : + SimpleTableBase( parent ) + , m_selectedId(wxNOT_FOUND) +{ + InitTable(); + + //Load the right click menu + m_rclickMenu = wxXmlResource::Get()->LoadMenu(wxT("dbg_watch_rmenu")); + Connect(XRCID("del_expr"),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SimpleTable::OnDeleteWatch), NULL, this); + Connect(XRCID("del_expr_all"),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SimpleTable::OnDeleteAll), NULL, this); + Connect(XRCID("expand_expr"),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SimpleTable::OnMenuExpandExpr), NULL, this); + Connect(XRCID("edit_expr"),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SimpleTable::OnMenuEditExpr), NULL, this); + Connect(XRCID("dereference_expr"),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SimpleTable::OnMenuDerefExpr), NULL, this); +} + +SimpleTable::~SimpleTable() +{ + if (m_rclickMenu) { + delete m_rclickMenu; + m_rclickMenu = NULL; + } +} + +void SimpleTable::Clear() +{ + m_listTable->DeleteAllItems(); +} + +void SimpleTable::InitTable() +{ + //add two columns to the list ctrl + m_listTable->InsertColumn(0, wxT("Expression")); + m_listTable->InsertColumn(1, wxT("Value")); +} + +void SimpleTable::OnItemActivated( wxListEvent& event ) +{ + m_selectedId = event.m_itemIndex; + DoShowMoreDetails(m_selectedId); +} + +void SimpleTable::OnItemSelected( wxListEvent& event ) +{ + // TODO: Implement OnItemSelected + m_selectedId = event.m_itemIndex; +} + +void SimpleTable::OnListKeyDown( wxListEvent& event ) +{ + if (event.GetKeyCode() == WXK_DELETE || event.GetKeyCode() == WXK_NUMPAD_DELETE) { + //remove the entry + if (m_selectedId != wxNOT_FOUND) { + m_listTable->DeleteItem(m_selectedId); + m_selectedId = wxNOT_FOUND; + } + } +} + +void SimpleTable::OnItemRightClick(wxListEvent &event) +{ + wxUnusedVar(event); + if (m_rclickMenu) { + PopupMenu(m_rclickMenu); + } +} + +void SimpleTable::OnItemDeSelected(wxListEvent &event) +{ + m_selectedId = wxNOT_FOUND; + wxUnusedVar(event); +} + +void SimpleTable::OnNewWatch(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxString expr = wxGetTextFromUser(wxT("Expression to watch:"), wxT("New watch")); + if (expr.IsEmpty() == false) { + AddExpression(expr); + RefreshValues(); + } +} + +void SimpleTable::OnNewWatchUI(wxUpdateUIEvent &event) +{ + event.Enable(true); +} + + +void SimpleTable::OnDeleteAll(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_listTable->GetItemCount()>0) { + m_listTable->DeleteAllItems(); + m_selectedId = wxNOT_FOUND; + } +} + +void SimpleTable::OnDeleteAllUI(wxUpdateUIEvent &event) +{ + event.Enable(m_listTable->GetItemCount()>0); +} + +void SimpleTable::OnDeleteWatch(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_selectedId != wxNOT_FOUND) { + m_listTable->DeleteItem(m_selectedId); + m_selectedId = wxNOT_FOUND; + } +} + +void SimpleTable::OnDeleteWatchUI(wxUpdateUIEvent &event) +{ + event.Enable(m_selectedId != wxNOT_FOUND ); +} + +void SimpleTable::AddExpression(const wxString &expr) +{ + //make sure that the expression does not exist + int count = m_listTable->GetItemCount(); + for (int i=0; iGetColumnText(i, 0); + if (exp == expr) { + wxMessageBox(wxT("A similar expression already exist in the watches table"), wxT("CodeLite"), wxOK | wxICON_INFORMATION); + return; + } + } + + long item = AppendListCtrlRow(m_listTable); + this->SetColumnText(item, 0, expr); + + //info.SetState(wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED); + //item = m_listTable->InsertItem(info); + + m_listTable->SetColumnWidth(0, 200); + m_listTable->SetColumnWidth(1, 600); +} + +void SimpleTable::RefreshValues() +{ + //ask the debugger to update the table + //to trigger the update for the table we issue a simple + //file line update request from the debugger + if (ManagerST::Get()->DbgCanInteract()) { + IDebugger *dbgr = DebuggerMgr::Get().GetActiveDebugger(); + if (dbgr && dbgr->IsRunning()) { + dbgr->QueryFileLine(); + } + } +} + +void SimpleTable::UpdateExpression(const wxString &expr, const wxString &value) +{ + //find the item of this expression + long item = FindExpressionItem(expr); + if (item == wxNOT_FOUND) { + return; + } + //update the text + SetColumnText(item, 1, value); +} + +void SimpleTable::SetColumnText ( long indx, long column, const wxString &rText ) +{ + m_listTable->Freeze(); + wxListItem list_item; + list_item.SetId ( indx ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + list_item.SetText ( rText ); + m_listTable->SetItem ( list_item ); + m_listTable->Thaw(); +} + +wxString SimpleTable::GetColumnText(long index, long column) +{ + wxListItem list_item; + list_item.SetId ( index ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + m_listTable->GetItem ( list_item ); + return list_item.GetText(); +} + +long SimpleTable::FindExpressionItem(const wxString &expression) +{ + long item = -1; + while ( true ) { + item = m_listTable->GetNextItem(item, + wxLIST_NEXT_ALL, + wxLIST_STATE_DONTCARE); + + if ( item == -1 ) + break; + + wxString text(GetColumnText(item, 0)); + if (text == expression) + return item; + } + return wxNOT_FOUND; +} + +wxArrayString SimpleTable::GetExpressions() +{ + long item = wxNOT_FOUND; + wxArrayString expressions; + while ( true ) { + item = m_listTable->GetNextItem(item, + wxLIST_NEXT_ALL, + wxLIST_STATE_DONTCARE); + + if ( item == -1 ) + break; + + wxString text(GetColumnText(item, 0)); + expressions.Add(text); + } + return expressions; +} + +void SimpleTable::DoShowMoreDetails(long item) +{ + ManagerST::Get()->DbgQuickWatch(GetColumnText(item, 0)); +} + +void SimpleTable::OnMenuExpandExpr(wxCommandEvent &event) +{ + wxUnusedVar(event); + DoShowMoreDetails(m_selectedId); +} + +void SimpleTable::OnListEditLabelEnd(wxListEvent &event) +{ + wxUnusedVar(event); + RefreshValues(); +} + +void SimpleTable::OnMenuDerefExpr(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_selectedId != wxNOT_FOUND) { + wxString curvalue = GetColumnText(m_selectedId, 0); + curvalue.Prepend(wxT("*")); + SetColumnText(m_selectedId, 0, curvalue); + RefreshValues(); + } +} + +void SimpleTable::OnMenuEditExpr(wxCommandEvent &event) +{ + wxUnusedVar(event); + if (m_selectedId != wxNOT_FOUND) { + wxString curvalue = GetColumnText(m_selectedId, 0); + wxString newValue = wxGetTextFromUser(wxT("Edit expression:"), wxT("Edit"), curvalue); + if (newValue.IsEmpty() == false) { + SetColumnText(m_selectedId, 0, newValue); + RefreshValues(); + } + } +} diff --git a/LiteEditor/simpletable.h b/LiteEditor/simpletable.h new file mode 100644 index 0000000000..f4cc220487 --- /dev/null +++ b/LiteEditor/simpletable.h @@ -0,0 +1,54 @@ +#ifndef __simpletable__ +#define __simpletable__ + +/** +@file +Subclass of SimpleTableBase, which is generated by wxFormBuilder. +*/ + +#include "simpletablebase.h" + +/** Implementing SimpleTableBase */ +class SimpleTable : public SimpleTableBase +{ + long m_selectedId; + wxMenu *m_rclickMenu; + +private: + wxString GetColumnText(long indx, long column); + void SetColumnText ( long indx, long column, const wxString &rText ); + long FindExpressionItem(const wxString &expression); + +protected: + // Handlers for SimpleTableBase events. + void OnItemActivated( wxListEvent& event ); + void OnItemSelected( wxListEvent& event ); + void OnListKeyDown( wxListEvent& event ); + void OnItemRightClick(wxListEvent& event); + void InitTable(); + void OnNewWatch(wxCommandEvent &event); + void OnNewWatchUI(wxUpdateUIEvent &event); + void OnDeleteAll(wxCommandEvent &event); + void OnDeleteAllUI(wxUpdateUIEvent &event); + void OnDeleteWatch(wxCommandEvent &event); + void OnDeleteWatchUI(wxUpdateUIEvent &event); + void OnItemDeSelected(wxListEvent &event); + void DoShowMoreDetails(long item); + void OnMenuExpandExpr(wxCommandEvent &event); + void OnMenuEditExpr(wxCommandEvent &event); + void OnMenuDerefExpr(wxCommandEvent &event); + void OnListEditLabelEnd(wxListEvent &event); + +public: + /** Constructor */ + SimpleTable( wxWindow* parent ); + virtual ~SimpleTable(); + + void AddExpression(const wxString &expr); + void UpdateExpression(const wxString &expr, const wxString &value); + wxArrayString GetExpressions(); + void Clear(); + void RefreshValues(); +}; + +#endif // __simpletable__ diff --git a/LiteEditor/simpletablebase.cpp b/LiteEditor/simpletablebase.cpp new file mode 100644 index 0000000000..bcedf1120c --- /dev/null +++ b/LiteEditor/simpletablebase.cpp @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "simpletablebase.h" + +/////////////////////////////////////////////////////////////////////////// + +SimpleTableBase::SimpleTableBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_toolBar2 = new wxToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL|wxTB_HORZ_TEXT|wxTB_NOICONS ); + m_toolBar2->AddTool( ID_TOOLNEW, wxT("New..."), wxNullBitmap, wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); + m_toolBar2->AddTool( ID_TOOLDELETE, wxT("Delete"), wxNullBitmap, wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); + m_toolBar2->AddTool( ID_TOOLDELETEALL, wxT("Delete All"), wxNullBitmap, wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString ); + m_toolBar2->Realize(); + + bSizer1->Add( m_toolBar2, 0, wxEXPAND|wxTOP, 5 ); + + m_listTable = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_EDIT_LABELS|wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES ); + bSizer1->Add( m_listTable, 1, wxEXPAND|wxALL, 1 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + this->Connect( ID_TOOLNEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SimpleTableBase::OnNewWatch ) ); + this->Connect( ID_TOOLNEW, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SimpleTableBase::OnNewWatchUI ) ); + this->Connect( ID_TOOLDELETE, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SimpleTableBase::OnDeleteWatch ) ); + this->Connect( ID_TOOLDELETE, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SimpleTableBase::OnDeleteWatchUI ) ); + this->Connect( ID_TOOLDELETEALL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SimpleTableBase::OnDeleteAll ) ); + this->Connect( ID_TOOLDELETEALL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SimpleTableBase::OnDeleteAllUI ) ); + m_listTable->Connect( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, wxListEventHandler( SimpleTableBase::OnListEditLabelBegin ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEventHandler( SimpleTableBase::OnListEditLabelEnd ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( SimpleTableBase::OnItemActivated ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( SimpleTableBase::OnItemDeSelected ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SimpleTableBase::OnItemRightClick ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( SimpleTableBase::OnItemSelected ), NULL, this ); + m_listTable->Connect( wxEVT_COMMAND_LIST_KEY_DOWN, wxListEventHandler( SimpleTableBase::OnListKeyDown ), NULL, this ); +} diff --git a/LiteEditor/simpletablebase.h b/LiteEditor/simpletablebase.h new file mode 100644 index 0000000000..886cb025f7 --- /dev/null +++ b/LiteEditor/simpletablebase.h @@ -0,0 +1,61 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __simpletablebase__ +#define __simpletablebase__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#define ID_TOOLNEW 2500 +#define ID_TOOLDELETE 2501 +#define ID_TOOLDELETEALL 2502 + +/////////////////////////////////////////////////////////////////////////////// +/// Class SimpleTableBase +/////////////////////////////////////////////////////////////////////////////// +class SimpleTableBase : public wxPanel +{ + private: + + protected: + wxToolBar* m_toolBar2; + wxListCtrl* m_listTable; + + // Virtual event handlers, overide them in your derived class + virtual void OnNewWatch( wxCommandEvent& event ){ event.Skip(); } + virtual void OnNewWatchUI( wxUpdateUIEvent& event ){ event.Skip(); } + virtual void OnDeleteWatch( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDeleteWatchUI( wxUpdateUIEvent& event ){ event.Skip(); } + virtual void OnDeleteAll( wxCommandEvent& event ){ event.Skip(); } + virtual void OnDeleteAllUI( wxUpdateUIEvent& event ){ event.Skip(); } + virtual void OnListEditLabelBegin( wxListEvent& event ){ event.Skip(); } + virtual void OnListEditLabelEnd( wxListEvent& event ){ event.Skip(); } + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + virtual void OnItemDeSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnItemRightClick( wxListEvent& event ){ event.Skip(); } + virtual void OnItemSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnListKeyDown( wxListEvent& event ){ event.Skip(); } + + + public: + SimpleTableBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL ); + +}; + +#endif //__simpletablebase__ diff --git a/LiteEditor/stack_walker.cpp b/LiteEditor/stack_walker.cpp new file mode 100644 index 0000000000..a189dd75e7 --- /dev/null +++ b/LiteEditor/stack_walker.cpp @@ -0,0 +1,26 @@ +#include "stack_walker.h" +#include "wx/txtstrm.h" + +#if wxUSE_STACKWALKER + +StackWalker::StackWalker(wxTextOutputStream *output) +: m_output(output) +{ +} + +StackWalker::~StackWalker() +{ +} + +void StackWalker::OnStackFrame(const wxStackFrame &frame) +{ + *m_output + << frame.GetModule() << wxT(" ") + << frame.GetName() << wxT(" ") + << frame.GetFileName() << wxT(" ") + << (int)frame.GetLine() << wxT("\n"); +} +#endif + + + diff --git a/LiteEditor/stack_walker.h b/LiteEditor/stack_walker.h new file mode 100644 index 0000000000..b75a382d39 --- /dev/null +++ b/LiteEditor/stack_walker.h @@ -0,0 +1,20 @@ +#ifndef STACK_WALKER_H +#define STACK_WALKER_H + +#include "wx/string.h" +#include + +#if wxUSE_STACKWALKER +class wxTextOutputStream; +class StackWalker : public wxStackWalker +{ + wxTextOutputStream *m_output; + +public: + StackWalker(wxTextOutputStream *output); + virtual ~StackWalker(); + void OnStackFrame(const wxStackFrame &frame); +}; +#endif + +#endif //STACK_WALKER_H diff --git a/LiteEditor/stdwx.h b/LiteEditor/stdwx.h new file mode 100644 index 0000000000..e2446e0776 --- /dev/null +++ b/LiteEditor/stdwx.h @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: stdwx.h +// Purpose: declaration of per compiled header file. +// Author: Eran Ifrah +// Modified by: +// Created: 19/8/2006 +// Copyright: (c) 2005 Eran Ifrah +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _stdwx_h_ +#define _stdwx_h_ + +// SYSTEM INCLUDES +#include +#ifdef __BORLANDC__ + #pragma hdrstop +#endif +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +// APPLICATION INCLUDES +#include + + +#endif diff --git a/LiteEditor/symbols_dialog.cpp b/LiteEditor/symbols_dialog.cpp new file mode 100644 index 0000000000..745678baea --- /dev/null +++ b/LiteEditor/symbols_dialog.cpp @@ -0,0 +1,118 @@ +#include "symbols_dialog.h" +#include "manager.h" + +SymbolsDialog::SymbolsDialog( wxWindow* parent ) +: SymbolsDialogBase( parent ) +, m_line(wxNOT_FOUND) +, m_file(wxEmptyString) +{ + // Initialise the list control + m_results->InsertColumn(0, wxT("Symbol")); + m_results->InsertColumn(1, wxT("Kind")); + m_results->InsertColumn(2, wxT("File")); + m_results->InsertColumn(3, wxT("Line")); +} + +void SymbolsDialog::AddSymbol(const TagEntryPtr &tag, bool sel) +{ + wxListItem info; + wxString line; + line << tag->GetLine(); + + //------------------------------------------------------- + // Populate the columns + //------------------------------------------------------- + + // Set the item display name + wxString tmp(tag->GetFullDisplayName()), name; + if(tmp.EndsWith(wxT(": [prototype]"), &name)){ + info.SetText(name); + }else{ + info.SetText(tmp); + } + + info.SetColumn(0); + if(sel == true){ + info.SetState(wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED); + m_file = tag->GetFile(); + m_line = tag->GetLine(); + m_project = ManagerST::Get()->GetProjectNameByFile(m_file); + } + + long item = m_results->InsertItem(info); + + // Set the item kind + info.SetColumn(1); + info.SetId(item); + info.SetText(tag->GetKind()); + info.SetState(0); + m_results->SetItem(info); + + // Set the file name + info.SetColumn(2); + info.SetId(item); + info.SetText(tag->GetFile()); + info.SetState(0); + m_results->SetItem(info); + + // set the line number + info.SetColumn(3); + info.SetId(item); + info.SetText(line); + info.SetState(0); + m_results->SetItem(info); +} + +void SymbolsDialog::AddSymbols(const std::vector &tags, size_t sel) +{ + for(size_t i=0; iSetColumnWidth(0, wxLIST_AUTOSIZE); + m_results->SetColumnWidth(1, wxLIST_AUTOSIZE); + m_results->SetColumnWidth(2, wxLIST_AUTOSIZE); + m_results->SetColumnWidth(3, wxLIST_AUTOSIZE); +} + +void SymbolsDialog::UpdateFileAndLine(wxListEvent &event) +{ + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 2; + info.m_mask = wxLIST_MASK_TEXT; + + if( m_results->GetItem(info) ){ + if(info.m_text.IsEmpty()) + return; + m_file = info.m_text; + } + + info.m_col = 3; + if( m_results->GetItem(info) && !info.m_text.IsEmpty()){ + info.m_text.ToLong( &m_line ); + } + + m_project = ManagerST::Get()->GetProjectNameByFile(m_file); +} + +void SymbolsDialog::OnItemSelected(wxListEvent &event) +{ + UpdateFileAndLine(event); +} + +void SymbolsDialog::OnItemActivated(wxListEvent &event) +{ + UpdateFileAndLine(event); + EndModal(wxID_OK); +} + + +void SymbolsDialog::OnButtonCancel(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_CANCEL); +} + +void SymbolsDialog::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_OK); +} diff --git a/LiteEditor/symbols_dialog.h b/LiteEditor/symbols_dialog.h new file mode 100644 index 0000000000..48dde4eefe --- /dev/null +++ b/LiteEditor/symbols_dialog.h @@ -0,0 +1,61 @@ +#ifndef __symbols_dialog__ +#define __symbols_dialog__ + +/** +@file +Subclass of SymbolsDialogBase, which is generated by wxFormBuilder. +@todo Add your event handlers directly to this file. +*/ + +#include "symbols_dialog_base.h" +#include "entry.h" +#include "vector" + +/** Implementing SymbolsDialogBase */ +class SymbolsDialog : public SymbolsDialogBase +{ + long m_line; + wxString m_file; + wxString m_project; + +public: + /** Constructor */ + SymbolsDialog( wxWindow* parent ); + + /** + * Add symbol to the dialog - this should be called before calling the dialog + * ShowModal() method + * \param tag tag to add + * \param sel when set to true, this item will be selected + */ + void AddSymbol(const TagEntryPtr &tag, bool sel); + + /** + * A wrapper around the AddSymbol methos that allows + * adding a vector of tags + * \param tags + * \param sel zero based index to select + */ + void AddSymbols(const std::vector &tags, size_t sel); + + + //--------------------------------------------- + // Getters + //--------------------------------------------- + const wxString &GetFile() const { return m_file; } + long GetLine() const { return m_line; } + const wxString &GetProject() const { return m_project; } + +private: + void UpdateFileAndLine(wxListEvent &event); + + //----------------------------------------------- + // Event handlers + //----------------------------------------------- + void OnItemSelected(wxListEvent &event); + void OnItemActivated(wxListEvent &event); + void OnButtonCancel(wxCommandEvent &event); + void OnButtonOK(wxCommandEvent &event); +}; + +#endif // __symbols_dialog__ diff --git a/LiteEditor/symbols_dialog_base.cpp b/LiteEditor/symbols_dialog_base.cpp new file mode 100644 index 0000000000..02bc4a3a16 --- /dev/null +++ b/LiteEditor/symbols_dialog_base.cpp @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#ifndef WX_PRECOMP +#include +#endif //WX_PRECOMP + +#include "symbols_dialog_base.h" + +/////////////////////////////////////////////////////////////////////////// +BEGIN_EVENT_TABLE( SymbolsDialogBase, wxDialog ) + EVT_LIST_ITEM_ACTIVATED( wxID_ANY, SymbolsDialogBase::_wxFB_OnItemActivated ) + EVT_LIST_ITEM_SELECTED( wxID_ANY, SymbolsDialogBase::_wxFB_OnItemSelected ) + EVT_BUTTON( wxID_OK, SymbolsDialogBase::_wxFB_OnButtonOK ) + EVT_BUTTON( wxID_CANCEL, SymbolsDialogBase::_wxFB_OnButtonCancel ) +END_EVENT_TABLE() + +SymbolsDialogBase::SymbolsDialogBase( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_results = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT ); + mainSizer->Add( m_results, 1, wxALL|wxEXPAND, 5 ); + + statLine = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( statLine, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_okButton = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_okButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_cancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_cancel, 0, wxALIGN_RIGHT|wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); +} diff --git a/LiteEditor/symbols_dialog_base.h b/LiteEditor/symbols_dialog_base.h new file mode 100644 index 0000000000..de540ef771 --- /dev/null +++ b/LiteEditor/symbols_dialog_base.h @@ -0,0 +1,62 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Feb 1 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __symbols_dialog_base__ +#define __symbols_dialog_base__ + +// Define WX_GCH in order to support precompiled headers with GCC compiler. +// You have to create the header "wx_pch.h" and include all files needed +// for compile your gui inside it. +// Then, compile it and place the file "wx_pch.h.gch" into the same +// directory that "wx_pch.h". +#ifdef WX_GCH +#include +#else +#include +#endif + +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SymbolsDialogBase +/////////////////////////////////////////////////////////////////////////////// +class SymbolsDialogBase : public wxDialog +{ + DECLARE_EVENT_TABLE() + private: + + // Private event handlers + void _wxFB_OnItemActivated( wxListEvent& event ){ OnItemActivated( event ); } + void _wxFB_OnItemSelected( wxListEvent& event ){ OnItemSelected( event ); } + void _wxFB_OnButtonOK( wxCommandEvent& event ){ OnButtonOK( event ); } + void _wxFB_OnButtonCancel( wxCommandEvent& event ){ OnButtonCancel( event ); } + + + protected: + wxListCtrl* m_results; + wxStaticLine* statLine; + wxButton* m_okButton; + wxButton* m_cancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + virtual void OnItemSelected( wxListEvent& event ){ event.Skip(); } + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + SymbolsDialogBase( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Resolve Ambiguity"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 600,300 ), int style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__symbols_dialog_base__ diff --git a/LiteEditor/tags_options_dlg.cpp b/LiteEditor/tags_options_dlg.cpp new file mode 100644 index 0000000000..42a66094ac --- /dev/null +++ b/LiteEditor/tags_options_dlg.cpp @@ -0,0 +1,233 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "tags_options_dlg.h" +#include "macros.h" +#include "wx/tokenzr.h" +#include "add_option_dialog.h" + +//--------------------------------------------------------- + +TagsOptionsDlg::TagsOptionsDlg( wxWindow* parent, const TagsOptionsData& data, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_data(data) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + long bookStyle = wxFNB_FF2 | wxFNB_BACKGROUND_GRADIENT | wxFNB_NO_NAV_BUTTONS | wxFNB_NO_X_BUTTON; + m_mainBook = new wxFlatNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, bookStyle); + m_generalPage = new wxPanel( m_mainBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_generalPage, -1, wxT("General:") ), wxVERTICAL ); + + m_checkParseComments = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Parse comments"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer2->Add( m_checkParseComments, 0, wxALL, 5 ); + + m_checkDisplayComments = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display comments in tooltip"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer2->Add( m_checkDisplayComments, 0, wxALL, 5 ); + + m_checkDisplayTypeInfo = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display type info tooltips"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer2->Add( m_checkDisplayTypeInfo, 0, wxALL, 5 ); + + m_checkDisplayFunctionTip = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Display function calltip"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer2->Add( m_checkDisplayFunctionTip, 0, wxALL, 5 ); + + bSizer4->Add( sbSizer2, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer21; + sbSizer21 = new wxStaticBoxSizer( new wxStaticBox( m_generalPage, -1, wxT("External Symbols Database:") ), wxVERTICAL ); + + m_checkLoadLastDB = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Automatically load the recently used additional symbols database"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer21->Add( m_checkLoadLastDB, 0, wxALL, 5 ); + + m_checkLoadToMemory = new wxCheckBox( m_generalPage, wxID_ANY, wxT("Load external database symbols to memory"), wxDefaultPosition, wxDefaultSize, 0 ); + + sbSizer21->Add( m_checkLoadToMemory, 0, wxALL, 5 ); + + bSizer4->Add( sbSizer21, 0, wxEXPAND, 5 ); + + m_generalPage->SetSizer( bSizer4 ); + m_generalPage->Layout(); + bSizer4->Fit( m_generalPage ); + m_mainBook->AddPage( m_generalPage, wxT("Basics"), true ); + m_ctagsPage = new wxPanel( m_mainBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer2; + fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer2->AddGrowableCol( 1 ); + fgSizer2->SetFlexibleDirection( wxBOTH ); + fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText1 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("Preprocessors:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + + m_textPrep = new wxTextCtrl( m_ctagsPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_textPrep, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + + m_buttonAdd = new wxButton( m_ctagsPage, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizer5->Add( m_buttonAdd, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + fgSizer2->Add( bSizer5, 1, wxEXPAND, 5 ); + + m_staticText3 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("File Types:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textFileSpec = new wxTextCtrl( m_ctagsPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer2->Add( m_textFileSpec, 0, wxALL|wxEXPAND, 5 ); + + m_staticText5 = new wxStaticText( m_ctagsPage, wxID_ANY, wxT("Force Language:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + fgSizer2->Add( m_staticText5, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_comboBoxLang = new wxComboBox( m_ctagsPage, wxID_ANY, wxT("C++"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); + m_comboBoxLang->Append( wxT("C++") ); + m_comboBoxLang->Append( wxT("Java") ); + fgSizer2->Add( m_comboBoxLang, 0, wxALL|wxEXPAND, 5 ); + + bSizer6->Add( fgSizer2, 0, wxEXPAND, 5 ); + + m_checkFilesWithoutExt = new wxCheckBox( m_ctagsPage, wxID_ANY, wxT("Parse files without extension"), wxDefaultPosition, wxDefaultSize, 0 ); + + bSizer6->Add( m_checkFilesWithoutExt, 0, wxALL, 5 ); + + m_ctagsPage->SetSizer( bSizer6 ); + m_ctagsPage->Layout(); + bSizer6->Fit( m_ctagsPage ); + m_mainBook->AddPage( m_ctagsPage, wxT("Advance"), false ); + + mainSizer->Add( m_mainBook, 1, wxEXPAND | wxALL, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer3->Add( m_buttonCancel, 0, wxALL, 5 ); + + mainSizer->Add( bSizer3, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + InitValues(); + + ConnectButton(m_buttonOK, TagsOptionsDlg::OnButtonOK); + ConnectButton(m_buttonAdd, TagsOptionsDlg::OnButtonAdd); +} + +void TagsOptionsDlg::InitValues() +{ + //initialize the CodeLite page + m_checkParseComments->SetValue(m_data.GetFlags() & CC_PARSE_COMMENTS ? true : false); + m_checkDisplayFunctionTip->SetValue(m_data.GetFlags() & CC_DISP_FUNC_CALLTIP ? true : false); + m_checkLoadLastDB->SetValue(m_data.GetFlags() & CC_LOAD_EXT_DB ? true : false); + m_checkDisplayTypeInfo->SetValue(m_data.GetFlags() & CC_DISP_TYPE_INFO ? true : false); + m_checkDisplayComments->SetValue(m_data.GetFlags() & CC_DISP_COMMENTS ? true : false); + m_checkLoadToMemory->SetValue(m_data.GetFlags() & CC_LOAD_EXT_DB_TO_MEMORY ? true : false); + m_checkFilesWithoutExt->SetValue(m_data.GetFlags() & CC_PARSE_EXT_LESS_FILES ? true : false); + + //initialize the ctags page + wxString prep; + for(size_t i=0; iSetValue(prep); + m_textFileSpec->SetValue(m_data.GetFileSpec()); + m_comboBoxLang->Clear(); + m_comboBoxLang->Append(m_data.GetLanguages()); + wxString lan = m_data.GetLanguages().Item(0); + m_comboBoxLang->SetStringSelection(lan); +} + +void TagsOptionsDlg::OnButtonOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + CopyData(); + EndModal(wxID_OK); +} + +void TagsOptionsDlg::OnButtonAdd(wxCommandEvent &event) +{ + wxUnusedVar(event); + //pop up add option dialog + AddOptionDlg *dlg = new AddOptionDlg(this, m_textPrep->GetValue()); + if(dlg->ShowModal() == wxID_OK){ + m_textPrep->SetValue(dlg->GetValue()); + } + dlg->Destroy(); +} + +void TagsOptionsDlg::CopyData() +{ + //save data to the interal member m_data + SetFlag(CC_DISP_COMMENTS, m_checkDisplayComments->IsChecked()); + SetFlag(CC_DISP_FUNC_CALLTIP, m_checkDisplayFunctionTip->IsChecked()); + SetFlag(CC_DISP_TYPE_INFO, m_checkDisplayTypeInfo->IsChecked()); + SetFlag(CC_LOAD_EXT_DB, m_checkLoadLastDB->IsChecked()); + SetFlag(CC_PARSE_COMMENTS, m_checkParseComments->IsChecked()); + SetFlag(CC_LOAD_EXT_DB_TO_MEMORY, m_checkLoadToMemory->IsChecked()); + SetFlag(CC_PARSE_EXT_LESS_FILES, m_checkFilesWithoutExt->IsChecked()); + m_data.SetFileSpec(m_textFileSpec->GetValue()); + + + wxStringTokenizer tknz(m_textPrep->GetValue(), wxT(";")); + wxArrayString prep; + while(tknz.HasMoreTokens()){ + prep.Add(tknz.NextToken()); + } + + m_data.SetPreprocessor(prep); + m_data.SetLanguages(m_comboBoxLang->GetStrings()); + m_data.SetLanguageSelection(m_comboBoxLang->GetStringSelection()); + +} + +void TagsOptionsDlg::SetFlag(CodeCompletionOpts flag, bool set) +{ + if(set){ + m_data.SetFlags(m_data.GetFlags() | flag); + }else{ + m_data.SetFlags(m_data.GetFlags() & ~(flag)); + } +} diff --git a/LiteEditor/tags_options_dlg.h b/LiteEditor/tags_options_dlg.h new file mode 100644 index 0000000000..9d983c78a9 --- /dev/null +++ b/LiteEditor/tags_options_dlg.h @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __tags_options_dlg__ +#define __tags_options_dlg__ + +#include + +#include +#include +#include +#include +#include "serialized_object.h" +#include "wx/filename.h" +#include "tags_options_data.h" + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class TagsOptionsDlg +/////////////////////////////////////////////////////////////////////////////// +class TagsOptionsDlg : public wxDialog +{ +private: + +protected: + wxFlatNotebook* m_mainBook; + wxPanel* m_generalPage; + wxCheckBox* m_checkParseComments; + wxCheckBox* m_checkDisplayComments; + wxCheckBox* m_checkDisplayTypeInfo; + wxCheckBox* m_checkDisplayFunctionTip; + wxCheckBox* m_checkLoadLastDB; + wxCheckBox* m_checkLoadToMemory; + wxPanel* m_ctagsPage; + wxStaticText* m_staticText1; + wxTextCtrl* m_textPrep; + wxButton* m_buttonAdd; + wxStaticText* m_staticText3; + wxTextCtrl* m_textFileSpec; + wxStaticText* m_staticText5; + wxComboBox* m_comboBoxLang; + wxCheckBox* m_checkFilesWithoutExt; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + TagsOptionsData m_data; + +protected: + void SetFlag(CodeCompletionOpts flag, bool set); + + void InitValues(); + void CopyData(); + void OnButtonOK(wxCommandEvent &event); + void OnButtonAdd(wxCommandEvent &event); + +public: + TagsOptionsDlg( wxWindow* parent, + const TagsOptionsData& data, + int id = wxID_ANY, + wxString title = wxT("Tags Options"), + wxPoint pos = wxDefaultPosition, + wxSize size = wxSize(469, 362), + int style = wxDEFAULT_DIALOG_STYLE); + + TagsOptionsData &GetData() {return m_data;} +}; + +#endif //__tags_options_dlg__ diff --git a/LiteEditor/threadlistbasepanel.cpp b/LiteEditor/threadlistbasepanel.cpp new file mode 100644 index 0000000000..fbb25ccc1b --- /dev/null +++ b/LiteEditor/threadlistbasepanel.cpp @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "threadlistbasepanel.h" + +/////////////////////////////////////////////////////////////////////////// + +ThreadListBasePanel::ThreadListBasePanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES ); + mainSizer->Add( m_list, 1, wxALL|wxEXPAND, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_list->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( ThreadListBasePanel::OnItemActivated ), NULL, this ); +} diff --git a/LiteEditor/threadlistbasepanel.h b/LiteEditor/threadlistbasepanel.h new file mode 100644 index 0000000000..90cd7f3132 --- /dev/null +++ b/LiteEditor/threadlistbasepanel.h @@ -0,0 +1,42 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __threadlistbasepanel__ +#define __threadlistbasepanel__ + +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ThreadListBasePanel +/////////////////////////////////////////////////////////////////////////////// +class ThreadListBasePanel : public wxPanel +{ + private: + + protected: + wxListCtrl* m_list; + + // Virtual event handlers, overide them in your derived class + virtual void OnItemActivated( wxListEvent& event ){ event.Skip(); } + + + public: + ThreadListBasePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL ); + +}; + +#endif //__threadlistbasepanel__ diff --git a/LiteEditor/threadlistpanel.cpp b/LiteEditor/threadlistpanel.cpp new file mode 100644 index 0000000000..63ee96716b --- /dev/null +++ b/LiteEditor/threadlistpanel.cpp @@ -0,0 +1,63 @@ +#include "threadlistpanel.h" +#include "globals.h" +#include "manager.h" + +ThreadListPanel::ThreadListPanel( wxWindow* parent ) +: +ThreadListBasePanel( parent ) +{ + InitList(); +} + +void ThreadListPanel::OnItemActivated( wxListEvent& event ) +{ + long threadId(wxNOT_FOUND); + int index = event.m_itemIndex; + if(index != wxNOT_FOUND){ + wxString str_id = GetColumnText(m_list, index, 0); + str_id.ToLong(&threadId); + Manager *mgr = ManagerST::Get(); + mgr->DbgSetThread(threadId); + } +} + +void ThreadListPanel::InitList() +{ + //add two columns to the list ctrl + m_list->InsertColumn(0, wxT("Thread ID")); + m_list->InsertColumn(1, wxT("Active")); + m_list->InsertColumn(2, wxT("Information")); +} + +void ThreadListPanel::PopulateList(const ThreadEntryArray &threads) +{ + m_list->Freeze(); + m_list->DeleteAllItems(); + for(ThreadEntryArray::size_type i=0; i< threads.size(); i++){ + ThreadEntry entry = threads.at(i); + + long item; + wxListItem info; + + //insert new item (row) + info.SetColumn(0); + item = m_list->InsertItem(info); + + wxString str_id; + wxString str_active; + + str_id << entry.dbgid; + str_active = entry.active ? wxT("Yes") : wxT("No"); + + SetColumnText(m_list, item, 0, str_id); + SetColumnText(m_list, item, 1, str_active); + SetColumnText(m_list, item, 2, entry.more); + } + m_list->SetColumnWidth(2, wxLIST_AUTOSIZE); + m_list->Thaw(); +} + +void ThreadListPanel::Clear() +{ + m_list->DeleteAllItems(); +} diff --git a/LiteEditor/threadlistpanel.h b/LiteEditor/threadlistpanel.h new file mode 100644 index 0000000000..999d9900e4 --- /dev/null +++ b/LiteEditor/threadlistpanel.h @@ -0,0 +1,27 @@ +#ifndef __threadlistpanel__ +#define __threadlistpanel__ + +/** +@file +Subclass of ThreadListBasePanel, which is generated by wxFormBuilder. +*/ + +#include "threadlistbasepanel.h" +#include "debugger.h" + +/** Implementing ThreadListBasePanel */ +class ThreadListPanel : public ThreadListBasePanel +{ +protected: + // Handlers for ThreadListBasePanel events. + void OnItemActivated( wxListEvent& event ); + void InitList(); + +public: + /** Constructor */ + ThreadListPanel( wxWindow* parent ); + void PopulateList(const ThreadEntryArray &threads); + void Clear(); +}; + +#endif // __threadlistpanel__ diff --git a/LiteEditor/tiptree.cpp b/LiteEditor/tiptree.cpp new file mode 100644 index 0000000000..1eb62d9271 --- /dev/null +++ b/LiteEditor/tiptree.cpp @@ -0,0 +1,88 @@ +#include "tiptree.h" +#include "map" +#include "wx/settings.h" +#include "list" + +TipTree::TipTree(wxWindow *parent, wxWindowID id, long style) +: wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, style) +{ + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK)); +} + +TipTree::~TipTree() +{ + DeleteAllItems(); +} + +void TipTree::BuildTree(TreeNode *tree) +{ + if(!tree){ + return; + } + //Walk over the tree and construct it + Freeze(); + DeleteAllItems(); + std::map m_sortItems; + std::list< wxTreeItemId > rootChilds; + + //create the tree + wxTreeItemId root = AddRoot(tree->GetData().name); + tree->GetData().itemId = root; + TreeWalker walker(tree); + + for(; !walker.End(); walker++) + { + // Add the item to the tree + TreeNode* node = walker.GetNode(); + + // Skip root node + if(node->IsRoot()) + continue; + + wxTreeItemId parentHti = node->GetParent()->GetData().itemId; + if(parentHti.IsOk() == false){ + parentHti = root; + } + + //add the item to the tree + node->GetData().itemId = AppendItem( + parentHti, // parent + node->GetData().name, // display name + wxNOT_FOUND, // item image index + wxNOT_FOUND, // selected item image + new TipTreeData(node->GetData().name) + ); + m_sortItems[parentHti.m_pItem] = true; + if(parentHti == root){ + rootChilds.push_back(node->GetData().itemId); + } + } + SortTree(m_sortItems); + + //expand all the root direct children + std::list::iterator iter = rootChilds.begin(); + for(; iter != rootChilds.end(); iter++){ + wxTreeItemId item = (*iter); + if(item.IsOk() && ItemHasChildren(item)){ + Expand(item); + } + } + delete tree; + Thaw(); +} + +void TipTree::SortTree(std::map & nodes) +{ + std::map::iterator iter = nodes.begin(); + for(; iter != nodes.end(); iter++){ + wxTreeItemId item = iter->first; + if(item.IsOk()){ + // Does this node has children? + if( GetChildrenCount( item ) == 0 ) + continue; + SortChildren(item); + } + } +} + + diff --git a/LiteEditor/tiptree.h b/LiteEditor/tiptree.h new file mode 100644 index 0000000000..51dce28b7e --- /dev/null +++ b/LiteEditor/tiptree.h @@ -0,0 +1,28 @@ +#ifndef TIPTREE_H +#define TIPTREE_H + +#include "wx/treectrl.h" +#include "debuggerobserver.h" +#include "tree_node.h" + +class TipTreeData : public wxTreeItemData +{ + wxString m_displayString; +public: + TipTreeData(const wxString &displayStr) : m_displayString(displayStr){} + virtual ~TipTreeData(){} +}; + +class TipTree : public wxTreeCtrl +{ +protected: + void SortTree(std::map & nodes); + +public: + TipTree(wxWindow *parent, wxWindowID id, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT); + virtual ~TipTree(); + + void BuildTree(TreeNode *tree); +}; + +#endif //TIPTREE_H diff --git a/LiteEditor/tree_symbol_page.cpp b/LiteEditor/tree_symbol_page.cpp new file mode 100644 index 0000000000..646e70cade --- /dev/null +++ b/LiteEditor/tree_symbol_page.cpp @@ -0,0 +1,10 @@ +#include "tree_symbol_page.h" + +SymbolTreePage::SymbolTreePage(wxWindow *parent) +: wxPanel(parent) +{ +} + +SymbolTreePage::~SymbolTreePage() +{ +} diff --git a/LiteEditor/tree_symbol_page.h b/LiteEditor/tree_symbol_page.h new file mode 100644 index 0000000000..7a69165c82 --- /dev/null +++ b/LiteEditor/tree_symbol_page.h @@ -0,0 +1,18 @@ +#ifndef TREE_SYMBOL_PAGE_H +#define TREE_SYMBOL_PAGE_H + +#include "wx/panel.h" +#include "wx/filename.h" + +class SymbolTreePage : public wxPanel +{ + wxFileName m_fileName; +public: + SymbolTreePage(wxWindow *parent); + virtual ~SymbolTreePage(); + + //accessors + void SetFileName(const wxFileName &filename); + const wxFileName &GetFilename() const {return m_fileName;} +}; +#endif //TREE_SYMBOL_PAGE_H diff --git a/LiteEditor/windowstack.cpp b/LiteEditor/windowstack.cpp new file mode 100644 index 0000000000..8e10d40b2d --- /dev/null +++ b/LiteEditor/windowstack.cpp @@ -0,0 +1,100 @@ +#include "windowstack.h" + +WindowStack::WindowStack(wxWindow *parent, wxWindowID id) +: wxPanel(parent, id) +, m_selection(NULL) +{ + m_mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(m_mainSizer); + m_windows.clear(); +} + +WindowStack::~WindowStack() +{ + Clear(); +} + +void WindowStack::Add(wxWindow *win, const wxString &key) +{ + if(!win || key.IsEmpty()){ + return; + } + + //add the new item to the map + m_windows[key] = win; + win->Hide(); +} + +void WindowStack::Select(const wxString &key) +{ + //find the window + std::map::iterator iter = m_windows.find(key); + if(iter == m_windows.end()){ + return; + } + + wxWindow *win = iter->second; + if(!win){ + m_windows.erase(iter); + return; + } + + Freeze(); + //remove the old selection + if(m_selection){ + m_mainSizer->Detach(m_selection); + m_selection->Hide(); + } + + m_mainSizer->Add(win, 1, wxEXPAND); + win->Show(); + m_selection = win; + m_mainSizer->Layout(); + Thaw(); +} + +void WindowStack::Clear() +{ + if(m_selection){ + m_mainSizer->Detach(m_selection); + m_selection->Hide(); + } + + m_mainSizer->Layout(); + m_selection = NULL; + m_windows.clear(); +} + +void WindowStack::Delete(const wxString &key) +{ + std::map::iterator iter = m_windows.find(key); + if(iter == m_windows.end()){ + return; + } + + wxWindow *win = iter->second; + if(!win){ + return; + } + + Freeze(); + m_mainSizer->Detach(win); + m_mainSizer->Layout(); + win->Hide(); + //if the removed page was also the selection, unselect it + if(win == m_selection){ + m_selection = NULL; + } + m_windows.erase(iter); + win->Destroy(); + Thaw(); +} + +wxWindow *WindowStack::Find(const wxString &key) +{ + std::map::iterator iter = m_windows.find(key); + if(iter == m_windows.end()){ + return NULL; + } + return iter->second; +} diff --git a/LiteEditor/windowstack.h b/LiteEditor/windowstack.h new file mode 100644 index 0000000000..747c26477d --- /dev/null +++ b/LiteEditor/windowstack.h @@ -0,0 +1,26 @@ +#ifndef WINDOWSTACK_H +#define WINDOWSTACK_H + +#include "wx/panel.h" +#include "map" +#include "wx/sizer.h" + +class WindowStack : public wxPanel { + std::map m_windows; + wxBoxSizer *m_mainSizer; + wxWindow *m_selection; + +public: + WindowStack(wxWindow *parent, wxWindowID id = wxID_ANY); + virtual ~WindowStack(); + + void Add(wxWindow *win, const wxString &key); + void Select(const wxString &key); + void Clear(); + void Delete(const wxString &key); + wxWindow *Find(const wxString &key); +}; + +#endif //WINDOWSTACK_H + + diff --git a/LiteEditor/workspace_pane.cpp b/LiteEditor/workspace_pane.cpp new file mode 100644 index 0000000000..40d07a04d3 --- /dev/null +++ b/LiteEditor/workspace_pane.cpp @@ -0,0 +1,140 @@ +#include "workspace_pane.h" +#include "fileview.h" +#include "cpp_symbol_tree.h" +#include +#include "frame.h" +#include "checkdirtreectrl.h" +#include "windowstack.h" +#include "openwindowspanel.h" +#include "macros.h" +#include "fileexplorer.h" + +const wxString WorkspacePane::SYMBOL_VIEW = wxT("Outline"); +const wxString WorkspacePane::FILE_VIEW = wxT("Workspace"); +const wxString WorkspacePane::OPEN_FILES = wxT("Tabs"); +const wxString WorkspacePane::EXPLORER = wxT("Explorer"); + +extern wxImageList* CreateSymbolTreeImages(); + +WorkspacePane::WorkspacePane(wxWindow *parent, const wxString &caption) + : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(250, 400)) + , m_caption(caption) +{ + CreateGUIControls(); +} + + +WorkspacePane::~WorkspacePane() +{ + +} + +int WorkspacePane::CaptionToIndex(const wxString &caption) +{ + int i = 0; + for (; iGetPageCount(); i++) { + if (m_book->GetPageText((size_t)i) == caption) + return i; + } + return wxNOT_FOUND; +} + +void WorkspacePane::CreateGUIControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + + long style = wxFNB_BOTTOM | wxFNB_NO_X_BUTTON | wxFNB_NO_NAV_BUTTONS | wxFNB_FF2 | wxFNB_BACKGROUND_GRADIENT | wxFNB_CUSTOM_DLG | wxFNB_TABS_BORDER_SIMPLE; + m_book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); + m_book->SetCustomizeOptions(wxFNB_CUSTOM_LOCAL_DRAG | wxFNB_CUSTOM_ORIENTATION | wxFNB_CUSTOM_TAB_LOOK); + mainSizer->Add(m_book, 1, wxEXPAND | wxALL, 1); + +// m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("file_view"))); +// m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("class_view"))); +// m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("opened_windows"))); +// m_images.Add(wxXmlResource::Get()->LoadBitmap(wxT("file_explorer"))); +// m_book->SetImageList( &m_images ); + + // Add the class view tree + m_winStack = new WindowStack(m_book, wxID_ANY); + m_book->AddPage(m_winStack, WorkspacePane::SYMBOL_VIEW, false); + + wxPanel *page = new wxPanel(m_book); + wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); + page->SetSizer(sz); + + //add the workspace configuration combobox + wxArrayString choices; + m_workspaceConfig = new wxComboBox(page, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, choices, wxCB_READONLY); + m_workspaceConfig->Enable(false); + + // Connect an event to handle changes in the choice control + ConnectCombo(m_workspaceConfig, Frame::OnWorkspaceConfigChanged); + sz->Add(new wxStaticText( page, wxID_ANY, wxT("Active Configuration:")), 0, wxEXPAND| wxTOP, 5); + sz->Add(m_workspaceConfig, 0, wxEXPAND| wxTOP, 5); + + //add the fileview tab + m_fileView = new FileViewTree(page, wxID_ANY); + sz->Add(m_fileView, 1, wxEXPAND|wxTOP, 2); + + m_book->AddPage(page, WorkspacePane::FILE_VIEW, true); + + m_explorer = new FileExplorer(m_book, wxT("Explorer")); + m_book->AddPage(m_explorer, WorkspacePane::EXPLORER, false); + + m_openWindowsPane = new OpenWindowsPanel(m_book); + m_book->AddPage(m_openWindowsPane, WorkspacePane::OPEN_FILES, false); +} + +CppSymbolTree *WorkspacePane::GetTreeByFilename(const wxFileName &filename) +{ + wxWindow *win = m_winStack->Find(filename.GetFullPath()); + if (win) { + return dynamic_cast(win); + } + return NULL; +} + +void WorkspacePane::BuildSymbolTree(const wxFileName &filename) +{ + CppSymbolTree *tree = GetTreeByFilename(filename); + if (!tree) { + tree = new CppSymbolTree(m_winStack, wxID_ANY); + tree->SetSymbolsImages(CreateSymbolTreeImages()); + m_winStack->Add(tree, filename.GetFullPath()); + m_winStack->Select(filename.GetFullPath()); + } + tree->BuildTree(filename); +} + +void WorkspacePane::BuildFileTree() +{ + m_fileView->BuildTree(); +} + +SymbolTree *WorkspacePane::GetSymbolTree() +{ + int id = Frame::Get()->GetNotebook()->GetSelection(); + if (id != wxNOT_FOUND) { + LEditor *editor = dynamic_cast( Frame::Get()->GetNotebook()->GetPage((size_t)id)); + if (editor) { + return GetTreeByFilename(editor->GetFileName()); + } + } + return NULL; +} + +void WorkspacePane::DisplaySymbolTree(const wxFileName &filename) +{ + m_winStack->Select(filename.GetFullPath()); +} + +void WorkspacePane::DeleteSymbolTree(const wxFileName &filename) +{ + m_winStack->Delete(filename.GetFullPath()); +} + +void WorkspacePane::DeleteAllSymbolTrees() +{ + m_winStack->Clear(); +} diff --git a/LiteEditor/workspace_pane.h b/LiteEditor/workspace_pane.h new file mode 100644 index 0000000000..ef1b408dd0 --- /dev/null +++ b/LiteEditor/workspace_pane.h @@ -0,0 +1,67 @@ +#ifndef WORKSPACE_PANE_H +#define WORKSPACE_PANE_H + +#include "wx/panel.h" +#include "tag_tree.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "wx/filename.h" + +class FileViewTree; +class SymbolTree; +class CppSymbolTree; +class WindowStack; +class OpenWindowsPanel; +class wxComboBox; +class FileExplorer; + +class WorkspacePane : public wxPanel +{ +public: + static const wxString SYMBOL_VIEW; + static const wxString FILE_VIEW; + static const wxString OPEN_FILES; + static const wxString EXPLORER; + + wxFlatNotebook *m_book; + wxString m_caption; + FileViewTree *m_fileView; + wxFlatNotebookImageList m_images; + WindowStack *m_winStack; + OpenWindowsPanel *m_openWindowsPane; + wxComboBox *m_workspaceConfig; + FileExplorer *m_explorer; + +private: + void CreateGUIControls(); + CppSymbolTree *GetTreeByFilename(const wxFileName &filename); + +public: + WorkspacePane(wxWindow *parent, const wxString &caption); + virtual ~WorkspacePane(); + + //----------------------------------------------- + // Operations + //----------------------------------------------- + void BuildSymbolTree(const wxFileName &filename); + void BuildFileTree(); + void DisplaySymbolTree(const wxFileName &filename); + void DeleteSymbolTree(const wxFileName &filename); + void DeleteAllSymbolTrees(); + + // Return the index of the given tab by name + int CaptionToIndex(const wxString &caption); + + //----------------------------------------------- + // Setters/Getters + //----------------------------------------------- + wxFlatNotebook *GetNotebook() { return m_book; } + SymbolTree *GetSymbolTree(); + FileViewTree *GetFileViewTree() {return m_fileView;} + OpenWindowsPanel *GetOpenedWindows() {return m_openWindowsPane;} + const wxString &GetCaption() const {return m_caption;} + wxComboBox *GetConfigCombBox(){return m_workspaceConfig;} + FileExplorer *GetFileExplorer(){return m_explorer;} +}; + +#endif // WORKSPACE_PANE_H + diff --git a/MakefileParser/Makefile b/MakefileParser/Makefile new file mode 100644 index 0000000000..c27b666ef2 --- /dev/null +++ b/MakefileParser/Makefile @@ -0,0 +1,39 @@ +# Superspecial makefile by Sverre Rabbelier! + +# Maaaagic variables +cc=g++ +filesuffix= +file=variable +infix_lex=yy +infix_bison=tab +CCFLAGS=$(shell wx-config --cxxflags --debug=yes --unicode=yes) +LINKFLAGS=$(shell wx-config --libs std --debug=yes --unicode=yes) +# the rules. +$(file): main.o $(file).$(infix_bison).o $(file).$(infix_lex).o + $(cc) -g $(LINKFLAGS) -o $(file) main.o $(file).$(infix_lex).o $(file).$(infix_bison).o -lfl + +main.o: $(file).$(infix_bison).h main.cpp + $(cc) -g $(CCFLAGS) -c main.cpp -o main.o + +$(file).$(infix_bison).o: $(file).$(infix_bison).c$(filesuffix) + $(cc) -g $(CCFLAGS) -c $(file).$(infix_bison).c$(filesuffix) -o $(file).$(infix_bison).o + +$(file).$(infix_bison).h: $(file).y + bison -v -d $(file).y -o $(file).$(infix_bison).c$(filesuffix) +$(file).$(infix_bison).c$(filesuffix): $(file).y + bison -v -d $(file).y -o $(file).$(infix_bison).c$(filesuffix) + +$(file).$(infix_lex).o: $(file).$(infix_lex).c $(file).$(infix_bison).h + $(cc) -g -c $(CCFLAGS) $(file).$(infix_lex).c -o $(file).$(infix_lex).o + +$(file).$(infix_lex).c: $(file).l + flex -o $(file).$(infix_lex).c $(file).l + +install: $(file).$(infix_lex).c $(file).$(infix_bison).h $(file).$(infix_bison).c$(filesuffix) + cp $(file).$(infix_lex).c ../Plugin/$(file).$(infix_lex).cpp + cp $(file).$(infix_bison).h ../Plugin/$(file).$(infix_lex).h + cp $(file).$(infix_bison).c$(filesuffix) ../Plugin/$(file).$(infix_bison).cpp + +clean: + rm -f $(file) $(file).$(infix_lex).* $(file).$(infix_bison).* main.o variable.output + rm -f *~ diff --git a/MakefileParser/MakefileParser.workspace b/MakefileParser/MakefileParser.workspace new file mode 100644 index 0000000000..3f41236f75 --- /dev/null +++ b/MakefileParser/MakefileParser.workspace @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/MakefileParser/Parser.project b/MakefileParser/Parser.project new file mode 100644 index 0000000000..74dbaf2f37 --- /dev/null +++ b/MakefileParser/Parser.project @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + yacc -dl -t variable.y + flex -L variable.l + mv lex.yy.c variable.lex.cpp + mv y.tab.c variable.tab.cpp + mv y.tab.h variable.tab.h + + + + + + + + + + + + + + + + + diff --git a/MakefileParser/input b/MakefileParser/input new file mode 100644 index 0000000000..b0223573c0 --- /dev/null +++ b/MakefileParser/input @@ -0,0 +1,45 @@ +Lorem +Lorem ipsum ya +teset = bla +$(teset) +bla = jajaaaaja +rot hihi = okeedan +bok = rot +bla rot = lol +rot = vijf +blarot = hihi +rothihi = replaced +test = yoyo +name = eran +doeswork = fiex! +first = 1 +bsecond = 2b +bthird = 3b +yarr = pirate +forwarding = gogogo +Lorem ipsum +Ik zou wel is willen weten wat bla nou is +test een twee $(bla) drie vier $(bok) vijf zes zeven acht +test $($(bok) $(bla$(bok))) twee drie +a = een +b = twee +c = drie +d = vier +eentweedrievier = bijna gelukt +een twee drie vier = gelukt +$($(a) $(b) $(c) $(d)) +I say $(test) tataa +bla = sex +lol = haha +Hatste flats van te meen +hohum=$(bla) +$(yarr) +$(yarr shiver me timbers je $(weet wel toch ja nee ) hearties yoho) +the power of $(forwarding) is yet unknown +to most $(name) here. +Now see if $(doeswork) yes +^^-- +$(first) +asecond $(bsecond) +athird $(bthird) cthird +first second third fourth fifth diff --git a/MakefileParser/main.cpp b/MakefileParser/main.cpp new file mode 100644 index 0000000000..3d2d8bfca3 --- /dev/null +++ b/MakefileParser/main.cpp @@ -0,0 +1,85 @@ +#include "variable.tab.h" +#include +#include +#include +#include +#include +#include +#include + +void initLexer(const char *filename); + +//std::string yyparse(); +YYSTYPE yyparse(); + +typedef wxArrayString Strings; +typedef std::map tokens; +typedef tokens::iterator Itokens; + +Strings TheOutput; +Strings TheUnmatched; +Strings TheError; +tokens TheTokens; + + +int main(int argv, char* argc[]) +{ + bool good = wxInitialize(); + if(!good) + { + printf("wx could not be initialized, aborting.\n"); + exit(-1); + } + else + { + printf("wx initialized succesfully!\n"); + wxFFileOutputStream MYoutput( stderr ); + wxTextOutputStream MYcout( MYoutput ); + wxString string = wxT(" a test yo "); + MYcout << wxT("Before: '") << string << wxT("'\n"); + string = string.Trim(true); + MYcout << wxT("AfterT: '") << string << wxT("'\n"); + string = string.Trim(false); + MYcout << wxT("AfterF: '") << string << wxT("'\n"); + } +#if 1 + if(argv>1) + { + initLexer(argc[1]); + } + else + { + initLexer("input"); + } + + yyparse(); + + printf("============= RESULT =============\n"); + for(int i = 0; i < TheOutput.size(); i++) + { + printf("%s\n", TheOutput[i].c_str()); + } + + printf("============ UNMATCHED ===========\n"); + for(int i = 0; i < TheUnmatched.size(); i++) + { + printf("%s\n", TheUnmatched[i].c_str()); + } + + printf("============== ERROR =============\n"); + for(int i = 0; i < TheError.size(); i++) + { + printf("%s\n", TheError[i].c_str()); + } + + printf("============= TOKENS =============\n"); + for(Itokens it = TheTokens.begin(); it != TheTokens.end(); it++) + { + printf("'%s'='%s'\n", it->first.c_str(), it->second.c_str()); + } + + printf("=============== DONE =============\n"); + wxUninitialize(); + return 0; +#endif +} diff --git a/MakefileParser/variable.l b/MakefileParser/variable.l new file mode 100644 index 0000000000..9bb0aa0e8e --- /dev/null +++ b/MakefileParser/variable.l @@ -0,0 +1,68 @@ +%{ +#include + +#define YYSTYPE wxString +extern wxString yylval; + +#include "variable.tab.h" +#define YY_NO_UNISTD_H 1 +#undef YY_NO_INPUT +int lineno = 0; +%} + +word [0-9a-zA-Z_.\-+\*~:\\@&/|%\<\>,\'^ \t]+ + +%% + +"#" { + register int c; + #ifdef __cplusplus + while((c = yyinput()) != '\n' && c != EOF){ + ; + } + #else + while((c = input()) != '\n' && c != EOF){ + ; + } + #endif + } + +":=" {return ASSIGN; } +"=" {return '='; } +"$" {return '$'; } +"(" {return '('; } +")" {return ')'; } +"PRINT" {return PRINT; } +"\n" { + lineno++; + return '\n'; + } +{word} { + yylval.Printf(wxT("%s"),yytext); + return WORD; + } +. { + //printf("?> '%s'\n", yytext); + } + +%% + + +void initLexer(const char *fileName) +{ + FILE *file = fopen(fileName, "r"); + if(!file) + { + printf("failed loading file 'test.h'\n"); + exit(-1); + } + + //set the file to be our buffer + YY_BUFFER_STATE buffState = yy_create_buffer(file, YY_BUF_SIZE); + yy_switch_to_buffer(buffState); +} + +int yywrap() +{ + return 1; +} diff --git a/MakefileParser/variable.tab.h b/MakefileParser/variable.tab.h new file mode 100644 index 0000000000..b68bf710bc --- /dev/null +++ b/MakefileParser/variable.tab.h @@ -0,0 +1,63 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + WORD = 258, + ASSIGN = 259, + PRINT = 260 + }; +#endif +/* Tokens. */ +#define WORD 258 +#define ASSIGN 259 +#define PRINT 260 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + diff --git a/MakefileParser/variable.y b/MakefileParser/variable.y new file mode 100644 index 0000000000..2d20bc77b9 --- /dev/null +++ b/MakefileParser/variable.y @@ -0,0 +1,170 @@ +%{ +/**** Includes and Defines *****************************/ +#include +#include +#include +#include +#include +#include +#include +#include + +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ +#define YYSTYPE wxString + + +typedef wxArrayString Strings; +typedef std::map tokens; +typedef tokens::iterator Itokens; + +extern Strings TheOutput; +extern Strings TheUnmatched; +extern Strings TheError; +extern tokens TheTokens; +extern int lineno; + +bool append = false; +int yylex(void); +void TrimString(wxString &string) +{ + bool good = wxInitialize(); + if(!good) + { + printf("wx could not be initialized, aborting.\n"); + exit(-1); + } + else + { + printf("wx initialized succesfully!\n"); + wxFFileOutputStream MYoutput( stderr ); + wxTextOutputStream MYcout( MYoutput ); + wxString string = wxT(" a test yo "); + MYcout << wxT("Before: '") << string << wxT("'\n"); + string = string.Trim(true); + MYcout << wxT("AfterT: '") << string << wxT("'\n"); + string = string.Trim(false); + MYcout << wxT("AfterF: '") << string << wxT("'\n"); + } + wxUninitialize(); +} + +void yyerror(char* string) +{ +// printf("parser error: %s\n", string); +} + +/*************** Standard variable.y: continues here *********************/ +%} + +/* Keywords */ +%token WORD +%token ASSIGN +%token PRINT + +/* Start of grammar */ +%% +input: /* empty */ + | input line { /* Do Nothing */ } +; + +line: '\n' { /* Do Nothing */ } + | optwords vars_line '\n' { TheOutput.push_back($1+$2); } + | wordsline '\n' { TheOutput.push_back($1); } + | assgnline '\n' { /* Do Nothing */ } + | printline '\n' { /* Do Nothing */ } + | error '\n' { + YYSTYPE msg; + msg << wxT("Line ") << lineno << wxT(": Unexpected token '") << yylval << wxT("'."); + TheError.push_back(msg); + yyerrok; + } +; + +open: '$' '(' { /* do nothing */ } + +name: wordvars { $$ = $1; } + +close: ')' { /* do nothing */ } + +variable: open name close { + wxString token = $2; + TrimString(token); + + if(TheTokens[token].size() > 0) + { + $$ = TheTokens[token]; + } + else + { + TheUnmatched.push_back(token); + $$ = wxEmptyString; + } + } + +words: WORD { $$ = $1; } + | words WORD { $$ = $1 + $2; } +; + +optwords: { $$ = wxEmptyString; } + | words { $$ = $1; } +; + +optvars: { $$ = wxEmptyString; } + | wordvars { $$ = $1; } +; + + +vars_line: variable optwords { $$ = $1 + $2; } + | vars_line variable optwords { $$ = $1 + $2 + $3; } +; + +wordsline: words { $$ = $1; } + +assignm: ASSIGN { append = true; } + | '=' { append = false; } +; + +assgnline: words assignm optvars { + wxString name = $1; + wxString value = $3; + TrimString(name); + TrimString(value); + + if(append) + { + TheTokens[name] += value; + } + else + { + TheTokens[name] = value; + } + $$ = name + wxT("=") + value; + } + +printline: PRINT { + YYSTYPE result = wxT("Tokens: \n"); + for(Itokens it = TheTokens.begin(); it != TheTokens.end(); it++) + { + result += wxT("'") + it->first + wxT("'='") + it->second + wxT("'\n"); + } + result += wxT("Done."); + $$ = result; + } + +wordvars: WORD { $$ = $1; } + | variable { $$ = $1; } + | wordvars variable { $$ = $1 + $2; } + | wordvars WORD { $$ = $1 + $2; } +; +%% +/* End of grammar */ + + + + + + + + + + diff --git a/Plugin/LineTypes.h b/Plugin/LineTypes.h new file mode 100644 index 0000000000..baa32afa08 --- /dev/null +++ b/Plugin/LineTypes.h @@ -0,0 +1,37 @@ +#ifndef LINETYPES_H_INCLUDED +#define LINETYPES_H_INCLUDED + +#include "wx/string.h" +#include + +namespace LINETYPES +{ + /** + * Different line types known. + */ + enum LineType + { + LINE_EMPTY, // zero line, or whitespace / tabs only + LINE_TARGET, // target: object.o '\' + LINE_DEPEND, // bla \ bla + LINE_ACTION, // gcc -c ... + LINE_COMMENT, // # ... + LINE_COMMAND, // makefile command + LINE_INVALID, // No clue + }; + + /** + * The 'type' names of what type 'line' is. + */ + struct TypedString + { + LineType type; + wxString line; + }; + +}; + +typedef struct LINETYPES::TypedString TypedString; +typedef std::vector TypedStrings; + +#endif // LINETYPES_H_INCLUDED diff --git a/Plugin/MakefileParser.cpp b/Plugin/MakefileParser.cpp new file mode 100644 index 0000000000..8da9ac0b8b --- /dev/null +++ b/Plugin/MakefileParser.cpp @@ -0,0 +1,93 @@ +#include "MakefileParser.h" +#include "LineTypes.h" + +MakefileParser::MakefileParser(wxArrayString lines) : +m_lines(lines), +m_current(0) +{ + Lex(); +} + +/** + * Parse all the strings and find their type. + * Could be replaced by a tool such as Lexx + */ +void MakefileParser::Lex() +{ + for (; m_current < m_lines.size(); m_current++) + { + wxString current = m_lines[m_current]; + + LINETYPES::LineType currentType = Deduct(); + + /*info(type); + printf(" line\t: %s\n", it->c_str());*/ + + LINETYPES::TypedString addme; + addme.line = current; + addme.type = currentType; + + m_result.push_back(addme); + + // Ugly solution, this way we don't support the following: + // blabla "this is a # sign " dum + m_continued = (current.size() > 0) && (current[current.size()-1] == '\\') && (current.find('#') == (size_t)-1); + } + +} + +/** + * Deduct from the current line, and wether the last line ended in a '\', what kind of line this is. + * Could be replaced by a tool like Lexx + */ +LINETYPES::LineType MakefileParser::Deduct() +{ + wxString current = m_lines[m_current]; + + if(current.size() == 0) + return LINETYPES::LINE_EMPTY; + + int colon = (int)current.find(':'); + int tab = (int)current.find('\t'); + int pound = (int)current.find('#'); + + if(pound == 0) + return LINETYPES::LINE_COMMENT; + + bool empty = true; + + if(current.find_first_not_of(wxT("\n\r\t ")) != (size_t)-1) + { + empty = false; + } + + if(empty) + return LINETYPES::LINE_EMPTY; + + if(tab == 0) + { + if(m_continued) + return LINETYPES::LINE_DEPEND; + else + return LINETYPES::LINE_ACTION; + } + + if(isalpha(current[0])) // could be a target + { + if(colon != -1) + return LINETYPES::LINE_TARGET; + + return LINETYPES::LINE_COMMAND; + + } + + return LINETYPES::LINE_INVALID; +} + +/** + * Get result, constructor ensures that m_result is available when we get to this point. + */ +TypedStrings MakefileParser::getResult() +{ + return m_result; +} diff --git a/Plugin/MakefileParser.h b/Plugin/MakefileParser.h new file mode 100644 index 0000000000..70670a9aa7 --- /dev/null +++ b/Plugin/MakefileParser.h @@ -0,0 +1,36 @@ +#ifndef MAKEFILEPARSER_H_INCLUDED +#define MAKEFILEPARSER_H_INCLUDED + +#include "LineTypes.h" + +#include "wx/string.h" +#include "wx/arrstr.h" + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif // WXDLLIMPEXP_LE_SDK + +class WXDLLIMPEXP_LE_SDK MakefileParser +{ + public: + MakefileParser(wxArrayString lines); + TypedStrings getResult(); + + private: + void Lex(); + LINETYPES::LineType Deduct(); + + wxArrayString m_lines; + TypedStrings m_result; + + size_t m_current; + bool m_continued; +}; + +#endif // MAKEFILEPARSER_H_INCLUDED diff --git a/Plugin/Plugin.vcproj b/Plugin/Plugin.vcproj new file mode 100644 index 0000000000..81c216d246 --- /dev/null +++ b/Plugin/Plugin.vcproj @@ -0,0 +1,499 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugin/Target.cpp b/Plugin/Target.cpp new file mode 100644 index 0000000000..40c97a9146 --- /dev/null +++ b/Plugin/Target.cpp @@ -0,0 +1,76 @@ +#include "Target.h" + +#include "wx/string.h" +#include "wx/arrstr.h" +#include "tokenizer.h" + +Target::Target(wxString name, wxArrayString deps, wxArrayString actions) : +m_name(name), +m_deps(deps), +m_actions(actions) +{ + stripWhitespace(); + splitDepencencies(); +} + +void Target::stripWhitespace() +{ + for(size_t i = 0; i < m_deps.size(); i++) + { + wxString* dep = &m_deps[i]; + + size_t to = dep->find_first_not_of(wxT("\n\r\t ")); + if(to != (size_t)-1) + dep->erase(0, to); + + size_t from = dep->find_last_not_of(wxT("\\\t\n\r "))+1; + if(from != (size_t)-1) + dep->erase(from); + } + + for(size_t i = 0; i < m_actions.size(); i++) + { + wxString* action = &m_actions[i]; + + size_t to = action->find_first_not_of(wxT("\n\r\t ")); + if(to != (size_t)-1) + action->erase(0, to); + + size_t from = action->find_last_not_of(wxT("\\\t\n\r "))+1; + if(from != (size_t)-1) + action->erase(from); + } +} + +void Target::splitDepencencies() +{ + wxArrayString deps; + for(size_t i = 0; i < m_deps.size(); i++) + { + m_deps[i].Replace(wxT("\t"),wxT(" ")); // just replace all tabs by spaces + StringTokenizer tokenizer(m_deps[i]); // tokenize at spaces + for(int j = 0; j < tokenizer.Count(); j++) + { + deps.push_back(tokenizer[j]); + } + m_deps[i].Clear(); + } + m_deps.Clear(); + + m_deps = deps; +} + +wxString Target::getName() +{ + return m_name; +} + +wxArrayString Target::getDeps() +{ + return m_deps; +} + +wxArrayString Target::getActions() +{ + return m_actions; +} diff --git a/Plugin/Target.h b/Plugin/Target.h new file mode 100644 index 0000000000..b694503abe --- /dev/null +++ b/Plugin/Target.h @@ -0,0 +1,39 @@ +#ifndef TARGET_H_INCLUDED +#define TARGET_H_INCLUDED + +#include "wx/string.h" +#include "wx/arrstr.h" + +#include + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif // WXDLLIMPEXP_LE_SDK + +class WXDLLIMPEXP_LE_SDK Target +{ + public: + Target(wxString name, wxArrayString deps, wxArrayString actions); + void stripWhitespace(); + void splitDepencencies(); + + wxString getName(); + wxArrayString getDeps(); + wxArrayString getActions(); + + private: + + wxString m_name; + wxArrayString m_deps; + wxArrayString m_actions; +}; + +typedef std::vector Targets; + +#endif // TARGET_H_INCLUDED diff --git a/Plugin/TargetLexer.cpp b/Plugin/TargetLexer.cpp new file mode 100644 index 0000000000..eb833375c4 --- /dev/null +++ b/Plugin/TargetLexer.cpp @@ -0,0 +1,133 @@ +#include "TargetLexer.h" +#include "Target.h" + +TargetLexer::TargetLexer(TypedStrings lines) : +m_lines(lines), +m_current(0) +{ + Lex(); +} + +void TargetLexer::Lex() +{ + for(int i = 0; FindTarget(); i++) + { + wxString nameanddep = m_lines[m_current].line; // target: test.o + size_t to = nameanddep.find(':'); + + if(to == (size_t)-1) + { + printf("Found a target but no colon in it."); + exit(-1); + } + + wxString name = nameanddep.substr(0, to); + wxString firstdep = nameanddep.substr(to+1); + wxArrayString deps; + + if(firstdep.size() > 0) + { + deps.push_back(firstdep); + } + + m_current++; + + while(FindDeps()) + { + wxString dep = m_lines[m_current].line; + deps.push_back(dep); + m_current++; + } + + wxArrayString actions; + while(FindActions()) + { + wxString action = m_lines[m_current].line; + actions.push_back(action); + m_current++; + } + + Target targ(name, deps, actions); + m_result.push_back(targ); + } + +} + +bool TargetLexer::FindTarget() +{ + for(; m_current < m_lines.size(); m_current++) + { + TypedString current = m_lines[m_current]; + + // this is the first one of this batch, untill we get a target, skip the rest + // Note: it SHOULD be just comments and empty lines + if(current.type != LINETYPES::LINE_TARGET) + continue; + + return true; + } + return false; +} + +bool TargetLexer::FindDeps() +{ + for(; m_current < m_lines.size(); m_current++) + { + TypedString current = m_lines[m_current]; + + if(current.type == LINETYPES::LINE_INVALID) + { + printf("Invalid line found?!"); + exit(-1); + } + + if(current.type == LINETYPES::LINE_DEPEND) + return true; + + if(current.type == LINETYPES::LINE_COMMAND) + continue; + + if(current.type == LINETYPES::LINE_COMMENT) + continue; + + if(current.type == LINETYPES::LINE_EMPTY) + continue; + + return false; + } + return false; +} + +bool TargetLexer::FindActions() +{ + for(; m_current < m_lines.size(); m_current++) + { + TypedString current = m_lines[m_current]; + + if(current.type == LINETYPES::LINE_INVALID) + { + printf("Invalid line found?!"); + exit(-1); + } + + if(current.type == LINETYPES::LINE_ACTION) + return true; + + if(current.type == LINETYPES::LINE_COMMAND) + continue; + + if(current.type == LINETYPES::LINE_COMMENT) + continue; + + if(current.type == LINETYPES::LINE_EMPTY) + continue; + + return false; + } + return false; +} + +Targets TargetLexer::getResult() +{ + return m_result; +} diff --git a/Plugin/TargetLexer.h b/Plugin/TargetLexer.h new file mode 100644 index 0000000000..54799416f8 --- /dev/null +++ b/Plugin/TargetLexer.h @@ -0,0 +1,36 @@ +#ifndef TARGETLEXER_H_INCLUDED +#define TARGETLEXER_H_INCLUDED + +#include "LineTypes.h" +#include "Target.h" + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif // WXDLLIMPEXP_LE_SDK + +class WXDLLIMPEXP_LE_SDK TargetLexer +{ + public: + TargetLexer(TypedStrings lines); + + void Lex(); + bool FindTarget(); // Is there another target in the makefile? + bool FindDeps(); // Are there more dependencies for this target? + bool FindActions(); // Are there more actions for this target? + + Targets getResult(); + + private: + TypedStrings m_lines; + size_t m_current; + + Targets m_result; +}; + +#endif // TARGETLEXER_H_INCLUDED diff --git a/Plugin/VariableLexer.cpp b/Plugin/VariableLexer.cpp new file mode 100644 index 0000000000..b95c9c9937 --- /dev/null +++ b/Plugin/VariableLexer.cpp @@ -0,0 +1,46 @@ +#include "variable.tab.h" +#include "VariableLexer.h" +#include +#include +#include +//#include // wxMessageBox +#include +#include + +void initLexer(const char *filename); + +YYSTYPE yyparse(); + +typedef wxArrayString Strings; +typedef std::map Tokens; +typedef Tokens::iterator Itokens; + +Strings TheOutput; +Strings TheUnmatched; +Strings TheError; +Tokens TheTokens; + +void VariableLexer::DebugMessage(const wxString& msg) +{ + wxUnusedVar(msg); +} + +VariableLexer::VariableLexer(wxString path) +{ + initLexer(path.mb_str()); + yyparse(); + + m_output = TheOutput; + m_unmatched = TheUnmatched; + m_error = TheError; + m_tokens = TheTokens; +} + +/** + * Get result, constructor ensures that m_result is available when we get to this point. + */ +wxArrayString VariableLexer::getResult() +{ + return m_output; +} + diff --git a/Plugin/VariableLexer.h b/Plugin/VariableLexer.h new file mode 100644 index 0000000000..9239c268e9 --- /dev/null +++ b/Plugin/VariableLexer.h @@ -0,0 +1,35 @@ +#ifndef VARIABLELEXER_H_INCLUDED +#define VARIABLELEXER_H_INCLUDED + +#include "wx/string.h" +#include "wx/arrstr.h" + +#include +//#include + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif // WXDLLIMPEXP_LE_SDK + + +class WXDLLIMPEXP_LE_SDK VariableLexer +{ + public: + VariableLexer(wxString path); + wxArrayString getResult(); + void DebugMessage(const wxString& msg); + + private: + wxArrayString m_output; + wxArrayString m_unmatched; + wxArrayString m_error; + std::map m_tokens; +}; + +#endif // VARIABLELEXER_H_INCLUDED diff --git a/Plugin/async_executable_cmd.cpp b/Plugin/async_executable_cmd.cpp new file mode 100644 index 0000000000..1cb1cf4b05 --- /dev/null +++ b/Plugin/async_executable_cmd.cpp @@ -0,0 +1,167 @@ +#include "async_executable_cmd.h" +#include "wx/tokenzr.h" + +DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_ADDLINE) +DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_STARTED) +DEFINE_EVENT_TYPE(wxEVT_ASYNC_PROC_ENDED) + +static int AsyncExeTimerID = wxNewId(); + +BEGIN_EVENT_TABLE(AsyncExeCmd, wxEvtHandler) + EVT_TIMER(AsyncExeTimerID, AsyncExeCmd::OnTimer) +END_EVENT_TABLE() + +AsyncExeCmd::AsyncExeCmd(wxEvtHandler *owner) + : m_proc(NULL) + , m_owner(owner) + , m_busy(false) + , m_stop(false) +{ + m_timer = new wxTimer(this, AsyncExeTimerID); +} + +AsyncExeCmd::~AsyncExeCmd() +{ + delete m_timer; + m_timer = NULL; + + if (m_proc) { + delete m_proc; + m_proc = NULL; + } +}; + +void AsyncExeCmd::AppendLine(const wxString &line) +{ + if ( !m_owner) + return; + + wxCommandEvent event(wxEVT_ASYNC_PROC_ADDLINE); + event.SetEventObject(this); + event.SetString(line); + m_owner->ProcessEvent(event); +} + +void AsyncExeCmd::Stop() +{ + m_stop = true; + //kill the build process + if (m_proc) { + m_proc->Terminate(); + } +} + +void AsyncExeCmd::SendStartMsg() +{ + if ( !m_owner) + return; + + wxCommandEvent event(wxEVT_ASYNC_PROC_STARTED); + event.SetEventObject(this); + + wxString msg; + msg << wxT("Current working directory: ") << wxGetCwd() << wxT("\n"); + msg << wxT("Running program: ") << m_cmdLine << wxT("\n"); + event.SetString(msg); + m_owner->ProcessEvent(event); +} + +void AsyncExeCmd::SendEndMsg(int exitCode) +{ + if ( !m_owner) + return; + + wxCommandEvent event(wxEVT_ASYNC_PROC_ENDED); + event.SetEventObject(this); + wxString message(wxT("Program exited with return code: ")); + message << exitCode << wxT("\n"); + event.SetString(message); + m_owner->ProcessEvent(event); +} + +void AsyncExeCmd::OnTimer(wxTimerEvent &event) +{ + wxUnusedVar(event); + if ( m_stop ) { + m_proc->Terminate(); + return; + } + PrintOutput(); +} + +void AsyncExeCmd::PrintOutput() +{ + if (m_proc->GetRedirect()) { + wxString data, errors; + m_proc->HasInput(data, errors); + DoPrintOutput(data, errors); + } +} + +void AsyncExeCmd::DoPrintOutput(const wxString &out, const wxString &err) +{ + if (!out.IsEmpty()) { + wxStringTokenizer tt(out, wxT("\n")); + while (tt.HasMoreTokens()) { + AppendLine(tt.NextToken() + wxT("\n")); + } + } + + if (!err.IsEmpty()) { + wxStringTokenizer tt(err, wxT("\n")); + while (tt.HasMoreTokens()) { + AppendLine(tt.NextToken() + wxT("\n")); + } + } +} + +void AsyncExeCmd::ProcessEnd(wxProcessEvent& event) +{ + //read all input before stopping the timer + if ( !m_stop ) { + if (m_proc->GetRedirect()) { + wxString err; + wxString out; + m_proc->ReadAll(out, err); + DoPrintOutput(out, err); + out.Empty(); + err.Empty(); + } + } + + //stop the timer if needed + if(m_proc->GetRedirect()){ + m_timer->Stop(); + } + + m_busy = false; + m_stop = false; + + SendEndMsg(event.GetExitCode()); +} + +void AsyncExeCmd::Execute(const wxString &cmdLine, bool hide, bool redirect) +{ + m_cmdLine = cmdLine; + SetBusy(true); + SendStartMsg(); + + m_proc = new clProcess(wxNewId(), m_cmdLine, redirect); + if (m_proc) { + if (m_proc->Start(hide) == 0) { + delete m_proc; + m_proc = NULL; + SetBusy(false); + } else { + //process started successfully, start timer if needed + if(m_proc->GetRedirect()){ + m_timer->Start(10); + } + } + } +} + +void AsyncExeCmd::Terminate() +{ + m_proc->Terminate(); +} diff --git a/Plugin/async_executable_cmd.h b/Plugin/async_executable_cmd.h new file mode 100644 index 0000000000..f1bc2d4e34 --- /dev/null +++ b/Plugin/async_executable_cmd.h @@ -0,0 +1,66 @@ +#ifndef ASYNC_EXECUTABLE_CMD_H +#define ASYNC_EXECUTABLE_CMD_H + +#include "wx/event.h" +#include "cl_process.h" +#include "wx/timer.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_ASYNC_PROC_ADDLINE, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_ASYNC_PROC_STARTED, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_ASYNC_PROC_ENDED, wxID_ANY) + + + +class WXDLLIMPEXP_LE_SDK AsyncExeCmd : public wxEvtHandler { +protected: + clProcess *m_proc; + wxEvtHandler *m_owner; + wxTimer *m_timer; + bool m_busy; + bool m_stop; + wxString m_cmdLine; + +protected: + virtual void OnTimer(wxTimerEvent &event); + virtual void PrintOutput(); + virtual void DoPrintOutput(const wxString &out, const wxString &err); + +public: + bool IsBusy() const { return m_busy; } + void SetBusy(bool busy) { m_busy = busy; } + void Stop(); + void ProcessEnd(wxProcessEvent& event); + clProcess *GetProcess() { return m_proc; } + +public: + //construct a compiler action + // \param owner the window owner for this action + AsyncExeCmd(wxEvtHandler *owner) ; + + virtual ~AsyncExeCmd(); + virtual void Execute(const wxString &cmdLine, bool hide = true, bool redirect = true); + + wxOutputStream *GetOutputStream() { + if(m_proc){ + return m_proc->GetOutputStream(); + } + return NULL; + } + + void AppendLine(const wxString &line); + void SendStartMsg(); + void SendEndMsg(int exitCode); + void Terminate(); + DECLARE_EVENT_TABLE() +}; + +#endif // ASYNC_EXECUTABLE_CMD_H + diff --git a/Plugin/attribute_style.h b/Plugin/attribute_style.h new file mode 100644 index 0000000000..7d60d9e318 --- /dev/null +++ b/Plugin/attribute_style.h @@ -0,0 +1,83 @@ +#ifndef ATTRIBUTE_STYLE_H +#define ATTRIBUTE_STYLE_H + +#include "wx/string.h" +#include "list" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK StyleProperty +{ + int m_id; + wxString m_fgColour; + wxString m_bgColour; + long m_fontSize; + wxString m_name; + wxString m_faceName; + bool m_bold; + +public: + StyleProperty(int id, const wxString& fgColour, const wxString& bgColour, const int fontSize, const wxString& name, const wxString& face, bool bold) + : m_id(id) + , m_fgColour(fgColour) + , m_bgColour(bgColour) + , m_fontSize(fontSize) + , m_name(name) + , m_faceName(face) + , m_bold(bold) + { + }; + + StyleProperty() + : m_id(0) + , m_fgColour(_T("BLACK")) + , m_bgColour(_T("WHITE")) + , m_fontSize(10) + , m_name(wxEmptyString) + , m_faceName(_T("Courier")) + , m_bold(false) + { + }; + + StyleProperty(const StyleProperty& rhs) + { + *this = rhs; + }; + + StyleProperty& operator=(const StyleProperty& rhs){ + m_fgColour = rhs.m_fgColour; + m_bgColour = rhs.m_bgColour; + m_faceName = rhs.m_faceName; + m_bold = rhs.m_bold; + m_fontSize = rhs.m_fontSize; + m_name = rhs.m_name; + m_id = rhs.m_id; + return *this; + } + + virtual ~StyleProperty(){} + + const wxString& GetFgColour() const { return m_fgColour; } + const wxString& GetBgColour() const { return m_bgColour; } + const long GetFontSize() const { return m_fontSize; } + const wxString& GetFaceName() const { return m_faceName; } + bool IsBold() const { return m_bold; } + const wxString& GetName() const { return m_name; } + int GetId() const { return m_id; } + + void SetBgColour(const wxString& colour) { m_bgColour = colour; } + void SetFgColour(const wxString& colour) { m_fgColour = colour; } + void SetFontSize(long size) { m_fontSize = size; } + void SetFaceName(const wxString& face){ m_faceName = face; } + void SetBold(bool bold) { m_bold = bold; } + void SetId(int id){m_id = id;} +}; + +typedef std::list StylePropertyList; +#endif diff --git a/Plugin/build_config.cpp b/Plugin/build_config.cpp new file mode 100644 index 0000000000..910360a2a6 --- /dev/null +++ b/Plugin/build_config.cpp @@ -0,0 +1,353 @@ +#include "build_config.h" +#include "xmlutils.h" +#include "wx/tokenzr.h" +#include "macros.h" +#include "project.h" +#include "editor_config.h" +#include "build_settings_config.h" +#include "debuggermanager.h" + +BuildConfig::BuildConfig(wxXmlNode *node) +{ + if( node ){ + m_name = XmlUtils::ReadString(node, wxT("Name")); + m_compilerType = XmlUtils::ReadString(node, wxT("CompilerType")); + m_debuggerType = XmlUtils::ReadString(node, wxT("DebuggerType")); + wxXmlNode *compile = XmlUtils::FindFirstByTagName(node, wxT("Compiler")); + + // read the compile options + if(compile){ + m_compilerRequired = XmlUtils::ReadBool(compile, wxT("Required"), true); + m_compileOptions = XmlUtils::ReadString(compile, wxT("Options")); + wxXmlNode *child = compile->GetChildren(); + while(child) { + if(child->GetName() == wxT("IncludePath")){ + m_includePath.Add(XmlUtils::ReadString(child, wxT("Value"))); + } else if(child->GetName() == wxT("Preprocessor")){ + m_preprocessor.Add(XmlUtils::ReadString(child, wxT("Value"))); + } + child = child->GetNext(); + } + } + + wxXmlNode *linker = XmlUtils::FindFirstByTagName(node, wxT("Linker")); + // read the linker options + if(linker){ + m_linkerRequired = XmlUtils::ReadBool(linker, wxT("Required"), true); + m_linkOptions = XmlUtils::ReadString(linker, wxT("Options")); + wxXmlNode *child = linker->GetChildren(); + while(child) { + if(child->GetName() == wxT("Library")){ + m_libs.Add(XmlUtils::ReadString(child, wxT("Value"))); + } else if(child->GetName() == wxT("LibraryPath")){ + m_libPath.Add(XmlUtils::ReadString(child, wxT("Value"))); + } + child = child->GetNext(); + } + } + + // read the resource compile options + wxXmlNode *resCmp = XmlUtils::FindFirstByTagName(node, wxT("ResourceCompiler")); + if(resCmp){ + m_isResCmpNeeded = XmlUtils::ReadBool(resCmp, wxT("Required"), true); + m_resCompileOptions = XmlUtils::ReadString(resCmp, wxT("Options")); + wxXmlNode *child = resCmp->GetChildren(); + while(child) { + if(child->GetName() == wxT("IncludePath")){ + m_resCmpIncludePath << XmlUtils::ReadString(child, wxT("Value")) << wxT(";"); + } + child = child->GetNext(); + } + } + + // read the prebuild commands + wxXmlNode *preBuild = XmlUtils::FindFirstByTagName(node, wxT("PreBuild")); + if(preBuild){ + wxXmlNode *child = preBuild->GetChildren(); + while(child) { + if(child->GetName() == wxT("Command")){ + bool enabled = XmlUtils::ReadBool(child, wxT("Enabled")); + + BuildCommand cmd(child->GetNodeContent(), enabled); + m_preBuildCommands.push_back(cmd); + } + child = child->GetNext(); + } + } + // read the postbuild commands + wxXmlNode *postBuild = XmlUtils::FindFirstByTagName(node, wxT("PostBuild")); + if(postBuild){ + wxXmlNode *child = postBuild->GetChildren(); + while(child) { + if(child->GetName() == wxT("Command")){ + bool enabled = XmlUtils::ReadBool(child, wxT("Enabled")); + BuildCommand cmd(child->GetNodeContent(), enabled); + m_postBuildCommands.push_back(cmd); + } + child = child->GetNext(); + } + } + + wxXmlNode *customBuild = XmlUtils::FindFirstByTagName(node, wxT("CustomBuild")); + if(customBuild){ + m_enableCustomBuild = XmlUtils::ReadBool(customBuild, wxT("Enabled"), false); + wxXmlNode *child = customBuild->GetChildren(); + while(child) { + if(child->GetName() == wxT("BuildCommand")){ + m_customBuildCmd = child->GetNodeContent(); + }else if(child->GetName() == wxT("CleanCommand")){ + m_customCleanCmd = child->GetNodeContent(); + } + child = child->GetNext(); + } + }else{ + m_enableCustomBuild = false; + } + + wxXmlNode *customPreBuild = XmlUtils::FindFirstByTagName(node, wxT("AdditionalRules")); + if(customPreBuild){ + wxXmlNode *child = customPreBuild->GetChildren(); + while(child) { + if(child->GetName() == wxT("CustomPreBuild")){ + m_customPreBuildRule = child->GetNodeContent(); + }else if(child->GetName() == wxT("CustomPostBuild")){ + m_customPostBuildRule = child->GetNodeContent(); + } + child = child->GetNext(); + } + } + + wxXmlNode *general = XmlUtils::FindFirstByTagName(node, wxT("General")); + if(general){ + m_outputFile = XmlUtils::ReadString(general, wxT("OutputFile")); + m_intermediateDirectory = XmlUtils::ReadString(general, wxT("IntermediateDirectory"), wxT(".")); + m_command = XmlUtils::ReadString(general, wxT("Command")); + m_commandArguments = XmlUtils::ReadString(general, wxT("CommandArguments")); + m_workingDirectory = XmlUtils::ReadString(general, wxT("WorkingDirectory"), wxT(".")); + } + + }else{ + //create default project settings + m_name = wxT("Debug"); + m_compilerRequired = true; + m_includePath.Add(wxT(".")); + m_compileOptions = wxT("-g"); + m_linkOptions = wxT("-O0"); + m_libPath.Add(wxT(".")); + m_libPath.Add(wxT("Debug")); + m_linkerRequired = true; + m_intermediateDirectory = wxT("./Debug"); + m_workingDirectory = wxT("./Debug"); + m_projectType = Project::EXECUTABLE; + m_enableCustomBuild = false; + m_customBuildCmd = wxEmptyString; + m_customCleanCmd = wxEmptyString; + m_isResCmpNeeded = false; + m_resCmpIncludePath = wxEmptyString; + m_resCompileOptions = wxEmptyString; + m_customPostBuildRule = wxEmptyString; + m_customPreBuildRule = wxEmptyString; + BuildSettingsConfigCookie cookie; + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetFirstCompiler(cookie); + if(cmp){ + m_compilerType = cmp->GetName(); + } + wxArrayString dbgs = DebuggerMgr::Get().GetAvailableDebuggers(); + if(dbgs.GetCount() > 0){ + m_debuggerType = dbgs.Item(0); + } + } +} + +BuildConfig::~BuildConfig() +{ +} + +wxString BuildConfig::NormalizePath(const wxString &path) const +{ + wxFileName fn(path); + return fn.GetFullPath(wxPATH_UNIX); +} + +BuildConfig *BuildConfig::Clone() const +{ + wxXmlNode *node = ToXml(); + BuildConfig *cloned = new BuildConfig(node); + delete node; + return cloned; +} + +wxXmlNode *BuildConfig::ToXml() const +{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Configuration")); + node->AddProperty(wxT("Name"), m_name); + node->AddProperty(wxT("CompilerType"), m_compilerType); + node->AddProperty(wxT("DebuggerType"), m_debuggerType); + + wxXmlNode *general = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("General")); + general->AddProperty(wxT("OutputFile"), m_outputFile); + general->AddProperty(wxT("IntermediateDirectory"), m_intermediateDirectory); + general->AddProperty(wxT("Command"), m_command ); + general->AddProperty(wxT("CommandArguments"), m_commandArguments); + general->AddProperty(wxT("WorkingDirectory"), m_workingDirectory); + node->AddChild(general); + + //create the compile node + wxXmlNode *compile = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Compiler")); + compile->AddProperty(wxT("Required"), BoolToString(m_compilerRequired)); + compile->AddProperty(wxT("Options"), m_compileOptions); + node->AddChild(compile); + + size_t i=0; + for(i=0; iAddProperty(wxT("Value"), m_includePath.Item(i)); + compile->AddChild(option); + } + + for(i=0; iAddProperty(wxT("Value"), m_preprocessor.Item(i)); + compile->AddChild(prep); + } + + //add the link node + wxXmlNode *link = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Linker")); + link->AddProperty(wxT("Required"), BoolToString(m_linkerRequired)); + link->AddProperty(wxT("Options"), m_linkOptions); + node->AddChild(link); + + for(i=0; iAddProperty(wxT("Value"), m_libPath.Item(i)); + link->AddChild(option); + } + + for(i=0; iAddProperty(wxT("Value"), m_libs.Item(i)); + link->AddChild(option); + } + + //add the resource compiler node + wxXmlNode *resCmp = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("ResourceCompiler")); + resCmp->AddProperty(wxT("Required"), BoolToString(m_isResCmpNeeded)); + resCmp->AddProperty(wxT("Options"), m_resCompileOptions); + node->AddChild(resCmp); + + wxStringTokenizer tok(m_resCmpIncludePath, wxT(";")); + while(tok.HasMoreTokens()){ + wxXmlNode *option = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("IncludePath")); + option->AddProperty(wxT("Value"),tok.NextToken()); + resCmp->AddChild(option); + } + + //add prebuild commands + wxXmlNode *preBuild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("PreBuild")); + node->AddChild(preBuild); + + BuildCommandList::const_iterator iter = m_preBuildCommands.begin(); + for(; iter != m_preBuildCommands.end(); iter++){ + wxXmlNode *command = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Command")); + command->AddProperty(wxT("Enabled"), BoolToString(iter->GetEnabled())); + XmlUtils::SetNodeContent(command, iter->GetCommand()); + preBuild->AddChild(command); + } + + //add postbuild commands + wxXmlNode *postBuild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("PostBuild")); + node->AddChild(postBuild); + iter = m_postBuildCommands.begin(); + for(; iter != m_postBuildCommands.end(); iter++){ + wxXmlNode *command = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Command")); + command->AddProperty(wxT("Enabled"), BoolToString(iter->GetEnabled())); + XmlUtils::SetNodeContent(command, iter->GetCommand()); + postBuild->AddChild(command); + } + + //add postbuild commands + wxXmlNode *customBuild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("CustomBuild")); + node->AddChild(customBuild); + customBuild->AddProperty(wxT("Enabled"), BoolToString(m_enableCustomBuild)); + + //add build and clean commands + wxXmlNode *bldCmd = new wxXmlNode(customBuild, wxXML_ELEMENT_NODE, wxT("BuildCommand")); + XmlUtils::SetNodeContent(bldCmd, m_customBuildCmd); + + wxXmlNode *clnCmd = new wxXmlNode(customBuild, wxXML_ELEMENT_NODE, wxT("CleanCommand")); + XmlUtils::SetNodeContent(clnCmd, m_customCleanCmd); + + //add the additional rules + wxXmlNode *additionalCmds = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("AdditionalRules")); + node->AddChild(additionalCmds); + + wxXmlNode *preCmd = new wxXmlNode(additionalCmds, wxXML_ELEMENT_NODE, wxT("CustomPreBuild")); + XmlUtils::SetNodeContent(preCmd, m_customPreBuildRule); + wxXmlNode *postCmd = new wxXmlNode(additionalCmds, wxXML_ELEMENT_NODE, wxT("CustomPostBuild")); + XmlUtils::SetNodeContent(postCmd, m_customPostBuildRule); + return node; +} + +void BuildConfig::SetPreprocessor(const wxString &pre) +{ + FillFromSmiColonString(m_preprocessor, pre); +} + +void BuildConfig::SetIncludePath(const wxString &path) +{ + FillFromSmiColonString(m_includePath, path); +} + +void BuildConfig::SetLibraries(const wxString &libs) +{ + FillFromSmiColonString(m_libs, libs); +} + +void BuildConfig::SetLibPath(const wxString &paths) +{ + FillFromSmiColonString(m_libPath, paths); +} + +void BuildConfig::FillFromSmiColonString(wxArrayString &arr, const wxString &str) +{ + arr.clear(); + wxStringTokenizer tkz(str, wxT(";")); + while(tkz.HasMoreTokens()){ + wxString token = tkz.NextToken(); + arr.Add(token.Trim()); + } +} +// Utils function +wxString BuildConfig::ArrayToSmiColonString(const wxArrayString &array) const{ + wxString result; + for(size_t i=0; i +#include "wx/string.h" +#include + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif + +class WXDLLIMPEXP_LE_SDK BuildCommand { + wxString m_command; + bool m_enabled; + +public: + BuildCommand() + : m_command(wxEmptyString) + , m_enabled(false) + { + } + + BuildCommand(const wxString &command, bool enabled) + : m_command(command) + , m_enabled(enabled) + {} + + ~BuildCommand() + {} + + const wxString &GetCommand() const {return m_command;} + bool GetEnabled() const { return m_enabled;} + void SetCommand(const wxString &command) {m_command = command;} + void SetEnabled(bool enabled) {m_enabled = enabled;} +}; + +typedef std::list BuildCommandList; + +class WXDLLIMPEXP_LE_SDK BuildConfig : public ConfObject { + wxString m_name; + wxArrayString m_includePath; + wxString m_compileOptions; + wxString m_linkOptions; + wxArrayString m_libs; + wxArrayString m_libPath; + BuildCommandList m_preBuildCommands; + BuildCommandList m_postBuildCommands; + bool m_compilerRequired; + bool m_linkerRequired; + bool m_enableCustomBuild; + + wxString m_outputFile; + wxString m_intermediateDirectory; + wxString m_command; + wxString m_commandArguments; + wxString m_workingDirectory; + wxString m_compilerType; + wxString m_projectType; + wxArrayString m_preprocessor; + wxString m_customBuildCmd; + wxString m_customCleanCmd; + wxString m_resCompileOptions; + wxString m_resCmpIncludePath; + bool m_isResCmpNeeded; + wxString m_debuggerType; + wxString m_customPostBuildRule; + wxString m_customPreBuildRule; + +private: + void FillFromSmiColonString(wxArrayString &arr, const wxString &str); + wxString ArrayToSmiColonString(const wxArrayString &array) const; + void StripSemiColons(wxString &str); + wxString NormalizePath(const wxString &path) const; + +public: + BuildConfig(wxXmlNode *node); + virtual ~BuildConfig(); + wxXmlNode *ToXml() const; + BuildConfig *Clone() const; + + //-------------------------------- + // Setters / Getters + //-------------------------------- + wxString GetPreprocessor() const; + void GetPreprocessor(wxArrayString &arr){ arr = m_preprocessor;} + void SetPreprocessor(const wxString &prepr); + + const wxString &GetCompilerType() const { return m_compilerType; } + void SetCompilerType(const wxString &cmpType) { m_compilerType = cmpType; } + const wxString &GetDebuggerType() const { return m_debuggerType; } + void SetDebuggerType(const wxString &type) { m_debuggerType = type; } + + wxString GetIncludePath() const; + const wxString &GetCompileOptions() const { return m_compileOptions; } + const wxString &GetLinkOptions() const { return m_linkOptions; } + wxString GetLibraries() const; + wxString GetLibPath() const; + void GetPreBuildCommands(BuildCommandList &cmds) { cmds = m_preBuildCommands; } + void GetPostBuildCommands(BuildCommandList &cmds) { cmds = m_postBuildCommands; } + const wxString &GetName() const { return m_name; } + bool IsCompilerRequired() const { return m_compilerRequired; } + bool IsLinkerRequired() const { return m_linkerRequired; } + wxString GetOutputFileName() const { return NormalizePath(m_outputFile); } + wxString GetIntermediateDirectory() const { return NormalizePath(m_intermediateDirectory); } + const wxString &GetCommand() const { return m_command; } + const wxString &GetCommandArguments() const { return m_commandArguments;} + wxString GetWorkingDirectory() const { return NormalizePath(m_workingDirectory);} + bool IsCustomBuild() const {return m_enableCustomBuild;} + const wxString &GetCustomBuildCmd()const{return m_customBuildCmd;} + const wxString &GetCustomCleanCmd()const{return m_customCleanCmd;} + void SetIncludePath(const wxArrayString &paths) { m_includePath = paths; } + void SetIncludePath(const wxString &path); + void SetLibraries(const wxString &libs); + + + void SetLibPath(const wxString &path); + void SetCompileOptions(const wxString &options) { m_compileOptions = options; } + void SetLinkOptions(const wxString &options) { m_linkOptions = options; } + void SetPreBuildCommands(const BuildCommandList &cmds) { m_preBuildCommands = cmds; } + void SetPostBuildCommands(const BuildCommandList &cmds) { m_postBuildCommands = cmds; } + void SetLibraries(const wxArrayString &libs) { m_libs = libs; } + void SetLibPath(const wxArrayString &libPaths) { m_libPath = libPaths; } + void SetName(const wxString &name){ m_name = name; } + void SetCompilerRequired(bool required) { m_compilerRequired = required; } + void SetLinkerRequired(bool required) { m_linkerRequired = required; } + void SetOutputFileName(const wxString &name){ m_outputFile = name; } + void SetIntermediateDirectory(const wxString &dir){ m_intermediateDirectory = dir; } + void SetCommand(const wxString &cmd){ m_command = cmd; } + void SetCommandArguments(const wxString &cmdArgs){ m_commandArguments = cmdArgs;} + void SetWorkingDirectory(const wxString &dir){ m_workingDirectory = dir;} + void SetCustomBuildCmd(const wxString &cmd){m_customBuildCmd = cmd;} + void SetCustomCleanCmd(const wxString &cmd){m_customCleanCmd = cmd;} + void EnableCustomBuild(bool enable){m_enableCustomBuild = enable;} + + + void SetResCompilerRequired(bool required) { m_isResCmpNeeded = required; } + bool IsResCompilerRequired() const { return m_isResCmpNeeded; } + + void SetResCmpIncludePath(const wxString &path){m_resCmpIncludePath = path;} + const wxString& GetResCmpIncludePath() const{return m_resCmpIncludePath;} + + void SetResCmpOptions(const wxString &options){ m_resCompileOptions = options; } + const wxString &GetResCompileOptions() const {return m_resCompileOptions;} + + //special custom rules + wxString GetPreBuildCustom() const{return m_customPreBuildRule;} + wxString GetPostBuildCustom() const{return m_customPostBuildRule;} + + void SetPreBuildCustom(const wxString& rule) {m_customPreBuildRule = rule;} + void SetPostBuildCustom(const wxString& rule) {m_customPostBuildRule = rule;} +}; + +typedef SmartPtr BuildConfigPtr; +#endif // BUILD_CONFIGURATION_H diff --git a/Plugin/build_settings_config.cpp b/Plugin/build_settings_config.cpp new file mode 100644 index 0000000000..827a79054d --- /dev/null +++ b/Plugin/build_settings_config.cpp @@ -0,0 +1,151 @@ +#include "build_settings_config.h" +#include "xmlutils.h" +#include + +BuildSettingsConfig::BuildSettingsConfig() +{ + m_doc = new wxXmlDocument(); +} + +BuildSettingsConfig::~BuildSettingsConfig() +{ + delete m_doc; +} + +bool BuildSettingsConfig::Load() +{ + m_fileName = wxFileName(wxT("config/build_settings.xml")); + m_fileName.MakeAbsolute(); + if(!m_fileName.FileExists()){ + //create a new empty file with this name so the load function will not + //fail + wxFFile file(m_fileName.GetFullPath(), wxT("a")); + if(file.IsOpened()){ + file.Close(); + } + } + return m_doc->Load(m_fileName.GetFullPath()); +} + +wxXmlNode* BuildSettingsConfig::GetCompilerNode(const wxString& name) const +{ + wxXmlNode *cmpsNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Compilers")); + if( cmpsNode ){ + if(name.IsEmpty()){ + //return the first compiler + return XmlUtils::FindFirstByTagName(cmpsNode, wxT("Compiler")); + }else{ + return XmlUtils::FindNodeByName(cmpsNode, wxT("Compiler"), name); + } + } + return NULL; +} + +void BuildSettingsConfig::SetCompiler(CompilerPtr cmp) +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Compilers")); + if(node){ + wxXmlNode *oldCmp = NULL; + wxXmlNode *child = node->GetChildren(); + while(child){ + if(child->GetName() == wxT("Compiler") && XmlUtils::ReadString(child, wxT("Name")) == cmp->GetName()){ + oldCmp = child; + break; + } + child = child->GetNext(); + } + if(oldCmp){ + node->RemoveChild(oldCmp); + delete oldCmp; + } + node->AddChild(cmp->ToXml()); + + } else { + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Compilers")); + m_doc->GetRoot()->AddChild(node); + node->AddChild(cmp->ToXml()); + } + + m_doc->Save(m_fileName.GetFullPath()); +} + +CompilerPtr BuildSettingsConfig::GetCompiler(const wxString &name) const +{ + return new Compiler(GetCompilerNode(name)); +} + +CompilerPtr BuildSettingsConfig::GetFirstCompiler(BuildSettingsConfigCookie &cookie) +{ + wxXmlNode *cmps = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Compilers")); + if( cmps ){ + cookie.parent = cmps; + cookie.child = NULL; + return GetNextCompiler(cookie); + } + return NULL; +} + +CompilerPtr BuildSettingsConfig::GetNextCompiler(BuildSettingsConfigCookie &cookie) +{ + if( cookie.parent == NULL ){ + return NULL; + } + + if( cookie.child == NULL ){ + cookie.child = cookie.parent->GetChildren(); + } + + while( cookie.child ){ + if( cookie.child->GetName() == wxT("Compiler") ){ + wxXmlNode *n = cookie.child; + // advance the child to the next child and bail out + cookie.child = cookie.child->GetNext(); + + // incase we dont have more childs to iterate + // reset the parent as well so the next call to GetNexeLexer() will fail + if( cookie.child == NULL ){ + cookie.parent = NULL; + } + return new Compiler(n); + } + cookie.child = cookie.child->GetNext(); + } + return NULL; +} + +bool BuildSettingsConfig::IsCompilerExist(const wxString &name) const +{ + wxXmlNode *node = GetCompilerNode(name); + return node != NULL; +} + +void BuildSettingsConfig::DeleteCompiler(const wxString &name) +{ + wxXmlNode *node = GetCompilerNode(name); + if(node){ + node->GetParent()->RemoveChild(node); + delete node; + m_doc->Save(m_fileName.GetFullPath()); + } +} + +void BuildSettingsConfig::SetBuildSystem(BuildSystemPtr bs) +{ + //find the old setting + wxXmlNode *node = XmlUtils::FindNodeByName(m_doc->GetRoot(), wxT("BuildSystem"), bs->GetName()); + if(node){ + node->GetParent()->RemoveChild(node); + delete node; + } + m_doc->GetRoot()->AddChild(bs->ToXml()); + m_doc->Save(m_fileName.GetFullPath()); +} + +BuildSystemPtr BuildSettingsConfig::GetBuildSystem(const wxString &name) +{ + wxXmlNode *node = XmlUtils::FindNodeByName(m_doc->GetRoot(), wxT("BuildSystem"), name); + if(node){ + return new BuildSystem(node); + } + return NULL; +} diff --git a/Plugin/build_settings_config.h b/Plugin/build_settings_config.h new file mode 100644 index 0000000000..efba8fba46 --- /dev/null +++ b/Plugin/build_settings_config.h @@ -0,0 +1,97 @@ +#ifndef BUILD_CONFIG_SETTINGS_H +#define BUILD_CONFIG_SETTINGS_H + +#include "wx/string.h" +#include "singleton.h" +#include "compiler.h" +#include "wx/xml/xml.h" +#include "wx/filename.h" +#include "build_system.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +// Cookie class for the editor to provide reentrance operations +// on various methods (such as iteration) +class WXDLLIMPEXP_LE_SDK BuildSettingsConfigCookie { +public: + wxXmlNode *child; + wxXmlNode *parent; + +public: + BuildSettingsConfigCookie() : child(NULL), parent(NULL) {} + ~BuildSettingsConfigCookie() {} +}; + +/** + * \class BuildSettingsConfig the build system configuration + */ +class WXDLLIMPEXP_LE_SDK BuildSettingsConfig +{ + wxXmlDocument *m_doc; + wxFileName m_fileName; +protected: + wxXmlNode* GetCompilerNode(const wxString& name) const; + +public: + BuildSettingsConfig(); + virtual ~BuildSettingsConfig(); + + /** + * Load the configuration file + */ + bool Load(); + + /** + * Set or update a given compiler using its name as the index + */ + void SetCompiler(CompilerPtr cmp); + + /** + * Find and return compiler by name + */ + CompilerPtr GetCompiler(const wxString &name) const; + + /** + * Returns the first compiler found. + * For this enumeration function you must pass in a 'cookie' parameter which is opaque for the application but is necessary for the library to make these functions reentrant + * (i.e. allow more than one enumeration on one and the same object simultaneously). + */ + CompilerPtr GetFirstCompiler(BuildSettingsConfigCookie &cookie); + + /** + * Returns the next compiler. + * For this enumeration function you must pass in a 'cookie' parameter which is opaque for the application but is necessary for the library to make these functions reentrant + * (i.e. allow more than one enumeration on one and the same object simultaneously). + */ + CompilerPtr GetNextCompiler(BuildSettingsConfigCookie &cookie); + + /** + * check whether a compiler with a given name already exist + */ + bool IsCompilerExist(const wxString &name) const; + + /** + * delete compiler + */ + void DeleteCompiler(const wxString &name); + + /** + * Add build system + */ + void SetBuildSystem(BuildSystemPtr bs); + + /** + * get build system from configuration by name + */ + BuildSystemPtr GetBuildSystem(const wxString &name); +}; + +typedef Singleton BuildSettingsConfigST; + +#endif //BUILD_CONFIG_SETTINGS_H diff --git a/Plugin/build_system.cpp b/Plugin/build_system.cpp new file mode 100644 index 0000000000..91ca05cb1d --- /dev/null +++ b/Plugin/build_system.cpp @@ -0,0 +1,24 @@ +#include "build_system.h" +#include "xmlutils.h" + +BuildSystem::BuildSystem(wxXmlNode *node) +{ + if(node){ + m_name = XmlUtils::ReadString(node, wxT("Name")); + m_toolPath = XmlUtils::ReadString(node, wxT("ToolPath")); + m_toolOptions = XmlUtils::ReadString(node, wxT("Options")); + } +} + +BuildSystem::~BuildSystem() +{ +} + +wxXmlNode *BuildSystem::ToXml() const +{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("BuildSystem")); + node->AddProperty(wxT("Name"), m_name); + node->AddProperty(wxT("ToolPath"), m_toolPath); + node->AddProperty(wxT("Options"), m_toolOptions); + return node; +} diff --git a/Plugin/build_system.h b/Plugin/build_system.h new file mode 100644 index 0000000000..6409c30229 --- /dev/null +++ b/Plugin/build_system.h @@ -0,0 +1,38 @@ +#ifndef BUILD_SYSTEM_H +#define BUILD_SYSTEM_H + +#include "wx/xml/xml.h" +#include "wx/string.h" +#include "smart_ptr.h" +#include "list" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK BuildSystem { + wxString m_name; + wxString m_toolPath; + wxString m_toolOptions; + +public: + BuildSystem(wxXmlNode *node); + virtual ~BuildSystem(); + wxXmlNode *ToXml() const; + + const wxString &GetName() const { return m_name; } + const wxString &GetToolPath() const { return m_toolPath; } + const wxString &GetToolOptions() const { return m_toolOptions; } + void SetName(const wxString &name) { m_name = name; } + void SetToolPath(const wxString &path) { m_toolPath = path; } + void SetToolOptions(const wxString &options) { m_toolOptions = options; } +}; + +typedef SmartPtr BuildSystemPtr; +typedef std::list BuildSystemList; + +#endif //BUILD_SYSTEM_H diff --git a/Plugin/builder.cpp b/Plugin/builder.cpp new file mode 100644 index 0000000000..e439e818d6 --- /dev/null +++ b/Plugin/builder.cpp @@ -0,0 +1,63 @@ +#include "builder.h" +#include "macros.h" +#include "build_settings_config.h" +#include "workspace.h" + +Builder::Builder(const wxString &name, const wxString &buildTool, const wxString &buildToolOptions) +: m_name(name) +, m_buildTool(buildTool) +, m_buildToolOptions(buildToolOptions) + +{ + //override values from configuration file + m_buildTool = GetBuildToolFromConfig(); + m_buildToolOptions = GetBuildToolOptionsFromConfig(); +} + +Builder::~Builder() +{ +} + +wxString Builder::NormalizeConfigName(const wxString &confgName) +{ + wxString normalized(confgName); + TrimString(normalized); + normalized.Replace(wxT(" "), wxT("_")); + return normalized; +} + +wxString Builder::GetBuildToolFromConfig() const +{ + BuildSystemPtr bs = BuildSettingsConfigST::Get()->GetBuildSystem(m_name); + if( !bs ){ + return m_buildTool; + } + + return bs->GetToolPath(); +} + +wxString Builder::GetBuildToolOptionsFromConfig() const +{ + BuildSystemPtr bs = BuildSettingsConfigST::Get()->GetBuildSystem(m_name); + if( !bs ){ + return m_buildToolOptions; + } + + return bs->GetToolOptions(); +} + +wxString Builder::GetBuildToolCommand() const +{ + //enclose the tool path in quatation marks + return wxT("\"") + GetBuildToolFromConfig() + wxT("\" ") + GetBuildToolOptionsFromConfig(); +} + +wxString Builder::GetBuildToolName() const +{ + return GetBuildToolFromConfig(); +} + +wxString Builder::GetBuildToolOptions() const +{ + return GetBuildToolOptionsFromConfig(); +} diff --git a/Plugin/builder.h b/Plugin/builder.h new file mode 100644 index 0000000000..c0b3eff05c --- /dev/null +++ b/Plugin/builder.h @@ -0,0 +1,116 @@ +#ifndef BUILDER_H +#define BUILDER_H + +#include "wx/string.h" +#include "smart_ptr.h" +#include "wx/event.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/** + * \ingroup SDK + * this class defines the interface of a build system + * + * \version 1.0 + * first version + * + * \date 05-19-2007 + * + * \author Eran + */ +class WXDLLIMPEXP_LE_SDK Builder { +protected: + wxString m_name; + wxString m_buildTool; + wxString m_buildToolOptions; + + wxString GetBuildToolFromConfig() const; + wxString GetBuildToolOptionsFromConfig() const; + +public: + Builder(const wxString &name, const wxString &buildTool, const wxString &buildToolOptions) ; + virtual ~Builder(); + + void SetBuildTool(const wxString &buildTool) { m_buildTool = buildTool; } + void SetBuildToolOptions(const wxString &buildToolOptions) { m_buildToolOptions = buildToolOptions; } + + /** + * Normalize the configuration name, this is done by removing any trailing and leading + * spaces from the string, and replacing any space character with underscore. + */ + static wxString NormalizeConfigName(const wxString &confgName); + + /** + * \return the builder name + */ + const wxString &GetName() const { return m_name; } + + /** + * \return the build tool assoicated with this builder + */ + wxString GetBuildToolCommand() const; + + /** + * return the build tool name + */ + wxString GetBuildToolName() const; + + /** + * return the build tool options + */ + wxString GetBuildToolOptions() const; + + /** + * Export the build system specific file (e.g. GNU makefile, Ant file etc) + * to allow users to invoke them manualy from the command line + * \param project project to export. + * \param errMsg output + * \return true on success, false otherwise. + */ + virtual bool Export(const wxString &project, bool isProjectOnly, wxString &errMsg) = 0; + + /** + * Return the command that should be executed for performing the clean + * task + */ + virtual wxString GetCleanCommand(const wxString &project) = 0; + + /** + * Return the command that should be executed for performing the build + * task for a given project + */ + virtual wxString GetBuildCommand(const wxString &project) = 0; + + //----------------------------------------------------------------- + // Project Only API + //----------------------------------------------------------------- + /** + * Return the command that should be executed for performing the clean + * task - for the project only (excluding dependencies) + */ + virtual wxString GetPOCleanCommand(const wxString &project) = 0; + + /** + * Return the command that should be executed for performing the build + * task for a given project - for the project only (excluding dependencies) + */ + virtual wxString GetPOBuildCommand(const wxString &project) = 0; + + /** + * \brief create a command to execute for compiling single source file + * \param project + * \param fileName + * \return the command + */ + virtual wxString GetSingleFileCmd(const wxString &project, const wxString &fileName) = 0; +}; + +typedef SmartPtr BuilderPtr; + +#endif // BUILDER_H diff --git a/Plugin/builder_gnumake.cpp b/Plugin/builder_gnumake.cpp new file mode 100644 index 0000000000..29075c4727 --- /dev/null +++ b/Plugin/builder_gnumake.cpp @@ -0,0 +1,821 @@ +#include "project.h" +#include "builder_gnumake.h" +#include "configuration_mapping.h" +#include "dirsaver.h" +#include "wx/tokenzr.h" +#include "macros.h" +#include "build_settings_config.h" +#include "buildmanager.h" +#include "wx/sstream.h" + +static bool IsSource(const wxString &ext) +{ + wxString e(ext); + e = e.MakeLower(); + return e == wxT("cpp") || e == wxT("cxx") || e == wxT("c") || e == wxT("c++") || e == wxT("cc"); +} + +static bool IsResource(const wxString &ext) +{ + wxString e(ext); + e = e.MakeLower(); + return e == wxT("rc"); +} + +BuilderGnuMake::BuilderGnuMake() + : Builder(wxT("GNU makefile for g++/gcc"), wxT("make"), wxT("-f")) +{ +} + +BuilderGnuMake::~BuilderGnuMake() +{ +} + +bool BuilderGnuMake::Export(const wxString &project, bool isProjectOnly, wxString &errMsg) +{ + if (project.IsEmpty()) { + return false; + } + + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(project, errMsg); + if (!proj) { + errMsg << wxT("Cant open project '") << project << wxT("'"); + return false; + } + + wxArrayString depsArr = proj->GetDependencies(); + wxArrayString removeList; + if(!isProjectOnly){ + //this function assumes that the working directory is located at the workspace path + //make sure that all dependencies exists + for (size_t i=0; iFindProjectByName(depsArr.Item(i), errMsg); + //Missing dependencies project? + //this can happen if a project was removed from the workspace, but + //is still on the depdendencie list of this project + if (!dependProj) { + wxString msg; + msg << wxT("CodeLite can not find project '") << depsArr.Item(i) << wxT("' which is required\n"); + msg << wxT("for building project '") << project << wxT("'.\nWould like to remove it from the dependency list?"); + if (wxMessageBox(msg, wxT("CodeLite"), wxYES_NO | wxICON_QUESTION) == wxYES) { + //remove the project from the dependecie list, and continue + removeList.Add(depsArr.Item(i)); + } + } + } + //remove the unfound projects from the dependencies array + for (size_t i=0; iSetDependencies(depsArr); + } + + wxString fn; + fn << WorkspaceST::Get()->GetName() << wxT("_wsp.mk"); + wxString text; + + wxFileName wspfile(WorkspaceST::Get()->GetWorkspaceFileName()); + + text << wxT(".PHONY: clean All\n\n"); + text << wxT("All:\n"); + + //iterate over the dependencies projects and generate makefile + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + //generate the makefile for the selected workspace configuration + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString workspaceSelConf = matrix->GetSelectedConfigurationName(); + + wxString args; + if(!isProjectOnly){ + for (size_t i=0; iFindProjectByName(depsArr.Item(i), errMsg); + if (!dependProj) { + continue; + } + BuildConfigPtr dependProjbldConf = WorkspaceST::Get()->GetProjSelBuildConf(dependProj->GetName()); + + GenerateMakefile(dependProj); + wxString projectSelConf = matrix->GetProjectSelectedConf(workspaceSelConf, dependProj->GetName()); + args = wxT("type="); + args << NormalizeConfigName(projectSelConf) << wxT(" "); + text << wxT("\t@echo ----------Building project:[ ") << dependProj->GetName() << wxT(" - ") << projectSelConf << wxT(" ]----------\n"); + + //make the paths relative + wxFileName fn(dependProj->GetFileName()); + fn.MakeRelativeTo(wspfile.GetPath()); + + //if the dependencie project is project of type 'Custom Build' - do the custom build instead + //of the geenrated makefile + + if (dependProjbldConf && dependProjbldConf->IsCustomBuild()) { + text << wxT("\t") << GetCdCmd(wspfile, fn) << dependProjbldConf->GetCustomBuildCmd() << wxT("\n"); + } else { + text << wxT("\t") << GetCdCmd(wspfile, fn) << buildTool << wxT(" \"") << dependProj->GetName() << wxT(".mk\" ") << args << wxT("\n"); + } + } + } + + //generate makefile for the project itself + GenerateMakefile(proj); + wxString projectSelConf = matrix->GetProjectSelectedConf(workspaceSelConf, project); + args = wxT("type="); + args << NormalizeConfigName(projectSelConf) << wxT(" "); + text << wxT("\t@echo ----------Building project:[ ") << project << wxT(" - ") << projectSelConf << wxT(" ]----------\n"); + + //make the paths relative + wxFileName projectPath(proj->GetFileName()); + projectPath.MakeRelativeTo(wspfile.GetPath()); + text << wxT("\t") << GetCdCmd(wspfile, projectPath) << buildTool << wxT(" \"") << proj->GetName() << wxT(".mk\" ") << args << wxT("\n"); + + //create the clean target + text << wxT("clean:\n"); + if(!isProjectOnly){ + for (size_t i=0; iGetProjectSelectedConf(workspaceSelConf, depsArr.Item(i)); + args = wxT("type="); + args << NormalizeConfigName(projectSelConf) << wxT(" "); + + ProjectPtr dependProj = WorkspaceST::Get()->FindProjectByName(depsArr.Item(i), errMsg); + //Missing dependencies project? just skip it + if (!dependProj) { + continue; + } + + text << wxT("\t@echo ----------Building project:[ ") << dependProj->GetName() << wxT(" - ") << projectSelConf << wxT(" ]----------\n"); + + //make the paths relative + wxFileName fn(dependProj->GetFileName()); + fn.MakeRelativeTo(wspfile.GetPath()); + + //if the dependencie project is project of type 'Custom Build' - do the custom build instead + //of the geenrated makefile + BuildConfigPtr dependProjbldConf = WorkspaceST::Get()->GetProjSelBuildConf(dependProj->GetName()); + if (dependProjbldConf && dependProjbldConf->IsCustomBuild()) { + text << wxT("\t") << GetCdCmd(wspfile, fn) << dependProjbldConf->GetCustomCleanCmd() << wxT("\n"); + } else { + text << wxT("\t") << GetCdCmd(wspfile, fn) << buildTool << wxT(" \"") << dependProj->GetName() << wxT(".mk\" ") << args << wxT(" clean\n") ; + } + } + } + + //generate makefile for the project itself + projectSelConf = matrix->GetProjectSelectedConf(workspaceSelConf, project); + args = wxT("type="); + args << NormalizeConfigName(projectSelConf) << wxT(" "); + text << wxT("\t@echo ----------Building project:[ ") << project << wxT(" - ") << projectSelConf << wxT(" ]----------\n"); + + //make the paths relative + text << wxT("\t") << GetCdCmd(wspfile, projectPath) << buildTool << wxT(" \"") << proj->GetName() << wxT(".mk\" ") << args << wxT(" clean\n") ; + + //dump the content to file + wxFileOutputStream output(fn); + wxStringInputStream content(text); + output << content; + return true; +} + +void BuilderGnuMake::GenerateMakefile(ProjectPtr proj) +{ + ProjectSettingsPtr settings = proj->GetSettings(); + if (!settings) { + return; + } + + //get the selected build configuration for this project + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(proj->GetName()); + if (!bldConf) { + return; + } + + wxString path = proj->GetFileName().GetPath(); + + DirSaver ds; + //change directory to the project base dir + ::wxSetWorkingDirectory(path); + + + //create new makefile file + wxString fn(path); + fn << PATH_SEP << proj->GetName() << wxT(".mk"); +// wxFileOutputStream output(fn); + + //if (!output.IsOk()) + // return; + + //generate the selected configuration for this project + //wxTextOutputStream text(output); + wxString text; + + if (bldConf->IsCustomBuild()) { + //no need to generate makefile, just call the user cutom build command + text << wxT(".PHONY: all\n"); + text << wxT("all:\n"); + text << wxT("\t") << bldConf->GetCustomBuildCmd() << wxT("\n"); + + //create the clean target + text << wxT("clean:\n"); + text << wxT("\t") << bldConf->GetCustomCleanCmd() << wxT("\n"); + + //dump the content to a file + wxFFile output; + output.Open(fn, wxT("w+")); + if(output.IsOpened()){ + output.Write(text); + output.Close(); + } + return; + } + + text << wxT("##") << wxT("\n"); + text << wxT("## Auto Generated makefile, please do not edit") << wxT("\n");; + text << wxT("##") << wxT("\n"); + + //---------------------------------------------------------- + //copy environment variables to the makefile + //---------------------------------------------------------- + EnvironmentVarieblesPtr env = WorkspaceST::Get()->GetEnvironmentVariables(); + EnvironmentVariebles::ConstIterator iter = env->Begin(); + for (; iter != env->End(); iter++) { + wxString name = iter->first; + wxString value = iter->second; + text << name << wxT("=") << value << wxT("") << wxT("\n"); + } + //create a variable for the project name as well + text << wxT("ProjectName=") << proj->GetName() << wxT("\n"); + text << wxT("\n"); + + CreateConfigsVariables(bldConf, text); + + // create a list of objects + CreateObjectList(proj, text); + + //----------------------------------------------------------- + // create the build targets + //----------------------------------------------------------- + text << wxT("##\n"); + text << wxT("## Main Build Tragets \n"); + text << wxT("##\n"); + + //incase project is type exe or dll, force link + //this is to workaround bug in the generated makefiles + //which causes the makefile to report 'nothing to be done' + //even when a dependencie was modified + wxString targetName(bldConf->GetIntermediateDirectory()); + + //dont always add the 'PrePreBuild' dependenice, or else it will + //lead to constant archiving of static libraries, even when there is + //"Nothing to be done for 'all'" :D + wxString prePreBuildTarget(wxT("PrePreBuild")); + if (bldConf->GetPreBuildCustom().IsEmpty()) { + prePreBuildTarget = wxEmptyString; + } + + if (settings->GetProjectType() == Project::EXECUTABLE || settings->GetProjectType() == Project::DYNAMIC_LIBRARY) { + text << wxT("all: $(OutputFile)\n\n"); + if ( HasPrebuildCommands(bldConf) ) { + text << wxT("$(OutputFile): makeDirStep ") << prePreBuildTarget << wxT(" PreBuild $(Objects)\n"); + } else { + text << wxT("$(OutputFile): makeDirStep ") << prePreBuildTarget << wxT(" $(Objects)\n"); + } + targetName = wxT("makeDirStep"); + } else { + text << wxT("all: $(IntermediateDirectory) $(OutputFile)\n\n"); + if (HasPrebuildCommands(bldConf)) { + text << wxT("$(OutputFile): ") << prePreBuildTarget << wxT(" PreBuild $(Objects)\n"); + } else { + text << wxT("$(OutputFile): ") << prePreBuildTarget << wxT(" $(Objects)\n"); + } + } + + CreateTargets(proj->GetSettings()->GetProjectType(), bldConf, text); + CreatePostBuildEvents(bldConf, text); + CreateMakeDirsTarget(bldConf, targetName, text); + CreatePreBuildEvents(bldConf, text); + + //----------------------------------------------------------- + // Create a list of targets that should be built according to + // projects' file list + //----------------------------------------------------------- + CreateFileTargets(proj, text); + + + //dump the content to a file + wxFFile output; + output.Open(fn, wxT("w+")); + if(output.IsOpened()){ + output.Write(text); + output.Close(); + } +} + +void BuilderGnuMake::CreateMakeDirsTarget(BuildConfigPtr bldConf, const wxString &targetName, wxString &text) +{ + text << wxT("\n"); + text << targetName << wxT(":\n"); + + if (wxGetOsVersion() & wxOS_WINDOWS) { + text << wxT("\t@-if not exist ") << bldConf->GetIntermediateDirectory() << wxT(" mkdir \"") << bldConf->GetIntermediateDirectory() << wxT("\"\n"); + } else { + //other OSs + text << wxT("\t@test -d ") << bldConf->GetIntermediateDirectory() << wxT(" || mkdir ") << bldConf->GetIntermediateDirectory() << wxT("\n"); + } + text << wxT("\n"); +} + +void BuilderGnuMake::CreateObjectList(ProjectPtr proj, wxString &text) +{ + std::vector files; + proj->GetFiles(files); + text << wxT("Objects="); + + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(proj->GetName()); + int counter = 1; + for (size_t i=0; iIsResCompilerRequired())) { + continue; + } + } else { + continue; + } + } + + text << wxT("$(IntermediateDirectory)/") << files[i].GetName() << wxT("$(ObjectSuffix) "); + if (counter % 10 == 0) { + text << wxT("\\\n\t"); + } + counter++; + } + text << wxT("\n\n"); +} + +void BuilderGnuMake::CreateFileTargets(ProjectPtr proj, wxString &text) +{ + //get the project specific build configuration for the workspace active + //configuration + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(proj->GetName()); + wxString cmpType = bldConf->GetCompilerType(); + //get the compiler settings + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(cmpType); + bool isGnu(false); + if ( cmp->GetTool(wxT("CompilerName")).Contains(wxT("gcc")) || + cmp->GetTool(wxT("CompilerName")).Contains(wxT("g++"))) { + //for g++/gcc compilers, we use a special feature that allows automatic generation of the + //objects along with their dependenices + isGnu = true; + } + + std::vector files; + proj->GetFiles(files); + + text << wxT("\n\n"); + //create rule per object + text << wxT("##\n"); + text << wxT("## Objects\n"); + text << wxT("##\n"); + + for (size_t i=0; iIsResCompilerRequired() && wxGetOsVersion() & wxOS_WINDOWS ) { + //Windows only + wxString objectName; + objectName << wxT("$(IntermediateDirectory)/") << files[i].GetName() << wxT("$(ObjectSuffix)"); + + wxString fileName = files[i].GetFullPath(wxPATH_UNIX); + text << objectName << wxT(": ") << fileName << wxT("\n"); + text << wxT("\t") << wxT("$(RcCompilerName) -i ") << fileName << wxT(" $(RcCmpOptions) ") << wxT(" $(OutputSwitch)") << objectName << wxT(" $(RcIncludePath) \n\n"); + } + } + + //add clean target + text << wxT("##\n"); + text << wxT("## Clean\n"); + text << wxT("##\n"); + text << wxT("clean:\n"); + + if (wxGetOsVersion() & wxOS_WINDOWS) { + //windows clean command + for (size_t i=0; iIsResCompilerRequired() && wxGetOsVersion() & wxOS_WINDOWS) { + wxString ofile = files[i].GetName() << wxT("$(ObjectSuffix)"); + text << wxT("\t") << wxT("$(RM) ") << wxT("$(IntermediateDirectory)/") << ofile << wxT("\n"); + } + } + //delete the output file as well + wxString exeExt(wxEmptyString); + if (proj->GetSettings()->GetProjectType() == Project::EXECUTABLE) { + //under windows, g++ automatically adds the .exe extension to executable + //make sure we deletes it as well + exeExt = wxT(".exe"); + } + text << wxT("\t") << wxT("$(RM) ") << wxT("$(OutputFile)") << wxT("\n");; + text << wxT("\t") << wxT("$(RM) ") << wxT("$(OutputFile)") << exeExt << wxT("\n");; + } else { + //on linux we dont really need resource compiler... + for (size_t i=0; iGetName(); + name = NormalizeConfigName(name); + + if (type == Project::STATIC_LIBRARY) { + //create a static library + text << wxT("\t") << wxT("$(ArchiveTool) $(OutputFile) $(Objects)\n"); + } else + if (type == Project::DYNAMIC_LIBRARY) { + //create a shared library + text << wxT("\t") << wxT("$(SharedObjectLinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)\n"); + } else + if (type == Project::EXECUTABLE) { + //create an executable + text << wxT("\t") << wxT("$(LinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)\n"); + } +} + +void BuilderGnuMake::CreatePostBuildEvents(BuildConfigPtr bldConf, wxString &text) +{ + BuildCommandList cmds; + BuildCommandList::iterator iter; + wxString name = bldConf->GetName(); + name = NormalizeConfigName(name); + + //generate postbuild commands + cmds.clear(); + bldConf->GetPostBuildCommands(cmds); + bool first(true); + if (!cmds.empty()) { + iter = cmds.begin(); + for (; iter != cmds.end(); iter++) { + if (iter->GetEnabled()) { + if (first) { + text << wxT("\t@echo Executing Post Build commands ...\n"); + first = false; + } + text << wxT("\t") << iter->GetCommand() << wxT("\n"); + } + } + if (!first) { + text << wxT("\t@echo Done\n"); + } + } +} + +bool BuilderGnuMake::HasPrebuildCommands(BuildConfigPtr bldConf) const +{ + BuildCommandList cmds; + BuildCommandList::const_iterator iter; + bldConf->GetPreBuildCommands(cmds); + bool first(true); + + if (!cmds.empty()) { + iter = cmds.begin(); + for (; iter != cmds.end(); iter++) { + if (iter->GetEnabled()) { + if (first) { + first = false; + break; + } + } + } + } + return !first; +} + +void BuilderGnuMake::CreatePreBuildEvents(BuildConfigPtr bldConf, wxString &text) +{ + BuildCommandList cmds; + BuildCommandList::iterator iter; + wxString name = bldConf->GetName(); + name = NormalizeConfigName(name); + + //add PrePreBuild + if (!bldConf->GetPreBuildCustom().IsEmpty()) { + text << wxT("PrePreBuild: "); + text << bldConf->GetPreBuildCustom() << wxT("\n"); + } + text << wxT("\n"); + + cmds.clear(); + bldConf->GetPreBuildCommands(cmds); + bool first(true); + text << wxT("PreBuild:\n"); + if (!cmds.empty()) { + iter = cmds.begin(); + for (; iter != cmds.end(); iter++) { + if (iter->GetEnabled()) { + if (first) { + text << wxT("\t@echo Executing Pre Build commands ...\n"); + first = false; + } + text << wxT("\t") << iter->GetCommand() << wxT("\n"); + } + } + if (!first) { + text << wxT("\t@echo Done\n"); + } + } +} + +void BuilderGnuMake::CreateConfigsVariables(BuildConfigPtr bldConf, wxString &text) +{ + wxString name = bldConf->GetName(); + name = NormalizeConfigName(name); + + wxString cmpType = bldConf->GetCompilerType(); + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(cmpType); + + text << wxT("## ") << name << wxT("\n"); + text << wxT("ifeq ($(type),") << name << wxT(")") << wxT("\n"); + //The following two variables are here for compatibility with MSVS + text << wxT("ConfigurationName=") << name << wxT("\n"); + text << wxT("IntermediateDirectory") << wxT("=") << bldConf->GetIntermediateDirectory() << wxT("\n"); + text << wxT("OutDir=$(IntermediateDirectory)\n"); + text << wxT("LinkerName=") << cmp->GetTool(wxT("LinkerName")) << wxT("\n"); + text << wxT("ArchiveTool=") << cmp->GetTool(wxT("ArchiveTool")) << wxT("\n"); + text << wxT("SharedObjectLinkerName=") << cmp->GetTool(wxT("SharedObjectLinkerName")) << wxT("\n"); + text << wxT("ObjectSuffix=") << cmp->GetObjectSuffix() << wxT("\n"); + text << wxT("DebugSwitch=") << cmp->GetSwitch(wxT("Debug")) << wxT("\n"); + text << wxT("IncludeSwitch=") << cmp->GetSwitch(wxT("Include")) << wxT("\n"); + text << wxT("LibrarySwitch=") << cmp->GetSwitch(wxT("Library")) << wxT("\n"); + text << wxT("OutputSwitch=") << cmp->GetSwitch(wxT("Output")) << wxT("\n"); + text << wxT("LibraryPathSwitch=") << cmp->GetSwitch(wxT("LibraryPath")) << wxT("\n"); + text << wxT("PreprocessorSwitch=") << cmp->GetSwitch(wxT("Preprocessor")) << wxT("\n"); + text << wxT("SourceSwitch=") << cmp->GetSwitch(wxT("Source")) << wxT("\n"); + text << wxT("CompilerName") << wxT("=") << cmp->GetTool(wxT("CompilerName")) << wxT("\n"); + text << wxT("RcCompilerName") << wxT("=") << cmp->GetTool(wxT("ResourceCompiler")) << wxT("\n"); + text << wxT("OutputFile") << wxT("=") << bldConf->GetOutputFileName() << wxT("\n"); + text << wxT("Preprocessors=") << ParsePreprocessor(bldConf->GetPreprocessor()) << wxT("\n"); + + wxString buildOpts = bldConf->GetCompileOptions(); + buildOpts.Replace(wxT(";"), wxT(" ")); + text << wxT("CmpOptions") << wxT("=") << buildOpts << wxT(" $(Preprocessors)") << wxT("\n"); + + + wxString rcBuildOpts = bldConf->GetResCompileOptions(); + rcBuildOpts.Replace(wxT(";"), wxT(" ")); + text << wxT("RcCmpOptions") << wxT("=") << rcBuildOpts << wxT("\n"); + + wxString linkOpt = bldConf->GetLinkOptions(); + linkOpt.Replace(wxT(";"), wxT(" ")); + + //link options are kept with semi-colons, strip them + text << wxT("LinkOptions") << wxT("=") << linkOpt << wxT("\n"); + text << wxT("IncludePath=") << ParseIncludePath(bldConf->GetIncludePath()) << wxT("\n"); + text << wxT("RcIncludePath=") << ParseIncludePath(bldConf->GetResCmpIncludePath()) << wxT("\n"); + text << wxT("Libs=") << ParseLibs(bldConf->GetLibraries()) << wxT("\n"); + text << wxT("LibPath=") << ParseLibPath(bldConf->GetLibPath()) << wxT("\n"); + text << wxT("endif\n\n"); +} + +wxString BuilderGnuMake::ParseIncludePath(const wxString &paths) +{ + //convert semi-colon delimited string into GNU list of + //include paths: + wxString incluedPath(wxEmptyString); + wxStringTokenizer tkz(paths, wxT(";")); + //prepend each include path with -I + while (tkz.HasMoreTokens()) { + wxString path(tkz.NextToken()); + TrimString(path); + incluedPath << wxT("$(IncludeSwitch)") << path << wxT(" "); + } + return incluedPath; +} + +wxString BuilderGnuMake::ParseLibPath(const wxString &paths) +{ + //convert semi-colon delimited string into GNU list of + //lib path + wxString libPath(wxEmptyString); + wxStringTokenizer tkz(paths, wxT(";")); + //prepend each include path with libpath switch + while (tkz.HasMoreTokens()) { + wxString path(tkz.NextToken()); + TrimString(path); + libPath << wxT("$(LibraryPathSwitch)") << path << wxT(" "); + } + return libPath; +} + +wxString BuilderGnuMake::ParsePreprocessor(const wxString &prep) +{ + wxString preprocessor(wxEmptyString); + wxStringTokenizer tkz(prep, wxT(";")); + //prepend each include path with libpath switch + while (tkz.HasMoreTokens()) { + wxString p(tkz.NextToken()); + TrimString(p); + preprocessor << wxT("$(PreprocessorSwitch)") << p << wxT(" "); + } + return preprocessor; +} + +wxString BuilderGnuMake::ParseLibs(const wxString &libs) +{ + //convert semi-colon delimited string into GNU list of + //libs + wxString slibs(wxEmptyString); + wxStringTokenizer tkz(libs, wxT(";")); + //prepend each include path with -l and strip trailing lib string + //also, if the file contains an extension (.a, .so, .dynlib) remove them as well + while (tkz.HasMoreTokens()) { + wxString lib(tkz.NextToken()); + TrimString(lib); + //remove lib prefix + if (lib.StartsWith(wxT("lib"))) { + lib = lib.Mid(3); + } + + //remove known suffixes + if( lib.EndsWith(wxT(".a")) || + lib.EndsWith(wxT(".so")) || + lib.EndsWith(wxT(".dylib")) || + lib.EndsWith(wxT(".dll")) + ){ + lib = lib.BeforeLast(wxT('.')); + } + + slibs << wxT("$(LibrarySwitch)") << lib << wxT(" "); + } + return slibs; +} + +wxString BuilderGnuMake::GetBuildCommand(const wxString &project) +{ + wxString errMsg, cmd; + //generate the makefile + Export(project, false, errMsg); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + if (!bldConf) { + return wxEmptyString; + } + + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + wxString type = Builder::NormalizeConfigName(matrix->GetSelectedConfigurationName()); + cmd << buildTool << wxT(" \"") << WorkspaceST::Get()->GetName() << wxT("_wsp.mk\" type=") << type; + return cmd; +} + +wxString BuilderGnuMake::GetCleanCommand(const wxString &project) +{ + wxString errMsg, cmd; + //generate the makefile + Export(project, false, errMsg); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + if (!bldConf) { + return wxEmptyString; + } + + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString type = Builder::NormalizeConfigName(matrix->GetSelectedConfigurationName()); + cmd << buildTool << wxT(" \"") << WorkspaceST::Get()->GetName() << wxT("_wsp.mk\" type=") << type << wxT(" clean"); + return cmd; +} + +wxString BuilderGnuMake::GetPOBuildCommand(const wxString &project) +{ + wxString errMsg, cmd; + + //generate the makefile + Export(project, true, errMsg); + + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + if (!bldConf) { + return wxEmptyString; + } + + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + wxString type = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(), project); + + //cd to the project directory + cmd << buildTool << wxT(" \"") << project << wxT(".mk\" type=") << type; + return cmd; +} + +wxString BuilderGnuMake::GetPOCleanCommand(const wxString &project) +{ + wxString errMsg, cmd; + //generate the makefile + Export(project, true, errMsg); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + if (!bldConf) { + return wxEmptyString; + } + + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + wxString type = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(), project); + + //cd to the project directory + cmd << buildTool << wxT(" \"") << project << wxT(".mk\" type=") << type << wxT(" clean"); + return cmd; +} + +wxString BuilderGnuMake::GetSingleFileCmd(const wxString &project, const wxString &fileName) +{ + wxString errMsg, cmd; + //generate the makefile + Export(project, true, errMsg); + BuildConfigPtr bldConf = WorkspaceST::Get()->GetProjSelBuildConf(project); + if (!bldConf) { + return wxEmptyString; + } + + BuildMatrixPtr matrix = WorkspaceST::Get()->GetBuildMatrix(); + wxString buildTool = BuildManagerST::Get()->GetSelectedBuilder()->GetBuildToolCommand(); + buildTool = WorkspaceST::Get()->ExpandVariables(buildTool); + + wxString type = matrix->GetProjectSelectedConf(matrix->GetSelectedConfigurationName(), project); + + //create the target + wxString tareget; + wxString objSuffix; + wxFileName fn(fileName); + + wxString cmpType = bldConf->GetCompilerType(); + CompilerPtr cmp = BuildSettingsConfigST::Get()->GetCompiler(cmpType); + tareget << bldConf->GetIntermediateDirectory() << wxT("/") << fn.GetName() << cmp->GetObjectSuffix(); + + cmd << buildTool << wxT(" \"") << project << wxT(".mk\" type=") << type << wxT(" ") << tareget; + return cmd; +} + +wxString BuilderGnuMake::GetCdCmd(const wxFileName &path1, const wxFileName &path2) +{ + wxString cd_cmd(wxT("@")); + if (path2.GetPath().IsEmpty()) { + return cd_cmd; + } + + if (path1.GetPath() != path2.GetPath()) { + cd_cmd << wxT("cd \"") << path2.GetPath() << wxT("\" && "); + } + return cd_cmd; +} diff --git a/Plugin/builder_gnumake.h b/Plugin/builder_gnumake.h new file mode 100644 index 0000000000..f7e3cb3191 --- /dev/null +++ b/Plugin/builder_gnumake.h @@ -0,0 +1,56 @@ +#ifndef BUILDER_GNUMAKE_H +#define BUILDER_GNUMAKE_H + +#include "builder.h" +#include "workspace.h" +#include +#include + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK BuilderGnuMake : public Builder +{ +public: + BuilderGnuMake(); + virtual ~BuilderGnuMake(); + + /** + * Export the build system specific file (e.g. GNU makefile, Ant file etc) + * to allow users to invoke them manualy from the command line + * \param project project to export. + * \param errMsg output + * \return true on success, false otherwise. + */ + virtual bool Export(const wxString &project, bool isProjectOnly, wxString &errMsg); + virtual wxString GetBuildCommand(const wxString &project); + virtual wxString GetCleanCommand(const wxString &project); + virtual wxString GetPOBuildCommand(const wxString &project); + virtual wxString GetPOCleanCommand(const wxString &project); + virtual wxString GetSingleFileCmd(const wxString &project, const wxString &fileName); + +private: + void GenerateMakefile(ProjectPtr proj); + void CreateConfigsVariables(BuildConfigPtr bldConf, wxString &text); + void CreateMakeDirsTarget(BuildConfigPtr bldConf, const wxString &targetName, wxString &text); + void CreateFileTargets(ProjectPtr proj, wxString &text); + void CreateObjectList(ProjectPtr proj, wxString &text); + void CreateTargets(const wxString &type, BuildConfigPtr bldConf, wxString &text); + void CreatePreBuildEvents(BuildConfigPtr bldConf, wxString &text); + void CreatePostBuildEvents(BuildConfigPtr bldConf, wxString &text); + + wxString GetCdCmd(const wxFileName &path1, const wxFileName &path2); + + wxString ParseIncludePath(const wxString &paths); + wxString ParseLibPath(const wxString &paths); + wxString ParseLibs(const wxString &libs); + wxString ParsePreprocessor(const wxString &prep); + bool HasPrebuildCommands(BuildConfigPtr bldConf) const; + +}; +#endif // BUILDER_GNUMAKE_H diff --git a/Plugin/buildmanager.cpp b/Plugin/buildmanager.cpp new file mode 100644 index 0000000000..ba4afcd852 --- /dev/null +++ b/Plugin/buildmanager.cpp @@ -0,0 +1,63 @@ +#include "buildmanager.h" +#include "builder.h" +#include "builder_gnumake.h" + + +BuildManager::BuildManager() +{ + // register all builders here + AddBuilder(new BuilderGnuMake()); +} + +BuildManager::~BuildManager() +{ + m_builders.clear(); +} + +void BuildManager::AddBuilder(BuilderPtr builder) +{ + wxCriticalSectionLocker locker(m_cs); + if(!builder){ + return; + } + + m_builders[builder->GetName()] = builder; +} + +void BuildManager::RemoveBuilder(const wxString &name) +{ + wxCriticalSectionLocker locker(m_cs); + + std::map::iterator iter = m_builders.find(name); + if(iter != m_builders.end()){ + m_builders.erase(iter); + } +} + +void BuildManager::GetBuilders(std::list &list) +{ + wxCriticalSectionLocker locker(m_cs); + + std::map::iterator iter = m_builders.begin(); + for(; iter != m_builders.end(); iter++){ + list.push_back(iter->second->GetName()); + } +} + +BuilderPtr BuildManager::GetBuilder(const wxString &name) +{ + wxCriticalSectionLocker locker(m_cs); + + std::map::iterator iter = m_builders.begin(); + for(; iter != m_builders.end(); iter++){ + if(iter->first == name){ + return iter->second; + } + } + return NULL; +} + +BuilderPtr BuildManager::GetSelectedBuilder() +{ + return m_builders.begin()->second; +} diff --git a/Plugin/buildmanager.h b/Plugin/buildmanager.h new file mode 100644 index 0000000000..0866cd8389 --- /dev/null +++ b/Plugin/buildmanager.h @@ -0,0 +1,60 @@ +#ifndef BUILDMANAGER_H +#define BUILDMANAGER_H + +#include +#include +#include "wx/string.h" +#include "singleton.h" +#include "builder.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +//class BuildManager; + +/** + * \ingroup SDK + * The build manager class which contains all the builders currently + * available to the editor + * + * Each and every call to this class is protected by a critical section to make this + * class safe when used inside the compiler thread + * + * \version 1.0 + * first version + * + * \date 05-19-2007 + * + * \author Eran + * + */ +class WXDLLIMPEXP_LE_SDK BuildManager { + + friend class Singleton; + std::map m_builders; + wxCriticalSection m_cs; + +public: + typedef std::map::const_iterator ConstIterator; + +private: + BuildManager(); + virtual ~BuildManager(); + +public: + void AddBuilder(BuilderPtr builder); + void RemoveBuilder(const wxString &name); + void GetBuilders(std::list &list); + BuilderPtr GetBuilder(const wxString &name); + BuilderPtr GetSelectedBuilder(); +}; + +typedef Singleton BuildManagerST; + +#endif // BUILDMANAGER_H + diff --git a/Plugin/clean_request.cpp b/Plugin/clean_request.cpp new file mode 100644 index 0000000000..4f809827ef --- /dev/null +++ b/Plugin/clean_request.cpp @@ -0,0 +1,60 @@ +#include "clean_request.h" +#include "buildmanager.h" +#include "wx/process.h" +#include "dirsaver.h" +#include "workspace.h" + +CleanRequest::CleanRequest(wxEvtHandler *owner, const wxString &projectName, bool projectOnly) +: CompilerAction(owner) +, m_project(projectName) +, m_projectOnly(projectOnly) +{ + +} + +CleanRequest::~CleanRequest() +{ + //no need to delete the process, it will be deleted by the wx library +} + + +//do the actual cleanup +void CleanRequest::Process() +{ + wxString cmd; + SetBusy(true); + + //TODO:: make the builder name configurable + BuilderPtr builder = BuildManagerST::Get()->GetBuilder(wxT("GNU makefile for g++/gcc")); + if(m_projectOnly){ + cmd = builder->GetPOCleanCommand(m_project); + }else{ + cmd = builder->GetCleanCommand(m_project); + } + + SendStartMsg(); + + m_proc = new clProcess(wxNewId(), cmd); + if(m_proc){ + DirSaver ds; + if(m_projectOnly){ + //need to change directory to project dir + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(m_project, errMsg); + if(proj){ + ::wxSetWorkingDirectory(proj->GetFileName().GetPath()); + } + } + if(m_proc->Start() == 0){ + wxString message; + message << wxT("Failed to start clean process, command: ") << cmd << wxT(", process terminated with exit code: 0"); + AppendLine(message); + SetBusy(false); + delete m_proc; + return; + } + Connect(wxEVT_TIMER, wxTimerEventHandler(CleanRequest::OnTimer), NULL, this); + m_proc->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(CleanRequest::OnProcessEnd), NULL, this); + m_timer->Start(10); + } +} diff --git a/Plugin/clean_request.h b/Plugin/clean_request.h new file mode 100644 index 0000000000..e8b62dbf95 --- /dev/null +++ b/Plugin/clean_request.h @@ -0,0 +1,42 @@ +#ifndef CLEAN_REQUEST_H +#define CLEAN_REQUEST_H +#include "compiler_action.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/** + * \class CleanRequest + * \brief + * \author Eran + * \date 07/22/07 + */ +class WXDLLIMPEXP_LE_SDK CleanRequest : public CompilerAction { + wxString m_project; + bool m_projectOnly; + +public: + /** + * Construct a compilation clean request. The compiler thread will clean the selected project and all + * its dependencies as appeard in the build order dialog + * \param projectName the selected project to build + * \param configurationName the workspace selected configuration + */ + CleanRequest(wxEvtHandler *owner, const wxString &projectName, bool projectOnly); + + ///dtor + virtual ~CleanRequest(); + + //process the request + virtual void Process(); + + //setters/getters + const wxString &GetProjectName() const { return m_project; } +}; + +#endif // CLEAN_REQUEST_H diff --git a/Plugin/compile_request.cpp b/Plugin/compile_request.cpp new file mode 100644 index 0000000000..5b54174a73 --- /dev/null +++ b/Plugin/compile_request.cpp @@ -0,0 +1,88 @@ +#include "compile_request.h" +#include "buildmanager.h" +#include "wx/process.h" +#include "workspace.h" +#include "dirsaver.h" + +CompileRequest::CompileRequest(wxEvtHandler *owner, const wxString &projectName, bool projectOnly, const wxString &fileName) +: CompilerAction(owner) +, m_project(projectName) +, m_projectOnly(projectOnly) +, m_fileName(fileName) +{ +} + +CompileRequest::~CompileRequest() +{ + //no need to delete the process, it will be deleted by the wx library +} + +//do the actual cleanup +void CompileRequest::Process() +{ + wxString cmd; + SetBusy(true); + + //TODO:: make the builder name configurable + BuilderPtr builder = BuildManagerST::Get()->GetBuilder(wxT("GNU makefile for g++/gcc")); + if(m_fileName.IsEmpty() == false){ + //we got a complie request of a single file + cmd = builder->GetSingleFileCmd(m_project, m_fileName); + }else if(m_projectOnly){ + cmd = builder->GetPOBuildCommand(m_project); + }else{ + cmd = builder->GetBuildCommand(m_project); + } + + SendStartMsg(); + if(cmd.IsEmpty()){ + AppendLine(wxT("Command line is empty. Build aborted.")); + SetBusy(false); + return; + } + + m_proc = new clProcess(wxNewId(), cmd); + if(m_proc){ + DirSaver ds; + if(m_projectOnly || m_fileName.IsEmpty() == false){ + //need to change directory to project dir + wxString errMsg; + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(m_project, errMsg); + if(proj){ + ::wxSetWorkingDirectory(proj->GetFileName().GetPath()); + } + + wxString configName; + int where = cmd.Find(wxT("type=")); + if(where != wxNOT_FOUND){ + configName = cmd.Mid((size_t)where); + //skip type= + configName = configName.AfterFirst(wxT('=')); + configName = configName.BeforeFirst(wxT(' ')); + } + + //also, send another message to the main frame, indicating which project is being built + //and what configuration + wxString text; + text << wxT("----------Building project:[ ") << m_project << wxT(" - ") << configName << wxT(" ]"); + if(m_fileName.IsEmpty() == false){ + text << wxT(" (Single File Build)----------\n"); + }else{ + text << wxT("----------\n"); + } + AppendLine(text); + } + if(m_proc->Start() == 0){ + wxString message; + message << wxT("Failed to start build process, command: ") << cmd << wxT(", process terminated with exit code: 0"); + AppendLine(message); + delete m_proc; + SetBusy(false); + return; + } + + Connect(wxEVT_TIMER, wxTimerEventHandler(CompileRequest::OnTimer), NULL, this); + m_proc->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(CompileRequest::OnProcessEnd), NULL, this); + m_timer->Start(10); + } +} diff --git a/Plugin/compile_request.h b/Plugin/compile_request.h new file mode 100644 index 0000000000..d2c7130ca8 --- /dev/null +++ b/Plugin/compile_request.h @@ -0,0 +1,38 @@ +#ifndef COMPILE_REQUEST_H +#define COMPILE_REQUEST_H + +#include "compiler_action.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK CompileRequest : public CompilerAction { + wxString m_project; + bool m_projectOnly; + wxString m_fileName; + +public: + /** + * Construct a compilation request. The compiler thread will build the selected project and all + * its dependencies as appeard in the build order dialog + * \param projectName the selected project to build + * \param configurationName the workspace selected configuration + */ + CompileRequest(wxEvtHandler *owner, const wxString &projectName, bool projectOnly = false, const wxString &fileName = wxEmptyString); + + ///dtor + virtual ~CompileRequest(); + + //process the request + virtual void Process(); + + //setters/getters + const wxString &GetProjectName() const { return m_project; } +}; + +#endif // COMPILE_REQUEST_H diff --git a/Plugin/compiler.cpp b/Plugin/compiler.cpp new file mode 100644 index 0000000000..c55579db4c --- /dev/null +++ b/Plugin/compiler.cpp @@ -0,0 +1,128 @@ +#include "compiler.h" +#include "xmlutils.h" + +Compiler::Compiler(wxXmlNode *node) +{ + if(node){ + m_name = XmlUtils::ReadString(node, wxT("Name")); + wxXmlNode *child = node->GetChildren(); + while(child){ + if(child->GetName() == wxT("Switch")){ + m_switches[XmlUtils::ReadString(child, wxT("Name"))] = XmlUtils::ReadString(child, wxT("Value")); + } + + if(child->GetName() == wxT("Tool")){ + m_tools[XmlUtils::ReadString(child, wxT("Name"))] = XmlUtils::ReadString(child, wxT("Value")); + } + + if(child->GetName() == wxT("Option")){ + if(XmlUtils::ReadString(child, wxT("Name")) == wxT("ObjectSuffix")){ + m_objectSuffix = XmlUtils::ReadString(child, wxT("Value")); + } + } + + if(child->GetName() == wxT("Pattern")){ + if(XmlUtils::ReadString(child, wxT("Name")) == wxT("Error")){ + //found the error description + m_errorFileNameIndex = XmlUtils::ReadString(child, wxT("FileNameIndex")); + m_errorLineNubmerIndex = XmlUtils::ReadString(child, wxT("LineNumberIndex")); + m_errorPattern = child->GetNodeContent(); + }else if(XmlUtils::ReadString(child, wxT("Name")) == wxT("Warning")){ + //found the warning description + m_warningFileNameIndex = XmlUtils::ReadString(child, wxT("FileNameIndex")); + m_warningLineNubmerIndex = XmlUtils::ReadString(child, wxT("LineNumberIndex")); + m_warningPattern = child->GetNodeContent(); + } + } + child = child->GetNext(); + } + } else { + //create a default compiler: + //g++ + m_name = wxT("gnu g++"); + m_switches[wxT("Include")] = wxT("-I"); + m_switches[wxT("Debug")] = wxT("-g"); + m_switches[wxT("Preprocessor")] = wxT("-D"); + m_switches[wxT("Library")] = wxT("-l"); + m_switches[wxT("LibraryPath")] = wxT("-L"); + m_switches[wxT("Source")] = wxT("-c"); + m_switches[wxT("Output")] = wxT("-o"); + m_objectSuffix = wxT(".o"); + m_errorPattern = wxT("(^[a-zA-Z\\.0-9_/]+ *)(:)([0-9]+)"); + m_errorFileNameIndex = wxT("1"); + m_errorLineNubmerIndex = wxT("3"); + m_warningPattern = wxT("(^[a-zA-Z\\.0-9_/]+ *)(:)([0-9]+)"); + m_warningFileNameIndex = wxT("1"); + m_warningLineNubmerIndex = wxT("3"); + m_tools[wxT("LinkerName")] = wxT("g++"); + m_tools[wxT("SharedObjectLinkerName")] = wxT("g++ -shared"); + m_tools[wxT("CompilerName")] = wxT("g++"); + m_tools[wxT("ArchiveTool")] = wxT("ar rcu"); + m_tools[wxT("ResourceCompiler")] = wxT("windres"); + } +} + +Compiler::~Compiler() +{ +} + +wxXmlNode *Compiler::ToXml() const +{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Compiler")); + node->AddProperty(wxT("Name"), m_name); + + std::map::const_iterator iter = m_switches.begin(); + for(; iter != m_switches.end(); iter++){ + wxXmlNode *child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Switch")); + child->AddProperty(wxT("Name"), iter->first); + child->AddProperty(wxT("Value"), iter->second); + node->AddChild(child); + } + + iter = m_tools.begin(); + for(; iter != m_tools.end(); iter++){ + wxXmlNode *child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Tool")); + child->AddProperty(wxT("Name"), iter->first); + child->AddProperty(wxT("Value"), iter->second); + node->AddChild(child); + } + + wxXmlNode *options = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Option")); + options->AddProperty(wxT("Name"), wxT("ObjectSuffix")); + options->AddProperty(wxT("Value"), m_objectSuffix); + node->AddChild(options); + + //add patterns + wxXmlNode *error = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Pattern")); + error->AddProperty(wxT("Name"), wxT("Error")); + error->AddProperty(wxT("FileNameIndex"), m_errorFileNameIndex); + error->AddProperty(wxT("LineNumberIndex"), m_errorLineNubmerIndex); + XmlUtils::SetNodeContent(error, m_errorPattern); + node->AddChild(error); + + wxXmlNode *warning = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Pattern")); + warning->AddProperty(wxT("Name"), wxT("Warning")); + warning->AddProperty(wxT("FileNameIndex"), m_warningFileNameIndex); + warning->AddProperty(wxT("LineNumberIndex"), m_warningLineNubmerIndex); + XmlUtils::SetNodeContent(warning, m_warningPattern); + node->AddChild(warning); + return node; +} + +wxString Compiler::GetSwitch(const wxString &name) const +{ + std::map::const_iterator iter = m_switches.find(name); + if(iter == m_switches.end()){ + return wxEmptyString; + } + return iter->second; +} + +wxString Compiler::GetTool(const wxString &name) const +{ + std::map::const_iterator iter = m_tools.find(name); + if(iter == m_tools.end()){ + return wxEmptyString; + } + return iter->second; +} diff --git a/Plugin/compiler.h b/Plugin/compiler.h new file mode 100644 index 0000000000..6cdb1724e8 --- /dev/null +++ b/Plugin/compiler.h @@ -0,0 +1,82 @@ +#ifndef COMPILER_H +#define COMPILER_H + +#include "configuration_object.h" +#include "smart_ptr.h" +#include "map" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/** + * \ingroup LiteEditor + * This class represenets a compiler entry in the configuration file + * + * \version 1.0 + * first version + * + * \date 05-25-2007 + * + * \author Eran + */ +class WXDLLIMPEXP_LE_SDK Compiler : public ConfObject { + wxString m_name; + std::map m_switches; + wxString m_objectSuffix; + + wxString m_errorPattern; + wxString m_errorLineNubmerIndex; + wxString m_errorFileNameIndex; + + wxString m_warningPattern; + wxString m_warningLineNubmerIndex; + wxString m_warningFileNameIndex; + + std::map m_tools; + +public: + typedef std::map::const_iterator ConstIterator; + + Compiler(wxXmlNode *node); + virtual ~Compiler(); + + wxXmlNode *ToXml() const; + + //iteration over switches + Compiler::ConstIterator SwitchesBegin() const { return m_switches.begin(); } + Compiler::ConstIterator SwitchesEnd() const { return m_switches.end(); } + + //--------------------------------------------------- + //setters/getters + //--------------------------------------------------- + wxString GetTool(const wxString &name) const; + void SetTool(const wxString &name, const wxString &tool){ m_tools[name] = tool; } + + wxString GetSwitch(const wxString &name) const; + void SetSwitch(const wxString &name, const wxString &value) { m_switches[name] = value; } + const wxString &GetObjectSuffix() const { return m_objectSuffix; } + void SetObjectSuffix(const wxString &suffix) { m_objectSuffix = suffix; } + void SetName(const wxString &name) { m_name = name;} + const wxString &GetName() const { return m_name; } + const wxString &GetErrPattern() const { return m_errorPattern; } + const wxString &GetErrFileNameIndex() const { return m_errorFileNameIndex; } + const wxString &GetErrLineNumberIndex() const { return m_errorLineNubmerIndex; } + const wxString &GetWarnPattern() const { return m_warningPattern; } + const wxString &GetWarnFileNameIndex() const { return m_warningFileNameIndex; } + const wxString &GetWarnLineNumberIndex() const { return m_warningLineNubmerIndex; } + + void SetErrPattern(const wxString &s) { m_errorPattern = s; } + void SetErrFileNameIndex(const wxString &s) { m_errorFileNameIndex = s; } + void SetErrLineNumberIndex(const wxString &s) { m_errorLineNubmerIndex = s; } + void SetWarnPattern(const wxString &s) { m_warningPattern = s; } + void SetWarnFileNameIndex(const wxString &s) { m_warningFileNameIndex = s; } + void SetWarnLineNumberIndex(const wxString &s) { m_warningLineNubmerIndex = s; }; +}; + +typedef SmartPtr CompilerPtr; +#endif // COMPILER_H diff --git a/Plugin/compiler_action.cpp b/Plugin/compiler_action.cpp new file mode 100644 index 0000000000..916233137b --- /dev/null +++ b/Plugin/compiler_action.cpp @@ -0,0 +1,125 @@ +#include "compiler_action.h" +#include "wx/tokenzr.h" + +DEFINE_EVENT_TYPE(wxEVT_BUILD_ADDLINE) +DEFINE_EVENT_TYPE(wxEVT_BUILD_STARTED) +DEFINE_EVENT_TYPE(wxEVT_BUILD_ENDED) + +CompilerAction::CompilerAction(wxEvtHandler *owner) +: m_proc(NULL) +, m_owner(owner) +, m_busy(false) +, m_stop(false) +{ + m_timer = new wxTimer(this); +} + +void CompilerAction::AppendLine(const wxString &line) +{ + if( !m_owner) + return; + + wxCommandEvent event(wxEVT_BUILD_ADDLINE); + event.SetString(line); + m_owner->ProcessEvent(event); + + m_lines.Add(line); +} + +void CompilerAction::Stop() +{ + m_stop = true; + //kill the build process + if(m_proc){ + m_proc->Terminate(); + CleanUp(); + } +} + +void CompilerAction::SendStartMsg() +{ + if( !m_owner) + return; + + wxCommandEvent event(wxEVT_BUILD_STARTED); + m_owner->ProcessEvent(event); +} + +void CompilerAction::SendEndMsg() +{ + if( !m_owner) + return; + + wxCommandEvent event(wxEVT_BUILD_ENDED); + m_owner->ProcessEvent(event); +} + +void CompilerAction::OnTimer(wxTimerEvent &event) +{ + wxUnusedVar(event); + if( m_stop ){ + m_proc->Terminate(); + return; + } + PrintOutput(); +} + +void CompilerAction::PrintOutput() +{ + wxString data, errors; + m_proc->HasInput(data, errors); + DoPrintOutput(data, errors); +} + +void CompilerAction::OnProcessEnd(wxProcessEvent& event) +{ + wxUnusedVar(event); + if( !m_stop ){ + //read all input before stopping the timer + wxString err; + wxString out; + while(m_proc->HasInput(out, err)){ + DoPrintOutput(out, err); + out.Empty(); + err.Empty(); + } + CleanUp(); + } + event.Skip(); +} + +void CompilerAction::DoPrintOutput(const wxString &out, const wxString &err) +{ + //loop over the lines read from the compiler + wxStringTokenizer tkz(out, wxT("\n")); + while(tkz.HasMoreTokens()){ + wxString line = tkz.NextToken(); + if( line.Contains(wxT("Entering directory")) || + line.Contains(wxT("Leaving directory")) || + line.Contains(wxT("type attributes are honored only at type definition")) || + line.Contains(wxT("type attributes ignored after type is already defined")) || + line.StartsWith(wxT("# ")) + ){ + //skip it + continue; + }else{ + //print it + AppendLine(line + wxT("\n")); + } + } + + if(!err.IsEmpty()){ + wxStringTokenizer tt(err, wxT("\n")); + while(tt.HasMoreTokens()){ + AppendLine(tt.NextToken() + wxT("\n")); + } + } +} + +void CompilerAction::CleanUp() +{ + m_timer->Stop(); + m_busy = false; + m_stop = false; + SendEndMsg(); +} diff --git a/Plugin/compiler_action.h b/Plugin/compiler_action.h new file mode 100644 index 0000000000..7416054d87 --- /dev/null +++ b/Plugin/compiler_action.h @@ -0,0 +1,73 @@ +#ifndef COMPILER_ACTION_H +#define COMPILER_ACTION_H + +#include "worker_thread.h" +#include "wx/event.h" +#include "cl_process.h" +#include "wx/timer.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_BUILD_ADDLINE, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_BUILD_STARTED, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_BUILD_ENDED, wxID_ANY) + +/** + * \class CompilerAction + * \brief + * \author Eran + * \date 07/22/07 + */ +class WXDLLIMPEXP_LE_SDK CompilerAction : public wxEvtHandler, public ThreadRequest { +protected: + clProcess *m_proc; + wxEvtHandler *m_owner; + wxTimer *m_timer; + bool m_busy; + bool m_stop; + wxArrayString m_lines; + +protected: + virtual void OnTimer(wxTimerEvent &event); + virtual void OnProcessEnd(wxProcessEvent& event); + virtual void PrintOutput(); + virtual void DoPrintOutput(const wxString &out, const wxString &errs); + void CleanUp(); + +public: + bool IsBusy() const { return m_busy; } + void SetBusy(bool busy) { m_busy = busy; } + void Stop(); + bool GetLines(wxArrayString &lines) {lines = m_lines; return true;} + +public: + //construct a compiler action + // \param owner the window owner for this action + CompilerAction(wxEvtHandler *owner); + + /** + * \brief + * \return + */ + virtual ~CompilerAction() + { + delete m_timer; + }; + + /** + * \brief + * \return + */ + virtual void Process() = 0; + + void AppendLine(const wxString &line); + void SendStartMsg(); + void SendEndMsg(); +}; +#endif diff --git a/Plugin/configtool.cpp b/Plugin/configtool.cpp new file mode 100644 index 0000000000..5268f66e14 --- /dev/null +++ b/Plugin/configtool.cpp @@ -0,0 +1,76 @@ +#include "configtool.h" +#include "xmlutils.h" +#include "serialized_object.h" +#include "wx/filename.h" +#include "wx/ffile.h" + +ConfigTool::ConfigTool() +: m_fileName(wxEmptyString) +{ +} + +ConfigTool::~ConfigTool() +{ +} + +bool ConfigTool::Load(const wxString &fileName) +{ + wxFileName fn(fileName); + m_fileName = fn.GetFullPath(); + + if(fn.FileExists() == false){ + //no such file, create an empty file + wxString content; + content << wxT(""); + wxFFile file; + file.Open(fn.GetFullPath(), wxT("w+b")); + if(file.IsOpened()){ + file.Write(content); + file.Close(); + } + } + return m_doc.Load(m_fileName); +} + +bool ConfigTool::WriteObject(const wxString &name, SerializedObject *obj) +{ + if(m_doc.IsOk() == false){ + return false; + } + Archive arch; + wxXmlNode *child = XmlUtils::FindNodeByName(m_doc.GetRoot(), wxT("ArchiveObject"), name); + if (child) { + wxXmlNode *n = m_doc.GetRoot(); + n->RemoveChild(child); + delete child; + } + + //create new xml node for this object + child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("ArchiveObject")); + m_doc.GetRoot()->AddChild(child); + child->AddProperty(wxT("Name"), name); + + arch.SetXmlNode(child); + //serialize the object into the archive + obj->Serialize(arch); + //save the archive + return m_doc.Save(m_fileName); +} + + +bool ConfigTool::ReadObject(const wxString &name, SerializedObject *obj) +{ + if(m_doc.IsOk() == false){ + return false; + } + + //find the object node in the xml file + wxXmlNode *node = XmlUtils::FindNodeByName(m_doc.GetRoot(), wxT("ArchiveObject"), name); + if (node) { + Archive arch; + arch.SetXmlNode(node); + obj->DeSerialize(arch); + return true; + } + return false; +} diff --git a/Plugin/configtool.h b/Plugin/configtool.h new file mode 100644 index 0000000000..333838bc78 --- /dev/null +++ b/Plugin/configtool.h @@ -0,0 +1,28 @@ +#ifndef CONFIGTOOL_H +#define CONFIGTOOL_H + +#include "wx/xml/xml.h" + +class SerializedObject; + +/** + * \class ConfigTool + * \brief this class provides a simple class that allows writing serialized classes to disk + * \author Eran + * \date 11/18/07 + */ +class ConfigTool +{ + wxXmlDocument m_doc; + wxString m_fileName; +public: + ConfigTool(); + ~ConfigTool(); + + bool Load(const wxString &filename); + bool WriteObject(const wxString &name, SerializedObject *obj); + bool ReadObject(const wxString &name, SerializedObject *obj); +}; + +#endif //CONFIGTOOL_H + diff --git a/Plugin/configuration_mapping.cpp b/Plugin/configuration_mapping.cpp new file mode 100644 index 0000000000..da856994ce --- /dev/null +++ b/Plugin/configuration_mapping.cpp @@ -0,0 +1,171 @@ +#include "configuration_mapping.h" +#include "xmlutils.h" +#include "macros.h" + +BuildMatrix::BuildMatrix(wxXmlNode *node){ + if(node){ + wxXmlNode *config = node->GetChildren(); + while(config){ + if(config->GetName() == wxT("WorkspaceConfiguration")){ + m_configurationList.push_back(new WorkspaceConfiguration(config)); + } + config = config->GetNext(); + } + }else{ + //construct default empty mapping with a default build configuration + m_configurationList.push_back(new WorkspaceConfiguration(wxT("Debug"), true)); + } +} + +BuildMatrix::~BuildMatrix(){ +} + +wxXmlNode *BuildMatrix::ToXml() const { + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("BuildMatrix")); + std::list::const_iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + node->AddChild((*iter)->ToXml()); + } + return node; +} + +void BuildMatrix::RemoveConfiguration(const wxString &configName){ + bool isSelected = false; + std::list::iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + if((*iter)->GetName() == configName){ + isSelected = (*iter)->IsSelected(); + m_configurationList.erase(iter); + break; + } + } + + if(isSelected){ + //the deleted configuration was the selected one, + //set the first one as selected + if(m_configurationList.empty() == false){ + (*m_configurationList.begin())->SetSelected(true); + } + } +} + +void BuildMatrix::SetConfiguration(WorkspaceConfigurationPtr conf){ + RemoveConfiguration(conf->GetName()); + m_configurationList.push_back(conf); +} + +wxString BuildMatrix::GetProjectSelectedConf(const wxString &configName, const wxString &project) const +{ + std::list::const_iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + if((*iter)->GetName() == configName){ + WorkspaceConfiguration::ConfigMappingList list = (*iter)->GetMapping(); + WorkspaceConfiguration::ConfigMappingList::const_iterator it = list.begin(); + for(; it != list.end(); it++){ + if((*it).m_project == project){ + return (*it).m_name; + } + } + break; + } + } + return wxEmptyString; +} + + +wxString BuildMatrix::GetSelectedConfigurationName() const +{ + std::list::const_iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + if((*iter)->IsSelected()){ + return (*iter)->GetName(); + } + } + return wxEmptyString; +} + +WorkspaceConfigurationPtr BuildMatrix::GetConfigurationByName(const wxString &name) const +{ + return FindConfiguration(name); +} + +WorkspaceConfigurationPtr BuildMatrix::FindConfiguration(const wxString &name) const +{ + std::list::const_iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + if((*iter)->GetName() == name){ + return (*iter); + } + } + return NULL; +} + +void BuildMatrix::SetSelectedConfigurationName(const wxString &name) +{ + //find the current selected configuration + std::list::iterator iter = m_configurationList.begin(); + for(; iter != m_configurationList.end(); iter++){ + if((*iter)->IsSelected()){ + (*iter)->SetSelected(false); + break; + } + } + //set the new one + WorkspaceConfigurationPtr c = FindConfiguration(name); + if(c){ + c->SetSelected(true); + } +} + +//------------------------------------------------ +// WorkspaceConfiguration object +//------------------------------------------------ +WorkspaceConfiguration::WorkspaceConfiguration() +: m_name(wxEmptyString) +, m_isSelected(false) +{ +} + +WorkspaceConfiguration::WorkspaceConfiguration(const wxString &name, bool selected) +: m_name(name) +, m_isSelected(selected) +{ +} + +WorkspaceConfiguration::WorkspaceConfiguration(wxXmlNode *node){ + if(node){ + m_name = XmlUtils::ReadString(node, wxT("Name")); + m_isSelected = XmlUtils::ReadBool(node, wxT("Selected")); + wxXmlNode *child = node->GetChildren(); + while(child){ + if(child->GetName() == wxT("Project")){ + wxString projName = XmlUtils::ReadString(child, wxT("Name")); + wxString conf = XmlUtils::ReadString(child, wxT("ConfigName")); + m_mappingList.push_back(ConfigMappingEntry(projName, conf)); + } + child = child->GetNext(); + } + }else{ + m_isSelected = false; + m_name = wxEmptyString; + } +} + +WorkspaceConfiguration::~WorkspaceConfiguration(){ +} + +wxXmlNode *WorkspaceConfiguration::ToXml() const{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("WorkspaceConfiguration")); + node->AddProperty(wxT("Name"), m_name); + node->AddProperty(wxT("Selected"), BoolToString(m_isSelected)); + + WorkspaceConfiguration::ConfigMappingList::const_iterator iter = m_mappingList.begin(); + for(; iter != m_mappingList.end(); iter++){ + wxXmlNode *projNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Project")); + projNode->AddProperty(wxT("Name"), iter->m_project); + projNode->AddProperty(wxT("ConfigName"), iter->m_name); + node->AddChild(projNode); + } + return node; +} + diff --git a/Plugin/configuration_mapping.h b/Plugin/configuration_mapping.h new file mode 100644 index 0000000000..b14655046d --- /dev/null +++ b/Plugin/configuration_mapping.h @@ -0,0 +1,84 @@ +#ifndef CONFIGURATION_MAPPING_H +#define CONFIGURATION_MAPPING_H + +#include "wx/string.h" +#include "wx/xml/xml.h" +#include "list" +#include "smart_ptr.h" + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif + +class WXDLLIMPEXP_LE_SDK ConfigMappingEntry { +public: + wxString m_project; + wxString m_name; + +public: + ConfigMappingEntry(const wxString &project, const wxString &name) + : m_project(project), m_name(name) + {} + + ConfigMappingEntry() + : m_project(wxEmptyString), m_name(wxEmptyString) + {} + + virtual ~ConfigMappingEntry() + {} +}; + +class WXDLLIMPEXP_LE_SDK WorkspaceConfiguration { +public: + typedef std::list ConfigMappingList; + +private: + wxString m_name; + ConfigMappingList m_mappingList; + bool m_isSelected; + +public: + WorkspaceConfiguration(); + WorkspaceConfiguration(wxXmlNode *node); + WorkspaceConfiguration(const wxString &name, bool selected); + virtual ~WorkspaceConfiguration(); + wxXmlNode *ToXml() const; + + void SetSelected(bool selected) { m_isSelected = selected; } + bool IsSelected() const { return m_isSelected; } + const wxString &GetName() const{ return m_name; } + const ConfigMappingList &GetMapping() const { return m_mappingList; } + void SetConfigMappingList(const ConfigMappingList &mapList) { m_mappingList = mapList; } + void SetName(const wxString &name){ m_name = name; } +}; + +typedef SmartPtr WorkspaceConfigurationPtr; + +class WXDLLIMPEXP_LE_SDK BuildMatrix { + std::list m_configurationList; + +protected: + WorkspaceConfigurationPtr FindConfiguration(const wxString &name) const; + +public: + BuildMatrix(wxXmlNode *node); + virtual ~BuildMatrix(); + wxXmlNode *ToXml() const; + const std::list& GetConfigurations() const { return m_configurationList; }; + void RemoveConfiguration(const wxString &configName); + void SetConfiguration(WorkspaceConfigurationPtr conf); + wxString GetProjectSelectedConf(const wxString &configName, const wxString &project) const; + wxString GetSelectedConfigurationName() const; + void SetSelectedConfigurationName(const wxString &name); + WorkspaceConfigurationPtr GetConfigurationByName(const wxString &name) const; +}; + +typedef SmartPtr BuildMatrixPtr; + +#endif // CONFIGURATION_MAPPING_H diff --git a/Plugin/configuration_object.h b/Plugin/configuration_object.h new file mode 100644 index 0000000000..47898cd737 --- /dev/null +++ b/Plugin/configuration_object.h @@ -0,0 +1,29 @@ +#ifndef CONF_OBJECT_H +#define CONF_OBJECT_H + +#include "wx/xml/xml.h" +#include "smart_ptr.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class wxXmlNode; + +/** + * Interface of configuration objects + */ +class WXDLLIMPEXP_LE_SDK ConfObject { +public: + ConfObject(){}; + virtual ~ConfObject(){} + + virtual wxXmlNode *ToXml() const = 0; +}; + +typedef SmartPtr ConfObjectPtr; +#endif // CONFIGURATION_OBJECT_H diff --git a/Plugin/consolefinder.cp b/Plugin/consolefinder.cp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Plugin/consolefinder.cpp b/Plugin/consolefinder.cpp new file mode 100644 index 0000000000..cd44645569 --- /dev/null +++ b/Plugin/consolefinder.cpp @@ -0,0 +1,158 @@ +#include "consolefinder.h" +#include "procutils.h" +#include "exelocator.h" + +ConsoleFinder::ConsoleFinder() +: m_nConsolePid(0) +{ +} + +ConsoleFinder::~ConsoleFinder() +{ + FreeConsole(); +} + +void ConsoleFinder::FreeConsole() +{ + if(m_nConsolePid){ + wxKill(m_nConsolePid); + m_nConsolePid = 0; + } +} + +int ConsoleFinder::RunConsole(const wxString &title) +{ + // start the xterm and put the shell to sleep with -e sleep 80000 + // fetch the xterm tty so we can issue to gdb a "tty /dev/pts/#" + // redirecting program stdin/stdout/stderr to the xterm console. + +#ifndef __WXMSW__ + wxString cmd; + wxString term; + +#if defined (__WXGTK__) + cmd << wxT("xterm -title "); + cmd << wxT("'") << title << wxT("'"); + cmd << wxT(" -e "); + cmd << wxT("sleep "); + cmd << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId()); +#elif defined (__WXMAC__) + cmd << wxT("osascript -e 'tell application \"Terminal\"' -e 'activate' -e 'do script with command \"sleep ") + << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId()) + << wxT("\"' -e 'end tell'"); +#endif + + //start xterm -e sleep {some unique # of seconds} + m_nConsolePid = wxExecute(cmd, wxEXEC_ASYNC); + if (m_nConsolePid <= 0){ + return -1; + } + + // Issue the PS command to get the /dev/tty device name + // First, wait for the xterm to settle down, else PS won't see the sleep task + wxSleep(1); + m_ConsoleTty = GetConsoleTty(m_nConsolePid); + if(m_ConsoleTty.IsEmpty()){ + FreeConsole(); + return -1; + } + return m_nConsolePid; + +#else //__WXMSW__ + wxUnusedVar(title); + return -1; +#endif +} + +wxString ConsoleFinder::GetConsoleTty(int ConsolePid) +{ +#ifndef __WXMSW__ + // execute the ps x -o command and read PS output to get the /dev/tty field + unsigned long ConsPid = ConsolePid; + wxString psCmd; + wxArrayString psOutput; + wxArrayString psErrors; + + psCmd << wxT("ps x -o tty,pid,command"); + ProcUtils::ExecuteCommand(psCmd, psOutput); + + wxString ConsTtyStr; + wxString ConsPidStr; + ConsPidStr << ConsPid; + //find task with our unique sleep time + wxString uniqueSleepTimeStr; + uniqueSleepTimeStr << wxT("sleep ") << wxString::Format(wxT("%d"),80000 + ::wxGetProcessId()); + // search the output of "ps pid" command + int knt = psOutput.GetCount(); + for (int i=knt-1; i>-1; --i) { + psCmd = psOutput.Item(i); + // find the pts/# or tty/# or whatever it's called + // by seaching the output of "ps x -o tty,pid,command" command. + // The output of ps looks like: + // TT PID COMMAND + // pts/0 13342 /bin/sh ./run.sh + // pts/0 13343 /home/pecanpecan/devel/trunk/src/devel/codeblocks + // pts/0 13361 /usr/bin/gdb -nx -fullname -quiet -args ./conio + // pts/0 13362 xterm -font -*-*-*-*-*-*-20-*-*-*-*-*-*-* -T Program Console -e sleep 93343 + // pts/2 13363 sleep 93343 + // ? 13365 /home/pecan/proj/conio/conio + // pts/1 13370 ps x -o tty,pid,command + + if (psCmd.Contains(uniqueSleepTimeStr)) + do { // check for correct "sleep" line + if (psCmd.Contains(wxT("-T"))) break; //error;wrong sleep line. + // found "sleep 93343" string, extract tty field + ConsTtyStr = wxT("/dev/") + psCmd.BeforeFirst(' '); + return ConsTtyStr; + } while (0);//if do + }//for + return wxEmptyString; +#else + wxUnusedVar(ConsolePid); + return wxEmptyString; +#endif +} + +bool ConsoleFinder::FindConsole(const wxString &title, wxString &consoleName) +{ + int pid = RunConsole(title); + if (pid > 0) { + consoleName = m_ConsoleTty; + return true; + } + return false; +} + +wxString ConsoleFinder::GetConsoleName() +{ + wxString cmd; +#ifdef __WXMSW__ + wxChar *shell = wxGetenv(wxT("COMSPEC")); + if ( !shell ){ + shell = wxT("\\COMMAND.COM"); + } + + // just the shell + cmd = shell; +#else //non-windows + //try to locate the default terminal + wxString terminal; + wxString where; + if(ExeLocator::Locate(wxT("gnome-terminal"), where)){ + terminal = wxT("gnome-terminal -e "); + } + else if(ExeLocator::Locate(wxT("konsole"), where)){ + terminal = wxT("konsole"); + } + else if(ExeLocator::Locate(wxT("xterm"), where)){ + terminal = wxT("xterm -e "); + } + + if(cmd.IsEmpty()){ + cmd = wxT("xterm -e "); + } + + cmd = terminal; +#endif + return cmd; +} diff --git a/Plugin/consolefinder.h b/Plugin/consolefinder.h new file mode 100644 index 0000000000..d7745cbc62 --- /dev/null +++ b/Plugin/consolefinder.h @@ -0,0 +1,36 @@ +#ifndef CONSOLEFINDER_H +#define CONSOLEFINDER_H + +#include "precompiled_header.h" + +/** + * \ingroup SDK + * a misc class that allows user to locate a free pty terminal + * this is used by the debugger + * \version 1.0 + * first version + * + * \date 10-14-2007 + * + * \author Eran + * + */ +class ConsoleFinder { + wxString m_ConsoleTty; + int m_nConsolePid; + +private: + int RunConsole(const wxString &title); + wxString GetConsoleTty(int ConsolePid); + +public: + ConsoleFinder(); + virtual ~ConsoleFinder(); + + bool FindConsole(const wxString &title, wxString &consoleName); + void FreeConsole(); + wxString GetConsoleName(); +}; + +#endif + diff --git a/Plugin/debuggerconfigtool.cpp b/Plugin/debuggerconfigtool.cpp new file mode 100644 index 0000000000..11f5d2efe4 --- /dev/null +++ b/Plugin/debuggerconfigtool.cpp @@ -0,0 +1,15 @@ +#include "debuggerconfigtool.h" + +DebuggerConfigTool::DebuggerConfigTool() +{ +} + +DebuggerConfigTool::~DebuggerConfigTool() +{ +} + +DebuggerConfigTool *DebuggerConfigTool::Get() +{ + static DebuggerConfigTool theTool; + return &theTool; +} diff --git a/Plugin/debuggerconfigtool.h b/Plugin/debuggerconfigtool.h new file mode 100644 index 0000000000..cf1b0d9c2c --- /dev/null +++ b/Plugin/debuggerconfigtool.h @@ -0,0 +1,13 @@ +#ifndef DEBUGGERCONFIGTOOL_H +#define DEBUGGERCONFIGTOOL_H + +#include "configtool.h" + +class DebuggerConfigTool : public ConfigTool { +private: + DebuggerConfigTool(); +public: + ~DebuggerConfigTool(); + static DebuggerConfigTool *Get(); +}; +#endif //DEBUGGERCONFIGTOOL_H diff --git a/Plugin/debuggermanager.cpp b/Plugin/debuggermanager.cpp new file mode 100644 index 0000000000..4767ef3ff6 --- /dev/null +++ b/Plugin/debuggermanager.cpp @@ -0,0 +1,275 @@ +#include "debuggermanager.h" +#include "wx/filename.h" +#include +#include +#include "editor_config.h" +#include +#include "debuggerconfigtool.h" + +//--------------------------------------------------------- +DebuggersData::DebuggersData() +{ +} + +DebuggersData::~DebuggersData() +{ +} + +void DebuggersData::Serialize(Archive &arch) +{ + size_t count = m_debuggers.size(); + arch.Write(wxT("debuggersCount"), count); + for(size_t i=0; iReadObject(wxT("DebuggersData"), &m_debuggersData); +} + +DebuggerMgr::~DebuggerMgr() +{ + std::vector::iterator iter = m_dl.begin(); + for(; iter != m_dl.end(); iter++){ + (*iter)->Detach(); + delete (*iter); + } + m_dl.clear(); + m_debuggers.clear(); + + DebuggerConfigTool::Get()->WriteObject(wxT("DebuggersData"), &m_debuggersData); +} + +DebuggerMgr& DebuggerMgr::Get() +{ + if(!ms_instance){ + ms_instance = new DebuggerMgr(); + } + return *ms_instance; +} + +void DebuggerMgr::Free() +{ + delete ms_instance; + ms_instance = NULL; +} + +bool DebuggerMgr::LoadDebuggers() +{ + wxString ext; +#if defined (__WXMSW__) + ext = wxT("dll"); +#else + ext = wxT("so"); +#endif + wxString fileSpec(wxT("*.")+ext); + + //get list of dlls + wxArrayString files; + wxDir::GetAllFiles(m_baseDir + wxT("/debuggers"), &files, fileSpec, wxDIR_FILES); + + for(size_t i=0; iLoad(fileName)){ + wxLogMessage(wxT("Failed to load debugger's dll: ") + fileName); + delete dl; + continue; + } + + bool success(false); + GET_DBG_INFO_FUNC pfn = (GET_DBG_INFO_FUNC)dl->GetSymbol(wxT("GetDebuggerInfo"), &success); + if(!success){ + //dl->Unload(); + delete dl; + continue; + } + + DebuggerInfo info = pfn(); + //Call the init method to create an instance of the debugger + success = false; + GET_DBG_CREATE_FUNC pfnInitDbg = (GET_DBG_CREATE_FUNC)dl->GetSymbol(info.initFuncName, &success); + if(!success){ + dl->Detach(); + delete dl; + continue; + } + + wxLogMessage(wxT("Loaded debugger: ") + info.name + wxT(", Version: ") + info.version); + IDebugger *dbg = pfnInitDbg(); + m_debuggers[info.name] = dbg; + + //keep the dynamic load library + m_dl.push_back(dl); + } + return true; +} + +wxArrayString DebuggerMgr::GetAvailableDebuggers() +{ + wxArrayString dbgs; + std::map::iterator iter = m_debuggers.begin(); + for(; iter != m_debuggers.end(); iter++){ + dbgs.Add(iter->first); + } + return dbgs; +} + +IDebugger* DebuggerMgr::GetActiveDebugger() +{ + if(m_activeDebuggerName.IsEmpty()){ + //no active debugger is set, use the first one + std::map::iterator iter = m_debuggers.begin(); + if(iter != m_debuggers.end()){ + SetActiveDebugger( iter->first ); + return iter->second; + } + return NULL; + } + + std::map::iterator iter = m_debuggers.find(m_activeDebuggerName); + if(iter != m_debuggers.end()){ + return iter->second; + } + return NULL; +} + +void DebuggerMgr::SetActiveDebugger(const wxString &name) +{ + m_activeDebuggerName = name; +} + +bool DebuggerMgr::AddBreakpoint(const BreakpointInfo &bp) +{ + IDebugger *dbgr = GetActiveDebugger(); + if(dbgr && dbgr->IsRunning()){ + dbgr->Break(bp.file, bp.lineno); + } + //if a breakpoint with this file and line already exist + //dont add it + std::vector::iterator iter = m_bps.begin(); + for(; iter != m_bps.end(); iter++){ + BreakpointInfo b = *iter; + if(b.file == bp.file && b.lineno == bp.lineno){ + return true; + } + } + m_bps.push_back(bp); + + return true; +} + +bool DebuggerMgr::DelBreakpoint(const BreakpointInfo &bp) +{ + //remove it from the debugger as well + IDebugger *dbgr = GetActiveDebugger(); + if(dbgr && dbgr->IsRunning()){ + dbgr->RemoveBreak(bp.file, bp.lineno); + } + + std::vector::iterator iter = m_bps.begin(); + for(; iter != m_bps.end(); iter++){ + BreakpointInfo b = *iter; + if(b.file == bp.file && b.lineno == bp.lineno){ + m_bps.erase(iter); + break; + } + } + return true; +} + +void DebuggerMgr::GetBreakpoints(std::vector &li) +{ + li = m_bps; +} + +void DebuggerMgr::DelAllBreakpoints() +{ + IDebugger *dbgr = GetActiveDebugger(); + if(dbgr){ + dbgr->RemoveAllBreaks(); + } + m_bps.clear(); +} + +void DebuggerMgr::DelBreakpoints(const wxString &fileName) +{ + int size = (int)m_bps.size(); + for(int i = size-1; i >= 0; i--){ + if(m_bps.at(i).file == fileName){ + m_bps.erase(m_bps.begin()+i); + } + } +} + +void DebuggerMgr::GetBreakpointsByFileName(const wxString &fileName, std::vector &li) +{ + std::vector::iterator iter = m_bps.begin(); + for(; iter != m_bps.end(); iter++){ + BreakpointInfo b = *iter; + if(b.file == fileName){ + li.push_back(b); + } + } +} +void DebuggerMgr::SetDebuggerInformation(const wxString &name, const DebuggerInformation &info) +{ + m_debuggersData.SetDebuggerInformation(name, info); +} + +bool DebuggerMgr::GetDebuggerInformation(const wxString &name, DebuggerInformation &info) +{ + return m_debuggersData.GetDebuggerInformation(name, info); +} + + + diff --git a/Plugin/debuggermanager.h b/Plugin/debuggermanager.h new file mode 100644 index 0000000000..039dd4135e --- /dev/null +++ b/Plugin/debuggermanager.h @@ -0,0 +1,116 @@ +#ifndef DEBUGGER_MANAGER_H +#define DEBUGGER_MANAGER_H + +#include "map" +#include "list" +#include "vector" +#include "wx/string.h" +#include "debugger.h" +#include "wx/arrstr.h" +#include "serialized_object.h" +#include "dynamiclibrary.h" + +class DebuggersData : public SerializedObject +{ +private: + std::vector m_debuggers; + +public: + DebuggersData(); + virtual ~DebuggersData(); + + bool GetDebuggerInformation(const wxString &name, DebuggerInformation &info); + void SetDebuggerInformation(const wxString &name, const DebuggerInformation &info); + + void Serialize(Archive &arc); + void DeSerialize(Archive &arc); +}; + +class DebuggerMgr +{ + std::map m_debuggers; + wxString m_baseDir; + std::vector< clDynamicLibrary* > m_dl; + wxString m_activeDebuggerName; + wxEvtHandler *m_parent; + std::vector m_bps; + DebuggersData m_debuggersData; + +private: + DebuggerMgr(); + virtual ~DebuggerMgr(); + static DebuggerMgr *ms_instance; + +public: + /** + * Set the base dir for the debugger manager. On Linux this is + * equivalent to $(HOME)/.liteeditor/, and on windows it is set + * to C:\Program Files\LiteEditor\ + */ + void Initialize(wxEvtHandler *parent, const wxString &dir) + { + m_baseDir = dir; + m_parent = parent; + } + + /** + * Load all available debuggers. This functions searches for dll/so/sl + * which are located udner $(HOME)/.liteeditor/debuggers/ on Linux, and on Windows + * under C:\Program Files\LiteEditor\debuggers\ + */ + bool LoadDebuggers(); + + /** + * Return list of all available debuggers which were loaded + * successfully into the debugger manager + */ + wxArrayString GetAvailableDebuggers(); + + /** + * Set the active debugger to be 'name'. If a debugger with name does not + * exist, this function does nothing + */ + void SetActiveDebugger(const wxString &name); + + /** + * Return the currently selected debugger. The debugger is selected + * based on previous call to SetActiveDebugger(). If no active debugger is + * set, this function may return NULL + */ + IDebugger *GetActiveDebugger(); + + /** + * Add a break point to the current debugger + * all breakpoints will be pass to the debugger + * once started + */ + bool AddBreakpoint(const BreakpointInfo &bp); + + /** + * Delete break point by file and line + */ + bool DelBreakpoint(const BreakpointInfo &bp); + + /** + * return list of breakpoints + */ + void GetBreakpoints(std::vector &li); + + // delete all breakpoint of fileName + void DelBreakpoints(const wxString &fileName); + + void GetBreakpointsByFileName(const wxString &fileName, std::vector &li); + + /** + * remove all breakpoints + */ + void DelAllBreakpoints(); + + //get/set debugger information + void SetDebuggerInformation(const wxString &name, const DebuggerInformation &info); + bool GetDebuggerInformation(const wxString &name, DebuggerInformation &info); + + static DebuggerMgr& Get(); + static void Free(); +}; +#endif //DEBUGGER_MANAGER_H diff --git a/Plugin/debuggersettings.cpp b/Plugin/debuggersettings.cpp new file mode 100644 index 0000000000..3ca905bd2f --- /dev/null +++ b/Plugin/debuggersettings.cpp @@ -0,0 +1,60 @@ +#include "debuggersettings.h" + +DebuggerCmdData::DebuggerCmdData() +{ +} + +DebuggerCmdData::~DebuggerCmdData() +{ +} + +void DebuggerCmdData::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_name"), m_name); + arch.Read(wxT("m_command"), m_command); + arch.Read(wxT("m_isSubMenu"), m_isSubMenu); +} + +void DebuggerCmdData::Serialize(Archive &arch) +{ + arch.Write(wxT("m_name"), m_name); + arch.Write(wxT("m_command"), m_command); + arch.Write(wxT("m_isSubMenu"), m_isSubMenu); +} + +//----------------------------------------------------------------- +//----------------------------------------------------------------- +//----------------------------------------------------------------- + +DebuggerSettingsData::DebuggerSettingsData() +{ +} + +DebuggerSettingsData::~DebuggerSettingsData() +{ +} + +void DebuggerSettingsData::DeSerialize(Archive &arch) +{ + size_t size(0); + arch.Read(wxT("size"), size); + + for(size_t i=0; im_command = command;} + void SetIsSubMenu(const bool& isSubMenu) {this->m_isSubMenu = isSubMenu;} + void SetName(const wxString& name) {this->m_name = name;} + //Getters + const wxString& GetCommand() const {return m_command;} + const bool& GetIsSubMenu() const {return m_isSubMenu;} + const wxString& GetName() const {return m_name;} + +}; + +class DebuggerSettingsData : public SerializedObject +{ + std::vector m_cmds; +public: + DebuggerSettingsData(); + virtual ~DebuggerSettingsData(); + + void Serialize(Archive &arhc); + void DeSerialize(Archive &arhc); + + //Setters + void SetCmds(const std::vector& cmds) {this->m_cmds = cmds;} + + //Getters + const std::vector& GetCmds() const {return m_cmds;} +}; + +#endif //DEBUGGER_SETTINGS_H + diff --git a/Plugin/dirpicker.cpp b/Plugin/dirpicker.cpp new file mode 100644 index 0000000000..ace2ba9556 --- /dev/null +++ b/Plugin/dirpicker.cpp @@ -0,0 +1,113 @@ +#include "dirpicker.h" +#include "wx/sizer.h" +#include "macros.h" +#include + +BEGIN_EVENT_TABLE(DirPicker, wxPanel) +EVT_TEXT(wxID_ANY, DirPicker::OnText) +END_EVENT_TABLE() + +DirPicker::DirPicker(wxWindow *parent, wxWindowID id, const wxString &buttonCaption, const wxString &defaultPos, const wxString &message, const wxPoint& pos, const wxSize& size, long style) +: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER) +, m_path(NULL) +, m_combo(NULL) +, m_buttonCaption(buttonCaption) +, m_dlgCaption(message) +, m_style(style) +, m_defaultPos(defaultPos) +{ + CreateControls(); + ConnectEvents(); +} + +DirPicker::~DirPicker() +{ +} + +void DirPicker::OnText(wxCommandEvent &event) +{ + GetParent()->ProcessEvent(event); +} + +void DirPicker::CreateControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxHORIZONTAL); + SetSizer(mainSizer); + + if(m_style & wxDP_USE_TEXTCTRL){ + m_path = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize); + mainSizer->Add(m_path, 1, wxLEFT | wxTOP | wxBOTTOM, 0); + }else{ + m_combo = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize); + mainSizer->Add(m_combo, 1, wxLEFT | wxTOP | wxBOTTOM, 0); + } + + m_button = new wxButton(this, wxID_ANY, m_buttonCaption, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); + mainSizer->Add(m_button, 0, wxTOP | wxBOTTOM, 0); + + Layout(); +} + +void DirPicker::ConnectEvents() +{ + ConnectButton(m_button, DirPicker::OnButtonClicked); +} + +void DirPicker::OnButtonClicked(wxCommandEvent &event) +{ + wxUnusedVar(event); + + if(m_defaultPos.IsEmpty()) + { + m_defaultPos = wxGetCwd(); + } + + wxDirDialog *dlg = new wxDirDialog(this, m_dlgCaption, m_defaultPos); + if(dlg->ShowModal() == wxID_OK) + { + // Get the dirname + wxString path = dlg->GetPath(); + SetPath(path); + } + dlg->Destroy(); +} + +wxString DirPicker::GetPath() +{ + if(m_style & wxDP_USE_TEXTCTRL) + return m_path->GetValue(); + else{ + wxString path(m_combo->GetValue()); + //if the path is not whitin the combobox list, add it + if(m_combo->FindString(path) == wxNOT_FOUND){ + SetPath(path); + } + return path; + } +} + +void DirPicker::SetPath(const wxString &path) +{ + if(m_style & wxDP_USE_TEXTCTRL) + m_path->SetValue(path); + else + { + int where = m_combo->FindString(path); + if(where != wxNOT_FOUND) + { + m_combo->SetSelection(where); + } + else + { + where = m_combo->Append(path); + m_combo->SetSelection(where); + } + } +} + +void DirPicker::SetValues(const wxArrayString &values, int sel) +{ + wxASSERT_MSG(m_style & wxDP_USE_COMBOBOX, wxT("SetValues is available only for wxDP_USE_COMBOBOX style")); + m_combo->Append(values); + m_combo->SetSelection(sel); +} diff --git a/Plugin/dirpicker.h b/Plugin/dirpicker.h new file mode 100644 index 0000000000..72fb52375c --- /dev/null +++ b/Plugin/dirpicker.h @@ -0,0 +1,69 @@ +#ifndef DIRPICKER_H +#define DIRPICKER_H + +#include "wx/panel.h" +#include "wx/button.h" +#include "wx/textctrl.h" +#include "wx/combobox.h" + +enum { + wxDP_USE_TEXTCTRL = 1, + wxDP_USE_COMBOBOX = 2 +}; + +/** + * This control allows the user to select a directory. with a text control on its right side + */ +class DirPicker : public wxPanel { + wxTextCtrl *m_path; + wxComboBox *m_combo; + + wxButton *m_button; + wxString m_buttonCaption; + wxString m_dlgCaption; + long m_style; + wxString m_defaultPos; + +private: + void CreateControls(); + void ConnectEvents(); + +protected: + /** + * Handle button click event + * \param &event + */ + virtual void OnButtonClicked(wxCommandEvent &event); + virtual void OnText(wxCommandEvent &event); + +public: + DirPicker( wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString &buttonCaption = wxT("..."), + const wxString &defaultPos = wxEmptyString, + const wxString &message = wxT("Select a folder:"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDP_USE_TEXTCTRL); + + virtual ~DirPicker(); + + /** + * \return the path + */ + wxString GetPath(); + + /** + * set a value into the text control + * \param path path to set + */ + void SetPath(const wxString &path); + + /** + * Set combox values, this option is vailable only when using wxDP_USE_COMBOBOX + */ + void SetValues(const wxArrayString &values, int sel=0); + DECLARE_EVENT_TABLE() +}; + +#endif // DIRPICKER_H diff --git a/Plugin/dynamiclibrary.cpp b/Plugin/dynamiclibrary.cpp new file mode 100644 index 0000000000..073345ef78 --- /dev/null +++ b/Plugin/dynamiclibrary.cpp @@ -0,0 +1,72 @@ +#include "dynamiclibrary.h" + +#ifdef __WXMAC__ +# include +# include "precompiled_header.h" +#endif + +clDynamicLibrary::clDynamicLibrary() +#ifdef __WXMAC__ + : + m_dllhandle(NULL) +#endif +{ +} + +clDynamicLibrary::~clDynamicLibrary() +{ +#ifdef __WXMAC__ + if(m_dllhandle){ + dlclose(m_dllhandle); + m_dllhandle = NULL; + } +#endif +} + +bool clDynamicLibrary::Load(const wxString &name) +{ +#if defined (__WXMSW__) || defined (__WXGTK__) + return m_lib.Load(name); +#else + // open the library + m_dllhandle = dlopen(_C(name), RTLD_LAZY); + if (!m_dllhandle) { + wxString error = wxString(dlerror(), wxConvUTF8); + return false; + } + return true; +#endif +} + +void clDynamicLibrary::Detach() +{ +#if defined (__WXMSW__) || defined (__WXGTK__) + m_lib.Detach(); +#else + if (m_dllhandle) { + dlclose(m_dllhandle); + m_dllhandle = NULL; + } +#endif +} + +void *clDynamicLibrary::GetSymbol(const wxString &name, bool *success) +{ +#if defined (__WXMSW__) || defined (__WXGTK__) + bool rc; + void *symb = m_lib.GetSymbol(name, &rc); + *success = rc; + return symb; +#else + dlerror(); // reset errors + + // load the symbol + void *symb = dlsym(m_dllhandle, _C(name)); + if(symb){ + *success = true; + }else{ + *success = false; + } + return symb; +#endif +} diff --git a/Plugin/dynamiclibrary.h b/Plugin/dynamiclibrary.h new file mode 100644 index 0000000000..f7c423a343 --- /dev/null +++ b/Plugin/dynamiclibrary.h @@ -0,0 +1,24 @@ +#ifndef __dynamiclibrary__ +#define __dynamiclibrary__ + +#include "wx/dynlib.h" +#include "wx/string.h" + +class clDynamicLibrary { + +#if defined (__WXMSW__) || defined (__WXGTK__) + wxDynamicLibrary m_lib; +#else //Mac OSX + void *m_dllhandle; +#endif + +public: + clDynamicLibrary(); + ~clDynamicLibrary(); + + bool Load(const wxString &name); + void Detach(); + void* GetSymbol(const wxString &name, bool *success); + +}; +#endif // __dynamiclibrary__ diff --git a/Plugin/editor_config.cpp b/Plugin/editor_config.cpp new file mode 100644 index 0000000000..4b928f0be8 --- /dev/null +++ b/Plugin/editor_config.cpp @@ -0,0 +1,419 @@ +#include "precompiled_header.h" +#include "editor_config.h" +#include +#include "xmlutils.h" +#include "dirtraverser.h" +#include + +extern char *SvnRevision; +//------------------------------------------------------------------------------------------- +SimpleLongValue::SimpleLongValue() +{ +} + +SimpleLongValue::~SimpleLongValue() +{ +} + +void SimpleLongValue::Serialize(Archive &arch) +{ + arch.Write(wxT("m_value"), m_value); +} + +void SimpleLongValue::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_value"), m_value); +} + +//------------------------------------------------------------------------------------------- +EditorConfig::EditorConfig() +{ + m_doc = new wxXmlDocument(); +} + +EditorConfig::~EditorConfig() +{ + delete m_doc; +} + +bool EditorConfig::Load() +{ + m_fileName = wxFileName(wxT("config/liteeditor.xml")); + m_fileName.MakeAbsolute(); + + if (!m_fileName.FileExists()) { + //create a new empty file with this name so the load function will not + //fail + wxFFile file(m_fileName.GetFullPath(), wxT("a")); + wxString content; + content << wxT("") + << wxT(""); + + if (file.IsOpened()) { + file.Write(content); + file.Close(); + } + } + + //load the main configuration file + if (!m_doc->Load(m_fileName.GetFullPath())) { + return false; + } + //load all lexer configuration files + DirTraverser traverser(wxT("*.xml")); + wxDir dir(wxT("lexers/")); + dir.Traverse(traverser); + + wxArrayString files = traverser.GetFiles(); + m_lexers.clear(); + for (size_t i=0; iGetName()] = lexer; + } + return true; +} + +void EditorConfig::SaveLexers() +{ + std::map::iterator iter = m_lexers.begin(); + for (; iter != m_lexers.end(); iter++) { + iter->second->Save(); + } +} + +wxXmlNode* EditorConfig::GetLexerNode(const wxString& lexerName) +{ + wxXmlNode *lexersNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Lexers")); + if ( lexersNode ) { + return XmlUtils::FindNodeByName(lexersNode, wxT("Lexer"), lexerName); + } + return NULL; +} + +LexerConfPtr EditorConfig::GetLexer(const wxString &lexerName) +{ + if (m_lexers.find(lexerName) == m_lexers.end()) { + return NULL; + } + + return m_lexers.find(lexerName)->second; +} + +wxString EditorConfig::LoadPerspective(const wxString &Name) const +{ + wxXmlNode *layoutNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Layout")); + if ( !layoutNode ) { + //add an Layout node + wxXmlNode *newChild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Layout")); + m_doc->GetRoot()->AddChild(newChild); + m_doc->Save(m_fileName.GetFullPath()); + layoutNode = newChild; + } + + wxXmlNode *child = layoutNode->GetChildren(); + while ( child ) { + if ( child->GetName() == wxT("Perspective") ) { + if (child->GetPropVal(wxT("Name"), wxEmptyString) == Name) { + return child->GetPropVal(wxT("Value"), wxEmptyString); + } + } + child = child->GetNext(); + } + + return wxEmptyString; +} + +void EditorConfig::SavePerspective(const wxString &name, const wxString &pers) +{ + wxXmlNode *layoutNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Layout")); + if ( !layoutNode ) { + //add an Layout node + wxXmlNode *newChild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Layout")); + m_doc->GetRoot()->AddChild(newChild); + m_doc->Save(m_fileName.GetFullPath()); + layoutNode = newChild; + } + + wxXmlNode *child = layoutNode->GetChildren(); + while ( child ) { + if ( child->GetName() == wxT("Perspective") ) { + if (child->GetPropVal(wxT("Name"), wxEmptyString) == name) { + XmlUtils::UpdateProperty(child, wxT("Value"), pers); + m_doc->Save(m_fileName.GetFullPath()); + return; + } + } + child = child->GetNext(); + } + + wxXmlNode *newChild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Perspective")); + newChild->AddProperty(wxT("Name"), name); + newChild->AddProperty(wxT("Value"), pers); + layoutNode->AddChild(newChild); + m_doc->Save(m_fileName.GetFullPath()); +} + +long EditorConfig::LoadNotebookStyle(const wxString &nbName) +{ + long style = wxNOT_FOUND; + wxXmlNode *layoutNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Layout")); + if (!layoutNode) { + return style; + } + + wxXmlNode *child = layoutNode->GetChildren(); + while ( child ) { + if ( child->GetName() == wxT("Notebook") ) { + if (child->GetPropVal(wxT("Name"), wxEmptyString) == nbName) { + wxString strStyle = child->GetPropVal(wxT("Style"), wxEmptyString); + strStyle.ToLong(&style); + break; + } + } + child = child->GetNext(); + } + return style; +} + +void EditorConfig::SaveNotebookStyle(const wxString &nbName, long style) +{ + wxXmlNode *layoutNode = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Layout")); + if ( !layoutNode ) { + return; + } + + wxXmlNode *child = layoutNode->GetChildren(); + while ( child ) { + if ( child->GetName() == wxT("Notebook") ) { + if (child->GetPropVal(wxT("Name"), wxEmptyString) == nbName) { + wxString strStyle; + strStyle << style; + XmlUtils::UpdateProperty(child, wxT("Style"), strStyle); + m_doc->Save(m_fileName.GetFullPath()); + return; + } + } + child = child->GetNext(); + } + + wxXmlNode *newChild = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Notebook")); + newChild->AddProperty(wxT("Name"), nbName); + + wxString strStyle; + strStyle << style; + newChild->AddProperty(wxT("Style"), strStyle); + layoutNode->AddChild(newChild); + m_doc->Save(m_fileName.GetFullPath()); +} + +EditorConfig::ConstIterator EditorConfig::LexerEnd() +{ + return m_lexers.end(); +} + +EditorConfig::ConstIterator EditorConfig::LexerBegin() +{ + return m_lexers.begin(); +} + +void EditorConfig::SetLexer(LexerConfPtr lexer) +{ + m_lexers[lexer->GetName()] = lexer; + lexer->Save(); +} + +OptionsConfigPtr EditorConfig::GetOptions() const +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Options")); + // node can be null ... + return new OptionsConfig(node); +} + +void EditorConfig::SetOptions(OptionsConfigPtr opts) +{ + // locate the current node + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("Options")); + if ( node ) { + m_doc->GetRoot()->RemoveChild(node); + delete node; + } + + m_doc->GetRoot()->AddChild(opts->ToXml()); + m_doc->Save(m_fileName.GetFullPath()); +} + +void EditorConfig::SetTagsDatabase(const wxString &dbName) +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("TagsDatabase")); + if ( node ) { + XmlUtils::UpdateProperty(node, wxT("Path"), dbName); + } else { + //create new node + node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("TagsDatabase")); + node->AddProperty(wxT("Path"), dbName); + m_doc->GetRoot()->AddChild(node); + } + m_doc->Save(m_fileName.GetFullPath()); +} + +wxString EditorConfig::GetTagsDatabase() const +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("TagsDatabase")); + if (node) { + return XmlUtils::ReadString(node, wxT("Path")); + } else { + return wxEmptyString; + } +} + +void EditorConfig::GetRecentlyOpenedFies(wxArrayString &files) +{ + //find the root node of the recent files + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("RecentFiles")); + if (node) { + wxXmlNode *child = node->GetChildren(); + while (child) { + if (child->GetName() == wxT("File")) { + wxString fileName = XmlUtils::ReadString(child, wxT("Name")); + files.Add(fileName); + } + child = child->GetNext(); + } + } +} + +void EditorConfig::SetRecentlyOpenedFies(const wxArrayString &files) +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("RecentFiles")); + if (node) { + wxXmlNode *root = m_doc->GetRoot(); + root->RemoveChild(node); + delete node; + } + + //create new entry in the configuration file + node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("RecentFiles")); + m_doc->GetRoot()->AddChild(node); + + for (size_t i=0; iAddProperty(wxT("Name"), files.Item(i)); + node->AddChild(child); + } + + //save the data to disk + m_doc->Save(m_fileName.GetFullPath()); +} + + +void EditorConfig::GetRecentlyOpenedWorkspaces(wxArrayString &files) +{ + //find the root node of the recent files + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("RecentWorkspaces")); + if (node) { + wxXmlNode *child = node->GetChildren(); + while (child) { + if (child->GetName() == wxT("File")) { + wxString fileName = XmlUtils::ReadString(child, wxT("Name")); + files.Add(fileName); + } + child = child->GetNext(); + } + } +} + +void EditorConfig::SetRecentlyOpenedWorkspaces(const wxArrayString &files) +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc->GetRoot(), wxT("RecentWorkspaces")); + if (node) { + wxXmlNode *root = m_doc->GetRoot(); + root->RemoveChild(node); + delete node; + } + + node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("RecentWorkspaces")); + m_doc->GetRoot()->AddChild(node); + + for (size_t i=0; iAddProperty(wxT("Name"), files.Item(i)); + node->AddChild(child); + } + + //save the data to disk + m_doc->Save(m_fileName.GetFullPath()); +} + +bool EditorConfig::WriteObject(const wxString &name, SerializedObject *obj) +{ + Archive arch; + + wxXmlNode *child = XmlUtils::FindNodeByName(m_doc->GetRoot(), wxT("ArchiveObject"), name); + if (child) { + wxXmlNode *n = m_doc->GetRoot(); + n->RemoveChild(child); + delete child; + } + + //create new xml node for this object + child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("ArchiveObject")); + m_doc->GetRoot()->AddChild(child); + child->AddProperty(wxT("Name"), name); + + arch.SetXmlNode(child); + //serialize the object into the archive + obj->Serialize(arch); + //save the archive + return m_doc->Save(m_fileName.GetFullPath()); +} + +bool EditorConfig::ReadObject(const wxString &name, SerializedObject *obj) +{ + //find the object node in the xml file + wxXmlNode *node = XmlUtils::FindNodeByName(m_doc->GetRoot(), wxT("ArchiveObject"), name); + if (node) { + Archive arch; + arch.SetXmlNode(node); + obj->DeSerialize(arch); + return true; + } + return false; +} + +wxString EditorConfig::GetRevision() const +{ + return XmlUtils::ReadString(m_doc->GetRoot(), wxT("Revision"), wxEmptyString); +} + +void EditorConfig::SetRevision(const wxString &rev) +{ + wxXmlNode *root = m_doc->GetRoot(); + if (!root) { + return; + } + + XmlUtils::UpdateProperty(root, wxT("Revision"), rev); + m_doc->Save(m_fileName.GetFullPath()); +} + + +void EditorConfig::SaveLongValue(const wxString &name, long value) +{ + SimpleLongValue data; + data.SetValue(value); + WriteObject(name, &data); +} + + +bool EditorConfig::GetLongValue(const wxString &name, long &value) +{ + SimpleLongValue data; + if(ReadObject(name, &data)){ + value = data.GetValue(); + return true; + } + return false; +} + diff --git a/Plugin/editor_config.h b/Plugin/editor_config.h new file mode 100644 index 0000000000..8de2bcd831 --- /dev/null +++ b/Plugin/editor_config.h @@ -0,0 +1,221 @@ +#ifndef LITEEDITOR_EDITOR_CONFIG_H +#define LITEEDITOR_EDITOR_CONFIG_H + +#include "singleton.h" +#include +#include +#include "wx/xml/xml.h" +#include "lexer_configuration.h" +#include "optionsconfig.h" +#include "map" +#include "serialized_object.h" +#include "plugin.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class SimpleLongValue : public SerializedObject +{ + long m_value; +public: + SimpleLongValue(); + ~SimpleLongValue(); + + void DeSerialize(Archive &arch); + void Serialize(Archive &arch); + + //Setters + void SetValue(const long& value) {this->m_value = value;} + //Getters + const long& GetValue() const {return m_value;} +}; + +/** + * \ingroup LiteEditor + * \brief EditorConfig a singleton class that manages the liteeditor.xml configuration file + * + * \version 1.0 + * first version + * + * \date 04-19-2007 + * + * \author Eran + */ +class EditorConfig : public IConfigTool +{ + friend class Singleton; + wxXmlDocument* m_doc; + wxFileName m_fileName; + std::map m_lexers; + +public: + typedef std::map::const_iterator ConstIterator; + + /** + * Load the configuration file + * \param fileName configuration file name + * \return true on success false otherwise + */ + bool Load(); + + /** + * Find lexer configuration and return a pointer to a LexerConf object + * \param lexer lexer name (e.g. Cpp, Java, Default etc..) + * \return LexerConfPtr + */ + LexerConfPtr GetLexer(const wxString& lexer); + + /** + * Return iterator to the begin of the undelying lexer mapping + */ + ConstIterator LexerBegin(); + + /** + * Return iterator to the end of the undelying lexer mapping + */ + ConstIterator LexerEnd(); + + /** + * Set a lexer to the configuration file + */ + void SetLexer(LexerConfPtr lexer); + + /** + * Test if this configuration is loaded properly + * \return true of a file is loaded into the configuration manager false otherwise + */ + bool IsOk() const { return m_doc->IsOk(); } + + /** + * Load notebook style from configuration + * \param nbName notebook name + * \return wxNOT_FOUND when notebook not found or style + */ + long LoadNotebookStyle(const wxString &nbName); + + /** + * Save notebook style to configuration + * \param nbName notebook name + * \param style style value to save + */ + void SaveNotebookStyle(const wxString &nbName, long style); + + /** + * Save the perspective to the configuration file + * \param name perspective name + * \param pers perspective to save + */ + void SavePerspective(const wxString &name, const wxString &pers); + + /** + * Load perspective from configuration file + * \param name perspective name + * \return perspective + */ + wxString LoadPerspective(const wxString &name) const ; + + /** + * Read the editor options from the configuration file + * and return them as an object + */ + OptionsConfigPtr GetOptions() const; + + /** + * Set options to the configuration file, override them if they does not exist + */ + void SetOptions(OptionsConfigPtr opts); + + /** + * Return the database that should be used by the editor + * \return + */ + wxString GetTagsDatabase() const; + + /** + * Set tags database to be use by editor (in addition to the workspace one) + * \param &dbName + */ + void SetTagsDatabase(const wxString &dbName); + + /** + * save lexers settings + */ + void SaveLexers(); + + /** + * get an array of recently opened files + * \param files [output] a place holder for the output + */ + void GetRecentlyOpenedFies(wxArrayString &files); + + /** + * get an array of recently opened files + * \param files list of files to save + */ + void SetRecentlyOpenedFies(const wxArrayString &files); + + /** + * get an array of recently opened workspaces + * \param files [output] a place holder for the output + */ + void GetRecentlyOpenedWorkspaces(wxArrayString &files); + + /** + * get an array of recently opened workspaces + * \param files list of files to save + */ + void SetRecentlyOpenedWorkspaces(const wxArrayString &files); + + /** + * \brief write an archived object to the xml configuration + * \param name object name + * \param arch the archived object container + */ + virtual bool WriteObject(const wxString &name, SerializedObject *obj); + + /** + * \brief read an archived object from the configuration + * \param name object to read + * \param arch [output] + */ + virtual bool ReadObject(const wxString &name, SerializedObject *obj); + + /** + * Return the configuration version + */ + wxString GetRevision() const; + + /** + * Set the current configuration revision + */ + void SetRevision(const wxString &rev); + + /** + * \brief convinience methods to store a single long value + * \param name variable name + * \param value value to store + */ + void SaveLongValue(const wxString &name, long value); + + /** + * \brief convinience methods to retrieve a single long value stored using + * the 'SaveLongValue()' method + * \param name variable name + * \param value value + * \return return true on success, false otherwise + */ + bool GetLongValue(const wxString &name, long &value); + +private: + EditorConfig(); + virtual ~EditorConfig(); + wxXmlNode *GetLexerNode(const wxString& lexer); +}; + +typedef Singleton EditorConfigST; +#endif // LITEEDITOR_EDITOR_CONFIG_H diff --git a/Plugin/envvar.cpp b/Plugin/envvar.cpp new file mode 100644 index 0000000000..235704a922 --- /dev/null +++ b/Plugin/envvar.cpp @@ -0,0 +1,78 @@ +#include "envvar.h" +#include "wx/utils.h" +#include "wx/xml/xml.h" +#include "xmlutils.h" + +EnvironmentVariebles::EnvironmentVariebles(wxXmlNode *node){ + if(node){ + //read values XML + wxXmlNode *child = node->GetChildren(); + while(child){ + wxString name = XmlUtils::ReadString(child, wxT("Name")); + wxString value = XmlUtils::ReadString(child, wxT("Value")); + SetEnv(name, value); + child = child->GetNext(); + } + }else{ + //do nothing + } +} + +EnvironmentVariebles::~EnvironmentVariebles() +{ +} + +void EnvironmentVariebles::SetEnv(const wxString &name, const wxString &value) +{ + m_variables[name] = value; +} + +wxString EnvironmentVariebles::GetEnv(const wxString &name) const +{ + wxString value(wxEmptyString); + + //try to find in the map + EnvironmentVariebles::ConstIterator iter = m_variables.find(name); + if(iter == End()){ + //no match, try to find in the system + wxGetEnv(name, &value); + //does not matter if we didnt find match, simply return an empty string + return value; + }else{ + //we found it in our map + return iter->second; + } +} + +void EnvironmentVariebles::DeleteEnv(const wxString &name) +{ + std::map::iterator iter = m_variables.find(name); + if(iter != End()){ + m_variables.erase(iter); + } +} + +wxXmlNode *EnvironmentVariebles::ToXml() const +{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Environment")); + EnvironmentVariebles::ConstIterator iter = Begin(); + for(; iter != End(); iter++) + { + wxXmlNode *child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Variable")); + node->AddChild(child); + child->AddProperty(wxT("Name"), iter->first); + child->AddProperty(wxT("Value"), iter->second); + } + return node; +} +EnvironmentVariebles::ConstIterator EnvironmentVariebles::Begin() const +{ + return m_variables.begin(); +} + +EnvironmentVariebles::ConstIterator EnvironmentVariebles::End() const +{ + return m_variables.end(); +} + + diff --git a/Plugin/envvar.h b/Plugin/envvar.h new file mode 100644 index 0000000000..9873756577 --- /dev/null +++ b/Plugin/envvar.h @@ -0,0 +1,88 @@ +#ifndef ENVVAR_H +#define ENVVAR_H + +class wxXmlNode; + +#include "wx/string.h" +#include "smart_ptr.h" +#include + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/** + * \ingroup SDK + * A manager class for the environment variables of the workspace + * + * \version 1.0 + * first version + * + * \date 05-18-2007 + * + * \author Eran + * + */ +class WXDLLIMPEXP_LE_SDK EnvironmentVariebles { + + std::map m_variables; + +public: + typedef std::map::const_iterator ConstIterator; + +public: + /** + * Constructor that initializes itself from an XML node + * \param node XML node, can be null to create empty Environment variables class + */ + EnvironmentVariebles(wxXmlNode *node); + /** + * destructor + */ + virtual ~EnvironmentVariebles(); + + /** + * Add new environment variable. if environment exist, this function updates its value + * \param name environment variable name + * \param value environment variable value + */ + void SetEnv(const wxString &name, const wxString &value); + /** + * Find environment variable. This function will first try to match the environment + * variable name in the workspace settings, if the variable does not exist, it will try + * to find a match in the system environment variables. + * \param name environment variable name + * \return value or wxEmptyString if not found + */ + wxString GetEnv(const wxString &name) const ; + + /** + * Enumerating function + * \return const iterator to the start of the internal container of type std::map + */ + ConstIterator Begin() const; + + /** + * delete environemt variable + */ + void DeleteEnv(const wxString &name); + + /** + * Enumerating function + * \return const iterator to the end of the internal container of type std::map + */ + ConstIterator End() const; + + /** + * Return an xml representation of this object + */ + wxXmlNode *ToXml() const; +}; + +typedef SmartPtr EnvironmentVarieblesPtr; + +#endif // ENVVAR_H diff --git a/Plugin/exelocator.cpp b/Plugin/exelocator.cpp new file mode 100644 index 0000000000..54bfcb8432 --- /dev/null +++ b/Plugin/exelocator.cpp @@ -0,0 +1,27 @@ +#include "exelocator.h" +#include "procutils.h" + +bool ExeLocator::Locate(const wxString &name, wxString &where) +{ + wxString command; + wxArrayString output; + command << wxT("which \"") << name << wxT("\""); + ProcUtils::ExecuteCommand(command, output); + + if(output.IsEmpty() == false){ + wxString interstingLine = output.Item(0); + + if(interstingLine.Trim().Trim(false).IsEmpty()){ + return false; + } + + if( !interstingLine.StartsWith(wxT("which: no ")) && + !interstingLine.Contains(wxT("command not found")) && + !interstingLine.StartsWith(wxT("no "))){ + where = output.Item(0); + where = where.Trim().Trim(false); + return true; + } + } + return false; +} diff --git a/Plugin/exelocator.h b/Plugin/exelocator.h new file mode 100644 index 0000000000..4811494fe1 --- /dev/null +++ b/Plugin/exelocator.h @@ -0,0 +1,17 @@ +#ifndef ITEMLOCATOR_H +#define ITEMLOCATOR_H + +#include "wx/string.h" + +class ExeLocator +{ +public: + ExeLocator (){} + ~ExeLocator (){} + + static bool Locate(const wxString &name, wxString &where); +}; + +#endif //ITEMLOCATOR_H + + diff --git a/Plugin/file.xpm b/Plugin/file.xpm new file mode 100644 index 0000000000..b0b3d63c55 --- /dev/null +++ b/Plugin/file.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char *xpm_file[] = { +"16 16 16 2", +"00 c black", +"01 c #848484", +"02 c #D6D6CE", +"03 c gray100", +"04 c none", +"05 c gray100", +"06 c gray100", +"07 c gray100", +"08 c gray100", +"09 c gray100", +"10 c gray100", +"11 c gray100", +"12 c gray100", +"13 c gray100", +"14 c gray100", +"15 c gray100", +"04040404040404040404040404040404", +"04040101010101010101010104040404", +"04040103030303030303030001040404", +"04040103030303030303030002010404", +"04040103030000000000030000000004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030000000000000003030004", +"04040103030303030303030303030004", +"04040103030303030303030303030004", +"04040000000000000000000000000004" +}; diff --git a/Plugin/filepicker.cpp b/Plugin/filepicker.cpp new file mode 100644 index 0000000000..ba6d86dc9f --- /dev/null +++ b/Plugin/filepicker.cpp @@ -0,0 +1,60 @@ +#include "filepicker.h" +#include "wx/sizer.h" +#include "macros.h" + +FilePicker::FilePicker(wxWindow *parent, + wxWindowID id, + const wxString &defaultFile, + const wxString &message, + const wxString &wildCard, + const wxString &buttonCaption, + const wxPoint& pos, + const wxSize& size, + long style) +: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER) +, m_buttonCaption(buttonCaption) +, m_dlgCaption(message) +, m_dlgStyle(style) +, m_defaultFile(defaultFile) +, m_wildCard(wildCard) +{ + CreateControls(); + ConnectEvents(); +} + +FilePicker::~FilePicker() +{ +} + +void FilePicker::CreateControls() +{ + wxBoxSizer *mainSizer = new wxBoxSizer(wxHORIZONTAL); + SetSizer(mainSizer); + + m_path = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize); + mainSizer->Add(m_path, 1, wxEXPAND | wxALL, 0); + + m_button = new wxButton(this, wxID_ANY, m_buttonCaption); + mainSizer->Add(m_button, 0, wxLEFT, 5); + + Layout(); +} + +void FilePicker::ConnectEvents() +{ + ConnectButton(m_button, FilePicker::OnButtonClicked); +} + +void FilePicker::OnButtonClicked(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxFileDialog *dlg = new wxFileDialog(this, m_dlgCaption, wxEmptyString, m_defaultFile, m_wildCard, m_dlgStyle); + if(dlg->ShowModal() == wxID_OK) + { + // Get the dirname + wxString path = dlg->GetPath(); + m_path->SetValue(path); + } + dlg->Destroy(); +} + diff --git a/Plugin/filepicker.h b/Plugin/filepicker.h new file mode 100644 index 0000000000..0c19436075 --- /dev/null +++ b/Plugin/filepicker.h @@ -0,0 +1,64 @@ +#ifndef FILEPICKER_H +#define FILEPICKER_H + +#include "wx/panel.h" +#include "wx/button.h" +#include "wx/textctrl.h" +#include "wx/filedlg.h" + +/** + * This control allows the user to select a directory. with a text control on its right side + */ +class FilePicker : public wxPanel { + wxTextCtrl *m_path; + wxButton *m_button; + wxString m_buttonCaption; + wxString m_dlgCaption; + long m_dlgStyle; + wxString m_defaultFile; + wxString m_wildCard; + +private: + void CreateControls(); + void ConnectEvents(); + +protected: + /** + * Handle button click event + * \param &event + */ + virtual void OnButtonClicked(wxCommandEvent &event); + +public: + /** + * \param parent control parent + * \param id control id + * \param message the dialog message + * \param buttonCaption the browse button caption + * \param style control style, same as wxFileDialog styles + */ + FilePicker(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString &defaultFile = wxEmptyString, + const wxString &message = wxT("Select a file:"), + const wxString &wildCard = wxT("*.*"), + const wxString &buttonCaption = wxT("Browse"), + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxFD_DEFAULT_STYLE ); + + virtual ~FilePicker(); + + /** + * \return the path + */ + wxString GetPath() const { return m_path->GetValue(); } + + /** + * set a value into the text control + * \param path path to set + */ + void SetPath(const wxString &path) { m_path->SetValue(path); } +}; + +#endif // FILEPICKER_H diff --git a/Plugin/folder.xpm b/Plugin/folder.xpm new file mode 100644 index 0000000000..1bcdb08c04 --- /dev/null +++ b/Plugin/folder.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char *xpm_folder[] = { +"16 16 16 2", +"00 c #A06B04", +"01 c #B17B14", +"02 c #C18C25", +"03 c #CE9831", +"04 c gray29", +"05 c #777777", +"06 c gray55", +"07 c none", +"08 c #ECB94F", +"09 c #FFE178", +"10 c #FFF388", +"11 c #FFFB98", +"12 c #CECECE", +"13 c #DADADA", +"14 c gray97", +"15 c gray100", +"07070707070707070707070707070707", +"07070303030313140707070707070707", +"07031515151502121407070707070707", +"03151111111115020202010101131407", +"03111010101010151515151501061307", +"03100902020202020202020201010113", +"03090215151515151515151509150006", +"02090311111111111111111108110005", +"02090311111111111111111108110005", +"02090211101010101010101008110005", +"02090211090909090909090908110005", +"02090211090909090909090903110005", +"13010101010101000000000000000406", +"14120605050505050505050505050612", +"07141313131313131313131313131314", +"07070707070707070707070707070707" +}; diff --git a/Plugin/globals.cpp b/Plugin/globals.cpp new file mode 100644 index 0000000000..dec15056ef --- /dev/null +++ b/Plugin/globals.cpp @@ -0,0 +1,110 @@ +#include "globals.h" +#include "wx/app.h" +#include "wx/window.h" +#include "wx/listctrl.h" +#include "wx/ffile.h" +#include "procutils.h" + +void SendCmdEvent(int eventId, void *clientData) +{ + wxCommandEvent e(eventId); + if (clientData) { + e.SetClientData(clientData); + } + wxTheApp->ProcessEvent(e); +} + +void PostCmdEvent(int eventId, void *clientData) +{ + wxCommandEvent e(eventId); + if (clientData) { + e.SetClientData(clientData); + } + wxTheApp->AddPendingEvent(e); +} + +void SetColumnText (wxListCtrl *list, long indx, long column, const wxString &rText ) +{ +// list->Freeze(); + wxListItem list_item; + list_item.SetId ( indx ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + list_item.SetText ( rText ); + list->SetItem ( list_item ); +// list->Thaw(); +} + +wxString GetColumnText(wxListCtrl *list, long index, long column) +{ + wxListItem list_item; + list_item.SetId ( index ); + list_item.SetColumn ( column ); + list_item.SetMask ( wxLIST_MASK_TEXT ); + list->GetItem ( list_item ); + return list_item.GetText(); +} + +bool ReadFileWithConversion(const wxString &fileName, wxString &content) +{ + wxFFile file(fileName, wxT("rb")); + + //first try the Utf8 + file.ReadAll(&content, wxConvUTF8); + if (content.IsEmpty()) { + //try local + file.Seek(0); + + file.ReadAll(&content, wxConvLocal); + if (content.IsEmpty()) { + file.Seek(0); + file.ReadAll(& content, wxConvLibc); + } + } + return content.IsEmpty() == false; +} + +bool RemoveDirectory(const wxString &path) +{ + wxString cmd; + if (wxGetOsVersion() & wxOS_WINDOWS) { + //any of the windows variants + cmd << wxT("rmdir /S /Q ") << wxT("\"") << path << wxT("\""); + } else { + cmd << wxT("\rm -fr ") << wxT("\"") << path << wxT("\""); + } + wxArrayString output; + return wxShell(cmd); +} + +bool IsValidCppIndetifier(const wxString &id) +{ + if (id.IsEmpty()) { + return false; + } + //first char can be only _A-Za-z + wxString first( id.Mid(0, 1) ); + if (first.find_first_not_of(wxT("_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) != wxString::npos ) { + return false; + } + //make sure that rest of the id contains only a-zA-Z0-9_ + if (id.find_first_not_of(wxT("_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")) != wxString::npos) { + return false; + } + return true; +} + +long AppendListCtrlRow(wxListCtrl *list) +{ + long item; + wxListItem info; + // Set the item display name + info.SetColumn(0); + item = list->InsertItem(info); + +#ifdef __WXMAC__ + item = list->GetItemCount()-1; +#endif + return item; +} + diff --git a/Plugin/globals.h b/Plugin/globals.h new file mode 100644 index 0000000000..77cf5df366 --- /dev/null +++ b/Plugin/globals.h @@ -0,0 +1,16 @@ +#ifndef GLOBALS_H +#define GLOBALS_H + +#include "wx/string.h" +class wxListCtrl; + +extern void SendCmdEvent(int eventId, void *clientData = NULL); +extern void PostCmdEvent(int eventId, void *clientData = NULL); +extern void SetColumnText (wxListCtrl *list, long indx, long column, const wxString &rText ); +extern wxString GetColumnText(wxListCtrl *list, long index, long column); +extern long AppendListCtrlRow(wxListCtrl *list); +extern bool ReadFileWithConversion(const wxString &fileName, wxString &content); +extern bool RemoveDirectory(const wxString &path); +extern bool IsValidCppIndetifier(const wxString &id); +#endif //GLOBALS_H + diff --git a/Plugin/interactiveprocess.cpp b/Plugin/interactiveprocess.cpp new file mode 100644 index 0000000000..94e9abdbc2 --- /dev/null +++ b/Plugin/interactiveprocess.cpp @@ -0,0 +1,83 @@ +#include "interactiveprocess.h" +#include "wx/txtstrm.h" +#include "wx/app.h" + +void InteractiveProcess::StopProcess() +{ + m_stop = true; + if(m_proc){ + m_canUse = false; + m_proc->Terminate(); + CleanUp(); + } +} + +void InteractiveProcess::OnTimer(wxTimerEvent &WXUNUSED(event)) +{ + if( m_stop ){ + m_canUse = false; + m_proc->Terminate(); + return; + } +} + +void InteractiveProcess::OnProcessEnd(wxProcessEvent& event) +{ + wxUnusedVar(event); + m_canUse = false; + + //read all input before stopping the timer + if( !m_stop ){ + CleanUp(); + } + event.Skip(); +} + +void InteractiveProcess::CleanUp() +{ + m_timer->Stop(); + m_busy = false; + m_stop = false; +} + +bool InteractiveProcess::Write(const wxString &cmd) +{ + if(!IsBusy() || !m_proc){ + //process is not up + return false; + } + + if(m_proc->GetOutputStream()){ + wxTextOutputStream os(*m_proc->GetOutputStream()); + os.WriteString(cmd + wxT("\n")); + return true; + } + return false; +} + +//this function may be called from another thread +//so make it thread-safe +bool InteractiveProcess::ReadLine(wxString &ostr, int timeout) +{ + if(!m_canUse){ + return false; + } + + bool res(false); + for(int i=0; iHasInput(ostr)){ + wxMilliSleep(1); + continue; + }else{ + res = true; + break; + } + } + return res; +} + +bool InteractiveProcess::ReadAllData(wxString &output) +{ + return m_proc->ReadAll(output); +} + diff --git a/Plugin/interactiveprocess.h b/Plugin/interactiveprocess.h new file mode 100644 index 0000000000..e37f727884 --- /dev/null +++ b/Plugin/interactiveprocess.h @@ -0,0 +1,66 @@ +#ifndef INTERACTIVPROCESS_H +#define INTERACTIVPROCESS_H + +#include "wx/event.h" +#include "wx/timer.h" +#include "pipedprocess.h" + +class InteractiveProcess : public wxEvtHandler +{ +protected: + PipedProcess *m_proc; + wxTimer *m_timer; + bool m_busy; + bool m_stop; + wxCriticalSection m_cs; + bool m_inUse; + bool m_canUse; + +protected: + void OnTimer(wxTimerEvent &e); + void OnProcessEnd(wxProcessEvent &e); + void CleanUp(); + +public: + bool IsBusy() const { return m_busy; } + void SetBusy(bool busy) { m_busy = busy; } + void StopProcess(); + + //construct a compiler action + // \param owner the window owner for this action + InteractiveProcess() + : m_proc(NULL) + , m_busy(false) + , m_stop(false) + , m_canUse(false) + { + m_timer = new wxTimer(this); + } + + /** + * \brief + * \return + */ + virtual ~InteractiveProcess(){ + delete m_timer; + } + + /** + * write command to the process + */ + bool Write(const wxString &cmd); + + /** + * read from the process output stream + */ + bool ReadLine(wxString &ostr, int timeout); + + /** + * \brief read all stdout & stderr from the process + * \param output + * \return + */ + bool ReadAllData(wxString &output); +}; + +#endif //INTERACTIVPROCESS_H diff --git a/Plugin/lexer_configuration.cpp b/Plugin/lexer_configuration.cpp new file mode 100644 index 0000000000..b5e66692e8 --- /dev/null +++ b/Plugin/lexer_configuration.cpp @@ -0,0 +1,126 @@ +#include "lexer_configuration.h" +#include "xmlutils.h" +#include "macros.h" + +LexerConf::LexerConf(const wxString &fileName) +: m_fileName(fileName) +{ + m_fileName.MakeAbsolute(); + m_doc.Load(m_fileName.GetFullPath()); + if(m_doc.GetRoot()){ + Parse(m_doc.GetRoot()); + } +} + +void LexerConf::Save() +{ + //replace the root node with the new xml representation for this object + m_doc.SetRoot(ToXml()); + + if(m_doc.IsOk()){ + m_doc.Save(m_fileName.GetFullPath()); + } +} + +void LexerConf::Parse(wxXmlNode *element) +{ + if( element ){ + m_lexerId = XmlUtils::ReadLong(element, wxT("Id"), 0); + + // read the lexer name + m_name = element->GetPropVal(wxT("Name"), wxEmptyString); + + // load key words + wxXmlNode *node = XmlUtils::FindFirstByTagName(element, wxT("KeyWords")); + if( node ){ + m_keyWords = node->GetNodeContent(); + m_keyWords.Replace(wxT("\n"), wxT(" ")); + m_keyWords.Replace(wxT("\r"), wxT(" ")); + } + + // load extensions + node = XmlUtils::FindFirstByTagName(element, wxT("Extensions")); + if( node ){ + m_extension = node->GetNodeContent(); + } + + // load properties + // Search for + node = XmlUtils::FindFirstByTagName(element, wxT("Properties")); + if( node ) + { + // We found the element, read the attributes + wxXmlNode* prop = node->GetChildren(); + while( prop ) + { + if(prop->GetName() == wxT("Property")){ + // Read the font attributes + wxString Name = XmlUtils::ReadString(prop, wxT("Name"), wxT("DEFAULT")); + wxString bold = XmlUtils::ReadString(prop, wxT("Bold"), wxT("no")); + wxString face = XmlUtils::ReadString(prop, wxT("Face"), wxT("Courier")); + wxString colour = XmlUtils::ReadString(prop, wxT("Colour"), wxT("black")); + wxString bgcolour = XmlUtils::ReadString(prop, wxT("BgColour"), wxT("white")); + long fontSize = XmlUtils::ReadLong(prop, wxT("Size"), 10); + long propId = XmlUtils::ReadLong(prop, wxT("Id"), 0); + + StyleProperty property = StyleProperty(propId, colour, bgcolour, fontSize, Name, face, bold.CmpNoCase(wxT("Yes")) == 0); + m_properties.push_back( property ); + } + prop = prop->GetNext(); + } + } + } +} + +LexerConf::~LexerConf() +{ + if(m_doc.IsOk()){ + m_doc.Save(m_fileName.GetFullPath()); + } +} + +wxXmlNode *LexerConf::ToXml() const +{ + //convert the lexer back xml node + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Lexer")); + //set the lexer name + node->AddProperty(wxT("Name"), GetName()); + + wxString strId; + strId << GetLexerId(); + node->AddProperty(wxT("Id"), strId); + + //set the keywords node + wxXmlNode *keyWords = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("KeyWords")); + XmlUtils::SetNodeContent(keyWords, GetKeyWords()); + node->AddChild(keyWords); + + //set the extensions node + wxXmlNode *extesions = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Extensions")); + XmlUtils::SetNodeContent(extesions, GetFileSpec()); + node->AddChild(extesions); + + //set the properties + wxXmlNode *properties = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Properties")); + std::list::const_iterator iter = m_properties.begin(); + for(; iter != m_properties.end(); iter ++){ + StyleProperty p = (*iter); + wxXmlNode *property = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Property")); + + wxString strId; + strId << p.GetId(); + property->AddProperty(wxT("Id"), strId); + property->AddProperty(wxT("Name"), p.GetName()); + property->AddProperty(wxT("Bold"), BoolToString(p.IsBold())); + property->AddProperty(wxT("Face"), p.GetFaceName()); + property->AddProperty(wxT("Colour"), p.GetFgColour()); + property->AddProperty(wxT("BgColour"), p.GetBgColour()); + + wxString strSize; + strSize << p.GetFontSize(); + property->AddProperty(wxT("Size"), strSize); + properties->AddChild(property); + } + node->AddChild( properties ); + return node; +} diff --git a/Plugin/lexer_configuration.h b/Plugin/lexer_configuration.h new file mode 100644 index 0000000000..42295476b2 --- /dev/null +++ b/Plugin/lexer_configuration.h @@ -0,0 +1,86 @@ +#ifndef LEXER_CONFIGURATION_H +#define LEXER_CONFIGURATION_H + +#include "wx/string.h" +#include "wx/filename.h" +#include "attribute_style.h" +#include "wx/xml/xml.h" +#include "smart_ptr.h" + + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK LexerConf { + StylePropertyList m_properties; + int m_lexerId; + wxString m_name; + wxString m_keyWords; + wxString m_extension; + wxXmlDocument m_doc; + wxFileName m_fileName; + +private: + // Parse lexer object from xml node + void Parse(wxXmlNode *node); + + // Return an xml representation from this object + wxXmlNode *ToXml() const; + +public: + void Save(); + LexerConf(const wxString &fileName); + virtual ~LexerConf(); + + /** + * Get the lexer ID, which should be in sync with values of Scintilla + * \return + */ + int GetLexerId() const { return m_lexerId; } + + /** + * Set the lexer ID + * \param id + */ + void SetLexerId(int id) { m_lexerId = id; } + + /** + * Return the lexer description as described in the XML file + */ + const wxString &GetName() const { return m_name; } + /** + * Return the lexer keywords + * \return + */ + const wxString &GetKeyWords() const { return m_keyWords; } + void SetKeyWords(const wxString &keywords){m_keyWords = keywords;} + + /** + * File patterns that this lexer should apply to + */ + const wxString &GetFileSpec() const { return m_extension; } + /** + * Return a list of the lexer properties + * \return + */ + const StylePropertyList &GetProperties() const { return m_properties; } + /** + * Set the lexer properties + * \param &properties + */ + void SetProperties(StylePropertyList &properties) { m_properties = properties; } + /** + * Set file spec for the lexer + * \param &spec + */ + void SetFileSpec(const wxString &spec) { m_extension = spec; } +}; + +typedef SmartPtr LexerConfPtr; + +#endif // LEXER_CONFIGURATION_H diff --git a/Plugin/macros.h b/Plugin/macros.h new file mode 100644 index 0000000000..9cff0b329e --- /dev/null +++ b/Plugin/macros.h @@ -0,0 +1,81 @@ +#ifndef MACROS_H +#define MACROS_H + +//------------------------------------------------------- +// wxWidgets Connect macros +//------------------------------------------------------- + +#define ConnectChoice(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectButton(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectListBoxDClick(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectCheckBox(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectListCtrlItemSelected(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(fn), NULL, this); + +#define ConnectListCtrlItemActivated(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(fn), NULL, this); + +#define ConnectKeyDown(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_KEY_DOWN, wxKeyEventHandler(fn), NULL, this); + +#define ConnectCharEvent(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_CHAR, wxKeyEventHandler(fn), NULL, this); + +#define ConnectCmdTextEntered(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(fn), NULL, this); + +#define ConnectCmdTextUpdated(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectCombo(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler(fn), NULL, this); + +#define ConnectCheckList(ctrl, fn)\ + ctrl->Connect(ctrl->GetId(), wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler(fn), NULL, this); + +#define TrimString(str){\ + str = str.Trim();\ + str = str.Trim(false);\ + } + +#define IsSourceFile(ext)\ + (ext == wxT("cpp") || ext == wxT("cxx") || ext == wxT("c") || ext == wxT("c++") || ext == wxT("cc")) + +#define BoolToString(b) b ? wxT("yes") : wxT("no") + +//----------------------------------------------------- +// Constants +//----------------------------------------------------- + +const wxString clCMD_NEW = wxT(""); +const wxString clCMD_EDIT = wxT(""); +const wxString clCMD_DELETE = wxT(""); + +// constant message +const wxString BUILD_START_MSG = wxT("Build Started...\n"); +const wxString BUILD_END_MSG = wxT("----------Build Ended----------\n"); +const wxString SEARCH_IN_WORKSPACE = wxT("Entire Workspace"); +const wxString SEARCH_IN_PROJECT = wxT("Active Project"); + +#ifdef __WXMSW__ +#define PATH_SEP wxT("\\") +#else +#define PATH_SEP wxT("/") +#endif + +#define viewAsMenuItemID 23500 +#define viewAsMenuItemMaxID 23500+100 + +#define viewAsSubMenuID 23499 +#define RecentFilesSubMenuID 23600 +#define RecentWorkspaceSubMenuID 23650 + +#endif // MACROS_H diff --git a/Plugin/makefile b/Plugin/makefile new file mode 100644 index 0000000000..2b4eb1d2ee --- /dev/null +++ b/Plugin/makefile @@ -0,0 +1,81 @@ +## Author: Eran Ifrah + + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +ifeq ($(type), release) +WXCFG=--unicode=no --debug=no +EXT= +OBJ_DIR=Release_gcc +OPT=-O3 +DEBUG= +endif + +ifeq ($(type), release_unicode) +WXCFG=--unicode=yes --debug=no +EXT=u +OBJ_DIR=Release_gcc_unicode +OPT=-O3 -DREGEXP_UNICODE +DEBUG= +endif + +ifeq ($(type), debug_unicode) +WXCFG=--unicode=yes --debug=yes +EXT=ud +OBJ_DIR=Debug_gcc_unicode +DEBUG= -g +OPT=-DREGEXP_UNICODE +endif + +WXVER=26 +OUTPUT_DIR=../lib + +#PROFILER= -pg +## +## Define variables, using wx-config tool +## +CMP=g++ $(DEBUG) $(OPT) + +CCFLAGS= -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing + +SQLITE_INCLUDE= -I../sdk/wxsqlite3/include -I../sdk/wxsqlite3/sqlite3/include +INCLUDES = $(shell pkg-config --cflags gtk+-2.0) -I. $(SQLITE_INCLUDE) -I../CodeLite -I../Interfaces -I../sdk/wxflatnotebook/include/ + +## +## Define the object files +## +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.cpp))))) +lib_c_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.c))))) + +## our main build target +build : pre_build Plugin + +Plugin: $(lib_cpp_objects) + ar rcu $(OUTPUT_DIR)/libplugin$(EXT).a $(lib_cpp_objects) $(lib_c_objects) + ranlib $(OUTPUT_DIR)/libplugin$(EXT).a + +$(OBJ_DIR)/%.o: %.cpp %.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +%.o.d: + @$(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM $(addsuffix .cpp, $(basename $(basename $(@F)))) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + +clean: + $(RM) Debug_gcc/*.o Release_gcc/*.o Release_gcc_unicode/*. Debug_gcc_unicode/*.o lib/*.o lib/*.a + $(RM) -R Debug_gcc Release_gcc Release_gcc_unicode Debug_gcc_unicode + +-include $(OBJ_DIR)/*.d diff --git a/Plugin/open_type_dlg.cpp b/Plugin/open_type_dlg.cpp new file mode 100644 index 0000000000..07bf959552 --- /dev/null +++ b/Plugin/open_type_dlg.cpp @@ -0,0 +1,203 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version May 5 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifdef WX_PRECOMP + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif //__BORLANDC__ + +#else +#include +#endif //WX_PRECOMP + +#include "open_type_dlg.h" +#include "ctags_manager.h" +#include +#include "macros.h" +#include "wx/imaglist.h" + +static int OpenTypeDlgTimerId = wxNewId(); + +BEGIN_EVENT_TABLE(OpenTypeDlg, wxDialog) +EVT_TIMER(OpenTypeDlgTimerId, OpenTypeDlg::OnTimer) +EVT_CHAR_HOOK(OpenTypeDlg::OnCharHook) +EVT_LIST_ITEM_ACTIVATED(wxID_ANY, OpenTypeDlg::OnItemActivated) +END_EVENT_TABLE() + +/////////////////////////////////////////////////////////////////////////// + +OpenTypeDlg::OpenTypeDlg( wxWindow* parent, TagsManager *tagsMgr, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +{ + m_tagsManager = tagsMgr; + m_timer = new wxTimer(this, OpenTypeDlgTimerId); + m_timer->Start(100); + + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText = new wxStaticText( this, wxID_ANY, wxT("Select a type to open (you may use wildcards):"), wxDefaultPosition, wxDefaultSize, 0 ); + mainSizer->Add( m_staticText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_textTypeName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + mainSizer->Add( m_textTypeName, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_listTypes = new wxListView(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT); + mainSizer->Add( m_listTypes, 1, wxALL|wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonOK, 0, wxALL, 5 ); + + m_button2 = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_button2, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_RIGHT, 5 ); + //assign image list to the dialog + m_il = new wxImageList(16, 16, true); + m_il->Add(wxXmlResource::Get()->LoadBitmap(_T("namespace"))); + m_il->Add(wxXmlResource::Get()->LoadBitmap(_T("class"))); + m_il->Add(wxXmlResource::Get()->LoadBitmap(_T("struct"))); + wxBitmap bmp; + + // typedef + bmp = wxXmlResource::Get()->LoadBitmap(_T("typedef")); + bmp.SetMask(new wxMask(bmp, wxColor(0, 128, 128))); + m_il->Add(bmp); + + bmp = wxXmlResource::Get()->LoadBitmap(_T("enum")); + bmp.SetMask(new wxMask(bmp, wxColor(0, 128, 128))); + m_il->Add(bmp); + + Init(); + ConnectButton(m_buttonOK, OpenTypeDlg::OnOK); + + this->SetSizer( mainSizer ); + this->Layout(); +} + +OpenTypeDlg::~OpenTypeDlg() +{ + delete m_timer; + delete m_il; + m_tags.clear(); +} + +void OpenTypeDlg::Init() +{ + m_listTypes->InsertColumn(0, wxT("Symbol")); + m_tagsManager->OpenType(m_tags); + this->m_textTypeName->SetFocus(); +} + +void OpenTypeDlg::OnTimer(wxTimerEvent &event) +{ + wxUnusedVar(event); + PopulateList(); +} + +void OpenTypeDlg::PopulateList() +{ + wxString filter = m_textTypeName->GetValue(); + if(filter.Trim().IsEmpty()) + return; + + //if filter is the same, dont update the view + if(m_filter == filter) + return; + m_filter = filter; + + m_listTypes->Freeze(); + m_listTypes->DeleteAllItems(); + m_listTypes->SetImageList(m_il, wxIMAGE_LIST_SMALL); + + m_itemsData.clear(); + + int row=0; + //populate the list view + for(size_t i=0; iGetName(); + tagName = tagName.MakeLower(); + if(wxMatchWild(filter, tagName)){ + // Set the item display name + wxString name = m_tags.at(i)->GetName(); + long tmp = m_listTypes->InsertItem(row, name, GetTagImage(m_tags.at(i)->GetKind())); + m_listTypes->SetItemData(tmp, (int)i); + row++; + //m_itemsData[m_tags.at(i)->Key()] = m_tags.at(i); + } + } + + m_listTypes->SetColumnWidth(0, wxLIST_AUTOSIZE); + if(m_listTypes->GetItemCount() > 0){ + m_listTypes->Focus(0); + m_listTypes->Select(0); + } + m_listTypes->Thaw(); +} + +int OpenTypeDlg::GetTagImage(const wxString &kind) +{ + if(kind == wxT("namespace")) return 0; + if(kind == wxT("class")) return 1; + if(kind == wxT("struct")) return 2; + if(kind == wxT("typedef")) return 3; + if(kind == wxT("enum")) return 4; + if(kind == wxT("union")) return 2; + return 1; +} + +void OpenTypeDlg::OnCharHook(wxKeyEvent &event) +{ + if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) + { + TryOpenAndEndModal(); + return; + } + event.Skip(); +} + +void OpenTypeDlg::TryOpenAndEndModal() +{ + long item = m_listTypes->GetFirstSelected(); + long data = m_listTypes->GetItemData(item); + if((int)m_tags.size() > data && data >= 0) + { + m_tag = m_tags.at(data); + m_tags.clear(); + EndModal(wxID_OK); + } +} + +void OpenTypeDlg::OnOK(wxCommandEvent &event) +{ + wxUnusedVar(event); + TryOpenAndEndModal(); + EndModal(wxID_OK); +} + +void OpenTypeDlg::OnItemActivated(wxListEvent &event) +{ + wxUnusedVar(event); + TryOpenAndEndModal(); + +} diff --git a/Plugin/open_type_dlg.h b/Plugin/open_type_dlg.h new file mode 100644 index 0000000000..c1845d0424 --- /dev/null +++ b/Plugin/open_type_dlg.h @@ -0,0 +1,50 @@ +#ifndef __open_type_dlg__ +#define __open_type_dlg__ + +#include +#include +#include +#include +#include +#include "ctags_manager.h" +#include "map" + +/////////////////////////////////////////////////////////////////////////////// +/// Class OpenTypeDlg +/////////////////////////////////////////////////////////////////////////////// +class wxImageList; +class OpenTypeDlg : public wxDialog +{ +protected: + wxStaticText* m_staticText; + wxTextCtrl* m_textTypeName; + wxListView* m_listTypes; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_button2; + wxTimer *m_timer; + std::vector m_tags; + wxString m_filter ; + wxImageList *m_il; + TagEntryPtr m_tag; + std::map m_itemsData; + TagsManager *m_tagsManager; + +protected: + void Init(); + void OnTimer(wxTimerEvent &event); + void OnCharHook(wxKeyEvent &event); + void OnItemActivated(wxListEvent &event); + void PopulateList(); + int GetTagImage(const wxString &kind); + void OnOK(wxCommandEvent &event); + void TryOpenAndEndModal(); + +public: + OpenTypeDlg( wxWindow* parent, TagsManager *tagsMgr, int id = wxID_ANY, wxString title = wxT("Open Type"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 431,353 ), int style = wxDEFAULT_DIALOG_STYLE); + virtual ~OpenTypeDlg(); + TagEntryPtr GetSelectedTag() const {return m_tag;} + DECLARE_EVENT_TABLE() +}; + +#endif //__open_type_dlg__ diff --git a/Plugin/optionsconfig.cpp b/Plugin/optionsconfig.cpp new file mode 100644 index 0000000000..16ad592c82 --- /dev/null +++ b/Plugin/optionsconfig.cpp @@ -0,0 +1,56 @@ +#include "optionsconfig.h" +#include "xmlutils.h" +#include "macros.h" + + +OptionsConfig::OptionsConfig(wxXmlNode *node) +: m_displayFoldMargin(true) +, m_underlineFoldLine(false) +, m_foldStyle(wxT("Simple")) +, m_displayBookmarkMargin(true) +, m_bookmarkShape(wxT("Small Arrow")) +, m_bookmarkBgColour(wxColour(12, 133, 222)) +, m_bookmarkFgColour(wxColour(66, 169, 244)) +, m_highlightCaretLine(true) +, m_displayLineNumbers(false) +, m_showIndentationGuidelines(false) +, m_caretLineColour(wxT("LIGHT BLUE")) +{ + if( node ){ + m_displayFoldMargin = XmlUtils::ReadBool(node, wxT("DisplayFoldMargin")); + m_underlineFoldLine = XmlUtils::ReadBool(node, wxT("UnderlineFoldedLine")); + m_foldStyle = XmlUtils::ReadString(node, wxT("FoldStyle")); + m_displayBookmarkMargin = XmlUtils::ReadBool(node, wxT("DisplayBookmarkMargin")); + m_bookmarkShape = XmlUtils::ReadString(node, wxT("BookmarkShape")); + m_bookmarkBgColour = XmlUtils::ReadString(node, wxT("BookmarkBgColour")); + m_bookmarkFgColour = XmlUtils::ReadString(node, wxT("BookmarkFgColour")); + m_highlightCaretLine = XmlUtils::ReadBool(node, wxT("HighlightCaretLine")); + m_displayLineNumbers = XmlUtils::ReadBool(node, wxT("ShowLineNumber")); + m_showIndentationGuidelines = XmlUtils::ReadBool(node, wxT("IndentationGuides")); + m_caretLineColour = XmlUtils::ReadString(node, wxT("CaretLineColour"), wxColour(255, 255, 220).GetAsString(wxC2S_HTML_SYNTAX)); + m_caretColour = XmlUtils::ReadString(node, wxT("CaretColour"), wxColour(0, 0, 0).GetAsString(wxC2S_HTML_SYNTAX)); + } +} + +OptionsConfig::~OptionsConfig(void) +{ +} + +wxXmlNode *OptionsConfig::ToXml() const +{ + wxXmlNode *n = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Options")); + n->AddProperty(wxT("DisplayFoldMargin"), BoolToString(m_displayFoldMargin)); + n->AddProperty(wxT("UnderlineFoldedLine"), BoolToString(m_underlineFoldLine)); + n->AddProperty(wxT("FoldStyle"), m_foldStyle); + n->AddProperty(wxT("DisplayBookmarkMargin"), BoolToString(m_displayBookmarkMargin)); + n->AddProperty(wxT("BookmarkShape"), m_bookmarkShape); + n->AddProperty(wxT("BookmarkBgColour"), m_bookmarkBgColour.GetAsString(wxC2S_HTML_SYNTAX)); + n->AddProperty(wxT("BookmarkFgColour"), m_bookmarkFgColour.GetAsString(wxC2S_HTML_SYNTAX)); + n->AddProperty(wxT("HighlightCaretLine"), BoolToString(m_highlightCaretLine)); + n->AddProperty(wxT("ShowLineNumber"), BoolToString(m_displayLineNumbers)); + n->AddProperty(wxT("IndentationGuides"), BoolToString(m_showIndentationGuidelines)); + n->AddProperty(wxT("CaretLineColour"), m_caretLineColour.GetAsString(wxC2S_HTML_SYNTAX)); + n->AddProperty(wxT("CaretColour"), m_caretColour.GetAsString(wxC2S_HTML_SYNTAX)); + return n; +} + diff --git a/Plugin/optionsconfig.h b/Plugin/optionsconfig.h new file mode 100644 index 0000000000..e32c2ea8aa --- /dev/null +++ b/Plugin/optionsconfig.h @@ -0,0 +1,77 @@ +#ifndef OPTIONS_CONFIG_H +#define OPTIONS_CONFIG_H + +#include "wx/string.h" +#include "wx/xml/xml.h" +#include "wx/colour.h" +#include "configuration_object.h" +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +class WXDLLIMPEXP_LE_SDK OptionsConfig : public ConfObject +{ + bool m_displayFoldMargin; + bool m_underlineFoldLine; + wxString m_foldStyle; + bool m_displayBookmarkMargin; + wxString m_bookmarkShape; + wxColour m_bookmarkBgColour; + wxColour m_bookmarkFgColour; + bool m_highlightCaretLine; + bool m_displayLineNumbers; + bool m_showIndentationGuidelines; + wxColour m_caretLineColour; + wxColour m_caretColour; + +public: + OptionsConfig(wxXmlNode *node); + virtual ~OptionsConfig(void); + + //------------------------------------- + // Setters/Getters + //------------------------------------- + bool GetDisplayFoldMargin() const { return m_displayFoldMargin; } + bool GetUnderlineFoldLine() const { return m_underlineFoldLine; } + wxString GetFoldStyle() const { return m_foldStyle; } + bool GetDisplayBookmarkMargin() const { return m_displayBookmarkMargin; } + wxString GetBookmarkShape() const { return m_bookmarkShape; } + wxColour GetBookmarkFgColour() const { return m_bookmarkFgColour; } + wxColour GetBookmarkBgColour() const { return m_bookmarkBgColour; } + bool GetHighlightCaretLine() const { return m_highlightCaretLine; } + bool GetDisplayLineNumbers() const { return m_displayLineNumbers; } + bool GetShowIndentationGuidelines() const { return m_showIndentationGuidelines; } + wxColour GetCaretLineColour() const { return m_caretLineColour;} + + void SetDisplayFoldMargin(bool b){ m_displayFoldMargin = b; } + void SetUnderlineFoldLine(bool b){ m_underlineFoldLine = b; } + void SetFoldStyle(wxString s){ m_foldStyle = s; } + void SetDisplayBookmarkMargin(bool b){ m_displayBookmarkMargin = b; } + void SetBookmarkShape(wxString s){ m_bookmarkShape = s; } + void SetBookmarkFgColour(wxColour c){ m_bookmarkFgColour = c; } + void SetBookmarkBgColour(wxColour c){ m_bookmarkBgColour = c; } + void SetHighlightCaretLine(bool b){ m_highlightCaretLine = b; } + void SetDisplayLineNumbers(bool b){ m_displayLineNumbers = b; } + void SetShowIndentationGuidelines(bool b){ m_showIndentationGuidelines = b; } + void SetCaretLineColour(wxColour c) { m_caretLineColour = c;} + + //Setters + void SetCaretColour(const wxColour& caretColour) {this->m_caretColour = caretColour;} + //Getters + const wxColour& GetCaretColour() const {return m_caretColour;} + + /** + * Return an XML representation of this object + * \return XML node + */ + wxXmlNode *ToXml() const; +}; + +typedef SmartPtr OptionsConfigPtr; + +#endif // OPTIONS_CONFIG_H + diff --git a/Plugin/pipedprocess.cpp b/Plugin/pipedprocess.cpp new file mode 100644 index 0000000000..2af2b02719 --- /dev/null +++ b/Plugin/pipedprocess.cpp @@ -0,0 +1,125 @@ +#include "pipedprocess.h" +#include +#include +#include "wx/msgdlg.h" + +PipedProcess::PipedProcess(int id, const wxString &cmdLine) +: wxProcess(NULL, id) +, m_pid(-1) +, m_cmd(cmdLine) +{ +} + +PipedProcess::~PipedProcess() +{ +} + +long PipedProcess::GetPid() +{ + return m_pid; +} + +void PipedProcess::SetPid(long pid) +{ + m_pid = pid; +} + +void PipedProcess::Terminate() +{ + +#ifdef __WXGTK__ + wxString cmd; + cmd << wxT("le_killproc.sh ") << GetPid(); + wxExecute(cmd, wxEXEC_ASYNC); +#else + wxKillError rc; + wxKill(GetPid(), wxSIGKILL, &rc, wxKILL_CHILDREN); +#endif +} + +long PipedProcess::Start(bool hide) +{ + Redirect(); + long flags = wxEXEC_ASYNC | wxEXEC_MAKE_GROUP_LEADER ; + if(!hide){ + flags |= wxEXEC_NOHIDE; + } + + m_pid = wxExecute(m_cmd, flags, this); + return m_pid; +} + +//read single line from input/error of the debugger +bool PipedProcess::HasInput(wxString &input) +{ + bool hasInput = false; + bool cont1(true), cont2(true); + while(cont1 || cont2){ + cont1 = false; + cont2 = false; + while( IsInputAvailable() ) + { + wxTextInputStream tis(*GetInputStream()); + // this assumes that the output is always line buffered + wxChar ch = tis.GetChar(); + input << ch; + hasInput = true; + if(ch == wxT('\n')){ + cont1 = false; + break; + }else{ + cont1 = true; + } + } + + while( IsErrorAvailable() ) + { + wxTextInputStream tis(*GetErrorStream()); + // this assumes that the output is always line buffered + wxChar ch = tis.GetChar(); + input << ch; + hasInput = true; + if(ch == wxT('\n')){ + cont2 = false; + break; + }else{ + cont2 = true; + } + } + + } + return hasInput; +} + +bool PipedProcess::ReadAll(wxString &input) +{ + bool hasInput = false; + bool cont1(true), cont2(true); + + wxTextInputStream tis(*GetInputStream()); + wxTextInputStream tie(*GetErrorStream()); + while(cont1 || cont2){ + cont1 = false; + cont2 = false; + while( IsInputAvailable() ) + { + // this assumes that the output is always line buffered + wxChar ch = tis.GetChar(); + input << ch; + hasInput = true; + cont1 = true; + } + + while( IsErrorAvailable() ) + { + // this assumes that the output is always line buffered + wxChar ch = tie.GetChar(); + input << ch; + hasInput = true; + cont2 = true; + } + } + return hasInput; +} + + diff --git a/Plugin/pipedprocess.h b/Plugin/pipedprocess.h new file mode 100644 index 0000000000..a1940527c0 --- /dev/null +++ b/Plugin/pipedprocess.h @@ -0,0 +1,52 @@ +#ifndef PipedProcess_H +#define PipedProcess_H + +#include "wx/process.h" +#include "wx/string.h" + +class PipedProcess : public wxProcess +{ + long m_pid; + wxString m_cmd; + +public: + /** + * Constructs a process object. id is only used in the case you want to use wxWidgets events. + * It identifies this object, or another window that will receive the event. + */ + PipedProcess(int id, const wxString &cmdLine); + + virtual ~PipedProcess(); + + /** + * \return return the process id + */ + long GetPid(); + + /** + * \param set the process ID + */ + void SetPid(long pid); + + /** + * Kill the process + */ + void Terminate(); + + /** + * Start the process + * \return the process id + */ + long Start(bool hide = true); + bool HasInput(wxString &input); + + /** + * \brief read all input from the process output stream + * \param input + * \return true if some data was read, false otherwise + */ + bool ReadAll(wxString &input); +}; + +#endif // PipedProcess_H + diff --git a/Plugin/plugin_sdk.project b/Plugin/plugin_sdk.project new file mode 100644 index 0000000000..c4813419cd --- /dev/null +++ b/Plugin/plugin_sdk.project @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugin/project.cpp b/Plugin/project.cpp new file mode 100644 index 0000000000..060351b432 --- /dev/null +++ b/Plugin/project.cpp @@ -0,0 +1,392 @@ +#include "project.h" +#include "xmlutils.h" +#include +#include "wx/arrstr.h" +#include "dirsaver.h" + +const wxString Project::STATIC_LIBRARY = wxT("Static Library"); +const wxString Project::DYNAMIC_LIBRARY = wxT("Dynamic Library"); +const wxString Project::EXECUTABLE = wxT("Executable"); + +Project::Project() + : m_tranActive(false) +{ +} + +Project::~Project() +{ +} + +bool Project::Create(const wxString &name, const wxString &path, const wxString &projType) +{ + m_fileName = path + wxFileName::GetPathSeparator() + name + wxT(".project"); + m_fileName.MakeAbsolute(); + + wxXmlNode *root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("CodeLite_Project")); + m_doc.SetRoot(root); + m_doc.GetRoot()->AddProperty(wxT("Name"), name); + + // Create the default virtual directories + wxXmlNode *srcNode = NULL, *headNode = NULL; + + srcNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("VirtualDirectory")); + srcNode->AddProperty(wxT("Name"), wxT("Source Files")); + m_doc.GetRoot()->AddChild(srcNode); + + headNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("VirtualDirectory")); + headNode->AddProperty(wxT("Name"), wxT("Header Files")); + m_doc.GetRoot()->AddChild(headNode); + + //creae dependencies node + wxXmlNode *depNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Dependencies")); + root->AddChild(depNode); + + m_doc.Save(m_fileName.GetFullPath()); + //create build settings + SetSettings(new ProjectSettings(NULL)); + ProjectSettingsPtr settings = GetSettings(); + settings->SetProjectType(projType); + SetSettings(settings); + return true; +} + +bool Project::Load(const wxString &path) +{ + if ( !m_doc.Load(path) ) { + return false; + } + + m_fileName = path; + m_fileName.MakeAbsolute(); + return true; +} + +wxXmlNode *Project::GetVirtualDir(const wxString &vdFullPath) +{ + wxStringTokenizer tkz(vdFullPath, wxT(":")); + + wxXmlNode *parent = m_doc.GetRoot(); + while ( tkz.HasMoreTokens() ) { + parent = XmlUtils::FindNodeByName(parent, wxT("VirtualDirectory"), tkz.GetNextToken()); + if ( !parent ) { + return NULL; + } + } + return parent; +} + +wxXmlNode *Project::CreateVD(const wxString &vdFullPath, bool mkpath) +{ + wxXmlNode *oldVd = GetVirtualDir(vdFullPath); + if ( oldVd ) { + // VD already exist + return oldVd; + } + + wxStringTokenizer tkz(vdFullPath, wxT(":")); + + wxXmlNode *parent = m_doc.GetRoot(); + size_t count = tkz.CountTokens(); + for (size_t i=0; iAddProperty(wxT("Name"), token); + + } else { + return NULL; + } + } + parent = p; + } + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("VirtualDirectory")); + node->AddProperty(wxT("Name"), tkz.GetNextToken()); + + parent->AddChild(node); + + //if not in transaction save the changes + if (!InTransaction()) { + m_doc.Save(m_fileName.GetFullPath()); + } + return node; +} + +bool Project::IsFileExist(const wxString &fileName) +{ + //find the file under this node + // Convert the file path to be relative to + // the project path + DirSaver ds; + + ::wxSetWorkingDirectory(m_fileName.GetPath()); + wxFileName tmp(fileName); + tmp.MakeRelativeTo(m_fileName.GetPath()); + + std::vector files; + GetFiles(files); + + for (size_t i=0; iIsFileExist(fileName)) { + return false; + } + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("File")); + node->AddProperty(wxT("Name"), tmp.GetFullPath()); + vd->AddChild(node); + if (!InTransaction()) { + m_doc.Save(m_fileName.GetFullPath()); + } + return true; +} + +bool Project::CreateVirtualDir(const wxString &vdFullPath, bool mkpath) +{ + return CreateVD(vdFullPath, mkpath) != NULL; +} + +bool Project::DeleteVirtualDir(const wxString &vdFullPath) +{ + wxXmlNode *vd = GetVirtualDir(vdFullPath); + if ( vd ) { + wxXmlNode *parent = vd->GetParent(); + if ( parent ) { + parent->RemoveChild( vd ); + } + + delete vd; + return m_doc.Save(m_fileName.GetFullPath()); + } + return false; +} + +bool Project::RemoveFile(const wxString &fileName, const wxString &virtualDir) +{ + wxXmlNode *vd = GetVirtualDir(virtualDir); + if ( !vd ) { + return false; + } + + // Convert the file path to be relative to + // the project path + DirSaver ds; + + ::wxSetWorkingDirectory(m_fileName.GetPath()); + wxFileName tmp(fileName); + tmp.MakeRelativeTo(m_fileName.GetPath()); + + wxXmlNode *node = XmlUtils::FindNodeByName(vd, wxT("File"), tmp.GetFullPath()); + if ( node ) { + node->GetParent()->RemoveChild( node ); + delete node; + } + return m_doc.Save(m_fileName.GetFullPath());; +} + +wxString Project::GetName() const +{ + return m_doc.GetRoot()->GetPropVal(wxT("Name"), wxEmptyString); +} + +ProjectTreePtr Project::AsTree() +{ + ProjectItem item(GetName(), GetName(), wxEmptyString, ProjectItem::TypeProject); + ProjectTreePtr ptp(new ProjectTree(item.Key(), item)); + + wxXmlNode *child = m_doc.GetRoot()->GetChildren(); + while ( child ) { + RecursiveAdd(child, ptp, ptp->GetRoot()); + child = child->GetNext(); + } + return ptp; +} + +void Project::RecursiveAdd(wxXmlNode *xmlNode, ProjectTreePtr &ptp, ProjectTreeNode *nodeParent) +{ + // Build the key for this node + std::list nameList; + + wxXmlNode *parent = xmlNode->GetParent(); + while ( parent ) { + nameList.push_front(parent->GetPropVal(wxT("Name"), wxEmptyString)); + parent = parent->GetParent(); + } + + wxString key; + for (size_t i=0; iGetPropVal(wxT("Name"), wxEmptyString); + + // Create the tree node data + ProjectItem item; + if ( xmlNode->GetName() == wxT("Project") ) { + item = ProjectItem(key, xmlNode->GetPropVal(wxT("Name"), wxEmptyString), wxEmptyString, ProjectItem::TypeProject); + } else if ( xmlNode->GetName() == wxT("VirtualDirectory") ) { + item = ProjectItem(key, xmlNode->GetPropVal(wxT("Name"), wxEmptyString), wxEmptyString, ProjectItem::TypeVirtualDirectory); + } else if ( xmlNode->GetName() == wxT("File") ) { + wxFileName filename(xmlNode->GetPropVal(wxT("Name"), wxEmptyString)); + //convert this file name to absolute path + DirSaver ds; + ::wxSetWorkingDirectory(m_fileName.GetPath()); + filename.MakeAbsolute(); + item = ProjectItem(key, filename.GetFullName(), filename.GetFullPath(), ProjectItem::TypeFile); + } else { + // un-recognised or not viewable item in the tree, + // skip it and its children + return; + } + + ProjectTreeNode *newNode = ptp->AddChild(item.Key(), item, nodeParent); + // This node has children, add them as well + wxXmlNode *children = xmlNode->GetChildren(); + + while ( children ) { + RecursiveAdd(children, ptp, newNode); + children = children->GetNext(); + } +} + +void Project::Save() +{ + m_tranActive = false; + if ( m_doc.IsOk() ) + m_doc.Save(m_fileName.GetFullPath()); +} + +void Project::GetFilesByVirtualDir(const wxString &vdFullPath, wxArrayString &files) +{ + wxXmlNode *vd = GetVirtualDir(vdFullPath); + if ( vd ) { + wxXmlNode *child = vd->GetChildren(); + while ( child ) { + if ( child->GetName() == wxT("File")) { + wxFileName fileName( + child->GetPropVal(wxT("Name"), wxEmptyString) + ); + fileName.MakeAbsolute(m_fileName.GetPath()); + files.Add(fileName.GetFullPath()); + } + child = child->GetNext(); + } + } +} + +void Project::GetFiles(std::vector &files, bool absPath) +{ + if (absPath) { + DirSaver ds; + ::wxSetWorkingDirectory(m_fileName.GetPath()); + + GetFiles(m_doc.GetRoot(), files, true); + } else { + GetFiles(m_doc.GetRoot(), files, false); + } +} + +void Project::GetFiles(wxXmlNode *parent, std::vector &files, bool absPath) +{ + if ( !parent ) { + return; + } + + wxXmlNode *child = parent->GetChildren(); + while (child) { + if (child->GetName() == wxT("File")) { + wxString fileName = child->GetPropVal(wxT("Name"), wxEmptyString); + wxFileName tmp(fileName); + if (absPath) { + tmp.MakeAbsolute(); + } + files.push_back(tmp); + } else if (child->GetChildren()) {// we could also add a check for VirtualDirectory only + GetFiles(child, files, absPath); + } + child = child->GetNext(); + } +} + +ProjectSettingsPtr Project::GetSettings() const +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Settings")); + return new ProjectSettings(node); +} + +void Project::SetSettings(ProjectSettingsPtr settings) +{ + wxXmlNode *oldSettings = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Settings")); + if (oldSettings) { + oldSettings->GetParent()->RemoveChild(oldSettings); + delete oldSettings; + } + m_doc.GetRoot()->AddChild(settings->ToXml()); + m_doc.Save(m_fileName.GetFullPath()); +} + +wxArrayString Project::GetDependencies() const +{ + wxArrayString result; + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Dependencies")); + if (node) { + wxXmlNode *child = node->GetChildren(); + while (child) { + if (child->GetName() == wxT("Project")) { + result.Add(XmlUtils::ReadString(child, wxT("Name"))); + } + child = child->GetNext(); + } + } + return result; +} + +void Project::SetDependencies(wxArrayString &deps) +{ + //remove old node + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Dependencies")); + if (node) { + m_doc.GetRoot()->RemoveChild(node); + delete node; + } + + node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Dependencies")); + m_doc.GetRoot()->AddChild(node); + + //create a node for each dependency in the array + for (size_t i=0; iAddProperty(wxT("Name"), deps.Item(i)); + node->AddChild(child); + } + + //save changes + m_doc.Save(m_fileName.GetFullPath()); +} diff --git a/Plugin/project.h b/Plugin/project.h new file mode 100644 index 0000000000..1fcd2ccdc2 --- /dev/null +++ b/Plugin/project.h @@ -0,0 +1,279 @@ +#ifndef PROJECT_H +#define PROJECT_H + +#include "wx/wx.h" +#include "wx/string.h" +#include +#include "wx/filename.h" +#include +#include "smart_ptr.h" +#include +#include "project_settings.h" + +//incase we are using DLL build of wxWdigets, we need to make this class to export its +//classes +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif + + +/** + * \class ProjectItem + * a node item that represents a displayable project item + * 'Displayable' items are items that will be shown in the + * FileView control + * + * \author Eran + */ +class WXDLLIMPEXP_LE_SDK ProjectItem +{ +public: + // The visible items + enum { + TypeVirtualDirectory, + TypeProject, + TypeFile, + TypeWorkspace + }; + +public: + wxString m_key; + wxString m_displayName; + wxString m_file; + int m_kind; + +public: + //--------------------------------------------------------------- + // Constructors, destructor and assignment operator + //--------------------------------------------------------------- + ProjectItem(const wxString &key, const wxString &displayName, const wxString &file, int kind) + : m_key(key) + , m_displayName(displayName) + , m_file(file) + , m_kind(kind) + { + } + + ProjectItem() : m_key(wxEmptyString), m_displayName(wxEmptyString), m_file(wxEmptyString), m_kind(TypeProject) + {} + + virtual ~ProjectItem() + {} + + ProjectItem(const ProjectItem& item){ + *this = item; + } + + ProjectItem &operator=(const ProjectItem &item){ + if(this == &item){ + return *this; + } + + m_key = item.m_key; + m_displayName = item.m_displayName; + m_file = item.m_file; + m_kind = item.m_kind; + return *this; + } + + //----------------------------------------- + // Setters / Getters + //----------------------------------------- + const wxString &GetDisplayName() const { return m_displayName; } + const wxString &GetFile() const { return m_file; } + int GetKind() const { return m_kind; } + + void SetDisplayName(const wxString &displayName) { m_displayName = displayName; } + void SetFile(const wxString &file) { m_file = file; } + void SetKind(int kind) { m_kind = kind; } + + //------------------------------------------ + // operations + const wxString& Key() const { return m_key; } +}; + +// useful typedefs +typedef Tree ProjectTree; +typedef SmartPtr ProjectTreePtr; +typedef TreeNode ProjectTreeNode; + +/** + * \ingroup LiteEditor + * + * + * \date 04-15-2007 + * + * \author Eran + * + * \par license + * This code is absolutely free to use and modify. The code is provided "as is" with + * no expressed or implied warranty. The author accepts no liability if it causes + * any damage to your computer, causes your pet to fall ill, increases baldness + * or makes your car start emitting strange noises when you start it up. + * This code has no bugs, just undocumented features! + * + * \todo + * + * \bug + * + */ +class WXDLLIMPEXP_LE_SDK Project +{ +public: + static const wxString STATIC_LIBRARY; + static const wxString DYNAMIC_LIBRARY; + static const wxString EXECUTABLE; + +private: + wxXmlDocument m_doc; + wxFileName m_fileName; + bool m_tranActive; + +public: + const wxFileName &GetFileName() const { return m_fileName; } + + // Ctor - Dtor + + // default constructor + Project(); + virtual ~Project(); + + /** + * \return project name + */ + wxString GetName() const; + + //----------------------------------- + // Project operations + //----------------------------------- + /** + * Load project from file + * \param path + * \return + */ + bool Load(const wxString &path); + /** + * Create new project + * \param name project name + * \param path path of the file excluding the file name (e.g. C:\) + * \param projType project type: Project::STATIC_LIBRARY, Project::DYNAMIC_LIBRARY, Project::EXECUTABLE + * \return + */ + bool Create(const wxString &name, const wxString &path, const wxString &projType = Project::STATIC_LIBRARY); + + /** + * Add file to the project + * \param fileName file full name and path + * \param virtualDir owner virtual directory, if the virtual directory does not exist, a new one will be created + * and the file will be placed under it + * \return + */ + bool AddFile(const wxString &fileName, const wxString &virtualDir = wxEmptyString); + /** + * Remove file from the project + * \param fileName file full path + * \param virtualDir owner virtual directory + * \return + */ + bool RemoveFile(const wxString &fileName, const wxString &virtualDir = wxEmptyString); + + /** + * Create new virtual directory + * \param vdFullPath VD path to add + * \return + */ + bool CreateVirtualDir(const wxString &vdFullPath, bool mkpath = false); + + /** + * remove a virtual directory + * \param vdFullPath VD path to remove + * \return + */ + bool DeleteVirtualDir(const wxString &vdFullPath); + + /** + * Return list of files by a virtual directory + * \param vdFullPath virtual directory + * \param files [output] list of files under this vdFullPath. The files format are in absolute path! + */ + void GetFilesByVirtualDir(const wxString &vdFullPath, wxArrayString &files); + + /** + * Save project settings + */ + void Save(); + + + /** + * Return list of files in this project + * \param files + */ + void GetFiles(std::vector &files, bool absPath = false); + + /** + * Return the project build settings object by name + */ + ProjectSettingsPtr GetSettings() const; + + /** + * Add or update settings to the project + */ + void SetSettings(ProjectSettingsPtr settings); + + //----------------------------------- + // visual operations + //----------------------------------- + ProjectTreePtr AsTree(); + + /** + * Return list of projects that this projects depends on + */ + wxArrayString GetDependencies() const; + + /** + * Set list of projects that this projects depends on + */ + void SetDependencies(wxArrayString &deps); + + + /** + * Return true if a file already exist under the project + */ + bool IsFileExist(const wxString &fileName); + + // Transaction support to reduce overhead of disk writing + void BeginTranscation(){m_tranActive = true;} + void CommitTranscation(){Save();} + bool InTransaction() const{return m_tranActive;} + +private: + // Recursive helper function + void RecursiveAdd(wxXmlNode *xmlNode, ProjectTreePtr &ptp, ProjectTreeNode *nodeParent); + + // Return the node representing a virtual dir by name + // if no such virtual dir exist, create it. + wxXmlNode *GetVirtualDir(const wxString &vdFullPath); + + // Create virtual dir and return its xml node + wxXmlNode *CreateVD(const wxString &vdFullPath, bool mkpath = false); + + void GetFiles(wxXmlNode *parent, std::vector &files, bool absPath = false); +}; + +typedef SmartPtr ProjectPtr; + +class ProjectData { +public: + wxString m_name; //< project name + wxString m_path; //< project directoy + ProjectPtr m_srcProject; + wxString m_cmpType; //< Project compiler type +}; + +#endif // PROJECT_H diff --git a/Plugin/project_settings.cpp b/Plugin/project_settings.cpp new file mode 100644 index 0000000000..22a6e2a6d6 --- /dev/null +++ b/Plugin/project_settings.cpp @@ -0,0 +1,94 @@ +#include "project_settings.h" +#include "xmlutils.h" +#include "project.h" + +ProjectSettings::ProjectSettings(wxXmlNode *node) +{ + if(node){ + // load configurations + m_projectType = XmlUtils::ReadString(node, wxT("Type")); + wxXmlNode *child = node->GetChildren(); + while(child) { + if(child->GetName() == wxT("Configuration")){ + wxString configName = XmlUtils::ReadString(child, wxT("Name")); + m_configs.insert(std::pair(configName, new BuildConfig(child))); + } + child = child->GetNext(); + } + }else{ + //create new settings with default values + m_projectType = Project::STATIC_LIBRARY; + m_configs.insert(std::pair(wxT("Debug"), new BuildConfig(NULL))); + } +} + +ProjectSettings::~ProjectSettings() +{ +} + +ProjectSettings *ProjectSettings::Clone() const +{ + wxXmlNode *node = ToXml(); + ProjectSettings *cloned = new ProjectSettings(node); + delete node; + return cloned; +} + +wxXmlNode *ProjectSettings::ToXml() const +{ + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Settings")); + node->AddProperty(wxT("Type"), m_projectType); + std::map::const_iterator iter = m_configs.begin(); + for(; iter != m_configs.end(); iter++){ + node->AddChild(iter->second->ToXml()); + } + return node; +} + +BuildConfigPtr ProjectSettings::GetBuildConfiguration(const wxString &configName) const +{ + wxString confName = configName; + if(confName.IsEmpty()){ + confName = wxT("Debug"); + } + + std::map::const_iterator iter = m_configs.find(confName); + if(iter == m_configs.end()){ + return NULL; + } + return iter->second; +} + +BuildConfigPtr ProjectSettings::GetFirstBuildConfiguration(ProjectSettingsCookie &cookie) const +{ + cookie.iter = m_configs.begin(); + if(cookie.iter != m_configs.end()){ + BuildConfigPtr conf = cookie.iter->second; + cookie.iter++; + return conf; + } + return NULL; +} + +BuildConfigPtr ProjectSettings::GetNextBuildConfiguration(ProjectSettingsCookie &cookie) const +{ + if(cookie.iter != m_configs.end()){ + BuildConfigPtr conf = cookie.iter->second; + cookie.iter++; + return conf; + } + return NULL; +} + +void ProjectSettings::SetBuildConfiguration(const BuildConfigPtr bc) +{ + m_configs[bc->GetName()] = bc; +} + +void ProjectSettings::RemoveConfiguration(const wxString &configName) +{ + std::map::iterator iter = m_configs.find(configName); + if(iter != m_configs.end()){ + m_configs.erase(iter); + } +} diff --git a/Plugin/project_settings.h b/Plugin/project_settings.h new file mode 100644 index 0000000000..770a4c8d2e --- /dev/null +++ b/Plugin/project_settings.h @@ -0,0 +1,120 @@ +#ifndef PROJECT_SETTINGS_H +#define PROJECT_SETTINGS_H + +#include "build_config.h" +#include "wx/string.h" +#include + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif + +/** + * \ingroup SDK + * A cookie class to allow the enumration operation to be reentrants by multiple threads + * + * \version 1.0 + * first version + * + * \date 05-15-2007 + * + * \author Eran + * + */ +class WXDLLIMPEXP_LE_SDK ProjectSettingsCookie { +public: + std::map::const_iterator iter; +}; + +/** + * \ingroup SDK + * Representation class for the project settings + * + * \version 1.0 + * first version + * + * \date 05-15-2007 + * + * \author Eran + * + */ +class WXDLLIMPEXP_LE_SDK ProjectSettings : public ConfObject { + std::map m_configs; + wxString m_projectType; + +public: + /** + * Clone this project settings, the cloned object is allocated on the heap + * and it is the responsibility of the caller to call delete when there are no + * more refreneces to it + * \return + */ + ProjectSettings *Clone() const; + + /** + * Construct ProjectSettings object from its XML representation + * \param node XML node of the settings object + */ + ProjectSettings(wxXmlNode *node); + + /** + * Destructor + */ + virtual ~ProjectSettings(); + + /** + * Serialize the object to XML representation + */ + wxXmlNode *ToXml() const; + + // enumaration + /** + * Find the first build configuration by name + * \param configName build configuration name to find + * \return build configuration smart pointer, will be deleted automatically when no more refrences to it + */ + BuildConfigPtr GetBuildConfiguration(const wxString &configName) const; + + /** + * enumerate through all the build build configuration, this function returns the first build configuration found + * \param cookie an object to allow this call to be reentrant by multiple threads + * \return build configuration smart pointer, will be deleted automatically when no more refrences to it + */ + BuildConfigPtr GetFirstBuildConfiguration(ProjectSettingsCookie &cookie) const; + /** + * enumerate through all the build build configuration, this function returns the next build configuration found + * cookie should be the same as passed to previous calls to GetFirstBuildConfiguration or + * \param cookie an object to allow this call to be reentrant by multiple threads GetNextBuildConfiguration + * \return build configuration smart pointer, will be deleted automatically when no more refrences to it + */ + BuildConfigPtr GetNextBuildConfiguration(ProjectSettingsCookie &cookie) const; + + /** + * Insert or Update BuildConfigPtr, if a build configuration with this name already exist, + * it is replaced + * \param bc build configuration object + */ + void SetBuildConfiguration(const BuildConfigPtr bc); + + /** + * Remove build configuration from the project settings. The build configuration objects stored under + * this object are stored using smart pointers, thus if there are no more refrences to the removed build + * configuration it will be deleted automatically + * \param configName configuration name to remove. + */ + void RemoveConfiguration(const wxString &configName); + + //setters/getters + const wxString &GetProjectType() const { return m_projectType; } + void SetProjectType(const wxString &type) { m_projectType = type;} +}; + +typedef SmartPtr ProjectSettingsPtr; + +#endif // PROJECT_SETTINGS_H diff --git a/Plugin/regex_processor.cpp b/Plugin/regex_processor.cpp new file mode 100644 index 0000000000..50657f1b66 --- /dev/null +++ b/Plugin/regex_processor.cpp @@ -0,0 +1,25 @@ +#include "regex_processor.h" +#include "macros.h" +#include "wx/regex.h" + +RegexProcessor::RegexProcessor(const wxString &reStr) +{ + m_re = new wxRegEx(reStr);//, wxRE_ADVANCED); +} + +RegexProcessor::~RegexProcessor() +{ + delete m_re; +} + +bool RegexProcessor::GetGroup(const wxString &str, int grp, wxString &out) +{ + if(m_re && m_re->IsValid()){ + if(m_re->Matches(str)){ + out = m_re->GetMatch(str, grp); + TrimString(out); + return true; + } + } + return false; +} diff --git a/Plugin/regex_processor.h b/Plugin/regex_processor.h new file mode 100644 index 0000000000..34b7943cea --- /dev/null +++ b/Plugin/regex_processor.h @@ -0,0 +1,26 @@ +#ifndef REGEX_PROCESSOR_H +#define REGEX_PROCESSOR_H + +#include "wx/string.h" + +class wxRegEx; + +#ifndef WXDLLIMPEXP_LE_SDK +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +#endif // WXDLLIMPEXP_LE_SDK + +class WXDLLIMPEXP_LE_SDK RegexProcessor { + wxRegEx *m_re; +public: + RegexProcessor(const wxString &reStr); + virtual ~RegexProcessor(); + bool GetGroup(const wxString &str, int grp, wxString &out); +}; + +#endif // REGEX_PROCESSOR_H diff --git a/Plugin/root.xpm b/Plugin/root.xpm new file mode 100644 index 0000000000..4f6d91b023 --- /dev/null +++ b/Plugin/root.xpm @@ -0,0 +1,36 @@ +/* XPM */ +static char *xpm_root[] = { +"16 16 16 2", +"00 c #976911", +"01 c gray42", +"02 c #C18B24", +"03 c #E3B552", +"04 c #6482B3", +"05 c #8E9CAA", +"06 c #FFEE86", +"07 c gray74", +"08 c #68BDFF", +"09 c #B9CDE6", +"10 c #D2D2D2", +"11 c #D8E9F1", +"12 c #E7F7FF", +"13 c #F3F7FB", +"14 c #F7FFFF", +"15 c none", +"15151515040404040404040811131515", +"15151515041313131313130808101315", +"15150202041309090909130808081013", +"15021313041313131313131111040111", +"02130606041209090909090912040110", +"02060606041212121212121212040110", +"02060202040707070707070707040207", +"02060213111313131313131313110001", +"02060206071109090909090911070001", +"02030206071111111111111111070001", +"02030206071111111111111111070001", +"02030206070707070707070707070001", +"02030206060303030303030303060001", +"11020202020000000000000000000101", +"13100101010101010101010101010110", +"15131110101010101010101010101113" +}; diff --git a/Plugin/search_thread.cpp b/Plugin/search_thread.cpp new file mode 100644 index 0000000000..2950da3b68 --- /dev/null +++ b/Plugin/search_thread.cpp @@ -0,0 +1,347 @@ +#include "search_thread.h" +#include "wx/event.h" +#include +#include +#include +#include +#include +#include +#include "dirtraverser.h" +#include "macros.h" +#include "workspace.h" + +#define ADJUST_LINE_AND_CONT(modLine, pos, findString) \ +{ \ + if( !AdjustLine(modLine, pos, findString) ){ \ + break; \ + } else { \ + continue; \ + } \ +} + +DEFINE_EVENT_TYPE(wxEVT_SEARCH_THREAD_MATCHFOUND) +DEFINE_EVENT_TYPE(wxEVT_SEARCH_THREAD_SEARCHEND) +DEFINE_EVENT_TYPE(wxEVT_SEARCH_THREAD_SEARCHCANCELED) +DEFINE_EVENT_TYPE(wxEVT_SEARCH_THREAD_SEARCHSTARTED) + +//---------------------------------------------------------------- +// SearchData +//---------------------------------------------------------------- + +const wxString& SearchData::GetExtensions() const +{ + return m_validExt; +} + +//---------------------------------------------------------------- +// SearchThread +//---------------------------------------------------------------- + +SearchThread::SearchThread() +: WorkerThread() +, m_wordChars(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_")) +, m_reExpr(wxT("")) +{ + IndexWordChars(); +} + +SearchThread::~SearchThread() +{ +} + +void SearchThread::IndexWordChars() +{ + m_wordCharsMap.clear(); + for(size_t i=0; iGetRootDir() == SEARCH_IN_WORKSPACE) + { + files = data->GetFiles(); + } + else if(data->GetRootDir() == SEARCH_IN_PROJECT) + { + files = data->GetFiles(); + } + else + { + DirTraverser traverser(data->GetExtensions()); + wxDir dir(data->GetRootDir()); + dir.Traverse(traverser); + files = traverser.GetFiles(); + } +} + +void SearchThread::DoSearchFiles(ThreadRequest *req) +{ + SearchData *data = static_cast(req); + // Get all files + if( data->GetRootDir().IsEmpty()) + return; + + if( data->GetFindString().IsEmpty() ) + return; + + StopSearch(false); + wxArrayString fileList; + GetFiles(data, fileList); + wxStopWatch sw; + + // Send startup message to main thread + if( m_notifiedWindow ){ + wxString message; + wxCommandEvent event(wxEVT_SEARCH_THREAD_SEARCHSTARTED, GetId()); + message << wxT("====== Searching for: '") << data->GetFindString(); + message << wxT("';\tMatch case: "); + if( data->IsMatchCase() ){ + message << wxT("true "); + } else { + message << wxT("false "); + } + + message << wxT(";\tMatch whole word: "); + if( data->IsMatchWholeWord() ){ + message << wxT("true "); + } else { + message << wxT("false "); + } + + message << wxT(";\tRegular expression: "); + if( data->IsRegularExpression() ){ + message << wxT("true;"); + } else { + message << wxT("false; ======"); + } + event.SetString(message); + ::wxPostEvent(m_notifiedWindow, event); + } + + for(size_t i=0; iIsRegularExpression() ){ + // regular expression search + while(tkz.HasMoreTokens()){ + // Read the next line + wxString line = tkz.NextToken(); + DoSearchLineRE(line, lineNumber, fileName, data); + lineNumber++; + } + } else { + // simple search + while(tkz.HasMoreTokens()){ + + // Read the next line + wxString line = tkz.NextToken(); + DoSearchLine(line, lineNumber, fileName, data); + lineNumber++; + } + } + + if( m_results.empty() == false ) + SendEvent(wxEVT_SEARCH_THREAD_MATCHFOUND); +} +void SearchThread::DoSearchLineRE(const wxString &line, const int lineNum, const wxString &fileName, const SearchData *data) +{ + wxRegEx &re = GetRegex(data->GetFindString(), data->IsMatchCase()); + size_t col = 0; + wxString modLine = line; + if( re.IsValid() ){ + while( re.Matches(modLine)) { + size_t start, len; + re.GetMatch(&start, &len); + col += start; + + m_summary.SetNumMatchesFound(m_summary.GetNumMatchesFound() + 1); + + // Notify our match + SearchResult result; + result.SetColumn((int)col); + result.SetLineNumber(lineNum); + result.SetPattern(line); + result.SetFileName(fileName); + m_results.push_back(result); + col += len; + + // adjust the line + if(line.Length() - col <= 0) + break; + modLine = modLine.Right(line.Length() - col); + } + } +} + +void SearchThread::DoSearchLine(const wxString &line, const int lineNum, const wxString &fileName, const SearchData *data) +{ + wxString findString = data->GetFindString(); + wxString modLine = line; + + if( !data->IsMatchCase() ){ + modLine = modLine.MakeLower(); + findString = findString.MakeLower(); + } + + int pos = 0; + int col = 0; + while( pos != wxNOT_FOUND ){ + pos = modLine.Find(findString); + if(pos != wxNOT_FOUND){ + col += pos; + + // we have a match + if( data->IsMatchWholeWord() ){ + + // make sure that the word before is not in the wordChars map + if((pos > 0) && (m_wordCharsMap.find(modLine.GetChar(pos-1)) != m_wordCharsMap.end()) ) + ADJUST_LINE_AND_CONT(modLine, pos, findString); + + // if we have more characters to the right, make sure that the first char does not match any + // in the wordCharsMap + if(pos + findString.Length() <= modLine.Length()){ + wxChar nextCh = modLine.GetChar(pos+findString.Length()); + if(m_wordCharsMap.find(nextCh) != m_wordCharsMap.end()) + ADJUST_LINE_AND_CONT(modLine, pos, findString); + } + } + + m_summary.SetNumMatchesFound(m_summary.GetNumMatchesFound() + 1); + + // Notify our match + SearchResult result; + result.SetColumn(col); + result.SetLineNumber(lineNum); + result.SetPattern(line); + result.SetFileName(fileName); + m_results.push_back(result); + if( !AdjustLine(modLine, pos, findString) ){ + break; + } + col += (int)findString.Length(); + } + } +} + +bool SearchThread::AdjustLine(wxString &line, int &pos, wxString &findString) +{ + // adjust the current line + if( line.Length() - (pos + findString.Length()) >= findString.Length()){ + line = line.Right(line.Length() - (pos + findString.Length())); + pos += (int)findString.Length(); + return true; + } else { + return false; + } +} + + +void SearchThread::SendEvent(wxEventType type) +{ + if( !m_notifiedWindow ) + return; + + wxCommandEvent event(type, GetId()); + + if(type == wxEVT_SEARCH_THREAD_MATCHFOUND) + { + event.SetClientData( new SearchResultList(m_results) ); + m_results.clear(); + } + else if(type == wxEVT_SEARCH_THREAD_SEARCHEND) + { + // Nothing to do + event.SetClientData( new SearchSummary(m_summary) ); + } + else if(type == wxEVT_SEARCH_THREAD_SEARCHCANCELED) + { + event.SetString(wxT("Search cancelled by user")); + } + + if( m_notifiedWindow ){ + ::wxPostEvent(m_notifiedWindow, event); + } + wxThread::Sleep(5); +} diff --git a/Plugin/search_thread.h b/Plugin/search_thread.h new file mode 100644 index 0000000000..9088fd7b96 --- /dev/null +++ b/Plugin/search_thread.h @@ -0,0 +1,325 @@ +#ifndef SEARCH_THREAD_H +#define SEARCH_THREAD_H + +#include +#include +#include +#include +#include "singleton.h" +#include "wx/event.h" +#include "wx/filename.h" +#include +#include "worker_thread.h" + +// Possible search data options: +enum { + wxSD_MATCHCASE = 1, + wxSD_MATCHWHOLEWORD = 2, + wxSD_REGULAREXPRESSION = 4 +}; + +class wxEvtHandler; + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK +//---------------------------------------------------------- +// The searched data class to be passed to the search thread +//---------------------------------------------------------- + +class WXDLLIMPEXP_LE_SDK SearchData : public ThreadRequest +{ + wxString m_rootDir; + wxString m_findString; + int m_flags; + wxString m_validExt; + wxArrayString m_files; + +private: + // An internal helper function that set/remove an option bit + void SetOption(int option, bool set){ + if(set){ + m_flags |= option; + } else { + m_flags &= ~(option); + } + } + +public: + // Ctor-Dtor + SearchData() + : ThreadRequest() + , m_rootDir(wxEmptyString) + , m_findString(wxEmptyString) + , m_flags(0) + {} + + SearchData(const wxString &rootDir, const wxString &findString, const int flags, const wxString &exts, const wxArrayString &files) + : ThreadRequest() + , m_rootDir(rootDir) + , m_findString(findString) + , m_flags(flags) + , m_validExt(exts) + , m_files(files) + {} + + SearchData(const SearchData &rhs){ + *this = rhs; + } + + virtual ~SearchData() + {} + + SearchData& operator=(const SearchData &rhs){ + if(this == &rhs) + return *this; + + m_findString = rhs.m_findString; + m_flags = rhs.m_flags; + m_validExt = rhs.m_validExt; + m_rootDir = rhs.m_rootDir; + m_files = rhs.m_files; + return *this; + } + +public: + //------------------------------------------ + // Setters / Getters + //------------------------------------------ + bool IsMatchCase() const { return m_flags & wxSD_MATCHCASE ? true : false; } + bool IsMatchWholeWord() const { return m_flags & wxSD_MATCHWHOLEWORD ? true : false; } + bool IsRegularExpression() const { return m_flags & wxSD_REGULAREXPRESSION ? true : false; } + const wxString &GetRootDir() const { return m_rootDir; } + void SetMatchCase(bool matchCase){ SetOption(wxSD_MATCHCASE, matchCase); } + void SetMatchWholeWord(bool matchWholeWord){ SetOption(wxSD_MATCHWHOLEWORD, matchWholeWord); } + void SetRegularExpression(bool re){ SetOption(wxSD_REGULAREXPRESSION, re); } + void SetExtensions(const wxString &exts) { m_validExt = exts; } + void SetRootDir(const wxString &rootDir) { m_rootDir = rootDir; } + const wxString& GetExtensions() const; + const wxString &GetFindString() const { return m_findString; } + void SetFindString(const wxString &findString){ m_findString = findString; } + void SetFiles(const wxArrayString &files){m_files = files;} + const wxArrayString &GetFiles() const{return m_files;} +}; + +//------------------------------------------ +// class containing the search result +//------------------------------------------ +class WXDLLIMPEXP_LE_SDK SearchResult : public wxObject { + wxString m_pattern; + int m_lineNumber; + int m_column; + wxString m_fileName; + +public: + //ctor-dtor, copy constructor and assignment operator + SearchResult(){} + + virtual ~SearchResult(){} + + SearchResult(const SearchResult &rhs) { *this = rhs; } + + SearchResult& operator=(const SearchResult &rhs){ + if(this == &rhs) + return *this; + m_column = rhs.m_column; + m_lineNumber = rhs.m_lineNumber; + m_pattern = rhs.m_pattern; + m_fileName = rhs.m_fileName; + return *this; + } + + //------------------------------------------------------ + // Setters/getters + void SetPattern(const wxString &pat){ m_pattern = pat;} + void SetLineNumber(const int &line){ m_lineNumber = line; } + void SetColumn(const int &col){ m_column = col;} + void SetFileName(const wxString &fileName) { m_fileName = fileName; } + + const int& GetLineNumber() const { return m_lineNumber; } + const int& GetColumn() const { return m_column; } + const wxString &GetPattern() const { return m_pattern; } + const wxString &GetFileName() const { return m_fileName; } + + // return a foramtted message + wxString GetMessage() const + { + wxString msg; + msg << GetFileName() + << wxT("(") + << GetLineNumber() + << wxT(",") + << GetColumn() + << wxT("): ") + << GetPattern(); + return msg; + } +}; + +typedef std::list SearchResultList; + + +class WXDLLIMPEXP_LE_SDK SearchSummary : public wxObject { + int m_fileScanned; + int m_matchesFound; + int m_elapsed; + +public: + SearchSummary() + : m_fileScanned(0) + , m_matchesFound(0) + , m_elapsed(0) + { + } + + virtual ~SearchSummary() + {} + + SearchSummary(const SearchSummary& rhs) + { + *this = rhs; + } + + SearchSummary& operator=(const SearchSummary &rhs) + { + if(this == &rhs) + return *this; + + m_fileScanned = rhs.m_fileScanned; + m_matchesFound = rhs.m_matchesFound; + m_elapsed = rhs.m_elapsed; + return *this; + } + + int GetNumFileScanned() const { return m_fileScanned; } + int GetNumMatchesFound() const { return m_matchesFound; } + + void SetNumFileScanned(const int &num) { m_fileScanned = num; } + void SetNumMatchesFound(const int &num) { m_matchesFound = num; } + void SetElapsedTime(long elapsed) {m_elapsed = elapsed;} + wxString GetMessage() const { + wxString msg(wxT("====== Number of files scanned: ")); + msg << m_fileScanned << wxT(","); + msg << wxT(" Matches found: "); + msg << m_matchesFound; + int secs = m_elapsed / 1000; + int msecs = m_elapsed % 1000; + + msg << wxT(", elapsed time: ") << secs << wxT(":") << msecs << wxT(" sec ======"); + return msg; + } + +}; + +//---------------------------------------------------------- +// The search thread +//---------------------------------------------------------- + +class WXDLLIMPEXP_LE_SDK SearchThread : public WorkerThread +{ + friend class Singleton; + wxString m_wordChars; + std::map m_wordCharsMap; //< Internal + SearchResultList m_results; + bool m_stopSearch; + SearchSummary m_summary; + wxString m_reExpr; + wxRegEx m_regex; + bool m_matchCase; + +private: + /** + * Default constructor. + */ + SearchThread(); + + /** + * Destructor. + */ + virtual ~SearchThread(); + +public: + /** + * Process request from caller + */ + void ProcessRequest(ThreadRequest *req); + + /** + * Add a request to the search thread to start + * \param data SearchData class + */ + void PerformSearch(const SearchData &data); + + /** + * Stops the current search operation + * \note This call must be called from the context of other thread (e.g. main thread) + */ + void StopSearch(bool stop = true); + + /** + * The search thread has several functions that operate on words, + * which are defined to be contiguous sequences of characters from a particular set of characters. + * Defines which characters are members of that set. The default is set to: + * "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_" + * \param chars sequence of characters that are considered part of a word + */ + void SetWordChars(const wxString &chars); + +private: + + /** + * Return files to search + * \param files output + * \param data search data + */ + void GetFiles(const SearchData *data, wxArrayString &files); + + /** + * Index the word chars from the array into a map + */ + void IndexWordChars(); + + // Test to see if user asked to cancel the search + bool TestStopSearch(); + + /** + * Do the actual search operation + * \param data inpunt contains information about the search + */ + void DoSearchFiles(ThreadRequest *data); + + // Perform search on a single file + void DoSearchFile(const wxString &fileName, const SearchData *data); + + // Perform search on a line + void DoSearchLine(const wxString &line, const int lineNum, const wxString &fileName, const SearchData *data); + + // Perform search on a line using regular expression + void DoSearchLineRE(const wxString &line, const int lineNum, const wxString &fileName, const SearchData *data); + + // Send an event to the notified window + void SendEvent(wxEventType type); + + // return a compiled regex object for the expression + wxRegEx &GetRegex(const wxString &expr, bool matchCase); + + // Internal function + bool AdjustLine(wxString &line, int &pos, wxString &findString); + +}; + +typedef Singleton SearchThreadST; + +BEGIN_DECLARE_EVENT_TYPES() +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_SEARCH_THREAD_MATCHFOUND, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_SEARCH_THREAD_SEARCHEND, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_SEARCH_THREAD_SEARCHCANCELED, wxID_ANY) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_LE_SDK, wxEVT_SEARCH_THREAD_SEARCHSTARTED, wxID_ANY) +END_DECLARE_EVENT_TYPES() + +#endif // SEARCH_THREAD_H + diff --git a/Plugin/sessionmanager.cpp b/Plugin/sessionmanager.cpp new file mode 100644 index 0000000000..816a93f12d --- /dev/null +++ b/Plugin/sessionmanager.cpp @@ -0,0 +1,111 @@ +#include "sessionmanager.h" +#include "xmlutils.h" +#include "wx/ffile.h" + +//Session entry +SessionEntry::SessionEntry() +{ +} + +SessionEntry::~SessionEntry() +{ +} + +void SessionEntry::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_selectedTab"), m_selectedTab); + arch.Read(wxT("m_tabs"), m_tabs); + arch.Read(wxT("m_workspaceName"), m_workspaceName); +} + +void SessionEntry::Serialize(Archive &arch) +{ + arch.Write(wxT("m_selectedTab"), m_selectedTab); + arch.Write(wxT("m_tabs"), m_tabs); + arch.Write(wxT("m_workspaceName"), m_workspaceName); +} + + +//--------------------------------------------- +SessionManager & SessionManager::Get() +{ + static SessionManager theManager; + return theManager; +} + +SessionManager::SessionManager() +{ +} + +SessionManager::~SessionManager() +{ +} + +bool SessionManager::Load(const wxString &fileName) +{ + m_fileName = wxFileName(fileName); + + if(!m_fileName.FileExists()){ + //no such file or directory + //create an empty one + wxFFile newFile(fileName, wxT("a+")); + newFile.Write(wxT("")); + newFile.Close(); + } + + m_doc.Load(m_fileName.GetFullPath()); + return true; +} + +bool SessionManager::FindSession(const wxString &name, SessionEntry &session) +{ + if(!m_doc.GetRoot()){ + return false; + } + + wxXmlNode *node = m_doc.GetRoot()->GetChildren(); + while(node){ + if(node->GetName() == wxT("Session")){ + if(XmlUtils::ReadString(node, wxT("Name")) == name){ + //we found our session + Archive arch; + arch.SetXmlNode(node); + session.DeSerialize(arch); + return true; + } + } + node = node->GetNext(); + } + return false; +} + +bool SessionManager::Save(const wxString &name, SessionEntry &session) +{ + if(!m_doc.GetRoot()){ + return false; + } + + wxXmlNode *node = m_doc.GetRoot()->GetChildren(); + while(node){ + if(node->GetName() == wxT("Session")){ + if(XmlUtils::ReadString(node, wxT("Name")) == name){ + //we found our session, remove it + m_doc.GetRoot()->RemoveChild(node); + delete node; + break; + } + } + node = node->GetNext(); + } + + //create new node and insert it + wxXmlNode *child = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Session")); + m_doc.GetRoot()->AddChild(child); + child->AddProperty(wxT("Name"), name); + + Archive arch; + arch.SetXmlNode(child); + session.Serialize(arch); + //save the file + return m_doc.Save(m_fileName.GetFullPath()); +} diff --git a/Plugin/sessionmanager.h b/Plugin/sessionmanager.h new file mode 100644 index 0000000000..c233d93027 --- /dev/null +++ b/Plugin/sessionmanager.h @@ -0,0 +1,59 @@ +#ifndef SESSIONMANAGER_H +#define SESSIONMANAGER_H + +#include "serialized_object.h" +#include "wx/xml/xml.h" + +/** + * \class SessionEntry + * \brief Session entry is associated per workspace + * \author Eran + * \date 09/25/07 + */ +class SessionEntry : public SerializedObject { + int m_selectedTab; + wxArrayString m_tabs; + wxString m_workspaceName; + +public: + //Setters + void SetSelectedTab(const int& selectedTab) {this->m_selectedTab = selectedTab;} + void SetTabs(const wxArrayString& tabs) {this->m_tabs = tabs;} + void SetWorkspaceName(const wxString& workspaceName) {this->m_workspaceName = workspaceName;} + + //Getters + const int& GetSelectedTab() const {return m_selectedTab;} + const wxArrayString& GetTabs() const {return m_tabs;} + const wxString& GetWorkspaceName() const {return m_workspaceName;} + + SessionEntry(); + virtual ~SessionEntry(); + + void Serialize(Archive &arch); + void DeSerialize(Archive &arch); + +}; + +/** + * \class SessionManager + * \brief + * \author Eran + * \date 09/25/07 + */ +class SessionManager { + wxXmlDocument m_doc; + wxFileName m_fileName; + +private: + SessionManager(); + ~SessionManager(); + +public: + static SessionManager& Get(); + bool Load(const wxString &fileName); + bool Save(const wxString &name, SessionEntry &session); + bool FindSession(const wxString &name, SessionEntry &session); +}; + +#endif //SESSIONMANAGER_H + diff --git a/Plugin/splashscreen.cpp b/Plugin/splashscreen.cpp new file mode 100644 index 0000000000..9df8dd3dcc --- /dev/null +++ b/Plugin/splashscreen.cpp @@ -0,0 +1,248 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/generic/splash.cpp +// Purpose: SplashScreen class +// Author: Julian Smart +// Modified by: Eran Ifrah +// Created: 28/6/2000 +// RCS-ID: $Id: splash.cpp,v 1.31 2006/10/30 19:41:23 VZ Exp $ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" +#include "wx/splash.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SPLASH + +#ifdef __WXGTK20__ + #include +#endif + +#include "splashscreen.h" +#include "wx/settings.h" + +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" + #include "wx/dcclient.h" +#endif + +static int SplashID = wxNewId(); + +BEGIN_EVENT_TABLE(SplashScreen, wxFrame) + //EVT_TIMER(SplashID, SplashScreen::OnNotify) + EVT_CLOSE(SplashScreen::OnCloseWindow) +END_EVENT_TABLE() + +/* Note that unless we pass a non-default size to the frame, SetClientSize + * won't work properly under Windows, and the splash screen frame is sized + * slightly too small. + */ + +SplashScreen::SplashScreen( const wxBitmap& bitmap, + const wxString &mainTitle, + const wxString &subTitle, + long splashStyle, + int milliseconds, + wxWindow* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style): + wxFrame(parent, id, wxEmptyString, wxPoint(0,0), wxSize(100, 100), style) +{ + // At least for GTK+ 2.0, this hint is not available. +#if defined(__WXGTK20__) +#if GTK_CHECK_VERSION(2,2,0) + gtk_window_set_type_hint(GTK_WINDOW(m_widget), + GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); +#endif +#endif + + m_window = NULL; + m_splashStyle = splashStyle; + m_milliseconds = milliseconds; + + m_window = new SplashScreenWindow(bitmap, mainTitle, subTitle, this, wxID_ANY, pos, size, wxNO_BORDER); + + SetClientSize(bitmap.GetWidth(), bitmap.GetHeight()); + + if (m_splashStyle & wxSPLASH_CENTRE_ON_PARENT) + CentreOnParent(); + else if (m_splashStyle & wxSPLASH_CENTRE_ON_SCREEN) + CentreOnScreen(); + + if (m_splashStyle & wxSPLASH_TIMEOUT) + { + m_timer.SetOwner(this, SplashID); + m_timer.Start(milliseconds, true); + } + + Show(true); + m_window->SetFocus(); +#if defined( __WXMSW__ ) || defined(__WXMAC__) + Update(); // Without this, you see a blank screen for an instant +#else + wxYieldIfNeeded(); // Should eliminate this +#endif +} + +SplashScreen::~SplashScreen() +{ + m_timer.Stop(); +} + +void SplashScreen::OnNotify(wxTimerEvent& WXUNUSED(event)) +{ + Close(true); +} + +void SplashScreen::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) +{ + m_timer.Stop(); +// this->Destroy(); +} + +/* + * SplashScreenWindow + */ + +BEGIN_EVENT_TABLE(SplashScreenWindow, wxWindow) +#ifdef __WXGTK__ + EVT_PAINT(SplashScreenWindow::OnPaint) +#endif + EVT_ERASE_BACKGROUND(SplashScreenWindow::OnEraseBackground) + EVT_CHAR(SplashScreenWindow::OnChar) + EVT_MOUSE_EVENTS(SplashScreenWindow::OnMouseEvent) +END_EVENT_TABLE() + +SplashScreenWindow::SplashScreenWindow(const wxBitmap& bitmap, const wxString &mainTitle, + const wxString &subTitle, wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style): + wxWindow(parent, id, pos, size, style) +{ + m_bitmap = bitmap; + m_mainTitle = mainTitle; + m_subTitle = subTitle; + +#if !defined(__WXGTK__) && wxUSE_PALETTE + bool hiColour = (wxDisplayDepth() >= 16) ; + + if (bitmap.GetPalette() && !hiColour) + { + SetPalette(* bitmap.GetPalette()); + } +#endif + +} + +// VZ: why don't we do it under wxGTK? +#if !defined(__WXGTK__) && wxUSE_PALETTE + #define USE_PALETTE_IN_SPLASH +#endif + +static void wxDrawSplashBitmap( wxDC& dc, + const wxBitmap& bitmap, + const wxString &mainTitle, + const wxString &subTitle) +{ + wxMemoryDC dcMem; + +#ifdef USE_PALETTE_IN_SPLASH + bool hiColour = (wxDisplayDepth() >= 16) ; + + if (bitmap.GetPalette() && !hiColour) + { + dcMem.SetPalette(* bitmap.GetPalette()); + } +#endif // USE_PALETTE_IN_SPLASH + + dcMem.SelectObjectAsSource(bitmap); + //write the main title & subtitle + wxCoord w, h, w1, h1; + wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont smallfont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + font.SetPointSize(14); + smallfont.SetPointSize(10); + dcMem.SetFont(font); + dcMem.GetMultiLineTextExtent(mainTitle, &w, &h); + wxCoord bmpW = bitmap.GetWidth(); + wxCoord bmpH = bitmap.GetHeight(); + + //draw shadow + dcMem.SetTextForeground(wxT("BLACK")); + + dcMem.DrawText(mainTitle, bmpW - w - 9, 11); + //draw the text + dcMem.SetTextForeground(wxT("YELLOW")); + dcMem.SetFont(font); + + //draw the main title + wxCoord textX = bmpW - w - 10; + wxCoord textY = 10; + dcMem.DrawText(mainTitle, textX, textY); + + //draw the subtitle + dcMem.SetFont(smallfont); + dcMem.SetTextForeground(wxT("WHITE")); + dcMem.GetMultiLineTextExtent(subTitle, &w1, &h1); + + wxCoord stextX = textX + (w - w1)/2; + wxCoord stextY = bmpH - h1 - 10; + + dcMem.DrawText(subTitle, stextX, stextY); + + dc.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), & dcMem, 0, 0); + dcMem.SelectObject(wxNullBitmap); + + //draw the subtitle + +#ifdef USE_PALETTE_IN_SPLASH + if (bitmap.GetPalette() && !hiColour) + { + dcMem.SetPalette(wxNullPalette); + } +#endif // USE_PALETTE_IN_SPLASH +} + +void SplashScreenWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) +{ + wxPaintDC dc(this); + if (m_bitmap.Ok()) + wxDrawSplashBitmap(dc, m_bitmap, m_mainTitle, m_subTitle); +} + +void SplashScreenWindow::OnEraseBackground(wxEraseEvent& event) +{ + if (event.GetDC()) + { + if (m_bitmap.Ok()) + { + wxDrawSplashBitmap(* event.GetDC(), m_bitmap, m_mainTitle, m_subTitle); + } + } + else + { + wxClientDC dc(this); + if (m_bitmap.Ok()) + { + wxDrawSplashBitmap(dc, m_bitmap, m_mainTitle, m_subTitle); + } + } +} + +void SplashScreenWindow::OnMouseEvent(wxMouseEvent& event) +{ + if (event.LeftDown() || event.RightDown()) + GetParent()->Close(true); +} + +void SplashScreenWindow::OnChar(wxKeyEvent& WXUNUSED(event)) +{ + GetParent()->Close(true); +} + +#endif // wxUSE_SPLASH diff --git a/Plugin/splashscreen.h b/Plugin/splashscreen.h new file mode 100644 index 0000000000..45d5cdaca6 --- /dev/null +++ b/Plugin/splashscreen.h @@ -0,0 +1,87 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: splash.h +// Purpose: Splash screen class +// Author: Julian Smart +// Modified by: Eran Ifrah +// Created: 28/6/2000 +// RCS-ID: $Id: splash.h,v 1.14 2006/09/05 20:45:25 VZ Exp $ +// Copyright: (c) Julian Smart +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _SPLASHSCREEN_H_ +#define _SPLASHSCREEN_H_ + +#include "wx/bitmap.h" +#include "wx/timer.h" +#include "wx/frame.h" +#include "wx/splash.h" + +#define HIDE_SPLASH_EVENT_ID 48675 + +class SplashScreenWindow; + +/* + * SplashScreen + */ + +class SplashScreen: public wxFrame +{ +public: + // for RTTI macros only + SplashScreen() {} + SplashScreen( const wxBitmap& bitmap, const wxString &mainTitle, + const wxString &subTitle, long splashStyle, int milliseconds, + wxWindow* parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); + + virtual ~SplashScreen(); + + void OnCloseWindow(wxCloseEvent& event); + void OnNotify(wxTimerEvent& event); + + long GetSplashStyle() const { return m_splashStyle; } + SplashScreenWindow* GetSplashWindow() const { return m_window; } + int GetTimeout() const { return m_milliseconds; } + +protected: + SplashScreenWindow* m_window; + long m_splashStyle; + int m_milliseconds; + wxTimer m_timer; + + DECLARE_EVENT_TABLE() +}; + +/* + * SplashScreenWindow + */ + +class SplashScreenWindow: public wxWindow +{ +public: + SplashScreenWindow(const wxBitmap& bitmap, const wxString &mainTitle, + const wxString &subTitle, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxNO_BORDER); + + void OnPaint(wxPaintEvent& event); + void OnEraseBackground(wxEraseEvent& event); + void OnMouseEvent(wxMouseEvent& event); + void OnChar(wxKeyEvent& event); + + void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; } + wxBitmap& GetBitmap() { return m_bitmap; } + +protected: + wxBitmap m_bitmap; + wxString m_mainTitle; + wxString m_subTitle; + + DECLARE_EVENT_TABLE() + DECLARE_NO_COPY_CLASS(SplashScreenWindow) +}; + + +#endif + // _SPLASHSCREEN_H_ diff --git a/Plugin/sync_queue.cpp b/Plugin/sync_queue.cpp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Plugin/sync_queue.h b/Plugin/sync_queue.h new file mode 100644 index 0000000000..9250c9a709 --- /dev/null +++ b/Plugin/sync_queue.h @@ -0,0 +1,88 @@ +#ifndef SYNC_QUEUE_H +#define SYNC_QUEUE_H + +#include "wx/thread.h" +#include + + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/** + * A thread safe queue implementation + */ +template class WXDLLIMPEXP_LE_SDK SyncQueue { + std::deque m_queue; + wxCriticalSection m_cs; +public: + SyncQueue(){} + + virtual ~SyncQueue(){ + wxCriticalSectionLocker lk(m_cs); + m_queue.clear(); + } + + /** + * Add element to the top of the queue + */ + void PushFront(T element) { + wxCriticalSectionLocker lk(m_cs); + m_queue.push_front(element); + } + + /** + * pop element from the top of the queue + */ + T PopFront(){ + wxCriticalSectionLocker lk(m_cs); + if( m_queue.empty() ){ + return NULL; + } + T e = m_queue.front(); + m_queue.pop_front(); + return e; + } + + /** + * Add element to the end of the queue + */ + void PushBack(T element) { + wxCriticalSectionLocker lk(m_cs); + m_queue.push_back(element); + } + + /** + * pop element from the end of the queue + */ + T PopBack(){ + wxCriticalSectionLocker lk(m_cs); + if( m_queue.empty() ){ + return NULL; + } + T e = m_queue.back(); + m_queue.pop_back(); + return e; + } + + /** + * Return number of elements on the queue + */ + size_t GetCount() { + wxCriticalSectionLocker lk(m_cs); + return m_queue.size(); + } + + /** + * Clear the queue - remove all elements from the queue + */ + void Clear() { + wxCriticalSectionLocker lk(m_cs); + return m_queue.clear(); + } +}; +#endif // SYNC_QUEUE_H diff --git a/Plugin/threebuttonbasedlg.cpp b/Plugin/threebuttonbasedlg.cpp new file mode 100644 index 0000000000..c132bbcc2a --- /dev/null +++ b/Plugin/threebuttonbasedlg.cpp @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "threebuttonbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +ThreeButtonBaseDlg::ThreeButtonBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_bitmap = new wxStaticBitmap( m_mainPanel, wxID_ANY, wxBitmap( wxT("question_and_answer"), wxBITMAP_TYPE_RESOURCE ), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_bitmap, 0, wxALL, 5 ); + + m_message = new wxStaticText( m_mainPanel, wxID_ANY, wxT("Message"), wxDefaultPosition, wxDefaultSize, 0 ); + m_message->Wrap( -1 ); + bSizer2->Add( m_message, 1, wxALL|wxEXPAND, 5 ); + + m_mainPanel->SetSizer( bSizer2 ); + m_mainPanel->Layout(); + bSizer2->Fit( m_mainPanel ); + mainSizer->Add( m_mainPanel, 1, wxEXPAND | wxALL, 5 ); + + m_checkBoxRememberMyAnwer = new wxCheckBox( this, wxID_ANY, wxT("Remember my answer and dont ask me again"), wxDefaultPosition, wxDefaultSize, 0 ); + + mainSizer->Add( m_checkBoxRememberMyAnwer, 0, wxALL, 5 ); + + m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* buttonSizer; + buttonSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonYes = new wxButton( this, wxID_OK, wxT("&Yes"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonYes->SetDefault(); + buttonSizer->Add( m_buttonYes, 0, wxALL, 5 ); + + m_buttonNo = new wxButton( this, wxID_NO, wxT("&No"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonNo, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + mainSizer->Add( buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_buttonYes->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ThreeButtonBaseDlg::OnButtonYes ), NULL, this ); + m_buttonNo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ThreeButtonBaseDlg::OnButtonNo ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ThreeButtonBaseDlg::OnButtonCancel ), NULL, this ); +} diff --git a/Plugin/threebuttonbasedlg.h b/Plugin/threebuttonbasedlg.h new file mode 100644 index 0000000000..da3d73b14d --- /dev/null +++ b/Plugin/threebuttonbasedlg.h @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __threebuttonbasedlg__ +#define __threebuttonbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class ThreeButtonBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class ThreeButtonBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_mainPanel; + wxStaticBitmap* m_bitmap; + wxStaticText* m_message; + wxCheckBox* m_checkBoxRememberMyAnwer; + wxStaticLine* m_staticline; + wxButton* m_buttonYes; + wxButton* m_buttonNo; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnButtonYes( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonNo( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + ThreeButtonBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 399,147 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__threebuttonbasedlg__ diff --git a/Plugin/threebuttondlg.cpp b/Plugin/threebuttondlg.cpp new file mode 100644 index 0000000000..ba684bba22 --- /dev/null +++ b/Plugin/threebuttondlg.cpp @@ -0,0 +1,25 @@ +#include "threebuttondlg.h" + +ThreeButtonDlg::ThreeButtonDlg( wxWindow* parent, const wxString &msg, const wxString &caption ) +: ThreeButtonBaseDlg( parent ) +{ + m_message->SetLabel(msg); + SetLabel(caption); + GetSizer()->Fit(this); + GetSizer()->Layout(); +} + +void ThreeButtonDlg::OnButtonCancel(wxCommandEvent &e) +{ + EndModal(wxID_CANCEL); +} + +void ThreeButtonDlg::OnButtonYes(wxCommandEvent &e) +{ + EndModal(wxID_OK); +} + +void ThreeButtonDlg::OnButtonNo(wxCommandEvent &e) +{ + EndModal(wxID_NO); +} diff --git a/Plugin/threebuttondlg.h b/Plugin/threebuttondlg.h new file mode 100644 index 0000000000..1e4ffcb2b0 --- /dev/null +++ b/Plugin/threebuttondlg.h @@ -0,0 +1,26 @@ +#ifndef __threebuttondlg__ +#define __threebuttondlg__ + +/** +@file +Subclass of ThreeButtonBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "threebuttonbasedlg.h" + +/** Implementing ThreeButtonBaseDlg */ +class ThreeButtonDlg : public ThreeButtonBaseDlg +{ + +protected: + void OnButtonCancel(wxCommandEvent &e); + void OnButtonYes(wxCommandEvent &e); + void OnButtonNo(wxCommandEvent &e); + +public: + /** Constructor */ + ThreeButtonDlg( wxWindow* parent, const wxString &msg, const wxString &caption ); + bool GetDontAskMeAgain() const {return m_checkBoxRememberMyAnwer->GetValue();} +}; + +#endif // __threebuttondlg__ diff --git a/Plugin/variable.tab.c b/Plugin/variable.tab.c new file mode 100644 index 0000000000..22556b4cc8 --- /dev/null +++ b/Plugin/variable.tab.c @@ -0,0 +1,1779 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + WORD = 258, + ASSIGN = 259, + PRINT = 260 + }; +#endif +/* Tokens. */ +#define WORD 258 +#define ASSIGN 259 +#define PRINT 260 + + + + +/* Copy the first part of user declarations. */ +#line 1 "variable.y" + +/**** Includes and Defines *****************************/ +#include +#include +#include +#include + +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ +#define YYSTYPE wxString + + +typedef wxArrayString Strings; +typedef std::map tokens; +typedef tokens::iterator Itokens; + +extern Strings TheOutput; +extern Strings TheUnmatched; +extern Strings TheError; +extern tokens TheTokens; +extern int lineno; + +bool append = false; +int yylex(void); + +void Trim(YYSTYPE& line) +{ + line.Trim(true); + line.Trim(false); +} + +void yyerror(char* string) +{ +// printf("parser error: %s\n", string); +} + +/*************** Standard variable.y: continues here *********************/ + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 154 "variable.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 32 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 11 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 16 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 30 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 41 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 260 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 7, 2, 2, 2, + 8, 9, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 4, 7, 9, 13, 16, 19, 22, + 25, 28, 30, 32, 36, 38, 41, 42, 44, 45, + 47, 50, 54, 56, 58, 60, 64, 66, 68, 70, + 73 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 12, 0, -1, -1, 12, 13, -1, 6, -1, 19, + 21, 6, -1, 22, 6, -1, 24, 6, -1, 25, + 6, -1, 1, 6, -1, 7, 8, -1, 26, -1, + 9, -1, 14, 15, 16, -1, 3, -1, 18, 3, + -1, -1, 18, -1, -1, 26, -1, 17, 19, -1, + 21, 17, 19, -1, 18, -1, 4, -1, 10, -1, + 18, 23, 20, -1, 5, -1, 3, -1, 17, -1, + 26, 17, -1, 26, 3, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 46, 46, 47, 50, 51, 52, 53, 54, 55, + 63, 65, 67, 69, 82, 83, 86, 87, 90, 91, + 95, 96, 99, 101, 102, 105, 120, 130, 131, 132, + 133 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "WORD", "ASSIGN", "PRINT", "'\\n'", + "'$'", "'('", "')'", "'='", "$accept", "input", "line", "open", "name", + "close", "variable", "words", "optwords", "optvars", "vars_line", + "wordsline", "assignm", "assgnline", "printline", "wordvars", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 10, 36, 40, 41, + 61 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 11, 12, 12, 13, 13, 13, 13, 13, 13, + 14, 15, 16, 17, 18, 18, 19, 19, 20, 20, + 21, 21, 22, 23, 23, 24, 25, 26, 26, 26, + 26 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 3, 2, 2, 2, 2, + 2, 1, 1, 3, 1, 2, 0, 1, 0, 1, + 2, 3, 1, 1, 1, 3, 1, 1, 1, 2, + 2 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 0, 14, 26, 4, 3, 17, 0, + 0, 0, 0, 9, 15, 23, 24, 18, 0, 0, + 16, 0, 6, 7, 8, 27, 28, 25, 19, 10, + 0, 11, 17, 20, 5, 16, 30, 29, 12, 13, + 21 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1, 7, 19, 30, 39, 26, 32, 9, 27, + 21, 10, 17, 11, 12, 28 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -20 +static const yytype_int8 yypact[] = +{ + -20, 2, -20, -2, -20, -20, -20, -20, 7, -1, + 9, 15, 21, -20, -20, -20, -20, 11, 20, 11, + 26, 19, -20, -20, -20, -20, -20, -20, 17, -20, + 14, 17, 27, -20, -20, 26, -20, -20, -20, -20, + -20 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -20, -20, -20, -20, -20, -20, -9, 30, -19, -20, + -20, -20, -20, -20, -20, 13 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -23 +static const yytype_int8 yytable[] = +{ + 20, 33, 2, 3, 13, 4, 18, 5, 6, -16, + 14, 15, 35, -22, 25, 22, 40, 16, 18, 37, + 36, 23, 37, 38, 18, 34, 18, 24, 29, 4, + 14, 8, 31 +}; + +static const yytype_uint8 yycheck[] = +{ + 9, 20, 0, 1, 6, 3, 7, 5, 6, 7, + 3, 4, 21, 6, 3, 6, 35, 10, 7, 28, + 3, 6, 31, 9, 7, 6, 7, 6, 8, 3, + 3, 1, 19 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 12, 0, 1, 3, 5, 6, 13, 18, 19, + 22, 24, 25, 6, 3, 4, 10, 23, 7, 14, + 17, 21, 6, 6, 6, 3, 17, 20, 26, 8, + 15, 26, 18, 19, 6, 17, 3, 17, 9, 16, + 19 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: +#line 47 "variable.y" + { /* Do Nothing */ ;} + break; + + case 4: +#line 50 "variable.y" + { /* Do Nothing */ ;} + break; + + case 5: +#line 51 "variable.y" + { TheOutput.push_back((yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])); ;} + break; + + case 6: +#line 52 "variable.y" + { TheOutput.push_back((yyvsp[(1) - (2)])); ;} + break; + + case 7: +#line 53 "variable.y" + { /* Do Nothing */ ;} + break; + + case 8: +#line 54 "variable.y" + { /* Do Nothing */ ;} + break; + + case 9: +#line 55 "variable.y" + { + YYSTYPE msg; + msg << wxT("Line ") << lineno << wxT(": Unexpected token '") << yylval << wxT("'."); + TheError.push_back(msg); + yyerrok; + ;} + break; + + case 10: +#line 63 "variable.y" + { /* do nothing */ ;} + break; + + case 11: +#line 65 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 12: +#line 67 "variable.y" + { /* do nothing */ ;} + break; + + case 13: +#line 69 "variable.y" + { + Trim((yyvsp[(2) - (3)])); + if(TheTokens[(yyvsp[(2) - (3)])].size() > 0) + { + (yyval) = TheTokens[(yyvsp[(2) - (3)])]; + } + else + { + TheUnmatched.push_back((yyvsp[(2) - (3)])); + (yyval) = wxEmptyString; + } + ;} + break; + + case 14: +#line 82 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 15: +#line 83 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 16: +#line 86 "variable.y" + { (yyval) = wxEmptyString; ;} + break; + + case 17: +#line 87 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 18: +#line 90 "variable.y" + { (yyval) = wxEmptyString; ;} + break; + + case 19: +#line 91 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 20: +#line 95 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 21: +#line 96 "variable.y" + { (yyval) = (yyvsp[(1) - (3)]) + (yyvsp[(2) - (3)]) + (yyvsp[(3) - (3)]); ;} + break; + + case 22: +#line 99 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 23: +#line 101 "variable.y" + { append = true; ;} + break; + + case 24: +#line 102 "variable.y" + { append = false; ;} + break; + + case 25: +#line 105 "variable.y" + { + Trim((yyvsp[(1) - (3)])); + Trim((yyvsp[(3) - (3)])); + + if(append) + { + TheTokens[(yyvsp[(1) - (3)])] += (yyvsp[(3) - (3)]); + } + else + { + TheTokens[(yyvsp[(1) - (3)])] = (yyvsp[(3) - (3)]); + } + (yyval) = (yyvsp[(1) - (3)]) + wxT("=") + (yyvsp[(3) - (3)]); + ;} + break; + + case 26: +#line 120 "variable.y" + { + YYSTYPE result = wxT("Tokens: \n"); + for(Itokens it = TheTokens.begin(); it != TheTokens.end(); it++) + { + result += wxT("'") + it->first + wxT("'='") + it->second + wxT("'\n"); + } + result += wxT("Done."); + (yyval) = result; + ;} + break; + + case 27: +#line 130 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 28: +#line 131 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 29: +#line 132 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 30: +#line 133 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + +/* Line 1267 of yacc.c. */ +#line 1553 "variable.tab.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 135 "variable.y" + +/* End of grammar */ + + + + + + + + + + + diff --git a/Plugin/variable.tab.cpp b/Plugin/variable.tab.cpp new file mode 100644 index 0000000000..5184a997f4 --- /dev/null +++ b/Plugin/variable.tab.cpp @@ -0,0 +1,1786 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + WORD = 258, + ASSIGN = 259, + PRINT = 260 + }; +#endif +/* Tokens. */ +#define WORD 258 +#define ASSIGN 259 +#define PRINT 260 + + + + +/* Copy the first part of user declarations. */ +#line 1 "variable.y" + +/**** Includes and Defines *****************************/ +#include +#include +#include +#include +#include +#include +#include + +#define YYDEBUG 0 /* get the pretty debugging code to compile*/ +#define YYSTYPE wxString + + +typedef wxArrayString Strings; +typedef std::map tokens; +typedef tokens::iterator Itokens; + +extern Strings TheOutput; +extern Strings TheUnmatched; +extern Strings TheError; +extern tokens TheTokens; +extern int lineno; + +bool append = false; +int yylex(void); +void TrimString(wxString &string) +{ + wxFFileOutputStream output( stderr ); + wxTextOutputStream cout( output ); + + cout << wxT("Before: ") << string; + string = string.Trim(true); + string = string.Trim(false); + cout << wxT("After: ") << string; +} + +void yyerror(char* string) +{ +// printf("parser error: %s\n", string); +} + +/*************** Standard variable.y: continues here *********************/ + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 161 "variable.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 32 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 11 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 16 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 30 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 41 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 260 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 7, 2, 2, 2, + 8, 9, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 10, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 4, 7, 9, 13, 16, 19, 22, + 25, 28, 30, 32, 36, 38, 41, 42, 44, 45, + 47, 50, 54, 56, 58, 60, 64, 66, 68, 70, + 73 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 12, 0, -1, -1, 12, 13, -1, 6, -1, 19, + 21, 6, -1, 22, 6, -1, 24, 6, -1, 25, + 6, -1, 1, 6, -1, 7, 8, -1, 26, -1, + 9, -1, 14, 15, 16, -1, 3, -1, 18, 3, + -1, -1, 18, -1, -1, 26, -1, 17, 19, -1, + 21, 17, 19, -1, 18, -1, 4, -1, 10, -1, + 18, 23, 20, -1, 5, -1, 3, -1, 17, -1, + 26, 17, -1, 26, 3, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 53, 53, 54, 57, 58, 59, 60, 61, 62, + 70, 72, 74, 76, 89, 90, 93, 94, 97, 98, + 102, 103, 106, 108, 109, 112, 127, 137, 138, 139, + 140 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "WORD", "ASSIGN", "PRINT", "'\\n'", + "'$'", "'('", "')'", "'='", "$accept", "input", "line", "open", "name", + "close", "variable", "words", "optwords", "optvars", "vars_line", + "wordsline", "assignm", "assgnline", "printline", "wordvars", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 10, 36, 40, 41, + 61 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 11, 12, 12, 13, 13, 13, 13, 13, 13, + 14, 15, 16, 17, 18, 18, 19, 19, 20, 20, + 21, 21, 22, 23, 23, 24, 25, 26, 26, 26, + 26 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 3, 2, 2, 2, 2, + 2, 1, 1, 3, 1, 2, 0, 1, 0, 1, + 2, 3, 1, 1, 1, 3, 1, 1, 1, 2, + 2 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 0, 14, 26, 4, 3, 17, 0, + 0, 0, 0, 9, 15, 23, 24, 18, 0, 0, + 16, 0, 6, 7, 8, 27, 28, 25, 19, 10, + 0, 11, 17, 20, 5, 16, 30, 29, 12, 13, + 21 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1, 7, 19, 30, 39, 26, 32, 9, 27, + 21, 10, 17, 11, 12, 28 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -20 +static const yytype_int8 yypact[] = +{ + -20, 2, -20, -2, -20, -20, -20, -20, 7, -1, + 9, 15, 21, -20, -20, -20, -20, 11, 20, 11, + 26, 19, -20, -20, -20, -20, -20, -20, 17, -20, + 14, 17, 27, -20, -20, 26, -20, -20, -20, -20, + -20 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -20, -20, -20, -20, -20, -20, -9, 30, -19, -20, + -20, -20, -20, -20, -20, 13 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -23 +static const yytype_int8 yytable[] = +{ + 20, 33, 2, 3, 13, 4, 18, 5, 6, -16, + 14, 15, 35, -22, 25, 22, 40, 16, 18, 37, + 36, 23, 37, 38, 18, 34, 18, 24, 29, 4, + 14, 8, 31 +}; + +static const yytype_uint8 yycheck[] = +{ + 9, 20, 0, 1, 6, 3, 7, 5, 6, 7, + 3, 4, 21, 6, 3, 6, 35, 10, 7, 28, + 3, 6, 31, 9, 7, 6, 7, 6, 8, 3, + 3, 1, 19 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 12, 0, 1, 3, 5, 6, 13, 18, 19, + 22, 24, 25, 6, 3, 4, 10, 23, 7, 14, + 17, 21, 6, 6, 6, 3, 17, 20, 26, 8, + 15, 26, 18, 19, 6, 17, 3, 17, 9, 16, + 19 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 3: +#line 54 "variable.y" + { /* Do Nothing */ ;} + break; + + case 4: +#line 57 "variable.y" + { /* Do Nothing */ ;} + break; + + case 5: +#line 58 "variable.y" + { TheOutput.push_back((yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])); ;} + break; + + case 6: +#line 59 "variable.y" + { TheOutput.push_back((yyvsp[(1) - (2)])); ;} + break; + + case 7: +#line 60 "variable.y" + { /* Do Nothing */ ;} + break; + + case 8: +#line 61 "variable.y" + { /* Do Nothing */ ;} + break; + + case 9: +#line 62 "variable.y" + { + YYSTYPE msg; + msg << wxT("Line ") << lineno << wxT(": Unexpected token '") << yylval << wxT("'."); + TheError.push_back(msg); + yyerrok; + ;} + break; + + case 10: +#line 70 "variable.y" + { /* do nothing */ ;} + break; + + case 11: +#line 72 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 12: +#line 74 "variable.y" + { /* do nothing */ ;} + break; + + case 13: +#line 76 "variable.y" + { + TrimString((yyvsp[(2) - (3)])); + if(TheTokens[(yyvsp[(2) - (3)])].size() > 0) + { + (yyval) = TheTokens[(yyvsp[(2) - (3)])]; + } + else + { + TheUnmatched.push_back((yyvsp[(2) - (3)])); + (yyval) = wxEmptyString; + } + ;} + break; + + case 14: +#line 89 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 15: +#line 90 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 16: +#line 93 "variable.y" + { (yyval) = wxEmptyString; ;} + break; + + case 17: +#line 94 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 18: +#line 97 "variable.y" + { (yyval) = wxEmptyString; ;} + break; + + case 19: +#line 98 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 20: +#line 102 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 21: +#line 103 "variable.y" + { (yyval) = (yyvsp[(1) - (3)]) + (yyvsp[(2) - (3)]) + (yyvsp[(3) - (3)]); ;} + break; + + case 22: +#line 106 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 23: +#line 108 "variable.y" + { append = true; ;} + break; + + case 24: +#line 109 "variable.y" + { append = false; ;} + break; + + case 25: +#line 112 "variable.y" + { + TrimString((yyvsp[(1) - (3)])); + TrimString((yyvsp[(3) - (3)])); + + if(append) + { + TheTokens[(yyvsp[(1) - (3)])] += (yyvsp[(3) - (3)]); + } + else + { + TheTokens[(yyvsp[(1) - (3)])] = (yyvsp[(3) - (3)]); + } + (yyval) = (yyvsp[(1) - (3)]) + wxT("=") + (yyvsp[(3) - (3)]); + ;} + break; + + case 26: +#line 127 "variable.y" + { + YYSTYPE result = wxT("Tokens: \n"); + for(Itokens it = TheTokens.begin(); it != TheTokens.end(); it++) + { + result += wxT("'") + it->first + wxT("'='") + it->second + wxT("'\n"); + } + result += wxT("Done."); + (yyval) = result; + ;} + break; + + case 27: +#line 137 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 28: +#line 138 "variable.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 29: +#line 139 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + case 30: +#line 140 "variable.y" + { (yyval) = (yyvsp[(1) - (2)]) + (yyvsp[(2) - (2)]); ;} + break; + + +/* Line 1267 of yacc.c. */ +#line 1560 "variable.tab.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 142 "variable.y" + +/* End of grammar */ + + + + + + + + + + + diff --git a/Plugin/variable.tab.h b/Plugin/variable.tab.h new file mode 100644 index 0000000000..b68bf710bc --- /dev/null +++ b/Plugin/variable.tab.h @@ -0,0 +1,63 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + WORD = 258, + ASSIGN = 259, + PRINT = 260 + }; +#endif +/* Tokens. */ +#define WORD 258 +#define ASSIGN 259 +#define PRINT 260 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + diff --git a/Plugin/variable.yy.c b/Plugin/variable.yy.c new file mode 100644 index 0000000000..9648e081df --- /dev/null +++ b/Plugin/variable.yy.c @@ -0,0 +1,1798 @@ +#line 2 "variable.yy.c" + +#line 4 "variable.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +typedef unsigned char YY_CHAR; + +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 11 +#define YY_END_OF_BUFFER 12 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[21] = + { 0, + 0, 0, 12, 10, 9, 8, 1, 4, 5, 6, + 9, 3, 9, 9, 2, 9, 9, 9, 7, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 4, 5, 2, 2, 2, 6, + 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 8, 1, 2, + 9, 2, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 10, 2, 2, 2, 2, 11, 2, 12, + 2, 13, 2, 14, 2, 2, 2, 2, 2, 2, + 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[15] = + { 0, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, + 2, 2, 2, 2 + } ; + +static yyconst flex_int16_t yy_base[22] = + { 0, + 0, 0, 21, 22, 0, 22, 22, 22, 22, 22, + 11, 22, 6, 0, 22, 8, 6, 2, 0, 22, + 13 + } ; + +static yyconst flex_int16_t yy_def[22] = + { 0, + 20, 1, 20, 20, 21, 20, 20, 20, 20, 20, + 21, 20, 21, 21, 20, 21, 21, 21, 21, 0, + 20 + } ; + +static yyconst flex_int16_t yy_nxt[37] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 5, + 5, 13, 5, 5, 14, 19, 18, 17, 16, 15, + 20, 3, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20 + } ; + +static yyconst flex_int16_t yy_chk[37] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 21, 18, 17, 16, 13, 11, + 3, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "variable.l" +#line 2 "variable.l" +#include + +#define YYSTYPE wxString +extern wxString yylval; + +#include "variable.tab.h" +#define YY_NO_UNISTD_H 1 +#undef YY_NO_INPUT +int lineno = 0; +#line 476 "variable.yy.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 15 "variable.l" + + +#line 632 "variable.yy.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 22 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 17 "variable.l" +{ + register int c; + #ifdef __cplusplus + while((c = yyinput()) != '\n' && c != EOF){ + ; + } + #else + while((c = input()) != '\n' && c != EOF){ + ; + } + #endif + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 30 "variable.l" +{return ASSIGN; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 31 "variable.l" +{return '='; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 32 "variable.l" +{return '$'; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 33 "variable.l" +{return '('; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 34 "variable.l" +{return ')'; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 35 "variable.l" +{return PRINT; } + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 36 "variable.l" +{ + lineno++; + return '\n'; + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 40 "variable.l" +{ + yylval.Printf(wxT("%s"),yytext); + return WORD; + } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 44 "variable.l" +{ + //printf("?> '%s'\n", yytext); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 48 "variable.l" +ECHO; + YY_BREAK +#line 790 "variable.yy.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 20); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 48 "variable.l" + + + + +void initLexer(const char *fileName) +{ + FILE *file = fopen(fileName, "r"); + if(!file) + { + printf("failed loading file 'test.h'\n"); + exit(-1); + } + + //set the file to be our buffer + YY_BUFFER_STATE buffState = yy_create_buffer(file,YY_BUF_SIZE); + yy_switch_to_buffer(buffState); +} + +int yywrap() +{ + return 1; +} + diff --git a/Plugin/variable.yy.cpp b/Plugin/variable.yy.cpp new file mode 100644 index 0000000000..74b9ee9961 --- /dev/null +++ b/Plugin/variable.yy.cpp @@ -0,0 +1,1798 @@ +#line 2 "variable.yy.c" +#include "unistd.h" +#line 4 "variable.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int yyleng; + +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +typedef unsigned char YY_CHAR; + +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 11 +#define YY_END_OF_BUFFER 12 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[21] = + { 0, + 0, 0, 12, 10, 9, 8, 1, 4, 5, 6, + 9, 3, 9, 9, 2, 9, 9, 9, 7, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 4, 5, 2, 2, 2, 6, + 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 8, 1, 2, + 9, 2, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 10, 2, 2, 2, 2, 11, 2, 12, + 2, 13, 2, 14, 2, 2, 2, 2, 2, 2, + 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[15] = + { 0, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, + 2, 2, 2, 2 + } ; + +static yyconst flex_int16_t yy_base[22] = + { 0, + 0, 0, 21, 22, 0, 22, 22, 22, 22, 22, + 11, 22, 6, 0, 22, 8, 6, 2, 0, 22, + 13 + } ; + +static yyconst flex_int16_t yy_def[22] = + { 0, + 20, 1, 20, 20, 21, 20, 20, 20, 20, 20, + 21, 20, 21, 21, 20, 21, 21, 21, 21, 0, + 20 + } ; + +static yyconst flex_int16_t yy_nxt[37] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 5, + 5, 13, 5, 5, 14, 19, 18, 17, 16, 15, + 20, 3, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20 + } ; + +static yyconst flex_int16_t yy_chk[37] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 21, 18, 17, 16, 13, 11, + 3, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int yy_flex_debug; +int yy_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "variable.l" +#line 2 "variable.l" +#include + +#define YYSTYPE wxString +extern wxString yylval; + +#include "variable.tab.h" +#define YY_NO_UNISTD_H 1 +#undef YY_NO_INPUT +int lineno = 0; +#line 476 "variable.yy.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 15 "variable.l" + + +#line 632 "variable.yy.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 22 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 17 "variable.l" +{ + register int c; + #ifdef __cplusplus + while((c = yyinput()) != '\n' && c != EOF){ + ; + } + #else + while((c = input()) != '\n' && c != EOF){ + ; + } + #endif + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 30 "variable.l" +{return ASSIGN; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 31 "variable.l" +{return '='; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 32 "variable.l" +{return '$'; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 33 "variable.l" +{return '('; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 34 "variable.l" +{return ')'; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 35 "variable.l" +{return PRINT; } + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 36 "variable.l" +{ + lineno++; + return '\n'; + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 40 "variable.l" +{ + yylval.Printf(wxT("%s"),yytext); + return WORD; + } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 44 "variable.l" +{ + //printf("?> '%s'\n", yytext); + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 48 "variable.l" +ECHO; + YY_BREAK +#line 790 "variable.yy.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 21 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 20); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } + + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree((void *) b->yy_ch_buf ); + + yyfree((void *) b ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + yy_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) yyalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 48 "variable.l" + + + + +void initLexer(const char *fileName) +{ + FILE *file = fopen(fileName, "r"); + if(!file) + { + printf("failed loading file 'test.h'\n"); + exit(-1); + } + + //set the file to be our buffer + YY_BUFFER_STATE buffState = yy_create_buffer(file,YY_BUF_SIZE); + yy_switch_to_buffer(buffState); +} + +int yywrap() +{ + return 1; +} + diff --git a/Plugin/vcimporter.cpp b/Plugin/vcimporter.cpp new file mode 100644 index 0000000000..40e0350936 --- /dev/null +++ b/Plugin/vcimporter.cpp @@ -0,0 +1,297 @@ +#include "vcimporter.h" +#include "wx/filename.h" +#include "macros.h" +#include "wx/tokenzr.h" +#include "workspace.h" +#include "xmlutils.h" + +#define NEXT_LINE(line)\ + line.Empty();\ + if(!ReadLine(line)){\ + return false;\ + } + +VcImporter::VcImporter(const wxString &fileName) +: m_fileName(fileName) +, m_is(NULL) +, m_tis(NULL) +{ + wxFileName fn(m_fileName); + m_isOk = fn.FileExists(); + if(m_isOk){ + m_is = new wxFileInputStream(fn.GetFullPath()); + m_tis = new wxTextInputStream(*m_is); + } +} + +VcImporter::~VcImporter() +{ + if(m_is){ + delete m_is; + } + if(m_tis){ + delete m_tis; + } +} + +bool VcImporter::ReadLine(wxString &line) +{ + line = wxEmptyString; + if(m_isOk){ + while(!m_is->Eof()){ + line = m_tis->ReadLine(); + TrimString(line); + if(line.Length() == 1 || line.Length() == 2 || line.IsEmpty() || line.StartsWith(wxT("#"))){ + //get next line + continue; + }else{ + return true; + } + } + } + return false; +} + +bool VcImporter::Import(wxString &errMsg) +{ + wxString line; + while(true){ + if(!ReadLine(line)) + break; + if(line.StartsWith(wxT("Project"))){ + if(!OnProject(line, errMsg)){ + return false; + } + } + } + + //create LE files + CreateWorkspace(); + CreateProjects(); + return true; +} + +bool VcImporter::OnProject(const wxString &firstLine, wxString &errMsg) +{ + //first line contains the project name, project file path, and project id + wxStringTokenizer tkz(firstLine, wxT("=")); + if(tkz.CountTokens() != 2){ + errMsg = wxT("Invalid 'Project' section found. expected = "); + return false; + } + + tkz.NextToken(); + wxString token = tkz.NextToken(); + TrimString(token); + wxStringTokenizer tk2(token, wxT(",")); + if(tk2.CountTokens() != 3){ + errMsg = wxT("Invalid 'Project' section found. expected , , "); + return false; + } + + VcProjectData pd; + + pd.name = tk2.NextToken(); + RemoveGershaim(pd.name); + + pd.filepath = tk2.NextToken(); + RemoveGershaim(pd.filepath); + + pd.id = tk2.NextToken(); + RemoveGershaim(pd.id); + + m_projects.insert(std::make_pair(pd.id, pd)); + //Skip all lines until EndProject section is found + wxString line; + while(true){ + NEXT_LINE(line); + if(line == wxT("EndProject")){ + return true; + } + } + return false; +} + +void VcImporter::RemoveGershaim(wxString &str) +{ + TrimString(str); + str = str.AfterFirst(wxT('"')); + str = str.BeforeLast(wxT('"')); +} + +void VcImporter::CreateWorkspace() +{ + //create a workspace file from the data we collected + wxFileName fn(m_fileName); + wxString errMsg; + WorkspaceST::Get()->CreateWorkspace(fn.GetName(), fn.GetPath(), errMsg); +} + +// +//ConfigurationType = 1 // exe +//ConfigurationType = 2 // dll +//ConfigurationType = 4 // static lib +// +void VcImporter::CreateProjects() +{ + std::map::iterator iter = m_projects.begin(); + for(; iter != m_projects.end(); iter++){ + //load xml file + VcProjectData pd = iter->second; + ConvertProject(pd); + } +} + +bool VcImporter::ConvertProject(VcProjectData &data) +{ + wxXmlDocument doc(data.filepath); + if(!doc.IsOk()){ + return false; + } + + //to create a project skeleton, we need the project type + //since VS allows each configuration to be of different + //type, while LE allows single type for all configurations + //we use the first configuration type that we find + wxXmlNode *configs = XmlUtils::FindFirstByTagName(doc.GetRoot(), wxT("Configurations")); + if(!configs){ + return false; + } + + //find the first configuration node + wxXmlNode * config = XmlUtils::FindFirstByTagName(configs, wxT("Configuration")); + if(!config) return false; + //read the configuration type, default is set to Executeable + long type = XmlUtils::ReadLong(config, wxT("ConfigurationType"), 1); + wxString projectType; + wxString errMsg; + switch(type){ + case 2: //dll + projectType = Project::DYNAMIC_LIBRARY; + break; + case 4: //static library + projectType = Project::STATIC_LIBRARY; + break; + case 1: //exe + default: + projectType = Project::EXECUTABLE; + break; + } + //now we can create the project + wxFileName fn(data.filepath); + fn.MakeAbsolute(); + if(!WorkspaceST::Get()->CreateProject(data.name, fn.GetPath(), projectType, errMsg)){ + return false; + } + + //get the new project instance + ProjectPtr proj = WorkspaceST::Get()->FindProjectByName(data.name, errMsg); + ProjectSettingsPtr le_settings(new ProjectSettings(NULL)); + //remove the default 'Debug' configuration + le_settings->RemoveConfiguration(wxT("Debug")); + le_settings->SetProjectType(projectType); + + while(config){ + if(config->GetName() == wxT("Configuration")){ + AddConfiguration(le_settings, config); + } + config = config->GetNext(); + } + proj->SetSettings(le_settings); + //add all virtual folders + wxXmlNode *files = XmlUtils::FindFirstByTagName(doc.GetRoot(), wxT("Files")); + if(files){ + proj->BeginTranscation(); + CreateFiles(files, wxEmptyString, proj); + proj->CommitTranscation(); + } + return true; +} + +void VcImporter::AddConfiguration(ProjectSettingsPtr settings, wxXmlNode *config) +{ + //configuration name + wxString name = XmlUtils::ReadString(config, wxT("Name")); + name = name.BeforeFirst(wxT('|')); + name.Replace(wxT(" "), wxT("_")); + + BuildConfigPtr le_conf(new BuildConfig(NULL)); + le_conf->SetName(name); + le_conf->SetIntermediateDirectory(XmlUtils::ReadString(config, wxT("IntermediateDirectory"))); + //get the compiler settings + wxXmlNode *cmpNode = XmlUtils::FindNodeByName(config, wxT("Tool"), wxT("VCCLCompilerTool")); + //get the include directories + le_conf->SetIncludePath(SplitString(XmlUtils::ReadString(cmpNode, wxT("AdditionalIncludeDirectories")))); + le_conf->SetPreprocessor(XmlUtils::ReadString(cmpNode, wxT("PreprocessorDefinitions"))); + + //if project type is DLL or Executable, copy linker settings as well + if( settings->GetProjectType() == Project::EXECUTABLE || settings->GetProjectType() == Project::DYNAMIC_LIBRARY){ + wxXmlNode *linkNode = XmlUtils::FindNodeByName(config, wxT("Tool"), wxT("VCLinkerTool")); + if(linkNode){ + le_conf->SetOutputFileName(XmlUtils::ReadString(linkNode, wxT("OutputFile"))); + //read in the additional libraries & libpath + wxString libs = XmlUtils::ReadString(linkNode, wxT("AdditionalDependencies")); + //libs is a space delimited string + wxStringTokenizer tk(libs, wxT(" ")); + libs.Empty(); + while(tk.HasMoreTokens()){ + libs << tk.NextToken() << wxT(";"); + } + le_conf->SetLibraries(libs); + le_conf->SetLibPath(XmlUtils::ReadString(linkNode, wxT("AdditionalLibraryDirectories"))); + } + }else{ + // static library + wxXmlNode *libNode = XmlUtils::FindNodeByName(config, wxT("Tool"), wxT("VCLibrarianTool")); + if(libNode){ + le_conf->SetOutputFileName(XmlUtils::ReadString(libNode, wxT("OutputFile"))); + } + } + + //add the configuration + settings->SetBuildConfiguration(le_conf); +} + +void VcImporter::CreateFiles(wxXmlNode *parent, wxString vdPath, ProjectPtr proj) +{ + if( !parent ){ + return; + } + + wxXmlNode *child = parent->GetChildren(); + while (child) { + if(child->GetName() == wxT("Filter")){ + // add new virtual directory + wxString name = XmlUtils::ReadString(child, wxT("Name")); + wxString tmpPath = vdPath; + if(tmpPath.IsEmpty() == false){ + tmpPath << wxT(":"); + } + tmpPath << name; + proj->CreateVirtualDir(tmpPath); + CreateFiles(child, tmpPath, proj); + + } else if(child->GetName() == wxT("File")){ + //found a file + wxString fileName = XmlUtils::ReadString(child, wxT("RelativePath")); + wxString path = vdPath; + if(path.IsEmpty()){ + path = wxT("Source Files"); + } + proj->AddFile(fileName, path); + } + child = child->GetNext(); + } +} + +wxArrayString VcImporter::SplitString(const wxString &s) +{ + wxArrayString arr; + wxString s1(s); + s1.Replace(wxT(","), wxT(";")); + wxStringTokenizer tk1(s1, wxT(";")); + while(tk1.HasMoreTokens()){ + arr.Add(tk1.NextToken()); + } + return arr; +} diff --git a/Plugin/vcimporter.h b/Plugin/vcimporter.h new file mode 100644 index 0000000000..657d9fca12 --- /dev/null +++ b/Plugin/vcimporter.h @@ -0,0 +1,45 @@ +#ifndef VCIMPORTER_H +#define VCIMPORTER_H + +#include "wx/string.h" +#include +#include +#include "map" +#include "project_settings.h" +#include "project.h" + +struct VcProjectData +{ + wxString name; + wxString id; + wxString filepath; + wxArrayString deps; +}; + +class VcImporter { + wxString m_fileName; + bool m_isOk; + wxFileInputStream *m_is; + wxTextInputStream *m_tis; + std::map m_projects; + +public: + VcImporter(const wxString &fileName); + virtual ~VcImporter(); + bool Import(wxString &errMsg); + +private: + //read line, skip empty lines + bool ReadLine(wxString &line); + bool OnProject(const wxString &firstLine, wxString &errMsg); + void RemoveGershaim(wxString &str); + void CreateWorkspace(); + void CreateProjects(); + bool ConvertProject(VcProjectData &data); + void AddConfiguration(ProjectSettingsPtr settings, wxXmlNode *config); + void CreateFiles(wxXmlNode *parent, wxString vdPath, ProjectPtr proj); + wxArrayString SplitString(const wxString &s); +}; + +#endif //VCIMPORTER_H + diff --git a/Plugin/virtualdirtreectrl.cpp b/Plugin/virtualdirtreectrl.cpp new file mode 100644 index 0000000000..67fc24f79d --- /dev/null +++ b/Plugin/virtualdirtreectrl.cpp @@ -0,0 +1,704 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wxVirtualDirTreeCtrl.cpp +// Author: XX +// Created: Saturday, March 27, 2004 14:15:56 +// Copyright: XX +///////////////////////////////////////////////////////////////////////////// + +//#ifdef __GNUG__ +// #pragma implementation "wxVirtualDirTreeCtrl.cpp" +//#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/wx.h" +#include +#include +#include "virtualdirtreectrl.h" +#include "wx/xrc/xmlres.h" +#include "globals.h" +#include "plugin.h" + +// WDR: class implementations + +//---------------------------------------------------------------------------- +// wxVirtualDirTreeCtrl +//---------------------------------------------------------------------------- + +// WDR: event table for wxVirtualDirTreeCtrl + +const wxEventType wxVDTC_ROOT_CHANGED = wxNewId(); + +BEGIN_EVENT_TABLE(wxVirtualDirTreeCtrl, wxTreeCtrl) + EVT_TREE_ITEM_EXPANDING(wxID_ANY, wxVirtualDirTreeCtrl::OnExpanding) +END_EVENT_TABLE() + +wxVirtualDirTreeCtrl::wxVirtualDirTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) + : wxTreeCtrl(parent, id, pos, size, style, validator, name) + , _flags(wxVDTC_DEFAULT) +{ + // create an icon list for the tree ctrl + _iconList = new wxImageList(16,16); + + // reset to default extension list + ResetExtensions(); +} + +wxVirtualDirTreeCtrl::~wxVirtualDirTreeCtrl() +{ + // first delete all VdtcTreeItemBase items (client data) + DeleteAllItems(); +#ifdef __WXMSW__ + _cache.clear(); +#endif + // delete the icons + delete _iconList; +} + +bool wxVirtualDirTreeCtrl::SetRootPath(const wxString &root, bool notify, int flags) +{ + bool value; + wxBusyInfo *bsy = 0; + wxLogNull log; + + // set flags to adopt new behaviour + _flags = flags; + + // delete all items plus root first + DeleteAllItems(); +#ifdef __WXMSW__ + _cache.clear(); +#endif + VdtcTreeItemBase *start = 0; + + // now call for icons management, the virtual + // handler so the derived class can assign icons + + if(_iconList->GetImageCount() == 0){ + OnAssignIcons(*_iconList); + SetImageList(_iconList); + } + + value = ::wxDirExists(root); + if(value) + { + // call virtual handler to notify the derived class + OnSetRootPath(root); + + // create a root item + start = OnCreateTreeItem(VDTC_TI_ROOT, root); + if(start) + { + wxFileName path; + path.AssignDir(root); + + // call the add callback and find out if this root + // may be added (later on) + + if(OnAddRoot(*start, path)) + { + // add this item to the tree, with info of the developer + wxTreeItemId id = AddRoot(start->GetCaption(), start->GetIconId(), start->GetSelectedIconId(), start); + + // show a busy dialog + if(_flags & (wxVDTC_RELOAD_ALL | wxVDTC_SHOW_BUSYDLG)) + bsy = new wxBusyInfo(wxT("Please wait, scanning directory..."), 0); + + // scan directory, either the smart way or not at all + ScanFromDir(start, path, (wxVDTC_RELOAD_ALL & _flags ? -1 : VDTC_MIN_SCANDEPTH)); + + // expand root when allowed + if(!(_flags & wxVDTC_NO_EXPAND)) + Expand(id); + } + else + delete start; // sorry not succeeded + } + } + + // delete busy info if present + if(bsy) + delete bsy; + + if(notify){ + wxCommandEvent e(wxVDTC_ROOT_CHANGED, GetId()); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); + } + + return value; +} + +int wxVirtualDirTreeCtrl::ScanFromDir(VdtcTreeItemBase *item, const wxFileName &path, int level, bool reload) +{ + int value = 0; + wxCHECK(item, -1); + wxCHECK(item->IsDir() || item->IsRoot(), -1); + + wxLogNull log; + + // when we can still scan, do so + if(level == -1 || level > 0) + { + // TODO: Maybe when a reload is issued, delete all items that are no longer present + // in the tree (on disk) and check if all new items are present, else add them + if(reload){ + DeleteChildren(item->GetId()); + } + + // if no items, then go iterate and get everything in this branch + if(GetChildrenCount(item->GetId()) == 0) + { + VdtcTreeItemBaseArray addedItems; + + // now call handler, if allowed, scan this dir + if(OnDirectoryScanBegin(path)) + { + // get directories + GetDirectories(item, addedItems, path); + + // get files + if(!(_flags & wxVDTC_NO_FILES)) + GetFiles(item, addedItems, path); + + // call handler that can do a last thing + // before sort and anything else + OnDirectoryScanEnd(addedItems, path); + + // sort items + if(addedItems.GetCount() > 0 && (_flags & wxVDTC_NO_SORT) == 0) + SortItems(addedItems, 0, (int)addedItems.GetCount()-1); + + AddItemsToTreeCtrl(item, addedItems); + + // call handler to tell that the items are on the tree ctrl + OnAddedItems(item); + } + } + + value = (int)GetChildrenCount(item->GetId()); + + // go through all children of this node, pick out all + // the dir classes, and descend as long as the level allows it + // NOTE: Don't use the addedItems array, because some new can + // be added or some can be deleted. + + wxTreeItemIdValue cookie = 0; + VdtcTreeItemBase *b; + + wxTreeItemId child = GetFirstChild(item->GetId(), cookie); + while(child.IsOk()) + { + b = (VdtcTreeItemBase *)GetItemData(child); + if(b && b->IsDir()) + { + wxFileName tp = path; + tp.AppendDir(b->GetName()); + value += ScanFromDir(b, tp, (level == -1 ? -1 : level-1), reload); + } + + child = GetNextChild(item->GetId(), cookie); + } + } + + return value; +} + +void wxVirtualDirTreeCtrl::GetFiles(VdtcTreeItemBase *parent, VdtcTreeItemBaseArray &items, const wxFileName &path) +{ + wxUnusedVar(parent); + wxFileName fpath; + wxString fname; + VdtcTreeItemBase *item; + + fpath = path; + + // no nodes present yet, we should start scanning this dir + // scan files first in this directory, with all extensions in this array + + for(size_t i = 0; i < _extensions.Count(); i++) + { + wxDir fdir(path.GetFullPath()); + + if(fdir.IsOpened()) + { + bool bOk = fdir.GetFirst(&fname, _extensions[i], wxDIR_FILES | wxDIR_HIDDEN); + while(bOk) + { + // TODO: Flag for double items + + item = AddFileItem(fname); + if(item) + { + // fill it in, and marshall it by the user for info + fpath.SetFullName(fname); + if(OnAddFile(*item, fpath)) + items.Add(item); + else + delete item; + } + + bOk = fdir.GetNext(&fname); + } + } + } +} + +void wxVirtualDirTreeCtrl::GetDirectories(VdtcTreeItemBase *parent, VdtcTreeItemBaseArray &items, const wxFileName &path) +{ + wxUnusedVar(parent); + wxFileName fpath; + wxString fname; + VdtcTreeItemBase *item; + + // no nodes present yet, we should start scanning this dir + // scan files first in this directory, with all extensions in this array + + wxDir fdir(path.GetFullPath()); + if(fdir.IsOpened()) + { + bool bOk = fdir.GetFirst(&fname, VDTC_DIR_FILESPEC, wxDIR_DIRS | wxDIR_HIDDEN); + while(bOk) + { + // TODO: Flag for double items + item = AddDirItem(fname); + if(item) + { + // fill it in, and marshall it by the user for info + fpath = path; + fpath.AppendDir(fname); + + if(OnAddDirectory(*item, fpath)) + items.Add(item); + else + delete item; + } + + bOk = fdir.GetNext(&fname); + } + } +} + +int wxVirtualDirTreeCtrl::OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) +{ + // used for SortChildren, reroute to our sort routine + VdtcTreeItemBase *a = (VdtcTreeItemBase *)GetItemData(item1), + *b = (VdtcTreeItemBase *)GetItemData(item2); + if(a && b) + return OnCompareItems(a,b); + + return 0; +} + +int wxVirtualDirTreeCtrl::OnCompareItems(const VdtcTreeItemBase *a, const VdtcTreeItemBase *b) +{ + // if dir and other is not, dir has preference + if(a->IsDir() && b->IsFile()) + return -1; + else if(a->IsFile() && b->IsDir()) + return 1; + + // else let ascii fight it out + return a->GetCaption().CmpNoCase(b->GetCaption()); +} + +void wxVirtualDirTreeCtrl::SwapItem(VdtcTreeItemBaseArray &items, int a, int b) +{ + VdtcTreeItemBase *t = items[b]; + items[b] = items[a]; + items[a] = t; +} + +void wxVirtualDirTreeCtrl::SortItems(VdtcTreeItemBaseArray &items, int left, int right) +{ + VdtcTreeItemBase *a, *b; + int i, last; + + if(left >= right) + return; + + SwapItem(items, left, (left + right)/2); + + last = left; + for(i = left+1; i <= right; i++) + { + a = items[i]; + b = items[left]; + if(a && b) + { + if(OnCompareItems(a, b) < 0) + SwapItem(items, ++last, i); + } + } + + SwapItem(items, left, last); + SortItems(items, left, last-1); + SortItems(items, last+1, right); +} + + +void wxVirtualDirTreeCtrl::AddItemsToTreeCtrl(VdtcTreeItemBase *item, VdtcTreeItemBaseArray &items) +{ + wxCHECK2(item, return); + + // now loop through all elements on this level and add them + // to the tree ctrl pointed out by 'id' + + VdtcTreeItemBase *t; + wxTreeItemId id = item->GetId(); + for(size_t i = 0; i < items.GetCount(); i++) + { + t = items[i]; + if(t){ + wxTreeItemId newItem = AppendItem(id, t->GetCaption(), t->GetIconId(), t->GetSelectedIconId(), t); + //keep the newly added item in the cache +#ifdef __WXMSW__ + wxString fullpath = GetFullPath(newItem).GetFullPath(); + if(fullpath.IsEmpty() == false){ + _cache[fullpath] = newItem.m_pItem; + } +#endif + } + } +} + +wxFileName wxVirtualDirTreeCtrl::GetRelativePath(const wxTreeItemId &id) +{ + wxFileName value; + wxCHECK(id.IsOk(), value); + + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(id); + wxCHECK(b, value); + + AppendPathRecursively(b, value, false); + + return value; +} + +wxFileName wxVirtualDirTreeCtrl::GetFullPath(const wxTreeItemId &id) +{ + wxFileName value; + wxCHECK(id.IsOk(), value); + + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(id); + wxCHECK(b, value); + + AppendPathRecursively(b, value, true); + + return value; +} + +wxTreeItemId wxVirtualDirTreeCtrl::GetItemByFullPath(const wxFileName &fullpath) +{ + wxTreeItemId id = DoFindItemByPath(fullpath); +#ifdef __WXMSW__ + if(id.IsOk()){ + _cache[fullpath.GetFullPath()] = id.m_pItem; + } +#endif + return id; +} + +wxTreeItemId wxVirtualDirTreeCtrl::ExpandToPath(const wxFileName &path) +{ + wxTreeItemId item = DoFindItemByPath(path); + + if(item.IsOk()){ +#ifdef __WXMSW__ + if(item.IsOk()){ + _cache[path.GetFullPath()] = item.m_pItem; + } +#endif + if(ItemHasChildren(item)){ + Expand(item); + } + SelectItem(item); + //notify that this tree has expanded + SendCmdEvent(wxEVT_FILE_EXP_REFRESHED); + return item; + } + return item; +} + +wxTreeItemId wxVirtualDirTreeCtrl::DoFindItemByPath(const wxFileName &path) +{ + wxTreeItemId value((void *)0); + wxFileName seekpath; + wxArrayString paths; + VdtcTreeItemBase *ptr; + paths = path.GetDirs(); + +#ifdef __WXMSW__ + //first try the cache + std::map< wxString, void* >::const_iterator iter = _cache.find(path.GetFullPath()); + if(iter != _cache.end()){ + return iter->second; + } +#endif + + // start in root section, and find the path sections that + // match the sequence + + wxTreeItemId root = GetRootItem(); + if(root.IsOk()) + { + //make sure we are on the same volume... + if(path.HasVolume()){ + wxString volume(path.GetVolume() + wxT(":\\")); + if(GetItemText(root) != volume){ + //not the same volume, change the volume and try to expand again + SetRootPath(volume, true); + return DoFindItemByPath(path); + } + } + + wxTreeItemId curr = root, id; + for(size_t i = 0; i < paths.GetCount(); i++) + { + // scan for name on this level of children + wxString currpath = paths[i]; + bool not_found = true; + wxTreeItemIdValue cookie; + + id = GetFirstChild(curr, cookie); + while(not_found && id.IsOk()) + { + ptr = (VdtcTreeItemBase *)GetItemData(id); + not_found = !ptr->GetName().IsSameAs(currpath, false); + + // prevent overwriting id + if(!not_found) + { + // we found the name, now to ensure there are more + // names loaded from disk, we call ScanFromDir (it will abort anywayz + // when there are items in the dir) + + if(ptr->IsDir()) + { + // TODO: This getfullpath might be a too high load, we can also + // walk along with the path, but that is a bit more tricky. + seekpath = GetFullPath(id); + ScanFromDir(ptr, seekpath, VDTC_MIN_SCANDEPTH); + } + + curr = id; + } + else + id = GetNextChild(curr, cookie); + } + + // now, if not found we break out + if(not_found) + return value; + } + + if(path.GetFullPath() != seekpath.GetFullPath()) { + //we still has one more test to do: the name + wxTreeItemIdValue cookie; + wxString fullname = path.GetFullName(); + bool not_found = true; + id = GetFirstChild(curr, cookie); + while(not_found && id.IsOk()) + { + ptr = (VdtcTreeItemBase *)GetItemData(id); + not_found = !ptr->GetName().IsSameAs(fullname, false); + + // prevent overwriting id + if(!not_found) + { + curr = id; + } + else + id = GetNextChild(curr, cookie); + } + + if(not_found) + return value; + } + return curr; + } + return value; +} + +bool wxVirtualDirTreeCtrl::IsRootNode(const wxTreeItemId &id) +{ + bool value = false; + wxCHECK(id.IsOk(), value); + + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(id); + if(b) + value = b->IsRoot(); + + return value; +} + +bool wxVirtualDirTreeCtrl::IsDirNode(const wxTreeItemId &id) +{ + bool value = false; + wxCHECK(id.IsOk(), value); + + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(id); + if(b) + value = b->IsDir(); + + return value; +} + +bool wxVirtualDirTreeCtrl::IsFileNode(const wxTreeItemId &id) +{ + bool value = false; + wxCHECK(id.IsOk(), value); + + VdtcTreeItemBase *b = (VdtcTreeItemBase *)GetItemData(id); + if(b) + value = b->IsFile(); + + return value; +} + +/** Appends subdirs up until root. This is done by finding the root first and + going back down to the original caller. This is faster because no copying takes place */ +void wxVirtualDirTreeCtrl::AppendPathRecursively(VdtcTreeItemBase *b, wxFileName &dir, bool useRoot) +{ + wxCHECK2(b, return); + + VdtcTreeItemBase *parent = GetParent(b); + if(parent) + AppendPathRecursively(parent, dir, useRoot); + else + { + // no parent assume top node + if(b->IsRoot() && useRoot) + dir.AssignDir(b->GetName()); + return; + } + + // now we are unwinding the other way around + if(b->IsDir()) + dir.AppendDir(b->GetName()); + else if(b->IsFile()) + dir.SetFullName(b->GetName()); +}; + +// -- event handlers -- + +void wxVirtualDirTreeCtrl::OnExpanding(wxTreeEvent &event) +{ + + // check for collapsing item, and scan from there + wxTreeItemId item = event.GetItem(); + if(item.IsOk()) + { + VdtcTreeItemBase *t = (VdtcTreeItemBase *)GetItemData(item); + if(t && t->IsDir()) + { + // extract data element belonging to it, and scan. + ScanFromDir(t, GetFullPath(item), VDTC_MIN_SCANDEPTH); + } + } + // be kind, and let someone else also handle this event + event.Skip(); +} + +void wxVirtualDirTreeCtrl::DoReloadNode(const wxTreeItemId &item) +{ + if(item.IsOk()) + { + VdtcTreeItemBase *t = (VdtcTreeItemBase *)GetItemData(item); + if(t && (t->IsDir() || t->IsRoot())) + { + // extract data element belonging to it, and scan. + ScanFromDir(t, GetFullPath(item), VDTC_MIN_SCANDEPTH, true); + } + } +} + +VdtcTreeItemBase *wxVirtualDirTreeCtrl::AddFileItem(const wxString &name) +{ + // call the file item node create method + return OnCreateTreeItem(VDTC_TI_FILE, name); +} + +VdtcTreeItemBase *wxVirtualDirTreeCtrl::AddDirItem(const wxString &name) +{ + // call the dir item node create method + return OnCreateTreeItem(VDTC_TI_DIR, name); +} + + +// --- virtual handlers ---- + +void wxVirtualDirTreeCtrl::OnAssignIcons(wxImageList &icons) +{ + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("document_root"))); + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("folder"))); + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("page_white_text"))); + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("page_white_cplusplus"))); + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("page_white_c"))); + icons.Add(wxXmlResource::Get()->LoadBitmap(wxT("page_white_h"))); +} + +VdtcTreeItemBase *wxVirtualDirTreeCtrl::OnCreateTreeItem(int type, const wxString &name) +{ + // return a default instance, no extra info needed in this item + return new VdtcTreeItemBase(type, name); +} + +bool wxVirtualDirTreeCtrl::OnAddRoot(VdtcTreeItemBase &item, const wxFileName &name) +{ + // allow adding + wxUnusedVar(item); + wxUnusedVar(name); + return true; +} + +bool wxVirtualDirTreeCtrl::OnDirectoryScanBegin(const wxFileName &path) +{ + // allow all paths + wxUnusedVar(path); + return true; +} + +bool wxVirtualDirTreeCtrl::OnAddFile(VdtcTreeItemBase &item, const wxFileName &name) +{ + // allow all files + wxUnusedVar(item); + wxUnusedVar(name); + return true; +} + +bool wxVirtualDirTreeCtrl::OnAddDirectory(VdtcTreeItemBase &item, const wxFileName &name) +{ + // allow all dirs + wxUnusedVar(item); + wxUnusedVar(name); + return true; +} + +void wxVirtualDirTreeCtrl::OnSetRootPath(const wxString &root) +{ + // do nothing here, but it can be used to start initialisation + // based upon the setting of the root (which means a renewal from the tree) + wxUnusedVar(root); +} + +void wxVirtualDirTreeCtrl::OnAddedItems(const wxTreeItemId &parent) +{ + wxUnusedVar(parent); + return; +} + +void wxVirtualDirTreeCtrl::OnDirectoryScanEnd(VdtcTreeItemBaseArray &items, const wxFileName &path) +{ + wxUnusedVar(items); + wxUnusedVar(path); + return; +} + + + diff --git a/Plugin/virtualdirtreectrl.h b/Plugin/virtualdirtreectrl.h new file mode 100644 index 0000000000..7b87cc638a --- /dev/null +++ b/Plugin/virtualdirtreectrl.h @@ -0,0 +1,493 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wxVirtualDirTreeCtrl.h +// Author: XX +// Created: Saturday, March 27, 2004 14:15:56 +// Copyright: XX +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WXVIRTUALDIRTREECTRL_H__ +#define __WXVIRTUALDIRTREECTRL_H__ + +//#ifdef __GNUG__ +// #pragma interface "virtualdirtreectrl.cpp" +//#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include +#include +#include +#include +#include + +enum +{ + VDTC_TI_ROOT = 0, + VDTC_TI_DIR, + VDTC_TI_FILE +}; + +#ifdef __WXMSW__ + #define VDTC_DIR_FILESPEC wxT("*.*") +#else + #define VDTC_DIR_FILESPEC wxT("*") +#endif + +/// Icon number for root +#define VDTC_ICON_ROOT 0 + +/// Icon number for a folder +#define VDTC_ICON_DIR 1 + +/// Icon number for file +#define VDTC_ICON_FILE 2 + +/// Minimal amount of levels to scan per run +#define VDTC_MIN_SCANDEPTH 2 + +/// No settings, take default +#define wxVDTC_DEFAULT 0 +/** Instead of performing a smart reload per collapsed node, all items are loaded + into memory. NOTE: This can take a while! */ +#define wxVDTC_RELOAD_ALL 1 +/** Show a busy dialog to inform user, only valid when wxVDTC_RELOAD_ALL is set. Showing + a busy dialog on every smart expansion is not useful anyway */ +#define wxVDTC_SHOW_BUSYDLG 2 +/// Do not expand the root node after reloading +#define wxVDTC_NO_EXPAND 4 +/// Do not call sort. Simply display files as they are located +#define wxVDTC_NO_SORT 8 +/// Do not add files, only directories +#define wxVDTC_NO_FILES 16 + +/** \class VdtcTreeItemBase + This class is used to link the information of a file/root or folder node to a wxTreeItem + in the wxTreeCtrl. + + To use more information in this class, inherit this with your own copy, and in the handler + wxVirtualDirTreeCtrl::OnCreateTreeItem, return your own class. This allows you to store more + information in this class. + + For example; to return a different caption instead of the standard filename / directory, inherit this, and + redefine the VdtcTreeItemBase::GetCaption() member. The same goes for the VdtcTreeItemBase::GetIconId() + and VdtcTreeItemBase::GetSelectedIconId() functions if you redefined the bitmaps in the imagelist. + +*/ +class VdtcTreeItemBase : public wxTreeItemData +{ +protected: + wxString _name; + int _type; + +public: + /** Default constructor. Pass the parent of this node as a VdtcTreeItemBase object, the type + of this object (VDTC_TI_ROOT,VDTC_TI_DIR, VDTC_TI_FILE or added types but leave these + three in place), and the name of the object (i.e. filename or dir name). When deriving this + class make sure you call the constructor propertly. The types are of essence for some + internal functions. For example: + + \code + + class MyOwnData : public VdtcTreeItemBase + { + MyOwnData(int type, const wxString &name) + : VdtcTreeItemBase(type, name) + { + // do initialisation + } + } + \endcode + + */ + VdtcTreeItemBase(int type, const wxString &name) + : _name(name) + , _type(type) + { + }; + + /** Default destructor */ + ~VdtcTreeItemBase() + { + // NOTE: do not delete the tree item + // because the tree item deletes this item data + }; + + /** Virtual function to report the caption back to the wxTreeCtrl to be added. If the caption should be + something else then the default name it gets from the file (or the root path when this node points + to a root item, inherit this class and redefine GetCaption + */ + virtual const wxString &GetCaption() const { + return _name; + }; + + /** Virtual function to return the icon ID this node should get. Per default it gets the ID of the + default image list. If you assigned more bitmaps (or different bitmaps) to the image list, return + the proper indices based upon the class it refers to. The ID's returned are: + + - VDTC_ICON_ROOT: For root + - VDTC_ICON_DIR: For a directory + - VDTC_ICON_FILE: For a file + */ + virtual int GetIconId() const { + switch(_type) + { + case VDTC_TI_ROOT: + return VDTC_ICON_ROOT; + case VDTC_TI_DIR: + return VDTC_ICON_DIR; + } + + if(_type == VDTC_TI_FILE){ + //return icon id based on the file extension + wxString ext = _name.AfterLast(wxT('.')); + if(ext.CmpNoCase(wxT("cpp")) == 0){return 3;} + if(ext.CmpNoCase(wxT("cxx")) == 0){return 3;} + if(ext.CmpNoCase(wxT("cc")) == 0){return 3;} + if(ext.CmpNoCase(wxT("c++")) == 0){return 3;} + if(ext.CmpNoCase(wxT("c")) == 0){return 4;} + if(ext.CmpNoCase(wxT("h++")) == 0){return 5;} + if(ext.CmpNoCase(wxT("hpp")) == 0){return 5;} + if(ext.CmpNoCase(wxT("h")) == 0){return 5;} + return VDTC_ICON_FILE; + } + return -1; + }; + + /** Virtual function to return the selected icon ID this node should get. Per default there is no icon + associated with a selection. If you would like a selection, inherit this class and redefine this function + to return a proper id. + */ + virtual int GetSelectedIconId() const { + return -1; + }; + + /** Gets this name. The name of the root is the base path of the whole directory, the + name of a file node is the filename, and from a dir node the directory name. + \sa IsDir, IsFile, IsRoot */ + const wxString &GetName() { + return _name; + }; + + /** Returns true if this is of type VDTC_TI_DIR */ + bool IsDir() const { + return _type == VDTC_TI_DIR; + }; + + /** Returns true if this is of type VDTC_TI_ROOT */ + bool IsRoot() const { + return _type == VDTC_TI_ROOT; + }; + + /** Returns true if this is of type VDTC_TI_FILE */ + bool IsFile() const { + return _type == VDTC_TI_FILE; + }; + +}; + +// the formal definition of the array of pointers for tree item base +WX_DEFINE_ARRAY(VdtcTreeItemBase *, VdtcTreeItemBaseArray); + +/** + \class wxVirtualDirTreeCtrl + A class which allows the user to browse through a 'virtual' treectrl, fully customizable when it's derived. + + The wxVirtualDirTreeCtrl can be used for displaying the directory structure in a tree ctrl just like the + wxDirCtrl, but has much more advantages and flexibility for the developer. A list of some of the functionality + embedded: + + See the main page to read more about this control. +*/ + + +extern const wxEventType wxVDTC_ROOT_CHANGED; +class wxVirtualDirTreeCtrl : public wxTreeCtrl +{ +private: + /** File extensions list */ + wxArrayString _extensions; + /** Icons image list */ + wxImageList *_iconList; + /** Extra flags */ + int _flags; + +#ifdef __WXMSW__ + std::map< wxString, void*> _cache; +#endif + + /** Scans from given dir, for 'level' depth and with present extensions. This will + reload the directory on that level. If there are tree items associated with the 'reloaded' + items they will be deleted first. */ + int ScanFromDir(VdtcTreeItemBase *item, const wxFileName &path, int level, bool reload = false); + + /** Get files for current dir */ + void GetFiles(VdtcTreeItemBase *parent, VdtcTreeItemBaseArray &items, const wxFileName &path); + + /** get dirs in current dir */ + void GetDirectories(VdtcTreeItemBase *parent, VdtcTreeItemBaseArray &items, const wxFileName &path); + + void AppendPathRecursively(VdtcTreeItemBase *b, wxFileName &dir, bool useRoot = true); + + /** Adds items on this level to the parent dir associated wxTreeCtrl item */ + void AddItemsToTreeCtrl(VdtcTreeItemBase *item, VdtcTreeItemBaseArray &items); + + /** Sorts items with qsort algorithm */ + void SortItems(VdtcTreeItemBaseArray &items, int left, int right); + + /** Built in swap algoritm */ + void SwapItem(VdtcTreeItemBaseArray &items, int a, int b); + + wxTreeItemId DoFindItemByPath(const wxFileName &path); + + // -- event handlers -- + + void OnExpanding(wxTreeEvent &event); + +protected: + /** Inherited virtual function for SortChildren */ + int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2); + + /** + * Delete all children of item and rebuild it from disk + */ + void DoReloadNode(const wxTreeItemId &item); + +public: + /** Default constructor of this control. It is similar to the wxTreeCtrl */ + wxVirtualDirTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_FULL_ROW_HIGHLIGHT, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxT("wxVirtualDirTreeCtrl")); + virtual ~wxVirtualDirTreeCtrl(); + + /** Returns the extra flags currently set set for wxVirtualDirTreeCtrl. + \sa SetRootPath */ + int GetExtraFlags() const { + return _flags; + }; + + /** Sets the root path of the wxVirtualDirTreeCtrl. This will reset the view and restart the + process of notification, and all events that need to be called. Returns false when this + root path does not lead to any valid filesystem or directory. Set extra flags for + wxVirtualDirTreeCtrl when needed. The following flags are possible + - wxVDTC_DEFAULT + - wxVDTC_RELOAD_ALL + - wxVDTC_NO_EXPAND + - wxVDTC_SHOW_BUSYDLG + - wxVDTC_NO_SORT + - wxVDTC_NO_FILES */ + bool SetRootPath(const wxString &root, bool notify = false, int flags = wxVDTC_DEFAULT); + + /** Resets the extensions to "*.*" as default (or "*" under linux). The extension will be used + upon next reload of the directory tree. In between extensions can be changed but will have + no effect upon the directory scanning mechanism until the next SetRootPath */ + void ResetExtensions() { + _extensions.Clear(); + _extensions.Add(VDTC_DIR_FILESPEC); + }; + + /** Returns the relative path of the item with the given wxTreeItemId. This doesn't include the + root node. This can be used in ExpandToPath(). A check is made if the object belonging to this + wxTreeItemId is of the type directory or file. In both cases the relative path (plus filename if + it is a file) is returned. When the object pointed out by wxTreeItemId is of the type root, an + empty wxFileName is returned. Be warned, these functions can take some time because the whole tree + structure is iterated from the top node down to the root */ + wxFileName GetRelativePath(const wxTreeItemId &id); + + /** Return full path of given node. This can also include the name of the file. This will be returned as + a wxFileName (with path and possible name) to be used further. Be warned, these functions can take some time because the whole tree + structure is iterated from the top node down to the root. */ + wxFileName GetFullPath(const wxTreeItemId &id); + + /** Returns TRUE when the item pointed out by wxTreeItemId is a root node internally, this means the + assigned VdtcTreeItemBase class is of type VDTC_TI_ROOT. + \sa VdtcTreeItemBase::IsRoot */ + bool IsRootNode(const wxTreeItemId &id); + + /** Returns TRUE when the item pointed out by wxTreeItemId is a directory node internally, this means the + assigned VdtcTreeItemBase class is of type VDTC_TI_DIR. For these types of nodes you can use i.e. + GetRelativePath() or GetFullPath() to retrieve the directory. + \sa VdtcTreeItemBase::IsDir, GetRelativePath, GetFullPath */ + bool IsDirNode(const wxTreeItemId &id); + + /** Returns TRUE when the item pointed out by wxTreeItemId is a file node internally, this means the + assigned VdtcTreeItemBase class is of type VDTC_TI_DIR. For these types of nodes you can use i.e. + GetRelativePath() or GetFullPath() to retrieve the directory plus filename. + \sa VdtcTreeItemBase::IsFile, GetRelativePath, GetFullPath */ + bool IsFileNode(const wxTreeItemId &id); + + /** Expands from root, to the given path. Every path in the wxFileName is looked up and expanded. When + a path section is not found, this method aborts and returns a wxTreeItemId with value 0. When it succeeds + the wxTreeItemId is returned of the last tree item that was expanded. + + A special note: Don't include the root path of the current tree in the filename. This part of the path + is not used to scan. Use GetRelativePath to get the path up until a specific node. This method is useful + to expand earlier paths after restoring the window state. + \sa GetRelativePath */ + wxTreeItemId ExpandToPath(const wxFileName &path); + + /** Adds a file item. Be aware that this call does not add it to the wxTreeCtrl. This only creates an instance + of a VtdcTreeItemBase file node. The handler OnCreateTreeItem is called to allow the proper initialisation + of every newly created instance of the (inherited) VdtcTreeItemBase class. */ + VdtcTreeItemBase *AddFileItem(const wxString &name); + + /** Adds a directory item. Be aware that this call does not add it to the wxTreeCtrl. This only creates an instance + of a VtdcTreeItemBase directory node. The handler OnCreateTreeItem is called to allow the proper initialisation + of every newly created instance of the (inherited) VdtcTreeItemBase class. */ + VdtcTreeItemBase *AddDirItem(const wxString &name); + + /** Returns parent of the passed VdtcItemBase object. It will fetch the wxTreeItemId of this parent, + and return the VdtcTreeItemBase parent associated with it. If the associated item is nil, there is no + parent, this is most likely the root else an assertion failure occurs */ + VdtcTreeItemBase *GetParent(VdtcTreeItemBase *item) const { + if(!item){ + return NULL; + } + + wxTreeItemId p = GetItemParent(item->GetId()); + if(p.IsOk()){ + return (VdtcTreeItemBase *)GetItemData(p); + }else{ + return NULL; + } + }; + + /** + * \brief find item which holds fullpath + * \param fullpath fullpath to search + * \return tree item or invalid incase no match found + */ + wxTreeItemId GetItemByFullPath(const wxFileName &fullpath); + + // --- handlers --- + + /** This handler is called when the SetRootPath function is called. This call causes a re-initialisation of + the wxVirtualDirTreeCtrl. It can be useful to initialise the class that derived this class as well. The + root is passed as parameter to inform which root is going to be set. NOTE: When this method is called, + the following criteria is true: + - The tree is completely empty + - The path parameter is valid. When it's not valid this call is not made */ + void OnSetRootPath(const wxString &root); + + /** This virtual handler is used to allow the developer to assign custom icons to the + image list. Override this method to assign your own icons to the wxTreeCtrl. The default method + will assign a root bitmap, a folder bitmap and a file bitmap. The icons assigned can be + refered to in the OnFileName and OnDirectory handlers, to specify what icon should be used. + + The default images can be used by these constants: + - VDTC_ICON_ROOT + - VDTC_ICON_DIR + - VDTC_ICON_FILE + + The icon list contains icons which are 16x16 in size. + */ + virtual void OnAssignIcons(wxImageList &icons); + + /** This handler provides must provide a VdtcTreeItemBase* instance to be used upon creation. If you + override this handler, you can return your own class, which might embed more information. + + The type tells you what kind of element is created, a root item (VDTC_TI_ROOT), a dir item (VDTC_TI_DIR) + or a file item (VDTC_TI_FILE). Dependent upon the type you can return a different class based upon + VdtcTreeItemBase. + + For example, this is the standard implementation: + + \code + return new VdtcTreeItemBase(type, name); + \endcode + + You could derive the wxVirtualDirTreeCtrl and VdtcTreeItemBase object and make this: + + \code + + switch(type) + { + case VDTC_TI_ROOT: + return new MyRootItem(type, name); // MyRootItem = class derived VdtcTreeItemBase + case VDTC_TI_DIR: + return new MyDirItem(type, name); // MyDirItem = class derived VdtcTreeItemBase + case VDTC_TI_FILE: + return new MyFileItem(type, name); // MyFileItem = class derived VdtcTreeItemBase + } + + return 0; + + \endcode + + \sa VdtcTreeItemBase + */ + virtual VdtcTreeItemBase *OnCreateTreeItem(int type, const wxString &name); + + /** This handler is called before the VdtcTreeItemBase item is added to the root. This will be the first item to be added + before all else is added. + + If for some reason this root is denied to be added, return FALSE. If it may be added, return TRUE. If false is returned + then no other items are created, and the SetRootPath() function returns with FALSE notifying the caller that something + went wrong. + \sa VdtcTreeItemBase + */ + virtual bool OnAddRoot(VdtcTreeItemBase &item, const wxFileName &name); + + /** This handler is called before a file VdtcTreeItemBase item is added to the tree. For every file added in the tree this + handler is called. It allows you to change the name or caption of the item, and also gain more information + or change the contents of the associated VdtcTreeItemBase class. The wxFileName contains the full path + of the item to be added, so it can be easily inspected, and tested for specific extensions, parts of the + name and what else. + + If for some reason this item is denied to be added, return FALSE. If it may be added, return TRUE. + */ + virtual bool OnAddFile(VdtcTreeItemBase &item, const wxFileName &name); + + /** This handler is called before a directory item is added to the tree. For every dir added in the tree this + handler is called. It allows you to change the name of the item or the caption, and also gain more information of the + directory, and check if specific files are present. The wxFileName contains the full path of the directory + to be added, so it can be easily inspected, and tested for specific criteria, parts of the name and what else. + + If for some reason this item is denied to be added, return FALSE. If it may be added, return TRUE. + */ + virtual bool OnAddDirectory(VdtcTreeItemBase &item, const wxFileName &name); + + /** This handler is called before the directory specified by 'path' is scanned. You can veto this scan by + returning 'false'. This way the scanning of all files and directories in this path is skipped. After this + handler, subsequent calls to OnAddFile, OnAddDirectory will be made for every file and directory + encountered in this level to be scanned. NOTE: When this scan is veto'd there will be no call + to OnDirectoryScanEnd because there was no scan. Also OnAddedItems is not called */ + + virtual bool OnDirectoryScanBegin(const wxFileName &path); + + /** This handler is called when all files and all directories are scanned in the current dir and iterated in + the array passed to this method. Before the sorting algorithm is initiated, the developer is allowed to + take one last look at all the files, maybe delete some or act upon other criteria. The items parameter + contains the pointer array of all the items that are in the list, and the path parameter contains the + current path investigated. NOTE: If you want to delete an item from the array, delete it with delete + operator and remove the pointer from the list. */ + + virtual void OnDirectoryScanEnd(VdtcTreeItemBaseArray &items, const wxFileName &path); + + /** This handler is called the very moment after all items are added to the tree control. The parent parameter + contains the tree node to which the items are added. They are already sorted and ready. E.g. when you don't + want to use the internal sort algoritm this is a nice place to call SortChildren on the parent node */ + + virtual void OnAddedItems(const wxTreeItemId &parent); + + /** This handler is called during the sorting of the tree control items. Return < 0 when a < b, > 0 when a > b + and 0 when a == b. + */ + virtual int OnCompareItems(const VdtcTreeItemBase *a, const VdtcTreeItemBase *b); + +private: + // WDR: member variable declarations for wxVirtualDirTreeCtrl + +private: + // WDR: handler declarations for wxVirtualDirTreeCtrl + +private: + DECLARE_EVENT_TABLE() +}; + + + + +#endif diff --git a/Plugin/volumelocatorthread.cpp b/Plugin/volumelocatorthread.cpp new file mode 100644 index 0000000000..e0e74f2894 --- /dev/null +++ b/Plugin/volumelocatorthread.cpp @@ -0,0 +1,38 @@ +#ifdef __WXMSW__ + +#include "volumelocatorthread.h" +#include "wx/volume.h" + +VolumeLocatorThread::VolumeLocatorThread(wxEvtHandler *owner) +: wxThread(wxTHREAD_JOINABLE) +, m_owner(owner) +{ +} + +VolumeLocatorThread::~VolumeLocatorThread() +{ +} + +void *VolumeLocatorThread::Entry() +{ + //Locate all volumes in the system + //when done, send an event to the owner + //and terminate + wxArrayString volumnes = wxFSVolume::GetVolumes(); + + //for convinience, create the result as a ';' separated + //string and send an event to the main thread + wxString result; + for(size_t i=0; iAddPendingEvent(e); + return NULL; +} + +#endif // MSW + diff --git a/Plugin/volumelocatorthread.h b/Plugin/volumelocatorthread.h new file mode 100644 index 0000000000..7492bf7240 --- /dev/null +++ b/Plugin/volumelocatorthread.h @@ -0,0 +1,27 @@ +#ifdef __WXMSW__ + +#ifndef VOLUMELOCATORTHREAD_H +#define VOLUMELOCATORTHREAD_H + +#include "wx/thread.h" +#include "wx/event.h" + +#define wxEVT_THREAD_VOLUME_COMPLETED 3453 + +class VolumeLocatorThread : public wxThread +{ + wxEvtHandler *m_owner; + +protected: + void* Entry(); + +public: + VolumeLocatorThread(wxEvtHandler *owner); + ~VolumeLocatorThread(); +}; + +#endif //VOLUMELOCATORTHREAD_H +#endif //__WXMSW__ + + + diff --git a/Plugin/winprocess.cpp b/Plugin/winprocess.cpp new file mode 100644 index 0000000000..aeddc53145 --- /dev/null +++ b/Plugin/winprocess.cpp @@ -0,0 +1,238 @@ +#include "winprocess.h" +#ifdef __WXMSW__ +#include "wx/filefn.h" + +/*static*/ +WinProcess* WinProcess::Execute(const wxString& cmd, wxString &errMsg, const wxString &workingDir) +{ + SECURITY_ATTRIBUTES saAttr; + BOOL fSuccess; + + wxString wd(workingDir); + if(workingDir.IsEmpty()){ + wd = wxGetCwd(); + } + + // Set the bInheritHandle flag so pipe handles are inherited. + saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); + saAttr.bInheritHandle = TRUE; + saAttr.lpSecurityDescriptor = NULL; + + // The steps for redirecting child process's STDOUT: + // 1. Save current STDOUT, to be restored later. + // 2. Create anonymous pipe to be STDOUT for child process. + // 3. Set STDOUT of the parent process to be write handle to + // the pipe, so it is inherited by the child process. + // 4. Create a noninheritable duplicate of the read handle and + // close the inheritable read handle. + + WinProcess *prc = new WinProcess(); + + // Save the handle to the current STDOUT. + prc->hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE); + + // Create a pipe for the child process's STDOUT. + if( !CreatePipe( &prc->hChildStdoutRd, &prc->hChildStdoutWr, &saAttr, 0) ) + { + delete prc; + return NULL; + } + + // Set a write handle to the pipe to be STDOUT. + if( !SetStdHandle(STD_OUTPUT_HANDLE, prc->hChildStdoutWr) ) + { + delete prc; + return NULL; + } + + // Create noninheritable read handle and close the inheritable read handle. + fSuccess = DuplicateHandle( GetCurrentProcess(), prc->hChildStdoutRd, + GetCurrentProcess(), &prc->hChildStdoutRdDup , + 0, FALSE, + DUPLICATE_SAME_ACCESS ); + if( !fSuccess ) + { + delete prc; + return NULL; + } + CloseHandle( prc->hChildStdoutRd ); + + // The steps for redirecting child process's STDIN: + // 1. Save current STDIN, to be restored later. + // 2. Create anonymous pipe to be STDIN for child process. + // 3. Set STDIN of the parent to be the read handle to the + // pipe, so it is inherited by the child process. + // 4. Create a noninheritable duplicate of the write handle, + // and close the inheritable write handle. + + // Save the handle to the current STDIN. + prc->hSaveStdin = GetStdHandle(STD_INPUT_HANDLE); + + // Create a pipe for the child process's STDIN. + if( !CreatePipe(&prc->hChildStdinRd, &prc->hChildStdinWr, &saAttr, 0) ) + { + delete prc; + return NULL; + } + // Set a read handle to the pipe to be STDIN. + if( !SetStdHandle(STD_INPUT_HANDLE, prc->hChildStdinRd) ) + { + delete prc; + return NULL; + } + // Duplicate the write handle to the pipe so it is not inherited. + fSuccess = DuplicateHandle(GetCurrentProcess(), prc->hChildStdinWr, + GetCurrentProcess(), &prc->hChildStdinWrDup, + 0, FALSE, // not inherited + DUPLICATE_SAME_ACCESS ); + if( !fSuccess ) + { + delete prc; + return NULL; + } + CloseHandle(prc->hChildStdinWr); + + // Execute the child process + STARTUPINFO siStartInfo; + + // Set up members of STARTUPINFO structure. + ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) ); + siStartInfo.cb = sizeof(STARTUPINFO); + + siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; ; + siStartInfo.hStdInput = prc->hChildStdinRd; + siStartInfo.hStdOutput = prc->hChildStdoutWr; + siStartInfo.hStdError = prc->hChildStdoutWr; + + // Set the window to hide + siStartInfo.wShowWindow = SW_HIDE; + BOOL ret = CreateProcess( NULL , + (WCHAR*)cmd.GetData(), // shell line execution command + NULL, // process security attributes + NULL, // primary thread security attributes + TRUE, // handles are inherited + CREATE_NO_WINDOW, // creation flags + NULL, // use parent's environment + wd.c_str(), // CD to tmp dir + &siStartInfo, // STARTUPINFO pointer + &prc->piProcInfo); // receives PROCESS_INFORMATION + if( ret ) + { + prc->dwProcessId = prc->piProcInfo.dwProcessId; + } + else + { + delete prc; + return NULL; + } + + // After process creation, restore the saved STDIN and STDOUT. + if( !SetStdHandle(STD_INPUT_HANDLE, prc->hSaveStdin) ) + { + delete prc; + return NULL; + } + if( !SetStdHandle(STD_OUTPUT_HANDLE, prc->hSaveStdout) ) + { + delete prc; + return NULL; + } + return prc; +} + +WinProcess::WinProcess() +{ + hChildStdinRd = NULL; + hChildStdoutWr = NULL; + hChildStdinWrDup = NULL; + hChildStdoutRdDup = NULL; + piProcInfo.hProcess = NULL; + piProcInfo.hThread = NULL; +} + +WinProcess::~WinProcess() +{ +} + +bool WinProcess::Read(wxString& buff) +{ + DWORD dwRead; + DWORD dwMode; + DWORD dwTimeout; + char chBuf[4097]; + + // Make the pipe to non-blocking mode + dwMode = PIPE_READMODE_BYTE | PIPE_NOWAIT; + dwTimeout = 30000; + SetNamedPipeHandleState(hChildStdoutRdDup, + &dwMode, + NULL, + &dwTimeout); // Timeout of 30 seconds + if( ReadFile( hChildStdoutRdDup, chBuf, 4096, &dwRead, NULL) || dwRead == 0) + { + chBuf[dwRead/sizeof(char)] = 0; + //printf("%s\n", chBuf); + buff = wxString(chBuf, wxConvUTF8); + return true; + } + return false; +} + +bool WinProcess::Write(const wxString& buff) +{ + DWORD dwMode; + DWORD dwTimeout; + char chBuf[4097]; + + wxString tmpCmd = buff; + tmpCmd = tmpCmd.Trim().Trim(false); + tmpCmd += wxT("\n"); + + strcpy(chBuf, tmpCmd.mb_str()); + + // Make the pipe to non-blocking mode + dwMode = PIPE_READMODE_BYTE | PIPE_NOWAIT; + dwTimeout = 30000; + SetNamedPipeHandleState(hChildStdinWrDup, + &dwMode, + NULL, + NULL); // Timeout of 30 seconds + DWORD dwWritten; + if(!WriteFile(hChildStdinWrDup, chBuf, (unsigned long)strlen(chBuf), &dwWritten, NULL)) + return false; + return true; +} + +bool WinProcess::IsAlive() +{ + DWORD dwExitCode; + if(GetExitCodeProcess(piProcInfo.hProcess, &dwExitCode)) + { + if(dwExitCode == STILL_ACTIVE) + return true; + } + return false; +} + + +void WinProcess::Cleanup() +{ + if(IsAlive()) + TerminateProcess(piProcInfo.hProcess, 255); + + CloseHandle( hChildStdinRd); + CloseHandle( hChildStdoutWr); + CloseHandle( hChildStdinWrDup ); + CloseHandle( hChildStdoutRdDup ); + CloseHandle( piProcInfo.hProcess ); + CloseHandle( piProcInfo.hThread ); + + hChildStdinRd = NULL; + hChildStdoutWr = NULL; + hChildStdinWrDup = NULL; + hChildStdoutRdDup = NULL; + piProcInfo.hProcess = NULL; + piProcInfo.hThread = NULL; +} + +#endif //__WXMSW__ diff --git a/Plugin/winprocess.h b/Plugin/winprocess.h new file mode 100644 index 0000000000..ee91a27a38 --- /dev/null +++ b/Plugin/winprocess.h @@ -0,0 +1,45 @@ +#ifndef __winprocess__ +#define __winprocess__ + +#ifdef __WXMSW__ + +#include +#include + +class WinProcess +{ +public: + WinProcess(); + virtual ~WinProcess(); + + // Create process asynchronously and return a process object + static WinProcess* Execute(const wxString& cmd, wxString &errMsg, const wxString &workingDir = wxEmptyString); + + // Read from process stdout - return immediately if no data is available + bool Read(wxString& buff); + + // Write to the process stdin + bool Write(const wxString& buff); + + // Return true if the process is still alive + bool IsAlive(); + + // Clean the process resources and kill the process if it is + // still alive + void Cleanup(); + +private: + // WINDOWS implementation + // Creating process related handles + HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup, + hChildStdoutRd, hChildStdoutWr, hChildStdoutRdDup, + hSaveStdin, hSaveStdout; + + // Child process id & information + DWORD dwProcessId; + PROCESS_INFORMATION piProcInfo; +}; + +#endif + +#endif // __winprocess__ diff --git a/Plugin/workspace.cpp b/Plugin/workspace.cpp new file mode 100644 index 0000000000..e1a004c69b --- /dev/null +++ b/Plugin/workspace.cpp @@ -0,0 +1,566 @@ +#include "workspace.h" +#include "ctags_manager.h" +#include "project.h" +#include "xmlutils.h" +#include +#include "macros.h" +#include "wx/regex.h" + +Workspace::Workspace() +{ +} + +Workspace::~Workspace() +{ + if( m_doc.IsOk() ){ + m_doc.Save(m_fileName.GetFullPath()); + } +} + +wxString Workspace::GetName() const +{ + if(m_doc.IsOk()){ + return XmlUtils::ReadString(m_doc.GetRoot(), wxT("Name")); + } + return wxEmptyString; +} + +wxString Workspace::ExpandVariables(const wxString &expression) const +{ + static wxRegEx reVarPattern(wxT("\\$\\(( *)([a-zA-Z0-9_]+)( *)\\)")); + wxString result(expression); + EnvironmentVarieblesPtr env = GetEnvironmentVariables(); + while(reVarPattern.Matches(result)){ + wxString varName = reVarPattern.GetMatch(result, 2); + wxString text = reVarPattern.GetMatch(result); + + //search for workspace variable with this name + wxString replacement; + if(env){ + replacement = env->GetEnv(varName); + } + + if(replacement.IsEmpty()){ + //no match in the workspace, try the environment + wxGetEnv(varName, &replacement); + } + + if(replacement.IsEmpty()) + break; + + result.Replace(text, replacement); + } + return result; +} + +void Workspace::CloseWorkspace() +{ + if(m_doc.IsOk()){ + m_doc.Save(m_fileName.GetFullName()); + m_doc = wxXmlDocument(); + } + + m_fileName.Clear(); + // reset the internal cache objects + m_projects.clear(); + + TagsManager *mgr = TagsManagerST::Get(); + mgr->CloseDatabase(); +} + + +bool Workspace::OpenWorkspace(const wxString &fileName, wxString &errMsg) +{ + CloseWorkspace(); + m_fileName = wxFileName(fileName); + m_doc.Load(m_fileName.GetFullPath()); + if( !m_doc.IsOk() ){ + errMsg = wxT("Corrupted workspace file"); + return false; + } + + // This function sets the working directory to the workspace directory! + ::wxSetWorkingDirectory(m_fileName.GetPath()); + + // Load all projects + wxXmlNode *child = m_doc.GetRoot()->GetChildren(); + while(child){ + if(child->GetName() == wxT("Project")){ + wxString projectPath = child->GetPropVal(wxT("Path"), wxEmptyString); + + if( !DoAddProject(projectPath, errMsg) ){ + return false; + } + } + child = child->GetNext(); + } + + // Load the database + wxString dbfile = GetStringProperty(wxT("Database"), errMsg); + wxString exDbfile = GetStringProperty(wxT("ExternalDatabase"), errMsg); + if( dbfile.IsEmpty() ){ + errMsg = wxT("Missing 'Database' value in workspace '"); + return false; + } + + // the database file names are relative to the workspace, + // convert them to absolute path + wxFileName fn(dbfile); + + TagsManager *mgr = TagsManagerST::Get(); + mgr->OpenDatabase(m_fileName.GetPath() + wxFileName::GetPathSeparator() + fn.GetFullName()); + return true; +} + +BuildMatrixPtr Workspace::GetBuildMatrix() const { + return new BuildMatrix( XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("BuildMatrix")) ); +} + +void Workspace::SetBuildMatrix(BuildMatrixPtr mapping){ + wxXmlNode *parent = m_doc.GetRoot(); + wxXmlNode *oldMapping = XmlUtils::FindFirstByTagName(parent, wxT("BuildMatrix")); + if(oldMapping){ + parent->RemoveChild(oldMapping); + delete oldMapping; + } + parent->AddChild(mapping->ToXml()); + m_doc.Save(m_fileName.GetFullPath()); +} + +bool Workspace::CreateWorkspace(const wxString &name, const wxString &path, wxString &errMsg) +{ + // If we have an open workspace, close it + if( m_doc.IsOk() ){ + if ( !m_doc.Save(m_fileName.GetFullPath()) ){ + errMsg = wxT("Failed to save current workspace"); + return false; + } + } + + if( name.IsEmpty() ){ + errMsg = wxT("Invalid workspace name"); + return false; + } + + // Create new + // Open workspace database + m_fileName = wxFileName(path, name + wxT(".workspace")); + + // This function sets the working directory to the workspace directory! + ::wxSetWorkingDirectory(m_fileName.GetPath()); + + wxFileName dbFileName(wxT("./") + name + wxT(".tags")); + TagsManagerST::Get()->OpenDatabase(dbFileName); + + wxXmlNode *root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("CodeLite_Workspace")); + m_doc.SetRoot(root); + m_doc.GetRoot()->AddProperty(wxT("Name"), name); + m_doc.GetRoot()->AddProperty(wxT("Database"), dbFileName.GetFullPath()); + + m_doc.Save(m_fileName.GetFullPath()); + //create an empty build matrix + SetBuildMatrix(new BuildMatrix(NULL)); + return true; +} + +wxString Workspace::GetStringProperty(const wxString &propName, wxString &errMsg) +{ + if( !m_doc.IsOk() ){ + errMsg = wxT("No workspace open"); + return wxEmptyString; + } + + wxXmlNode *rootNode = m_doc.GetRoot(); + if( !rootNode ){ + errMsg = wxT("Corrupted workspace file"); + return wxEmptyString; + } + + return rootNode->GetPropVal(propName, wxEmptyString); +} + +void Workspace::AddProjectToBuildMatrix(ProjectPtr prj) +{ + if(!prj){ + wxMessageBox(wxT("AddProjectToBuildMatrix was called with NULL project"), wxT("CodeLite"), wxICON_WARNING|wxOK); + return; + } + + BuildMatrixPtr matrix = GetBuildMatrix(); + std::list wspList = matrix->GetConfigurations(); + std::list::iterator iter = wspList.begin(); + for(; iter != wspList.end(); iter++){ + WorkspaceConfiguration::ConfigMappingList prjList = (*iter)->GetMapping(); + + ProjectSettingsCookie cookie; + BuildConfigPtr prjBldConf = prj->GetSettings()->GetFirstBuildConfiguration(cookie); + if( !prjBldConf ){ + // the project does not have any settings, create new one and add it + prj->SetSettings(new ProjectSettings(NULL)); + prjBldConf = prj->GetSettings()->GetFirstBuildConfiguration(cookie); + } + ConfigMappingEntry entry(prj->GetName(), prjBldConf->GetName()); + prjList.push_back(entry); + (*iter)->SetConfigMappingList(prjList); + matrix->SetConfiguration((*iter)); + } + SetBuildMatrix(matrix); +} + +void Workspace::RemoveProjectFromBuildMatrix(ProjectPtr prj) +{ + BuildMatrixPtr matrix = GetBuildMatrix(); + std::list wspList = matrix->GetConfigurations(); + std::list::iterator iter = wspList.begin(); + for(; iter != wspList.end(); iter++){ + WorkspaceConfiguration::ConfigMappingList prjList = (*iter)->GetMapping(); + + WorkspaceConfiguration::ConfigMappingList::iterator it = prjList.begin(); + for(; it != prjList.end(); it++){ + if((*it).m_project == prj->GetName()){ + prjList.erase(it); + break; + } + } + + (*iter)->SetConfigMappingList(prjList); + matrix->SetConfiguration((*iter)); + } + SetBuildMatrix(matrix); +} + +bool Workspace::CreateProject(const wxString &name, const wxString &path, const wxString &type, wxString &errMsg) +{ + if( !m_doc.IsOk() ){ + errMsg = wxT("No workspace open"); + return false; + } + + ProjectPtr proj(new Project()); + proj->Create(name, path, type); + m_projects[name] = proj; + + // make the project path to be relative to the workspace + wxFileName tmp(path + wxFileName::GetPathSeparator() + name + wxT(".project")); + tmp.MakeRelativeTo(m_fileName.GetPath()); + + // Add an entry to the workspace file + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Project")); + node->AddProperty(wxT("Name"), name); + node->AddProperty(wxT("Path"), tmp.GetFullPath()); + + m_doc.GetRoot()->AddChild(node); + + if( m_projects.size() == 1 ){ + SetActiveProject(name, true); + } + + m_doc.Save(m_fileName.GetFullPath()); + AddProjectToBuildMatrix(proj); + return true; +} + +ProjectPtr Workspace::FindProjectByName(const wxString &projName, wxString &errMsg) const +{ + if( !m_doc.IsOk() ){ + errMsg = wxT("No workspace open"); + return NULL; + } + + std::map::const_iterator iter = m_projects.find(projName); + if( iter == m_projects.end() ){ + errMsg = wxT("Invalid project name '"); + errMsg << projName << wxT("'"); + return NULL; + } + return iter->second; +} + +void Workspace::GetProjectList(wxArrayString &list) +{ + std::map::iterator iter = m_projects.begin(); + for(; iter != m_projects.end(); iter++){ + wxString name; + name = iter->first; + list.Add(name); + } +} + +bool Workspace::AddProject(const wxString & path, wxString &errMsg) +{ + if( !m_doc.IsOk() ){ + errMsg = wxT("No workspace open"); + return false; + } + + wxFileName fn(path); + if( !fn.FileExists() ){ + errMsg = wxT("File does not exist"); + return false; + } + + // Try first to find this project in the workspace + ProjectPtr proj = FindProjectByName(fn.GetName(), errMsg); + if( !proj ){ + errMsg.Empty(); + bool res = DoAddProject(path, errMsg); + if( !res ){ + return false; + } + + // Add an entry to the workspace filewxFileName tmp(path); + fn.MakeRelativeTo(m_fileName.GetPath()); + + wxXmlNode *node = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("Project")); + node->AddProperty(wxT("Name"), fn.GetName()); + node->AddProperty(wxT("Path"), fn.GetFullPath()); + node->AddProperty(wxT("Active"), m_projects.size() == 1 ? wxT("Yes") : wxT("No")); + m_doc.GetRoot()->AddChild(node); + if(!m_doc.Save(m_fileName.GetFullPath())){ + wxMessageBox(wxT("Failed to save workspace file to disk. Please check that you have permission to write to disk"), + wxT("CodeLite"), wxICON_ERROR | wxOK); + return false; + } + + AddProjectToBuildMatrix(FindProjectByName(fn.GetName(), errMsg)); + return true; + } + + errMsg = wxT("A project with this name already exist in the workspace"); + return false; +} + + +bool Workspace::DoAddProject(const wxString &path, wxString &errMsg) +{ + // Add the project + ProjectPtr proj(new Project()); + if( !proj->Load(path) ){ + errMsg = wxT("Corrupted project file '"); + errMsg << path << wxT("'"); + return false; + } + // Add an entry to the projects map + m_projects[proj->GetName()] = proj; + return true; +} + +bool Workspace::RemoveProject(const wxString &name, wxString &errMsg) +{ + ProjectPtr proj = FindProjectByName(name, errMsg); + if( !proj ){ + return false; + } + + //remove the associated build configuration with this + //project + RemoveProjectFromBuildMatrix(proj); + + // remove the project from the internal map + std::map::iterator iter = m_projects.find(proj->GetName()); + if( iter != m_projects.end() ){ + m_projects.erase(iter); + } + + // update the xml file + wxXmlNode *root = m_doc.GetRoot(); + wxXmlNode *child = root->GetChildren(); + while( child ){ + if( child->GetName() == wxT("Project") && child->GetPropVal(wxT("Name"), wxEmptyString) == name ){ + if( child->GetPropVal(wxT("Active"), wxEmptyString).CmpNoCase(wxT("Yes")) == 0){ + // the removed project was active, + // select new project to be active + if( !m_projects.empty() ){ + std::map::iterator iter = m_projects.begin(); + SetActiveProject(iter->first, true); + } + } + root->RemoveChild( child ); + delete child; + break; + } + child = child->GetNext(); + } + + //go over the dependencies list of each project and remove the project + iter = m_projects.begin(); + for(; iter != m_projects.end(); iter++){ + ProjectPtr p = iter->second; + if(p){ + wxArrayString deps = p->GetDependencies(); + int where = deps.Index(name); + if(where != wxNOT_FOUND){ + deps.RemoveAt((size_t)where); + } + p->SetDependencies(deps); + } + } + return m_doc.Save( m_fileName.GetFullPath() ); +} + +wxString Workspace::GetActiveProjectName() +{ + if( !m_doc.IsOk() ){ + return wxEmptyString; + } + + wxXmlNode *root = m_doc.GetRoot(); + wxXmlNode *child = root->GetChildren(); + while( child ){ + if( child->GetName() == wxT("Project") && child->GetPropVal(wxT("Active"), wxEmptyString).CmpNoCase(wxT("Yes")) == 0){ + return child->GetPropVal(wxT("Name"), wxEmptyString); + } + child = child->GetNext(); + } + return wxEmptyString; +} + +void Workspace::SetActiveProject(const wxString &name, bool active) +{ + if( !m_doc.IsOk() ) + return; + + // update the xml file + wxXmlNode *root = m_doc.GetRoot(); + wxXmlNode *child = root->GetChildren(); + while( child ){ + if( child->GetName() == wxT("Project") && child->GetPropVal(wxT("Name"), wxEmptyString) == name ){ + XmlUtils::UpdateProperty(child, wxT("Active"), active ? wxT("Yes") : wxT("No")); + break; + } + child = child->GetNext(); + } + m_doc.Save( m_fileName.GetFullPath() ); +} + +bool Workspace::CreateVirtualDirectory(const wxString &vdFullPath, wxString &errMsg) +{ + wxStringTokenizer tkz(vdFullPath, wxT(":")); + wxString projName = tkz.GetNextToken(); + + wxString fixedPath; + // Construct new path excluding the first token + size_t count = tkz.CountTokens(); + + for(size_t i=0; iCreateVirtualDir(fixedPath); +} + +bool Workspace::RemoveVirtualDirectory(const wxString &vdFullPath, wxString &errMsg) +{ + wxStringTokenizer tkz(vdFullPath, wxT(":")); + wxString projName = tkz.GetNextToken(); + + wxString fixedPath; + // Construct new path excluding the first token + size_t count = tkz.CountTokens(); + + for(size_t i=0; iDeleteVirtualDir(fixedPath); +} + +void Workspace::Save() +{ + if( m_doc.IsOk() ){ + std::map::iterator iter = m_projects.begin(); + for(; iter != m_projects.end(); iter ++){ + iter->second->Save(); + } + m_doc.Save(m_fileName.GetFullPath()); + } +} + +bool Workspace::AddNewFile(const wxString &vdFullPath, const wxString &fileName, wxString &errMsg) +{ + wxStringTokenizer tkz(vdFullPath, wxT(":")); + wxString projName = tkz.GetNextToken(); + wxString fixedPath; + // Construct new path excluding the first token + size_t count = tkz.CountTokens(); + + for(size_t i=0; iAddFile(fileName, fixedPath); +} + +bool Workspace::RemoveFile(const wxString &vdFullPath, const wxString &fileName, wxString &errMsg) +{ + wxStringTokenizer tkz(vdFullPath, wxT(":")); + wxString projName = tkz.GetNextToken(); + wxString fixedPath; + + // Construct new path excluding the first token + size_t count = tkz.CountTokens(); + + for(size_t i=0; iRemoveFile(fileName, fixedPath); +} + + +EnvironmentVarieblesPtr Workspace::GetEnvironmentVariables() const +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Environment")); + return new EnvironmentVariebles(node); +} + +void Workspace::SetEnvironmentVariables(EnvironmentVarieblesPtr env) +{ + wxXmlNode *node = XmlUtils::FindFirstByTagName(m_doc.GetRoot(), wxT("Environment")); + if(node){ + m_doc.GetRoot()->RemoveChild(node); + delete node; + } + m_doc.GetRoot()->AddChild(env->ToXml()); + m_doc.Save(m_fileName.GetFullPath()); +} + +BuildConfigPtr Workspace::GetProjSelBuildConf(const wxString &projectName) const +{ + BuildMatrixPtr matrix = GetBuildMatrix(); + wxString workspaceConfig = matrix->GetSelectedConfigurationName(); + wxString projConf = matrix->GetProjectSelectedConf(workspaceConfig, projectName); + + //Get the project setting and retrieve the selected configuration + wxString errMsg; + ProjectPtr proj = FindProjectByName(projectName, errMsg); + if( proj ){ + ProjectSettingsPtr settings = proj->GetSettings(); + if(settings){ + return settings->GetBuildConfiguration(projConf); + } + } + return NULL; +} diff --git a/Plugin/workspace.h b/Plugin/workspace.h new file mode 100644 index 0000000000..d23aaad916 --- /dev/null +++ b/Plugin/workspace.h @@ -0,0 +1,247 @@ +#ifndef WORKSPACE_H +#define WORKSPACE_H + +#include "singleton.h" +#include "wx/string.h" +#include +#include "wx/filename.h" +#include "project.h" +#include +//#include "ctags_manager.h" +#include "configuration_mapping.h" +#include "envvar.h" + + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/*! + * \brief + * Workspace manager class + * + */ +class WXDLLIMPEXP_LE_SDK Workspace +{ + friend class Singleton; + wxXmlDocument m_doc; + wxFileName m_fileName; + std::map m_projects; + +private: + + /// Constructor + Workspace(); + + /// Destructor + virtual ~Workspace(); + +public: + /** + * Returns the workspace file name + */ + const wxFileName& GetWorkspaceFileName() const { return m_fileName; } + + /** + * \brief + * Create a new workspace + * + * \param name + * workspace name + * + * \param path + * workspace path + * + * \returns + * true on success false otherwise + */ + bool CreateWorkspace(const wxString &name, const wxString &path, wxString &errMsg); + + /** + * \brief + * Open an existing workspace + * + * \param fileName + * Workspace file name (including extesion) + * + * \returns + * true on success false otherwise + */ + bool OpenWorkspace(const wxString &fileName, wxString &errMsg); + + /** + * Close the currently opened workspace + */ + void CloseWorkspace(); + + /** + * \brief + * Create a new project with given name, path and type + * + * \param name + * project name + * + * \param path + * project path + * + * \param type + * Can be Project::EXECUTABLE, Project::STATIC_LIBRARY or Project::DYNAMIC_LIBRARY + * \returns + * true on success false otherwise + */ + bool CreateProject(const wxString &name, const wxString &path, const wxString &type, wxString &errMsg); + + /** + * \brief get a string property from the worksapce file + * \returns property value or wxEmptyString + */ + wxString GetStringProperty(const wxString &propName, wxString &errMsg); + + /** + * Find a project by name + * \param projName project name + * \param errMsg [output] incase an error, report the error to the caller + * \returns ProjectPtr or NULL if no match was found + */ + ProjectPtr FindProjectByName(const wxString &projName, wxString &errMsg) const; + + /** + * Return all project names under this workspace + */ + void GetProjectList(wxArrayString &list); + + /** + * Add an existing project to the workspace. If no workspace is open, + * this function does nothing + * \param path project file path name to add + * \param errMsg [output] incase an error, report the error to the caller + */ + bool AddProject(const wxString & path, wxString &errMsg); + + /** + * Remove project from the workspace. This function does not delete + * any file related to the project but simply removes it from the workspace + * \param name project name to remove + * \param errMsg [output] incase an error, report the error to the caller + * \return true on success false otherwise + */ + bool RemoveProject(const wxString &name, wxString &errMsg); + + /** + * \return The active project name or wxEmptyString + */ + wxString GetActiveProjectName(); + + /** + * Set project as active + * \param name project name + * \param active state + */ + void SetActiveProject(const wxString &name, bool active); + + /** + * Add new virtual directoy to workspace + * \param vdFullPath virtual directory full path + * \param errMsg [output] incase an error, report the error to the caller + * \return true on success false otherwise + */ + bool CreateVirtualDirectory(const wxString &vdFullPath, wxString &errMsg); + + /** + * Remove virtual directoy to workspace + * \param vdFullPath virtual directory full path + * \param errMsg [output] incase an error, report the error to the caller + * \return true on success false otherwise + */ + bool RemoveVirtualDirectory(const wxString &vdFullPath, wxString &errMsg); + + /** + * Add new file to project. The project name is taken from the virtual directory full path + * \param vdFullPath vritual directory full path including project + * \param fileName file name to add + * \param errMsg output + * \return true on success, false otherwise + */ + bool AddNewFile(const wxString &vdFullPath, const wxString &fileName, wxString &errMsg); + + /** + * Remove file from a project. The project name is taken from the virtual directory full path + * \param vdFullPath vritual directory full path including project + * \param fileName file name to remove + * \param errMsg output + * \return true on success, false otherwise + */ + bool RemoveFile(const wxString &vdFullPath, const wxString &fileName, wxString &errMsg); + + /** + * Save workspace & projects settings + */ + void Save(); + + /** + * Return the configuration mapping for the workspace. 'Configuration Mapping' is + * the build matrix that should be used for this workspace, it contains all possible + * configurations and which project specific configuration should be built in that + * configuration + */ + BuildMatrixPtr GetBuildMatrix() const; + + /** + * Store configuration mapping for the workspace, overriding the current one + * \param mapping new mapping to store + */ + void SetBuildMatrix(BuildMatrixPtr mapping); + + /** + * Set environment variables for the workspace. The new environment will override + * the current. To perform update, do the following: + * \code + * EnvironmentVarieblesPtr env = WorkspaceST::Get()->GetEnvironmentVariables(); + * //update the environment + * env->SetEnv(wxT("HOME"), wxT("/home/user/eran")); + * //update + * WorkspaceST::Get()->SetEnvironmentVariables(env); + * \endcode + * \param env + */ + void SetEnvironmentVariables(EnvironmentVarieblesPtr env); + + /** + * get the environment of the workspace + * \return + */ + EnvironmentVarieblesPtr GetEnvironmentVariables() const; + + /** + * Return the workspace name + */ + wxString GetName() const; + + + /** + * return the project build configuration that matches the + * workspace selected configuration from the build matrix + */ + BuildConfigPtr GetProjSelBuildConf(const wxString &projectName) const; + + wxString ExpandVariables(const wxString &expression) const; + +private: + /** + * Do the actual add project + * \param path project file path + * \param errMsg [output] incase an error, report the error to the caller + */ + bool DoAddProject(const wxString &path, wxString &errMsg); + + void AddProjectToBuildMatrix(ProjectPtr prj); + void RemoveProjectFromBuildMatrix(ProjectPtr prj); +}; + +typedef Singleton WorkspaceST; + +#endif // WORKSPACE_H diff --git a/Plugin/xmlutils.cpp b/Plugin/xmlutils.cpp new file mode 100644 index 0000000000..11277296b1 --- /dev/null +++ b/Plugin/xmlutils.cpp @@ -0,0 +1,140 @@ +#include "xmlutils.h" + +wxXmlNode *XmlUtils::FindNodeByName(const wxXmlNode *parent, const wxString &tagName, const wxString &name) +{ + if(!parent){ + return NULL; + } + + wxXmlNode *child = parent->GetChildren(); + while( child ){ + if( child->GetName() == tagName){ + if( child->GetPropVal(wxT("Name"), wxEmptyString) == name){ + return child; + } + } + child = child->GetNext(); + } + return NULL; +} + +wxXmlNode *XmlUtils::FindFirstByTagName(const wxXmlNode *parent, const wxString &tagName) +{ + if( !parent ){ + return NULL; + } + + wxXmlNode *child = parent->GetChildren(); + while( child ){ + if( child->GetName() == tagName){ + return child; + } + child = child->GetNext(); + } + return NULL; +} + +wxXmlNode *XmlUtils::FindLastByTagName(const wxXmlNode *parent, const wxString &tagName) +{ + wxXmlNode *last_node = NULL; + wxXmlNode *child = parent->GetChildren(); + while( child ){ + if( child->GetName() == tagName){ + last_node = child; + } + child = child->GetNext(); + } + return last_node; +} + +void XmlUtils::UpdateProperty(wxXmlNode *node, const wxString &name, const wxString &value) +{ + wxXmlProperty *prop = node->GetProperties(); + while (prop){ + if( prop->GetName() == name ){ + prop->SetValue(value); + return; + } + prop = prop->GetNext(); + } + + // No such property, create new one and add it + node->AddProperty(name, value); +} + +wxString XmlUtils::ReadString(wxXmlNode *node, const wxString &propName, const wxString &defaultValue) +{ + return node->GetPropVal(propName, defaultValue); +} + +long XmlUtils::ReadLong(wxXmlNode *node, const wxString &propName, long defaultValue) +{ + wxString val = node->GetPropVal(propName, wxEmptyString); + if( val.IsEmpty() ){ + return defaultValue; + } + + if(val.StartsWith(wxT("\""))){ + val = val.AfterFirst(wxT('"')); + } + if(val.EndsWith(wxT("\""))){ + val = val.BeforeLast(wxT('"')); + } + long retVal = defaultValue; + val.ToLong(&retVal); + return retVal; +} + +bool XmlUtils::ReadBool(wxXmlNode *node, const wxString &propName, bool defaultValue) +{ + wxString val = node->GetPropVal(propName, wxEmptyString); + if( val.IsEmpty() ){ + return defaultValue; + } + + if(val.IsEmpty()){ + return defaultValue; + } + + bool retVal = defaultValue; + if(val.CmpNoCase(wxT("yes")) == 0){ + retVal = true; + } else { + retVal = false; + } + return retVal; +} + +void XmlUtils::SetNodeContent(wxXmlNode *node, const wxString &text) +{ + wxXmlNode *n = node->GetChildren(); + wxXmlNode *contentNode = NULL; + while (n) + { + if (n->GetType() == wxXML_TEXT_NODE || n->GetType() == wxXML_CDATA_SECTION_NODE){ + contentNode = n; + break; + } + n = n->GetNext(); + } + + if(contentNode) { + // remove old node + node->RemoveChild(contentNode); + delete contentNode; + } + + contentNode = new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, text); + node->AddChild( contentNode ); +} + +void XmlUtils::RemoveChildren(wxXmlNode *node) +{ + wxXmlNode *child = node->GetChildren(); + while(child){ + wxXmlNode *nextChild = child->GetNext(); + node->RemoveChild(child); + delete child; + child = nextChild; + } +} diff --git a/Plugin/xmlutils.h b/Plugin/xmlutils.h new file mode 100644 index 0000000000..31326b9426 --- /dev/null +++ b/Plugin/xmlutils.h @@ -0,0 +1,82 @@ +#ifndef XMLUTILS_H +#define XMLUTILS_H + +#include "wx/xml/xml.h" + +#ifdef WXMAKINGDLL_LE_SDK +# define WXDLLIMPEXP_LE_SDK WXEXPORT +#elif defined(WXUSINGDLL_LE_SDK) +# define WXDLLIMPEXP_LE_SDK WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_LE_SDK +#endif // WXMAKINGDLL_LE_SDK + +/// A collection of XML utils +class WXDLLIMPEXP_LE_SDK XmlUtils { +public: + /// Find a child node by name by iterating the parent children. NULL if no childs exist + /// \param parent the parent node whom to be searched + /// \param tagName the element tag name + /// \param name the element 'Name' property value to search + static wxXmlNode *FindNodeByName(const wxXmlNode *parent, const wxString &tagName, const wxString &name); + + /// Find the last child node of parent with a given name. NULL if no childs exist + /// \param parent the parent node whom to be searched + /// \param name the element's tag name + static wxXmlNode *FindLastByTagName(const wxXmlNode *parent, const wxString &tagName); + + + /** + * update node property. If multiple properties with the same name exist, this function updates + * the first occurance + * \param node + * \param name property name + * \param value new value to set + */ + static void UpdateProperty(wxXmlNode *node, const wxString &name, const wxString &value); + + /** + * Find the first child node of parent with a given name. NULL if no childs exist + * \param the parent node whom to be searched + * \param the element's tag name + */ + static wxXmlNode *FindFirstByTagName(const wxXmlNode *parent, const wxString &tagName); + + + /** + * Set the content of node. This function replaces any existing content of node + * \param node + * \param text content + */ + static void SetNodeContent(wxXmlNode *node, const wxString &text); + + /** + * Read string property from the given node + * \param propName the property name + * \param defaultValue default value to return if no property exist + */ + static wxString ReadString(wxXmlNode *node, const wxString &propName, const wxString &defaultValue = wxEmptyString); + + /** + * Read long property from the given node + * \param propName the property name + * \param defaultValue default value to return if no property exist + */ + static long ReadLong(wxXmlNode *node, const wxString &propName, long defaultValue = -1); + + /** + * Read a boolean property from the given node + * \param propName the property name + * \param defaultValue default value to return if no property exist + */ + static bool ReadBool(wxXmlNode *node, const wxString &propName, bool defaultValue = false); + + /** + * Remove all children of xml node + * \param node xml node + */ + static void RemoveChildren(wxXmlNode *node); + +}; + +#endif // XMLUTILS_H diff --git a/Runtime/Info.plist b/Runtime/Info.plist new file mode 100644 index 0000000000..165e18b79e --- /dev/null +++ b/Runtime/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + CodeLiteUR + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + CodeLite + CFBundleIconFile + icon.icns + CFBundlePackageType + APPL + CFBundleVersion + ?? + CFBundleShortVersionString + ?? + CSResourcesFileMapped + + + diff --git a/Runtime/astyle.sample b/Runtime/astyle.sample new file mode 100644 index 0000000000..4b9abe8a80 --- /dev/null +++ b/Runtime/astyle.sample @@ -0,0 +1,26 @@ +namespace foospace +{ +int Foo() +{ + if (isBar) { + bar(); + return 1; + } else + return 0; +} + +class Foo +{ +public: + Foo() { + switch (foo) { + case 1: + break; + case 2: { + break; + } + } + }; + virtual ~Foo(); +}; +} diff --git a/Runtime/bin/ctags-le.exe b/Runtime/bin/ctags-le.exe new file mode 100644 index 0000000000000000000000000000000000000000..e33f4e71920957c17b9561db13a2ba8a9cf3147c GIT binary patch literal 163840 zcmeFae|TI~wKsk;nY7b%(n)DT3oQ_!K%oHw6zs2H8XAe%;7lX}TA)agAr!1IQ_7D( zVG`(c2o!HoRM5tva+NDwMC?_>QVS_sy|q*+ST$hOJxs1fj1n}O@8`4DK4;EMQsD8u z@ArBCAbHN5bN0`**Is+Awbx#IpO%kobV?n^3E~BmQIEm`*CBhQOpd0oxwYd>+twU=I9bJ?ZWT=R)U&BrdUxi)!C&6U^GEdAhzYOemo z%F9oxs3@Opi+=pCO}GB_GjnU*>$hKQtbHBtfByWM+P}#C1GR6+eYSm1)V_)LV7h6feMY;JX&Q-|C;Ax_&a{m5mSE24WZFhD zO`&vS5FweiP&yVyv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!@JBlx z4Tw@EfYd!ck_^|pagMY+_Rj-}+_xP~r{u%tw`fwlN z=kUMi!x{&N@gKqIewD!Yx8w(m*M~lL+=X+ljFIa8l{~R~OZ+`0N&on>gw=gh>5oBZ zU>N7`{PO*h^hM|c&pQeq$wq6}IC^f0ZBB3f66BRZIxlDwLGP$8JMr^n=(q02x#t$A zFybb982@G;7M?Tsi#UBtFp;<1G?rbs(3KwUG9yjpJ}y7s2=yU(RAd&qW5~%IeXsob z97yJUR)(JgVm)xOrln$rS2NLE2T_FTpQF1^FKIFI`N6vzr0j zfpx}^x0eg*8|*w-*4^AX_^Uri?p5>mDylvKuaiH@y}~$!#mBqx_xP~n^~3lFd{}rN z!N1doCDZoc-{-^XhiCCW=fk4+7x5qVVbS+7{3mdm9mW#81RRirxf9&XU~7}1#NRjR)5AyR>N}v!9D))vf^uS~ zg3319VQ)kyc3e5yVQ<0LZpSM&1BKHJP;#RPlziCj;Xa_`#4|w2k!OAUb3i>W`S*uC zJmTR||NaC}a_5wXZvfv$_$*NQp7-$=J-qB;{S)rH1`j8DIMu`0!g& zGyW`Y@!A#3r2h}He}MW0dyzhgn9FePd^matmu)dQ<^EG&)A_>u(v(F`DQ~iC#hiY} Z1XGOmk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/config/debuggers.xml b/Runtime/config/debuggers.xml new file mode 100644 index 0000000000..23cd2403d3 --- /dev/null +++ b/Runtime/config/debuggers.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/config/liteeditor.xml b/Runtime/config/liteeditor.xml new file mode 100644 index 0000000000..587ad2508f --- /dev/null +++ b/Runtime/config/liteeditor.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/config/liteeditor.xml.sample b/Runtime/config/liteeditor.xml.sample new file mode 100644 index 0000000000..1e49c30b3a --- /dev/null +++ b/Runtime/config/liteeditor.xml.sample @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/ctags-pre-processor.txt b/Runtime/ctags-pre-processor.txt new file mode 100644 index 0000000000..c0f75b487e --- /dev/null +++ b/Runtime/ctags-pre-processor.txt @@ -0,0 +1,12 @@ +_GLIBCXX_STD=std +WXDLLIMPEXP_CORE +WXDLLIMPEXP_BASE +WXMAKINGDLL +WXUSINGDLL +_CRTIMP +__CRT_INLINE +__cdecl +__stdcall +WXDLLEXPORT +WXDLLIMPORT + diff --git a/Runtime/icon.icns b/Runtime/icon.icns new file mode 100644 index 0000000000000000000000000000000000000000..c4f0017d5f69111df21f7afb8dbae754d48f7396 GIT binary patch literal 51121 zcmc$`bzD{3^FO?S!)dw{RFG~FDG9M#0hR9V4iSTW4&B|2f?{_oCf2pPyRUKW=6SD! z-uit%-_P%PJ%2pM>-C(y_MZ35tXZ?xnwhmDgX5AZ>d1!3;AAa|qNY-m%``h97qlXU7u*Q{wo_7MBp06{94wDOMk@Qfx{ri()?P|JF^3iP4m#t$~UxMbZ77 zZ~aY161hpCbAoBg;mxP-Kh|~{xP+$Vjb`&G>f-IkZrM44 zL$pk6DK37utlV;-u1ZE)T49JdmqSy`x{{{4(m`BWN}R!#$)hAxI8vN)3cL%-Y8r~^ zq-kKSsi|vi_ZS;1d=)HQyfELD4F`;R|1t?I(pFYiBozO$~o4PT!; zeEjIline-uy>ju&<=)PQ3NWvGrSHhmb&XYJLTZSVBHwW1=JlQRxkf5H4n?WRnOZwb zJ7mtA=wLR6ri>MM94^ITYM7069x5(DQBr&!lVWj|RMoX93H;`B*b?Yqp0u0{B~DXP z3^s>BF(j>kd##tmt=@xWaUxf3KX+~O16oOCWD9!w|{?r8QQPw{~v#U z{m1jaeu)14K~ews-T(jnH3 z`v2yyOn?7A$Nv6rnf?7g@bCZ4-*4);pY^@}6ZJatHASfdkVXH=&i{}2k-;%=s*L~9 zsrLV;&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y+5w~ap{G1{k4mSvJ>rt0ehX_=uc|UQIRDNyv9b3*1VMFti%0Bq^6qH|hHZ*bnx>!`v!DUeT-+uOvXY74juy9l>7Kr-RCWG5YR-ynOQ-*{;xXqv#k@Uo)vf3DU;pR* KKP6D11pW^WmxKlY literal 0 HcmV?d00001 diff --git a/Runtime/images/help_earth.png b/Runtime/images/help_earth.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ab94a7121f27ffd92b9ca023a0f0089c5b7292 GIT binary patch literal 861 zcmV-j1ETziP)WdKHUATcr^L}hv)GB7YRATlvJG%`9cG9W83F)%QmgE8*_000McNliru z(+Cq33;>-tGcf=F010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00Om1 zL_t(|+ND!lNRwe0e*T?v(@nQ55u_xe$h=s22%`v^NJgXyl7bgS7u}^KqG@0kMqyZx z5OigjkfDt-5-CzKg*2TyXDywF={DWk;XiHe^fw2M5UdN|_v+(&pNHpr-tPf+S;S5k z-9|3UW@GBUTYVZkLnQ`i#wup%cOJi>`TgCK=6@0lQe0*KLhbWamrNv;_rqwqg(-6m zD3ZZ(#^siVWtRt9vIe(i`P;#-esH-Xwt6i?m_GwlSBmVHCyw7 zzro9kON9ojKJN(Si8tO$y<}_+_S0UhY zc%<$|R<8=VDQ9tJ(*pyk0X#R6cCZ@8sh0jNY}7;nPnbPPe+Hir;re(UI)ddnz9U&CCf1d)(y*erYIj4#tB!1?8fj#6n#{K3i{#n(@+yRm|bzxMgzao zV2MA0uO%P;m>*TZdYM+aB~^1;afNv6dWoKbDG-rAdgzS`#d|B@9;P`V=e*|pRPlPp zEVMmsYf{Fm8hvRVVk|fs*+LkZK{Z@oNKXHA=1EsqSJi*R)NrSvh-JLDMM6=w&+8*L n9P1OTkA1AwYP)xv+8ygRSh+j;QUK|@00000NkvXXu0mjf12Jqz literal 0 HcmV?d00001 diff --git a/Runtime/images/splashscreen.png b/Runtime/images/splashscreen.png new file mode 100644 index 0000000000000000000000000000000000000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lxMVf*%IX5BMwaJ22D^{zNW@_X$I&>wKhcDq2 z9yc+(Qumd@mth-gJ1HHB$nLT${KKvhnMiHb(pu?@TN>SL?|y91%weLP>3cOG6rW;M zaA|}RMZ>g&gD?h|L0HonQ35dlnrAgh%DA{;fvMBCzF{`uhS&wwFz;5xt|kZ^ws;&g zYCm6jxBvhF07*naR4hr6^OH=VyVHQN?07X#MaA#&IzE(13RnwrrV1<`QUOo&Lv*rrSw8MJ96kyrT{KlIA0hJt!C?!>jzU`Tg zBhuaNLO@mhvSMA-(Xs3jEeUrGU`A_{CSCkE@+yal7=D&K;n7rQHi25Rsq(+oanav&`w~Wk wzCQT+;Om30|DwhS9smFU2uVaiRL{QtPs_t*Ec<0@%m4rY07*qoM6N<$f>4!0DgXcg literal 0 HcmV?d00001 diff --git a/Runtime/index.html b/Runtime/index.html new file mode 100644 index 0000000000..d80184068c --- /dev/null +++ b/Runtime/index.html @@ -0,0 +1,57 @@ + + + + + + + + + +
+ + + + + + + + + + + + +
+
+ + Common tasks + +
+ + + + + +
+ Open CodeLite Online Help +
+ Create New Workspace +
+ Open Workspace +
+ Import Microsoft Visual Studio Solution File +
+
+ + Recently opened workspaces: + +
+ $(WorkspaceTable) +
+ + Recently opened files: + +
+ $(FilesTable) +
+ + diff --git a/Runtime/le_dos2unix.sh b/Runtime/le_dos2unix.sh new file mode 100644 index 0000000000..8f32a8d760 --- /dev/null +++ b/Runtime/le_dos2unix.sh @@ -0,0 +1,28 @@ +files=`find . -name "*.project"` +wsp_files=`find . -name "*.workspace"` + +## +## fix workspace +## +for file in $wsp_files +do + echo fixing file $file ... + ## replace any windows \ with unix / + \rm -f $file.tmp + sed 's/\\/\//g' $file > $file.tmp + mv $file.tmp $file +done + +## +## fix project files +## +for file in $files +do + echo fixing file $file ... + ## replace any windows \ with unix / + \rm -f $file.tmp + sed 's/\\/\//g' $file > $file.tmp + mv $file.tmp $file +done +echo done + diff --git a/Runtime/le_killproc.sh b/Runtime/le_killproc.sh new file mode 100755 index 0000000000..02405ce0a2 --- /dev/null +++ b/Runtime/le_killproc.sh @@ -0,0 +1,7 @@ +procs=`ps --ppid $1 | grep -v PID | awk '{print $1;}'` +for p in $procs +do + kill -9 $p +done +kill -9 $1 + diff --git a/Runtime/lexers/lexer_cpp.xml b/Runtime/lexers/lexer_cpp.xml new file mode 100644 index 0000000000..12a0476f50 --- /dev/null +++ b/Runtime/lexers/lexer_cpp.xml @@ -0,0 +1,26 @@ + + + and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new not not_eq operator or or_eq private protected public register reinterpret_cast return short signed Sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq + *.cxx;*.hpp;*.cc;*.h;*.c;*.cpp;*.l;*.y + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_default.xml b/Runtime/lexers/lexer_default.xml new file mode 100644 index 0000000000..6e1484fdad --- /dev/null +++ b/Runtime/lexers/lexer_default.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Runtime/lexers/lexer_diff.xml b/Runtime/lexers/lexer_diff.xml new file mode 100644 index 0000000000..4d1610a804 --- /dev/null +++ b/Runtime/lexers/lexer_diff.xml @@ -0,0 +1,16 @@ + + + + *.diff;*.patch;Diff;*.Diff + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_java.xml b/Runtime/lexers/lexer_java.xml new file mode 100644 index 0000000000..2b989bca3f --- /dev/null +++ b/Runtime/lexers/lexer_java.xml @@ -0,0 +1,26 @@ + + + abstract assert boolean break byte case catch char class const continue default do double else extends final finally float for future generic goto if implements import inner instanceof int interface long native new null outer package private protected public rest return short static super switch synchronized this throw throws transient try var void volatile while + *.java + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_lua.xml b/Runtime/lexers/lexer_lua.xml new file mode 100644 index 0000000000..df67670fff --- /dev/null +++ b/Runtime/lexers/lexer_lua.xml @@ -0,0 +1,20 @@ + + + if elseif else then end do while nil true false in for and or function local not repeat return until + *.lua;*.h2x; + + + + + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_makefile.xml b/Runtime/lexers/lexer_makefile.xml new file mode 100644 index 0000000000..dbb0c77b10 --- /dev/null +++ b/Runtime/lexers/lexer_makefile.xml @@ -0,0 +1,16 @@ + + + + *.mk;makefile;Makefile;*.mak + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_perl.xml b/Runtime/lexers/lexer_perl.xml new file mode 100644 index 0000000000..59b598dd01 --- /dev/null +++ b/Runtime/lexers/lexer_perl.xml @@ -0,0 +1,41 @@ + + + NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept alarm and atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir cmp connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eq eval exec exists exit exp fcntl fileno flock for foreach fork format formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst le length link listen local localtime lock log lstat lt map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push quotemeta qu rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand system syswrite tell telldir tie tied time times truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn while write xor + *.pl;*.pm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/lexers/lexer_xml.xml b/Runtime/lexers/lexer_xml.xml new file mode 100644 index 0000000000..5f3666b0ee --- /dev/null +++ b/Runtime/lexers/lexer_xml.xml @@ -0,0 +1,36 @@ + + + + *.xml;*xrc;*.project;*.workspace;*.plist + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/make_mac_bundle.sh b/Runtime/make_mac_bundle.sh new file mode 100755 index 0000000000..78a90ef48b --- /dev/null +++ b/Runtime/make_mac_bundle.sh @@ -0,0 +1,29 @@ +rm -rf CodeLite.app +mkdir -p ./CodeLite.app/Contents/MacOS +mkdir -p ./CodeLite.app/Contents/Resources +mkdir -p ./CodeLite.app/Contents/SharedSupport +mkdir -p ./CodeLite.app/Contents/SharedSupport/plugins +mkdir -p ./CodeLite.app/Contents/SharedSupport/debuggers +mkdir -p ./CodeLite.app/Contents/SharedSupport/config + +cp CodeLiteUR ./CodeLite.app/Contents/MacOS/CodeLiteUR +cp -r rc ./CodeLite.app/Contents/SharedSupport/ +cp -r templates ./CodeLite.app/Contents/SharedSupport/ +cp -r images ./CodeLite.app/Contents/SharedSupport/ +cp -r lexers ./CodeLite.app/Contents/SharedSupport/ + +cp astyle.sample ./CodeLite.app/Contents/SharedSupport/ +cp index.html ./CodeLite.app/Contents/SharedSupport/ +cp Info.plist ./CodeLite.app/Contents/ +cp icon.icns ./CodeLite.app/Contents/Resources/ + +cp config/build_settings.xml ./CodeLite.app/Contents/SharedSupport/config +cp config/liteeditor.xml.sample ./CodeLite.app/Contents/SharedSupport/config/liteeditor.xml +cp config/debuggers.xml ./CodeLite.app/Contents/SharedSupport/config + +cp ../lib/CodeFormatter.so ./CodeLite.app/Contents/SharedSupport/plugins/ +cp ../lib/Debugger.so ./CodeLite.app/Contents/SharedSupport/debuggers/ +cp ../lib/Gizmos.so ./CodeLite.app/Contents/SharedSupport/plugins/ +cp ../lib/Subversion.so ./CodeLite.app/Contents/SharedSupport/plugins/ + +cp ../sdk/ctags/ctags-le ./CodeLite.app/Contents/SharedSupport/ \ No newline at end of file diff --git a/Runtime/rc/menu.xrc b/Runtime/rc/menu.xrc new file mode 100644 index 0000000000..5c2d4dd634 --- /dev/null +++ b/Runtime/rc/menu.xrc @@ -0,0 +1,683 @@ + + + + + + + + + Create an empty new file + + + + Open an existing file + + + + + + + + Save the existing file + + + + Save current file as... + + + + Save all open files + + + + + + Close Current File + + + + + Close All Files + + + + + + + + + + + + + + + + + + 1 + + + + + Close LiteEditor + + + + + + + + + + + + + + + + + + + + + + + + + + Duplcate the current line + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + 1 + + + + 1 + + + + 1 + + + + + + + + 1 + + + + + + + + + + + + 1 + + + + + 1 + + + + 1 + + + + 1 + + + + + + + + 1 + + + + 1 + + + + 1 + + + + 1 + + + + 1 + + + + + + + Hide all panes and maximize the editing area + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create New workspace + + + + Switch to an existing workspace + + + + + + + + Import a workspace from a MS Visual Studio solution file + + + + + + Create new Project and add it to the current workspace + + + + Add an existing project to the current workspace + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create new Project and add it to the current workspace + + + + Add an existing project to the current workspace + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + //File explorer + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/app.cpp.wizard b/Runtime/templates/app.cpp.wizard new file mode 100644 index 0000000000..13e57b9f94 --- /dev/null +++ b/Runtime/templates/app.cpp.wizard @@ -0,0 +1,45 @@ +#include "$(AppFile).h" +#include "wx/image.h" +#include "wx/sysopt.h" +#include "wx/xrc/xmlres.h" +#include "$(MainFrameFile).h" + +IMPLEMENT_APP($(AppName)) + +$(AppName)::$(AppName)() +{ +} + +$(AppName)::~$(AppName)() +{ +} + +bool $(AppName)::OnInit() +{ + // Init resources and add the PNG handler + wxSystemOptions::SetOption(_T("msw.remap"), 0); + wxXmlResource::Get()->InitAllHandlers(); + wxImage::AddHandler( new wxPNGHandler ); + wxImage::AddHandler( new wxCURHandler ); + wxImage::AddHandler( new wxICOHandler ); + wxImage::AddHandler( new wxXPMHandler ); + wxImage::AddHandler( new wxGIFHandler ); + + wxFrame* frame = new $(MainFrameName)(NULL, + wxID_ANY, + wxT("$(ProjectName)"), + wxDefaultPosition, + wxSize(800, 600)); + + + + frame->Show(TRUE); + SetTopWindow(frame); + return TRUE; +} + +int $(AppName)::OnExit() +{ + return 0; +} + diff --git a/Runtime/templates/app.h.wizard b/Runtime/templates/app.h.wizard new file mode 100644 index 0000000000..198e4afa1a --- /dev/null +++ b/Runtime/templates/app.h.wizard @@ -0,0 +1,18 @@ +#ifndef __$(AppName)__ +#define __$(AppName)__ + +#include "wx/app.h" + +class $(AppName) : public wxApp { + + +public: + $(AppName)(); + ~$(AppName)(); + +protected: + virtual bool OnInit(); + virtual int OnExit(); +}; +#endif // $(AppName) + diff --git a/Runtime/templates/dynamic-library-wx-enabled.project b/Runtime/templates/dynamic-library-wx-enabled.project new file mode 100644 index 0000000000..8daeb8ccb5 --- /dev/null +++ b/Runtime/templates/dynamic-library-wx-enabled.project @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/dynamic-library.project b/Runtime/templates/dynamic-library.project new file mode 100644 index 0000000000..ff4c1443a4 --- /dev/null +++ b/Runtime/templates/dynamic-library.project @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/executable.project b/Runtime/templates/executable.project new file mode 100644 index 0000000000..6ad167bc0f --- /dev/null +++ b/Runtime/templates/executable.project @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/liteeditor-plugin.project b/Runtime/templates/liteeditor-plugin.project new file mode 100644 index 0000000000..560cf73b6c --- /dev/null +++ b/Runtime/templates/liteeditor-plugin.project @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/liteeditor-plugin.project.wizard b/Runtime/templates/liteeditor-plugin.project.wizard new file mode 100644 index 0000000000..7658f49138 --- /dev/null +++ b/Runtime/templates/liteeditor-plugin.project.wizard @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/main.cpp.wizard b/Runtime/templates/main.cpp.wizard new file mode 100644 index 0000000000..79f97b01ea --- /dev/null +++ b/Runtime/templates/main.cpp.wizard @@ -0,0 +1,13 @@ +#include //wxInitializer +#include //wxString + +int main(int argc, char **argv) +{ + //Initialize the wxWidgets library + wxInitializer initializer; + + //Print the classic hello world + wxString msg(wxT("Hello World")); + wxPrintf(wxT("%s\n"), msg.GetData()); + return 0; +} diff --git a/Runtime/templates/mainframe.cpp.wizard b/Runtime/templates/mainframe.cpp.wizard new file mode 100644 index 0000000000..d1da31ea95 --- /dev/null +++ b/Runtime/templates/mainframe.cpp.wizard @@ -0,0 +1,64 @@ +#include "$(MainFrameFile).h" +#include +#include +#include +#include //wxMenuBar + +BEGIN_EVENT_TABLE($(MainFrameName), wxFrame) + EVT_CLOSE($(MainFrameName)::OnClose) + EVT_MENU(wxID_EXIT, $(MainFrameName)::OnQuit) +END_EVENT_TABLE() + +$(MainFrameName)::$(MainFrameName)(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style) + : wxFrame(parent, id, title, pos, size, style) +{ + Initialize(); +} + +$(MainFrameName)::~$(MainFrameName)() +{ + +} + +void $(MainFrameName)::Initialize() +{ + wxBoxSizer *sz = new wxBoxSizer(wxVERTICAL); + SetSizer(sz); + + //Create a status bar + wxStatusBar* statusBar = new wxStatusBar(this, wxID_ANY); + statusBar->SetFieldsCount(1); + SetStatusBar(statusBar); + GetStatusBar()->SetStatusText(wxT("Ready")); + + //Create a menu bar + CreateMenuBar(); + + sz->Layout(); +} + +void $(MainFrameName)::OnClose(wxCloseEvent &e) +{ + e.Skip(); +} + +void $(MainFrameName)::OnQuit(wxCommandEvent &e) +{ + wxUnusedVar(e); + Close(); +} + +void $(MainFrameName)::CreateMenuBar() +{ + wxMenuBar *mb = new wxMenuBar(); + //File Menu + wxMenu *menu = new wxMenu(); + menu->Append(wxID_EXIT); + mb->Append(menu, wxT("&File")); + SetMenuBar(mb); +} diff --git a/Runtime/templates/mainframe.h.wizard b/Runtime/templates/mainframe.h.wizard new file mode 100644 index 0000000000..eef00701ca --- /dev/null +++ b/Runtime/templates/mainframe.h.wizard @@ -0,0 +1,27 @@ +#ifndef __$(MainFrameName)__ +#define __$(MainFrameName)__ + +#include "wx/frame.h" + +class $(MainFrameName) : public wxFrame { + +private: + void Initialize(); + void CreateMenuBar(); + +public: + $(MainFrameName)(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER); + + ~$(MainFrameName)(); + DECLARE_EVENT_TABLE() + + void OnClose(wxCloseEvent &e); + void OnQuit(wxCommandEvent &e); + +}; +#endif // __$(MainFrameName)__ diff --git a/Runtime/templates/plugin.cpp.wizard b/Runtime/templates/plugin.cpp.wizard new file mode 100644 index 0000000000..0a180a83ea --- /dev/null +++ b/Runtime/templates/plugin.cpp.wizard @@ -0,0 +1,84 @@ +#include "$(BaseFileName).h" +#include + +static $(PluginName)* thePlugin = NULL; + +//Define the plugin entry point +extern "C" EXPORT IPlugin *CreatePlugin(IManager *manager) +{ + if (thePlugin == 0) { + thePlugin = new $(PluginName)(manager); + } + return thePlugin; +} + +$(PluginName)::$(PluginName)(IManager *manager) + : IPlugin(manager) +{ + m_longName = wxT("$(PluginLongName)"); + m_shortName = wxT("$(PluginShortName)"); +} + +$(PluginName)::~$(PluginName)() +{ +} + +wxToolBar *$(PluginName)::CreateToolBar(wxWindow *parent) +{ + wxToolBar *tb = new wxToolBar(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER); + // TODO :: Add your toolbar items here... + // Sample code that adds single button to the toolbar + // and associates an image to it + // tb->AddTool(XRCID("new_plugin"), wxT("New Plugin Wizard..."), wxXmlResource::Get()->LoadBitmap(wxT("plugin_add")), wxT("New Plugin Wizard...")); + // tb->Realize(); + // Connect the events to us + // parent->Connect(XRCID("new_plugin"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler($(PluginName)::OnNewPlugin), NULL, (wxEvtHandler*)this); + // parent->Connect(XRCID("new_plugin"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler($(PluginName)::OnNewPluginUI), NULL, (wxEvtHandler*)this); + return tb; +} + +void $(PluginName)::CreatePluginMenu(wxMenu *pluginsMenu) +{ + //TODO:: create the menu for the 'Plugin' menu entry in the + //menu bar +} + +void $(PluginName)::HookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeEditor) { + //TODO::Append items for the editor context menu + } else if (type == MenuTypeFileExplorer) { + //TODO::Append items for the file explorer context menu + } else if (type == MenuTypeFileView_Workspace) { + //TODO::Append items for the file view / workspace context menu + } else if (type == MenuTypeFileView_Project) { + //TODO::Append items for the file view/Project context menu + } else if (type == MenuTypeFileView_Folder) { + //TODO::Append items for the file view/Virtual folder context menu + } else if (type == MenuTypeFileView_File) { + //TODO::Append items for the file view/file context menu + } +} + +void $(PluginName)::UnHookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeEditor) { + //TODO::Unhook items for the editor context menu + } else if (type == MenuTypeFileExplorer) { + //TODO::Unhook items for the file explorer context menu + } else if (type == MenuTypeFileView_Workspace) { + //TODO::Unhook items for the file view / workspace context menu + } else if (type == MenuTypeFileView_Project) { + //TODO::Unhook items for the file view/Project context menu + } else if (type == MenuTypeFileView_Folder) { + //TODO::Unhook items for the file view/Virtual folder context menu + } else if (type == MenuTypeFileView_File) { + //TODO::Unhook items for the file view/file context menu + } +} + +void $(PluginName)::UnPlug() +{ + //TODO:: perform the unplug action for this plugin +} + diff --git a/Runtime/templates/plugin.h.wizard b/Runtime/templates/plugin.h.wizard new file mode 100644 index 0000000000..c2517ab1d8 --- /dev/null +++ b/Runtime/templates/plugin.h.wizard @@ -0,0 +1,23 @@ +#ifndef __$(PluginName)__ +#define __$(PluginName)__ + +#include "plugin.h" + +class $(PluginName) : public IPlugin +{ +public: + $(PluginName)(IManager *manager); + ~$(PluginName)(); + + //-------------------------------------------- + //Abstract methods + //-------------------------------------------- + virtual wxToolBar *CreateToolBar(wxWindow *parent); + virtual void CreatePluginMenu(wxMenu *pluginsMenu); + virtual void HookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnHookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnPlug(); +}; + +#endif //$(PluginName) + diff --git a/Runtime/templates/static-library-wx-enabled.project b/Runtime/templates/static-library-wx-enabled.project new file mode 100644 index 0000000000..377a648927 --- /dev/null +++ b/Runtime/templates/static-library-wx-enabled.project @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/static-library.project b/Runtime/templates/static-library.project new file mode 100644 index 0000000000..a0e0757ea9 --- /dev/null +++ b/Runtime/templates/static-library.project @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/wxmain.project.wizard b/Runtime/templates/wxmain.project.wizard new file mode 100644 index 0000000000..198c0202d0 --- /dev/null +++ b/Runtime/templates/wxmain.project.wizard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Runtime/templates/wxproject.project.wizard b/Runtime/templates/wxproject.project.wizard new file mode 100644 index 0000000000..07e5f0a32e --- /dev/null +++ b/Runtime/templates/wxproject.project.wizard @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Subversion/Subversion.project b/Subversion/Subversion.project new file mode 100644 index 0000000000..8a04a35096 --- /dev/null +++ b/Subversion/Subversion.project @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Subversion/Subversion.vcproj b/Subversion/Subversion.vcproj new file mode 100644 index 0000000000..598b45bda8 --- /dev/null +++ b/Subversion/Subversion.vcproj @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Subversion/logindlg.cpp b/Subversion/logindlg.cpp new file mode 100644 index 0000000000..dd3cd5a6e7 --- /dev/null +++ b/Subversion/logindlg.cpp @@ -0,0 +1,7 @@ +#include "logindlg.h" + +LoginDialog::LoginDialog( wxWindow* parent ) +: +LoginBaseDialog( parent ) +{ +} diff --git a/Subversion/logindlg.h b/Subversion/logindlg.h new file mode 100644 index 0000000000..f74f5d1e82 --- /dev/null +++ b/Subversion/logindlg.h @@ -0,0 +1,21 @@ +#ifndef __logindlg__ +#define __logindlg__ + +/** +@file +Subclass of LoginBaseDialog, which is generated by wxFormBuilder. +*/ + +#include "logindlgbase.h" + +/** Implementing LoginBaseDialog */ +class LoginDialog : public LoginBaseDialog +{ +public: + /** Constructor */ + LoginDialog( wxWindow* parent ); + wxString GetUsername() const {return m_textCtrlUsername->GetValue();} + wxString GetPassword() const {return m_textCtrlPassword->GetValue();} +}; + +#endif // __logindlg__ diff --git a/Subversion/logindlgbase.cpp b/Subversion/logindlgbase.cpp new file mode 100644 index 0000000000..3317f3f0c7 --- /dev/null +++ b/Subversion/logindlgbase.cpp @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "logindlgbase.h" + +/////////////////////////////////////////////////////////////////////////// + +LoginBaseDialog::LoginBaseDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Username:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlUsername = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlUsername, 1, wxALL|wxEXPAND, 5 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + fgSizer1->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlPassword = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD ); + fgSizer1->Add( m_textCtrlPassword, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( fgSizer1, 1, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} diff --git a/Subversion/logindlgbase.h b/Subversion/logindlgbase.h new file mode 100644 index 0000000000..079b2c5396 --- /dev/null +++ b/Subversion/logindlgbase.h @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __logindlgbase__ +#define __logindlgbase__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class LoginBaseDialog +/////////////////////////////////////////////////////////////////////////////// +class LoginBaseDialog : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText1; + wxTextCtrl* m_textCtrlUsername; + wxStaticText* m_staticText2; + wxTextCtrl* m_textCtrlPassword; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + public: + LoginBaseDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Login:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 308,155 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__logindlgbase__ diff --git a/Subversion/makefile b/Subversion/makefile new file mode 100644 index 0000000000..13e874a2c8 --- /dev/null +++ b/Subversion/makefile @@ -0,0 +1,86 @@ +## Author: Eran Ifrah + + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g + +SOFLAG=-shared +OSNAME=$(shell uname -s) +ifeq ($(OSNAME), Darwin) +SOFLAG=-dynamiclib +endif + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +ifeq ($(type), release) +WXCFG=--unicode=no --debug=no +EXT= +OBJ_DIR=Release_gcc +OPT=-O3 +DEBUG= +endif + +ifeq ($(type), release_unicode) +WXCFG=--unicode=yes --debug=no +EXT=u +OBJ_DIR=Release_gcc_unicode +OPT=-O3 -DREGEXP_UNICODE +DEBUG= +endif + +ifeq ($(type), debug_unicode) +WXCFG=--unicode=yes --debug=yes +EXT=ud +OBJ_DIR=Debug_gcc_unicode +DEBUG= -g +OPT=-DREGEXP_UNICODE +endif + +WXVER=26 +OUTPUT_DIR=../lib + +#PROFILER= -pg +## +## Define variables, using wx-config tool +## +CMP=g++ $(DEBUG) $(OPT) + +CCFLAGS= -DASTYLE_LIB -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 + +SQLITE_INCLUDE= -I../sdk/wxsqlite3/include -I../sdk/wxsqlite3/sqlite3/include +INCLUDES = -I. -I../Interfaces -I../CodeLite -I../Plugin -I../sdk/wxflatnotebook/include +LINK_FLAGS=$(shell wx-config --libs $(WXCFG)) -L../lib -lplugin$(EXT) -lcodelite$(EXT) -L../sdk/wxflatnotebook/lib -lwxflatnotebook$(EXT) + +## +## Define the object files +## +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard *.cpp))))) + +## our main build target +build : pre_build Subversion + +Subversion: $(lib_cpp_objects) + $(CMP) $(SOFLAG) -o $(OUTPUT_DIR)/Subversion.so $(lib_cpp_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: %.cpp %.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +%.o.d: + $(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM $(addsuffix .cpp, $(basename $(basename $(@F)))) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + +clean: + $(RM) -fR Release_gcc_unicode/ $(OUTPUT_DIR)/Subversion.so + $(RM) -fR Debug_gcc_unicode/ + +-include $(OBJ_DIR)/*.d diff --git a/Subversion/subversion.cpp b/Subversion/subversion.cpp new file mode 100644 index 0000000000..fbe4a3ef60 --- /dev/null +++ b/Subversion/subversion.cpp @@ -0,0 +1,824 @@ +#include "subversion.h" +#include "wx/busyinfo.h" +#include "globals.h" +#include "wx/menu.h" +#include "wx/xrc/xmlres.h" +#include "svndriver.h" +#include "wx/app.h" +#include "virtualdirtreectrl.h" +#include "wx/treectrl.h" +#include "svnhandler.h" +#include "svnoptionsdlg.h" +#include "exelocator.h" +#include "svnxmlparser.h" +#include "dirsaver.h" + +int SubversionPlugin::SvnConflictImageId; +int SubversionPlugin::SvnModifiedImageId; +int SubversionPlugin::SvnOkImageId; +int SubversionPlugin::CppOK; +int SubversionPlugin::CppModified; +int SubversionPlugin::CppConflict; +int SubversionPlugin::CConflict; +int SubversionPlugin::COK; +int SubversionPlugin::CModified; +int SubversionPlugin::TextOK; +int SubversionPlugin::TextModified; +int SubversionPlugin::TextConflict; +int SubversionPlugin::HeaderOK; +int SubversionPlugin::HeaderModified; +int SubversionPlugin::HeaderConflict; + +#define VALIDATE_SVNPATH()\ + {\ + ExeLocator locator;\ + wxString where;\ + if(!locator.Locate(m_options.GetExePath(), where)){\ + wxString message;\ + message << wxT("SVN plugin error: failed to locate svn client installed (searched for: ") << m_options.GetExePath() << wxT(")");\ + wxLogMessage(message);\ + return;\ + }\ + } + +static SubversionPlugin* theSvnPlugin = NULL; + +//Define the plugin entry point +extern "C" EXPORT IPlugin *CreatePlugin(IManager *manager) +{ + if (theSvnPlugin == 0) { + theSvnPlugin = new SubversionPlugin(manager); + } + return theSvnPlugin; +} + +SubversionPlugin::SubversionPlugin(IManager *manager) + : IPlugin(manager) + , m_svnMenu(NULL) + , m_svn(NULL) + , topWin(NULL) + , m_initIsDone(false) + , m_sepItem(NULL) +{ + m_svn = new SvnDriver(this, manager); + + manager->GetConfigTool()->ReadObject(wxT("SubversionOptions"), &m_options); + //m_timer->Start((int)m_options.GetRefreshInterval(), true); + + m_longName = wxT("Subversion"); + m_shortName = wxT("SVN"); + + wxFont defFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont font(defFont.GetPointSize(), wxFONTFAMILY_TELETYPE, wxNORMAL, wxNORMAL); + + wxTextCtrl *svnwin = new wxTextCtrl(m_mgr->GetOutputPaneNotebook(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER| wxTE_MULTILINE); + svnwin->SetFont(font); + + m_mgr->GetOutputPaneNotebook()->GetImageList()->Add(wxXmlResource::Get()->LoadBitmap(wxT("svn_repo"))); + m_mgr->GetOutputPaneNotebook()->AddPage(svnwin, wxT("SVN"), false, (int)m_mgr->GetOutputPaneNotebook()->GetImageList()->GetCount()-1); + + //Connect items + if (!topWin) { + topWin = wxTheApp; + } + + if (topWin) { + topWin->Connect(wxEVT_FILE_SAVED, wxCommandEventHandler(SubversionPlugin::OnFileSaved), NULL, this); + topWin->Connect(wxEVT_FILE_EXP_REFRESHED, wxCommandEventHandler(SubversionPlugin::OnRefreshFolderStatus), NULL, this); + topWin->Connect(wxEVT_FILE_EXP_INIT_DONE, wxCommandEventHandler(SubversionPlugin::OnFileExplorerInitDone), NULL, this); + topWin->Connect(wxEVT_WORKSPACE_LOADED, wxCommandEventHandler(SubversionPlugin::OnRefreshFolderStatus), NULL, this); + topWin->Connect(wxEVT_PROJ_FILE_ADDED, wxCommandEventHandler(SubversionPlugin::OnProjectFileAdded), NULL, this); + topWin->Connect(wxEVT_INIT_DONE, wxCommandEventHandler(SubversionPlugin::OnAppInitDone), NULL, this); + } + + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + tree->Connect(wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEventHandler(SubversionPlugin::OnTreeExpanded), NULL, this); +} + +wxMenu *SubversionPlugin::CreateEditorPopMenu() +{ + //Create the popup menu for the file explorer + //The only menu that we are interseted is the file explorer menu + wxMenu* menu = new wxMenu(); + wxMenuItem *item(NULL); + + item = new wxMenuItem(menu, XRCID("svn_commit_file"), wxT("&Commit"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + item = new wxMenuItem(menu, XRCID("svn_update_file"), wxT("&Update"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + menu->AppendSeparator(); + + item = new wxMenuItem(menu, XRCID("svn_diff_file"), wxT("&Diff"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + menu->AppendSeparator(); + + item = new wxMenuItem(menu, XRCID("svn_revert_file"), wxT("&Revert"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + if (!topWin) { + topWin = wxTheApp; + } + + topWin->Connect(XRCID("svn_commit_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCommitFile), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_update_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnUpdateFile), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_revert_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRevertFile), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_diff_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDiffFile), NULL, (wxEvtHandler*)this); + return menu; +} + +wxMenu *SubversionPlugin::CreatePopMenu() +{ + //Create the popup menu for the file explorer + //The only menu that we are interseted is the file explorer menu + wxMenu* menu = new wxMenu(); + wxMenuItem *item(NULL); + + item = new wxMenuItem(menu, XRCID("svn_update"), wxT("&Update"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + item = new wxMenuItem(menu, XRCID("svn_commit"), wxT("&Commit"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + item = new wxMenuItem(menu, XRCID("svn_add"), wxT("&Add"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + menu->AppendSeparator(); + item = new wxMenuItem(menu, XRCID("svn_delete"), wxT("&Delete"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + item = new wxMenuItem(menu, XRCID("svn_revert"), wxT("&Revert"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + menu->AppendSeparator(); + + item = new wxMenuItem(menu, XRCID("svn_diff"), wxT("D&iff"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + item = new wxMenuItem(menu, XRCID("svn_changelog"), wxT("Create Change &Log"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + menu->AppendSeparator(); + + item = new wxMenuItem(menu, XRCID("svn_cleanup"), wxT("Cl&eanup"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + menu->AppendSeparator(); + + item = new wxMenuItem(menu, XRCID("svn_refresh"), wxT("Re&fresh SVN Status"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + menu->AppendSeparator(); + item = new wxMenuItem(menu, XRCID("svn_abort"), wxT("A&bort Current Operation"), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + + if (!topWin) { + topWin = wxTheApp; + } + + topWin->Connect(XRCID("svn_update"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnUpdate), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_commit"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCommit), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_add"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnSvnAdd), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_diff"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDiff), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_refresh"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRefreshFolderStatus), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_cleanup"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCleanup), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_changelog"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnChangeLog), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_abort"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnSvnAbort), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_delete"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDelete), NULL, (wxEvtHandler*)this); + topWin->Connect(XRCID("svn_revert"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRevert), NULL, (wxEvtHandler*)this); + + return menu; +} + +SubversionPlugin::~SubversionPlugin() +{ + UnPlug(); +} + +void SubversionPlugin::OnTreeExpanded(wxTreeEvent &event) +{ + VALIDATE_SVNPATH(); + if(!m_initIsDone){ return; } + + //dont allow any user interaction until refresh is done + wxWindowDisabler disabler; + wxTreeItemId item = event.GetItem(); + if (IsItemSvnDir(item)) { + RefreshTreeStatus(&item); + } + event.Skip(); +} + +bool SubversionPlugin::IsItemSvnDir(wxTreeItemId &item) +{ + if (item.IsOk()) { + VdtcTreeItemBase *b; + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + b = (VdtcTreeItemBase*)tree->GetItemData(item); + if (b && b->IsDir()) { + wxFileName svnDir(tree->GetFullPath(item)); + svnDir.AppendDir(wxT(".svn")); + if (svnDir.DirExists()) { + return true; + } + } + } + return false; +} + +void SubversionPlugin::OnSvnAbort(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nAborting ...\n")); + m_svn->Abort(); +} + +void SubversionPlugin::OnChangeLog(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->ChangeLog(); +} + +void SubversionPlugin::OnCleanup(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nPerforming cleanup ...\n")); + m_svn->Cleanup(); +} + +void SubversionPlugin::OnUpdate(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nUpdating ...\n")); + m_svn->Update(); + //refresh tree status + TreeItemInfo item = m_mgr->GetSelectedTreeItemInfo(TreeFileExplorer); + if (item.m_item.IsOk()) { + RefreshTreeStatus(&item.m_item); + } +} + +void SubversionPlugin::OnCommit(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nCommitting ...\n")); + m_svn->Commit(); +} + +void SubversionPlugin::OnCommitFile(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nCommitting ...\n")); + //get the current active editor name + IEditor *editor = m_mgr->GetActiveEditor(); + if(editor){ + m_svn->CommitFile(editor->GetFileName()); + } +} + +void SubversionPlugin::OnUpdateFile(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nUpdating ...\n")); + IEditor *editor = m_mgr->GetActiveEditor(); + if(editor){ + m_svn->UpdateFile(editor->GetFileName()); + } +} + +void SubversionPlugin::OnSvnAdd(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nAdding file(s)...\n")); + m_svn->Add(); +} + +void SubversionPlugin::OnDiff(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nCreating diff file...\n")); + m_svn->Diff(); +} + +void SubversionPlugin::OnDiffFile(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(event); + m_svn->PrintMessage(wxT("----\nCreating diff file...\n")); + + IEditor *editor = m_mgr->GetActiveEditor(); + if(editor){ + m_svn->DiffFile(editor->GetFileName()); + } +} + +void SubversionPlugin::OnRevertFile(wxCommandEvent &e) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(e); + IEditor *editor = m_mgr->GetActiveEditor(); + if(editor){ + m_svn->RevertFile(editor->GetFileName()); + } +} + +void SubversionPlugin::OnDelete(wxCommandEvent &e) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(e); + m_svn->Delete(); +} + +void SubversionPlugin::OnRevert(wxCommandEvent &e) +{ + VALIDATE_SVNPATH(); + wxUnusedVar(e); + m_svn->Revert(); +} + +void SubversionPlugin::OnRefreshFolderStatus(wxCommandEvent &event) +{ + VALIDATE_SVNPATH(); + if(!m_initIsDone){ return; } + TreeItemInfo info = m_mgr->GetSelectedTreeItemInfo(TreeFileExplorer); + if (IsItemSvnDir(info.m_item)) { + + wxBusyCursor bc; + RefreshTreeStatus(&info.m_item); + } + event.Skip(); +} + +wxToolBar *SubversionPlugin::CreateToolBar(wxWindow *parent) +{ + wxUnusedVar(parent); + return NULL; +} + +void SubversionPlugin::CreatePluginMenu(wxMenu *pluginsMenu) +{ + wxMenu *menu = new wxMenu(); + wxMenuItem *item(NULL); + + item = new wxMenuItem(menu, XRCID("svn_options"), wxT("Options..."), wxEmptyString, wxITEM_NORMAL); + menu->Append(item); + pluginsMenu->Append(wxID_ANY, wxT("Subversion"), menu); + + if (!topWin) { + topWin = wxTheApp; + } + topWin->Connect(XRCID("svn_options"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnOptions), NULL, (wxEvtHandler*)this); +} + +void SubversionPlugin::HookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeFileExplorer) { + menu->Append(XRCID("SVN_POPUP"), wxT("SVN"), CreatePopMenu()); + } else if(type == MenuTypeEditor) { + m_sepItem = menu->AppendSeparator(); + menu->Append(XRCID("SVN_EDITOR_POPUP"), wxT("SVN"), CreateEditorPopMenu()); + } +} + +void SubversionPlugin::UnHookPopupMenu(wxMenu *menu, MenuType type) +{ + if (type == MenuTypeFileExplorer) { + wxMenuItem *item = menu->FindItem(XRCID("SVN_POPUP")); + if (item) { + menu->Destroy(item); + if (topWin) { + topWin->Disconnect(XRCID("svn_update"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnUpdate), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_commit"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCommit), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_diff"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDiff), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_refresh"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRefreshFolderStatus), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_changelog"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnChangeLog), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_abort"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnSvnAbort), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_cleanup"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCleanup), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_add"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnSvnAdd), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_delete"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDelete), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_revert"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRevert), NULL, (wxEvtHandler*)this); + } + } + } + else if (type == MenuTypeEditor) { + wxMenuItem *item = menu->FindItem(XRCID("SVN_EDITOR_POPUP")); + if (item) { + menu->Destroy(item); + if (topWin) { + topWin->Disconnect(XRCID("svn_commit_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnCommitFile), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_update_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnUpdateFile), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_revert_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnRevertFile), NULL, (wxEvtHandler*)this); + topWin->Disconnect(XRCID("svn_diff_file"), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(SubversionPlugin::OnDiffFile), NULL, (wxEvtHandler*)this); + } + } + if(m_sepItem){ + menu->Destroy(m_sepItem); + m_sepItem = NULL; + } + } +} + +void SubversionPlugin::OnFileSaved(wxCommandEvent &e) +{ + VALIDATE_SVNPATH(); + if (m_options.GetFlags() & SVN_UPDATE_ON_SAVE) { + RefreshTreeStatus(NULL); + } + e.Skip(); +} + +void SubversionPlugin::RefreshTreeStatus(wxTreeItemId *tree_item) +{ + VALIDATE_SVNPATH(); + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + wxTreeItemId first; + std::map svnRepos; + + if (!tree_item) { + //get list of all SVN root directories + //in the tree + first = tree->GetFirstVisibleItem(); + ScanForSvnDirs(first, svnRepos, true); + } else { + if (IsSvnDirectory(tree->GetFullPath(*tree_item))) { + svnRepos[tree->GetFullPath(*tree_item).GetFullPath()] = *tree_item; + } else { + return; + } + } + + //execute the status command for every directory in the list + wxString output; + + std::map< wxString, wxTreeItemId >::const_iterator iter = svnRepos.begin(); + for ( ; iter != svnRepos.end() ; iter ++ ) { + output.Clear(); + wxTreeItemId item = iter->second; + wxString fullpath = iter->first; + + //try to determine whether this is a directory or file + if (wxDir::Exists(fullpath)) { + fullpath << wxT("/"); + } + + wxFileName tmpfn(fullpath); + m_svn->ExecStatusCommand(tmpfn.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR), output); + + DirSaver ds; + wxSetWorkingDirectory(tmpfn.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR)); + + //update the tree status + wxArrayString cdirs; + wxArrayString mdirs; + wxArrayString unverfiles; + + //get list of files modified/conflicts + SvnXmlParser::GetFiles(output, cdirs, SvnXmlParser::StateConflict); + SvnXmlParser::GetFiles(output, mdirs, SvnXmlParser::StateModified); + SvnXmlParser::GetFiles(output, unverfiles, SvnXmlParser::StateUnversioned); + + //update UI + tree->Freeze(); + //set all icons as OK + std::map::iterator it = svnRepos.begin(); + for (; it != svnRepos.end(); it++) { + wxTreeItemId rootNode = it->second; + + VdtcTreeItemBase *a = (VdtcTreeItemBase *) tree->GetItemData(rootNode); + if (a) { + tree->SetItemImage(rootNode, GetOkIcon(a)); + } + + //get all visible children of this node and mark them as OK as well + std::list< wxTreeItemId > children; + GetAllChildren(rootNode, children); + std::list< wxTreeItemId >::const_iterator i = children.begin(); + for (; i != children.end(); i++) { + VdtcTreeItemBase *b = (VdtcTreeItemBase *) tree->GetItemData(*i); + if (b) { + int iconId = GetOkIcon(b); + tree->SetItemImage((*i), iconId); + } + } + } + + for (size_t i=0; i< unverfiles.GetCount(); i++) { + //set all modified dirs first + + wxString tmppath(unverfiles.Item(i)); + + if (wxDir::Exists(unverfiles.Item(i))) { + //it is a directory + tmppath << wxT("/"); + } + + wxFileName fn(tmppath); + fn.MakeAbsolute(); + wxString dirpath = fn.GetPath(wxPATH_GET_VOLUME|wxPATH_GET_SEPARATOR); + dirpath << fn.GetFullName(); + + wxTreeItemId item_ = tree->GetItemByFullPath(dirpath); + if (item_.IsOk()) { + VdtcTreeItemBase *data = (VdtcTreeItemBase*)tree->GetItemData(item_); + if (data) { + tree->SetItemImage(item_, data->GetIconId()); + } + } + } + + + //update modify items + for (size_t i=0; iGetItemByFullPath(dirpath); + + if (item_.IsOk()) { + VdtcTreeItemBase *data = (VdtcTreeItemBase*)tree->GetItemData(item_); + if (data) { + tree->SetItemImage(item_, GetModifiedIcon(data)); + UpdateParent(item_, data, mdirs.Item(i), SubversionPlugin::SvnModifiedImageId); + } + } + } + + //update conflict items + for (size_t i=0; iGetItemByFullPath(dirpath); + if (item_.IsOk()) { + VdtcTreeItemBase *data = (VdtcTreeItemBase*)tree->GetItemData(item_); + if (data) { + tree->SetItemImage(item_, GetConflictIcon(data)); + UpdateParent(item_, data, cdirs.Item(i), SubversionPlugin::SvnConflictImageId); + } + } + } + tree->Thaw(); + } + + //wxLogMessage(output); + +} + +void SubversionPlugin::UpdateParent(const wxTreeItemId &child, VdtcTreeItemBase *childData, const wxString &childPath, int imgId) +{ + if (!childData) { + return; + } + + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + wxString tmppath = childPath; + if (childData->IsDir()) { + tmppath << wxT("/"); + } + + wxFileName fn(tmppath); + wxArrayString dirs = fn.GetDirs(); + size_t levelsToUpdate = dirs.GetCount()+1; + wxTreeItemId item = child; + for (size_t i=0; iGetItemParent(item); + if (item.IsOk()) { + tree->SetItemImage(item, imgId); + } else { + break; + } + } +} + +void SubversionPlugin::ScanForSvnDirs(const wxTreeItemId &item, std::map &svnRepos, bool allVisibles) +{ + VdtcTreeItemBase *b; + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + wxTreeItemId child = item; + wxTreeItemId stopAtChild; + + if (!allVisibles) { + stopAtChild = tree->GetNextSibling(item); + } + + while (child.IsOk()) { + if (!tree->IsVisible(child)) + break; + + b = (VdtcTreeItemBase *)tree->GetItemData(child); + wxFileName fn = tree->GetFullPath(child); + wxString tmp = fn.GetFullPath(); + if (b && b->IsDir()) { + if (IsSvnDirectory(fn)) { + svnRepos[fn.GetFullPath()] = child; + } + } + + child = tree->GetNextVisible(child); + if (!allVisibles && child == stopAtChild) + break; + } +} + +bool SubversionPlugin::IsSvnDirectory(const wxFileName &fn) +{ + wxFileName svnDir(fn); + wxFileName svnDir2(fn); + svnDir.AppendDir(wxT(".svn")); + svnDir2.AppendDir(wxT("_svn")); + if (svnDir.DirExists()) { + //We have a svn directory, no need to go down futher + return true; + } + //try the second form of _svn + else if (svnDir2.DirExists()) { + //We have a svn directory, no need to go down futher + return true; + } + return false; +} + +void SubversionPlugin::GetAllChildren(const wxTreeItemId &item, std::list &children) +{ + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + + wxTreeItemIdValue cookie; + wxTreeItemId child = tree->GetFirstChild(item, cookie); + + while (child.IsOk()) { + children.push_back(child); + child = tree->GetNextChild(item, cookie); + } +} + +void SubversionPlugin::OnOptions(wxCommandEvent &event) +{ + wxUnusedVar(event); + SvnOptionsDlg *dlg = new SvnOptionsDlg(NULL, m_options); + if (dlg->ShowModal() == wxID_OK) { + m_options = dlg->GetOptions(); + m_mgr->GetConfigTool()->WriteObject(wxT("SubversionOptions"), &m_options); + } + dlg->Destroy(); +} + +void SubversionPlugin::UnPlug() +{ + if (m_svn) { + m_svn->Shutdown(); + delete m_svn; + m_svn = NULL; + } + + if (m_svnMenu) { + delete m_svnMenu; + m_svnMenu = NULL; + } +} + + +//Icons methods +int SubversionPlugin::GetOkIcon(VdtcTreeItemBase *data) +{ + wxString caption = data->GetCaption(); + caption.MakeLower(); + + //directory + if (data->IsDir()) { + return SvnOkImageId; + } + //file + if (caption.EndsWith(wxT(".c++")) || caption.EndsWith(wxT(".cpp")) || caption.EndsWith(wxT(".cxx")) || caption.EndsWith(wxT(".cc"))) { + return CppOK; + } + + if (caption.EndsWith(wxT(".h")) || caption.EndsWith(wxT(".h++")) || caption.EndsWith(wxT(".hpp"))) { + return HeaderOK; + } + + if (caption.EndsWith(wxT(".c"))) { + return COK; + } + return TextOK; +} + +int SubversionPlugin::GetModifiedIcon(VdtcTreeItemBase *data) +{ + wxString caption = data->GetCaption(); + caption.MakeLower(); + + //directory + if (data->IsDir()) { + return SvnModifiedImageId; + } + //file + if (caption.EndsWith(wxT(".c++")) || caption.EndsWith(wxT(".cpp")) || caption.EndsWith(wxT(".cxx")) || caption.EndsWith(wxT(".cc"))) { + return CppModified; + } + + if (caption.EndsWith(wxT(".h")) || caption.EndsWith(wxT(".h++")) || caption.EndsWith(wxT(".hpp"))) { + return HeaderModified; + } + + if (caption.EndsWith(wxT(".c"))) { + return CModified; + } + return TextModified; +} + +int SubversionPlugin::GetConflictIcon(VdtcTreeItemBase *data) +{ + wxString caption = data->GetCaption(); + caption.MakeLower(); + + //directory + if (data->IsDir()) { + return SvnConflictImageId; + } + //file + if (caption.EndsWith(wxT(".c++")) || caption.EndsWith(wxT(".cpp")) || caption.EndsWith(wxT(".cxx")) || caption.EndsWith(wxT(".cc"))) { + return CppConflict; + } + + if (caption.EndsWith(wxT(".h")) || caption.EndsWith(wxT(".h++")) || caption.EndsWith(wxT(".hpp"))) { + return HeaderConflict; + } + + if (caption.EndsWith(wxT(".c"))) { + return CConflict; + } + return TextConflict; +} + +void SubversionPlugin::OnFileExplorerInitDone(wxCommandEvent &event) +{ + if(!m_initIsDone){ return; } + + wxVirtualDirTreeCtrl* tree = (wxVirtualDirTreeCtrl*)m_mgr->GetTree(TreeFileExplorer); + //add new icons to the tree control + wxImageList *il = tree->GetImageList(); + if (il) { + SvnOkImageId = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("svn_ok"))); + SvnConflictImageId = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("svn_conflict"))); + SvnModifiedImageId = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("svn_modified"))); + + CppConflict = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("cpp_conflict"))); + CppOK = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("cpp_ok"))); + CppModified = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("cpp_modified"))); + + CConflict = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("c_conflict"))); + COK = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("c_ok"))); + CModified = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("c_modified"))); + + HeaderConflict = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("h_conflict"))); + HeaderOK = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("h_ok"))); + HeaderModified = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("h_modified"))); + + TextConflict = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("text_conflict"))); + TextOK = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("text_ok"))); + TextModified = il->Add(wxXmlResource::Get()->LoadBitmap(wxT("text_modified"))); + } +} + +void SubversionPlugin::OnProjectFileAdded(wxCommandEvent &event) +{ + if (m_options.GetFlags() & SVN_AUTO_ADD_FILE) { + void *cdata(NULL); + wxArrayString files; + cdata = event.GetClientData(); + if (cdata) { + files = *((wxArrayString*)cdata); + + for (size_t i=0; i< files.GetCount(); i++) { + m_svn->Add(files.Item(i)); + } + + } + } + event.Skip(); +} + +void SubversionPlugin::OnAppInitDone(wxCommandEvent &event) +{ + m_initIsDone = true; + //Initialize icons + OnFileExplorerInitDone(event); + wxBusyInfo wait(wxT("Updating 'Explorer' view with SVN status...")); + + //Notify the plugin that the file explorer tree has expanded + SendCmdEvent(wxEVT_FILE_EXP_REFRESHED); +} diff --git a/Subversion/subversion.def b/Subversion/subversion.def new file mode 100644 index 0000000000..f027aa0b1c --- /dev/null +++ b/Subversion/subversion.def @@ -0,0 +1,3 @@ +LIBRARY Subversion +EXPORTS + CreatePlugin \ No newline at end of file diff --git a/Subversion/subversion.h b/Subversion/subversion.h new file mode 100644 index 0000000000..fd35dbe6a0 --- /dev/null +++ b/Subversion/subversion.h @@ -0,0 +1,97 @@ +#ifndef SUBVERSION_H +#define SUBVERSION_H + +#include "plugin.h" +#include "map" +#include "list" +#include "wx/timer.h" +#include "wx/treectrl.h" +#include "svnoptions.h" + +class SvnDriver; +class VdtcTreeItemBase; + +class SubversionPlugin : public IPlugin +{ + wxMenu *m_svnMenu; + SvnDriver *m_svn; + wxEvtHandler *topWin; + wxTreeItemId m_firstVisibleItem; + SvnOptions m_options; + friend class SvnDriver; + bool m_isValid; + bool m_initIsDone; + wxMenuItem *m_sepItem; + +public: + SubversionPlugin(IManager *manager); + virtual ~SubversionPlugin(); + const SvnOptions& GetOptions() const{return m_options;} + + //-------------------------------------------- + //Abstract methods + //-------------------------------------------- + virtual wxToolBar *CreateToolBar(wxWindow *parent); + virtual void CreatePluginMenu(wxMenu *pluginsMenu); + virtual void HookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnHookPopupMenu(wxMenu *menu, MenuType type); + virtual void UnPlug(); + +protected: + wxMenu *CreatePopMenu(); + wxMenu *CreateEditorPopMenu(); + void RefreshTreeStatus(wxTreeItemId *item); + void ScanForSvnDirs(const wxTreeItemId &item, std::map &svnRepos, bool allVisibles = true); + bool IsItemSvnDir(wxTreeItemId &item); + void UpdateParent(const wxTreeItemId &child, VdtcTreeItemBase *childData, const wxString &childPath, int imgId); + void GetAllChildren(const wxTreeItemId &item, std::list &children); + bool IsSvnDirectory(const wxFileName &fn); + + //icons methods + int GetOkIcon(VdtcTreeItemBase *data); + int GetModifiedIcon(VdtcTreeItemBase *data); + int GetConflictIcon(VdtcTreeItemBase *data); + + // event handlers + /////////////////////////////////////////////////////// + void OnUpdate(wxCommandEvent &event); + void OnCommit(wxCommandEvent &event); + void OnDiff(wxCommandEvent &event); + void OnCleanup(wxCommandEvent &event); + void OnFileSaved(wxCommandEvent &event); + void OnRefreshFolderStatus(wxCommandEvent &event); + void OnTreeExpanded(wxTreeEvent &event); + void OnFileExplorerInitDone(wxCommandEvent &event); + void OnOptions(wxCommandEvent &event); + void OnChangeLog(wxCommandEvent &event); + void OnSvnAbort(wxCommandEvent &event); + void OnSvnAdd(wxCommandEvent &event); + void OnDelete(wxCommandEvent &event); + void OnRevert(wxCommandEvent &event); + void OnProjectFileAdded(wxCommandEvent &event); + void OnAppInitDone(wxCommandEvent &event); + void OnCommitFile(wxCommandEvent &e); + void OnUpdateFile(wxCommandEvent &e); + void OnDiffFile(wxCommandEvent &e); + void OnRevertFile(wxCommandEvent &e); + +public: + static int SvnOkImageId; + static int SvnConflictImageId; + static int SvnModifiedImageId; + static int CppOK; + static int CppModified; + static int CppConflict; + static int CConflict; + static int COK; + static int CModified; + static int TextOK; + static int TextModified; + static int TextConflict; + static int HeaderOK; + static int HeaderModified; + static int HeaderConflict; +}; + +#endif //SUBVERSION_H + diff --git a/Subversion/svnadditemsbasedlg.cpp b/Subversion/svnadditemsbasedlg.cpp new file mode 100644 index 0000000000..f212596dc6 --- /dev/null +++ b/Subversion/svnadditemsbasedlg.cpp @@ -0,0 +1,59 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "svnadditemsbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +SvnAddItemsBaseDlg::SvnAddItemsBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + wxArrayString m_checkListFilesChoices; + m_checkListFiles = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListFilesChoices, 0 ); + mainSizer->Add( m_checkListFiles, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Ignore File Pattern:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textIgnoreFilePatterns = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_textIgnoreFilePatterns, 1, wxALL, 5 ); + + m_buttonApplyPattern = new wxButton( this, wxID_ANY, wxT("&Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonApplyPattern, 0, wxALL, 5 ); + + mainSizer->Add( bSizer2, 0, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( mainSizer ); + this->Layout(); + + // Connect Events + m_buttonApplyPattern->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SvnAddItemsBaseDlg::OnApplyPattern ), NULL, this ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SvnAddItemsBaseDlg::OnButtonOK ), NULL, this ); + m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SvnAddItemsBaseDlg::OnButtonCancel ), NULL, this ); +} diff --git a/Subversion/svnadditemsbasedlg.h b/Subversion/svnadditemsbasedlg.h new file mode 100644 index 0000000000..edd510e4c9 --- /dev/null +++ b/Subversion/svnadditemsbasedlg.h @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __svnadditemsbasedlg__ +#define __svnadditemsbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SvnAddItemsBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class SvnAddItemsBaseDlg : public wxDialog +{ + private: + + protected: + wxCheckListBox* m_checkListFiles; + wxStaticText* m_staticText1; + wxTextCtrl* m_textIgnoreFilePatterns; + wxButton* m_buttonApplyPattern; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnApplyPattern( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonOK( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonCancel( wxCommandEvent& event ){ event.Skip(); } + + + public: + SvnAddItemsBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Subversion: Add Files "), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 562,633 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__svnadditemsbasedlg__ diff --git a/Subversion/svnadditemsdlg.cpp b/Subversion/svnadditemsdlg.cpp new file mode 100644 index 0000000000..9eb236776a --- /dev/null +++ b/Subversion/svnadditemsdlg.cpp @@ -0,0 +1,101 @@ +#include "svnadditemsdlg.h" +#include "iconfigtool.h" +#include "wx/tokenzr.h" + +SvnAddItemsDlg::SvnAddItemsDlg( wxWindow* parent, const wxArrayString &files, IConfigTool *confTool ) +: SvnAddItemsBaseDlg( parent ) +, m_configTool(confTool) +, m_files(files) +{ + InitDialog(true); +} + + +void SvnAddItemsDlg::InitDialog(bool loadPattern) +{ + if(loadPattern){ + m_configTool->ReadObject(wxT("SvnIgnorePatternData"), &m_data); + } + + m_textIgnoreFilePatterns->SetValue(m_data.GetIgnorePattern()); + + m_checkListFiles->Freeze(); + m_checkListFiles->Clear(); + for(size_t i=0; iAppend(m_files.Item(i)); + + if(!IsIgnoredFile(m_files.Item(i))){ + m_checkListFiles->Check((unsigned int)i, true); + }else{ + m_checkListFiles->Check((unsigned int)i, false); + } + } + m_checkListFiles->Thaw(); +} + +bool SvnAddItemsDlg::IsIgnoredFile(const wxString &file) +{ + wxStringTokenizer tkz(m_textIgnoreFilePatterns->GetValue(), wxT(";"), wxTOKEN_STRTOK); + while(tkz.HasMoreTokens()){ + if(wxMatchWild(tkz.NextToken(), file)){ + return true; + } + } + return false; +} + +void SvnAddItemsDlg::OnButtonCancel(wxCommandEvent &e) +{ + wxUnusedVar(e); + EndModal(wxID_CANCEL); +} + +void SvnAddItemsDlg::OnButtonOK(wxCommandEvent &e) +{ + wxUnusedVar(e); + //save the file patterns + m_configTool->WriteObject(wxT("SvnIgnorePatternData"), &m_data); + EndModal(wxID_OK); +} + +void SvnAddItemsDlg::OnApplyPattern(wxCommandEvent &e) +{ + wxUnusedVar(e); + m_data.SetIgnorePattern(m_textIgnoreFilePatterns->GetValue()); + InitDialog(); +} + +wxString SvnAddItemsDlg::GetFiles() +{ + wxString files; + for(size_t i=0; iGetCount(); i++){ + if(m_checkListFiles->IsChecked((unsigned int)i)){ + files << wxT(" \"") << m_checkListFiles->GetString((unsigned int)i) << wxT("\" "); + } + } + return files; +} + +//------------------------------------------------- +// Serialized data object +//------------------------------------------------- + +SvnIgnorePatternData::SvnIgnorePatternData() +: m_pattern(wxT("*.o;*.obj;*.exe;*.lib;*.so;*.dll;*.a;*.dynlib;*.exp;*.ilk;*.pdb;*.d;*.tags;*.suo;*.ncb;")) +{ +} + +SvnIgnorePatternData::~SvnIgnorePatternData() +{ +} + +void SvnIgnorePatternData::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_pattern"), m_pattern); +} + +void SvnIgnorePatternData::Serialize(Archive &arch) +{ + arch.Write(wxT("m_pattern"), m_pattern); +} + diff --git a/Subversion/svnadditemsdlg.h b/Subversion/svnadditemsdlg.h new file mode 100644 index 0000000000..ac5ed90ac9 --- /dev/null +++ b/Subversion/svnadditemsdlg.h @@ -0,0 +1,48 @@ +#ifndef __svnadditemsdlg__ +#define __svnadditemsdlg__ + +/** +@file +Subclass of svnadditemsbasedlg, which is generated by wxFormBuilder. +*/ + +#include "svnadditemsbasedlg.h" +#include "serialized_object.h" + +class IConfigTool; + +class SvnIgnorePatternData : public SerializedObject +{ + wxString m_pattern; +public: + SvnIgnorePatternData(); + ~SvnIgnorePatternData(); + + void DeSerialize(Archive &arch); + void Serialize(Archive &arch); + + const wxString &GetIgnorePattern() const {return m_pattern;} + void SetIgnorePattern(const wxString &pattern) {m_pattern = pattern;} +}; + +/** Implementing svnadditemsbasedlg */ +class SvnAddItemsDlg : public SvnAddItemsBaseDlg +{ + IConfigTool *m_configTool; + SvnIgnorePatternData m_data; + wxArrayString m_files; + +protected: + void InitDialog(bool loadPattern = false); + bool IsIgnoredFile(const wxString &file); + void OnButtonCancel(wxCommandEvent &e); + void OnButtonOK(wxCommandEvent &e); + void OnApplyPattern(wxCommandEvent &e); + +public: + /** Constructor */ + SvnAddItemsDlg( wxWindow* parent , const wxArrayString &files, IConfigTool *confTool); + wxString GetFiles(); +}; + +#endif // __svnadditemsdlg__ diff --git a/Subversion/svnbasedlg.cpp b/Subversion/svnbasedlg.cpp new file mode 100644 index 0000000000..b89fb6560a --- /dev/null +++ b/Subversion/svnbasedlg.cpp @@ -0,0 +1,35 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "svnbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +SvnBaseDlg::SvnBaseDlg( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_textCtrl = new wxTextCtrl( this, wxID_ANY, wxT("# Enter commit log here.Lines starting with the pound sign (#), are \n# ignored\n"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB ); + bSizer1->Add( m_textCtrl, 1, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} diff --git a/Subversion/svnbasedlg.h b/Subversion/svnbasedlg.h new file mode 100644 index 0000000000..b96d9ebccf --- /dev/null +++ b/Subversion/svnbasedlg.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 6 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __svnbasedlg__ +#define __svnbasedlg__ + +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SvnBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class SvnBaseDlg : public wxDialog +{ + private: + + protected: + wxTextCtrl* m_textCtrl; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + public: + SvnBaseDlg( wxWindow* parent, int id = wxID_ANY, wxString title = wxT("Enter SVN commit comment:"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 497,369 ), int style = wxDEFAULT_DIALOG_STYLE); + +}; + +#endif //__svnbasedlg__ diff --git a/Subversion/svndlg.cpp b/Subversion/svndlg.cpp new file mode 100644 index 0000000000..bbdfaa694d --- /dev/null +++ b/Subversion/svndlg.cpp @@ -0,0 +1,8 @@ +#include "svndlg.h" + +SvnDlg::SvnDlg( wxWindow* parent ) +: +SvnBaseDlg( parent ) +{ + +} diff --git a/Subversion/svndlg.h b/Subversion/svndlg.h new file mode 100644 index 0000000000..0507850a9a --- /dev/null +++ b/Subversion/svndlg.h @@ -0,0 +1,21 @@ +#ifndef __svndlg__ +#define __svndlg__ + +/** +@file +Subclass of SvnBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "svnbasedlg.h" + +/** Implementing SvnBaseDlg */ +class SvnDlg : public SvnBaseDlg +{ +public: + /** Constructor */ + SvnDlg( wxWindow* parent ); + wxString GetValue() const { return m_textCtrl->GetValue(); } + void SetValue( const wxString &value ) { m_textCtrl->SetValue(value); } +}; + +#endif // __svndlg__ diff --git a/Subversion/svndriver.cpp b/Subversion/svndriver.cpp new file mode 100644 index 0000000000..3c75b00be9 --- /dev/null +++ b/Subversion/svndriver.cpp @@ -0,0 +1,655 @@ +#include "svndriver.h" +#include "wx/tokenzr.h" +#include "dirsaver.h" +#include "svndlg.h" +#include "wx/ffile.h" +#include "svnhandler.h" +#include "subversion.h" +#include "svnlogdlg.h" +#include "procutils.h" +#include "svnadditemsdlg.h" +#include "svnxmlparser.h" +#include "logindlg.h" + +#define TRYENTERSVN() {if(m_cmd){return;} SelectSvnTab();} + +BEGIN_EVENT_TABLE(SvnDriver, wxEvtHandler) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_ADDLINE, SvnDriver::OnSvnProcess) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_STARTED, SvnDriver::OnSvnProcess) + EVT_COMMAND(wxID_ANY, wxEVT_ASYNC_PROC_ENDED, SvnDriver::OnSvnProcess) +END_EVENT_TABLE() + +static void StripComments(wxString &comment) +{ + wxStringTokenizer tok(comment, wxT("\n"), wxTOKEN_STRTOK); + comment.Clear(); + while(tok.HasMoreTokens()){ + wxString line = tok.GetNextToken(); + line = line.Trim().Trim(false); + if(!line.StartsWith(wxT("#"))){ + comment << line << wxT("\n"); + } + } +} + +SvnDriver::SvnDriver(SubversionPlugin *plugin, IManager *mgr) +: m_cmd(NULL) +, m_manager(mgr) +, m_curHandler(NULL) +, m_plugin(plugin) +, m_commitWithPass(false) +{ +} + +SvnDriver::~SvnDriver() { + if (m_cmd) { + delete m_cmd; + m_cmd = NULL; + } +} + +void SvnDriver::SetCommitWithPassword(bool need) +{ + m_commitWithPass = need; +} + +void SvnDriver::Shutdown(){ + if(m_cmd){ + m_cmd->GetProcess()->Disconnect(wxEVT_END_PROCESS, wxProcessEventHandler(SvnDriver::OnSvnProcessTerminated), NULL, this); + m_cmd->Stop(); + } +} + +void SvnDriver::SelectSvnTab() { + wxFlatNotebook *book = m_manager->GetOutputPaneNotebook(); + wxString curSel = book->GetPageText((size_t)book->GetSelection()); + if (curSel == wxT("SVN")) { + return; + } + + for (size_t i=0; i<(size_t)book->GetPageCount(); i++) { + if (book->GetPageText(i) == wxT("SVN")) { + book->SetSelection(i); + break; + } + } +} + +void SvnDriver::OnSvnProcessTerminated(wxProcessEvent &event) { + m_cmd->ProcessEnd(event); + m_cmd->GetProcess()->Disconnect(wxEVT_END_PROCESS, wxProcessEventHandler(SvnDriver::OnSvnProcessTerminated), NULL, this); + delete m_cmd; + m_cmd = NULL; + + bool callRefresh(false); + + wxString cmd = m_curHandler->GetCmd(); + TreeItemInfo item; + SvnCommitCmdHandler *handler = dynamic_cast(m_curHandler); + if(handler){ + item = handler->GetItem(); + callRefresh = true; + } + + delete m_curHandler; + m_curHandler = NULL; + + if(m_commitWithPass){ + //Commit failed due to authentication error, try again with the same paramters, but this time prompt the user + //for username and password + m_commitWithPass = false; + + //first we need to perform clean + wxString command; + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("cleanup "); + + DirSaver ds; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + wxArrayString output; + + PrintMessage(wxT("Performning cleanup...\n")); + ProcUtils::ExecuteCommand(command, output); + PrintMessage(wxT("Done\n")); + CommitWithAuth(cmd, item); + + }else if(callRefresh){ + + //Perform a refresh command on the tree + if(item.m_item.IsOk()){ + m_plugin->RefreshTreeStatus( &item.m_item ); + } + } +} + +void SvnDriver::DisplayDiffFile(const wxString &content) { + //Load the output file into the editor + wxString tmpFile = wxFileName::GetTempDir(); + tmpFile << wxT("/Diff"); + + wxFFile file(tmpFile, wxT("w+")); + if (file.IsOpened()) { + file.Write(content); + file.Close(); + + m_manager->OpenFile(tmpFile, wxEmptyString); + } +} + +void SvnDriver::DisplayLog(const wxString &outputFile, const wxString &content) { + //Load the output file into the editor + wxString tmpFile(outputFile); + if (tmpFile.IsEmpty()) { + tmpFile = wxFileName::GetTempDir(); + tmpFile << wxT("ChangeLog.txt"); + } + + wxFFile file(tmpFile, wxT("w+")); + if (file.IsOpened()) { + file.Write(content); + file.Close(); + m_manager->OpenFile(tmpFile, wxEmptyString, wxNOT_FOUND); + } +} + +void SvnDriver::ExecCommand(const wxString &cmd) { + //execute the command line + //the async command is a one time executable object, + m_cmd = new AsyncExeCmd(this); + m_cmd->Execute(cmd); + if (m_cmd->GetProcess()) { + m_cmd->GetProcess()->Connect(wxEVT_END_PROCESS, wxProcessEventHandler(SvnDriver::OnSvnProcessTerminated), NULL, this); + } +} + +void SvnDriver::Update() { + TRYENTERSVN() + + wxString command; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + if (!item.m_fileName.IsDir()) { + //we got a file name + fileName = item.m_fileName.GetFullName(); + } + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("update ") << fileName ; + m_curHandler = new SvnDefaultCmdHandler(this, command); + ExecCommand(command); +} + +void SvnDriver::CommitWithAuth(const wxString &cmd, const TreeItemInfo &item) { + TRYENTERSVN(); + wxString command(cmd); + LoginDialog *dlg = new LoginDialog(wxTheApp->GetTopWindow()); + if(dlg->ShowModal() == wxID_OK){ + + wxString username = dlg->GetUsername(); + wxString password = dlg->GetPassword(); + + command << wxT(" --username ") << username; + command << wxT(" --password ") << password; + + m_curHandler = new SvnCommitCmdHandler(this, cmd, item); + DirSaver ds; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + ExecCommand(command); + } + dlg->Destroy(); +} + +void SvnDriver::Commit() { + TRYENTERSVN() + wxString command, comment; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + if (!item.m_fileName.IsDir()) { + //we got a file name + fileName = item.m_fileName.GetFullName(); + } + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + //get the comment to enter + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" status -q ") << fileName; + + wxArrayString output; + ProcUtils::ExecuteCommand(command, output); + + wxString text; + for(size_t i=0; i< output.GetCount(); i++){ + text << wxT("# ") << output.Item(i) << wxT("\n"); + } + + //Get Log message from user + SvnDlg *dlg = new SvnDlg(NULL); + text.Prepend(dlg->GetValue()+wxT("# Svn status:\n")); + dlg->SetValue(text); + + if (dlg->ShowModal() == wxID_OK) { + comment = dlg->GetValue(); + StripComments(comment); + command.Clear(); + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("commit ") << fileName << wxT(" -m \"") << comment << wxT("\""); + m_curHandler = new SvnCommitCmdHandler(this, command, item); + ExecCommand(command); + } + dlg->Destroy(); +} + +void SvnDriver::CommitFile(const wxFileName &fileName) { + TRYENTERSVN() + wxString command, comment; + + DirSaver ds; + wxString file_name; + wxSetWorkingDirectory(fileName.GetPath()); + if (!fileName.IsDir()) { + //we got a file name + file_name = fileName.GetFullName(); + } + +#ifdef __WXMSW__ + file_name.Prepend(wxT("\"")); + file_name.Append(wxT("\"")); +#endif + + //get the comment to enter + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" status -q ") << file_name; + + wxArrayString output; + ProcUtils::ExecuteCommand(command, output); + + wxString text; + for(size_t i=0; i< output.GetCount(); i++){ + text << wxT("# ") << output.Item(i) << wxT("\n"); + } + + //Get Log message from user + SvnDlg *dlg = new SvnDlg(NULL); + text.Prepend(dlg->GetValue()+wxT("# Svn status:\n")); + dlg->SetValue(text); + TreeItemInfo dummy; + if (dlg->ShowModal() == wxID_OK) { + comment = dlg->GetValue(); + StripComments(comment); + command.Clear(); + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("commit ") << file_name << wxT(" -m \"") << comment << wxT("\""); + m_curHandler = new SvnCommitCmdHandler(this, command, dummy); + ExecCommand(command); + } + dlg->Destroy(); +} + +void SvnDriver::UpdateFile(const wxFileName &fileName) +{ + TRYENTERSVN() + + wxString command; + + DirSaver ds; + wxString file_name; + wxSetWorkingDirectory(fileName.GetPath()); + if (!fileName.IsDir()) { + //we got a file name + file_name = fileName.GetFullName(); + } + +#ifdef __WXMSW__ + file_name.Prepend(wxT("\"")); + file_name.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("update ") << file_name ; + m_curHandler = new SvnDefaultCmdHandler(this, command); + ExecCommand(command); +} + +void SvnDriver::DiffFile(const wxFileName &fileName) { + TRYENTERSVN() + wxString command, comment; + + DirSaver ds; + wxString file_name; + wxSetWorkingDirectory(fileName.GetPath()); + + //did we get a directory? + if (fileName.IsDir()) { + file_name = wxT("."); + } else { + file_name = fileName.GetFullName(); + } + + +#ifdef __WXMSW__ + file_name.Prepend(wxT("\"")); + file_name.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("diff ") << file_name; + + m_curHandler = new SvnDiffCmdHandler(this, command); + ExecCommand(command); +} + +void SvnDriver::Diff() { + TRYENTERSVN() + wxString command, comment; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + //did we get a directory? + if (item.m_fileName.IsDir()) { + fileName = wxT("."); + } else { + fileName = item.m_fileName.GetFullName(); + } + + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("diff ") << fileName; + + m_curHandler = new SvnDiffCmdHandler(this, command); + ExecCommand(command); +} + +void SvnDriver::Delete() +{ + TRYENTERSVN(); + wxString command, comment; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + fileName = item.m_fileName.GetFullPath(); + fileName.Replace(wxT("\\"), wxT("/")); + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" del --force ") << fileName; + + //Delete is a quick operation, do it synch + wxArrayString output; + ProcUtils::ExecuteCommand(command, output); + PrintMessage(output); + PrintMessage(wxT("----\n")); +} + +void SvnDriver::Revert() +{ + TRYENTERSVN(); + wxString command, comment; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + fileName = item.m_fileName.GetFullPath(); + fileName.Replace(wxT("\\"), wxT("/")); + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" revert --recursive ") << fileName; + + //Revert is a quick operation, do it synch + wxArrayString output; + ProcUtils::ExecuteCommand(command, output); + PrintMessage(output); + PrintMessage(wxT("----\n")); +} + +void SvnDriver::RevertFile(const wxFileName &fileName) +{ + TRYENTERSVN(); + wxString command, comment; + + DirSaver ds; + wxString file_name; + wxSetWorkingDirectory(fileName.GetPath()); + + file_name = fileName.GetFullPath(); + file_name.Replace(wxT("\\"), wxT("/")); + +#ifdef __WXMSW__ + file_name.Prepend(wxT("\"")); + file_name.Append(wxT("\"")); +#endif + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" revert --recursive ") << file_name; + + //Revert is a quick operation, do it synch + wxArrayString output; + ProcUtils::ExecuteCommand(command, output); + PrintMessage(output); + PrintMessage(wxT("----\n")); +} + +void SvnDriver::ChangeLog() { + TRYENTERSVN() + wxString command, comment; + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + //did we get a directory? + if (item.m_fileName.IsDir()) { + fileName = wxT("."); + } else { + fileName = item.m_fileName.GetFullName(); + } + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + SvnLogDlg *dlg = new SvnLogDlg(NULL); + if (dlg->ShowModal() == wxID_OK) { + + wxString outputFile = dlg->GetFilePath(); + wxString fromStr = dlg->GetFromRevision(); + wxString toStr = dlg->GetToRevision(); + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" log ") << fileName; + command << wxT(" -r ") << fromStr << wxT(":") << toStr; + + m_curHandler = new SvnChangeLogCmdHandler(this, outputFile, command); + ExecCommand(command); + } + dlg->Destroy(); +} + +void SvnDriver::Add(const wxFileName &filename) +{ + TRYENTERSVN() + wxString command; + DirSaver ds; + wxString fileName; + wxSetWorkingDirectory(filename.GetPath()); + + fileName = filename.GetFullPath(); + fileName.Replace(wxT("\\"), wxT("/")); + +#ifdef __WXMSW__ + fileName.Prepend(wxT("\"")); + fileName.Append(wxT("\"")); +#endif + + wxArrayString output; + if(filename.IsDir()){ + + // Execute a sync command to get modified files + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("status --xml --non-interactive -q --no-ignore ") << fileName; + output.Clear(); + ProcUtils::ExecuteCommand(command, output); + + wxArrayString files; + if(GetFilesList(output, files)){ + SvnAddItemsDlg *dlg = new SvnAddItemsDlg(NULL, files, m_manager->GetConfigTool()); + if(dlg->ShowModal() == wxID_OK){ + //add the selected files + wxString filesToAdd = dlg->GetFiles(); + if(filesToAdd.IsEmpty() == false){ + command.Clear(); + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" add -N ") << filesToAdd << wxT("") ; + output.Clear(); + ProcUtils::ExecuteCommand(command, output); + PrintMessage(output); + } + } else { + PrintMessage(wxT("Operation Canceled\n")); + } + dlg->Destroy(); + }else{ + PrintMessage(wxT("Nothing to be added\n")); + PrintMessage(wxT("----\n")); + } + + } else { + + // Execute a sync command to get modified files + command.Clear(); + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT(" add -N ") << fileName; + output.Clear(); + ProcUtils::ExecuteCommand(command, output); + PrintMessage(output); + + } +} + +void SvnDriver::Add() { + TreeItemInfo item = m_manager->GetSelectedTreeItemInfo(TreeFileExplorer); + Add(item.m_fileName); +} + +bool SvnDriver::GetFilesList(const wxArrayString& output, wxArrayString &files) +{ + wxString str; + for(size_t i=0; iGetSelectedTreeItemInfo(TreeFileExplorer); + + DirSaver ds; + wxSetWorkingDirectory(item.m_fileName.GetPath()); + + //did we get a directory? + if (item.m_fileName.IsDir()) { + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("cleanup "); + m_curHandler = new SvnDefaultCmdHandler(this, command); + ExecCommand(command); + } +} + +///////////////////////////////////////////////////// +// Event handlers +///////////////////////////////////////////////////// + +void SvnDriver::PrintMessage(const wxArrayString &textArr) { + for(size_t i=0; iGetOutputPaneNotebook(); + wxTextCtrl *svnWin (NULL); + for (size_t i=0; i<(size_t)book->GetPageCount(); i++) { + if (book->GetPageText(i) == wxT("SVN")) { + svnWin = dynamic_cast(book->GetPage(i)); + break; + } + } + SelectSvnTab(); + + if (svnWin) { + svnWin->AppendText(text); + //make the appended line visible + svnWin->ShowPosition(svnWin->GetLastPosition()); + } +} + + + +void SvnDriver::OnSvnProcess(wxCommandEvent &event) { + m_curHandler->ProcessEvent(event); +} + +void SvnDriver::ExecStatusCommand(const wxString &path, wxString &output) { + wxString command; + DirSaver ds; + wxSetWorkingDirectory(path); + + command << wxT("\"") << m_plugin->GetOptions().GetExePath() << wxT("\" "); + command << wxT("status --xml -q --non-interactive --no-ignore "); + + wxArrayString outputArr; + ProcUtils::ExecuteCommand(command, outputArr); + + for(size_t i=0; iStop(); + } +} diff --git a/Subversion/svndriver.h b/Subversion/svndriver.h new file mode 100644 index 0000000000..9269a33d12 --- /dev/null +++ b/Subversion/svndriver.h @@ -0,0 +1,71 @@ +#ifndef SVNDRIVER_H +#define SVNDRIVER_H + +#include "wx/event.h" +#include "wx/filename.h" +#include "wx/dir.h" +#include "wx/process.h" +#include "async_executable_cmd.h" +#include "imanager.h" +#include "vector" + +class SvnCmdHandler; +class SubversionPlugin; + +class SvnDriver : public wxEvtHandler +{ + AsyncExeCmd *m_cmd; + IManager *m_manager; + SvnCmdHandler *m_curHandler; + std::vector m_statusCmdQueue; + SubversionPlugin *m_plugin; + bool m_commitWithPass; + +protected: + void OnSvnProcessTerminated(wxProcessEvent &event); + void OnSvnProcess(wxCommandEvent &event); + void ExecCommand(const wxString &cmd); + bool GetFilesList(const wxArrayString& output, wxArrayString &files); + void SelectSvnTab(); + void CommitWithAuth(const wxString &cmd, const TreeItemInfo &item); + +public: + SvnDriver(SubversionPlugin *plugin, IManager *mgr); + virtual ~SvnDriver(); + void PrintMessage(const wxString &text); + void PrintMessage(const wxArrayString &textArr); + void DisplayDiffFile(const wxString &content); + void DisplayLog(const wxString &outputFile, const wxString &content); + void Shutdown(); + void ExecStatusCommand(const wxString &path, wxString &output); + void SetCommitWithPassword(bool need); + + AsyncExeCmd *Svn() {return m_cmd;} + + /////////////////////////////// + //Operations: + /////////////////////////////// + + //operations on a single file + void UpdateFile(const wxFileName &fileName); + void CommitFile(const wxFileName &fileName); + void DiffFile(const wxFileName &fileName); + void RevertFile(const wxFileName &fileName); + + //operations taken from the file explorer tree + void Abort(); + void Update(); + void Commit(); + void Diff(); + void Add(); + void Add(const wxFileName &filename); + void Cleanup(); + void ChangeLog(); + void Delete(); + void Revert(); + + DECLARE_EVENT_TABLE() +}; + +#endif //SVNDRIVER_H + diff --git a/Subversion/svnhandler.cpp b/Subversion/svnhandler.cpp new file mode 100644 index 0000000000..70e0d47ac8 --- /dev/null +++ b/Subversion/svnhandler.cpp @@ -0,0 +1,155 @@ +#include "svnhandler.h" +#include "async_executable_cmd.h" +#include "svndriver.h" +#include "wx/tokenzr.h" +#include "subversion.h" +#include "svnxmlparser.h" + +void SvnDefaultCmdHandler::ProcessEvent(wxCommandEvent &event) +{ + wxString text(event.GetString()); + if (event.GetEventType() == wxEVT_ASYNC_PROC_STARTED) { + text = wxEmptyString; + } else if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + text = wxT("----\n"); + } + + text = text.Trim(); + text = text.Trim(false); + + if (text != wxT(".")) { + if (m_needLf) { + m_needLf = false; + //previous text entered was '.' + //so we probably will need a new Line Feed + text.Prepend(wxT("\n")); + } + text << wxT("\n"); + } else { + m_needLf = true; + } + + m_svnDriver->PrintMessage(text); + if (IsVerificationNeeded(text)) { + wxString message, answer; + message << wxT("SVN: Error validating server certificate\n") + << wxT("You can choose to accept the server certification permanently by clicking 'Yes',\n") + << wxT("Or you can reject it by clicking 'No'"); + int res = wxMessageBox(message, wxT("Accept Server Certification?"), wxYES_NO | wxICON_QUESTION | wxCANCEL); + if (res == wxYES) { + answer = wxT("p"); + } else if (res == wxNO) { + answer = wxT("R"); + } else { + answer = wxEmptyString; + } + + if (answer.IsEmpty() == false) { + m_svnDriver->Svn()->GetProcess()->Write(answer + wxT("\n")); + } + } +#ifdef __WXMSW__ + if (IsAuthFailed(text)) { + m_svnDriver->PrintMessage(wxT("Authentication requires\nplease wait for the login dialog ...\n")); + m_svnDriver->SetCommitWithPassword(true); + m_svnDriver->Svn()->GetProcess()->Terminate(); + } +#else + if (IsAuthFailed(text)) { + wxString password = wxGetPasswordFromUser(wxT("SVN Password:"), wxT("Password:")); + if (password.IsEmpty() == false) { + m_svnDriver->Svn()->GetProcess()->Write(password + wxT("\n")); + } + } + + if (IsUsernameRequired(text)) { + wxString username = wxGetTextFromUser(wxT("SVN Username:"), wxT("Username:")); + if (username.IsEmpty() == false) { + m_svnDriver->Svn()->GetProcess()->Write(username + wxT("\n")); + } + } + +#endif +} + +bool SvnDefaultCmdHandler::IsUsernameRequired(wxString text) +{ + if(text.MakeLower().Contains(wxT("username:"))){ + return true; + } + return false; +} + +bool SvnDefaultCmdHandler::IsAuthFailed(wxString text) +{ +#ifdef __WXMSW__ + if (text.MakeLower().Contains(wxT("authentication realm:"))) { + return true; + } + return false; +#else + if (text.MakeLower().Contains(wxT("password for '"))) { + return true; + } + return false; +#endif +} + +bool SvnDefaultCmdHandler::IsVerificationNeeded(wxString text) +{ + if (text.MakeLower().Contains(wxT("(r)eject, accept (t)emporarily or accept (p)ermanently"))) { + return true; + } + return false; +} + +void SvnCommitCmdHandler::ProcessEvent(wxCommandEvent &e) +{ + //call default handling + SvnDefaultCmdHandler::ProcessEvent(e); +} + + +void SvnDiffCmdHandler::ProcessEvent(wxCommandEvent &event) +{ + wxString text(event.GetString()); + if (event.GetEventType() == wxEVT_ASYNC_PROC_STARTED) { + text = wxT("----\n"); + } else if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + text = wxT("----\n"); + } + + if (event.GetEventType() == wxEVT_ASYNC_PROC_ADDLINE) { + m_content << event.GetString(); + m_content.Trim(); + m_content << wxT("\n"); + } else { + m_svnDriver->PrintMessage(text); + if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + //Create a diff file and open it in the editor + m_svnDriver->DisplayDiffFile(m_content); + } + } +} + +void SvnChangeLogCmdHandler::ProcessEvent(wxCommandEvent &event) +{ + wxString text(event.GetString()); + if (event.GetEventType() == wxEVT_ASYNC_PROC_STARTED) { + text = wxT("----\n"); + } else if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + text = wxT("----\n"); + } + + if (event.GetEventType() == wxEVT_ASYNC_PROC_ADDLINE) { + m_content << event.GetString(); + m_content.Trim(); + m_content << wxT("\n"); + } else { + m_svnDriver->PrintMessage(text); + if (event.GetEventType() == wxEVT_ASYNC_PROC_ENDED) { + //Create a diff file and open it in the editor + m_svnDriver->DisplayLog(m_outputFile, m_content); + } + } +} diff --git a/Subversion/svnhandler.h b/Subversion/svnhandler.h new file mode 100644 index 0000000000..5c53123614 --- /dev/null +++ b/Subversion/svnhandler.h @@ -0,0 +1,75 @@ +#ifndef SVNHANDLER_H +#define SVNHANDLER_H + +#include "wx/treectrl.h" +#include "virtualdirtreectrl.h" +#include "map" +#include "imanager.h" + +class SvnDriver; + +class SvnCmdHandler { +protected: + SvnDriver *m_svnDriver; + wxString m_cmd; + +public: + SvnCmdHandler(SvnDriver *driver, const wxString &cmd) : m_svnDriver(driver), m_cmd(cmd) {}; + virtual ~SvnCmdHandler(){} + const wxString &GetCmd() const {return m_cmd;} + virtual void ProcessEvent(wxCommandEvent &event) = 0; +}; + +//////////////////////////////////////////////////// +// Command handlers +//////////////////////////////////////////////////// +class SvnDefaultCmdHandler : public SvnCmdHandler { + bool m_needLf; + +protected: + bool IsVerificationNeeded(wxString text); + bool IsAuthFailed(wxString text); + bool IsUsernameRequired(wxString text); + +public: + SvnDefaultCmdHandler(SvnDriver *driver, const wxString &cmd) : SvnCmdHandler(driver, cmd), m_needLf(false) {} + virtual ~SvnDefaultCmdHandler(){} + virtual void ProcessEvent(wxCommandEvent &event); +}; + +class SvnCommitCmdHandler : public SvnDefaultCmdHandler { + TreeItemInfo m_item; +public: + SvnCommitCmdHandler(SvnDriver *driver, const wxString &cmd, const TreeItemInfo &item) + : SvnDefaultCmdHandler(driver, cmd) + , m_item(item) + {} + + virtual ~SvnCommitCmdHandler(){} + virtual void ProcessEvent(wxCommandEvent &event); + wxString GetCwd() const {return m_item.m_fileName.GetPath();} + const TreeItemInfo& GetItem() const {return m_item;} +}; + +class SvnDiffCmdHandler : public SvnCmdHandler { + wxString m_content; +public: + SvnDiffCmdHandler(SvnDriver *driver, const wxString &cmd) : SvnCmdHandler(driver, cmd) {} + virtual ~SvnDiffCmdHandler(){} + virtual void ProcessEvent(wxCommandEvent &event); +}; + +class SvnChangeLogCmdHandler : public SvnCmdHandler { + wxString m_content; + wxString m_outputFile; +public: + SvnChangeLogCmdHandler(SvnDriver *driver, const wxString &outputFile, const wxString &cmd) + : SvnCmdHandler(driver, cmd) + , m_outputFile(outputFile) + {} + + virtual ~SvnChangeLogCmdHandler(){} + virtual void ProcessEvent(wxCommandEvent &event); +}; + +#endif //SVNHANDLER_H diff --git a/Subversion/svnlogbasedlg.cpp b/Subversion/svnlogbasedlg.cpp new file mode 100644 index 0000000000..60cb703b38 --- /dev/null +++ b/Subversion/svnlogbasedlg.cpp @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "svnlogbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +SvnLogBaseDialog::SvnLogBaseDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxFlexGridSizer* fgSizer1; + fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); + fgSizer1->AddGrowableCol( 1 ); + fgSizer1->SetFlexibleDirection( wxBOTH ); + fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("From Revision:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlFromRevision = new wxTextCtrl( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlFromRevision, 1, wxALL|wxEXPAND, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("To Revision (leave empty for HEAD):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizer1->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_textCtrlToRevision = new wxTextCtrl( this, wxID_ANY, wxT("HEAD"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_textCtrlToRevision, 1, wxALL|wxEXPAND, 5 ); + + bSizer1->Add( fgSizer1, 1, wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("Output File:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bSizer1->Add( m_staticText5, 0, wxALL, 5 ); + + m_filePicker = new FilePicker(this, wxID_ANY); + bSizer1->Add( m_filePicker, 0, wxALL|wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOK = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer2->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); +} diff --git a/Subversion/svnlogbasedlg.h b/Subversion/svnlogbasedlg.h new file mode 100644 index 0000000000..54f348a787 --- /dev/null +++ b/Subversion/svnlogbasedlg.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __svnlogbasedlg__ +#define __svnlogbasedlg__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "filepicker.h" +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SvnLogBaseDialog +/////////////////////////////////////////////////////////////////////////////// +class SvnLogBaseDialog : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText1; + wxTextCtrl* m_textCtrlFromRevision; + wxStaticText* m_staticText3; + wxTextCtrl* m_textCtrlToRevision; + wxStaticLine* m_staticline2; + wxStaticText* m_staticText5; + FilePicker *m_filePicker; + wxStaticLine* m_staticline1; + wxButton* m_buttonOK; + wxButton* m_buttonCancel; + + public: + SvnLogBaseDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Subversion Change Log:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 459,219 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__svnlogbasedlg__ diff --git a/Subversion/svnlogdlg.cpp b/Subversion/svnlogdlg.cpp new file mode 100644 index 0000000000..d084819645 --- /dev/null +++ b/Subversion/svnlogdlg.cpp @@ -0,0 +1,8 @@ +#include "svnlogdlg.h" + +SvnLogDlg::SvnLogDlg( wxWindow* parent ) +: +SvnLogBaseDialog( parent ) +{ + +} diff --git a/Subversion/svnlogdlg.h b/Subversion/svnlogdlg.h new file mode 100644 index 0000000000..2c4c61f6e9 --- /dev/null +++ b/Subversion/svnlogdlg.h @@ -0,0 +1,25 @@ +#ifndef __svnlogdlg__ +#define __svnlogdlg__ + +/** +@file +Subclass of SvnLogBaseDialog, which is generated by wxFormBuilder. +*/ + +#include "svnlogbasedlg.h" + +/** Implementing SvnLogBaseDialog */ +class SvnLogDlg : public SvnLogBaseDialog +{ +public: + wxString GetFilePath() const{return m_filePicker->GetPath();} + wxString GetFromRevision() const{return m_textCtrlFromRevision->GetValue();} + wxString GetToRevision() const {return m_textCtrlToRevision->GetValue();} + +public: + /** Constructor */ + SvnLogDlg( wxWindow* parent ); +}; + +#endif // __svnlogdlg__ + diff --git a/Subversion/svnoptions.cpp b/Subversion/svnoptions.cpp new file mode 100644 index 0000000000..69e7921ee9 --- /dev/null +++ b/Subversion/svnoptions.cpp @@ -0,0 +1,27 @@ +#include "svnoptions.h" + +SvnOptions::SvnOptions() +: m_flags(SVN_DEFAULT_FLAGS) +, m_refreshInterval(500) +, m_exePath(wxT("svn")) +{ +} + +SvnOptions::~SvnOptions() +{ +} + +void SvnOptions::Serialize(Archive &arch) +{ + arch.Write(wxT("m_flags"), m_flags); + arch.Write(wxT("m_refreshInterval"), m_refreshInterval); + arch.Write(wxT("m_exePath"), m_exePath); +} + +void SvnOptions::DeSerialize(Archive &arch) +{ + arch.Read(wxT("m_flags"), m_flags); + arch.Read(wxT("m_refreshInterval"), m_refreshInterval); + arch.Read(wxT("m_exePath"), m_exePath); +} + diff --git a/Subversion/svnoptions.h b/Subversion/svnoptions.h new file mode 100644 index 0000000000..513dead25c --- /dev/null +++ b/Subversion/svnoptions.h @@ -0,0 +1,32 @@ +#ifndef SVNOPTIONS_H +#define SVNOPTIONS_H + +#include "serialized_object.h" + +#define SVN_UPDATE_ON_SAVE 0x00000001 +#define SVN_AUTO_ADD_FILE 0x00000002 + +#define SVN_DEFAULT_FLAGS SVN_AUTO_ADD_FILE + +class SvnOptions : public SerializedObject { + size_t m_flags; + size_t m_refreshInterval; + wxString m_exePath; +public: + SvnOptions(); + virtual ~SvnOptions(); + + void DeSerialize(Archive &arch); + void Serialize(Archive &arch); + + const size_t& GetFlags() const {return m_flags;} + void SetFlags(const size_t& flags){m_flags = flags;} + + const wxString &GetExePath() const {return m_exePath;} + void SetExePath(const wxString &path) {m_exePath = path;} + + const size_t& GetRefreshInterval() const {return m_refreshInterval;} + void SetRefreshInterval(const size_t& interval){m_refreshInterval = interval;} +}; + +#endif //SVNOPTIONS_H diff --git a/Subversion/svnoptionsbasedlg.cpp b/Subversion/svnoptionsbasedlg.cpp new file mode 100644 index 0000000000..8b8421a107 --- /dev/null +++ b/Subversion/svnoptionsbasedlg.cpp @@ -0,0 +1,86 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "svnoptionsbasedlg.h" + +/////////////////////////////////////////////////////////////////////////// + +SvnOptionsBaseDlg::SvnOptionsBaseDlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + m_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* panelSizer; + panelSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText1 = new wxStaticText( m_mainPanel, wxID_ANY, wxT("SVN executable:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizer5->Add( m_staticText1, 0, wxALL, 5 ); + + m_filePicker = new FilePicker(m_mainPanel, wxID_ANY); + bSizer5->Add( m_filePicker, 1, wxALL|wxEXPAND, 5 ); + + panelSizer->Add( bSizer5, 0, wxEXPAND, 5 ); + + m_staticline = new wxStaticLine( m_mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + panelSizer->Add( m_staticline, 0, wxEXPAND | wxALL, 5 ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 2, 2, 0, 0 ); + + m_staticText3 = new wxStaticText( m_mainPanel, wxID_ANY, wxT("Icons refresh interval (milliseconds):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + gSizer1->Add( m_staticText3, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + m_spinCtrl1 = new wxSpinCtrl( m_mainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 500, 50000, 500 ); + gSizer1->Add( m_spinCtrl1, 0, wxALL|wxEXPAND, 5 ); + + panelSizer->Add( gSizer1, 0, wxEXPAND, 5 ); + + m_checkBoxUpdateOnSave = new wxCheckBox( m_mainPanel, wxID_ANY, wxT("Update file explorer icons when saving a file"), wxDefaultPosition, wxDefaultSize, 0 ); + + panelSizer->Add( m_checkBoxUpdateOnSave, 0, wxALL, 5 ); + + m_checkBoxAutoAddNewFiles = new wxCheckBox( m_mainPanel, wxID_ANY, wxT("When adding files to project, add them to SVN as well"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxAutoAddNewFiles->SetValue(true); + + panelSizer->Add( m_checkBoxAutoAddNewFiles, 0, wxALL, 5 ); + + m_mainPanel->SetSizer( panelSizer ); + m_mainPanel->Layout(); + panelSizer->Fit( m_mainPanel ); + bSizer1->Add( m_mainPanel, 1, wxEXPAND | wxALL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* buttonSizer; + buttonSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_buttonOk = new wxButton( this, wxID_OK, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOk->SetDefault(); + buttonSizer->Add( m_buttonOk, 0, wxALL, 5 ); + + m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + buttonSizer->Add( m_buttonCancel, 0, wxALL, 5 ); + + bSizer1->Add( buttonSizer, 0, wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizer1 ); + this->Layout(); + + // Connect Events + m_checkBoxUpdateOnSave->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SvnOptionsBaseDlg::OnUpdateOnSave ), NULL, this ); + m_checkBoxAutoAddNewFiles->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SvnOptionsBaseDlg::OnAutoAddNewFiles ), NULL, this ); + m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SvnOptionsBaseDlg::OnButtonOk ), NULL, this ); +} diff --git a/Subversion/svnoptionsbasedlg.h b/Subversion/svnoptionsbasedlg.h new file mode 100644 index 0000000000..c07e9b3425 --- /dev/null +++ b/Subversion/svnoptionsbasedlg.h @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 26 2007) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __svnoptionsbasedlg__ +#define __svnoptionsbasedlg__ + +#include +#include +#include +#include +#include +#include +#include "filepicker.h" +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SvnOptionsBaseDlg +/////////////////////////////////////////////////////////////////////////////// +class SvnOptionsBaseDlg : public wxDialog +{ + private: + + protected: + wxPanel* m_mainPanel; + wxStaticText* m_staticText1; + FilePicker *m_filePicker; + wxStaticLine* m_staticline; + wxStaticText* m_staticText3; + wxSpinCtrl* m_spinCtrl1; + wxCheckBox* m_checkBoxUpdateOnSave; + wxCheckBox* m_checkBoxAutoAddNewFiles; + wxStaticLine* m_staticline2; + wxButton* m_buttonOk; + wxButton* m_buttonCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnUpdateOnSave( wxCommandEvent& event ){ event.Skip(); } + virtual void OnAutoAddNewFiles( wxCommandEvent& event ){ event.Skip(); } + virtual void OnButtonOk( wxCommandEvent& event ){ event.Skip(); } + + + public: + SvnOptionsBaseDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Subversion Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 505,212 ), long style = wxDEFAULT_DIALOG_STYLE ); + +}; + +#endif //__svnoptionsbasedlg__ diff --git a/Subversion/svnoptionsdlg.cpp b/Subversion/svnoptionsdlg.cpp new file mode 100644 index 0000000000..a99e7e6534 --- /dev/null +++ b/Subversion/svnoptionsdlg.cpp @@ -0,0 +1,43 @@ +#include "svnoptionsdlg.h" + +SvnOptionsDlg::SvnOptionsDlg( wxWindow* parent, const SvnOptions &options) +: +SvnOptionsBaseDlg( parent ) +{ + m_options = options; + m_filePicker->SetPath(m_options.GetExePath()); + m_checkBoxUpdateOnSave->SetValue(m_options.GetFlags() & SVN_UPDATE_ON_SAVE ? true : false); + m_checkBoxAutoAddNewFiles->SetValue(m_options.GetFlags() & SVN_AUTO_ADD_FILE ? true : false); + m_spinCtrl1->SetValue((int)m_options.GetRefreshInterval()); +} + +void SvnOptionsDlg::OnButtonOk( wxCommandEvent& event ) +{ + wxUnusedVar(event); + m_options.SetExePath(m_filePicker->GetPath()); + int interval = m_spinCtrl1->GetValue(); + if(interval < 500){ + interval = 500; + } + + m_options.SetRefreshInterval((size_t)interval); + EndModal(wxID_OK); +} + +void SvnOptionsDlg::OnUpdateOnSave( wxCommandEvent& event ) +{ + if(event.IsChecked()){ + m_options.SetFlags(m_options.GetFlags() | SVN_UPDATE_ON_SAVE); + }else{ + m_options.SetFlags(m_options.GetFlags() & ~(SVN_UPDATE_ON_SAVE)); + } +} + +void SvnOptionsDlg::OnAutoAddNewFiles(wxCommandEvent &event) +{ + if(event.IsChecked()){ + m_options.SetFlags(m_options.GetFlags() | SVN_AUTO_ADD_FILE); + }else{ + m_options.SetFlags(m_options.GetFlags() & ~(SVN_AUTO_ADD_FILE)); + } +} diff --git a/Subversion/svnoptionsdlg.h b/Subversion/svnoptionsdlg.h new file mode 100644 index 0000000000..f28b81749d --- /dev/null +++ b/Subversion/svnoptionsdlg.h @@ -0,0 +1,27 @@ +#ifndef __svnoptionsdlg__ +#define __svnoptionsdlg__ + +/** +@file +Subclass of SvnOptionsBaseDlg, which is generated by wxFormBuilder. +*/ + +#include "svnoptionsbasedlg.h" +#include "svnoptions.h" + +/** Implementing SvnOptionsBaseDlg */ +class SvnOptionsDlg : public SvnOptionsBaseDlg +{ + SvnOptions m_options; +protected: + // Handlers for SvnOptionsBaseDlg events. + void OnButtonOk( wxCommandEvent& event ); + void OnUpdateOnSave( wxCommandEvent& event ); + void OnAutoAddNewFiles(wxCommandEvent &event); +public: + /** Constructor */ + SvnOptionsDlg( wxWindow* parent, const SvnOptions& options ); + const SvnOptions& GetOptions() const{return m_options;} +}; + +#endif // __svnoptionsdlg__ diff --git a/Subversion/svnxmlparser.cpp b/Subversion/svnxmlparser.cpp new file mode 100644 index 0000000000..2c5adcc856 --- /dev/null +++ b/Subversion/svnxmlparser.cpp @@ -0,0 +1,58 @@ +#include "svnxmlparser.h" +#include +#include +#include "xmlutils.h" +#include + +SvnXmlParser::SvnXmlParser() +{ +} + +SvnXmlParser::~SvnXmlParser() +{ +} + +void SvnXmlParser::GetFiles(const wxString &input, wxArrayString &files, FileState state) +{ + wxString searchedState; + if(state & StateConflict){ + searchedState << wxT("conflicted"); + } + + if(state & StateModified){ + searchedState << wxT(" modified added merged deleted "); + } + + if(state & StateUnversioned){ + searchedState << wxT(" unversioned ignored "); + } + + wxStringInputStream stream(input); + wxXmlDocument doc(stream); + if(!doc.IsOk()){ + //wxLogMessage(input); + return; + } + + wxXmlNode *root = doc.GetRoot(); + if(root){ + wxXmlNode *node = XmlUtils::FindFirstByTagName(root, wxT("target")); + if(node){ + wxXmlNode *child = node->GetChildren(); + while(child){ + if(child->GetName() == wxT("entry")){ + wxString path = XmlUtils::ReadString(child, wxT("path"), wxEmptyString); + wxXmlNode *status = XmlUtils::FindFirstByTagName(child, wxT("wc-status")); + if(status){ + wxString item = XmlUtils::ReadString(status, wxT("item"), wxEmptyString); + if(path.IsEmpty() == false && searchedState.Contains(item)){ + files.Add(path); + } + } + } + child = child->GetNext(); + } + } + } +} + diff --git a/Subversion/svnxmlparser.h b/Subversion/svnxmlparser.h new file mode 100644 index 0000000000..a3f6f2b8f6 --- /dev/null +++ b/Subversion/svnxmlparser.h @@ -0,0 +1,30 @@ +#ifndef SVNXMLPARSER_H +#define SVNXMLPARSER_H + +#include "wx/string.h" +#include "wx/arrstr.h" + +class SvnXmlParser +{ +public: + enum FileState{ + //wc-status: conflict + StateConflict = 0x00000001, + + //any state that is considered as modified, such: + //wc-status: deleted, modified, added, merged + StateModified = 0x00000002, + + //wc-status: unversioned + StateUnversioned = 0x00000004 + }; + +public: + SvnXmlParser(); + ~SvnXmlParser(); + + static void GetFiles(const wxString &input, wxArrayString &files, FileState state = StateModified); +}; + +#endif //SVNXMLPARSER_H + diff --git a/change_log.txt b/change_log.txt new file mode 100644 index 0000000000..55c7250969 --- /dev/null +++ b/change_log.txt @@ -0,0 +1,44 @@ +Fixed: Bug #1794775 CC using the wrong variable +- added new FileExplorer pane +- updated plugins to get access to the popup menus of the editor +- Linux adjustments to the new File Explorer +- File explorer is now supported using the menu +- Toggle panes now toggle file explorer pane as well +- Fixed crash in debugger watches table, when using the delete all, and trying to add + new item to the table +- Separated the plugins interfaces to several files +- The PLugin is now responsible for its menu bar menu entry. +- Added class IManager to be used by the plugins to access various data in the application +- added lexer for diff files +- fixed bug in makefile lexer +- Plugin's toolbar will now get an entry at the View -> Toolbars automatically +- Adding watch - now will trigger a re-evaluation of the items in the watchs table +- Quick Watch - the text control can now be used to re-evaluate items (new -Evaluate button was added to the quick watch dialog) +- fixed makefie for linux +- Added SVN commit & SVN update functionality +- Added svn diff +- Fixed bug#[ 1809045 ] debugger does not exit... +- added subversion project +- moved virtual dir control to Plugin project from LiteEditor project +- added support for backgroud colour to SVN directories +- replaced icons for the file explorer +- SVN plugin now uses icons instead of background colour +- added Linux makefile +- added cleanup command +- added new images to the file explorer view +- updated workspace to include Subversion plugin +- Scrolling in the FileExplorer while SVN plugin is loaded will force update of the icons when needed +- added: File view is now sychronized with the editor's active document +- fixed bug with editor right click menu context - project was not set correctly +- fixed minor with SVN output on Linux +- Debugger pane is now shell window again +- Filtered out some annoying debugger messages +- added SVN Options dialog to customize some of the SVN options +- it is now possible to delete files using the keyboard (in the file view) +- added 'set new-console on' switch to gdb +- added separate console for the debugger on Linux +- fixed windows build +- added support for pending breakpoints +- added debugger 'Stack' watch for current stack +removed -g option from WinReleaseUnicode build configuration +------------------------------------------------------------------------ diff --git a/fakeroot/DEBIAN/control b/fakeroot/DEBIAN/control new file mode 100644 index 0000000000..193830ac93 --- /dev/null +++ b/fakeroot/DEBIAN/control @@ -0,0 +1,11 @@ +Package: CodeLite +Version: 0.2 +Section: Development +Architecture: i386 +Essential: no +Pre-Depends: libwxgtk2.8-0, libgtk2.0-0 +Maintainer: Eran Ifrah [eran.ifrah@gmail.com] +Description: CodeLite is a powerful open-source, cross platform code editor for the C/C++ programming languages (regulary tested on Windows XP sp2, Ubuntu 7.04 Feisty Fawn, Fedora Core 6 and Debian lenny/sid). + CodeLite is distributed under the terms of the GPL license. + CodeLite uses a sophisticated, yet intuitive interface which allows user to easly + create and build complex projects. diff --git a/formbuilder/AddIncludeFile.fbp b/formbuilder/AddIncludeFile.fbp new file mode 100644 index 0000000000..916eb826f4 --- /dev/null +++ b/formbuilder/AddIncludeFile.fbp @@ -0,0 +1,809 @@ + + + + + + + C++ + UTF-8 + connect + addincludefiledlgbase + 1000 + none + + 0 + AddIncludeFile + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + 250,-1 + AddIncludeFileDlgBase + + 626,479 + wxDEFAULT_DIALOG_STYLE + + Add Include File: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer7 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + 200,-1 + m_mainPanel + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer9 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Line that will be added: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer6 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlLineToAdd + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnTextUpdated + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Clear Cached Paths + + + m_buttonClearCachedPaths + protected + + + + + + + + + OnClearCachedPaths + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + File's full path: + + + m_staticText5 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlFullPath + protected + + + wxTE_READONLY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + Preview: + + + m_staticText6 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer12 + wxHORIZONTAL + none + + 5 + wxEXPAND | wxALL + 1 + + 1 + + + 1 + + 0 + + 0 + wxID_ANY + 0 + 1 + + + m_textCtrlPreview + protected + + + + 1 + 4 + + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 0 + + + bSizer11 + wxVERTICAL + none + + 5 + wxTOP|wxBOTTOM|wxLEFT + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Up + + + m_buttonUp + protected + + + + + + + + + OnButtonUp + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxLEFT + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Down + + + m_buttonDown + protected + + + + + + + + + OnButtonDown + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline5 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer8 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + OnButtonOK + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/AttachDbgProcBaseDlg.fbp b/formbuilder/AttachDbgProcBaseDlg.fbp new file mode 100644 index 0000000000..c138917896 --- /dev/null +++ b/formbuilder/AttachDbgProcBaseDlg.fbp @@ -0,0 +1,485 @@ + + + + + + + C++ + UTF-8 + connect + attachdbgprocbasedlg + 1000 + none + + 0 + AttachDbgProcBaseDlg + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + AttachDbgProcBaseDlg + + 445,471 + wxDEFAULT_DIALOG_STYLE + + Attach debugger to process: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Debugger to use: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + + 1 + + + 0 + wxID_ANY + + + m_choiceDebugger + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Processes: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrlProcesses + protected + + + wxLC_REPORT + + + + + + + + + + + + + + + + + + + + + OnSortColumn + + + + + + + + OnItemActivated + OnItemDeselected + + + + OnItemSelected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &Attach + + + m_buttonOk + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnBtnAttachUI + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_button2 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/BuildPage.fbp b/formbuilder/BuildPage.fbp new file mode 100644 index 0000000000..f279340339 --- /dev/null +++ b/formbuilder/BuildPage.fbp @@ -0,0 +1,119 @@ + + + + + + + C++ + UTF-8 + build_page + 1000 + + 0 + BuildPage + + . + wx/wxprec.h + 1 + 0 + 0 + + + 1 + + + 0 + wxID_ANY + + + BuildPage + + 500,300 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Available Build Systems: + + + m_staticText + protected + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_bookBuildSystems + protected + + + wxCHB_DEFAULT + + + + + + + + + + + + + diff --git a/formbuilder/DbgCommandBaseDlg.fbp b/formbuilder/DbgCommandBaseDlg.fbp new file mode 100644 index 0000000000..e0a3db433a --- /dev/null +++ b/formbuilder/DbgCommandBaseDlg.fbp @@ -0,0 +1,528 @@ + + + + + + + C++ + UTF-8 + connect + dbgcommandbasedlg + 1000 + none + + 0 + DbgCommandBaseDlg + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DbgCommandBaseDlg + + 456,160 + wxDEFAULT_DIALOG_STYLE + + Debugger Command: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1,-1 + bSizer7 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Name: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlName + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Command: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlCommand + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Add this command as a sub menu item of the editor's context menu + + + m_checkBox1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer8 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOk + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/DebuggerSettings.fbp b/formbuilder/DebuggerSettings.fbp new file mode 100644 index 0000000000..bfda2b8e7b --- /dev/null +++ b/formbuilder/DebuggerSettings.fbp @@ -0,0 +1,705 @@ + + + + + + + C++ + UTF-8 + connect + debuggersettingsbasedlg + 1000 + none + + 0 + DebuggerSettings + + ../LiteEditor + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DebuggerSettingsBaseDlg + + 537,451 + wxDEFAULT_DIALOG_STYLE + + Debugger Settings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_notebook2 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Shortcuts + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel2 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer4 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer5 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrl1 + protected + + + wxLC_REPORT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnItemActivated + OnItemDeselected + + + + OnItemSelected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer6 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &New... + + + m_buttonNewType + protected + + + + + + + + + OnNewShortcut + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Edit... + + + m_buttonEdit + protected + + + + + + + + + OnEditShortcut + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Delete + + + m_buttonDelete + protected + + + + + + + + + OnDeleteShortcut + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Loaded Debuggers + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer3 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_book + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + OnButtonCancel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/NewIneritance.fbp b/formbuilder/NewIneritance.fbp new file mode 100644 index 0000000000..7d60fae6d0 --- /dev/null +++ b/formbuilder/NewIneritance.fbp @@ -0,0 +1,570 @@ + + + + + + + C++ + UTF-8 + connect + newinheritancebasedlg + 1000 + none + + 0 + NewIneritance + + ../Gizmos + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + NewIneritanceBaseDlg + + 505,196 + wxDEFAULT_DIALOG_STYLE + + New Inheritance + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer5 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Parent class: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlInhertiance + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + More... + + + m_buttonMore + protected + + + wxBU_EXACTFIT + + + + + + OnButtonMore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Inheritance access: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'public' 'private' 'protected' + + 1 + + + 0 + wxID_ANY + + + m_choiceAccess + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/NewShortCutBaseDlg.fbp b/formbuilder/NewShortCutBaseDlg.fbp new file mode 100644 index 0000000000..aa0618b679 --- /dev/null +++ b/formbuilder/NewShortCutBaseDlg.fbp @@ -0,0 +1,528 @@ + + + + + + + C++ + UTF-8 + connect + newshortcutbasedlg + 1000 + none + + 0 + DbgCommandBaseDlg + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + DbgCommandBaseDlg + + 456,160 + wxDEFAULT_DIALOG_STYLE + + Debugger Command: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1,-1 + bSizer7 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Name: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Command: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl2 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Add this command as a sub menu item of the editor's context menu + + + m_checkBox1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer8 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &OK + + + m_button6 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Cancel + + + m_button7 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/NewWxProjectBaseDlg.fbp b/formbuilder/NewWxProjectBaseDlg.fbp new file mode 100644 index 0000000000..22e8c1f92f --- /dev/null +++ b/formbuilder/NewWxProjectBaseDlg.fbp @@ -0,0 +1,1062 @@ + + + + + + + C++ + UTF-8 + connect + newwxprojectbasedlg + 1000 + none + + 0 + NewWxProjectBaseDlg + + ../Gizmos + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + NewWxProjectBaseDlg + + 528,390 + wxDEFAULT_DIALOG_STYLE + + New wxWidgets Project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 0 + wxEXPAND + 0 + + 255,255,255 + + 1 + + + 0 + wxID_ANY + + + m_bitmapPanel + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer7 + wxVERTICAL + none + + 0 + wxEXPAND + 0 + + + ; Load From File + + 1 + + + 0 + wxID_ANY + + + m_bitmap1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline4 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 0 + wxSYS_COLOUR_BTNFACE + + 1 + + + 0 + 0 + wxID_ANY + + + m_flatNotebook1 + protected + + + wxFNB_NODRAG|wxFNB_NO_NAV_BUTTONS|wxFNB_NO_X_BUTTON + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Basics + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel2 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer5 + wxVERTICAL + none + + 0 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panelBasicInfo + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Name: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlName + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Project Path: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + DirPicker + m_dirPicker = new DirPicker(m_panelBasicInfo); + DirPicker *m_dirPicker; + #include "dirpicker.h" + m_dirPicker + protected + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Application Type: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'GUI application with Main Frame' 'Simple main with wxWidgets enabled' + + 1 + + + 0 + wxID_ANY + + + m_choiceApplicationType + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + wxWidgets Settings: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Use Unicode Build of wxWidgets + + + m_checkBoxUnicode + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + When creating GUI application, add flag -mwindows to avoid terminal console (Windows Only) + + + m_checkBoxMWindows + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + OnButtonOK + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_button2 + protected + + + + + + + + + OnButtonCancel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/OpenTypeDlg.fbp b/formbuilder/OpenTypeDlg.fbp new file mode 100644 index 0000000000..22d6260b42 --- /dev/null +++ b/formbuilder/OpenTypeDlg.fbp @@ -0,0 +1,270 @@ + + + + + + + C++ + UTF-8 + open_type_dlg + 1000 + + 0 + OpenTypeDlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + OpenTypeDlg + + 431,353 + wxDEFAULT_DIALOG_STYLE + + Open Type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + Select a type to open (you may use wildcards): + + + m_staticText + protected + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textTypeName + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_listTypes + protected + + + wxLC_NO_HEADER|wxLC_REPORT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_button2 + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/OpenWindowsPanelBase.fbp b/formbuilder/OpenWindowsPanelBase.fbp new file mode 100644 index 0000000000..cc5bcd7de6 --- /dev/null +++ b/formbuilder/OpenWindowsPanelBase.fbp @@ -0,0 +1,124 @@ + + + + + + + C++ + UTF-8 + connect + openwindowspanelbase + 1000 + none + + 0 + OpenWindowsPanelBase + + ../LiteEditor + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + OpenWindowsPanelBase + + 500,300 + + + + + wxTAB_TRAVERSAL|wxWANTS_CHARS + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 0 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_fileList + protected + + + wxLB_SORT + + + + + + OnChar + + + OnKeyDown + + + + + + + OnItemSelected + OnItemDClicked + + + + + + + + + + OnRightUp + + + + + + + + + diff --git a/formbuilder/PluginWizard_P1.fbp b/formbuilder/PluginWizard_P1.fbp new file mode 100644 index 0000000000..858983daaa --- /dev/null +++ b/formbuilder/PluginWizard_P1.fbp @@ -0,0 +1,384 @@ + + + + + + + C++ + UTF-8 + connect + pluginwizard_page1 + 1000 + none + + 0 + PluginWizard_P1 + + ../Gizmos + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + PluginWizardPage1 + + 477,425 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + General Information: + + + m_staticText5 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Plugin Name: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlPluginName + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Description: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlDescription + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/PluginWizard_P2.fbp b/formbuilder/PluginWizard_P2.fbp new file mode 100644 index 0000000000..357b6e4747 --- /dev/null +++ b/formbuilder/PluginWizard_P2.fbp @@ -0,0 +1,408 @@ + + + + + + + C++ + UTF-8 + connect + pluginwizard_pag2 + 1000 + none + + 0 + PluginWizard_P2 + + ../Gizmos + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + PluginWizardPage2 + + 477,425 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Build Information: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Project Path: + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + DirPicker + m_dirPicker = new DirPicker(this); + DirPicker *m_dirPicker; + #include "dirpicker.h" + m_dirPicker + protected + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + File Name (will be used for header and source): + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl2 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Select to root path for CodeLite source files: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + DirPicker + m_rootPath = new DirPicker(this); + DirPicker *m_rootPath; + #include "dirpicker.h" + m_rootPath + protected + + + + + + + diff --git a/formbuilder/QuickOutline.fbp b/formbuilder/QuickOutline.fbp new file mode 100644 index 0000000000..696219dcf0 --- /dev/null +++ b/formbuilder/QuickOutline.fbp @@ -0,0 +1,186 @@ + + + + + + + C++ + UTF-8 + connect + quickoutlinedlg + 1000 + none + + 0 + QuickOutline + + ..\LiteEditor\ + wx/wxprec.h + 1 + 0 + 0 + + wxSYS_COLOUR_INFOBK + + + 1 + + + + 0 + wxID_ANY + + + QuickOutlineDlg + + 371,386 + + + + + + wxRAISED_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxSYS_COLOUR_INFOBK + + 1 + + + 0 + wxID_ANY + + 0 + + m_textFilter + protected + + + + + + + + wxNO_BORDER + + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 0 + + wxSYS_COLOUR_INFOBK + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxSYS_COLOUR_INFOBK + + 1 + + + 0 + wxID_ANY + + + m_treeOutline + protected + + + wxTR_DEFAULT_STYLE + + + + wxNO_BORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/SvnOptionsBaseDlg.fbp b/formbuilder/SvnOptionsBaseDlg.fbp new file mode 100644 index 0000000000..49e76ed040 --- /dev/null +++ b/formbuilder/SvnOptionsBaseDlg.fbp @@ -0,0 +1,649 @@ + + + + + + + C++ + UTF-8 + connect + svnoptionsbasedlg + 1000 + none + + 0 + SvnOptionsBaseDlg + + ../Subversion + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + SvnOptionsBaseDlg + + 505,212 + wxDEFAULT_DIALOG_STYLE + + Subversion Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_mainPanel + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + panelSizer + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer5 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + SVN executable: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + m_filePicker = new FilePicker(m_mainPanel, wxID_ANY); + FilePicker *m_filePicker; + #include "filepicker.h" + m_filePicker + protected + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 2 + 0 + + gSizer1 + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + Icons refresh interval (milliseconds): + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + 500 + 50000 + + 500 + + m_spinCtrl1 + protected + + + wxSP_ARROW_KEYS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Update file explorer icons when saving a file + + + m_checkBoxUpdateOnSave + protected + + + + + + + + + + OnUpdateOnSave + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + When adding files to project, add them to SVN as well + + + m_checkBoxAutoAddNewFiles + protected + + + + + + + + + + OnAutoAddNewFiles + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + buttonSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOk + protected + + + + + + + + + OnButtonOk + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/ThreadListBasePanel.fbp b/formbuilder/ThreadListBasePanel.fbp new file mode 100644 index 0000000000..cd5269b1d1 --- /dev/null +++ b/formbuilder/ThreadListBasePanel.fbp @@ -0,0 +1,141 @@ + + + + + + + C++ + UTF-8 + connect + threadlistbasepanel + 1000 + none + + 0 + ThreadListBasePanel + + ../LiteEditor + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + ThreadListBasePanel + + 500,300 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_list + protected + + + wxLC_HRULES|wxLC_REPORT|wxLC_VRULES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnItemActivated + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/ThreeButtonBaseDlg.fbp b/formbuilder/ThreeButtonBaseDlg.fbp new file mode 100644 index 0000000000..733c818f8f --- /dev/null +++ b/formbuilder/ThreeButtonBaseDlg.fbp @@ -0,0 +1,504 @@ + + + + + + + C++ + UTF-8 + connect + threebuttonbasedlg + 35000 + none + + 0 + ThreeButtonBaseDlg + + ../Plugin + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + ThreeButtonBaseDlg + + 399,147 + wxDEFAULT_DIALOG_STYLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_mainPanel + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + question_and_answer; Load From Resource + + 1 + + + 0 + wxID_ANY + + + m_bitmap + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + Message + + + m_message + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Remember my answer and dont ask me again + + + m_checkBoxRememberMyAnwer + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + buttonSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_OK + &Yes + + + m_buttonYes + protected + + + + + + + + + OnButtonYes + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_NO + &No + + + m_buttonNo + protected + + + + + + + + + OnButtonNo + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + OnButtonCancel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/add_dialog.fbp b/formbuilder/add_dialog.fbp new file mode 100644 index 0000000000..a1ea1a672a --- /dev/null +++ b/formbuilder/add_dialog.fbp @@ -0,0 +1,199 @@ + + + + + + + C++ + UTF-8 + add_option_dialog + 1000 + + 0 + MyProject2 + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + MyDialog2 + + 481,299 + wxDEFAULT_DIALOG_STYLE + + Edit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer23 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_text + protected + + + wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline9 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer24 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/advance_settings.fbp b/formbuilder/advance_settings.fbp new file mode 100644 index 0000000000..35673b807e --- /dev/null +++ b/formbuilder/advance_settings.fbp @@ -0,0 +1,376 @@ + + + + + + + C++ + UTF-8 + connect + advanced_settings + 1000 + none + + 0 + MyProject2 + + . + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + AdvancedDlg + + 902,662 + wxDEFAULT_DIALOG_STYLE + + Advanced + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + 0 + wxSYS_COLOUR_BTNFACE + + 1 + + + 0 + 0 + wxID_ANY + + + m_notebook + protected + + + wxFNB_BACKGROUND_GRADIENT|wxFNB_DEFAULT_STYLE|wxFNB_DROPDOWN_TABS_LIST|wxFNB_NO_NAV_BUTTONS|wxFNB_NO_X_BUTTON|wxFNB_VC8 + + + + + + + + Compilers + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_compilersPage + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer5 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxEXPAND + 0 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + Create New Compiler: + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxALIGN_RIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + New... + + + m_buttonNewCompiler + protected + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + 0 + wxSYS_COLOUR_BTNFACE + + 1 + + + 0 + 0 + wxID_ANY + + + m_compilersNotebook + protected + + + wxFNB_BACKGROUND_GRADIENT|wxFNB_DROPDOWN_TABS_LIST|wxFNB_NO_NAV_BUTTONS|wxFNB_NO_X_BUTTON|wxFNB_VC8 + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline10 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/breakpoint_dlg.fbp b/formbuilder/breakpoint_dlg.fbp new file mode 100644 index 0000000000..3329d8ad7b --- /dev/null +++ b/formbuilder/breakpoint_dlg.fbp @@ -0,0 +1,253 @@ + + + + + + + C++ + UTF-8 + connect + breakpoint_dlg_base + 1000 + none + + 0 + BreakpointDlg + + ../LiteEditor + wx/wxprec.h + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + BreakpointDlgBase + + 352,285 + wxDEFAULT_DIALOG_STYLE + + Breakpoints + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer16 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer19 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_listBreakpoints + protected + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer20 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + &Delete + + + m_buttonDelete + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Delete &All + + + m_buttonDeleteAll + protected + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline10 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer17 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_OK + &Close + + + m_button27 + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/close_all_dialog.fbp b/formbuilder/close_all_dialog.fbp new file mode 100644 index 0000000000..3cb0c92220 --- /dev/null +++ b/formbuilder/close_all_dialog.fbp @@ -0,0 +1,226 @@ + + + + + + + C++ + UTF-8 + close_all_dlg + 1000 + + 0 + CloseAllDialog + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + CloseAllDialog + + 424,127 + wxDEFAULT_DIALOG_STYLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_mainPanel + protected + + + + + + wxTAB_TRAVERSAL + + + + panelSizer + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 1 + + + 1 + + + 0 + wxID_ANY + + + + m_staticMsg + protected + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + buttonSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Ask me for each file + + + m_buttonSave + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Save all files + + + m_buttonSaveAllFiles + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Discard changes for all files + + + m_buttonDiscardChangesForAllFiles + protected + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/codeformatterdlg.fbp b/formbuilder/codeformatterdlg.fbp new file mode 100644 index 0000000000..197ae1dfe4 --- /dev/null +++ b/formbuilder/codeformatterdlg.fbp @@ -0,0 +1,1659 @@ + + + + + + + C++ + UTF-8 + connect + codeforammaterbasedlg + 1000 + none + + 0 + CodeFormatter + + ../CodeFormatter/ + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + 589,618 + CodeFormatterBaseDlg + + 589,618 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + AStyle Preferences + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer3 + wxVERTICAL + none + + 0 + wxALL|wxEXPAND + 0 + + + 'GNU' 'Java' 'K&&R' 'Linux' 'ANSI' + + 1 + + + 0 + wxID_ANY + Predefined Style: + 1 + + + m_radioBoxPredefinedStyle + protected + + 3 + + wxRA_SPECIFY_ROWS + + + + + + + + + + + + + + + + + + + + + + + OnRadioBoxPredefinedStyle + + + + + + + + + + 0 + wxALL|wxEXPAND + 0 + + + 'Break Closing' 'Attach' 'Linux' 'Break' + + 1 + + + 0 + wxID_ANY + Brackets: + 1 + + + m_radioBoxBrackets + protected + + 2 + + wxRA_SPECIFY_ROWS + + + + + + + + + + + + + + + + + + + + + + + OnRadioBoxBrackets + + + + + + + + + + 5 + wxEXPAND + 0 + + Indentation: + + sbSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 2 + 0 + + gSizer1 + none + 5 + 0 + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Class + + + m_checkBoxIndetClass + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Brackets + + + m_checkBoxIndentBrackets + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Switches + + + m_checkBoxIndetSwitch + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Namespaces + + + m_checkBoxIndentNamespaces + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Case + + + m_checkBoxIndetCase + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Labels + + + m_checkBoxIndentLabels + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Blocks + + + m_checkBoxIndetBlocks + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Preprocessors + + + m_checkBoxIndentPreprocessors + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Max Instatement Indent + + + m_checkBoxIndentMaxInst + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Min Conditional Indent + + + m_checkBoxIndentMinCond + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + Formatting Options: + + sbSizer2 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 2 + 0 + + gSizer2 + none + 2 + 0 + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Break Blocks + + + m_checkBoxFormatBreakBlocks + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Pad Parenthesis + + + m_checkBoxFormatPadParenth + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Break Blocks All + + + m_checkBoxFormatBreakBlocksAll + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Pad Parenthesis Outside + + + m_checkBoxFormatPadParentOut + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Break else-if + + + m_checkBoxFormatBreakElseif + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Pad Parenthesis Inside + + + m_checkBoxFormatPadParentIn + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Pad Operators + + + m_checkBoxFormatPadOperators + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + UnPad Parenthesis + + + m_checkBoxFormatUnPadParent + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + One Line Keep Statement + + + m_checkBoxFormatOneLineKeepStmnt + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Fill Empty Lines + + + m_checkBoxFormatFillEmptyLines + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + One Line Keep Blocks + + + m_checkBoxFormatOneLineKeepBlocks + protected + + + + + + + + + + OnCheckBox + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + ,90,90,8,76,0 + 0 + wxID_ANY + + 0 + -1,200 + m_textCtrlPreview + protected + + + wxTE_MULTILINE|wxTE_READONLY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Close + + + m_buttonClose + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Help + + + m_buttonHelp + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/compiler_page.fbp b/formbuilder/compiler_page.fbp new file mode 100644 index 0000000000..d2e4dedb1a --- /dev/null +++ b/formbuilder/compiler_page.fbp @@ -0,0 +1,948 @@ + + + + + + + C++ + UTF-8 + connect + compiler_page + 1000 + none + + 0 + CompilerPage + + . + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + CompilerPage + + 802,652 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 0 + wxALL|wxEXPAND + 0 + + + bSizer11 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + Compiler Error Pattern: + + sbSizer5 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Regex Pattern: + + + m_staticText5 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textErrorPattern + protected + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + File Index in Pattern: + + + m_staticText6 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textErrorFileIndex + protected + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Line Number in Pattern: + + + m_staticText7 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textErrorLineNumber + protected + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 1 + + Compiler Warning Pattern: + + sbSizer4 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Regex Pattern: + + + m_staticText51 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textWarnPattern + protected + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + File Index in Pattern: + + + m_staticText61 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textWarnFileIndex + protected + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Line Number in Pattern: + + + m_staticText71 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textWarnLineNumber + protected + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + Tools: + + sbSizer41 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 4 + wxBOTH + 1,3 + + 0 + + fgSizer4 + wxFLEX_GROWMODE_SPECIFIED + none + 3 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Compiler Name: + + + m_staticText9 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCompilerName + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Linker Name: + + + m_staticText11 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textLinkerName + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Shared Object Linker: + + + m_staticText12 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textSOLinker + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Archive Tool: + + + m_staticText10 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textArchiveTool + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Resource Compiler: + + + m_staticText14 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textResourceCmp + protected + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Switches: + + + m_staticText8 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listSwitches + protected + + + wxLC_REPORT + + + + + + + + + + + + + + + + + + OnItemActivated + + + + + OnItemSelected + + + + + + 0 + wxALL|wxEXPAND + 0 + + 2 + wxBOTH + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Object extesion: + + + m_staticText3 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textObjectExtension + protected + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/configuration_manager.fbp b/formbuilder/configuration_manager.fbp new file mode 100644 index 0000000000..9183a2789d --- /dev/null +++ b/formbuilder/configuration_manager.fbp @@ -0,0 +1,374 @@ + + + + + + + C++ + UTF-8 + connect + configuration_manager_base_dlg + 1000 + none + + 0 + ConfigurationManager + + . + wx/wxprec.h + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + ConfigManagerBaseDlg + + 726,425 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Configuration Manager + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer6 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Workspace Configuration: + + + m_staticText2 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_choiceConfigurations + protected + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline6 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Available project configurations: + + + m_staticText20 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + + + sbSizer2 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_scrolledWindow + protected + + 5 + 5 + + + + + wxTAB_TRAVERSAL|wxVSCROLL|wxWANTS_CHARS + + + 2 + wxBOTH + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 100 + 0 + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Apply + + + m_buttonApply + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/ctags.fbp b/formbuilder/ctags.fbp new file mode 100644 index 0000000000..f82fce0239 --- /dev/null +++ b/formbuilder/ctags.fbp @@ -0,0 +1,157 @@ + + + + + + C++ + ctags_dialog + 1000 + + 0 + Ctags + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + CtagsOptionsDlgBase + + 513,377 + wxDEFAULT_DIALOG_STYLE + + CTags Options + + + + + + + + mainSizer + wxVERTICAL + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_book + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &OK + + + m_okBtn + protected + + + + + + + + OnButtonOK + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Close + + + m_closeBtn + protected + + + + + + + + OnButtonClose + + + + + + + + diff --git a/formbuilder/ctags_advance_page.fbp b/formbuilder/ctags_advance_page.fbp new file mode 100644 index 0000000000..bf295d8f81 --- /dev/null +++ b/formbuilder/ctags_advance_page.fbp @@ -0,0 +1,291 @@ + + + + + + C++ + options_panel + 1000 + + 0 + MyProject3 + . + wx/wxprec.h + 1 + 0 + 0 + + + 1 + + + 0 + wxID_ANY + + + OptionsPanel + + 500,206 + + + + wxTAB_TRAVERSAL + + + + bSizer5 + wxVERTICAL + + 5 + wxALL|wxEXPAND + 0 + + Special Preprocessors: + + sbSizer2 + wxVERTICAL + + 5 + wxEXPAND + 1 + + + bSizer6 + wxHORIZONTAL + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxTOP + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_macros + protected + + + + + List of Comma separated macros to be handled by CTAGS + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxTOP + 0 + + + 1 + + + 0 + wxID_ANY + ... + + + m_addButton + protected + + 20,-1 + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + General + + sbSizer4 + wxVERTICAL + + 5 + wxEXPAND + 1 + + + bSizer7 + wxHORIZONTAL + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + File Types: + + + m_staticText3 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_fileTypes + protected + + + + + + *.cxx;*.cc;*.cpp;*.c;*.hpp;*.h; + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer8 + wxHORIZONTAL + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Language: + + + m_staticText4 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 'C/C++' 'Java' + 1 + + + 0 + wxID_ANY + + + m_languages + protected + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer9 + wxHORIZONTAL + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + 1 + + + 0 + wxID_ANY + Parse Comments + + + m_parseComments + protected + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/debuggerpanel.fbp b/formbuilder/debuggerpanel.fbp new file mode 100644 index 0000000000..0b4a3cd623 --- /dev/null +++ b/formbuilder/debuggerpanel.fbp @@ -0,0 +1,310 @@ + + + + + + + C++ + UTF-8 + connect + debuggerpanel + 1000 + none + + 0 + DebuggerDemo + + . + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + DebuggerPanel + + 576,566 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textOutput + protected + + + wxTE_MULTILINE|wxTE_PROCESS_ENTER + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Start + + + m_btnStart + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Run + + + m_btnRun + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Pause + + + m_btnPause + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Stop + + + m_btnStop + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Next + + + m_btnNext + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Step In + + + m_btnStepIn + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Step Out + + + m_btnStepOut + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/depend_dlg_page.fbp b/formbuilder/depend_dlg_page.fbp new file mode 100644 index 0000000000..fde8cfb996 --- /dev/null +++ b/formbuilder/depend_dlg_page.fbp @@ -0,0 +1,186 @@ + + + + + + + C++ + UTF-8 + depend_dlg_page + 1000 + + 0 + depend_dlg_page + + . + wx/wxprec.h + 1 + 0 + 0 + + + 1 + + + 0 + wxID_ANY + + + DependenciesPage + + 500,300 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer3 + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + 1 + + + 0 + wxID_ANY + Projects: + + + m_staticText1 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_checkListProjectList + protected + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + 1 + + + 0 + wxID_ANY + Build Order: + + + m_staticText2 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listBoxBuildOrder + protected + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/depends_dlg.fbp b/formbuilder/depends_dlg.fbp new file mode 100644 index 0000000000..94ce806f50 --- /dev/null +++ b/formbuilder/depends_dlg.fbp @@ -0,0 +1,195 @@ + + + + + + + C++ + UTF-8 + depends_dlg + 1000 + + 0 + depends_dlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + DependenciesDlg + + 532,361 + wxDEFAULT_DIALOG_STYLE + + Dependencies + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_book + protected + + + wxCHB_DEFAULT + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/edit_configuration.fbp b/formbuilder/edit_configuration.fbp new file mode 100644 index 0000000000..4eab46c94a --- /dev/null +++ b/formbuilder/edit_configuration.fbp @@ -0,0 +1,264 @@ + + + + + + + C++ + UTF-8 + edit_configuration + 1000 + + 0 + EditConfiguration + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + EditConfigurationDialog + + 338,199 + wxDEFAULT_DIALOG_STYLE + + Edit Configurations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer15 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_panel6 + protected + + + + + + wxTAB_TRAVERSAL + + + + bSizer17 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_configurationsList + protected + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer18 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Delete + + + m_buttonDelete + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Rename + + + m_buttonRename + protected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline9 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_CENTER + 0 + + + bSizer16 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + Close + + + m_buttonClose + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/eidt_workspace_conf_dlg.fbp b/formbuilder/eidt_workspace_conf_dlg.fbp new file mode 100644 index 0000000000..de8de5ed60 --- /dev/null +++ b/formbuilder/eidt_workspace_conf_dlg.fbp @@ -0,0 +1,198 @@ + + + + + + + C++ + UTF-8 + edit_workspace_conf_dlg + 1000 + + 0 + eidt_workspace_conf_dlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + EditWorkspaceConfDlg + + 362,261 + wxDEFAULT_DIALOG_STYLE + + Edit Workspace Configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_wspConfList + protected + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + btnSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &Rename + + + m_buttonRename + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &Delete + + + m_buttonDelete + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CLOSE + &Close + + + m_buttonClose + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/envvar_dlg.fbp b/formbuilder/envvar_dlg.fbp new file mode 100644 index 0000000000..fa159cc1ad --- /dev/null +++ b/formbuilder/envvar_dlg.fbp @@ -0,0 +1,319 @@ + + + + + + + C++ + UTF-8 + envvar_dlg + 1000 + + 0 + EnvVarDlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + EnvVarDlg + + 320,152 + wxDEFAULT_DIALOG_STYLE + + Environment Variable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer4 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + 2 + wxBOTH + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + 1 + + + 0 + wxID_ANY + Variable Name: + + + m_staticText4 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textName + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + 1 + + + 0 + wxID_ANY + Variable Value: + + + m_staticText3 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textValue + protected + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline3 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer11 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCacnel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/envvar_table_dlg.fbp b/formbuilder/envvar_table_dlg.fbp new file mode 100644 index 0000000000..168e2db4ef --- /dev/null +++ b/formbuilder/envvar_table_dlg.fbp @@ -0,0 +1,240 @@ + + + + + + + C++ + UTF-8 + envvar_table + 1000 + + 0 + EnvVarTableDlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + EnvVarsTableDlg + + 552,330 + wxDEFAULT_DIALOG_STYLE + + Environment Variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer12 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_listVarsTable + protected + + + wxLC_REPORT|wxLC_SINGLE_SEL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline4 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer13 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + New... + + + m_buttonNew + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/eran1.txt b/formbuilder/eran1.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/formbuilder/ext_db_page1.fbp b/formbuilder/ext_db_page1.fbp new file mode 100644 index 0000000000..c5cc918baf --- /dev/null +++ b/formbuilder/ext_db_page1.fbp @@ -0,0 +1,220 @@ + + + + + + + C++ + UTF-8 + connect + ext_db_page1 + 1000 + none + + 0 + ext_db_page1 + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + ExtDbPage1 + + 400,305 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Please select the root path to your include files: + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 0 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Browse + + + m_dirPicker + protected + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + + sbSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + LiteEditor will parse and store symbols for every file that matches the file association pattern, as provided in the ctags options dialog + + + m_staticText3 + protected + + + + + + + + -1 + + + + + + + + + diff --git a/formbuilder/ext_db_page2.fbp b/formbuilder/ext_db_page2.fbp new file mode 100644 index 0000000000..466e3e3f7b --- /dev/null +++ b/formbuilder/ext_db_page2.fbp @@ -0,0 +1,263 @@ + + + + + + + C++ + UTF-8 + connect + ext_db_page2 + 1000 + none + + 0 + ext_db_page2 + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + ExtDbPage2 + + 400,305 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Enter directories to be ignored (wildcards are allowed): + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 0 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxTOP|wxBOTTOM|wxLEFT + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textSkipPattern + protected + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM + 0 + + + + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAdd + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + + sbSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + To make your database a small as possible (i.e. better performance), LiteEditor allows you to specify list of directories names pattern to be skipped while fetching the files list to be parsed + + + m_staticText3 + protected + + + + + + + + -1 + + + + + + + + + diff --git a/formbuilder/ext_db_page3.fbp b/formbuilder/ext_db_page3.fbp new file mode 100644 index 0000000000..84ab362b8c --- /dev/null +++ b/formbuilder/ext_db_page3.fbp @@ -0,0 +1,224 @@ + + + + + + + C++ + UTF-8 + connect + ext_db_page3 + 1000 + none + + 0 + ext_db_page3 + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + ExtDbPage3 + + 400,305 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Please enter a name for the symbol database: + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 0 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textDbName + protected + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + + sbSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + LiteEditor will store the symbols parsed from the input files into this database (SQLite based). If a database with name already exist, the new symbols will be appended to it. + + + m_staticText3 + protected + + + + + + + + -1 + + + + + + + + + diff --git a/formbuilder/fnb_customize_dlg.fbp b/formbuilder/fnb_customize_dlg.fbp new file mode 100644 index 0000000000..b0668d057e --- /dev/null +++ b/formbuilder/fnb_customize_dlg.fbp @@ -0,0 +1,157 @@ + + + + + + C++ + fnb_customize_dlg + 1000 + + 0 + MyProject2 + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + wxFNBCustomizeDialog + + 428,404 + wxDEFAULT_DIALOG_STYLE + + Customize + + + + + + + + mainSizer + wxVERTICAL + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_notebook1 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &OK + + + m_okButton + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &Cancel + + + m_cancel + protected + + + + + + + + + + + + + + + + diff --git a/formbuilder/free_text)dialog.fbp b/formbuilder/free_text)dialog.fbp new file mode 100644 index 0000000000..ae52300362 --- /dev/null +++ b/formbuilder/free_text)dialog.fbp @@ -0,0 +1,199 @@ + + + + + + + C++ + UTF-8 + free_text_dialog + 1000 + + 0 + |FreeTextDialog + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + FreeTextDialog + + 481,299 + wxDEFAULT_DIALOG_STYLE + + Edit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer23 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_text + protected + + + wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline9 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer24 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/key_value_dlg.fbp b/formbuilder/key_value_dlg.fbp new file mode 100644 index 0000000000..666091ffa4 --- /dev/null +++ b/formbuilder/key_value_dlg.fbp @@ -0,0 +1,214 @@ + + + + + + + C++ + UTF-8 + connect + keyvaluetabledlg + 1000 + + 0 + KeyValueTableDlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + KeyValueTableDlg + + 552,330 + wxDEFAULT_DIALOG_STYLE + + Variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer12 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_listVarsTable + protected + + + wxLC_REPORT|wxLC_SINGLE_SEL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline4 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer13 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + &Close + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/lexer_page.fbp b/formbuilder/lexer_page.fbp new file mode 100644 index 0000000000..3bc827446d --- /dev/null +++ b/formbuilder/lexer_page.fbp @@ -0,0 +1,141 @@ + + + + + + C++ + lexer_page + 1000 + + 0 + LexerPanel + . + wx/wxprec.h + 1 + 0 + 0 + + + 1 + + + 0 + wxID_ANY + + + LexerPage + + 285,300 + + + + wxTAB_TRAVERSAL + + + + bSizer6 + wxVERTICAL + + 5 + wxEXPAND + 1 + + Display Item: + + sbSizer5 + wxHORIZONTAL + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_properties + protected + + + + + + + + OnItemSelected + + + + + 5 + wxEXPAND + 1 + + + bSizer7 + wxVERTICAL + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + Change Font... + + + m_fontPicker + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + Change Colour... + + + m_colourPicker + protected + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/listctrlpanel.fbp b/formbuilder/listctrlpanel.fbp new file mode 100644 index 0000000000..196f7c73d7 --- /dev/null +++ b/formbuilder/listctrlpanel.fbp @@ -0,0 +1,141 @@ + + + + + + + C++ + UTF-8 + connect + listctrlpanelbase + 1000 + none + + 0 + ListCtrlPanel + + ../LiteEditor + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + ListCtrlPanelBase + + 500,300 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 1 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrl + protected + + + wxLC_REPORT|wxLC_SINGLE_SEL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnItemActivated + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/logindlg.fbp b/formbuilder/logindlg.fbp new file mode 100644 index 0000000000..808ddf8e21 --- /dev/null +++ b/formbuilder/logindlg.fbp @@ -0,0 +1,476 @@ + + + + + + + C++ + UTF-8 + connect + logindlgbase + 1000 + none + + 0 + LoginDialog + + ../Subversion + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + LoginBaseDialog + + 308,155 + wxDEFAULT_DIALOG_STYLE + + Login: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Username: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlUsername + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Password: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlPassword + protected + + + wxTE_PASSWORD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/move_func_impl.fbp b/formbuilder/move_func_impl.fbp new file mode 100644 index 0000000000..fbc14807b2 --- /dev/null +++ b/formbuilder/move_func_impl.fbp @@ -0,0 +1,430 @@ + + + + + + + C++ + UTF-8 + connect + movefuncimplbasedlg + 1000 + none + + 0 + MoveFunctionImpl + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + MoveFuncImplBaseDlg + + 746,422 + wxDEFAULT_DIALOG_STYLE + + Move Function Implementation Preview + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer6 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer7 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Select file to place the function implementation: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + FilePicker + m_filePicker = new FilePicker(this); + FilePicker *m_filePicker; + #include "filepicker.h" + m_filePicker + protected + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Function's implementation (you can edit the below code): + + + m_staticText5 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + 1 + + + 1 + + 1 + ,90,90,-1,76,0 + 0 + wxID_ANY + 1 + 1 + + + m_preview + protected + + + + 1 + 4 + + 1 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer8 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + OnButtonOK + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttoncancel + protected + + + + + + + + + OnButtonCancel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/new_configuration.fbp b/formbuilder/new_configuration.fbp new file mode 100644 index 0000000000..253bb6a2a2 --- /dev/null +++ b/formbuilder/new_configuration.fbp @@ -0,0 +1,307 @@ + + + + + + + C++ + UTF-8 + new_configuration_dlg + 1000 + + 0 + NewConfigurationDlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + NewConfigurationDlg + + 352,199 + wxDEFAULT_DIALOG_STYLE + + New Configuration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + + bSizer3 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Configuration Name: + + + m_staticText1 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textConfigurationName + protected + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Copy Settings from: + + + m_staticText2 + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_choiceCopyConfigurations + protected + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/new_item_dlg.fbp b/formbuilder/new_item_dlg.fbp new file mode 100644 index 0000000000..bf77ee9aab --- /dev/null +++ b/formbuilder/new_item_dlg.fbp @@ -0,0 +1,329 @@ + + + + + + C++ + new_item_dlg + 1000 + + 0 + NewItemDlg + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + NewItemDlg + + 539,292 + wxDEFAULT_DIALOG_STYLE + + + + + + + + + + m_mainSizer + wxVERTICAL + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_fileType + protected + + + wxLC_SINGLE_SEL|wxLC_SMALL_ICON + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 3 + wxHORIZONTAL + 1 + + 5 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + 2 + 2 + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Location: + + + m_staticText3 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_location + protected + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Browse + + + m_browseBtn + protected + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Name: + + + m_staticText6 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl4 + protected + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer6 + wxHORIZONTAL + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Create + + + m_okButton + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &Cancel + + + m_cancel + protected + + + + + + + + + + + + + + + + diff --git a/formbuilder/newclasswizard.fbp b/formbuilder/newclasswizard.fbp new file mode 100644 index 0000000000..ad36455488 --- /dev/null +++ b/formbuilder/newclasswizard.fbp @@ -0,0 +1,679 @@ + + + + + + + C++ + UTF-8 + connect + newclassbasedlg + 1000 + none + + 0 + NewClassBaseDlg + + ../Gizmos + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + NewClassBaseDlg + + 690,631 + wxDEFAULT_DIALOG_STYLE + + New Class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 0 + wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 0 + wxALL|wxEXPAND + 1 + + 255,255,255 + + 1 + + + 0 + wxID_ANY + + + m_mainPanel + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer3 + wxVERTICAL + none + + 0 + wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + ; Load From File + + 1 + + + 0 + wxID_ANY + + + m_bmp + protected + + + + + + + + + + + + + + + + 0 + wxEXPAND|wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxEXPAND + 0 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Name: + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textClassName + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Class folder: + + + m_staticText2 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + DirPicker + m_dirPicker = new DirPicker(this, wxID_ANY); + DirPicker *m_dirPicker; + #include "dirpicker.h" + m_dirPicker + protected + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline6 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Inherits: + + + m_staticText9 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND + 1 + + + bSizer15 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listCtrl1 + protected + + + wxLC_HRULES|wxLC_REPORT|wxLC_VRULES + + + + + + + + + + + + + + + + + + OnListItemActivated + OnListItemDeSelected + + + + OnListItemSelected + + + + + + 5 + wxEXPAND + 0 + + + bSizer16 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + ID_ADD_INHERITANCE + Add... + + + m_buttonAddInheritance + protected + + + + + + + + OnButtonAdd + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + ID_DELETE_INHERITANCE + Delete + + + m_buttonDelInheritance + protected + + + + + + + + OnButtonDelete + OnButtonDeleteUI + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + This is a singleton class + + + m_checkBox6 + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Virtual destructor + + + m_checkBoxVirtualDtor + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Declare this class as non-copyable class + + + m_checkBoxCopyable + protected + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline5 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + buttonSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + OnButtonOK + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/newplugin.fbp b/formbuilder/newplugin.fbp new file mode 100644 index 0000000000..59c86d9975 --- /dev/null +++ b/formbuilder/newplugin.fbp @@ -0,0 +1,92 @@ + + + + + + + C++ + UTF-8 + connect + newpluginbasedlg + 1000 + none + + 0 + NewPlugin + + ../Gizmos/ + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + NewPluginBaseDlg + + 628,447 + wxDEFAULT_DIALOG_STYLE + + New Plugin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + btnSizer + wxVERTICAL + none + + + + + + diff --git a/formbuilder/open_resource_dlg.fbp b/formbuilder/open_resource_dlg.fbp new file mode 100644 index 0000000000..52616dbfdb --- /dev/null +++ b/formbuilder/open_resource_dlg.fbp @@ -0,0 +1,282 @@ + + + + + + + C++ + UTF-8 + open_resouce_dlg + 1000 + + 0 + open_resouce_dlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + OpenResourceDlg + + 653,393 + wxDEFAULT_DIALOG_STYLE + + Open Resource: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + mainPanel + protected + + + + + + wxTAB_TRAVERSAL + + + + panelSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Resource Name: + + + m_staticTitle + protected + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_comboResourceName + protected + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listShortNames + protected + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_btnOk + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_button2 + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/options_dlg.fbp b/formbuilder/options_dlg.fbp new file mode 100644 index 0000000000..20f3fec69f --- /dev/null +++ b/formbuilder/options_dlg.fbp @@ -0,0 +1,661 @@ + + + + + + C++ + options_base_dlg + 1000 + + 0 + Options + . + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + wxBOTH + 1 + + + + 0 + wxID_ANY + + + OptionsBaseDlg + + 465,489 + wxDEFAULT_DIALOG_STYLE + + Options + + + + + + + + mainSizer + wxVERTICAL + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_book + protected + + + + + + + + + + General + 0 + + + 1 + + + 0 + wxID_ANY + + + m_general + protected + + + + + + wxTAB_TRAVERSAL + + + vSz1 + wxVERTICAL + + 5 + wxEXPAND + 0 + + Folding: + + sbSizer1 + wxVERTICAL + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Display Folding Margin + + + m_checkBoxDisplayFoldMargin + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Underline Folded Line + + + m_checkBoxMarkFoldedLine + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Fold Style: + + + m_staticText1 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'Simple' 'Arrows' 'Flatten Tree Square Headers' 'Flatten Tree Circular Headers' + 1 + + + 0 + wxID_ANY + + + m_foldStyleChoice + protected + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + Bookmarks: + + sbSizer3 + wxVERTICAL + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Display Selection / Bookmark Folding + + + m_displayBookmarkMargin + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Bookmark Shape: + + + m_staticText6 + protected + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'Samll Rectangle' 'Rounded Rectangle' 'Circle' 'Small Arrow' + 1 + + + 0 + wxID_ANY + + + m_bookmarkShape + protected + + + + + + + + + + + 5 + wxEXPAND + 1 + + 2 + 0 + + gSizer1 + 2 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Select the bookmark background colour: + + + m_staticText4 + protected + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Colour... + + + m_bgColourPicker + protected + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Select the bookmark forground colour: + + + m_staticText5 + protected + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + Colour... + + + m_fgColourPicker + protected + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + General: + + sbSizer4 + wxVERTICAL + + 5 + wxEXPAND + 1 + + 2 + + + + 0 + + fgSizer + + 3 + 0 + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Highlight Caret Line + + + m_highlighyCaretLine + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Dsiplay Line Numbers + + + m_displayLineNumbers + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Show Indentation Guidelines + + + m_showIndentationGuideLines + protected + + + + + + + + + + + + + + + + + + + + Syntax Highlight + 1 + + + 1 + + + 0 + wxID_ANY + + + m_syntaxHighlightPage + protected + + + + + + wxTAB_TRAVERSAL + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_OK + &OK + + + m_okButton + protected + + + + + + + + OnButtonOK + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_cancelButton + protected + + + + + + + + OnButtonCancel + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_APPLY + Apply + + + m_applyButton + protected + + + + + + + + OnButtonApply + + + + + + + + diff --git a/formbuilder/progress_dialog.fbp b/formbuilder/progress_dialog.fbp new file mode 100644 index 0000000000..5e958a6eac --- /dev/null +++ b/formbuilder/progress_dialog.fbp @@ -0,0 +1,186 @@ + + + + + + + C++ + UTF-8 + connect + progress_dialog + 1000 + + 0 + ProgressDialog + + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + ProgressDialog + + 568,137 + wxDEFAULT_DIALOG_STYLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + panelSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL + 1 + + + 1 + + + 0 + wxID_ANY + + + + m_staticTextMessage + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + m_progress + protected + + 100 + + wxGA_HORIZONTAL + + + + + + + + + + + + + + + diff --git a/formbuilder/project_settings.fbp b/formbuilder/project_settings.fbp new file mode 100644 index 0000000000..a424e6e1ae --- /dev/null +++ b/formbuilder/project_settings.fbp @@ -0,0 +1,5205 @@ + + + + + + + C++ + UTF-8 + connect + project_settings_base_dlg + 1000 + none + + 0 + ProjectSettings + + ../LiteEditor + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + ProjectSettingsBaseDlg + + 782,502 + wxDEFAULT_DIALOG_STYLE + + Project Settings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer22 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Configuration Type: + + + m_staticText21 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_choiceConfigurationType + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Configuration Manager... + + + m_buttonConfigManager + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline81 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_notebook3 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_generalPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer19 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 2 + wxBOTH + 1 + + 0 + + fgSizer3 + wxFLEX_GROWMODE_SPECIFIED + none + 4 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Project Type: + + + m_staticText22 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'Static Library' 'Dynamic Library' 'Executable' + + 1 + + + 0 + wxID_ANY + + + m_choiceProjectTypes + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Compiler: + + + m_staticText191 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + + 1 + + + 0 + wxID_ANY + + + m_choiceCompilerType + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Debugger: + + + m_staticText231 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + + 1 + + + 0 + wxID_ANY + + + m_choiceDebugger + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Output File: + + + m_staticText15 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textOutputFilePicker + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Intermediate Directory: + + + m_staticText16 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_intermediateDirPicker + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer21 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Action: + + + m_staticText17 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline5 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer6 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Command: + + + m_staticText18 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCommand + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Command Arguments: + + + m_staticText19 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCommandArguments + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Working Directory: + + + m_staticText20 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_workingDirPicker + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + Compiler + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_compilerPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + compilerPageSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Compiler is not required for this project + + + m_checkCompilerNeeded + protected + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline7 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + wxBOTH + 1 + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + 1 + + + + 1 + + + 0 + wxID_ANY + Compiler Options: + + + m_staticText6 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 0 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCompilerOptions + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + 1 + + + + 1 + + + 0 + wxID_ANY + Additional Search Path: + + + m_staticText4 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 1 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textAdditionalSearchPath + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 1 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAddSearchPath + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 2 + 1 + + + + 1 + + + 0 + wxID_ANY + Preprocessor: + + + m_staticText171 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 2 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textPreprocessor + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 2 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAddPreprocessor + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 0 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonCompilerOptions + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Linker + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_linkerPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + linkerPageSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Linker is not required for this project + + + m_checkLinkerNeeded + protected + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline8 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + wxBOTH + 1 + + 0 + + gbSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + 1 + + + + 1 + + + 0 + wxID_ANY + Options: + + + m_staticText10 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 0 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textLinkerOptions + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + 1 + + + + 1 + + + 0 + wxID_ANY + Library Path: + + + m_staticText7 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 1 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textLibraryPath + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 2 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonLibraries + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxALL|wxALIGN_CENTER_VERTICAL + 2 + 1 + + + + 1 + + + 0 + wxID_ANY + Libraries: + + + m_staticText8 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 2 + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textLibraries + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 1 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonLibraryPath + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 2 + wxTOP|wxBOTTOM|wxRIGHT + 0 + 1 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonLinkerOptions + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Resources + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_resourceCmpPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer151 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 1 + + 1 + + + 0 + wxID_ANY + Resource Compiler is not needed + + + m_checkResourceNeeded + protected + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline9 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1 + + 0 + + fgSizer4 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Compiler Options: + + + m_staticText221 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textAddResCmpOptions + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAddResCmpOptions + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Additional Search Path: + + + m_staticText23 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textAddResCmpPath + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAddResCmpPath + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreBuild + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_preBuildPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer8 + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Specifies here a command lines to run in the pre-build event: + + + m_staticText11 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer9 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_checkListPreBuildCommands + protected + + + + + + + + + + + OnCmdEvtVModified + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer10 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + New... + + + m_buttonNewPreBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Delete + + + m_buttonDeletePreBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Edit... + + + m_buttonEditPreBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Up + + + m_buttonUpPreBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Down + + + m_buttonDownPreBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PostBuild + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_postBuildPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer81 + wxVERTICAL + none + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Specifies here a command lines to run in the post-build event: + + + m_staticText111 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline21 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer91 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_checkListPostBuildCommands + protected + + + + + + + + + + + OnCmdEvtVModified + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer101 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + New... + + + m_buttonNewPostBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Delete + + + m_buttonDeletePostBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Edit... + + + m_buttonEditPostBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Up + + + m_buttonUpPostBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Down + + + m_buttonDownPostBuildCmd + protected + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Custom Build + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_customBuildPage + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer15 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Enable custom build + + + m_checkEnableCustomBuild + protected + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline82 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer31 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Build Command: + + + m_staticText181 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textBuildCommand + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Clean Command: + + + m_staticText192 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCleanCommand + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + 5 + wxEXPAND + 0 + + + + sbSizer3 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Note: When executing these commands, LiteEditor sets its working directory to the project directory. + + + m_staticText201 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Custom makefile steps + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_customMakefileStep + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer16 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + 1 + 0 + + fgSizer5 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Dependenices: + + + m_staticText25 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textDeps + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Rule action: + + + m_staticText26 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textPreBuildRule + protected + + + wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnCmdEvtVModified + + + + + + + + + + 5 + wxEXPAND + 0 + + + + sbSizer2 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Define here a custom makefile rule to be executed in the pre-build steps. This rule can be a composite rule or simple rule, see the wiki for more help + + + m_staticText24 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Apply + + + m_buttonApply + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/quickwatchdlg.fbp b/formbuilder/quickwatchdlg.fbp new file mode 100644 index 0000000000..ced88e819e --- /dev/null +++ b/formbuilder/quickwatchdlg.fbp @@ -0,0 +1,320 @@ + + + + + + + C++ + UTF-8 + connect + quickwatchbasedlg + 1000 + none + + 0 + quickwatchdlg + + ../LiteEditor + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + QuickWatchBaseDlg + + 524,419 + wxDEFAULT_DIALOG_STYLE + + Quick Watch + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxHORIZONTAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_panel1 + protected + + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer3 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl1 + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + LocalVarsTree* + m_localVarsTree = new LocalVarsTree(m_panel1, wxID_ANY); + LocalVarsTree *m_localVarsTree; + #include "localvarstree.h" + m_localVarsTree + protected + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Evaluate + + + m_buttonEvaluate + protected + + + + + + + + + OnReEvaluate + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Close + + + m_buttonClose + protected + + + + + + + + + OnButtonClose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/results_dialog.fbp b/formbuilder/results_dialog.fbp new file mode 100644 index 0000000000..0f76e8a958 --- /dev/null +++ b/formbuilder/results_dialog.fbp @@ -0,0 +1,176 @@ + + + + + + C++ + symbols_dialog_base + 1000 + + 0 + MyProject1 + . + wx/wxprec.h + 1 + 0 + 0 + + + + 1 + + + + 0 + wxID_ANY + + + SymbolsDialogBase + + 541,269 + wxDEFAULT_DIALOG_STYLE + + Resolve Ambiguity + + + + + + + + mainSizer + wxVERTICAL + + 5 + wxALL|wxEXPAND + 1 + + + 1 + + + 0 + wxID_ANY + + + m_results + protected + + + wxLC_ICON|wxLC_REPORT + + + + + + + + + + + + + + + + + + OnItemActivated + + + + + OnItemSelected + + + + + 5 + wxALL|wxEXPAND + 0 + + + 1 + + + 0 + wxID_ANY + + + statLine + protected + + + wxLI_HORIZONTAL + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + btnSizer + wxHORIZONTAL + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &OK + + + m_okButton + protected + + + + + + + + OnButtonOK + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + + 0 + wxID_ANY + &Cancel + + + m_cancel + protected + + + + + + + + OnButtonCancel + + + + + + + + diff --git a/formbuilder/setters_getters.fbp b/formbuilder/setters_getters.fbp new file mode 100644 index 0000000000..95feda8938 --- /dev/null +++ b/formbuilder/setters_getters.fbp @@ -0,0 +1,765 @@ + + + + + + + C++ + UTF-8 + connect + setters_getters_base_dlg + 1000 + none + + 0 + setters_getters + + ../LiteEditor + #ifdef WX_PRECOMP #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif //__BORLANDC__ #else #include <wx/wx.h> #endif //WX_PRECOMP + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + SettersGettersBaseDlg + + 655,518 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Generate Setters/Getters for class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer3 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Class Name: + + + m_staticText2 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textClassName + protected + + + wxTE_READONLY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Select members from the list below : + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer4 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_checkListMembers + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer5 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + Check &All + + + m_buttonCheckAll + protected + + + + + + + + + OnCheckAll + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Clear + + + m_buttonUncheckAll + protected + + + + + + + + + OnUncheckAll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Preview: + + + m_staticText31 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 1 + + 0 + + + 1 + + 0 + + 0 + wxID_ANY + 0 + 0 + + + m_textPreview + protected + + + + 0 + 4 + + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + Options: + + sbSizer1 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Function name starts with upper case letter + + + m_checkStartWithUppercase + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/simpletable.fbp b/formbuilder/simpletable.fbp new file mode 100644 index 0000000000..e1b4e19ead --- /dev/null +++ b/formbuilder/simpletable.fbp @@ -0,0 +1,236 @@ + + + + + + + C++ + UTF-8 + connect + simpletablebase + 2500 + none + + 0 + SimpleTable + + ../LiteEditor + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + SimpleTableBase + + 500,300 + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP + 0 + + + + + 1 + + + 0 + wxID_ANY + + + + m_toolBar2 + 1 + protected + + 5 + + wxTB_FLAT|wxTB_HORIZONTAL|wxTB_HORZ_TEXT|wxTB_NOICONS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID_TOOLNEW + wxITEM_NORMAL + New... + m_toolNew + + + + OnNewWatch + + + OnNewWatchUI + + + + ID_TOOLDELETE + wxITEM_NORMAL + Delete + m_toolDelete + + + + OnDeleteWatch + + + OnDeleteWatchUI + + + + ID_TOOLDELETEALL + wxITEM_NORMAL + Delete All + m_toolDeleteAll + + + + OnDeleteAll + + + OnDeleteAllUI + + + + + 1 + wxEXPAND|wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_listTable + protected + + + wxLC_EDIT_LABELS|wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES + + + + + + + + + + + + + + + + + OnListEditLabelBegin + + + + + + + + + + OnListEditLabelEnd + + OnItemActivated + OnItemDeSelected + + + OnItemRightClick + OnItemSelected + OnListKeyDown + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/style_panel.fbp b/formbuilder/style_panel.fbp new file mode 100644 index 0000000000..a2a5ab3d69 --- /dev/null +++ b/formbuilder/style_panel.fbp @@ -0,0 +1,467 @@ + + + + + + C++ + style_panel + 1000 + + 0 + StylePage + . + wx/wxprec.h + 1 + 0 + 0 + + + 1 + + + 0 + wxID_ANY + + + stylePanel + + 532,410 + + + + wxTAB_TRAVERSAL + + + + mainSizer + wxVERTICAL + + 5 + wxALL|wxEXPAND + 0 + + + 'Default' 'Visual Studio 8.0' 'Visual Studio 7.10' 'Fancy Tabs' 'Firefox 2' + 1 + + + 0 + wxID_ANY + Visual Style: + 3 + + + m_styles + protected + + + wxRA_SPECIFY_COLS + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'Upper Tabs' 'Bottom Tabs' + 1 + + + 0 + wxID_ANY + Tab Positioning: + 2 + + + m_tabVPosition + protected + + + wxRA_SPECIFY_COLS + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + General: + + sbSizer2 + wxVERTICAL + + 5 + wxEXPAND + 0 + + 2 + 0 + + gSizer1 + 4 + 0 + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Draw Thin Border Around Tab Area + + + m_tabBorder + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Hide Navigation Buttons + + + m_hideNavButtons + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Hide Close Button + + + m_hideCloseButton + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Mouse Middle Button Closes Tab + + + m_mouseMiddleCloseTab + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Place Close Button On Active Tab + + + m_xButtonOnTab + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Double Click Closes Tab + + + m_dlbClickCloseTab + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Enable Smart Tabbing + + + m_smartTabbing + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Use Drop Down Menu to List Tabs + + + m_dropDownList + protected + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + Drang And Drop: + + sbSizer4 + wxHORIZONTAL + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Enable Drag And Drop + + + m_allowDragAndDrop + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Allow Drag And Drop to from other notebooks + + + m_foreignDnD + protected + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + Effects: + + sbSizer5 + wxHORIZONTAL + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Use Gradient painting for tabs area + + + m_gradient + protected + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + 1 + + + 0 + wxID_ANY + Set Random Colour for Tabs + + + m_colorfulTab + protected + + + + + + + + + + + + + + + + diff --git a/formbuilder/svnadditemsbasedlg.fbp b/formbuilder/svnadditemsbasedlg.fbp new file mode 100644 index 0000000000..20c7b8d39d --- /dev/null +++ b/formbuilder/svnadditemsbasedlg.fbp @@ -0,0 +1,468 @@ + + + + + + + C++ + UTF-8 + connect + svnadditemsbasedlg + 1000 + none + + 0 + SvnAddItemsDlg + + ../Subversion + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + SvnAddItemsBaseDlg + + 562,633 + wxDEFAULT_DIALOG_STYLE + + Subversion: Add Files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_checkListFiles + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Ignore File Pattern: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textIgnoreFilePatterns + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + &Apply + + + m_buttonApplyPattern + protected + + + + + + + + + OnApplyPattern + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + btnSizer + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + OnButtonOK + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + OnButtonCancel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/svndlg.fbp b/formbuilder/svndlg.fbp new file mode 100644 index 0000000000..b63855be21 --- /dev/null +++ b/formbuilder/svndlg.fbp @@ -0,0 +1,182 @@ + + + + + + + C++ + UTF-8 + connect + svnbasedlg + 1000 + none + + 0 + SvnDlg + + ../Subversion + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + SvnBaseDlg + + 497,369 + wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP + + Enter SVN commit comment: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl + protected + + + wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB + + + # Enter commit log here.Lines starting with the pound sign (#), are # ignored + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/formbuilder/svnlogdlg.fbp b/formbuilder/svnlogdlg.fbp new file mode 100644 index 0000000000..53738f7bfc --- /dev/null +++ b/formbuilder/svnlogdlg.fbp @@ -0,0 +1,590 @@ + + + + + + + C++ + UTF-8 + connect + svnlogbasedlg + 1000 + none + + 0 + svnlogdlg + + ../Subversion + + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + SvnLogBaseDialog + + 459,219 + wxDEFAULT_DIALOG_STYLE + + Subversion Change Log: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + From Revision: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlFromRevision + protected + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + To Revision (leave empty for HEAD): + + + m_staticText3 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrlToRevision + protected + + + + + + HEAD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline2 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + Output File: + + + m_staticText5 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + m_filePicker = new FilePicker(this, wxID_ANY); + FilePicker *m_filePicker; + #include "filepicker.h" + m_filePicker + protected + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + &Cancel + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/formbuilder/tags_options_base_dlg.fbp b/formbuilder/tags_options_base_dlg.fbp new file mode 100644 index 0000000000..a1cf28fe94 --- /dev/null +++ b/formbuilder/tags_options_base_dlg.fbp @@ -0,0 +1,772 @@ + + + + + + + C++ + UTF-8 + connect + tags_options_dlg + 1000 + none + + 0 + tags_options_dlg + + . + wx/wxprec.h + 1 + 0 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + TagsOptionsDlg + + 469,362 + wxDEFAULT_DIALOG_STYLE + + Tags Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mainSizer + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + + 1 + + + 0 + wxID_ANY + + + m_mainBook + protected + + + + + + + + + + + + + CodeLite + 1 + + + + 1 + + + 0 + wxID_ANY + + + m_generalPage + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer4 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + General: + + sbSizer2 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Parse comments + + + m_checkParseComments + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Display comments in tooltip + + + m_checkDisplayComments + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Display type info tooltips + + + m_checkDisplayTypeInfo + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Display function calltip + + + m_checkDisplayFunctionTip + protected + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + External Symbols Database: + + sbSizer21 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Automatically load the recently used additional symbols database + + + m_checkLoadLastDB + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Load external database symbols to memory + + + m_checkLoadToMemory + protected + + + + + + + + + + + + + + + + + + + ctags + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_ctagsPage + protected + + + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer6 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 2 + wxBOTH + 1 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + Preprocessors: + + + m_staticText1 + protected + + + + + + + + -1 + + + + + 5 + wxEXPAND + 1 + + + bSizer5 + wxHORIZONTAL + none + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxLEFT + 1 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textPrep + protected + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT + 0 + + + + 1 + + + 0 + wxID_ANY + ... + + + m_buttonAdd + protected + + + wxBU_EXACTFIT + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + + + 0 + wxID_ANY + File Types: + + + m_staticText3 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textFileSpec + protected + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + + + + 1 + + + 0 + wxID_ANY + Force Language: + + + m_staticText5 + protected + + + + + + + + -1 + + + + + 5 + wxALL|wxEXPAND + 0 + + + 'C++' 'Java' + + 1 + + + 0 + wxID_ANY + + + m_comboBoxLang + protected + + + wxCB_READONLY + + + C++ + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Parse files without extension + + + m_checkFilesWithoutExt + protected + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + + + 1 + + + 0 + wxID_ANY + + + m_staticline1 + protected + + + wxLI_HORIZONTAL + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer3 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_OK + &OK + + + m_buttonOK + protected + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + 0 + wxID_CANCEL + Close + + + m_buttonCancel + protected + + + + + + + + + + + + + + + + + diff --git a/gdbparser/Debug/test.h b/gdbparser/Debug/test.h new file mode 100644 index 0000000000..678914ef51 --- /dev/null +++ b/gdbparser/Debug/test.h @@ -0,0 +1 @@ +^done,locals=[{name="str",value="{static npos = 4294967295, _M_dataplus = {> = {> = {}, }, _M_p = 0x77c3b814 \"Y\\213\\r\\354!\\306w;\\317\\213\\301u\\3443\\300_^\\303\\314\\314\\314\\314\\314j\\004\\3775\"}}"},{name="counter",value="2009252579"}] \ No newline at end of file diff --git a/gdbparser/gdb.l b/gdbparser/gdb.l new file mode 100644 index 0000000000..b800b75ac8 --- /dev/null +++ b/gdbparser/gdb.l @@ -0,0 +1,137 @@ +%{ +/*************** Includes and Defines *****************************/ + +#include "gdblexer.h" +#include "errno.h" +#include "string" +#include +#include + +#define YYSTYPE std::string + + +std::string le_gdb_string_word; +static int angleDepth(0); + + + +#define STATE_INITIAL 1 +#define STATE_ESCAPE 2 +#define STATE_STRING 3 + +#define RESUME_STATE(x)\ + if(stateToReturn == STATE_INITIAL){\ + BEGIN INITIAL;\ + }else if(stateToReturn == STATE_ESCAPE){\ + BEGIN ESCAPE;\ + }else if(stateToReturn == STATE_STRING){\ + BEGIN STRING;\ + } + +static int stateToReturn(STATE_INITIAL); +static bool needReset(true); + +bool le_gdb_set_input(const YYSTYPE &in); +void le_gdb_lex_clean(); +%} + +%option yylineno + +identifier [0-9a-zA-Z_]* +h_tab [\011] +form_feed [\014] +v_tab [\013] +c_return [\015] +octal_escape [0-7]{1,3} +hex_escape "x"[0-9a-fA-F]+ +simple_esc [a-z]{1} +horizontal_white [ ]|{h_tab} + +%x ESCAPE +%x STRING +%x DEPTH_ANGLE +%x DEPTH_ANGLE1 + +%% +"<" { + angleDepth = 1; + BEGIN DEPTH_ANGLE; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + + le_gdb_string_word += yytext[0]; + stateToReturn = STATE_INITIAL; + } +"{" {return (int)'{';} +"\"" {} +"}" {return (int)'}';} +"(" {return (int)'(';} +")" {return (int)')';} +"[" {return (int)'[';} +"]" {return (int)']';} +"=" {return (int)'=';} +"," {return (int)',';} +"^done" {return LE_GDB_DONE;} +"name" {return LE_GDB_NAME;} +"value" {return LE_GDB_VALUE;} +"locals" {return LE_GDB_LOCALS;} +{identifier} {return LE_GDB_WORD;} +{horizontal_white}+ {} +({v_tab}|{c_return}|{form_feed})+ {} +({horizontal_white}|{v_tab}|{c_return}|{form_feed})*"\n" {} +"\\\"" {BEGIN STRING; le_gdb_string_word = "";} +"\\\\" {BEGIN ESCAPE;} +. {return yytext[0];} +"\\\"" {BEGIN INITIAL; return (int)'"';} +. {BEGIN INITIAL;} +"\\\\\"" { + le_gdb_string_word += "\\\""; + } +"\\\"" {BEGIN INITIAL; return LE_GDB_STRING_LITERAL;} +"<" { + angleDepth = 1; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + le_gdb_string_word += yytext[0]; + BEGIN DEPTH_ANGLE; + stateToReturn = STATE_STRING; + } +. {le_gdb_string_word += yytext[0];} +"<" { + angleDepth++; + le_gdb_string_word += yytext[0]; + } +">" { + angleDepth--; + le_gdb_string_word += yytext[0]; + if(angleDepth == 0){ + RESUME_STATE(stateToReturn); + needReset = true; + return LE_GDB_STRING_LITERAL; + } + } + +. {le_gdb_string_word += yytext[0];} +%% + +void le_gdb_lex_clean(){ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + le_gdb_lineno = 1; +} + +bool le_gdb_set_input(const YYSTYPE &in){ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} diff --git a/gdbparser/gdb_lexer.cpp b/gdbparser/gdb_lexer.cpp new file mode 100644 index 0000000000..388ffca2a8 --- /dev/null +++ b/gdbparser/gdb_lexer.cpp @@ -0,0 +1,1796 @@ +#define yy_create_buffer le_gdb__create_buffer +#define yy_delete_buffer le_gdb__delete_buffer +#define yy_scan_buffer le_gdb__scan_buffer +#define yy_scan_string le_gdb__scan_string +#define yy_scan_bytes le_gdb__scan_bytes +#define yy_flex_debug le_gdb__flex_debug +#define yy_init_buffer le_gdb__init_buffer +#define yy_flush_buffer le_gdb__flush_buffer +#define yy_load_buffer_state le_gdb__load_buffer_state +#define yy_switch_to_buffer le_gdb__switch_to_buffer +#define yyin le_gdb_in +#define yyleng le_gdb_leng +#define yylex le_gdb_lex +#define yyout le_gdb_out +#define yyrestart le_gdb_restart +#define yytext le_gdb_text +#define yylineno le_gdb_lineno +#define yywrap le_gdb_wrap + +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 31 +#define YY_END_OF_BUFFER 32 +static yyconst short int yy_acclist[105] = + { 0, + 15, 15, 32, 21, 31, 16, 21, 31, 18, 31, + 17, 21, 31, 3, 21, 31, 5, 21, 31, 6, + 21, 31, 10, 21, 31, 15, 21, 31, 1, 21, + 31, 9, 21, 31, 7, 21, 31, 21, 31, 8, + 21, 31, 21, 31, 15, 21, 31, 15, 21, 31, + 15, 21, 31, 2, 21, 31, 4, 21, 31, 23, + 31, 31, 23, 31, 27, 31, 26, 27, 31, 27, + 31, 30, 31, 28, 30, 31, 29, 30, 31, 16, + 18, 17, 15, 19, 20, 15, 15, 15, 22, 25, + 15, 15, 15, 24, 15, 12, 15, 15, 11, 15, + + 13, 15, 14, 15 + } ; + +static yyconst short int yy_accept[70] = + { 0, + 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 4, 6, 9, 11, 14, 17, 20, 23, 26, + 29, 32, 35, 38, 40, 43, 45, 48, 51, 54, + 57, 60, 62, 63, 65, 67, 70, 72, 74, 77, + 80, 81, 82, 82, 83, 84, 85, 86, 86, 87, + 88, 89, 90, 91, 91, 91, 92, 93, 94, 95, + 95, 96, 98, 99, 100, 101, 103, 105, 105 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 4, 5, 6, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 7, 1, 8, 1, 1, 1, 1, 1, 9, + 10, 1, 1, 11, 1, 1, 1, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 1, 1, 13, + 14, 15, 1, 1, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 16, 17, 18, 19, 12, 1, 20, 12, 21, 22, + + 23, 12, 12, 12, 12, 12, 12, 24, 25, 26, + 27, 12, 12, 12, 28, 12, 29, 30, 12, 12, + 12, 12, 31, 1, 32, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[33] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1 + } ; + +static yyconst short int yy_base[74] = + { 0, + 0, 0, 30, 31, 32, 33, 38, 39, 0, 0, + 94, 95, 53, 95, 59, 95, 95, 95, 95, 0, + 95, 95, 95, 59, 95, 71, 65, 71, 70, 95, + 95, 95, 95, 81, 95, 95, 60, 95, 95, 95, + 0, 95, 36, 0, 0, 95, 95, 61, 66, 61, + 51, 95, 95, 66, 47, 52, 48, 41, 95, 46, + 20, 0, 17, 95, 11, 0, 0, 95, 77, 79, + 81, 83, 35 + } ; + +static yyconst short int yy_def[74] = + { 0, + 68, 1, 69, 69, 70, 70, 71, 71, 72, 72, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 73, + 68, 68, 68, 68, 68, 68, 73, 73, 73, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 13, 68, 13, 15, 73, 68, 68, 68, 73, 73, + 73, 68, 68, 68, 68, 73, 73, 73, 68, 68, + 73, 73, 73, 68, 73, 73, 73, 0, 68, 68, + 68, 68, 68 + } ; + +static yyconst short int yy_nxt[128] = + { 0, + 12, 13, 14, 15, 15, 15, 13, 16, 17, 18, + 19, 20, 21, 22, 12, 23, 24, 25, 26, 20, + 20, 20, 20, 27, 20, 28, 20, 20, 20, 29, + 30, 31, 33, 33, 33, 33, 45, 43, 67, 66, + 33, 33, 43, 65, 36, 36, 34, 34, 37, 37, + 39, 39, 40, 40, 41, 42, 43, 43, 43, 41, + 43, 42, 44, 44, 44, 43, 46, 53, 64, 63, + 62, 61, 60, 59, 58, 47, 54, 32, 32, 35, + 35, 38, 38, 33, 33, 57, 56, 55, 52, 51, + 50, 49, 48, 68, 11, 68, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68 + } ; + +static yyconst short int yy_chk[128] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 4, 5, 6, 73, 43, 65, 63, + 7, 8, 43, 61, 5, 6, 3, 4, 5, 6, + 7, 8, 7, 8, 13, 13, 13, 13, 13, 13, + 15, 15, 15, 15, 15, 15, 24, 37, 60, 58, + 57, 56, 55, 54, 51, 24, 37, 69, 69, 70, + 70, 71, 71, 72, 72, 50, 49, 48, 34, 29, + 28, 27, 26, 11, 68, 68, 68, 68, 68, 68, + + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#define INITIAL 0 +/*************** Includes and Defines *****************************/ + +#include "gdblexer.h" +#include "errno.h" +#include "string" +#include +#include + +#define YYSTYPE std::string + + +std::string le_gdb_string_word; +static int angleDepth(0); + + + +#define STATE_INITIAL 1 +#define STATE_ESCAPE 2 +#define STATE_STRING 3 + +#define RESUME_STATE(x)\ + if(stateToReturn == STATE_INITIAL){\ + BEGIN INITIAL;\ + }else if(stateToReturn == STATE_ESCAPE){\ + BEGIN ESCAPE;\ + }else if(stateToReturn == STATE_STRING){\ + BEGIN STRING;\ + } + +static int stateToReturn(STATE_INITIAL); +static bool needReset(true); + +bool le_gdb_set_input(const YYSTYPE &in); +void le_gdb_lex_clean(); +#define ESCAPE 1 + +#define STRING 2 + +#define DEPTH_ANGLE 3 + +#define DEPTH_ANGLE1 4 + + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO(( yyconst char * )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 95 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +{ + angleDepth = 1; + BEGIN DEPTH_ANGLE; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + + le_gdb_string_word += yytext[0]; + stateToReturn = STATE_INITIAL; + } + YY_BREAK +case 2: +YY_RULE_SETUP +{return (int)'{';} + YY_BREAK +case 3: +YY_RULE_SETUP +{} + YY_BREAK +case 4: +YY_RULE_SETUP +{return (int)'}';} + YY_BREAK +case 5: +YY_RULE_SETUP +{return (int)'(';} + YY_BREAK +case 6: +YY_RULE_SETUP +{return (int)')';} + YY_BREAK +case 7: +YY_RULE_SETUP +{return (int)'[';} + YY_BREAK +case 8: +YY_RULE_SETUP +{return (int)']';} + YY_BREAK +case 9: +YY_RULE_SETUP +{return (int)'=';} + YY_BREAK +case 10: +YY_RULE_SETUP +{return (int)',';} + YY_BREAK +case 11: +YY_RULE_SETUP +{return LE_GDB_DONE;} + YY_BREAK +case 12: +YY_RULE_SETUP +{return LE_GDB_NAME;} + YY_BREAK +case 13: +YY_RULE_SETUP +{return LE_GDB_VALUE;} + YY_BREAK +case 14: +YY_RULE_SETUP +{return LE_GDB_LOCALS;} + YY_BREAK +case 15: +YY_RULE_SETUP +{return LE_GDB_WORD;} + YY_BREAK +case 16: +YY_RULE_SETUP +{} + YY_BREAK +case 17: +YY_RULE_SETUP +{} + YY_BREAK +case 18: +YY_RULE_SETUP +{} + YY_BREAK +case 19: +YY_RULE_SETUP +{BEGIN STRING; le_gdb_string_word = "";} + YY_BREAK +case 20: +YY_RULE_SETUP +{BEGIN ESCAPE;} + YY_BREAK +case 21: +YY_RULE_SETUP +{return yytext[0];} + YY_BREAK +case 22: +YY_RULE_SETUP +{BEGIN INITIAL; return (int)'"';} + YY_BREAK +case 23: +YY_RULE_SETUP +{BEGIN INITIAL;} + YY_BREAK +case 24: +YY_RULE_SETUP +{ + le_gdb_string_word += "\\\""; + } + YY_BREAK +case 25: +YY_RULE_SETUP +{BEGIN INITIAL; return LE_GDB_STRING_LITERAL;} + YY_BREAK +case 26: +YY_RULE_SETUP +{ + angleDepth = 1; + if(needReset){ + le_gdb_string_word = ""; + needReset = false; + } + le_gdb_string_word += yytext[0]; + BEGIN DEPTH_ANGLE; + stateToReturn = STATE_STRING; + } + YY_BREAK +case 27: +YY_RULE_SETUP +{le_gdb_string_word += yytext[0];} + YY_BREAK +case 28: +YY_RULE_SETUP +{ + angleDepth++; + le_gdb_string_word += yytext[0]; + } + YY_BREAK +case 29: +YY_RULE_SETUP +{ + angleDepth--; + le_gdb_string_word += yytext[0]; + if(angleDepth == 0){ + RESUME_STATE(stateToReturn); + needReset = true; + return LE_GDB_STRING_LITERAL; + } + } + YY_BREAK +case 30: +YY_RULE_SETUP +{le_gdb_string_word += yytext[0];} + YY_BREAK +case 31: +YY_RULE_SETUP +ECHO; + YY_BREAK + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(ESCAPE): + case YY_STATE_EOF(STRING): + case YY_STATE_EOF(DEPTH_ANGLE): + case YY_STATE_EOF(DEPTH_ANGLE1): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 69 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 68); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + return EOF; + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) +#else +YY_BUFFER_STATE yy_scan_string( yy_str ) +yyconst char *yy_str; +#endif + { + int len; + for ( len = 0; yy_str[len]; ++len ) + ; + + return yy_scan_bytes( yy_str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int yy_flex_strlen( yyconst char *s ) +#else +static int yy_flex_strlen( s ) +yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif + + +void le_gdb_lex_clean(){ + yy_flush_buffer(YY_CURRENT_BUFFER); + yy_delete_buffer(YY_CURRENT_BUFFER); + le_gdb_lineno = 1; +} + +bool le_gdb_set_input(const YYSTYPE &in){ + BEGIN INITIAL; + yy_scan_string(in.c_str()); + + //update the working file name + return true; +} + +int yywrap(){ + return 1; +} diff --git a/gdbparser/gdblexer.h b/gdbparser/gdblexer.h new file mode 100644 index 0000000000..4cefcddfe4 --- /dev/null +++ b/gdbparser/gdblexer.h @@ -0,0 +1,22 @@ +#ifndef GDBLEXER_H +#define GDBLEXER_H + +#include + +#define LE_GDB_WHITE 257 +#define LE_GDB_WORD 258 +#define LE_GDB_DONE 259 +#define LE_GDB_NAME 260 +#define LE_GDB_VALUE 261 +#define LE_GDB_LOCALS 263 +#define LE_GDB_STRING_LITERAL 264 +#define LE_GDB_CHAR_LITERAL 265 + +extern int le_gdb_lex(); +extern bool le_gdb_set_input(const std::string &in); +extern std::string le_gdb_string_word; +extern char *le_gdb_text; +extern void le_gdb_lex_clean(); +#endif //GDBLEXER_H + + diff --git a/gdbparser/gdbparser.project b/gdbparser/gdbparser.project new file mode 100644 index 0000000000..08a19a0ea0 --- /dev/null +++ b/gdbparser/gdbparser.project @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + flex -L -Ple_gdb_ gdb.l + mv lex.le_gdb_.c gdb_lexer.cpp + + + copy *.h ../Debugger/. + copy gdb_lexer.cpp ../Debugger/. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gdbparser/gdbparser.workspace b/gdbparser/gdbparser.workspace new file mode 100644 index 0000000000..cc60c003fa --- /dev/null +++ b/gdbparser/gdbparser.workspace @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/gdbparser/main.cpp b/gdbparser/main.cpp new file mode 100644 index 0000000000..dcff4d9202 --- /dev/null +++ b/gdbparser/main.cpp @@ -0,0 +1,59 @@ +#include "stdio.h" +#include "string" +#include "gdblexer.h" + +char *loadFile(const char *fileName); +int main(int argc, char **argv){ + + char *buff = loadFile("test.h"); + le_gdb_set_input(buff); + int type = le_gdb_lex(); + while(type != 0){ + if(type == LE_GDB_STRING_LITERAL){ + printf("[%d] %s\n", type, le_gdb_string_word.c_str()); + }else{ + printf("[%d] %s\n", type, le_gdb_text.c_str()); + } + type = le_gdb_lex(); + } + fflush(stdout); + free( buff ); + return 0; +} + +//------------------------------------------------------- +// Help function +//------------------------------------------------------- +char *loadFile(const char *fileName) +{ + FILE *fp; + long len; + char *buf = NULL; + + fp = fopen(fileName, "rb"); + if(!fp) + { + printf("failed to open file 'test.h': %s\n", strerror(errno)); + return NULL; + } + + //read the whole file + fseek(fp, 0, SEEK_END); //go to end + len = ftell(fp); //get position at end (length) + fseek(fp, 0, SEEK_SET); //go to begining + buf = (char *)malloc(len+1); //malloc buffer + + //read into buffer + long bytes = fread(buf, sizeof(char), len, fp); + printf("read: %ld\n", bytes); + if(bytes != len) + { + fclose(fp); + printf("failed to read from file 'test.h': %s\n", strerror(errno)); + return NULL; + } + + buf[len] = 0; // make it null terminated string + fclose(fp); + return buf; +} diff --git a/le_makerevision.sh b/le_makerevision.sh new file mode 100755 index 0000000000..fc28c306e1 --- /dev/null +++ b/le_makerevision.sh @@ -0,0 +1,12 @@ +cur_rev=`svn info | grep Revision | awk '{print $2;}'` +src_rev=`cat LiteEditor/svninfo.cpp | awk '{print $4;}' | sed s/\"//g | sed s/\;//g` + +if [ "$src_rev" != "$cur_rev" ] +then + ## generate the svninfo file again + \cp /dev/null LiteEditor/svninfo.cpp + echo char *SvnRevision = \"$cur_rev\"";" >> LiteEditor/svninfo.cpp + echo "" >> LiteEditor/svninfo.cpp + echo Generating svninfo file... +fi + diff --git a/make_deb.sh b/make_deb.sh new file mode 100755 index 0000000000..3339e19e10 --- /dev/null +++ b/make_deb.sh @@ -0,0 +1,42 @@ +#!/bin/sh +## Copy files to the fakeroot directory structure + +cur_rev=`svn info | grep Revision | awk '{print $2;}'` +PKG_NAME=codelite-rev${cur_rev}_i386.deb + +EXE_NAME=CodeLiteUR +mkdir -p fakeroot/usr/local/bin/ +cp ./Runtime/${EXE_NAME} fakeroot/usr/local/bin/CodeLite +cp Runtime/le_dos2unix.sh fakeroot/usr/local/bin/ +cp Runtime/le_killproc.sh fakeroot/usr/local/bin/ +chmod +x fakeroot/usr/local/bin/le_dos2unix.sh +chmod +x fakeroot/usr/local/bin/le_killproc.sh +cp sdk/ctags/ctags-le fakeroot/usr/local/bin/ +mkdir -p fakeroot/usr/local/share/codelite +mkdir -p fakeroot/usr/local/share/codelite/config +mkdir -p fakeroot/usr/local/share/codelite/debuggers +mkdir -p fakeroot/usr/local/share/codelite/templates +mkdir -p fakeroot/usr/local/share/codelite/plugins +mkdir -p fakeroot/usr/local/share/codelite/images +mkdir -p fakeroot/usr/local/share/codelite/rc +mkdir -p fakeroot/usr/local/share/codelite/lexers +\cp -pr Runtime/config/build_settings.xml fakeroot/usr/local/share/codelite/config/build_settings.xml +\cp -pr Runtime/config/debuggers.xml fakeroot/usr/local/share/codelite/config/debuggers.xml +\cp -pr Runtime/config/liteeditor.xml.sample fakeroot/usr/local/share/codelite/config/liteeditor.xml +\cp -pr Runtime/rc/menu.xrc fakeroot/usr/local/share/codelite/rc/ +\cp -pr Runtime/templates/*.project fakeroot/usr/local/share/codelite/templates/ +\cp -pr Runtime/templates/*.wizard fakeroot/usr/local/share/codelite/templates/ +\cp -pr Runtime/lexers/*.xml fakeroot/usr/local/share/codelite/lexers/ +\cp -pr static-symbols.tags fakeroot/usr/local/share/codelite/ +\cp -pr lib/Debugger.so fakeroot/usr/local/share/codelite/debuggers/ +\cp -pr lib/CodeFormatter.so fakeroot/usr/local/share/codelite/plugins/ +\cp -pr lib/Subversion.so fakeroot/usr/local/share/codelite/plugins/ +\cp -pr lib/Gizmos.so fakeroot/usr/local/share/codelite/plugins/ +\cp -pr Runtime/index.html fakeroot/usr/local/share/codelite/ +\cp -pr Runtime/astyle.sample fakeroot/usr/local/share/codelite/ +\cp -pr Runtime/images/*.png fakeroot/usr/local/share/codelite/images/ +chmod -R 777 fakeroot/usr/local/share/codelite +chmod +x fakeroot/usr/local/bin/CodeLite +echo creating .deb package... +dpkg -b fakeroot ${PKG_NAME} + diff --git a/makefile b/makefile new file mode 100644 index 0000000000..aab2a7a1d6 --- /dev/null +++ b/makefile @@ -0,0 +1,323 @@ +## +## CodeLite library makefile +## Author: Eran Ifrah +## +## This makefile was created to build CodeLite, LiteEditor and its dependencies, +## for the g++ compiler. It was tested using gmake & GCC 4.1 +## Testted on Ubunto Dapper, Fedora core 4 & 5 +## +## Feel free to modify it for your own use +## +## Read BuildInfo.txt for more information + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g +EXE_NAME=CodeLiteD + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +## settings for unicode debug +ifeq ($(type), debug_unicode) + EXE_NAME=CodeLiteUD + WXCFG=--unicode=yes --debug=yes + EXT=ud + OBJ_DIR=Debug_gcc_unicode + DEBUG= -g + OPT= -DREGEXP_UNICODE +else + EXE_NAME=CodeLiteUR + type=release_unicode + export type + WXCFG=--unicode=yes --debug=no + EXT=u + OBJ_DIR=Release_gcc_unicode + DEBUG= + OPT=-O3 -DREGEXP_UNICODE +endif + +OUTPUT_DIR=lib + +PROFILER=# -pg +## +## Define variables, using wx-config tool +## + +CMP=g++ $(DEBUG) $(OPT) +LIBP=-L../lib + +TRACE_FLAG=## Comment this if you dont want messages in log window +CCFLAGS= -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 $(shell pkg-config --cflags gtk+-2.0) + +LINK_FLAGS = -L$(OUTPUT_DIR) -Lsdk/wxflatnotebook/lib -lwxflatnotebook$(EXT) -lplugin$(EXT) -lcodelite$(EXT) -lwxsqlite3$(EXT) -lwxscintilla$(EXT) -Lsdk/sqlite3/lib $(PROFILER) $(shell wx-config --libs $(WXCFG)) $(shell pkg-config --libs gtk+-2.0) + +SCI_INCLUDE= -Isdk/wxscintilla/include -Isdk/wxscintilla/src/scintilla/include -Isdk/wxscintilla/src/scintilla/src +SQLITE_INCLUDE= -Isdk/wxsqlite3/include -Isdk/wxsqlite3/sqlite3/include +INCLUDES = -I. $(SQLITE_INCLUDE) $(SCI_INCLUDE) -IInterfaces -IDebugger -IPlugin -ICodeLite -ILiteEditor -ILiteEditor/include/ -Isdk/wxflatnotebook/include + +## +## Define the object files +## + +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard CodeLite/*.cpp))))) +lib_c_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard CodeLite/*.c))))) +sample_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard LiteEditor/*.cpp))))) + +## +## Scintilla related +## +SCI_DEFS = -DGTK -DSCI_LEXER -DLINK_LEXERS +SCI_OBJ_DIR=$(OBJ_DIR)_scintilla +sci_objects1 := $(addprefix $(SCI_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxscintilla/src/scintilla/src/*.cxx))))) +sci_objects2 := $(addprefix $(SCI_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxscintilla/src/*.cpp))))) +sci_objects = $(sci_objects1) $(sci_objects2) + +## +## SQLite related +## +SQLITE_OBJ_DIR=$(OBJ_DIR)_sqlite3 +sqlite_objects2 := $(addprefix $(SQLITE_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxsqlite3/src/*.cpp))))) +sqlite_objects = $(sqlite_objects1) $(sqlite_objects2) + +## our main build target +build : pre_build CodeLite Scintilla SQLite wxFlatNotebook SDK LiteEditor ctags Debugger CodeFormatter Subversion Gizmos + +CodeLite: code_lite_msg $(lib_cpp_objects) $(lib_c_objects) + ar rcu $(OUTPUT_DIR)/libcodelite$(EXT).a $(lib_cpp_objects) $(lib_c_objects) + ranlib $(OUTPUT_DIR)/libcodelite$(EXT).a + +Scintilla: scintilla_msg $(sci_objects) + ar rcu $(OUTPUT_DIR)/libwxscintilla$(EXT).a $(sci_objects) + ranlib $(OUTPUT_DIR)/libwxscintilla$(EXT).a + +SQLite: sqlite_msg sqlite3/Release/sqlite3.o $(sqlite_objects) + ar rcu $(OUTPUT_DIR)/libwxsqlite3$(EXT).a $(sqlite_objects) sqlite3/Release/sqlite3.o + ranlib $(OUTPUT_DIR)/libwxsqlite3$(EXT).a + +sqlite3/Release/sqlite3.o: + gcc -c sqlite3/sqlite3.c -o sqlite3/Release/sqlite3.o -O3 + +wxFlatNotebook: wxFlatNotebook_msg + cd sdk/wxflatnotebook/build/wxFlatNotebook && $(MAKE) + +Gizmos: gizmos_msg + cd Gizmos && $(MAKE) + +SDK: sdk_msg + cd Plugin/ && $(MAKE) + +Debugger: debugger_msg + cd Debugger/ && $(MAKE) + +Subversion: svn_msg + cd Subversion/ && $(MAKE) + +CodeFormatter: formatter_msg + cd CodeFormatter/ && $(MAKE) + +ctags: sdk/ctags/Makefile ctags_msg + cd sdk/ctags/ && $(MAKE) + +sdk/ctags/Makefile: + @chmod +x sdk/ctags/configure + @cd sdk/ctags/ && ./configure + + +LiteEditor: lite_editor_msg $(sample_cpp_objects) + $(CMP) -o Runtime/$(EXE_NAME) $(sample_cpp_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: CodeLite/%.cpp CodeLite/%.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +$(OBJ_DIR)/%.o: LiteEditor/%.cpp LiteEditor/%.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +CodeLite/%.o.d: + @$(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM CodeLite/$(addsuffix .cpp, $(basename $(basename $(@F)))) + +LiteEditor/%.o.d: + @$(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM LiteEditor/$(addsuffix .cpp, $(basename $(basename $(@F)))) + +$(SCI_OBJ_DIR)/%.o: sdk/wxscintilla/src/%.cpp + $(CMP) $(CCFLAGS) $(SCI_DEFS) $(INCLUDES) -c $< -o $(SCI_OBJ_DIR)/$(@F) + +$(SCI_OBJ_DIR)/%.o: sdk/wxscintilla/src/scintilla/src/%.cxx + $(CMP) $(CCFLAGS) $(SCI_DEFS) $(INCLUDES) -c $< -o $(SCI_OBJ_DIR)/$(@F) + +$(SQLITE_OBJ_DIR)/%.o: sdk/sqlite3/%.c + $(CMP) $(CCFLAGS) -DNO_TCL $(INCLUDES) -c $< -o $(SQLITE_OBJ_DIR)/$(@F) + +$(SQLITE_OBJ_DIR)/%.o: sdk/wxsqlite3/src/%.cpp + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(SQLITE_OBJ_DIR)/$(@F) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + test -d $(SCI_OBJ_DIR) || mkdir $(SCI_OBJ_DIR) + test -d $(SQLITE_OBJ_DIR) || mkdir $(SQLITE_OBJ_DIR) + chmod +x ./le_makerevision.sh + ./le_makerevision.sh + +ctags_msg: + @echo ---------------------------------------------------------- + @echo Building ctags-le + @echo ---------------------------------------------------------- + +gizmos_msg: + @echo ---------------------------------------------------------- + @echo Building Gizmos plugin + @echo ---------------------------------------------------------- + +debugger_msg: + @echo ---------------------------------------------------------- + @echo Building Debugger extension + @echo ---------------------------------------------------------- + +svn_msg: + @echo ---------------------------------------------------------- + @echo Building Suversion extension + @echo ---------------------------------------------------------- + +formatter_msg: + @echo ---------------------------------------------------------- + @echo Building CodeFormatter extension -AStyle + @echo ---------------------------------------------------------- + +code_lite_msg: + @echo ---------------------------------------------------------- + @echo Building CodeLite library + @echo ---------------------------------------------------------- + +sdk_msg: + @echo ---------------------------------------------------------- + @echo Building SDK library + @echo ---------------------------------------------------------- + +sqlite_msg: + @echo ---------------------------------------------------------- + @echo Building SQLite library + @echo ---------------------------------------------------------- + +scintilla_msg: + @echo ---------------------------------------------------------- + @echo Building Scintilla library + @echo ---------------------------------------------------------- + +lite_editor_msg: + @echo ---------------------------------------------------------- + @echo Building LiteEditor program + @echo ---------------------------------------------------------- + +wxFlatNotebook_msg: + @echo ---------------------------------------------------------- + @echo Building wxFlatNotebook library + @echo ---------------------------------------------------------- + +clean: + $(RM) Debug_gcc/*.o Release_gcc/*.o Release_gcc_unicode/*. Debug_gcc_unicode/*.o lib/*.o lib/*.a + $(RM) Debug_gcc_sqlite3/*.o Release_gcc_sqlite3/*.o Release_gcc_unicode_sqlite3/*. Debug_gcc_unicode_sqlite3/*.o lib/*.o lib/*.a + $(RM) Debug_gcc_scintilla/*.o Release_gcc_scintilla/*.o Release_gcc_unicode_scintilla/*. Debug_gcc_unicode_sinctilla/*.o lib/*.o lib/*.a + $(RM) -R Debug_gcc Release_gcc Release_gcc_unicode Debug_gcc_unicode Debug_gcc_sqlite3 Release_gcc_sqlite3 Release_gcc_unicode_sqlite3 Debug_gcc_unicode_sqlite3 Debug_gcc_scintilla Release_gcc_scintilla Release_gcc_unicode_scintilla Debug_gcc_unicode_scintilla + cd sdk/wxflatnotebook/build/wxFlatNotebook/ && $(MAKE) clean + cd Plugin/ && $(MAKE) clean + cd Debugger/ && $(MAKE) clean + cd CodeFormatter/ && $(MAKE) clean + cd Subversion/ && $(MAKE) clean + +clean_deps: + $(RM) Debug_gcc/*.d Release_gcc/*.d Release_gcc_unicode/*.d Debug_gcc_unicode/*.d + +install: upgrade + @echo installing CodeLite + @\rm -f /usr/local/bin/CodeLite + @echo copying Runtime/$(EXE_NAME) to /usr/local/bin/ + @mkdir -p /usr/local/bin + @cp Runtime/$(EXE_NAME) /usr/local/bin/ + @ln -s /usr/local/bin/$(EXE_NAME) /usr/local/bin/CodeLite + @echo cp Runtime/le_dos2unix.sh /usr/local/bin/ + @cp Runtime/le_dos2unix.sh /usr/local/bin/ + @echo cp Runtime/le_killproc.sh /usr/local/bin/ + @cp Runtime/le_killproc.sh /usr/local/bin/ + @chmod +x /usr/local/bin/le_dos2unix.sh + @chmod +x /usr/local/bin/le_killproc.sh + @echo copying ctags-le to /usr/local/bin + @cp sdk/ctags/ctags-le /usr/local/bin/ + @mkdir -p /usr/local/share/codelite + @mkdir -p /usr/local/share/codelite/config + @mkdir -p /usr/local/share/codelite/debuggers + @mkdir -p /usr/local/share/codelite/templates + @mkdir -p /usr/local/share/codelite/plugins + @mkdir -p /usr/local/share/codelite/images + @mkdir -p /usr/local/share/codelite/rc + @mkdir -p /usr/local/share/codelite/lexers + @echo Deleting old settings... + $(RM) $(HOME)/.liteeditor/debuggers/Debugger.so + $(RM) $(HOME)/.liteeditor/plugins/CodeFormatter.so + $(RM) $(HOME)/.liteeditor/plugins/Gizmos.so + $(RM) $(HOME)/.liteeditor/plugins/Subversion.so + $(RM) $(HOME)/.liteeditor/config/build_settings.xml + $(RM) $(HOME)/.liteeditor/config/debuggers.xml + $(RM) $(HOME)/.liteeditor/config/liteeditor.xml + $(RM) $(HOME)/.liteeditor/rc/menu.xrc + $(RM) $(HOME)/.liteeditor/astyle.sample + @echo Copying new settings... + @\cp -pr Runtime/config/build_settings.xml /usr/local/share/codelite/config/build_settings.xml + @\cp -pr Runtime/config/debuggers.xml /usr/local/share/codelite/config/debuggers.xml + @\cp -pr Runtime/config/liteeditor.xml.sample /usr/local/share/codelite/config/liteeditor.xml + @\cp -pr Runtime/rc/menu.xrc /usr/local/share/codelite/rc/ + @\cp -pr Runtime/templates/*.project /usr/local/share/codelite/templates/ + @\cp -pr Runtime/templates/*.wizard /usr/local/share/codelite/templates/ + @\cp -pr Runtime/lexers/*.xml /usr/local/share/codelite/lexers/ + @\cp -pr lib/Debugger.so /usr/local/share/codelite/debuggers/ + @\cp -pr lib/CodeFormatter.so /usr/local/share/codelite/plugins/ + @\cp -pr lib/Subversion.so /usr/local/share/codelite/plugins/ + @\cp -pr lib/Gizmos.so /usr/local/share/codelite/plugins/ + @\cp -pr Runtime/index.html /usr/local/share/codelite/ + @\cp -pr Runtime/astyle.sample /usr/local/share/codelite/ + @\cp -pr Runtime/images/*.png /usr/local/share/codelite/images/ + @chmod -R 777 /usr/local/share/codelite + @chmod +x /usr/local/bin/CodeLite + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + @echo Notice: + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + @echo Project name is now CodeLite instead of LiteEditor! + @echo To start the application, type: CodeLite & + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + +upgrade: + @echo removing old binaries... + @\rm -fr /usr/local/bin/LiteEditor + @\rm -fr /usr/local/bin/LiteEditorUD + @\rm -fr /usr/local/bin/LiteEditorUR + @\rm -fr /usr/local/bin/CodeLite + @\rm -fr /usr/local/bin/CodeLiteUR + @\rm -fr /usr/local/bin/CodeLiteUD + @\rm -fr /usr/local/bin/le_dos2unix.sh + @\rm -fr /usr/local/bin/le_killproc.sh + @\rm -fr /usr/local/bin/le_intgdb.sh + @\rm -fr /usr/local/bin/$(EXE_NAME) + @\rm -fr $(HOME)/.codelite/config/liteeditor.xml + @\rm -fr $(HOME)/.liteeditor/config/liteeditor.xml + +uninstall: + @echo Uninstalling CodeLite + @\rm -fr /usr/local/bin/LiteEditor + @\rm -fr /usr/local/bin/LiteEditorUD + @\rm -fr /usr/local/bin/LiteEditorUR + @\rm -fr /usr/local/bin/CodeLite + @\rm -fr /usr/local/bin/CodeLiteUR + @\rm -fr /usr/local/bin/CodeLiteUD + @\rm -fr /usr/local/bin/le_dos2unix.sh + @\rm -fr /usr/local/bin/le_killproc.sh + @\rm -fr /usr/local/bin/le_intgdb.sh + @\rm -fr /usr/local/bin/$(EXE_NAME) + @\rm -fr $(HOME)/.liteeditor + @\rm -fr $(HOME)/.codelite + +-include $(OBJ_DIR)/*.d diff --git a/makefile.mac b/makefile.mac new file mode 100644 index 0000000000..e4f4794e40 --- /dev/null +++ b/makefile.mac @@ -0,0 +1,320 @@ +## +## CodeLite library makefile +## Author: Eran Ifrah +## +## This makefile was created to build CodeLite, LiteEditor and its dependencies, +## for the g++ compiler. It was tested using gmake & GCC 4.1 +## Testted on Ubunto Dapper, Fedora core 4 & 5 +## +## Feel free to modify it for your own use +## +## Read BuildInfo.txt for more information + +## +## Set default build set +## as ANSI-deubg +## +WXCFG=--unicode=no --debug=yes +EXT=d +OBJ_DIR=Debug_gcc +DEBUG= -g +EXE_NAME=CodeLiteD + +## +## Override default settings by typing: make type=[release | release_unicode | debug_unicode] +## +## settings for unicode debug +ifeq ($(type), debug_unicode) + EXE_NAME=CodeLiteUD + WXCFG=--unicode=yes --debug=yes + EXT=ud + OBJ_DIR=Debug_gcc_unicode + DEBUG= -g + OPT= -DREGEXP_UNICODE +else + EXE_NAME=CodeLiteUR + type=release_unicode + export type + WXCFG=--unicode=yes --debug=no + EXT=u + OBJ_DIR=Release_gcc_unicode + DEBUG= + OPT=-O3 -DREGEXP_UNICODE +endif + +OUTPUT_DIR=lib + +PROFILER=# -pg +## +## Define variables, using wx-config tool +## + +CMP=g++ $(DEBUG) $(OPT) +LIBP=-L../lib + +TRACE_FLAG=## Comment this if you dont want messages in log window +CCFLAGS= -D__WX__ -Wall $(TRACE_FLAG) -I. -DWXUSINGDLL -DWX_PRECOMP -DNO_GCC_PRAGMA -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API $(shell wx-config --cxxflags $(WXCFG)) $(PROFILER) -fno-strict-aliasing -DYY_NEVER_INTERACTIVE=1 + +LINK_FLAGS = -L$(OUTPUT_DIR) -Lsdk/wxflatnotebook/lib -lwxflatnotebook$(EXT) -lplugin$(EXT) -lcodelite$(EXT) -lwxsqlite3$(EXT) -lwxscintilla$(EXT) -Lsdk/sqlite3/lib $(PROFILER) $(shell wx-config --libs $(WXCFG)) + +SCI_INCLUDE= -Isdk/wxscintilla/include -Isdk/wxscintilla/src/scintilla/include -Isdk/wxscintilla/src/scintilla/src +SQLITE_INCLUDE= -Isdk/wxsqlite3/include -Isdk/wxsqlite3/sqlite3/include +INCLUDES = -I. -IInterfaces -IDebugger -IPlugin -ICodeLite -ILiteEditor -ILiteEditor/include/ -Isdk/wxflatnotebook/include $(SQLITE_INCLUDE) $(SCI_INCLUDE) + +## +## Define the object files +## + +lib_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard CodeLite/*.cpp))))) +lib_c_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard CodeLite/*.c))))) +sample_cpp_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard LiteEditor/*.cpp))))) + +## +## Scintilla related +## +SCI_DEFS = -DGTK -DSCI_LEXER -DLINK_LEXERS +SCI_OBJ_DIR=$(OBJ_DIR)_scintilla +sci_objects1 := $(addprefix $(SCI_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxscintilla/src/scintilla/src/*.cxx))))) +sci_objects2 := $(addprefix $(SCI_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxscintilla/src/*.cpp))))) +sci_objects = $(sci_objects1) $(sci_objects2) + +## +## SQLite related +## +SQLITE_OBJ_DIR=$(OBJ_DIR)_sqlite3 +sqlite_objects2 := $(addprefix $(SQLITE_OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard sdk/wxsqlite3/src/*.cpp))))) +sqlite_objects = $(sqlite_objects1) $(sqlite_objects2) + +## our main build target +build : pre_build CodeLite Scintilla SQLite wxFlatNotebook SDK LiteEditor ctags Debugger CodeFormatter Subversion Gizmos + +CodeLite: code_lite_msg $(lib_cpp_objects) $(lib_c_objects) + ar rcu $(OUTPUT_DIR)/libcodelite$(EXT).a $(lib_cpp_objects) $(lib_c_objects) + ranlib $(OUTPUT_DIR)/libcodelite$(EXT).a + +Scintilla: scintilla_msg $(sci_objects) + ar rcu $(OUTPUT_DIR)/libwxscintilla$(EXT).a $(sci_objects) + ranlib $(OUTPUT_DIR)/libwxscintilla$(EXT).a + +SQLite: sqlite_msg sqlite3/Release/sqlite3.o $(sqlite_objects) + ar rcu $(OUTPUT_DIR)/libwxsqlite3$(EXT).a $(sqlite_objects) sqlite3/Release/sqlite3.o + ranlib $(OUTPUT_DIR)/libwxsqlite3$(EXT).a + +sqlite3/Release/sqlite3.o: + gcc -c sqlite3/sqlite3.c -o sqlite3/Release/sqlite3.o -O3 + +wxFlatNotebook: wxFlatNotebook_msg + cd sdk/wxflatnotebook/build/wxFlatNotebook && $(MAKE) + +Gizmos: gizmos_msg + cd Gizmos && $(MAKE) + +SDK: sdk_msg + cd Plugin/ && $(MAKE) + +Debugger: debugger_msg + cd Debugger/ && $(MAKE) + +Subversion: svn_msg + cd Subversion/ && $(MAKE) + +CodeFormatter: formatter_msg + cd CodeFormatter/ && $(MAKE) + +ctags: sdk/ctags/Makefile ctags_msg + cd sdk/ctags/ && $(MAKE) + +sdk/ctags/Makefile: + @chmod +x sdk/ctags/configure + @cd sdk/ctags/ && ./configure + + +LiteEditor: lite_editor_msg $(sample_cpp_objects) + $(CMP) -o Runtime/$(EXE_NAME) $(sample_cpp_objects) $(LINK_FLAGS) + +$(OBJ_DIR)/%.o: CodeLite/%.cpp CodeLite/%.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +$(OBJ_DIR)/%.o: LiteEditor/%.cpp LiteEditor/%.o.d + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(OBJ_DIR)/$(@F) + +CodeLite/%.o.d: + @$(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM CodeLite/$(addsuffix .cpp, $(basename $(basename $(@F)))) + +LiteEditor/%.o.d: + @$(CMP) $(CCFLAGS) $(INCLUDES) -MT$(OBJ_DIR)/$(basename $(@F)) -MF$(OBJ_DIR)/$(addsuffix .d, $(basename $(@F))) -MM LiteEditor/$(addsuffix .cpp, $(basename $(basename $(@F)))) + +$(SCI_OBJ_DIR)/%.o: sdk/wxscintilla/src/%.cpp + $(CMP) $(CCFLAGS) $(SCI_DEFS) $(INCLUDES) -c $< -o $(SCI_OBJ_DIR)/$(@F) + +$(SCI_OBJ_DIR)/%.o: sdk/wxscintilla/src/scintilla/src/%.cxx + $(CMP) $(CCFLAGS) $(SCI_DEFS) $(INCLUDES) -c $< -o $(SCI_OBJ_DIR)/$(@F) + +$(SQLITE_OBJ_DIR)/%.o: sdk/sqlite3/%.c + $(CMP) $(CCFLAGS) -DNO_TCL $(INCLUDES) -c $< -o $(SQLITE_OBJ_DIR)/$(@F) + +$(SQLITE_OBJ_DIR)/%.o: sdk/wxsqlite3/src/%.cpp + $(CMP) $(CCFLAGS) $(INCLUDES) -c $< -o $(SQLITE_OBJ_DIR)/$(@F) + +pre_build: + test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + test -d $(OUTPUT_DIR) || mkdir $(OUTPUT_DIR) + test -d $(SCI_OBJ_DIR) || mkdir $(SCI_OBJ_DIR) + test -d $(SQLITE_OBJ_DIR) || mkdir $(SQLITE_OBJ_DIR) + chmod +x ./le_makerevision.sh + ./le_makerevision.sh + +ctags_msg: + @echo ---------------------------------------------------------- + @echo Building ctags-le + @echo ---------------------------------------------------------- + +gizmos_msg: + @echo ---------------------------------------------------------- + @echo Building Gizmos plugin + @echo ---------------------------------------------------------- + +debugger_msg: + @echo ---------------------------------------------------------- + @echo Building Debugger extension + @echo ---------------------------------------------------------- + +svn_msg: + @echo ---------------------------------------------------------- + @echo Building Suversion extension + @echo ---------------------------------------------------------- + +formatter_msg: + @echo ---------------------------------------------------------- + @echo Building CodeFormatter extension -AStyle + @echo ---------------------------------------------------------- + +code_lite_msg: + @echo ---------------------------------------------------------- + @echo Building CodeLite library + @echo ---------------------------------------------------------- + +sdk_msg: + @echo ---------------------------------------------------------- + @echo Building SDK library + @echo ---------------------------------------------------------- + +sqlite_msg: + @echo ---------------------------------------------------------- + @echo Building SQLite library + @echo ---------------------------------------------------------- + +scintilla_msg: + @echo ---------------------------------------------------------- + @echo Building Scintilla library + @echo ---------------------------------------------------------- + +lite_editor_msg: + @echo ---------------------------------------------------------- + @echo Building LiteEditor program + @echo ---------------------------------------------------------- + +wxFlatNotebook_msg: + @echo ---------------------------------------------------------- + @echo Building wxFlatNotebook library + @echo ---------------------------------------------------------- + +clean: + $(RM) Debug_gcc/*.o Release_gcc/*.o Release_gcc_unicode/*. Debug_gcc_unicode/*.o lib/*.o lib/*.a + $(RM) Debug_gcc_sqlite3/*.o Release_gcc_sqlite3/*.o Release_gcc_unicode_sqlite3/*. Debug_gcc_unicode_sqlite3/*.o lib/*.o lib/*.a + $(RM) Debug_gcc_scintilla/*.o Release_gcc_scintilla/*.o Release_gcc_unicode_scintilla/*. Debug_gcc_unicode_sinctilla/*.o lib/*.o lib/*.a + $(RM) -R Debug_gcc Release_gcc Release_gcc_unicode Debug_gcc_unicode Debug_gcc_sqlite3 Release_gcc_sqlite3 Release_gcc_unicode_sqlite3 Debug_gcc_unicode_sqlite3 Debug_gcc_scintilla Release_gcc_scintilla Release_gcc_unicode_scintilla Debug_gcc_unicode_scintilla + cd sdk/wxflatnotebook/build/wxFlatNotebook/ && $(MAKE) clean + cd Plugin/ && $(MAKE) clean + cd Debugger/ && $(MAKE) clean + cd CodeFormatter/ && $(MAKE) clean + cd Subversion/ && $(MAKE) clean + +clean_deps: + $(RM) Debug_gcc/*.d Release_gcc/*.d Release_gcc_unicode/*.d Debug_gcc_unicode/*.d + +install: upgrade + @echo installing CodeLite + @\rm -f /usr/local/bin/CodeLite + @echo copying Runtime/$(EXE_NAME) to /usr/local/bin/ + @mkdir -p /usr/local/bin + @cp Runtime/$(EXE_NAME) /usr/local/bin/ + @ln -s /usr/local/bin/$(EXE_NAME) /usr/local/bin/CodeLite + @echo cp Runtime/le_dos2unix.sh /usr/local/bin/ + @cp Runtime/le_dos2unix.sh /usr/local/bin/ + @echo cp Runtime/le_killproc.sh /usr/local/bin/ + @cp Runtime/le_killproc.sh /usr/local/bin/ + @chmod +x /usr/local/bin/le_dos2unix.sh + @chmod +x /usr/local/bin/le_killproc.sh + @echo copying ctags-le to /usr/local/bin + @cp sdk/ctags/ctags-le /usr/local/bin/ + @mkdir -p /usr/local/share/codelite + @mkdir -p /usr/local/share/codelite/config + @mkdir -p /usr/local/share/codelite/debuggers + @mkdir -p /usr/local/share/codelite/templates + @mkdir -p /usr/local/share/codelite/plugins + @mkdir -p /usr/local/share/codelite/images + @mkdir -p /usr/local/share/codelite/rc + @mkdir -p /usr/local/share/codelite/lexers + @echo Deleting old settings... + $(RM) $(HOME)/.liteeditor/debuggers/Debugger.so + $(RM) $(HOME)/.liteeditor/plugins/CodeFormatter.so + $(RM) $(HOME)/.liteeditor/plugins/Gizmos.so + $(RM) $(HOME)/.liteeditor/plugins/Subversion.so + $(RM) $(HOME)/.liteeditor/config/build_settings.xml + $(RM) $(HOME)/.liteeditor/config/debuggers.xml + $(RM) $(HOME)/.liteeditor/config/liteeditor.xml + $(RM) $(HOME)/.liteeditor/rc/menu.xrc + $(RM) $(HOME)/.liteeditor/astyle.sample + @echo Copying new settings... + @\cp -pr Runtime/config/build_settings.xml /usr/local/share/codelite/config/build_settings.xml + @\cp -pr Runtime/config/debuggers.xml /usr/local/share/codelite/config/debuggers.xml + @\cp -pr Runtime/config/liteeditor.xml.sample /usr/local/share/codelite/config/liteeditor.xml + @\cp -pr Runtime/rc/menu.xrc /usr/local/share/codelite/rc/ + @\cp -pr Runtime/templates/*.project /usr/local/share/codelite/templates/ + @\cp -pr Runtime/templates/*.wizard /usr/local/share/codelite/templates/ + @\cp -pr Runtime/lexers/*.xml /usr/local/share/codelite/lexers/ + @\cp -pr lib/Debugger.so /usr/local/share/codelite/debuggers/ + @\cp -pr lib/CodeFormatter.so /usr/local/share/codelite/plugins/ + @\cp -pr lib/Subversion.so /usr/local/share/codelite/plugins/ + @\cp -pr lib/Gizmos.so /usr/local/share/codelite/plugins/ + @\cp -pr Runtime/index.html /usr/local/share/codelite/ + @\cp -pr Runtime/astyle.sample /usr/local/share/codelite/ + @\cp -pr Runtime/images/*.png /usr/local/share/codelite/images/ + @chmod -R 777 /usr/local/share/codelite + @chmod +x /usr/local/bin/CodeLite + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + @echo Notice: + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + @echo Project name is now CodeLite instead of LiteEditor! + @echo To start the application, type: CodeLite & + @echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + +upgrade: + @echo removing old binaries... + @\rm -fr /usr/local/bin/LiteEditor + @\rm -fr /usr/local/bin/LiteEditorUD + @\rm -fr /usr/local/bin/LiteEditorUR + @\rm -fr /usr/local/bin/CodeLite + @\rm -fr /usr/local/bin/CodeLiteUR + @\rm -fr /usr/local/bin/CodeLiteUD + @\rm -fr /usr/local/bin/le_dos2unix.sh + @\rm -fr /usr/local/bin/le_killproc.sh + @\rm -fr /usr/local/bin/le_intgdb.sh + @\rm -fr /usr/local/bin/$(EXE_NAME) + +uninstall: + @echo Uninstalling CodeLite + @\rm -fr /usr/local/bin/LiteEditor + @\rm -fr /usr/local/bin/LiteEditorUD + @\rm -fr /usr/local/bin/LiteEditorUR + @\rm -fr /usr/local/bin/CodeLite + @\rm -fr /usr/local/bin/CodeLiteUR + @\rm -fr /usr/local/bin/CodeLiteUD + @\rm -fr /usr/local/bin/le_dos2unix.sh + @\rm -fr /usr/local/bin/le_killproc.sh + @\rm -fr /usr/local/bin/le_intgdb.sh + @\rm -fr /usr/local/bin/$(EXE_NAME) + @\rm -fr $(HOME)/.liteeditor + +-include $(OBJ_DIR)/*.d diff --git a/sdk/astyle/bin/AStyle.exe b/sdk/astyle/bin/AStyle.exe new file mode 100644 index 0000000000000000000000000000000000000000..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2i# z=w3OFd8LK(lJh6I>B;N7?@O>hW-0!K)#xMG@tV(nm6x3JO2kK!G|vZ literal 0 HcmV?d00001 diff --git a/sdk/astyle/build/AStyle.vcproj b/sdk/astyle/build/AStyle.vcproj new file mode 100644 index 0000000000..eb9b8102a9 --- /dev/null +++ b/sdk/astyle/build/AStyle.vcproj @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/astyle/doc/astyle.html b/sdk/astyle/doc/astyle.html new file mode 100644 index 0000000000..94d699ba6e --- /dev/null +++ b/sdk/astyle/doc/astyle.html @@ -0,0 +1,945 @@ + + + + + +Artistic Style + + + + + + + + + + + + + +
    +

    Artistic Style 1.21

    +
    +

    A Free, Fast and Small Automatic Formatter
    + for C, C++, C#, and Java Source Code +

    +
    + +

     

    +

     

    + +

    General Information

    + +

    Line Endings
    + Line endings in the formatted file will be the same as the input file. If + there are mixed line endings the most frequent occurrence will be used.

    + +

    File Type
    + Artistic Style will determine the file type from the file + extension. The extension ".java" indicates a Java file, and ".cs" indicates a C# file. + Everything else is a C or C++ file. If you are using a non-standard file + extension for Java or C#, use one of the --mode= options + described in "Formatting Options".

    + +

    Quick Start
    + If you have never used Artistic Style there are a couple of ways to + start. One is to run it with no options at all. This will format the file + with 4 spaces per indent and will leave the brackets unchanged. Another is + to use one of the predefined styles described in the "Predefined Style + Options". Select one with a bracket formatting style you like. Once you are + familiar with the options you can customize the format to your personal + preference.

    + +

     

    + +

    +

    + +

    Usage

    +

    Artistic style is a console program that receives information from the + command line. The format of the command line is:

    +
    astyle [options]   SourceFile1.cpp  SourceFile2.cpp  SourceFile3.cpp [ . . . ]
    +

    Or to save the file with a different name:

    +

    +
    astyle [options] < OriginalSourceFile > BeautifiedSourceFile
    +
    +

    The < and + > characters are used + to redirect the files into standard input and out of standard output - don't + forget them!

    +

    The block parens [ ] indicate that more than one option or more than one + filename can be entered. They are NOT actually included in the command. For + the options format see the following Options section.

    +

    With the first option, the newly indented file retains the + original file name , while a copy of the original file is created + with a .orig appended to the original file + name. (This can be set to a different string by the option --suffix=, + or suppressed altogether by the options -n or + --suffix=none). Thus, after indenting SourceFile1.cpp + as above, the indented result will be named SourceFile1.cpp, + while the original pre-indented file will be renamed to + SourceFile1.cpp.orig.

    +

    With the second option, the file is saved with a different name. + Therefore a copy is not created.

    +

    Wildcards (such as "*.cpp"), can be used if the + project is compiled to include them. See the Installation Information + for instructions.

    +  

    Options File

    + +

    A default options file may be used to set + your favorite source style.

    +
      +
    • The command line options have precedence. If there is a conflict + between a command line option and an option in the default options file, + the command line option will be used.
    • +
    • Artistic Style looks for this file in the following locations (in + order): +
        +
      1. the file indicated by the --options= command + line option;
      2. +
      3. the file and directory indicated by the environment variable + ARTISTIC_STYLE_OPTIONS (if it exists);
      4. +
      5. the file named .astylerc in the directory + pointed to by the HOME environment variable (e.g. "$HOME/.astylerc" + on Linux);
      6. +
      7. the file named astylerc in the directory + pointed to by the USERPROFILE environment variable + (e.g. "%USERPROFILE%\astylerc" on Windows).
      8. +
      +
    • +
    • This option file lookup can be disabled by specifying + --options=none on the command line.
    • +
    • Options may be set apart by new-lines, tabs or spaces.
    • +
    • Long options in the options file may be written + without the preceding '--'.
    • +
    • Lines within the options file that begin with '#' + are considered line-comments.
    • +
    • Example of a default options file: +
      +
      # brackets should be attached to pre-bracket lines
      +brackets=attach
      +# set 6 spaces per indent
      +indent=spaces=6
      +# indent switch blocks
      +indent-switches
      +# suffix of original files should be .pre
      +suffix=.pre
      +
      +
      +
    • +
    + +

     

    + +

    Options

    + +

    Not specifying any option will result in C/C++ style indentation, no + change in bracket placement, 4 spaces per indent, and no formatting changes.

    +

    Options may be written in two different ways:

    +
      +
    • Long options:
      + These options start with '--', and + must be written one at a time.
      + (Example: '--brackets=attach --indent=spaces=4')
    • +
    • Short Options:
      + These options start with a single '-', and + may be concatenated together.
      + (Example: '-bps4' is the same as writing '-b -p -s4'.) +
    • +
    +

     

    + +
    + +

    Predefined Style Options

    + +

    Predefined Style options define the style by setting several other + options. If other options are also used, the placement of the + predefined style option in the command line is important. If the + predefined style option is placed first, the other options may override the + predefined style. If placed last, the predefined style will override + the other options.

    +

    For example the style --style=ansi sets the option --brackets=break + . If the command line specifies "--style=ansi --brackets=attach", + the brackets will be attached and the style will not be ansi style. If + the order on the command line is reversed to "--brackets=attach + --style=ansi ", the brackets will be broken (ansi style) and the attach + option will be ignored.

    +

    For the options set by each style check the parseOption function in astyle_main.cpp.

    + +
    +

    --style=ansi
    + ANSI style formatting/indenting. Brackets are broken, indentation is 4 + spaces. Namespaces, classes, and switches are NOT indented.

    +
    +
    namespace foospace
    +{
    +int Foo()
    +{
    +    if (isBar)
    +    {
    +        bar();
    +        return 1;
    +    }
    +    else
    +        return 0;
    +}
    +}
    +
    +
    +


    +

    +

    --style=gnu
    + GNU style formatting/indenting.  Brackets are broken, blocks are + indented, indentation is 2 spaces. Namespaces, classes, and switches are + NOT indented.

    +
    +
    namespace foospace
    +  {
    +    int Foo()
    +      {
    +        if (isBar)
    +          {
    +            bar();
    +            return 1;
    +          }
    +        else
    +          return 0;
    +      }
    +  }
    +
    +
    +


    +

    +

    --style=kr
    + Kernighan&Ritchie style formatting/indenting. Brackets are attached, + indentation is 4 spaces. Namespaces, classes, and switches are NOT + indented.

    +
    +
    namespace foospace {
    +int Foo() {
    +    if (isBar) {
    +        bar();
    +        return 1;
    +    } else
    +        return 0;
    +}
    +}
    +
    +
    +


    +

    +

    --style=linux
    + Linux style formatting/indenting. All brackets are linux style, + indentation is 8 spaces. Namespaces, classes, and switches are NOT + indented.

    +
    +
    namespace foospace
    +{
    +int Foo()
    +{
    +        if (isBar) {
    +                bar();
    +                return 1;
    +        } else
    +                return 0;
    +}
    +}
    +
    +
    +


    +

    +

    --style=java
    + Java style formatting/indenting. Brackets are attached, indentation is 4 + spaces. Switches are NOT indented.

    +
    +
    class foospace {
    +    int Foo() {
    +        if (isBar) {
    +            bar();
    +            return 1;
    +        } else
    +            return 0;
    +    }
    +}
    +
    +
    +
    +
    + +

    Tab and Bracket Options

    +
    +

    default indent option
    + If no indentation option is set, the default option of 4 spaces + will be used (e.g. -s4 + --indent=spaces=4).

    +

    --indent=spaces=# / + -s#
    + Indent using # spaces per + indent (e.g. -s6 + --indent=spaces=6). + # must be between 2 and + 20. Not specifying # + will result in a default of 4 spaces per indent.

    +

    --indent=tab / --indent=tab=# + / -t#
    + Indent using tab characters. Treat each tab as + # spaces (e.g. -t6 / --indent=tab=6). # must be + between 2 and 20. If no + # is set, treats tabs as 4 + spaces.

    +

    --force-indent=tab=# + / -T#
    + Indent using tab characters. Treat each tab as + # spaces (e.g. -T6 / --force-indent=tab=6). Uses tabs as indents where + --indent=tab prefers to use spaces, such as inside multi-line + statements. # must be between 2 + and 20. If no # + is set, treats tabs as 4 spaces.

    +


    +

    +

    default brackets option
    + If no brackets option is set, the brackets will not be changed. +

    +

    --brackets=break / -b
    + Break brackets from their pre-block statements ( e.g. ANSI C / C++ style + ).

    +
    +
    void Foo(bool isFoo)
    +{
    +    if (isFoo)
    +    {
    +        bar();
    +    }
    +    else
    +    {
    +        anotherBar();
    +    }
    +}
    +
    +
    +


    +

    +

    --brackets=attach / -a
    + Attach brackets to their pre-block statements ( e.g. Java / K&R style ). +

    +
    +
    void Foo(bool isFoo) {
    +    if (isFoo) {
    +        bar();
    +    } else {
    +        anotherBar();
    +    }
    +}
    +
    +
    +


    +

    +

    --brackets=linux / -l
    + Break brackets from class and function declarations, but attach brackets to + pre-block command statements.

    +
    +
    void Foo(bool isFoo)
    +{
    +    if (isFoo) {
    +        bar();
    +    } else {
    +        anotherBar;
    +    }
    +}
    +
    +


    +

    +

    --brackets=break-closing / -y
    + When used with either --brackets=attach or + --brackets=linux, breaks closing headers (e.g. 'else', + 'catch', ...) from their immediately preceding closing + brackets.

    +
    +
    void Foo(bool isFoo) {
    +    if (isFoo) {
    +        bar();
    +    } else {
    +        anotherBar();
    +    }
    +}
    +

    becomes (with a broken 'else'):

    +
    void Foo(bool isFoo) {
    +    if (isFoo) {
    +        bar();
    +    }
    +    else {
    +        anotherBar();
    +    }
    +}
    +
    +
    +
    +
    + +

    Indentation Options

    +
    +

    --indent-classes / -C
    + Indent 'class' and 'struct' blocks so that the blocks 'public:', + 'protected:' and 'private:' are indented. + The entire block is indented. This option has no effect on Java and C# + files.

    +
    +
    class Foo
    +{
    +public:
    +    Foo();
    +    virtual ~Foo();
    +};
    +
    +

    becomes:

    +
    class Foo
    +{
    +    public:
    +        Foo();
    +        virtual ~Foo();
    +};
    +
    +
    +


    +

    +

    --indent-switches / -S
    + Indent 'switch' blocks so that the 'case X:' + statements are indented in the switch block. The entire + case block is indented.

    +
    +
    switch (foo)
    +{
    +case 1:
    +    a += 1;
    +    break;
    +
    +case 2:
    +{
    +    a += 2;
    +    break;
    +}    
    +}
    +
    +

    becomes:

    +
    switch (foo)
    +{
    +    case 1:
    +        a += 1;
    +        break;
    +
    +    case 2:
    +    {
    +        a += 2;
    +        break;
    +    }        
    +}
    +
    +
    +


    +

    +

    --indent-cases / -K
    + Indent 'case X:' blocks from the 'case X:' + headers. Case statements not enclosed in blocks are NOT indented.

    +
    +
    switch (foo)
    +{
    +    case 1:
    +        a += 1;
    +        break;
    +
    +    case 2:
    +    {
    +        a += 2;
    +        break;
    +    }
    +}
    +
    +

    becomes:

    +
    switch (foo)
    +{
    +    case 1:
    +        a += 1;
    +        break;
    +
    +    case 2:
    +        {
    +            a += 2;
    +            break;
    +        }
    +}
    +
    +
    +


    +

    +

    --indent-blocks / -G
    + Add extra indentation to entire blocks.

    +
    +
    if (isFoo)
    +{
    +    bar();
    +}
    +else
    +    anotherBar();
    +
    +

    becomes:

    +
    if (isFoo)
    +    {
    +        bar();
    +    }
    +else
    +    anotherBar();
    +
    +
    +


    +

    +

    --indent-brackets / -B
    + Add extra indentation to brackets. This option has no effect if + --indent-blocks is used.

    +
    +
    if (isFoo)
    +{
    +    bar();
    +}
    +else
    +    anotherBar();
    +
    +

    becomes:

    +
    if (isFoo)
    +    {
    +    bar();
    +    }
    +else
    +    anotherBar();
    +
    +
    +


    +

    + +

    --indent-namespaces / -N
    + Add extra indentation to namespace blocks.

    +
    +
    namespace foospace
    +{
    +class Foo
    +{
    +    public:
    +        Foo();
    +        virtual ~Foo();
    +};
    +}
    +
    +

    becomes:

    +
    namespace foospace
    +{
    +    class Foo
    +    {
    +        public:
    +            Foo();
    +            virtual ~Foo();
    +    };
    +}
    +
    +
    +


    +

    +

    --indent-labels / -L
    + Add extra indentation to labels so they appear 1 indent less than the + current indentation, rather than being flushed to the left (the + default).

    +
    +
    int foo() {
    +    while (isFoo) {
    +        ...
    +        if (isFoo)
    +            goto error;
    +    }
    +
    +error:
    +        ...
    +}
    +
    +

    becomes (with indented 'error'):

    +
    int foo() {
    +    while (isFoo) {
    +        ...
    +        if (isFoo)
    +            goto error;
    +    }
    + 
    +     error:
    +         ...
    +}
    +
    +
    +


    +

    +

    --indent-preprocessor / -w
    + Indent multi-line preprocessor definitions ending with a backslash. Should be used with + --convert-tabs for proper results. Does a pretty + good job, but can not perform miracles in obfuscated preprocessor + definitions.

    +
    +
    #define Is_Bar(arg,a,b) \
    +(Is_Foo((arg), (a)) \
    +|| Is_Foo((arg), (b)))
    +
    +

    becomes:

    +
    #define Is_Bar(arg,a,b) \
    +    (Is_Foo((arg), (a)) \
    +     || Is_Foo((arg), (b)))
    +
    +
    +


    +

    + +

    --max-instatement-indent=# + / -M#
    + Indent a maximum of # spaces in + a continuous statement, relative to the previous line (e.g. + --max-instatement-indent=40). + # must be less than 80. If + no # is set, the default value + of 40 will be used.

    +
    +
    fooArray[] = { red,
    +         green,
    +         blue };
    +
    +fooFunction(barArg1,
    +         barArg2,
    +         barArg3);
    +
    +

    becomes (with larger value):

    +
    fooArray[] = { red,
    +               green,
    +               blue };
    +
    +fooFunction(barArg1,
    +            barArg2,
    +            barArg3);
    +
    +
    +


    +

    +

    --min-conditional-indent=# + / -m#
    + Set the minimal indent that is added when a header is built of + multiple-lines. This indent makes helps to easily separate the header + from the command statements that follow. + The value for # must be less than 40. The default setting for this + option is twice the current indent (e.g. + --min-conditional-indent=8).

    +
    +
    // default setting makes this non-bracketed code clear
    +if (a < b
    +        || c > d)
    +    foo++;
    +
    +// but creates an exaggerated indent in this bracketed code
    +if (a < b
    +        || c > d)
    +{
    +    foo++;
    +}
    +
    +

    becomes (when setting --min-conditional-indent=0):

    +
    // setting makes this non-bracketed code less clear
    +if (a < b
    +    || c > d)
    +    foo++;
    +
    +// but makes this bracketed code clearer
    +if (a < b
    +    || c > d)
    +{
    +    foo++;
    +}
    +
    +
    +
    +
    + +

    Formatting Options

    +
    +

    --break-blocks / -f
    + Pad empty lines around header blocks (e.g. 'if', 'while'...). + Be sure to read the + Supplemental Documentation + before using this option.

    +
    +
    isFoo = true;
    +if (isFoo) {
    +    bar();
    +} else {
    +    anotherBar();
    +}
    +isBar = false;
    +
    +

    becomes:

    +
    isFoo = true;
    +
    +if (isFoo) {
    +    bar();
    +} else {
    +    anotherBar();
    +}
    +
    +isBar = false;
    +
    +
    +


    +

    +

    --break-blocks=all / -F
    + Pad empty lines around header blocks (e.g. 'if', 'while'...). + Treat closing header blocks (e.g. 'else', 'catch') + as stand-alone blocks. Be sure to read the + + Supplemental Documentation before using this option.

    +
    +
    isFoo = true;
    +if (isFoo) {
    +    bar();
    +} else {
    +    anotherBar();
    +}
    +isBar = false;
    +
    +

    becomes:

    +
    isFoo = true;
    +
    +if (isFoo) {
    +    bar();
    +    
    +} else {
    +    anotherBar();
    +}
    +
    +isBar = false;
    +
    +
    +


    +

    +

    --break-elseifs / -e
    + Break 'else if' header combinations into separate lines. + This option has no effect if one-line=keep-statements is + used. + This option cannot be undone.

    +
    +
    if (isFoo) {
    +    bar();
    +}
    +else if (isFoo1()) {
    +    bar1();
    +}
    +else if (isFoo2()) }
    +    bar2;
    +}
    +
    +

    becomes:

    +
    if (isFoo) {
    +    bar();
    +}
    +else
    +    if (isFoo1()) {
    +        bar1();
    +    }
    +    else
    +        if (isFoo2()) {
    +            bar2();
    +        }
    +
    +
    +


    +

    +

    --pad=oper / -p
    + Insert space padding around operators. Operators inside block parens [] + are not padded. Note that there is no option to unpad. + Once padded, they stay padded.

    +
    +
    if (foo==2)
    +    a=bar((b-c)*a,*d--);
    +
    +

    becomes:

    +
    if (foo == 2)
    +     a = bar((b - c) * a, *d--);
    +
    +
    +


    +

    +

    --pad=paren / -P
    + Insert space padding around parenthesis on both the outside + and the inside.

    +
    +
    if (isFoo(a, b))
    +    bar(a, b);
    +
    +

    becomes:

    +
    if ( isFoo ( a, b ) )
    +    bar ( a, b );
    +
    +
    +


    +

    +

    --pad=paren-out / -d
    + Insert space padding around parenthesis on the outside + only. This can be used with unpad=paren below to remove + unwanted spaces.

    +
    +
    if (isFoo(a, b))
    +    bar(a, b);
    +
    +

    becomes:

    +
    if (isFoo (a, b) )
    +    bar (a, b);
    +
    +
    +


    +

    +

    --pad=paren-in / -D
    + Insert space padding around parenthesis on the inside + only. This can be used with unpad=paren below to remove + unwanted spaces.

    +
    +
    if (isFoo(a, b))
    +    bar(a, b);
    +
    +

    becomes:

    +
    if ( isFoo( a, b ) )
    +    bar( a, b );
    +
    +
    +


    +

    --unpad=paren / -U
    + Remove space padding around parenthesis on the inside and outside. Can + be used in combination with the paren padding options + pad=paren-out and pad=paren-in above. Only padding + that has not been requested by other options will be removed.

    +

    For example, if a source has parens padded on both the inside and + outside, and you want inside only. You need to use unpad=paren to remove + the outside padding, and pad=paren-in to retain the inside padding. Using + only pad=paren-in would not remove the outside padding.

    +
    +
    if ( isFoo( a, b ) )
    +    bar ( a, b );
    +
    +

    becomes (with no padding option requested):

    +
    if (isFoo(a, b))
    +    bar(a, b);
    +
    +
    +


    +

    --one-line=keep-statements / -o
    + Don't break complex statements and multiple statements residing on a + single line.

    +
    +
    if (isFoo)
    +{
    +    isFoo = false; cout << isFoo << endl;
    +}
    +
    +

    remains as is.

    +
    if (isFoo) DoBar();
    +
    +

    remains as is.

    +
    +


    +

    +

    --one-line=keep-blocks / -O
    + Don't break one-line blocks.

    +
    +
    if (isFoo)
    +{ isFoo = false; cout << isFoo << endl; }
    +
    +

    remains as is.

    +
    +


    +

    +

    --convert-tabs / -V
    + Converts tabs into single spaces.

    +


    +

    +

    --fill-empty-lines / -E
    + Fill empty lines with the white space of the previous line.

    +


    +

    +

    --mode=c
    + Indent a C or C++ file. The option is set from the file extension for + each file. You can override the setting with this entry. It allows the + formatter to identify language specific syntax such as C++ classes, + templates, and keywords.

    +

    --mode=java
    + Indent a Java file. The option is set from the file extension for each + file. You can override the setting with this entry. It allows the + formatter to identify language specific syntax such as Java classes keywords.

    +

    --mode=cs
    + Indent a C sharp file. The option is set from the file extension for + each file. You can override the setting with this entry. It allows the + formatter to identify language specific syntax such as C sharp classes + and keywords.

    +
    +
    + +

    Other Options

    +
    +

    --suffix=####
    + Append the suffix #### instead of '.orig' to + original filename (e.g. --suffix=.bak). + If this is to be a file extension, the dot '.' must be included. + Otherwise the suffix will be appended to the current file extension.

    +

    --suffix=none / -n
    + Do not retain a backup of the original file. The original file is + purged after it is formatted.

    +

    --options=####
    + Specify an options file #### to read and + use.

    +

    --options=none
    + Disable the default options file. Only the command-line parameters will + be used.

    + +

    --errors-to-stdout / -X
    + Print errors to standard-output rather than to standard-error.
    + This option should be helpful for systems/shells that do not have this + option, such as in Windows95.

    + +

    --preserve-date / -Z
    + Preserve the original file's date and time modified. The date and time + modified will not be changed in the formatted file. This option is not + effective if redirection is used.

    + +

    --version / -v
    + Print version number.

    +

    --help / -h / -?
    + Print a help message and quit.

    +
    +
    + +

     

    +

    ENJOY !!!

    +

     

    + +
    + + + + + \ No newline at end of file diff --git a/sdk/astyle/doc/astyleX.html b/sdk/astyle/doc/astyleX.html new file mode 100644 index 0000000000..90686bd139 --- /dev/null +++ b/sdk/astyle/doc/astyleX.html @@ -0,0 +1,67 @@ + + + AStyle Supplemental Documentation + + + +
    +

    Artistic Style Supplemental Documentation

    +
    +

    Problems with Break Header Blocks, Break All Blocks

    +

    The following are known problems with the break header blocks and break all + blocks options (--break-blocks, --break-blocks=all).

    +
      +
    • +

      If a statement is NOT part of a block, the following statements are all double + spaced. Statements enclosed in a block are formatted correctly.

      +
      +

      This:

      +
      visStatusHeight = rcStatus.bottom - rcStatus.top;
      +if(!opt.bViewStatus)
      +    visStatusHeight = 0;
      +GetClientRect(hwnd, &rcEdit);
      +iEditLeft = rcEdit.left;
      +iEditRight = rcEdit.right - iEditLeft;
      +
      +

      Becomes this (with extra lines added where they shouldn't be):

      +
      visStatusHeight = rcStatus.bottom - rcStatus.top;
      +
      +if (!opt.bViewStatus) 
      +    visStatusHeight = 0;
      +
      +GetClientRect(hwnd, &rcEdit);
      +
      +iEditLeft = rcEdit.left;
      +
      +iEditRight = rcEdit.right - iEditLeft;
      +
      +
      +
      +
    • +

      Comments are broken from the block.

      +
      +

      This:

      +
      // line numbers and select must be done after SCI_STYLECLEARALL
      +if(setDialog)
      +    skip = true;
      +
      +

      Becomes this (with a line added after the comment):

      +
      // line numbers and select must be done after SCI_STYLECLEARALL
      +
      +if(setDialog)
      +    skip = true;
      +
      +
      +
    • +
    + + +
    + + \ No newline at end of file diff --git a/sdk/astyle/doc/astyle_news.html b/sdk/astyle/doc/astyle_news.html new file mode 100644 index 0000000000..71d08a2c0b --- /dev/null +++ b/sdk/astyle/doc/astyle_news.html @@ -0,0 +1,229 @@ + + + Artistic Style - News + + + + + + + + +

    Artistic Style News

    +

     

    +
    + +

    Artistic Style 1.21  (June 2007)

    +
    + +

    This release contains many bug fixes. Array formatting and indentation has been improved. Arrays + and enums are now formatted by a different procedure than + functions. Brackets will now attach to lines with comments. + Brackets will be broken from lines with comments without + bringing the comments with them. All comments will remain in their + original column, if possible. The formatting of empty blocks was + fixed. The BracketType definition was expanded and the bracket + types are now correctly identified. There are several formatting + fixes for Java files. See the + Release Notes for a complete + list of changes.

    +

    A new option, --preserve-date (-Z), has been added.  This + will retain the date modified of the original + file in the new formatted file. Otherwise the new file will + contain the current date.

    +

    The option --errors-to-standard-output has been + shortened to + --errors-to-stdout. The short options -c (mode=c) and -j + (mode=java) have been removed. The options should seldom be needed + since the mode is now set automatically from the file extension + for each source + file instead of for each program execution. A new long option --mode=cs + (C#) has been added. Key words are now set for each file + depending on the file mode (C, + Java, or C#). This will eliminate formatting problems caused by + not being able to identify the source code language.

    +

    There has been a change to the Linux style bracket + formatting for C++ header files. In the past + brackets have been broken for function definitions within a + class. With this release + the brackets will be attached. The + brackets will also be attached for arrays, structs, enums, and + other top level objects that are not classes or functions. The + Linux style formatting for Java and C# has not been changed.

    +

    This release supports only one platform in each distribution + package. In the past all platforms were included in every + package. If you use Artistic Style on more than one platform you + will need to download packages for each platform. + The main difference in platforms is the build directory and the + line endings. The source code and documentation are the same for + all packages.

    +

    There are new instructions about optimizing compiler options in + the Install Instructions. + If you are compiling using a development environment you may want + to read them.

    +

    If you have broken brackets with comments attached to the + opening bracket instead of the previous line, do the following + before formatting again with broken brackets. Use the + current Artistic Style release (1.21). Format the source using + attached brackets to reattach the brackets and the comments to + the previous line. Then format the source again using broken + brackets. This will move the brackets to the next line without + the comments. The comments will now be on the correct line.

    +

    There is a new multi-platform GUI program, UniversalIndent, available at + + sourceforge.net/projects/universalindent. It allows + you to view the effects of the Artistic Style options on your + source code without saving the file. You can review the results of + the formatting options before updating the file. It can be used + with a test file or with your actual source code. It supports several + other formatting programs. The Artistic Style for + Windows program has been updated to support the current release. It is + available at + www.geocities.com/jpattee/

    +

    There have been a few inquiries about how to customize + Artistic Style + for an unsupported format. Changes can be made  with Python or + another text processing program after formatting the source, or you can modify the Artistic + Style source code itself. The best place to modify the code is + usually in ASEnhancer.cpp. The ASEnhancer class is called after + the main formatting has been done so you are getting a formatted + file. If you just need to change the indentation of a few things + this is probably the best place to do it.

    +

    There is now a distribution package for OpenVMS thanks to + Jim Duff, an OpenVMS Systems Specialist living in Sydney Australia. + His website is at + eight-cubed.com.

    +

    Thanks to + Norbert Holzki and + + Siemens AG, + Medical Solutions, Forchheim, Germany for testing the array + formatting.

    +

    Thanks to Sam Cooler for testing the Mac OS X version.

    +

     

    + +
    + +

    Artistic Style 1.20  (January 2007)

    + +
    + +

    Release 1.20.2 fixed problems with the new stream I/O + procedure added in release 1.20.1. Release 1.20.1 improved the processing for Mac OS X + platforms. The compatibility with + TextWrangler was improved. + There is now a separate release for Mac.

    + +

    Artistic Style will now indent message maps for Microsoft + Foundation Class (MFC) and event tables for wxWidgets. The option --brackets=break-closing-headers has been + shortened to --brackets=break-closing and a short option added (-y). There have been short options added for + --break-elseifs (-e), --indent-preprocessor (-w), --break-blocks + (-f), and --break-blocks=all (-F).

    + +

    With this release the Artistic Style license changes from the + GNU General Public License (GPL) to the GNU Lesser General Public + License (LGPL). You can use Artistic Style for free or + commercial software without charge. Projects that use Artistic Style do not + have to make the their source code available. If Artistic Style + itself is modified, however, the modified Artistic Style source + code must be made available. See the + GNU Lesser General Public License for + more information.

    +

    There is a new preprocessor option to aid developers in using Artistic Style with a Graphical User Interface + (GUI). It is no longer necessary to remove the source + module astyle_main.cpp and write embedded code to call + the formatter. It can be compiled as a static library + or a shared library (DLL), or the entire source + code can be included in the project. See the + Artistic Style Developer Information + for the calling procedure and other details.

    +

    There is a sample GUI program for Windows available at + http://www.geocities.com/jpattee/. + It uses the unmodified + Artistic Style compiled for a GUI. The source code needs some + work so it is not available for now. It should work under Linux + using WINE. Future enhancements and platform support will depend + on the response to the sample program.

    +

    To support the new Artistic Style preprocessor option there are new + makefiles and project files. Windows users have a project + file for Microsoft Visual C++ 2003 (version 7). Linux users have + a new makefile that has several new options. The location + of both files is in the build directory. Be sure to read + the Artistic Style Install Information + for the details.

    + +

    Intel® is now offering it's C++ and Fortran compilers free for + non-commercial use. Information is available at the + Intel® + Software Development Products website. Click on the + + Free Non-Commercial Download link to see if you qualify. The Intel + Compilers on Windows and Linux require that other compilers be + installed (Microsoft Visual C++ or GNU gcc respectively). This + is because the Intel Compilers require the header files, runtime + libraries and linkers distributed as part of these other + compilers. If you want to use this compiler there is now a makefile (makeintel) + included with the project. See Artistic Style Install Information + for instructions.

    + +

     

    + +
    + +

    Artistic Style 1.19  (July 2006)

    +
    + +

    Most changes this release were again concerned with the + options pad=oper and pad=paren.  The formatting still + worked a little different if both options were declared than if + only one was used.  The problems with distinguishing the + multiplication operator from pointers, and of separating an object from + the member access pointer (->) were fixed.

    + +

    A new option, unpad=paren, was added.  This will undo + the pad=paren, pad=paren-out and pad=paren-in options.  It can be + used alone or with pad=paren-out or pad=paren-in.  If used alone it will unpad all parens that have + been previously padded.  If used with a paren padding + option, the paren padding option will take precedence and + only the unnecessary padding will be removed.  This will + enable the paren padding to be changed in one formatting run.

    + +

    Padding to paren headers (e.g. "if", "for", "while") was + reinstated.  This was done in previous releases if pad=oper + was used.  Since most people used this option, the headers + were usually padded.  The general opinion was that they + looked better padded, especially in the case of "else if" + statements.  Since it is a minor point, it was not made an + option.

    + +

    This is the third release of Artistic Style in the last + four months.  The reason for the frequent releases was + the number of pervasive errors in the formatting.  In the + future there will probably be two or three new releases per + year, or one every four to six months.  It will take about + three years to make all the changes that are planned at this + time.  The releases will be a combination of fixes, changes + to formatting, and new features. 

    + +

     

    + +

     

    + +

     

    +
    + +
    + + \ No newline at end of file diff --git a/sdk/astyle/doc/astyle_notes.html b/sdk/astyle/doc/astyle_notes.html new file mode 100644 index 0000000000..c442224a72 --- /dev/null +++ b/sdk/astyle/doc/astyle_notes.html @@ -0,0 +1,875 @@ + + + + +Artistic Style - Release Notes + + + + + + + + + + + +

    Artistic Style Release Notes

    +

     

    +
    +

    Artistic Style 1.21  (June 2007)

    +
      +
    • New function, formatArrayBrackets, + to improve array formatting and indentation.
    • Attach brackets to lines with end-of-line comments. +
    • Break brackets from lines with end-of-line comments without bringing + the comments with them.
    • Move ASFormatter and ASBeautifier static initialization + from constructor to "init" function to allow for changes in the file type.
    • Add --preserve-date (-Z) option.
    • New functions formatBrackets, padOperators and PadParens to improve decomposition.
    • Add identification of file + mode (C, C#, or Java) to file open procedure.
    • Keywords in headers now depend on file + mode (C, C#, or + Java) and object type (formatter or beautifier).
    • Remove short options -c (mode=c) and -j + (mode=java) since the mode is now set automatically from the file extension.
    • Change Linux bracket formatting for header files.
    • Fix formatting of empty blocks.
    • Expand BracketType definition. +
    • Fix "do not change" bracket mode inconsistencies with other bracket + formatting. +
    • Remove mode=java from Java predefined style.
    • Change long option --errors-to-standard-output to --errors-to-stdout.
    • Fix breaking of struct variable declaration.
    • Add support for OpenVMS compiler.
    • Inline the ASBeautifier function isLegalNameChar.
    • Fix no-indent of block comments starting in + column 1 or 2.
    • Fix formatting of Java anonymous class defined as  a method call + parameter (bracket within a paren). +
    • Fix indentation for Java "for each" statement.
    • Fix bracket being attached to a preprocessor directive.
    • Fix extra indent of single line blocks when a previous line + probation header is found.
    • Fix formatting of block comments when continuation lines have + different leading whitespace characters.
    • Fix deleting a blank line before a bracket when brackets=attach.
    • Fix segmentation fault on preprocessor continuation line followed by an empty line.
    • Fix bad bracket indent that sometimes occurs when brackets=attach and it + cannot be attached.
    • Fix trimming of comment lines. +
    • Fix incorrect identification of "new" operator pointers as + calculations. +
    • Fix incorrect identification of assignments as command type bracket.
    • Fix incorrect indentation of pointers following a dot operator or + pointer.
    • Fix attaching "else if" statements to a single line block. +
    • Fix header recognition problem when header is proceeded by a tab + instead of a space. +
    • Fix line break when colon is followed by a comment.
    • Fix + ASBeautifier not identifying a template definition.
    • Change indents around the end of line to two indents.
    • Change header includes to fix header dependencies for Linux GCC 4.3.
    • Add output line number + for debugging.
    • Add filename to trace output.
    • Add trace for arrays.
    • Add trace for bracketType .
    • Fix no-indent comment in a #else preprocessor directive.
    • Fix block comment continuation line indent when block comments do + not start the line.
    • Adjust position of block comments (/*) when padding is added or deleted. +
    • Fix incorrect formatting if "return" is included in a function name. +
    • Fix incorrect padding if template depth is greater that one and pad=oper is used. +
    • Fix incorrect bracket type identification when bracket is followed + by a comment.
    • Fix incorrect bracket type identification when a "const" + method is declared.
    • Fix incorrect bracket type identification when pre-definition header is inside a paren.
    • Fix deleting a space when attaching a bracket with line comments.
    • Fix indentation when the conditional + "?" operator is used in a single line + statement.
    • Fix indentation when single line "if" statement is used.
    • Add pointers, multiply operators, and selected variables to do not unpad in paren unpad + procedure.
    • Return exit code 0 for --version and --help.
    +

    Artistic Style 1.20.2  (February 2007)

    +
      +
    • Fix problems with the new stream I/O procedure added in release + 1.20.1:
        +
      • Fix adding an extra blank line at end of document.
      • +
      • Fix line ending on last line when cin and cout option is + used.
      • +
      +
    +

    Artistic Style 1.20.1  (January 2007)

    +
      +
    • The following changes were made to improve processing for Mac OS X + platforms:
        +
      • Remove Makefile linker option -s and add a separate "strip" + command.
      • +
      • Open console input and output streams as binary to allow Linux line + ends on a Windows platform.
      • +
      • Change stream I/O procedure to allow for Mac OS 9 line endings.
      • +
      • Change output stream end of line from endl so output stream + is not flushed with each write.
      • +
      • Change information messages from cerr to cout.
      • +
      • Removed messages when I/O is to cin and cout to accommodate + TextWrangler.
      • +
      +
    +

    Artistic Style 1.20  (January 2007)

    +
      +
    • Call importOptions() from function AStyleMain() to allow slop in options parameters.
    • +
    • New makefiles for GCC and Intel with new compile options.
    • +
    • New project file for Visual C with new compile options.
    • +
    • Change comments to reflect the GNU Lesser General Public License.
    • +
    • Indent message maps for MFC and event tables for wxWidgets.
    • +
    • Fix incorrect formatting for an empty comment.
    • +
    • Fix "Unknown option" in default options file when last line does not + contain CR or LF.
    • +
    • Patch from Dieter Bayer to fix case indent when a scope resolution + operator is used.
    • +
    • Change long option --brackets=break-closing-headers to + --brackets=break-closing.
    • +
    • Add short option -y for --brackets=break-closing.
    • +
    • Add short option -e for --break-elseifs.
    • +
    • Add short option -w for --indent-preprocessor.
    • +
    • Add short option -f for --break-blocks.
    • +
    • Add short option -F for --break-blocks=all.
    • +
    • Remove the backup file after formatting when --suffix=none.
    • +
    • Show total time at end of job.
    • +
    • Improved error handling for invalid options with ASTYLE_LIB.
    • +
    • Add function AStyleGetVersion() to ASTYLE_LIB option.
    • +
    • Change preprocessor macro from ASTYLE_GUI to ASTYLE_LIB.
    • +
    • Add astyle namespace to ASEnhancer.
    • +
    • Add #include <ctype.h> for Red Hat distribution of GCC 3.2 (prior to + Jan 2004).
    • +
    • Remove commented-out code.
    • +
    +

    Artistic Style 1.19  (July 2006)

    +
      +
    • Add unpad=paren option.
    • +
    • Always pad paren headers (e.g. 'if', 'for', 'while').
    • +
    • Fix problem of pad=oper working different if pad=paren is declared.
    • +
    • Add additional tests to distinguish the multiplication operator from + pointers.
    • +
    • Fix padding parens before a member access pointer (->).
    • +
    • If space padding has changed, move end-of-line comments to the + original column, if possible.
    • +
    • Move potential calculation decision to outside of operator padding + function.
    • +
    • Fix duplication of last line of source if a final endline is not + present.
    • +
    • Fix class initializer not indented on last line if bracket is + attached.
    • +
    • Fix identification of templates contained in parens.
    • +
    • Fix one line block occurring before end of class.
    • +
    • Fix line added after one line block with bracketFormatMode = + NONE_MODE.
    • +
    • Add needed variables to ASBeautifier copy constructor.
    • +
    • Trim end of line for multi-line comments.
    • +
    • Add a breakLine before paren checks (needed for unpad=paren option).
    • +
    • Add trace file to ASFormatter.
    • +
    • Move formatting message from end to beginning of formatting.
    • +
    • Move the building of vectors to ASResource.  Vectors for + classes ASBeautifier and ASFormatter should now have the same values.
    • +
    • Move debugging variable inLineNumber from ASFormatter to + ASBeautifier.
    • +
    • Bypass char processing for UTF8 characters in ASBeautifier.
    • +
    • Move switchVariables struct from ASEnhancer to the header file.
    • +
    • Remove preprocessorHeader vector (not used).
    • +
    • Remove variable isInConst (not used).
    • +
    • Remove commented-out code.
    • +
    +

    Artistic Style 1.18  (June 2006)

    +
      +
    • The following changes were made for the option pad=oper: +
        +
      • Does not remove extra spaces from formatted + expressions.
      • +
      • Does not pad opening parens on the outside. +
      • +
      • Does not remove leading spaces from multi-line + comments.
      • +
      • Does not pad negative numbers.
      • +
      • Does not add a space to the end of preprocessor + directives.
      • +
      • Will not pad operators inside block parens [].
      • +
      +
    • +
    • The following changes were made for the option pad=paren: +
        +
      • Formats correctly with or without + pad=oper.
      • +
      • Does not add a space for each additional run if + pad=oper is not used.
      • +
      • Outside of opening paren is padded correctly.
      • +
      • Inside of closing paren is padded correctly.
      • +
      • Does not pad block parens [].
      • +
      • Added short option P, previously used for pad=all.
      • +
      +
    • +
    • Added new options pad=paren-out (d) and pad=paren-in (D).
    • +
    • Removed option pad=all.
    • +
    • Add short option V for convert-tabs.
    • +
    • Added bounds checking to options containing parameters.
    • +
    • Display a message when a default options file is used.
    • +
    • Replaced IS_PARAM_OPTION(S) macros with overloaded isParamOption. + Fixed compare problem with short param options.
    • +
    • Fix EOF problem with default options file.
    • +
    +

    Artistic Style 1.17  (May 2006)

    +
      +
    • The following changes were made for processing bracketFormatMode = + NONE_MODE: +
        +
      • Removed the function isFormattingEnabled() and always performed + the formatting.
      • +
      • Removed the formatting bypass for NONE_MODE.
      • +
      • Fix brackets always being broken in the 2 cases where NONE_MODE + formatting was done.
      • +
      • Added new functions to support the processing of NONE_MODE + brackets.
      • +
      • Made other minor changes necessary for correct NONE_MODE + processing.
      • +
      +
    • +
    • Changed indent cases option to indent the entire case block.
    • +
    • Changed to output Windows or Linux line endings.
    • +
    • Added ASEnhancer module for case statement indenting.
    • +
    • Corrected errors in identifying options indent=tab=, and + force-indent=tab=.
    • +
    • Corrected errors in identifying options min-conditional-indent=, and + max-instatement-indent=.
    • +
    • Improved error and information messages.
    • +
    • Added capability to compile as a console program, shared library, or + static library.
    • +
    • Fixed problem with semicolons and parens being put on a line by + themselves.
    • +
    • Fixed spaces being added before a line comment.
    • +
    • Fixed blank line added after some preprocessor statements.
    • +
    • Fixed preprocessor statements not being trimmed.
    • +
    • Do not indent line comments that begin in column 1 or 2.
    • +
    • Fixed indentation problem with ending }; of class statements.
    • +
    • Changed nextLine() function to eliminate char buffer limits.
    • +
    • Moved Windows default options file to %USERPROFILE%.
    • +
    • Removed NEW operators to prevent memory leaks.
    • +
    • Fixed space before the semicolon in return ; statement.
    • +
    • Fixed extra space that was sometimes added when pad operators was + used.
    • +
    • Removed string parameter from IS_PARAM_OPTION.
    • +
    • Added forward declaration of parseOption() to eliminate compile + error.
    • +
    • Added input line number counter for debugging.
    • +
    • Add statements to check for markers if break-blocks or + break-blocks=all is used.
    • +
    • Remove warnings for signed/unsigned mismatch.
    • +
    • Removed COMPARE macro and used string compare.
    • +
    • Removed compiler_defines.h.
    • +
    • Removed USES_NAMESPACE declaration.
    • +
    +

    Artistic Style 1.16

    +
      +

      There was no release 1.16.

      +
    +

    Artistic Style 1.15.3 (7 March 2002)

    +
      +
    • +
      +
      + Bug fix in handling of brackets after line-comments.
      +
      +
    • +
    • +
      +
      + Bug fix: C# add/remove event property headers now properly + formatted.
      +
      +
    • +
    +

    Artistic Style 1.15.2 (2 March 2002)

    +
      +
    • +
      + Bug fixes in exception handling phrases, e.g. multiple catches and + try..finally.
      +
    • +
    +

    Artistic Style 1.15.1 (2 March 2002)

    +
      +
    • +
      + Bug fix: C# properties are now formatted properly.
      +
    • +
    +

    Artistic Style 1.15.0 (2 March 2002)

    +
      +
    • +
      + Added support for C#.
      +
    • +
    • +
      + Artistic Style is now licensed only under the GNU Public License + (GPL).
      +
    • +
    • +
      + Compilation under G++ 3.0 now works properly.
      +
    • +
    • +
      + Bug fix: Opening brackets that appear at the beginning of a line + immediately after an empty line comment are now handled properly, + and not appended as part of the line comment.
      +
    • +
    • +
      + Bug fix: Brackets inside comments are now not mis-indented within + the comment.
      +
    • +
    +

    +

    Artistic Style 1.14.1 (2 June 2001)

    +

    +
      +
    • +
      + Bug fix: : '<' and '>' symbols within template declarations (e.g. + 'foo<bar*, xoo>') are now left unpadded in the padding modes.
      +
    • +
    • +
      + Bug fix: Fixed false recognizing of headers within larger words + (e.g. 'catch' in 'gcatch').
      +
    • +
    +

    Artistic Style 1.14.0 (1 June 2001)

    +
      +
    • +
      + Bug fix: Fixed indentation of statements within preprocessor + '#if...' statements.
      +
    • +
    • +
      + Bug fix: Templates are now not broken from their bodies.
      +
    • +
    • +
      + Bug fix: '<' and '>' symbols within template definitions (e.g. + 'template<class T>') are now left unpadded in the padding modes.
      +
    • +
    +

    Artistic Style 1.13.8 (13 April 2001)

    +
      +
    • +
      + Bug fix: Fixed indentation of multiple nested non-block brackets, + such as in multi bracketed static array declarations.
      +
    • +
    +

    Artistic Style 1.13.7 (6 April 2001)

    +
      +
    • +
      + New option:'--force-indent=tab=#' (or 'T#') instructs astyle to + indent using tabs in all the pre-statement white space, including + areas astyle's '--indent=tab' prefers to indent using spaces, such + as white space in multi-line statements.
      +
    • +
    • +
      + Bug fix: Fixed unwanted empty line insertions between empty blocks + (e.g. '{}') and closing brackets that come immediately after them.
      +
    • +
    • +
      + Bug fix: Fixed unwanted empty line insertions immediately after + colons (e.g. 'default:', 'label:', ...)
      +
    • +
    +

    +
    +

    Artistic Style 1.13.6 (24 January 2001)

    +
    +

    +
      +
    • +
      + Bug fix: Preprocessor lines now remain unpadded in padding modes.
      +
    • +
    +

    Artistic Style 1.13.5 (24 January 2001)

    +
      +
    • +
      + Bug fix: Fixed the insertion of phantom empty lines immediately + after {} blocks.
      +
    • +
    • +
      + Bug fix: Bare open brackets ('{') with no preceding headers are now + broken appropriately from their preceding code lines in the 'attach' + and 'linux' bracketmodes.
      +
    • +
    • +
      + Bug fix: Fixed operator recognition for long operators such as + '>>=', '<<= '.
      +
    • +
    +

    Artistic Style 1.13.4 (24 January 2001)

    +
      +
    • +
      + Bug fix: L" unicode strings are now handled properly in padding + modes.
      +
    • +
    • +
      + Bug fix: Fixed the padding around '-' operators (which went sour + somewhere in the past).
      +
    • +
    • +
      + Bug fix: Fixed the handling of exponent numbers (e.g. 12.2e+2) in + padding modes. The fix enables 'e+' to be regarded as part of the + exponent.
      +
    • +
    +

    Artistic Style 1.13.3 (23 January 2001)

    +
      +
    • +
      + Line that contain both headers and their following non-header code + (e.g. 'if (isFoo) doBar();') are now broken by default into multiple + lines. To keep these lines as single lines, use '--one-line= + keep-statements'.
      +
    • +
    • +
      + Added the new option '--break-elseifs' which breaks 'else if()' + statements into multiple lines.
      +
    • +
    • +
      + The option block breaking options now works properly with the + padding options.
      +
    • +
    • +
      + Various minor bug fixes.
      +
    • +
    +

    Artistic Style 1.13.2 (21 January 2001)

    +
      +
    • +
      + Added the new option '--brackets=break-closing-headers'. When this + option is added to either '--brackets=attach' or '--brackets= + linux', astyle breaks closing headers (e.g. 'else', 'catch') from + their preceding closing brackets.
      +
    • +
    • +
      + '--break-blocks' and '--break-blocks= all' now correctly handle + blocks that appear immediately before closing brackets, and do not + append empty lines between them and the closing brackets.
      +
    • +
    +

    Artistic Style 1.13.0 (27 September 1999)

    +
      +
    • Moved back to odd-minor-numbered development versions, and + even-minor-numbered stable versions.
    • +
    • Added the new option '--break-blocks' which breaks apart unrelated + blocks, labels, classes, etc.
    • +
    • Added the new option '--break-blocks=all' which also breaks apart + blocks of closing headers, such as 'else', 'catch', etc.
    • +
    • Fixed indentation handling of labels and class-definition + identifiers such as 'public:', 'protected:', ... (thanks to Daryn Adler + for his patch)
    • +
    • Fixed indentation of nested class definitions. (thanks to Daryn + Adler for his patch)
    • +
    • Added the new option '--indent-preprocessor' which (surprisingly) + tries to reindent C/C++ preprocessor macro lines. Astyle should do an + pretty nice indentation job if the macro code is sane, but don't expect + miracles for horrid macro definitions...
    • +
    +

    Artistic Style 1.11.6 (27 September 1999)

    +
      +
    • Improved indentation of lines containing single-line blocks.
    • +
    +

    Artistic Style 1.11.5 (25 September 1999)

    +
      +
    • Improved the bug fix for a 'const' keyword bug which resulted in + wrong indentation of methods that are declared const.
    • +
    +

    Artistic Style 1.11.4 (18 September 1999)

    +
      +
    • Improved handling of single colons (':') in class headers, e.g. + class Foo : public Bar { ... }
    • +
    • Improved handling of single colons (':') in method (constructor) + headers, e.g. Foo::Foo(int a) : Bar(a)
    • +
    +

    Artistic Style 1.11.3 (16 September 1999)

    +
      +
    • Fixed a serious bug in the formatting of brackets, introduced in + 1.11.2.
    • +
    +

    Artistic Style 1.11.2 (10 September 1999)

    +
      +
    • Fixed an indentation bug in statements that contain the 'const', + that resulted in wrong indentation of array blocks that where declared + const. (Thanks Daniel!)
    • +
    • Fixed an indentation bug that could arise in lines that appear + immediately after several preprocessor commands. (Thanks Daniel!).
    • +
    • Fixed a bug that inserted an empty line after closing brackets if a + comment appeared immediately prior to the closing bracket. (Thanks Ed!) +
    • +
    • Fixed a bug that eliminated empty lines between closing brackets and + immediately following opening brackets. (Thanks Ed!)
    • +
    +

    Artistic Style 1.11.1 (3 September 1999)

    +
      +
    • Fixed a bug that inserted an empty line at the begining of source + files.
    • +
    +

    Artistic Style 1.11.0 (3 September 1999)

    +
      +
    • Astyle now filters out line-feeds ('\r') before begining to parse + lines. This should take care of bizarre formatting that existed when + moving source files from Windows (which breaks lines with a linefeed AND + newline ("\r\n") to unix (which breaks lines only with newlines).
    • +
    • The "struct", "static" and "synchronized" keywords are now finally + handled correctly in both the contexts of block headers AND simple + keywords.
    • +
    • Better treatment of precompiler lines that end with backslashes, and + the lines that immediately follow them.
    • +
    • The '--indent-classes' (or '-C') option now works correctly + (again...).
    • +
    • Series of short command-line options (e.g. "-b -s4 -C") are now + parsed correctly.
    • +
    +

    Artistic Style 1.10.4 (27 July 1999)

    +
      +
    • Fixed a MAJOR bug (inserted in 1.10.3) that resulted wrong handling + of double-colons ('::') in C++.
    • +
    +

    Artistic Style 1.10.3 (24 July 1999)

    +
      +
    • Fixed a bug (inserted yesterday) that resulted in unwanted line + breaks before closing-brackets.
    • +
    • Fixed a bug in the handling of 'static' blocks in java.
    • +
    • Added the new option '--indent-cases' (or '-K') for indenting 'case + XXX:' lines so they are flush with their following code lines.
    • +
    • Added the new option '--fill-empty-lines' (or '-E') which fills + empty lines with the white-space of their previous line.
    • +
    +

    Artistic Style 1.10.2 (23 July 1999)

    +
      +
    • Fixed a series of related bugs that resulted in certain cases of + lacking line breaks after close-brackets, and colons. Thanks Jeroen!
    • +
    +

    Artistic Style 1.10.1 (18 July 1999)

    +
      +
    • Fixed a bug (introduced in astyle 1.10.0) that can result in missing + line breaks before closing brackets if they appear immediately after + comments. Thanks Larry!
    • +
    +

    Artistic Style 1.10.0 Release (14 July 1999)

    +
      +
    • Improved handling of empty bracket blocks ( e.g.{ } ). Thanks + Michael!
    • +
    +

    Artistic Style 1.10.0 Prerelease (4 July 1999)

    +
      +
    • Fixed a bug in the in-statement indentation algorithm which resulted + in sub-optimal indentation of multiple-line conditional statements that + immediately follow headers such as 'if', 'else if', 'while', etc... As a + result, the current in-statement indentation is finally what it should + have been long ago - MUCH better then in the last stable versions.
    • +
    • The "linux" bracket style (in which definition brackets are broken + while code brackets are attached) has been fixed, and should finally + work correctly.
    • +
    • Artistic Style can now parse both C/C++ and Java files in the same + command. Unless a specific language mode is specified (e.g. --style=java + or --style=c), astyle will now automatically set the language mode + according to each file's suffix (java mode for the '.java' suffix , c + mode  otherwise).
    • +
    • Multiple statements in a single line (e.g. aaa; bbb; fff;) are now + broken up by default.
    • +
    • Added the option '--one-line=keep-statements' (or '-o') + that keeps multiple statements in a single line attached, thus + countering the default break detailed above.
    • +
    • Changed the option previously called '--keep-one-line-blocks' + to '--one-line=keep-blocks', for similarity with the + new option above.
    • +
    • Changed the short option name of the option '--errors-to-standard-output' + from '-o' to '-X'.
    • +
    • Up to now, Artistic Style always inserted a minimal indent of + twice the current selected indent size + inside multi-line conditional headers ('if', 'while' ...), so that it + would be clear where the headers end and the code after them begins. The + current version adds the option '--min-conditional-indent=#' + (or '-m#') that sets the absolute minimal indent + between conditional headers and their multiple-line conditional + statements. If this option is not specified, the default indent remains + twice the current selected indent size.
      + For example, This option should come very handy in code that already has + brackets after EVERY conditional statement (even if just one line is in + that bracket...) - in such a case, it would be wise to set + --min-conditional-indent=0 since the brackets already make it + clear where the header ends and the code begins...
    • +
    • Added the ability to set the assumed tab size when in '--indent-tab' + mode by using '--indent-tab=#' or '-t#' + and replacing the # with the wanted size. If the size + is not specified, the size of each tab is assumed to be 4 spaces long.
    • +
    +

    Artistic Style 1.8.2 (18 March 1999)

    +
      +
    • Fixed pointer handling problems in ASBeautifier that led to crashes + when parsing preprocessor commands.
    • +
    • Fixed the problem in locating the default options file in the + directory pointed to by $HOME or %HOMEPATH% when these system variables + do not contain an '/' (or '\' ...) at their end.
    • +
    • Fixed inverse insertion of spaces vs. tabs when in -t mode. (Thanks + Brian!)
    • +
    • Got rid of those pesky C4786 warnings when compiling under Visual + C++ (Thanks John!)
    • +
    +

    Artistic Style 1.8.1 (9 March 1999)

    +
      +
    • Changed the '--style=k&r' option to '--style= kr' , so that + linux/unix machines don't misinterpret the '&' as a background + processing command.
    • +
    +

    Artistic Style 1.8.0 (3 March 1999)

    +
      +
    • Added support for predefined styles. Current supported styles are: + ansi, k&r, linux, gnu, java. these can be set by using + '--style=THESTYLE' (e.g. '--style=linux').
    • +
    • Added '--indent-blocks' (or -G) option, which adds + indentation to entire blocks, including their brackets, in + similar fashion to the standard gnu style.
    • +
    • Added option '--brackets=linux' (or '-l') which breaks + definition-block brackets, but attaches command-block brackets. +
    • +
    • Padding can now be set separately for operators alone('-p' or + '--pad=oper'), parentheses alone ('--pad=paren) or both ('-P' or + '--pad=all').
    • +
    • Artistic Style looks for a default options file in the following + order:
      + 1. The contents of the ARTISTIC_STYLE_OPTIONS + environment variable if it exists.
      + 2. The file called .astylerc in the directory pointed to by the + HOME environment variable ( i.e. $HOME/.astylerc + ).
      + 3. The file called .astylerc in the directory pointed to by the + HOMEPATH environment variable ( i.e. + %HOMEPATH%\.astylerc ).
      + If a default options file is found, the options in this file will be + parsed BEFORE the command-line options. Options within the default + option file may be written without the preliminary '-' or '--'. + Indentation within #if , #else and #endif precompiler commands now works + correctly even if the program lines between these precompiler commands + contain non-pared brackets.
    • +
    • Improved handling of labels (e.g. 'exit:'). By default, labels are + now flushed completely to the left. Labels can also be indented to one + indent LESS than current standard indentation by using the new option + '--indent-labels' (or '-L') .
    • +
    • Fixed handling of the 'operator' keyword when it is preceded by a + non space character (such as '&' or '*').
    • +
    • Fixed wrong bracket handling after 'throws' statements.
    • +
    • Fixed wrong indentation of single-line blocks. These where indented + 1 indent to much.
    • +
    • Fixed wrong indentation of headers in internal classes (java mode). + These where indented 1 indent to little.
    • +
    • The option ' --errors-to-standard-output' now has the one-letter + option '-o'.
    • +
    • Fixed bug which resulted in an unneeded indent in + function-declarations in which function-variables are declared before + the function declaration and are preceded by the 'static' keyword. + Thanks Scott.
    • +
    +

    Artistic Style 1.6.0   (5 January 1999)

    +
      +
    • Fixed zero indentation that resulted when a '-suffix' option was set + after a '--indent=spaces' (or '-s') option..
    • +
    • Wrong options are now announced.
    • +
    • Changed default indentation to NOT automatically indent class blocks + and switch blocks. Instead, the new options '--indent-classes' (or '-C') + and '--indent-switches' (or '-S') should be used. The option + '--indent-switches' replaces the old option '--flush-switches'.
    • +
    +

    Artistic Style 1.4.1   (4 January 1999)

    +
      +
    • Fixed ability to write options without the preceding '--' in the + default options file.
    • +
    • Added one-letter options to most options that had only long-options + in version 1.4.0 .
    • +
    • Added a '-v' or '--version' option that writes the current Artistic + Style version.
    • +
    +

    Artistic Style 1.4.0   (3 January 1999)

    +
      +
    • MAJOR NEW CHANGE IN THE FORMAT OF OPTIONS:
      + Options are now either short one-letter options + starting with '-', or long multi-letter options + starting with '--'. The Short one-letter options MAY BE ATTACHED + TOGETHER. Thus, writing '-bps4' is the same as writing '-b -p -s4'.
      + Many options that have up to now had a 2 letter format now retain only + their long format. I truly believe that the combination of + attached-one-letter options PLUS a default option's file containing + long-letter-options related to style will be much easier to work with + than the previous setup.
    • +
    • Added support for a default options file (pointed + to by the ARTISTIC_STYLE_OPTIONS environment variable). +
    • +
    • Changed downloading method from the server. From now, there will be + specific directories containing the latest stable sources, stable + binaries, and development sources.
    • +
    • Space padding ('-p' or '--pad') now works correctly (1) around + semicolons and commas, (2) between headers that require parentheses + after them (such as 'if', 'while'...)and those parentheses, and (3) + after parentheses (unless immediately followed by a ';' or ',' or '.') . +
    • +
    • From now on, namespace blocks are NOT indented by default. To indent + namespace blocks use the new '--indent-namespaces' option.
    • +
    • Added options '--errors-to-standard-output' for redirection of + standard-error to standard-output from within Artistic Style, and + '--suffix=' for specifying a suffix other than '.orig' to append to + original filenames..
    • +
    • Corrected indentation of 'default' in switch statements. (Up to now, + this only worked correctly in java mode...).
    • +
    +

    Artistic Style 1.2.0   (19 December 1998)

    +
      +
    • Artistic Style 1.2.0 is the first stable result of a new version + numbering, in which development versions are numbered with an odd minor + number (such as 1.1.x), and stable versions are numbered with an even + number (1.2.x). Thus, version 1.2.0 accumulates all the + additions/changes of the 1.1.x development versions of Artistic Style. +
    • +
    • A new '-ol' formatting mode that eliminates breaking of one-line + blocks.
    • +
    • Fixed a SERIOUS bug, which resulted in wrong formatting of brackets + ('{', '}') that came IMMEDIATELY AFTER definition type brackets, (e.g. + brackets that come right after 'class', 'interface', 'name-space', etc + ...). This bug was mistakenly introduced when I set out to correctly + space-pad pointer and reference signs, somewhere in version 0.9.x .
    • +
    • Fixed unwanted elimination of final empty lines.
    • +
    • Fixed broken indentation of virgin opening-brackets that occur + immediately after a previous closing-bracket.
    • +
    • Fixed space-padding to not insert a space in front of ':' characters + unless they are a part of a '? ... : ' statement.
    • +
    +

    Artistic Style 1.0.5   (11 December 1998)

    +
      +
    • 'extern' blocks now handled correctly. +
    • +
    • Fixed handling of ^= in '-p' mode.
    • +
    • Win32 executables now contain wildcard + expansion. *** Look at the README.TXT for info on how to include + wildcard expansion abilities when compiling Artistic Style under Win32. + (Thanks for the info on wildcard-expansion enabling, Nat!!!)
    • +
    +

    Artistic Style 1.0.4   (2 December 1998)

    +
      +
    • Fixed unwanted space-padding around + urinary minuses and '-' symbols within exponents (e.g. 2.5E-5) when + using the '-p' option.
    • +
    +

    Artistic Style 1.0.3   (1 December 1998)

    +
      +
    • Control characters now remain in the + indented file.
    • +
    • Fixed a bug in which long quoted + white-space sequences where mistakenly eliminated in the '-p' mode.
    • +
    • Fixed unwanted line-breaks in '-ab -p' + mode, that in some cases occurred between '//' and the rest of a line + comment.
    • +
    • Fixed handling of '>>=', '<<= ' in '-p' + mode.
    • +
    +

    Artistic Style 1.0.2   (27 November 1998)

    +
      +
    • Fixed a SERIOUS bug of missing  + needed line-breaks in lines immediately after line-comments when in + '-ab' mode.
    • +
    • Support for the 'finally' header.
    • +
    • lines that contain only white-space now + become empty lines.
    • +
    +

    Artistic Style 1.0.1   (26 November 1998)

    +
      +
    • Fixed a SERIOUS bug, which lacked a + needed line-break between  closing brackets  and the headers + that follow them (e.g. '} else') when in '-bb' mode. In fixing the bug, + I used a variation on a patch sent by Richard Bullington - THANKS!
    • +
    • Fixed a set of  SERIOUS bugs which + inserted an empty line into both the start and end of the reindented + file.
    • +
    • Improved documentation of formatting + options in the file astyle.html .
    • +
    +

    Artistic Style 1.0.0   (24 November 1998)

    +
      +
    • Indented files now retain the + original file name, while the original pre-indented file is + saved with a ".orig"at its end. Thus, after the call "astyle -bb + foo.cpp", the newly indented file will be called "foo.cpp", + while a file called "foo.cpp.orig" will contain the original + pre-indented file.
    • +
    • Artistic Style may now be used and /or + modified and/or distributed under EITHER the "Artistic + License", or the GNU General Public License (GPL).
    • +
    • Methods with headers that end with + 'const' are now properly indented.
    • +
    • Cleaner, more robust, and better + documented source code.
    • +
    +

    Artistic Style 0.9.2

    +
      +
    • Fixed a serious bug which led to a + maximal supported source code line size of 128 characters!!!
    • +
    • Maximal supported line size is now 1024 + characters.
    • +
    • Fixed a serious bug in the handling of + brackets inside '#define' statements.
    • +
    • Fixed a serious bug in which '#include' files containing slashes + (i.e. #include <foo_dir/foo> ) where space-padded when using option '-p' + on C, C++ files.
    • +
    +

    Artistic Style 0.9.1

    +
      +
    • Much improved space-padding around + pointers ('*') and references ('&') and the 'operator' key-word  in + C and C++ source files when using the '-p' space padding option.
    • +
    • Fixed several pointer handling bugs which + led to potential core dumps.
    • +
    • Version 0.9.1 now includes all the abilities I am planning for the + final 1.0 version, and should be looked at as the first + pre-release version of Artistic Style.
    • +
    +

    Artistic Style 0.9.0

    +
      +
    • Added a formatting layer + (ASFormatter.cpp) around the indentation layer (ASBeautifier.cpp).
    • +
    • As a result, the following formatting + capabilities have been added: +
        +
      • Bracket ('{' and '}') placement in + either ANSI C style or Java style.
      • +
      • Space padding around operators, i.e. + (1+2)*3-4 becomes ( 1 + 2 ) * 3 - 4 .
      • +
      +
    • +
    • Fixed the 'tab' elimination bug + introduced in ASBeautifier 0.8.2 .
    • +
    • Fixed a bug which under-indented class headers containing + inheritance info.
    • +
    +

    ASBeautifier 0.8.2

    +
      +
    • Fixed indentation problem in brackets + around 'struct', and 'union' blocks.
    • +
    • Added recognition for '\' characters in + the end of lines.
    • +
    • Improved indentation of + post-method-declaration variable initializations.
    • +
    • Several minor bug fixes.
    • +
    +

    ASBeautifier 0.8.1

    +
      +
    • Fixed an important bug in pointer arithmetic which resulted both in + phantom indentation errors, and in core-dumps when trying to indent java + files.
    • +
    +

    ASBeautifier 0.8.0

    +
      +
    • This is the first public release of + ASBeautifier. It is a direct port to C++ of JSBeautifier 1.1.1, PLUS + extensions to for C++ indentation.
    • +
    • So far, very little beta-testing has been + done for the C++ extensions. This should change extremely with the + open-source release (this was the case with JSBeautifier...), so expect + ASBeautifier to become bug-free fast!!!
    • +
    • The C++ source code is not yet written in optimal quality. I rushed + a little so that I could release this initial release as soon as + possible. This will soon change.
    • +
    +

     

    +
    + + + + \ No newline at end of file diff --git a/sdk/astyle/doc/index.html b/sdk/astyle/doc/index.html new file mode 100644 index 0000000000..2b4e10e451 --- /dev/null +++ b/sdk/astyle/doc/index.html @@ -0,0 +1,190 @@ + + + + + + +Artistic Style + + + + + + + + +
    + +

    Artistic Style 1.21

    +
    +

    A Free, Fast and Small Automatic Formatter
    + for C, C++, C#, and Java Source Code +

    +
    + + + + + + + + + +
    Home Page: + http://astyle.sourceforge.net/
    Project Page: + http://sourceforge.net/projects/astyle/
    +
    + +

     

    +

    Artistic Style is a source code indenter, formatter, + and beautifier + for the C, C++, C# and Java programming + languages.

    +

    When indenting source code, we as programmers have a tendency to use both + spaces and tab characters to create the + wanted indentation. Moreover, some editors by default insert spaces instead + of tabs when pressing the tab key, and other editors (Emacs for example) + have the ability to "pretty up" lines by automatically setting up the white + space before the code on the line, possibly inserting spaces in a code that + up to now used only tabs for indentation.

    + +

    Since the NUMBER of space characters showed on screen + for each tab character in the source code changes between editors (unless + the user sets up the number to his liking...), one of the standard + problems programmers are facing when moving from one editor to another + is that code containing both spaces and tabs that was up to now + perfectly indented, suddenly becomes a mess to look at when changing to + another editor. Even if you as a programmer take care to ONLY + use spaces or tabs, looking at other people's source code can still be + problematic.

    + +

    To address this problem, Artistic Style was created - a filter written in + C++ that automatically re-indents and re-formats C / C++ / + C# / Java source files. It can be used from a command line, + or it can be incorporated as classes in another C++ + program.

    + +

    License

    +

    Artistic Style may be used and distributed under the + GNU Lesser General Public License (LGPL). You can + use it for free or commercial software without charge. Projects that use Artistic Style do not + have to make the their source code available. If Artistic + Style itself is modified, however, the modified Artistic Style source code + must be made available.

    + +

    Documentation

    +

    There is complete documentation for using Artistic Style. Most + documentation is included in the distribution package.

    + +

    News and + Release Notes

    +

    Changes in this release include improved array formatting, brackets that + attach and detach from comments, keywords assigned by file type, + new preserve-dates (-Z) option, change in Linux bracket formatting for + header files, support for the OpenVMS compiler, and many important bug fixes.

    + +

    Download

    +

    Download the latest release from the file releases page. + The latest release is indicated by the line with a green + background. Get the file for the appropriate platform (Linux, Mac, OpenVMS, + or Windows). + Extract the compressed package and copy it to a + work folder. Then follow the install instructions for the appropriate platform + as described in the install information.

    + +

    Install Information

    +

    Information on compiling and installing Artistic Style. The Windows + and OpenVMS platforms come with a precompiled executable. Other platforms must compile + the project. + Follow the instructions for the appropriate platform (Linux, Mac, OpenVMS, or + Windows).

    + +

    Developer Information

    +

    Artistic Style has compile options for creating a shared library (DLL) or + static library for use with a Graphical User + Interface (GUI). See the Developer Information for the calling + procedure and other details. The following "Links" section has a sample + program that uses the interface.

    + +

    Supplemental Documentation

    +

    There are some formatting problems with --break-blocks (or + --break-blocks=all).

    + +

    Bug Reports, Change Requests, Notification

    +

    Bug reports and change requests should submitted to the + bug + tracker page. It is best to log in to SourceForge before submitting a + report so you can be contacted if necessary. Note that code copied and + pasted into the bug report will not be indented after the + data is submitted. You must indicate the indentation when you submit the + request (e.g. replace leading spaces with periods).

    +

    Notification of new releases is activated from the + file + releases page. In Latest File Releases, under Notes / Monitor, click on + the envelope. You will receive notification when a new release is available.

    +

    To contact the project by email use the address + jimp03@email.com.

    + +

    Links

    +

    Artistic Style for Windows is a sample GUI program for Windows. + It uses an unmodified Artistic Style + program compiled for a GUI. The source code needs some work so the source is not available + for now. It should work under Linux using WINE. Future enhancements and + platform support will depend on the response to the sample program.

    +

    UniversalIndentGui is a cross platform GUI for + several code formatters. + The main feature is a live preview to show how the selected formatting + options affect the source code. This allows review and testing of the + various options before formatting a file. It can be used with a sample file or with + your actual source code. It is a good way to try out the options from + various indentation programs.

    +

    For Mac users there is a + script for + "Reindenting C In TextWrangler and BBEdit Using Astyle". Selected text from + the editor can be passed to Artistic Style and replaced with the reformatted + text. Simply highlight the text you would like to reindent, choose the + script from the shebang (#!) menu, and the text will + immaculately formatted.

    + +

    Developers

    + +

    Artistic Style is maintained and updated by Jim Pattee. + The original author was Tal Davidson, Israel.

    + +

    Acknowledgements

    +

    Thanks to Jim Watson, Fred Shwartz, W. Nathaniel Mills III, + Danny Deschenes, Andre Houde, Richard Bullington, Paul-Michael Agapow, + Daryn Adler, Dieter Bayer, Sam Cooler, Jim Duff for their patches and + contributions to Artistic Style.

    +

    Thanks to SourceForge + for giving Artistic Style its home.

    +

    Thanks to all the dedicated beta-testers and bug notifiers!

    +


    +

    + +
    + + +

    ENJOY !!!

    + + + + \ No newline at end of file diff --git a/sdk/astyle/doc/install.html b/sdk/astyle/doc/install.html new file mode 100644 index 0000000000..352df8e1e4 --- /dev/null +++ b/sdk/astyle/doc/install.html @@ -0,0 +1,252 @@ + + + Artistic Style - Install Information + + + + + + + + +

    Artistic Style Install Information

    + +

    Artistic Style Versions
    + Linux Version
    + Mac OS X Version
    + OpenVMS Version
    + Windows Version
    + Compiler Options

    + +
    + +

    Artistic Style Versions

    + +

    astyle_x.y_linux.tar.gz is the Linux version of Artistic Style. It + contains the source code, documentation, and makefiles. The Linux + Version compile instructions below give information compiling the source + code. The Linux shell will allow the use of + wildcards (such as *.cpp) during execution.

    +

    astyle_x.y_macosx.tar.gz is the Mac OS X version of Artistic Style. It + contains the source code, documentation, and a makefile. The Mac OS + X Version compile instructions below  give information compiling + the source code. The Mac shell will allow the use of + wildcards (such as *.cpp) during execution.

    +

    astyle_x.y_openvms.zip is the OpenVMS version of Artistic + Style. It contains the source code, documentation, object files, build + files, and an executable.  The OpenVMS Version compile instructions + below give information compiling the source code. Object code is included for people that don't + have the Hewlett-Packard  C++ compiler. + Wildcards are not supported under Digital + Command Language (DCL). If the Bash shell has been installed on + VMS, wildcards  (such as *.cpp) can be used if Artistic Style is run under Bash.

    +

    astyle_x.y_windows.zip is the Windows version of Artistic + Style. It contains the source code, documentation, a Visual C project + file, and an executable.  The Windows Version compile instructions + below give information compiling the source code. The pre-compiled + executable has been compiled to allow the use + of wildcards (such as *.cpp) during execution.

    +

    Only one platform is supported in each distribution package. If you + use Artistic Style on more than one platform you + will need to download packages for each platform. + The main difference in platforms is the build directory and the + line endings. Most compilers and development packages will accept any + type of line ending.

    +

     

    + +

    Linux Version

    + +

    GCC Compiler

    +

    To compile using the GCC compiler you must have GCC (3.1 or better) installed. + To build the Artistic Style configurations use the makefile located in the astyle/build + directory.  The executables will be in the astyle/bin directory.  + To build the command line configuration enter the following:

    +
        cd astyle/build
    +    make
    +

    To build the other astyle configurations you can enter the file name or a + symbolic name.  Entering "make astyle" or "make release" will build the command line configuration.  Following are the symbolic + names and file names (in parens) of the various configurations:

    +
      +
    • release builds the Artistic Style command line program + (astyle).  This is the default option.
    • +
    • shared builds the Artistic Style program as a + shared library (libastyle.so).
    • +
    • static builds the Artistic Style program as a static + library (libastyle.a).
    • +
    • debug builds the Artistic Style command line program with + debugging information  (astyled).
    • +
    • shareddebug builds the Artistic Style program as a shared + library with debugging information (libastyled.so).
    • +
    • staticdebug builds the Artistic Style program as a static + library with debugging information (libastyled.a).
    • +
    • all builds all of the above configurations.
    • +
    +

    More than one configuration can be built at the same time.  + For example, to build all of the release configurations enter:

    +
        cd astyle/build
    +    make release shared static
    +

    Intel Compiler

    +

    The Intel makefile is named makeintel. + To build astyle, use the makeintel file located in the astyle/build + directory.  The executables will be in the astyle/bin directory.  + To build the command line configuration enter the following:

    +
        cd astyle/build
    +    make -f makeintel
    +

    Another way to compile with Intel is to rename "makeintel" as "makefile". Then the -f option is not needed. + If this is done the Intel makefile will always be used instead of the GCC makefile. + +

    The configuration names for Intel are the same as for the + GCC compiler.  + More than one configuration can be built at the same time.   + For example, to build all of the debug configurations enter:

    +
        cd astyle/build
    +    make -f makeintel debug shareddebug staticdebug
    + +

    Other Makefile Options

    +

    The following options are also available. If you are using the Intel + compiler, the make filename option must be included in the command (-f + makeintel).

    +
    clean
    +

    To remove the object files for all configurations:

    +
        make clean
    +

    The executables will not be removed.

    +
    install
    +

    You must have the appropriate permissions to use install.  To install the + astyle executable to /usr/bin:

    +
        make install
    +

    To install the executable to a different directory set a value + for the macro $(prefix).  For example to install the executable to a users + home directory (/home/user/bin):

    +
       make prefix=$HOME/bin install
    +
    uninstall
    +

    You must have the appropriate permissions to use uninstall.  To uninstall the + astyle executable from /usr/bin:

    +
        make uninstall
    +

    To uninstall the executable from a different directory set a + value for the macro $(prefix).  For example to uninstall the executable + from a users home directory (/home/user/bin):

    +
       make prefix=$HOME/bin uninstall
    +

    NOTE: The uninstall option will NOT remove the .astylerc + files from the users home directories.  The files must be + removed  individually for each user.

    +

     

    + +

    Mac OS X Version

    + +

    Mac OS X uses the same makefile as Linux GCC. To build the Artistic + Style configurations use the makefile located in the astyle/build + directory.  The executables will be in the astyle/bin directory.  + To build the command line configuration enter the following:

    +
        cd astyle/build
    +    make
    + +

    The configurations for Mac are the same as for the + Linux GCC compiler.  + More than one configuration can be built at the same time.   + For example, to build all of the release configurations enter:

    +
        cd astyle/build
    +    make release shared static
    + +

     

    + +

    OpenVMS Version

    + +

    To build Artistic Style on an OpenVMS system, you will need + Hewlett-Packard 's C++ + compiler installed. To build the code, use the OpenVMS + specific build file located in the astyle/build directory. The executables + will be in the astyle/bin directory. To build, enter the following:

    +
        set def [.astyle.build]
    +    @vmsbuild
    +

    To run Artistic Style, you should move the executable to an appropriate + directory, and create a foreign symbol for it. For example:

    +
        create/dir my_disk:[astyle.exe]
    +    set def [-.bin]
    +    copy astyle_main.exe my_disk:[astyle.exe]
    +    ast*yle :== $my_disk:[astyle.exe]astyle_main.exe
    +

    If you use Artistic Style on ODS-2 disks, you will need to specify a + different suffix for file renaming, as the default is .orig, and multi-dot + filenames are not supported on ODS-2 disks. Add the --suffix=_orig switch + to either the command line or your Artistic Style initialization file.

    +

    To set up an initialization file on OpenVMS, create a file and define a + logical to point to it. For example:

    +
        create my_disk:[astyle]astyle.ini
    +    --suffix=_orig
    +    ^Z
    +    define artistic_style_options my_disk:[astyle]astyle.ini
    +

     

    + +

    Windows Version

    + +

    Precompiled Executable

    + +

    In addition to the source files, the Windows version contains an astyle executable (AStyle.exe). + The executable is compiled to allow wildcard use during execution.

    + +

    Visual C++ Compiler

    + +

    There is a project file for Visual C++ 2003 (version 7) or higher.  + Open the file AStyle.sln in the AStyle/build directory.  Select the + Release configuration to compile the command line version.  All + output files will be in the AStyle/bin directory.  The + project has the following configurations.

    +
      +
    • Release builds the Artistic Style command line program + (AStyle.exe). 
    • +
    • Release Dll builds the Artistic Style program as a Dynamic Link + Library (AStyle.dll).  This will also produce the exports + library and the static library for linking the dll.
    • +
    • Release Lib builds the Artistic Style program as a Static + Library (libAStyle.lib).
    • +
    • Debug builds the Artistic Style command line program with + debugging information  (AStyled.exe).
    • +
    • Debug Dll builds the Artistic Style program as a Dynamic Link + Library (DLL) with debugging information (AStyled.dll).  This + will also produce the exports library and the static library for + linking the dll.
    • +
    • Debug Lib builds the Artistic Style program as a Static + Library with debugging information (libAStyled.lib).
    • +
    + +

    Other Compilers

    + +

    To use other compilers a project file must be built using the + compiler's development environment.

    +
      +
    • Create a project using the compiler's development environment
    • +
    • Add to the project all the .cpp and .h files in the src directory.
    • +
    • In order to use wildcards (such as *.cpp) during execution:
      + With Visual C++, insert "setargv.obj" to the list of linker additional dependencies.
      + With the MinGW build of the GCC compiler, the use of wildcards is automatic.
      + With Borland, add "wildargs.obj" to the list of linker object files.
      + With other compilers I don't know of a way to allow wildcards. I would appreciate the information if + anyone knows.
    • +
    • The Compiler Options section discusses the compiler options to use.
    • +
    • Compile.
    • +
    +

     

    + +

    Compiler Options

    + +

    To compile as a static or shared (dynamic) library define the macro ASTYLE_LIB. + Then use the appropriate compiler and linker options to compile the + static or shared library.

    +

    Artistic Style is a small program and it is best to optimize for + speed. The debug configuration is not usually optimized. To optimize for speed in the release configuration use the macro NDEBUG to remove asserts. Use an option that allows inline function + expansion. + Runtime Type Information (RTTI) is NOT needed. Use whole program + speed optimization if your compiler supports it. There may be other options + you can use depending on the compiler.

    + +
    + + \ No newline at end of file diff --git a/sdk/astyle/doc/license.html b/sdk/astyle/doc/license.html new file mode 100644 index 0000000000..68cfc0cd46 --- /dev/null +++ b/sdk/astyle/doc/license.html @@ -0,0 +1,439 @@ + + + + Artistic Style License + + + + + + + + +

    Artistic Style License

    +

    Artistic Style may be used and/or modified + and/or distributed under the GNU Lesser General Public License (LGPL), + as detailed below.

    +
    +
    +

    + + GNU Lesser General Public License

    +
    +

     

    +

    Version 2.1, February 1999

    +
    Copyright (C) 1991, 1999 Free Software Foundation, Inc., 
    +51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    +Everyone is permitted to copy and distribute verbatim copies
    +of this license document, but changing it is not allowed.
    +
    +[This is the first released version of the Lesser GPL.  It also counts
    + as the successor of the GNU Library Public License, version 2, hence
    + the version number 2.1.]
    +
    +

       Preamble

    +

    The licenses for most software are designed to take away your freedom + to share and change it. By contrast, the GNU General Public Licenses are + intended to guarantee your freedom to share and change free software--to + make sure the software is free for all its users.

    +

    This license, the Lesser General Public License, applies to some + specially designated software packages--typically libraries--of the Free + Software Foundation and other authors who decide to use it. You can use + it too, but we suggest you first think carefully about whether this + license or the ordinary General Public License is the better strategy to + use in any particular case, based on the explanations below.

    +

    When we speak of free software, we are referring to freedom of use, + not price. Our General Public Licenses are designed to make sure that + you have the freedom to distribute copies of free software (and charge + for this service if you wish); that you receive source code or can get + it if you want it; that you can change the software and use pieces of it + in new free programs; and that you are informed that you can do these + things.

    +

    To protect your rights, we need to make restrictions that forbid + distributors to deny you these rights or to ask you to surrender these + rights. These restrictions translate to certain responsibilities for you + if you distribute copies of the library or if you modify it.

    +

    For example, if you distribute copies of the library, whether gratis + or for a fee, you must give the recipients all the rights that we gave + you. You must make sure that they, too, receive or can get the source + code. If you link other code with the library, you must provide complete + object files to the recipients, so that they can relink them with the + library after making changes to the library and recompiling it. And you + must show them these terms so they know their rights.

    +

    We protect your rights with a two-step method: (1) we copyright the + library, and (2) we offer you this license, which gives you legal + permission to copy, distribute and/or modify the library.

    +

    To protect each distributor, we want to make it very clear that there + is no warranty for the free library. Also, if the library is modified by + someone else and passed on, the recipients should know that what they + have is not the original version, so that the original author's + reputation will not be affected by problems that might be introduced by + others.

    +

    Finally, software patents pose a constant threat to the existence of + any free program. We wish to make sure that a company cannot effectively + restrict the users of a free program by obtaining a restrictive license + from a patent holder. Therefore, we insist that any patent license + obtained for a version of the library must be consistent with the full + freedom of use specified in this license.

    +

    Most GNU software, including some libraries, is covered by the + ordinary GNU General Public License. This license, the GNU Lesser + General Public License, applies to certain designated libraries, and is + quite different from the ordinary General Public License. We use this + license for certain libraries in order to permit linking those libraries + into non-free programs.

    +

    When a program is linked with a library, whether statically or using + a shared library, the combination of the two is legally speaking a + combined work, a derivative of the original library. The ordinary + General Public License therefore permits such linking only if the entire + combination fits its criteria of freedom. The Lesser General Public + License permits more lax criteria for linking other code with the + library.

    +

    We call this license the "Lesser" General Public License because it + does Less to protect the user's freedom than the ordinary General Public + License. It also provides other free software developers Less of an + advantage over competing non-free programs. These disadvantages are the + reason we use the ordinary General Public License for many libraries. + However, the Lesser license provides advantages in certain special + circumstances.

    +

    For example, on rare occasions, there may be a special need to + encourage the widest possible use of a certain library, so that it + becomes a de-facto standard. To achieve this, non-free programs must be + allowed to use the library. A more frequent case is that a free library + does the same job as widely used non-free libraries. In this case, there + is little to gain by limiting the free library to free software only, so + we use the Lesser General Public License.

    +

    In other cases, permission to use a particular library in non-free + programs enables a greater number of people to use a large body of free + software. For example, permission to use the GNU C Library in non-free + programs enables many more people to use the whole GNU operating system, + as well as its variant, the GNU/Linux operating system.

    +

    Although the Lesser General Public License is Less protective of the + users' freedom, it does ensure that the user of a program that is linked + with the Library has the freedom and the wherewithal to run that program + using a modified version of the Library.

    +

    The precise terms and conditions for copying, distribution and + modification follow. Pay close attention to the difference between a + "work based on the library" and a "work that uses the library". The + former contains code derived from the library, whereas the latter must + be combined with the library in order to run.

    +

     

    + +

       TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    +

    0. This License Agreement applies to any software + library or other program which contains a notice placed by the copyright + holder or other authorized party saying it may be distributed under the + terms of this Lesser General Public License (also called "this + License"). Each licensee is addressed as "you".

    +

    A "library" means a collection of software functions and/or data + prepared so as to be conveniently linked with application programs + (which use some of those functions and data) to form executables.

    +

    The "Library", below, refers to any such software library or work + which has been distributed under these terms. A "work based on the + Library" means either the Library or any derivative work under copyright + law: that is to say, a work containing the Library or a portion of it, + either verbatim or with modifications and/or translated + straightforwardly into another language. (Hereinafter, translation is + included without limitation in the term "modification".)

    +

    "Source code" for a work means the preferred form of the work for + making modifications to it. For a library, complete source code means + all the source code for all modules it contains, plus any associated + interface definition files, plus the scripts used to control compilation + and installation of the library.

    +

    Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of running + a program using the Library is not restricted, and output from such a + program is covered only if its contents constitute a work based on the + Library (independent of the use of the Library in a tool for writing + it). Whether that is true depends on what the Library does and what the + program that uses the Library does.

    +

    1. You may copy and distribute verbatim copies of + the Library's complete source code as you receive it, in any medium, + provided that you conspicuously and appropriately publish on each copy + an appropriate copyright notice and disclaimer of warranty; keep intact + all the notices that refer to this License and to the absence of any + warranty; and distribute a copy of this License along with the Library. +

    +

    You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. +

    +

    2. You may modify your copy or copies of the Library + or any portion of it, thus forming a work based on the Library, and copy + and distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions:

    +

     

    +
      +
    • a) The modified work must itself be a software + library.
    • +
    • b) You must cause the files modified to carry + prominent notices stating that you changed the files and the date of + any change.
    • +
    • c) You must cause the whole of the work to be + licensed at no charge to all third parties under the terms of this + License.
    • +
    • d) If a facility in the modified Library refers + to a function or a table of data to be supplied by an application + program that uses the facility, other than as an argument passed + when the facility is invoked, then you must make a good faith effort + to ensure that, in the event an application does not supply such + function or table, the facility still operates, and performs + whatever part of its purpose remains meaningful. +

      (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must be + optional: if the application does not supply it, the square root + function must still compute square roots.)

      +

      These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Library, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work + based on the Library, the distribution of the whole must be on the + terms of this License, whose permissions for other licensees extend + to the entire whole, and thus to each and every part regardless of + who wrote it.

      +

      Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Library.

      +

      In addition, mere aggregation of another work not based on the + Library with the Library (or with a work based on the Library) on a + volume of a storage or distribution medium does not bring the other + work under the scope of this License.

    • +
    +

    3. You may opt to apply the terms of the ordinary + GNU General Public License instead of this License to a given copy of + the Library. To do this, you must alter all the notices that refer to + this License, so that they refer to the ordinary GNU General Public + License, version 2, instead of to this License. (If a newer version than + version 2 of the ordinary GNU General Public License has appeared, then + you can specify that version instead if you wish.) Do not make any other + change in these notices.

    +

    Once this change is made in a given copy, it is irreversible for that + copy, so the ordinary GNU General Public License applies to all + subsequent copies and derivative works made from that copy.

    +

    This option is useful when you wish to copy part of the code of the + Library into a program that is not a library.

    +

    4. You may copy and distribute the Library (or a + portion or derivative of it, under Section 2) in object code or + executable form under the terms of Sections 1 and 2 above provided that + you accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 + above on a medium customarily used for software interchange.

    +

    If distribution of object code is made by offering access to copy + from a designated place, then offering equivalent access to copy the + source code from the same place satisfies the requirement to distribute + the source code, even though third parties are not compelled to copy the + source along with the object code.

    +

    5. A program that contains no derivative of any + portion of the Library, but is designed to work with the Library by + being compiled or linked with it, is called a "work that uses the + Library". Such a work, in isolation, is not a derivative work of the + Library, and therefore falls outside the scope of this License.

    +

    However, linking a "work that uses the Library" with the Library + creates an executable that is a derivative of the Library (because it + contains portions of the Library), rather than a "work that uses the + library". The executable is therefore covered by this License. Section 6 + states terms for distribution of such executables.

    +

    When a "work that uses the Library" uses material from a header file + that is part of the Library, the object code for the work may be a + derivative work of the Library even though the source code is not. + Whether this is true is especially significant if the work can be linked + without the Library, or if the work is itself a library. The threshold + for this to be true is not precisely defined by law.

    +

    If such an object file uses only numerical parameters, data structure + layouts and accessors, and small macros and small inline functions (ten + lines or less in length), then the use of the object file is + unrestricted, regardless of whether it is legally a derivative work. + (Executables containing this object code plus portions of the Library + will still fall under Section 6.)

    +

    Otherwise, if the work is a derivative of the Library, you may + distribute the object code for the work under the terms of Section 6. + Any executables containing that work also fall under Section 6, whether + or not they are linked directly with the Library itself.

    +

    6. As an exception to the Sections above, you may + also combine or link a "work that uses the Library" with the Library to + produce a work containing portions of the Library, and distribute that + work under terms of your choice, provided that the terms permit + modification of the work for the customer's own use and reverse + engineering for debugging such modifications.

    +

    You must give prominent notice with each copy of the work that the + Library is used in it and that the Library and its use are covered by + this License. You must supply a copy of this License. If the work during + execution displays copyright notices, you must include the copyright + notice for the Library among them, as well as a reference directing the + user to the copy of this License. Also, you must do one of these things: +

    +

     

    +
      +
    • a) Accompany the work with the complete + corresponding machine-readable source code for the Library including + whatever changes were used in the work (which must be distributed + under Sections 1 and 2 above); and, if the work is an executable + linked with the Library, with the complete machine-readable "work + that uses the Library", as object code and/or source code, so that + the user can modify the Library and then relink to produce a + modified executable containing the modified Library. (It is + understood that the user who changes the contents of definitions + files in the Library will not necessarily be able to recompile the + application to use the modified definitions.)
    • +
    • b) Use a suitable shared library mechanism for + linking with the Library. A suitable mechanism is one that (1) uses + at run time a copy of the library already present on the user's + computer system, rather than copying library functions into the + executable, and (2) will operate properly with a modified version of + the library, if the user installs one, as long as the modified + version is interface-compatible with the version that the work was + made with.
    • +
    • c) Accompany the work with a written offer, + valid for at least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more than the + cost of performing this distribution.
    • +
    • d) If distribution of the work is made by + offering access to copy from a designated place, offer equivalent + access to copy the above specified materials from the same place. +
    • +
    • e) Verify that the user has already received a + copy of these materials or that you have already sent this user a + copy. +
    • +
    +

    For an executable, the required form of the "work that uses the + Library" must include any data and utility programs needed for + reproducing the executable from it. However, as a special exception, the + materials to be distributed need not include anything that is normally + distributed (in either source or binary form) with the major components + (compiler, kernel, and so on) of the operating system on which the + executable runs, unless that component itself accompanies the + executable.

    +

    It may happen that this requirement contradicts the license + restrictions of other proprietary libraries that do not normally + accompany the operating system. Such a contradiction means you cannot + use both them and the Library together in an executable that you + distribute.

    +

    7. You may place library facilities that are a work + based on the Library side-by-side in a single library together with + other library facilities not covered by this License, and distribute + such a combined library, provided that the separate distribution of the + work based on the Library and of the other library facilities is + otherwise permitted, and provided that you do these two things:

    +

     

    +
      +
    • a) Accompany the combined library with a copy + of the same work based on the Library, uncombined with any other + library facilities. This must be distributed under the terms of the + Sections above.
    • +
    • b) Give prominent notice with the combined + library of the fact that part of it is a work based on the Library, + and explaining where to find the accompanying uncombined form of the + same work. +
    • +
    +

    8. You may not copy, modify, sublicense, link with, + or distribute the Library except as expressly provided under this + License. Any attempt otherwise to copy, modify, sublicense, link with, + or distribute the Library is void, and will automatically terminate your + rights under this License. However, parties who have received copies, or + rights, from you under this License will not have their licenses + terminated so long as such parties remain in full compliance.

    +

    9. You are not required to accept this License, + since you have not signed it. However, nothing else grants you + permission to modify or distribute the Library or its derivative works. + These actions are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Library (or any work based + on the Library), you indicate your acceptance of this License to do so, + and all its terms and conditions for copying, distributing or modifying + the Library or works based on it.

    +

    10. Each time you redistribute the Library (or any + work based on the Library), the recipient automatically receives a + license from the original licensor to copy, distribute, link with or + modify the Library subject to these terms and conditions. You may not + impose any further restrictions on the recipients' exercise of the + rights granted herein. You are not responsible for enforcing compliance + by third parties with this License.

    +

    11. If, as a consequence of a court judgment or + allegation of patent infringement or for any other reason (not limited + to patent issues), conditions are imposed on you (whether by court + order, agreement or otherwise) that contradict the conditions of this + License, they do not excuse you from the conditions of this License. If + you cannot distribute so as to satisfy simultaneously your obligations + under this License and any other pertinent obligations, then as a + consequence you may not distribute the Library at all. For example, if a + patent license would not permit royalty-free redistribution of the + Library by all those who receive copies directly or indirectly through + you, then the only way you could satisfy both it and this License would + be to refrain entirely from distribution of the Library.

    +

    If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply, and the section as a whole is intended to apply in other + circumstances.

    +

    It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system which is implemented + by public license practices. Many people have made generous + contributions to the wide range of software distributed through that + system in reliance on consistent application of that system; it is up to + the author/donor to decide if he or she is willing to distribute + software through any other system and a licensee cannot impose that + choice.

    +

    This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License.

    +

    12. If the distribution and/or use of the Library is + restricted in certain countries either by patents or by copyrighted + interfaces, the original copyright holder who places the Library under + this License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only in or + among countries not thus excluded. In such case, this License + incorporates the limitation as if written in the body of this License. +

    +

    13. The Free Software Foundation may publish revised + and/or new versions of the Lesser General Public License from time to + time. Such new versions will be similar in spirit to the present + version, but may differ in detail to address new problems or concerns. +

    +

    Each version is given a distinguishing version number. If the Library + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Library does not specify a license + version number, you may choose any version ever published by the Free + Software Foundation.

    +

    14. If you wish to incorporate parts of the Library + into other free programs whose distribution conditions are incompatible + with these, write to the author to ask for permission. For software + which is copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our decision + will be guided by the two goals of preserving the free status of all + derivatives of our free software and of promoting the sharing and reuse + of software generally.

    +

    NO WARRANTY

    +

    15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, + THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT + WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF + THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME + THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    +

    16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR + AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO + MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE + TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE + LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING + RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A + FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH + HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + DAMAGES.

    +

     

    +

       END OF TERMS AND CONDITIONS

    +

     

    + + \ No newline at end of file diff --git a/sdk/astyle/src/ASBeautifier.cpp b/sdk/astyle/src/ASBeautifier.cpp new file mode 100644 index 0000000000..da10628376 --- /dev/null +++ b/sdk/astyle/src/ASBeautifier.cpp @@ -0,0 +1,1933 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASBeautifier.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include + + +#define INIT_CONTAINER(container, value) {if ( (container) != NULL ) delete (container); (container) = (value); } +#define DELETE_CONTAINER(container) {if ( (container) != NULL ) delete (container); } + + +namespace astyle +{ +vector ASBeautifier::headers; +vector ASBeautifier::nonParenHeaders; +vector ASBeautifier::preBlockStatements; +vector ASBeautifier::assignmentOperators; +vector ASBeautifier::nonAssignmentOperators; + + +/* + * initialize the static vars + */ +void ASBeautifier::initStatic() +{ + static int beautifierFileType = 9; // initialized with an invalid type + + if (fileType == beautifierFileType) // don't build unless necessary + return; + + beautifierFileType = fileType; + + headers.clear(); + nonParenHeaders.clear(); + assignmentOperators.clear(); + nonAssignmentOperators.clear(); + preBlockStatements.clear(); + + ASResource::buildHeaders(headers, fileType, true); + ASResource::buildNonParenHeaders(nonParenHeaders, fileType, true); + ASResource::buildAssignmentOperators(assignmentOperators); + ASResource::buildNonAssignmentOperators(nonAssignmentOperators); + ASResource::buildPreBlockStatements(preBlockStatements); + +// cout << "beaut" << endl; +} + +/** + * ASBeautifier's constructor + */ +ASBeautifier::ASBeautifier() +{ + waitingBeautifierStack = NULL; + activeBeautifierStack = NULL; + waitingBeautifierStackLengthStack = NULL; + activeBeautifierStackLengthStack = NULL; + + headerStack = NULL; + tempStacks = NULL; + blockParenDepthStack = NULL; + blockStatementStack = NULL; + parenStatementStack = NULL; + bracketBlockStateStack = NULL; + inStatementIndentStack = NULL; + inStatementIndentStackSizeStack = NULL; + parenIndentStack = NULL; + sourceIterator = NULL; + + isMinimalConditinalIndentSet = false; + shouldForceTabIndentation = false; + + setSpaceIndentation(4); + setMaxInStatementIndentLength(40); + setClassIndent(false); + setSwitchIndent(false); + setCaseIndent(false); + setBlockIndent(false); + setBracketIndent(false); + setNamespaceIndent(false); + setLabelIndent(false); + setEmptyLineFill(false); + fileType = C_TYPE; + setCStyle(); + setPreprocessorIndent(false); +} + +/** + * ASBeautifier's copy constructor + */ +ASBeautifier::ASBeautifier(const ASBeautifier &other) +{ + waitingBeautifierStack = NULL; + activeBeautifierStack = NULL; + waitingBeautifierStackLengthStack = NULL; + activeBeautifierStackLengthStack = NULL; + + headerStack = new vector; + *headerStack = *other.headerStack; + + tempStacks = new vector*>; + vector*>::iterator iter; + for (iter = other.tempStacks->begin(); + iter != other.tempStacks->end(); + ++iter) + { + vector *newVec = new vector; + *newVec = **iter; + tempStacks->push_back(newVec); + } + blockParenDepthStack = new vector; + *blockParenDepthStack = *other.blockParenDepthStack; + + blockStatementStack = new vector; + *blockStatementStack = *other.blockStatementStack; + + parenStatementStack = new vector; + *parenStatementStack = *other.parenStatementStack; + + bracketBlockStateStack = new vector; + *bracketBlockStateStack = *other.bracketBlockStateStack; + + inStatementIndentStack = new vector; + *inStatementIndentStack = *other.inStatementIndentStack; + + inStatementIndentStackSizeStack = new vector; + *inStatementIndentStackSizeStack = *other.inStatementIndentStackSizeStack; + + parenIndentStack = new vector; + *parenIndentStack = *other.parenIndentStack; + + sourceIterator = other.sourceIterator; + + // protected variables + fileType = other.fileType; + isCStyle = other.isCStyle; + isJavaStyle = other.isJavaStyle; + isSharpStyle = other.isSharpStyle; + + // variables set by ASFormatter + // must also be updated in preprocessor + inLineNumber = other.inLineNumber; + outLineNumber = other.outLineNumber; + lineCommentNoBeautify = other.lineCommentNoBeautify; + isNonInStatementArray = other.isNonInStatementArray; + + // private variables + indentString = other.indentString; + currentHeader = other.currentHeader; + previousLastLineHeader = other.previousLastLineHeader; + immediatelyPreviousAssignmentOp = other.immediatelyPreviousAssignmentOp; + probationHeader = other.probationHeader; + isInQuote = other.isInQuote; + isInComment = other.isInComment; + isInCase = other.isInCase; + isInQuestion = other.isInQuestion; + isInStatement = other.isInStatement; + isInHeader = other.isInHeader; + isInOperator = other.isInOperator; + isInTemplate = other.isInTemplate; + isInDefine = other.isInDefine; + isInDefineDefinition = other.isInDefineDefinition; + classIndent = other.classIndent; + isInClassHeader = other.isInClassHeader; + isInClassHeaderTab = other.isInClassHeaderTab; + switchIndent = other.switchIndent; + caseIndent = other.caseIndent; + namespaceIndent = other.namespaceIndent; + bracketIndent = other.bracketIndent; + blockIndent = other.blockIndent; + labelIndent = other.labelIndent; + preprocessorIndent = other.preprocessorIndent; + isInConditional = other.isInConditional; + isMinimalConditinalIndentSet = other.isMinimalConditinalIndentSet; + shouldForceTabIndentation = other.shouldForceTabIndentation; + emptyLineFill = other.emptyLineFill; + backslashEndsPrevLine = other.backslashEndsPrevLine; + blockCommentNoIndent = other.blockCommentNoIndent; + blockCommentNoBeautify = other.blockCommentNoBeautify; + previousLineProbationTab = other.previousLineProbationTab; + minConditionalIndent = other.minConditionalIndent; + parenDepth = other.parenDepth; + indentLength = other.indentLength; + blockTabCount = other.blockTabCount; + leadingWhiteSpaces = other.leadingWhiteSpaces; + maxInStatementIndent = other.maxInStatementIndent; + templateDepth = other.templateDepth; + prevFinalLineSpaceTabCount = other.prevFinalLineSpaceTabCount; + prevFinalLineTabCount = other.prevFinalLineTabCount; + defineTabCount = other.defineTabCount; + quoteChar = other.quoteChar; + prevNonSpaceCh = other.prevNonSpaceCh; + currentNonSpaceCh = other.currentNonSpaceCh; + currentNonLegalCh = other.currentNonLegalCh; + prevNonLegalCh = other.prevNonLegalCh; +} + +/** + * ASBeautifier's destructor + */ +ASBeautifier::~ASBeautifier() +{ + DELETE_CONTAINER(headerStack); + DELETE_CONTAINER(tempStacks); + DELETE_CONTAINER(blockParenDepthStack); + DELETE_CONTAINER(blockStatementStack); + DELETE_CONTAINER(parenStatementStack); + DELETE_CONTAINER(bracketBlockStateStack); + DELETE_CONTAINER(inStatementIndentStack); + DELETE_CONTAINER(inStatementIndentStackSizeStack); + DELETE_CONTAINER(parenIndentStack); +} + +/** + * initialize the ASBeautifier. + * + * init() should be called every time a ABeautifier object is to start + * beautifying a NEW source file. + * init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object + * that will be used to iterate through the source code. This object will be + * deleted during the ASBeautifier's destruction, and thus should not be + * deleted elsewhere. + * + * @param iter a pointer to the DYNAMICALLY CREATED ASSourceIterator object. + */ +void ASBeautifier::init(ASSourceIterator *iter) +{ + sourceIterator = iter; + init(); +} + +/** + * initialize the ASBeautifier. + */ +void ASBeautifier::init() +{ + initStatic(); + + INIT_CONTAINER(waitingBeautifierStack, new vector); + INIT_CONTAINER(activeBeautifierStack, new vector); + + INIT_CONTAINER(waitingBeautifierStackLengthStack, new vector); + INIT_CONTAINER(activeBeautifierStackLengthStack, new vector); + + INIT_CONTAINER(headerStack, new vector); + INIT_CONTAINER(tempStacks, new vector*>); + tempStacks->push_back(new vector); + + INIT_CONTAINER(blockParenDepthStack, new vector); + INIT_CONTAINER(blockStatementStack, new vector); + INIT_CONTAINER(parenStatementStack, new vector); + + INIT_CONTAINER(bracketBlockStateStack, new vector); + bracketBlockStateStack->push_back(true); + + INIT_CONTAINER(inStatementIndentStack, new vector); + INIT_CONTAINER(inStatementIndentStackSizeStack, new vector); + inStatementIndentStackSizeStack->push_back(0); + INIT_CONTAINER(parenIndentStack, new vector); + + immediatelyPreviousAssignmentOp = NULL; + previousLastLineHeader = NULL; + currentHeader = NULL; + + isInQuote = false; + isInComment = false; + isInStatement = false; + isInCase = false; + isInQuestion = false; + isInClassHeader = false; + isInClassHeaderTab = false; + isInHeader = false; + isInOperator = false; + isInTemplate = false; + isInConditional = false; + templateDepth = 0; + parenDepth = 0; + blockTabCount = 0; + leadingWhiteSpaces = 0; + prevNonSpaceCh = '{'; + currentNonSpaceCh = '{'; + prevNonLegalCh = '{'; + currentNonLegalCh = '{'; + quoteChar = ' '; + prevFinalLineSpaceTabCount = 0; + prevFinalLineTabCount = 0; + probationHeader = NULL; + backslashEndsPrevLine = false; + isInDefine = false; + isInDefineDefinition = false; + defineTabCount = 0; + lineCommentNoBeautify = false; + blockCommentNoIndent = false; + blockCommentNoBeautify = false; + previousLineProbationTab = false; + isNonInStatementArray = false; + inLineNumber = -1; // for debugging + outLineNumber = 0; // for debugging +} + +/** + * set indentation style to C/C++. + */ +void ASBeautifier::setCStyle() +{ + fileType = C_TYPE; + isCStyle = true; + isJavaStyle = false; + isSharpStyle = false; +} + +/** + * set indentation style to Java. + */ +void ASBeautifier::setJavaStyle() +{ + fileType = JAVA_TYPE; + isJavaStyle = true; + isCStyle = false; + isSharpStyle = false; +} + +/** + * set indentation style to C#. + */ +void ASBeautifier::setSharpStyle() +{ + fileType = SHARP_TYPE; + isSharpStyle = true; + isCStyle = false; + isJavaStyle = false; +} + +/** + * indent using one tab per indentation + */ +void ASBeautifier::setTabIndentation(int length, bool forceTabs) +{ + indentString = "\t"; + indentLength = length; + shouldForceTabIndentation = forceTabs; + + if (!isMinimalConditinalIndentSet) + minConditionalIndent = indentLength * 2; +} + +/** + * indent using a number of spaces per indentation. + * + * @param length number of spaces per indent. + */ +void ASBeautifier::setSpaceIndentation(int length) +{ + indentString = string(length, ' '); + indentLength = length; + + if (!isMinimalConditinalIndentSet) + minConditionalIndent = indentLength * 2; +} + +/** + * set the maximum indentation between two lines in a multi-line statement. + * + * @param max maximum indentation length. + */ +void ASBeautifier::setMaxInStatementIndentLength(int max) +{ + maxInStatementIndent = max; +} + +/** + * set the minimum indentation between two lines in a multi-line condition. + * + * @param min minimal indentation length. + */ +void ASBeautifier::setMinConditionalIndentLength(int min) +{ + minConditionalIndent = min; + isMinimalConditinalIndentSet = true; +} + +/** + * set the state of the bracket indentation option. If true, brackets will + * be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setBracketIndent(bool state) +{ + bracketIndent = state; +} + +/** + * set the state of the block indentation option. If true, entire blocks + * will be indented one additional indent, similar to the GNU indent style. + * + * @param state state of option. + */ +void ASBeautifier::setBlockIndent(bool state) +{ + if (state) + setBracketIndent(false); // so that we don't have both bracket and block indent + blockIndent = state; +} + +/** + * set the state of the class indentation option. If true, C++ class + * definitions will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setClassIndent(bool state) +{ + classIndent = state; +} + +/** + * set the state of the switch indentation option. If true, blocks of 'switch' + * statements will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setSwitchIndent(bool state) +{ + switchIndent = state; +} + +/** + * set the state of the case indentation option. If true, lines of 'case' + * statements will be indented one additional indent. + * + * @param state state of option. + */ +void ASBeautifier::setCaseIndent(bool state) +{ + caseIndent = state; +} + +/** + * set the state of the namespace indentation option. + * If true, blocks of 'namespace' statements will be indented one + * additional indent. Otherwise, NO indentation will be added. + * + * @param state state of option. + */ +void ASBeautifier::setNamespaceIndent(bool state) +{ + namespaceIndent = state; +} + +/** + * set the state of the label indentation option. + * If true, labels will be indented one indent LESS than the + * current indentation level. + * If false, labels will be flushed to the left with NO + * indent at all. + * + * @param state state of option. + */ +void ASBeautifier::setLabelIndent(bool state) +{ + labelIndent = state; +} + +/** + * set the state of the preprocessor indentation option. + * If true, multiline #define statements will be indented. + * + * @param state state of option. + */ +void ASBeautifier::setPreprocessorIndent(bool state) +{ + preprocessorIndent = state; +} + +/** + * set the state of the empty line fill option. + * If true, empty lines will be filled with the whitespace. + * of their previous lines. + * If false, these lines will remain empty. + * + * @param state state of option. + */ +void ASBeautifier::setEmptyLineFill(bool state) +{ + emptyLineFill = state; +} + +/** + * get the number of spaces per indent + * + * @return value of indentLength option. +*/ +int ASBeautifier::getIndentLength(void) +{ + return indentLength; +} + +/** + * get the char used for indentation, space or tab + * + * @return the char used for indentation. + */ +string ASBeautifier::getIndentString(void) +{ + return indentString; +} + +/** + * get the state of the case indentation option. If true, lines of 'case' + * statements will be indented one additional indent. + * + * @return state of caseIndent option. + */ +bool ASBeautifier::getCaseIndent(void) +{ + return caseIndent; +} + +/** + * get C style identifier. + * If true, a C source is being indented. + * + * @return state of isCStyle option. + */ +bool ASBeautifier::getCStyle(void) +{ + return isCStyle; +} + +/** + * get Java style identifier. + * If true, a Java source is being indented. + * + * @return state of isJavaStyle option. + */ +bool ASBeautifier::getJavaStyle(void) +{ + return isJavaStyle; +} + +/** + * get C# style identifier. + * If true, a C# source is being indented. + * + * @return state of isSharpStyle option. + */ +bool ASBeautifier::getSharpStyle(void) +{ + return isSharpStyle; +} + +/** + * get the state of the empty line fill option. + * If true, empty lines will be filled with the whitespace. + * of their previous lines. + * If false, these lines will remain empty. + * + * @return state of emptyLineFill option. + */ +bool ASBeautifier::getEmptyLineFill(void) +{ + return emptyLineFill; +} + +/** + * check if there are any indented lines ready to be read by nextLine() + * + * @return are there any indented lines ready? + */ +bool ASBeautifier::hasMoreLines() const +{ + return sourceIterator->hasMoreLines(); +} + +/** + * get the next indented line. + * + * @return indented line. + */ +string ASBeautifier::nextLine() +{ + return beautify(sourceIterator->nextLine()); +} + +/** + * beautify a line of source code. + * every line of source code in a source code file should be sent + * one after the other to the beautify method. + * + * @return the indented line. + * @param originalLine the original unindented line. + */ +string ASBeautifier::beautify(const string &originalLine) +{ + string line; + bool isInLineComment = false; + bool lineStartsInComment = false; + bool isInClass = false; + bool isInSwitch = false; + bool isImmediatelyAfterConst = false; + bool isSpecialChar = false; + char ch = ' '; + char prevCh; + string outBuffer; // the newly idented line is bufferd here + int tabCount = 0; + const string *lastLineHeader = NULL; + bool closingBracketReached = false; + int spaceTabCount = 0; + char tempCh; + size_t headerStackSize = headerStack->size(); + bool shouldIndentBrackettedLine = true; + int lineOpeningBlocksNum = 0; + int lineClosingBlocksNum = 0; + bool previousLineProbation = (probationHeader != NULL); + int i; + + currentHeader = NULL; + lineStartsInComment = isInComment; + blockCommentNoBeautify = blockCommentNoIndent; + previousLineProbationTab = false; + outLineNumber++; + + // handle and remove white spaces around the line: + // If not in comment, first find out size of white space before line, + // so that possible comments starting in the line continue in + // relation to the preliminary white-space. + if (!isInComment) + { + int strlen = originalLine.length(); + leadingWhiteSpaces = 0; + + for (int j = 0; j < strlen && isWhiteSpace(originalLine[j]); j++) + { + if (originalLine[j] == '\t') + leadingWhiteSpaces += indentLength; + else + leadingWhiteSpaces++; + } + line = trim(originalLine); + } + else + { + // convert leading tabs to spaces + string spaceTabs(indentLength, ' '); + string newLine = originalLine; + int strlen = newLine.length(); + + for (int j=0; j < leadingWhiteSpaces && j < strlen; j++) + { + if (newLine[j] == '\t') + { + newLine.replace(j, 1, spaceTabs); + strlen = newLine.length(); + } + } + + // trim the comment leaving the new leading whitespace + int trimSize = 0; + strlen = newLine.length(); + + while (trimSize < strlen + && trimSize < leadingWhiteSpaces + && isWhiteSpace(newLine[trimSize])) + trimSize++; + + + while (trimSize < strlen && isWhiteSpace(newLine[strlen-1])) + strlen--; + + line = newLine.substr(trimSize, strlen); + size_t trimEnd = line.find_last_not_of(" \t"); + if (trimEnd != string::npos) + { + int spacesToDelete = line.length() - 1 - trimEnd; + if (spacesToDelete > 0) + line.erase(trimEnd + 1, spacesToDelete); + } + } + + + if (line.length() == 0) + { + if (backslashEndsPrevLine) // must continue to clear variables + line = ' '; + else if (emptyLineFill) + return preLineWS(prevFinalLineSpaceTabCount, prevFinalLineTabCount); + else + return line; + } + + // handle preprocessor commands + + if (isCStyle && !isInComment && (line[0] == '#' || backslashEndsPrevLine)) + { + if (line[0] == '#') + { + string preproc = trim(string(line.c_str() + 1)); + + // When finding a multi-lined #define statement, the original beautifier + // 1. sets its isInDefineDefinition flag + // 2. clones a new beautifier that will be used for the actual indentation + // of the #define. This clone is put into the activeBeautifierStack in order + // to be called for the actual indentation. + // The original beautifier will have isInDefineDefinition = true, isInDefine = false + // The cloned beautifier will have isInDefineDefinition = true, isInDefine = true + if (preprocessorIndent && preproc.compare(0, 6, "define") == 0 && line[line.length() - 1] == '\\') + { + if (!isInDefineDefinition) + { + ASBeautifier *defineBeautifier; + + // this is the original beautifier + isInDefineDefinition = true; + + // push a new beautifier into the active stack + // this beautifier will be used for the indentation of this define + defineBeautifier = new ASBeautifier(*this); + activeBeautifierStack->push_back(defineBeautifier); + } + else + { + // the is the cloned beautifier that is in charge of indenting the #define. + isInDefine = true; + } + } + else if (preproc.compare(0, 2, "if") == 0) + { + // push a new beautifier into the stack + waitingBeautifierStackLengthStack->push_back(waitingBeautifierStack->size()); + activeBeautifierStackLengthStack->push_back(activeBeautifierStack->size()); + waitingBeautifierStack->push_back(new ASBeautifier(*this)); + } + else if (preproc.compare(0, 4/*2*/, "else") == 0) + { + if (waitingBeautifierStack && !waitingBeautifierStack->empty()) + { + // MOVE current waiting beautifier to active stack. + activeBeautifierStack->push_back(waitingBeautifierStack->back()); + waitingBeautifierStack->pop_back(); + } + } + else if (preproc.compare(0, 4, "elif") == 0) + { + if (waitingBeautifierStack && !waitingBeautifierStack->empty()) + { + // append a COPY current waiting beautifier to active stack, WITHOUT deleting the original. + activeBeautifierStack->push_back(new ASBeautifier(*(waitingBeautifierStack->back()))); + } + } + else if (preproc.compare(0, 5, "endif") == 0) + { + int stackLength; + ASBeautifier *beautifier; + + if (waitingBeautifierStackLengthStack && !waitingBeautifierStackLengthStack->empty()) + { + stackLength = waitingBeautifierStackLengthStack->back(); + waitingBeautifierStackLengthStack->pop_back(); + while ((int) waitingBeautifierStack->size() > stackLength) + { + beautifier = waitingBeautifierStack->back(); + waitingBeautifierStack->pop_back(); + delete beautifier; + } + } + + if (!activeBeautifierStackLengthStack->empty()) + { + stackLength = activeBeautifierStackLengthStack->back(); + activeBeautifierStackLengthStack->pop_back(); + while ((int) activeBeautifierStack->size() > stackLength) + { + beautifier = activeBeautifierStack->back(); + activeBeautifierStack->pop_back(); + delete beautifier; + } + } + } + } + + // check if the last char is a backslash + if (line.length() > 0) + backslashEndsPrevLine = (line[line.length() - 1] == '\\'); + else + backslashEndsPrevLine = false; + + // check if this line ends a multi-line #define + // if so, use the #define's cloned beautifier for the line's indentation + // and then remove it from the active beautifier stack and delete it. + if (!backslashEndsPrevLine && isInDefineDefinition && !isInDefine) + { + string beautifiedLine; + ASBeautifier *defineBeautifier; + + isInDefineDefinition = false; + defineBeautifier = activeBeautifierStack->back(); + activeBeautifierStack->pop_back(); + + beautifiedLine = defineBeautifier->beautify(line); + delete defineBeautifier; + return beautifiedLine; + } + + // unless this is a multi-line #define, return this precompiler line as is. + if (!isInDefine && !isInDefineDefinition) + return originalLine; + } + + // if there exists any worker beautifier in the activeBeautifierStack, + // then use it instead of me to indent the current line. + // variables set by ASFormatter must be updated. + if (!isInDefine && activeBeautifierStack != NULL && !activeBeautifierStack->empty()) + { + activeBeautifierStack->back()->inLineNumber = inLineNumber; + activeBeautifierStack->back()->outLineNumber = outLineNumber; + activeBeautifierStack->back()->lineCommentNoBeautify = lineCommentNoBeautify; + activeBeautifierStack->back()->isNonInStatementArray = isNonInStatementArray; + return activeBeautifierStack->back()->beautify(line); + } + + // calculate preliminary indentation based on data from past lines + if (!inStatementIndentStack->empty()) + spaceTabCount = inStatementIndentStack->back(); + + + for (i = 0; i < (int) headerStackSize; i++) + { + isInClass = false; + + if (blockIndent || (!(i > 0 && (*headerStack)[i-1] != &AS_OPEN_BRACKET + && (*headerStack)[i] == &AS_OPEN_BRACKET))) + ++tabCount; + + if (!isJavaStyle && !namespaceIndent && i >= 1 + && (*headerStack)[i-1] == &AS_NAMESPACE + && (*headerStack)[i] == &AS_OPEN_BRACKET) + --tabCount; + + if (isCStyle && i >= 1 + && (*headerStack)[i-1] == &AS_CLASS + && (*headerStack)[i] == &AS_OPEN_BRACKET) + { + if (classIndent) + ++tabCount; + isInClass = true; + } + + // is the switchIndent option is on, indent switch statements an additional indent. + else if (switchIndent && i > 1 && + (*headerStack)[i-1] == &AS_SWITCH && + (*headerStack)[i] == &AS_OPEN_BRACKET + ) + { + ++tabCount; + isInSwitch = true; + } + + } + + if (!lineStartsInComment + && isCStyle + && isInClass + && classIndent + && headerStackSize >= 2 + && (*headerStack)[headerStackSize-2] == &AS_CLASS + && (*headerStack)[headerStackSize-1] == &AS_OPEN_BRACKET + && line[0] == '}') + --tabCount; + + else if (!lineStartsInComment + && isInSwitch + && switchIndent + && headerStackSize >= 2 + && (*headerStack)[headerStackSize-2] == &AS_SWITCH + && (*headerStack)[headerStackSize-1] == &AS_OPEN_BRACKET + && line[0] == '}') + --tabCount; + + if (isInClassHeader) + { + isInClassHeaderTab = true; + tabCount += 2; + } + + if (isInConditional) + { + --tabCount; + } + + + // parse characters in the current line. + + for (i = 0; i < (int) line.length(); i++) + { + tempCh = line[i]; + + prevCh = ch; + ch = tempCh; + + outBuffer.append(1, ch); + + if (isWhiteSpace(ch)) + continue; + + // check for utf8 characters + // isalnum() will display an assert message in debug if not bypassed here + if (ch < 0) + continue; + + // handle special characters (i.e. backslash+character such as \n, \t, ...) + if (isSpecialChar) + { + isSpecialChar = false; + continue; + } + if (!(isInComment || isInLineComment) && line.compare(i, 2, "\\\\") == 0) + { + outBuffer.append(1, '\\'); + i++; + continue; + } + if (!(isInComment || isInLineComment) && ch == '\\') + { + isSpecialChar = true; + continue; + } + + // handle quotes (such as 'x' and "Hello Dolly") + if (!(isInComment || isInLineComment) && (ch == '"' || ch == '\'')) + if (!isInQuote) + { + quoteChar = ch; + isInQuote = true; + } + else if (quoteChar == ch) + { + isInQuote = false; + isInStatement = true; + continue; + } + if (isInQuote) + continue; + + // handle comments + + if (!(isInComment || isInLineComment) && line.compare(i, 2, "//") == 0) + { + isInLineComment = true; + outBuffer.append(1, '/'); + i++; + continue; + } + else if (!(isInComment || isInLineComment) && line.compare(i, 2, "/*") == 0) + { + isInComment = true; + outBuffer.append(1, '*'); + i++; + size_t j = line.find_first_not_of(" \t"); + if (!line.compare(j, 2, "/*") == 0) // does line start with comment? + blockCommentNoIndent = true; // if no, cannot indent continuation lines + continue; + } + else if ((isInComment || isInLineComment) && line.compare(i, 2, "*/") == 0) + { + isInComment = false; + outBuffer.append(1, '/'); + i++; + blockCommentNoIndent = false; // ok to indent next comment + continue; + } + + if (isInComment || isInLineComment) + continue; + + // if we have reached this far then we are NOT in a comment or string of special character... + + if (probationHeader != NULL) + { + if (((probationHeader == &AS_STATIC || probationHeader == &AS_CONST) && ch == '{') + || (probationHeader == &AS_SYNCHRONIZED && ch == '(')) + { + // insert the probation header as a new header + isInHeader = true; + headerStack->push_back(probationHeader); + + // handle the specific probation header + isInConditional = (probationHeader == &AS_SYNCHRONIZED); + if (probationHeader == &AS_CONST) + isImmediatelyAfterConst = true; + + isInStatement = false; + // if the probation comes from the previous line, then indent by 1 tab count. + if (previousLineProbation && ch == '{') + { + tabCount++; + previousLineProbationTab = true; + } + previousLineProbation = false; + } + + // dismiss the probation header + probationHeader = NULL; + } + + prevNonSpaceCh = currentNonSpaceCh; + currentNonSpaceCh = ch; + if (!isLegalNameChar(ch) && ch != ',' && ch != ';') + { + prevNonLegalCh = currentNonLegalCh; + currentNonLegalCh = ch; + } + + if (isInHeader) + { + isInHeader = false; + currentHeader = headerStack->back(); + } + else + currentHeader = NULL; + + if (isCStyle && isInTemplate + && (ch == '<' || ch == '>') + && findHeader(line, i, nonAssignmentOperators) == NULL) + { + if (ch == '<') + { + ++templateDepth; + } + else if (ch == '>') + { + if (--templateDepth <= 0) + { + if (isInTemplate) + ch = ';'; + else + ch = 't'; + isInTemplate = false; + templateDepth = 0; + } + } + } + + // handle parenthesies + if (ch == '(' || ch == '[' || ch == ')' || ch == ']') + { + if (ch == '(' || ch == '[') + { + if (parenDepth == 0) + { + parenStatementStack->push_back(isInStatement); + isInStatement = true; + } + parenDepth++; + + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + + if (currentHeader != NULL) + registerInStatementIndent(line, i, spaceTabCount, minConditionalIndent/*indentLength*2*/, true); + else + registerInStatementIndent(line, i, spaceTabCount, 0, true); + } + else if (ch == ')' || ch == ']') + { + parenDepth--; + if (parenDepth == 0) + { + isInStatement = parenStatementStack->back(); + parenStatementStack->pop_back(); + ch = ' '; + + isInConditional = false; + } + + if (!inStatementIndentStackSizeStack->empty()) + { + int previousIndentStackSize = inStatementIndentStackSizeStack->back(); + inStatementIndentStackSizeStack->pop_back(); + while (previousIndentStackSize < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + + if (!parenIndentStack->empty()) + { + int poppedIndent = parenIndentStack->back(); + parenIndentStack->pop_back(); + + if (i == 0) + spaceTabCount = poppedIndent; + } + } + } + + continue; + } + + + if (ch == '{') + { + bool isBlockOpener; + // first, check if '{' is a block-opener or an static-array opener + isBlockOpener = ((prevNonSpaceCh == '{' && bracketBlockStateStack->back()) + || prevNonSpaceCh == '}' + || prevNonSpaceCh == ')' + || prevNonSpaceCh == ';' + || peekNextChar(line, i) == '{' + || isNonInStatementArray + || isInClassHeader +// || isBlockOpener + || isImmediatelyAfterConst + || (isInDefine && + (prevNonSpaceCh == '(' + || prevNonSpaceCh == '_' + || isalnum(prevNonSpaceCh)))); + + isInClassHeader = false; + if (!isBlockOpener && currentHeader != NULL) + { + for (size_t n = 0; n < nonParenHeaders.size(); n++) + if (currentHeader == nonParenHeaders[n]) + { + isBlockOpener = true; + break; + } + } + bracketBlockStateStack->push_back(isBlockOpener); + if (!isBlockOpener) + { + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + registerInStatementIndent(line, i, spaceTabCount, 0, true); + parenDepth++; + if (i == 0) + shouldIndentBrackettedLine = false; + + continue; + } + + // this bracket is a block opener... + + ++lineOpeningBlocksNum; +// if (isInClassHeader) +// isInClassHeader = false; + + if (isInClassHeaderTab) + { + isInClassHeaderTab = false; + // decrease tab count if bracket is broken + size_t firstChar = line.find_first_not_of(" \t"); + if (firstChar != string::npos) + if (line[firstChar] == '{' && (int) firstChar == i) + tabCount -= 2; + } + + // do not allow inStatementIndent - should occur for Java files only + if (inStatementIndentStack->size() > 0) + { + spaceTabCount = 0; + inStatementIndentStack->back() = 0; + } + + blockParenDepthStack->push_back(parenDepth); + blockStatementStack->push_back(isInStatement); + + inStatementIndentStackSizeStack->push_back(inStatementIndentStack->size()); + if (inStatementIndentStack->size() > 0) + inStatementIndentStack->back() = 0; + + blockTabCount += isInStatement ? 1 : 0; + parenDepth = 0; + isInStatement = false; + + tempStacks->push_back(new vector); + headerStack->push_back(&AS_OPEN_BRACKET); + lastLineHeader = &AS_OPEN_BRACKET; + + continue; + } + + //check if a header has been reached + if (isWhiteSpace(prevCh)) + { + bool isIndentableHeader = true; + const string *newHeader = findHeader(line, i, headers); + if (newHeader != NULL) + { + // if we reached here, then this is a header... + isInHeader = true; + + vector *lastTempStack; + if (tempStacks->empty()) + lastTempStack = NULL; + else + lastTempStack = tempStacks->back(); + + // if a new block is opened, push a new stack into tempStacks to hold the + // future list of headers in the new block. + + // take care of the special case: 'else if (...)' + if (newHeader == &AS_IF && lastLineHeader == &AS_ELSE) + { + headerStack->pop_back(); + } + + // take care of 'else' + else if (newHeader == &AS_ELSE) + { + if (lastTempStack != NULL) + { + int indexOfIf = indexOf(*lastTempStack, &AS_IF); + if (indexOfIf != -1) + { + // recreate the header list in headerStack up to the previous 'if' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfIf - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + if (!closingBracketReached) + tabCount += restackSize; + } + /* + * If the above if is not true, i.e. no 'if' before the 'else', + * then nothing beautiful will come out of this... + * I should think about inserting an Exception here to notify the caller of this... + */ + } + } + + // check if 'while' closes a previous 'do' + else if (newHeader == &AS_WHILE) + { + if (lastTempStack != NULL) + { + int indexOfDo = indexOf(*lastTempStack, &AS_DO); + if (indexOfDo != -1) + { + // recreate the header list in headerStack up to the previous 'do' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfDo - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + if (!closingBracketReached) + tabCount += restackSize; + } + } + } + // check if 'catch' closes a previous 'try' or 'catch' + else if (newHeader == &AS_CATCH || newHeader == &AS_FINALLY) + { + if (lastTempStack != NULL) + { + int indexOfTry = indexOf(*lastTempStack, &AS_TRY); + if (indexOfTry == -1) + indexOfTry = indexOf(*lastTempStack, &AS_CATCH); + if (indexOfTry != -1) + { + // recreate the header list in headerStack up to the previous 'try' + // from the temporary snapshot stored in lastTempStack. + int restackSize = lastTempStack->size() - indexOfTry - 1; + for (int r = 0; r < restackSize; r++) + { + headerStack->push_back(lastTempStack->back()); + lastTempStack->pop_back(); + } + + if (!closingBracketReached) + tabCount += restackSize; + } + } + } + else if (newHeader == &AS_CASE) + { + isInCase = true; + --tabCount; + } + else if (newHeader == &AS_DEFAULT) + { + isInCase = true; + --tabCount; + } + else if (newHeader == &AS_STATIC + || newHeader == &AS_SYNCHRONIZED + || (newHeader == &AS_CONST && isCStyle)) + { + if (!headerStack->empty() && + (headerStack->back() == &AS_STATIC + || headerStack->back() == &AS_SYNCHRONIZED + || headerStack->back() == &AS_CONST)) + { + isIndentableHeader = false; + } + else + { + isIndentableHeader = false; + probationHeader = newHeader; + } + } + else if (newHeader == &AS_CONST) + { + isIndentableHeader = false; + } + else if (newHeader == &AS_TEMPLATE) + { + if (isCStyle) + isInTemplate = true; + isIndentableHeader = false; + } + + + if (isIndentableHeader) + { + headerStack->push_back(newHeader); + isInStatement = false; + if (indexOf(nonParenHeaders, newHeader) == -1) + { + isInConditional = true; + } + lastLineHeader = newHeader; + } + else + isInHeader = false; + + outBuffer.append(newHeader->substr(1)); + i += newHeader->length() - 1; + + continue; + } + } + + if (isCStyle && !isalpha(prevCh) + && line.compare(i, 8, "operator") == 0 && !isalnum(line[i+8])) + { + isInOperator = true; + outBuffer.append(AS_OPERATOR.substr(1)); + i += 7; + continue; + } + + // "new" operator is a pointer, not a calculation + if (!isalpha(prevCh) + && line.compare(i, 3, "new") == 0 && !isalnum(line[i+3])) + { + if (prevNonSpaceCh == '=' && isInStatement && !inStatementIndentStack->empty()) + inStatementIndentStack->back() = 0; + } + + if (ch == '?') + isInQuestion = true; + + + // special handling of 'case' statements + if (ch == ':') + { + if ((int) line.length() > i + 1 && line[i+1] == ':') // look for :: + { + ++i; + outBuffer.append(1, ':'); + ch = ' '; + continue; + } + + else if (isInQuestion) + { + isInQuestion = false; + } + + else if (isCStyle && isInClass && prevNonSpaceCh != ')') + { + --tabCount; + // found a 'private:' or 'public:' inside a class definition + // so do nothing special + } + + else if (!isJavaStyle && isInClassHeader) + { + // found a 'class A : public B' definition + // so do nothing special + } + + else if (isJavaStyle && lastLineHeader == &AS_FOR) + { + // found a java for-each statement + // so do nothing special + } + + else if (isCStyle && prevNonSpaceCh == ')') + { + isInClassHeader = true; + if (i == 0) + tabCount += 2; + } + else + { + currentNonSpaceCh = ';'; // so that brackets after the ':' will appear as block-openers + if (isInCase) + { + isInCase = false; + ch = ';'; // from here on, treat char as ';' + } + + + else // is in a label (e.g. 'label1:') + { + if (labelIndent) + --tabCount; // unindent label by one indent + else + tabCount = 0; // completely flush indent to left + } + + + + } + } + + if ((ch == ';' || (parenDepth > 0 && ch == ',')) && !inStatementIndentStackSizeStack->empty()) + while ((int) inStatementIndentStackSizeStack->back() + (parenDepth > 0 ? 1 : 0) + < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + + + // handle ends of statements + if ((ch == ';' && parenDepth == 0) || ch == '}'/* || (ch == ',' && parenDepth == 0)*/) + { + if (ch == '}') + { + // first check if this '}' closes a previous block, or a static array... + if (!bracketBlockStateStack->empty()) + { + bool bracketBlockState = bracketBlockStateStack->back(); + bracketBlockStateStack->pop_back(); + if (!bracketBlockState) + { + if (!inStatementIndentStackSizeStack->empty()) + { + // this bracket is a static array + + int previousIndentStackSize = inStatementIndentStackSizeStack->back(); + inStatementIndentStackSizeStack->pop_back(); + while (previousIndentStackSize < (int) inStatementIndentStack->size()) + inStatementIndentStack->pop_back(); + parenDepth--; + if (i == 0) + shouldIndentBrackettedLine = false; + + if (!parenIndentStack->empty()) + { + int poppedIndent = parenIndentStack->back(); + parenIndentStack->pop_back(); + if (i == 0) + spaceTabCount = poppedIndent; + } + } + continue; + } + } + + // this bracket is block closer... + + ++lineClosingBlocksNum; + + if (!inStatementIndentStackSizeStack->empty()) + inStatementIndentStackSizeStack->pop_back(); + + if (!blockParenDepthStack->empty()) + { + parenDepth = blockParenDepthStack->back(); + blockParenDepthStack->pop_back(); + isInStatement = blockStatementStack->back(); + blockStatementStack->pop_back(); + + if (isInStatement) + blockTabCount--; + } + + closingBracketReached = true; + int headerPlace = indexOf(*headerStack, &AS_OPEN_BRACKET); + if (headerPlace != -1) + { + const string *popped = headerStack->back(); + while (popped != &AS_OPEN_BRACKET) + { + headerStack->pop_back(); + popped = headerStack->back(); + } + headerStack->pop_back(); + + if (!tempStacks->empty()) + { + vector *temp = tempStacks->back(); + tempStacks->pop_back(); + delete temp; + } + } + + + ch = ' '; // needed due to cases such as '}else{', so that headers ('else' tn tih case) will be identified... + } + + /* + * Create a temporary snapshot of the current block's header-list in the + * uppermost inner stack in tempStacks, and clear the headerStack up to + * the begining of the block. + * Thus, the next future statement will think it comes one indent past + * the block's '{' unless it specifically checks for a companion-header + * (such as a previous 'if' for an 'else' header) within the tempStacks, + * and recreates the temporary snapshot by manipulating the tempStacks. + */ + if (!tempStacks->back()->empty()) + while (!tempStacks->back()->empty()) + tempStacks->back()->pop_back(); + while (!headerStack->empty() && headerStack->back() != &AS_OPEN_BRACKET) + { + tempStacks->back()->push_back(headerStack->back()); + headerStack->pop_back(); + } + + if (parenDepth == 0 && ch == ';') + isInStatement = false; + + previousLastLineHeader = NULL; + isInClassHeader = false; + isInQuestion = false; + + continue; + } + + + // check for preBlockStatements ONLY if not within parenthesies + // (otherwise 'struct XXX' statements would be wrongly interpreted...) + if (isWhiteSpace(prevCh) && !isInTemplate && parenDepth == 0) + { + const string *newHeader = findHeader(line, i, preBlockStatements); + if (newHeader != NULL) + { + isInClassHeader = true; + outBuffer.append(newHeader->substr(1)); + i += newHeader->length() - 1; + headerStack->push_back(newHeader); + } + } + + // Handle operators + + immediatelyPreviousAssignmentOp = NULL; + + // Check if an operator has been reached. + const string *foundAssignmentOp = findHeader(line, i, assignmentOperators, false); + if (foundAssignmentOp == &AS_RETURN) + foundAssignmentOp = findHeader(line, i, assignmentOperators, true); + const string *foundNonAssignmentOp = findHeader(line, i, nonAssignmentOperators, false); + + // Since findHeader's boundry checking was not used above, it is possible + // that both an assignment op and a non-assignment op where found, + // e.g. '>>' and '>>='. If this is the case, treat the LONGER one as the + // found operator. + if (foundAssignmentOp != NULL && foundNonAssignmentOp != NULL) + if (foundAssignmentOp->length() < foundNonAssignmentOp->length()) + foundAssignmentOp = NULL; + else + foundNonAssignmentOp = NULL; + + if (foundNonAssignmentOp != NULL) + { + if (foundNonAssignmentOp->length() > 1) + { + outBuffer.append(foundNonAssignmentOp->substr(1)); + i += foundNonAssignmentOp->length() - 1; + } + } + + else if (foundAssignmentOp != NULL) + { + if (foundAssignmentOp->length() > 1) + { + outBuffer.append(foundAssignmentOp->substr(1)); + i += foundAssignmentOp->length() - 1; + } + + if (!isInOperator && !isInTemplate && !isNonInStatementArray) + { + registerInStatementIndent(line, i, spaceTabCount, 0, false); + immediatelyPreviousAssignmentOp = foundAssignmentOp; + isInStatement = true; + } + } + + if (isInOperator) + isInOperator = false; + } + + // handle special cases of unindentation: + + /* + * if '{' doesn't follow an immediately previous '{' in the headerStack + * (but rather another header such as "for" or "if", then unindent it + * by one indentation relative to its block. + */ + + if (!lineStartsInComment + && !blockIndent + && outBuffer.length() > 0 + && outBuffer[0] == '{' + && !(lineOpeningBlocksNum > 0 && lineOpeningBlocksNum == lineClosingBlocksNum) + && !(headerStack->size() > 1 && (*headerStack)[headerStack->size()-2] == &AS_OPEN_BRACKET) + && shouldIndentBrackettedLine) + --tabCount; + + else if (!lineStartsInComment + && outBuffer.length() > 0 + && outBuffer[0] == '}' + && shouldIndentBrackettedLine) + --tabCount; + + // correctly indent one-line-blocks... + else if (!lineStartsInComment + && outBuffer.length() > 0 + && lineOpeningBlocksNum > 0 + && lineOpeningBlocksNum == lineClosingBlocksNum + && previousLineProbationTab) + --tabCount; //lineOpeningBlocksNum - (blockIndent ? 1 : 0); + + if (tabCount < 0) + tabCount = 0; + + // take care of extra bracket indentatation option... + if (bracketIndent && outBuffer.length() > 0 && shouldIndentBrackettedLine) + if (outBuffer[0] == '{' || outBuffer[0] == '}') + tabCount++; + + + if (isInDefine) + { + if (outBuffer[0] == '#') + { + string preproc = trim(string(outBuffer.c_str() + 1)); + if (preproc.compare(0, 6, "define") == 0) + { + if (!inStatementIndentStack->empty() + && inStatementIndentStack->back() > 0) + { + defineTabCount = tabCount; + } + else + { + defineTabCount = tabCount - 1; + tabCount--; + } + } + } + + tabCount -= defineTabCount; + } + + if (tabCount < 0) + tabCount = 0; + if (lineCommentNoBeautify || blockCommentNoBeautify) + tabCount = spaceTabCount = 0; + + // finally, insert indentations into begining of line + + prevFinalLineSpaceTabCount = spaceTabCount; + prevFinalLineTabCount = tabCount; + + if (shouldForceTabIndentation) + { + tabCount += spaceTabCount / indentLength; + spaceTabCount = spaceTabCount % indentLength; + } + + outBuffer = preLineWS(spaceTabCount, tabCount) + outBuffer; + + if (lastLineHeader != NULL) + previousLastLineHeader = lastLineHeader; + + return outBuffer; +} + + +string ASBeautifier::preLineWS(int spaceTabCount, int tabCount) +{ + string ws; + + for (int i = 0; i < tabCount; i++) + ws += indentString; + + while ((spaceTabCount--) > 0) + ws += string(" "); + + return ws; + +} + +/** + * register an in-statement indent. + */ +void ASBeautifier::registerInStatementIndent(const string &line, int i, int spaceTabCount, + int minIndent, bool updateParenStack) +{ + int inStatementIndent; + int remainingCharNum = line.length() - i; + int nextNonWSChar = getNextProgramCharDistance(line, i); + + // if indent is around the last char in the line, indent instead 2 spaces from the previous indent + if (nextNonWSChar == remainingCharNum) + { + int previousIndent = spaceTabCount; + if (!inStatementIndentStack->empty()) + previousIndent = inStatementIndentStack->back(); + + inStatementIndentStack->push_back(/*2*/ indentLength + previousIndent); + if (updateParenStack) + parenIndentStack->push_back(previousIndent); + return; + } + + if (updateParenStack) + parenIndentStack->push_back(i + spaceTabCount); + + inStatementIndent = i + nextNonWSChar + spaceTabCount; + + if (i + nextNonWSChar < minIndent) + inStatementIndent = minIndent + spaceTabCount; + + if (i + nextNonWSChar > maxInStatementIndent) + inStatementIndent = indentLength * 2 + spaceTabCount; + + if (!inStatementIndentStack->empty() && + inStatementIndent < inStatementIndentStack->back()) + inStatementIndent = inStatementIndentStack->back(); + + if (isNonInStatementArray) + inStatementIndent = 0; + + inStatementIndentStack->push_back(inStatementIndent); +} + +/** + * get distance to the next non-white sspace, non-comment character in the line. + * if no such character exists, return the length remaining to the end of the line. + */ +int ASBeautifier::getNextProgramCharDistance(const string &line, int i) +{ + bool inComment = false; + int remainingCharNum = line.length() - i; + int charDistance; + char ch; + + for (charDistance = 1; charDistance < remainingCharNum; charDistance++) + { + ch = line[i + charDistance]; + if (inComment) + { + if (line.compare(i + charDistance, 2, "*/") == 0) + { + charDistance++; + inComment = false; + } + continue; + } + else if (isWhiteSpace(ch)) + continue; + else if (ch == '/') + { + if (line.compare(i + charDistance, 2, "//") == 0) + return remainingCharNum; + else if (line.compare(i + charDistance, 2, "/*") == 0) + { + charDistance++; + inComment = true; + } + } + else + return charDistance; + } + + return charDistance; +} + + +/** + * check if a specific line position contains a header, out of several possible headers. + * + * @return a pointer to the found header. if no header was found then return NULL. + */ +const string *ASBeautifier::findHeader(const string &line, int i, const vector &possibleHeaders, bool checkBoundry) +{ + int maxHeaders = possibleHeaders.size(); + // const string *header = NULL; + int p; + + for (p = 0; p < maxHeaders; p++) + { + const string *header = possibleHeaders[p]; + + if (line.compare(i, header->length(), header->c_str()) == 0) + { + // check that this is a header and not a part of a longer word + // (e.g. not at its begining, not at its middle...) + + int lineLength = line.length(); + int headerEnd = i + header->length(); + char startCh = (*header)[0]; // first char of header + char endCh = 0; // char just after header + char prevCh = 0; // char just before header + + if (headerEnd < lineLength) + { + endCh = line[headerEnd]; + } + if (i > 0) + { + prevCh = line[i-1]; + } + + if (!checkBoundry) + { + return header; + } + else if (prevCh != 0 + && isLegalNameChar(startCh) + && isLegalNameChar(prevCh)) + { + return NULL; + } + else if (headerEnd >= lineLength + || !isLegalNameChar(startCh) + || !isLegalNameChar(endCh)) + { + return header; + } + else + { + return NULL; + } + } + } + + return NULL; +} + +/** + * find the index number of a string element in a container of strings + * + * @return the index number of element in the ocntainer. -1 if element not found. + * @param container a vector of strings. + * @param element the element to find . + */ +int ASBeautifier::indexOf(vector &container, const string *element) +{ + vector::const_iterator where; + + where = find(container.begin(), container.end(), element); + if (where == container.end()) + return -1; + else + return (int) (where - container.begin()); +} + +/** + * trim removes the white space surrounding a line. + * + * @return the trimmed line. + * @param str the line to trim. + */ +string ASBeautifier::trim(const string &str) +{ + + int start = 0; + int end = str.length() - 1; + + while (start < end && isWhiteSpace(str[start])) + start++; + + while (start <= end && isWhiteSpace(str[end])) + end--; + + string returnStr(str, start, end + 1 - start); + return returnStr; +} + +/** +* peek at the next unread character. +* +* @return the next unread character. +* @param line the line to check. +* @param i the current char position on the line. +*/ +char ASBeautifier::peekNextChar(string &line, int i) +{ + char ch = ' '; + size_t peekNum = line.find_first_not_of(" \t", i + 1); + + if (peekNum == string::npos) + return ch; + + ch = line[peekNum]; + + return ch; +} + + +} // end namespace astyle + diff --git a/sdk/astyle/src/ASEnhancer.cpp b/sdk/astyle/src/ASEnhancer.cpp new file mode 100644 index 0000000000..8ab2ac1d79 --- /dev/null +++ b/sdk/astyle/src/ASEnhancer.cpp @@ -0,0 +1,483 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASEnhancer.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +// can trace only if NDEBUG is not defined +#ifndef NDEBUG +// #define TRACEswitch +// #define TRACEcase +// #define TRACEmisc +#endif + +#include "astyle.h" + +#include +#include +#include + +#ifdef TRACEswitch +#define TRswitch(a,b) *traceOut << lineNumber << a << b << endl; +#else +#define TRswitch(a,b) ((void)0) +#endif // TRACEswitch +#ifdef TRACEcase +#define TRcase(a,b) *traceOut << lineNumber << a << b << endl; +#else +#define TRcase(a,b) ((void)0) +#endif // TRACEcase +#ifdef TRACEmisc +#define TRmisc(a) *traceOut << lineNumber << a << endl; +#else +#define TRmisc(a) ((void)0) +#endif // TRACEmisc + + +namespace astyle +{ + +// ---------------------------- functions for ASEnhancer Class ------------------------------------- + +/** + * ASEnhancer constructor + */ +ASEnhancer::ASEnhancer() +{ + // variables are initialized by init() + traceOut = new stringstream; +} + +/** + * Destructor of ASEnhancer + * Display the TRACE entries. + */ +ASEnhancer::~ASEnhancer() +{ +#if defined(TRACEswitch) || defined(TRACEcase) || defined(TRACEmisc) + string line; + string msg = "TRACE Entries\n\n"; + char countLine[50]; + int count = 0; + + while (getline(*traceOut, line)) + { + msg += line + '\n'; + count++; + } + sprintf(countLine, "\n%d Entries", count); + msg += countLine; + // write a text file to "My Documents" (Windows) + char filename [_MAX_PATH + _MAX_FNAME + _MAX_EXT + 1]; // full path and filename + strcpy(filename, getenv("USERPROFILE")); + strcat(filename, "\\My Documents\\tracee.txt"); + ofstream outfile(filename); + outfile << msg; + outfile.close(); +#endif + delete traceOut; +} + +/** + * initialize the ASEnhancer. + * + * init() is called each time an ASFormatter object is initialized. + */ +void ASEnhancer::init(int _indentLength, + string _indentString, + bool _isCStyle, + bool _isJavaStyle, + bool _isSharpStyle, + bool _caseIndent, + bool _emptyLineFill) +{ + // formatting variables from ASFormatter and ASBeautifier + indentLength = _indentLength; + if (_indentString.compare(0, 1, "\t") == 0) + useTabs = true; + else + useTabs = false; + isCStyle = _isCStyle; + isJavaStyle = _isJavaStyle; + isSharpStyle = _isSharpStyle; + caseIndent = _caseIndent; + emptyLineFill = _emptyLineFill; + + // unindent variables + lineNumber = 0; + bracketCount = 0; + isInComment = false; + isInQuote = false; + switchDepth = 0; + lookingForCaseBracket = false; + unindentNextLine = false; + +#if defined(TRACEswitch) || defined(TRACEcase) || defined(TRACEmisc) + *traceOut << "New file -------------" << endl; +#endif +} + +/** + * additional formatting for line of source code. + * every line of source code in a source code file should be sent + * one after the other to this function. + * indents event tables + * unindents the case blocks + * + * @param line the original formatted line will be updated if necessary. + */ +void ASEnhancer::enhance(string &line) +{ + static vector swVector; // stack vector of switch variables + static switchVariables sw; // switch variables struct + + static bool nextLineIsEventTable; // begin event table is reached + static bool isInEventTable; // need to indent an event table + + bool isSpecialChar = false; + size_t lineLength; // length of the line being parsed + + lineNumber++; + lineLength = line.length(); + + // check for beginning of event table + if (nextLineIsEventTable) + { + isInEventTable = true; + nextLineIsEventTable = false; + } + + if (lineLength == 0 + && ! isInEventTable + && ! emptyLineFill) + return; + + // test for unindent on attached brackets + if (unindentNextLine) + { + sw.unindentDepth++; + sw.unindentCase = true; + unindentNextLine = false; + TRcase(" unindent case ", sw.unindentDepth); + } + + // parse characters in the current line. + + for (size_t i = 0; i < lineLength; i++) + { + char ch = line[i]; + + // bypass whitespace + if (isWhiteSpaceX(ch)) + continue; + + // handle special characters (i.e. backslash+character such as \n, \t, ...) + if (isSpecialChar) + { + isSpecialChar = false; + continue; + } + if (!(isInComment) && line.compare(i, 2, "\\\\") == 0) + { + i++; + continue; + } + if (!(isInComment) && ch == '\\') + { + isSpecialChar = true; + continue; + } + + // handle quotes (such as 'x' and "Hello Dolly") + if (!(isInComment) && (ch == '"' || ch == '\'')) + if (!isInQuote) + { + quoteChar = ch; + isInQuote = true; + } + else if (quoteChar == ch) + { + isInQuote = false; + continue; + } + + if (isInQuote) + continue; + + // handle comments + + if (!(isInComment) && line.compare(i, 2, "//") == 0) + { + // check for windows line markers + if (line.compare(i + 2, 1, "\xf0") > 0) + lineNumber--; + break; // finished with the line + } + else if (!(isInComment) && line.compare(i, 2, "/*") == 0) + { + isInComment = true; + i++; + continue; + } + else if ((isInComment) && line.compare(i, 2, "*/") == 0) + { + isInComment = false; + i++; + continue; + } + + if (isInComment) + continue; + + // if we have reached this far then we are NOT in a comment or string of special characters + + if (line[i] == '{') // if open bracket + bracketCount++; + + if (line[i] == '}') // if close bracket + bracketCount--; + + // ---------------- process event tables -------------------------------------- + + // check for event table begin + if (findKeyword(line, i, "BEGIN_EVENT_TABLE") + || findKeyword(line, i, "BEGIN_MESSAGE_MAP")) + nextLineIsEventTable = true; + + // check for event table end + if (findKeyword(line, i, "END_EVENT_TABLE") + || findKeyword(line, i, "END_MESSAGE_MAP")) + isInEventTable = false; + + // ---------------- process switch statements --------------------------------- + + if (findKeyword(line, i, "switch")) // if switch statement + { + switchDepth++; // bump switch depth + TRswitch(" switch ", switchDepth); + swVector.push_back(sw); // save current variables + sw.switchBracketCount = 0; + sw.unindentCase = false; // don't clear case until end of switch + i += 5; // bypass switch statement + continue; + } + + // just want switch statements from this point + + if (caseIndent || switchDepth == 0) // from here just want switch statements + continue; // get next char + + if (line[i] == '{') // if open bracket + { + sw.switchBracketCount++; + if (lookingForCaseBracket) // if 1st after case statement + { + sw.unindentCase = true; // unindenting this case + sw.unindentDepth++; // bump depth + lookingForCaseBracket = false; // not looking now + TRcase(" unindent case ", sw.unindentDepth); + } + continue; + } + + lookingForCaseBracket = false; // no opening bracket, don't indent + + if (line[i] == '}') // if close bracket + { + sw.switchBracketCount--; + if (sw.switchBracketCount == 0) // if end of switch statement + { + TRswitch(" endsw ", switchDepth); + switchDepth--; // one less switch + sw = swVector.back(); // restore sw struct + swVector.pop_back(); // remove last entry from stack + } + continue; + } + + // look for case or default header + + if (findKeyword(line, i, "case") || findKeyword(line, i, "default")) + { + if (sw.unindentCase) // if unindented last case + { + sw.unindentCase = false; // stop unindenting previous case + sw.unindentDepth--; // reduce depth + } + for (; i < lineLength; i++) // bypass colon + { + if (line[i] == ':') + if ((i + 1 < lineLength) && (line[i + 1] == ':')) + i++; // bypass scope resolution operator + else + break; + } + i++; + for (; i < lineLength; i++) // bypass whitespace + { + if (!(isWhiteSpaceX(line[i]))) + break; + } + if (i < lineLength) // check for bracket + { + if (line[i] == '{') // if bracket found + { + sw.switchBracketCount++; + unindentNextLine = true; // start unindenting on next line + continue; + } + } + lookingForCaseBracket = true; // bracket must be on next line + i--; // need to check for comments + continue; + } + } // end of for loop + + if (isInEventTable) // if need to indent + indentLine(line, 1); // do it + + if (sw.unindentDepth > 0) // if need to unindent + unindentLine(line, sw.unindentDepth); // do it +} + +/** + * indent a line by a given number of tabsets + * by inserting leading whitespace to the line argument. + * + * @param line a pointer to the line to indent. + * @param unindent the number of tabsets to insert. + * @return the number of characters inserted. + */ +int ASEnhancer::indentLine(string &line, const int indent) const +{ + if (line.length() == 0 + && ! emptyLineFill) + return 0; + + size_t charsToInsert; // number of chars to insert + + if (useTabs) // if formatted with tabs + { + charsToInsert = indent; // tabs to insert + line.insert((size_t) 0, charsToInsert, '\t'); // insert the tabs + } + else + { + charsToInsert = indent * indentLength; // compute chars to insert + line.insert((size_t)0, charsToInsert, ' '); // insert the spaces + } + + return charsToInsert; +} + +/** + * unindent a line by a given number of tabsets + * by erasing the leading whitespace from the line argument. + * + * @param line a pointer to the line to unindent. + * @param unindent the number of tabsets to erase. + * @return the number of characters erased. + */ +int ASEnhancer::unindentLine(string &line, const int unindent) const +{ + size_t whitespace = line.find_first_not_of(" \t"); + + if (whitespace == string::npos) // if line is blank + whitespace = line.length(); // must remove padding, if any + + if (whitespace == 0) + return 0; + + size_t charsToErase; // number of chars to erase + + if (useTabs) // if formatted with tabs + { + charsToErase = unindent; // tabs to erase + if (charsToErase <= whitespace) // if there is enough whitespace + line.erase(0, charsToErase); // erase the tabs + else + charsToErase = 0; + } + else + { + charsToErase = unindent * indentLength; // compute chars to erase + if (charsToErase <= whitespace) // if there is enough whitespace + line.erase(0, charsToErase); // erase the spaces + else + charsToErase = 0; + } + + return charsToErase; +} + +/** + * check if a specific line position contains a keyword. + * + * @return true if the word was found. false if the word was not found. + */ +bool ASEnhancer::findKeyword(const string &line, int i, const char *keyword) const +{ + if (line.compare(i, strlen(keyword), keyword) == 0) + { + // check that this is a header and not a part of a longer word + // (e.g. not at its begining, not at its middle...) + + int lineLength = line.length(); + int wordEnd = i + strlen(keyword); + char startCh = keyword[0]; // first char of header + char endCh = 0; // char just after header + char prevCh = 0; // char just before header + + if (wordEnd < lineLength) + { + endCh = line[wordEnd]; + } + if (i > 0) + { + prevCh = line[i-1]; + } + + if (prevCh != 0 + && isLegalNameCharX(startCh) + && isLegalNameCharX(prevCh)) + { + return false; + } + else if (wordEnd >= lineLength + || !isLegalNameCharX(startCh) + || !isLegalNameCharX(endCh)) + { + return true; + } + else + { + return false; + } + } + + return false; +} + +} // end namespace astyle diff --git a/sdk/astyle/src/ASFormatter.cpp b/sdk/astyle/src/ASFormatter.cpp new file mode 100644 index 0000000000..38cb1ed6a7 --- /dev/null +++ b/sdk/astyle/src/ASFormatter.cpp @@ -0,0 +1,2197 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASFormatter.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include +#include +#ifdef __VMS +#include +#else +#include +#endif + +// can trace only if NDEBUG is not defined +#ifndef NDEBUG +// #define TRACEunpad +// #define TRACEcomment +// #define TRACEheader +// #define TRACEbracket +// #define TRACEarray +#if defined(TRACEunpad) || defined(TRACEcomment) || defined(TRACEheader) \ +|| defined(TRACEbracket) || defined(TRACEarray) +ofstream *traceOutF; +#define TRACEF +#endif +#endif + +#ifdef TRACEunpad +#define TRunpad(a,b,c) if(b > 0 || c > 0) *traceOutF << outLineNumber << " " << b << a << c << endl +#else +#define TRunpad(a,b,c) ((void)0) +#endif + +#ifdef TRACEcomment +#define TRcomment(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRcomment(a) ((void)0) +#endif + +#ifdef TRACEheader +#define TRxtra(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRxtra(a) ((void)0) +#endif + +#ifdef TRACEbracket +#define TRbracket(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRbracket(a) ((void)0) +#endif + +#ifdef TRACEarray +#define TRarray(a) *traceOutF << outLineNumber << " " << a << endl +#else +#define TRarray(a) ((void)0) +#endif + +#define INIT_CONTAINER(container, value) {if ( (container) != NULL ) delete (container); (container) = (value); } +#define DELETE_CONTAINER(container) {if ( (container) != NULL ) delete (container); } +#define IS_A(a,b) ( ((a) & (b)) == (b)) + +using namespace std; + +namespace astyle +{ +vector ASFormatter::headers; +vector ASFormatter::nonParenHeaders; +vector ASFormatter::preDefinitionHeaders; +vector ASFormatter::preCommandHeaders; +vector ASFormatter::operators; +vector ASFormatter::assignmentOperators; +vector ASFormatter::castOperators; + +/** + * Constructor of ASFormatter + */ +ASFormatter::ASFormatter() +{ + preBracketHeaderStack = NULL; + bracketTypeStack = NULL; + parenStack = NULL; + lineCommentNoIndent = false; + sourceIterator = NULL; + bracketFormatMode = NONE_MODE; + shouldPadOperators = false; + shouldPadParensOutside = false; + shouldPadParensInside = false; + shouldUnPadParens = false; + shouldBreakOneLineBlocks = true; + shouldBreakOneLineStatements = true; + shouldConvertTabs = false; + shouldBreakBlocks = false; + shouldBreakClosingHeaderBlocks = false; + shouldBreakClosingHeaderBrackets = false; + shouldBreakElseIfs = false; +#ifdef TRACEF + // create a trace text file + string filename = "tracef.txt"; + char* env = getenv("HOME"); + if (env != NULL) + filename = string(env) + string("/tracef.txt"); + else + { + env = getenv("USERPROFILE"); + if (env != NULL) + filename = string(env) + string("\\My Documents\\tracef.txt"); + else + { + cout << "\nCould not open tracef.txt\n" << endl; + exit(1); + } + } + traceOutF = new ofstream(filename.c_str()); +#endif +} + +/** + * Destructor of ASFormatter + */ +ASFormatter::~ASFormatter() +{ + DELETE_CONTAINER(preBracketHeaderStack); +#ifdef TRACEF + delete traceOutF; +#endif +} + +/** + * initialization of static data of ASFormatter. + */ +void ASFormatter::staticInit() +{ + static int formatterFileType = 9; // initialized with an invalid type + + if (fileType == formatterFileType) // don't build unless necessary + return; + + formatterFileType = fileType; + + headers.clear(); + nonParenHeaders.clear(); + assignmentOperators.clear(); + operators.clear(); + preDefinitionHeaders.clear(); + preCommandHeaders.clear(); + castOperators.clear(); + + ASResource::buildHeaders(headers, fileType); + ASResource::buildNonParenHeaders(nonParenHeaders, fileType); + ASResource::buildAssignmentOperators(assignmentOperators); + ASResource::buildOperators(operators); + ASResource::buildPreDefinitionHeaders(preDefinitionHeaders); + ASResource::buildPreCommandHeaders(preCommandHeaders); + ASResource::buildCastOperators(castOperators); +} + +/** + * initialize the ASFormatter. + * + * init() should be called every time a ASFormatter object is to start + * formatting a NEW source file. + * init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object + * that will be used to iterate through the source code. This object will be + * deleted during the ASFormatter's destruction, and thus should not be + * deleted elsewhere. + * + * @param iter a pointer to the DYNAMICALLY CREATED ASSourceIterator object. + */ +void ASFormatter::init(ASSourceIterator *si) +{ + staticInit(); + + ASBeautifier::init(si); + ASEnhancer::init(ASBeautifier::getIndentLength(), + ASBeautifier::getIndentString(), + ASBeautifier::getCStyle(), + ASBeautifier::getJavaStyle(), + ASBeautifier::getSharpStyle(), + ASBeautifier::getCaseIndent(), + ASBeautifier::getEmptyLineFill()); + sourceIterator = si; + + INIT_CONTAINER(preBracketHeaderStack, new vector); + INIT_CONTAINER(bracketTypeStack, new vector); + bracketTypeStack->push_back(NULL_TYPE); + INIT_CONTAINER(parenStack, new vector); + parenStack->push_back(0); + + currentHeader = NULL; + currentLine = string(""); + readyFormattedLine = string(""); + formattedLine = ""; + currentChar = ' '; + previousChar = ' '; + previousCommandChar = ' '; + previousNonWSChar = ' '; + quoteChar = '"'; + charNum = 0; + spacePadNum = 0; + previousReadyFormattedLineLength = string::npos; + templateDepth = 0; + previousBracketType = NULL_TYPE; + previousOperator = NULL; + + isVirgin = true; + isInLineComment = false; + isInComment = false; + isInPreprocessor = false; + doesLineStartComment = false; + isInQuote = false; + isSpecialChar = false; + isNonParenHeader = true; + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + foundCastOperator = false; + foundQuestionMark = false; + isInLineBreak = false; + endOfCodeReached = false; + isLineReady = false; + isPreviousBracketBlockRelated = true; + isInPotentialCalculation = false; + shouldReparseCurrentChar = false; + passedSemicolon = false; + passedColon = false; + isInTemplate = false; + isInBlParen = false; + shouldBreakLineAfterComments = false; + isImmediatelyPostComment = false; + isImmediatelyPostLineComment = false; + isImmediatelyPostEmptyBlock = false; + isImmediatelyPostPreprocessor = false; + + isPrependPostBlockEmptyLineRequested = false; + isAppendPostBlockEmptyLineRequested = false; + prependEmptyLine = false; + appendOpeningBracket = false; + + foundClosingHeader = false; + previousReadyFormattedLineLength = 0; + + isImmediatelyPostHeader = false; + isInHeader = false; +#ifdef TRACEF + // fileName will be empty if ASTYLE_LIB is defined + if (fileName.empty()) + *traceOutF << "new file" << endl; + else + *traceOutF << fileName << endl; +#endif +} + +/** + * get the next formatted line. + * + * @return formatted line. + */ + +string ASFormatter::nextLine() +{ + // these are reset with each new line + const string *newHeader; + bool isInVirginLine = isVirgin; + isCharImmediatelyPostComment = false; + isPreviousCharPostComment = false; + isCharImmediatelyPostLineComment = false; + isCharImmediatelyPostOpenBlock = false; + isCharImmediatelyPostCloseBlock = false; + isCharImmediatelyPostTemplate = false; + + while (!isLineReady) + { + if (shouldReparseCurrentChar) + shouldReparseCurrentChar = false; + else if (!getNextChar()) + { + breakLine(); + return beautify(readyFormattedLine); + } + else // stuff to do when reading a new character... + { + // make sure that a virgin '{' at the begining ofthe file will be treated as a block... + if (isInVirginLine && currentChar == '{') + previousCommandChar = '{'; + isPreviousCharPostComment = isCharImmediatelyPostComment; + isCharImmediatelyPostComment = false; + isCharImmediatelyPostTemplate = false; + } + + //if (inLineNumber >= 185) + // int x = 1; + + if (isInLineComment) + { + appendCurrentChar(); + + // explicitely break a line when a line comment's end is found. + if (charNum + 1 == (int) currentLine.length()) + { + isInLineBreak = true; + isInLineComment = false; + isImmediatelyPostLineComment = true; + currentChar = 0; //make sure it is a neutral char. + } + continue; + } + else if (isInComment) + { + if (isSequenceReached("*/")) + { + isInComment = false; + isImmediatelyPostComment = true; + appendSequence(AS_CLOSE_COMMENT); + goForward(1); + } + else + appendCurrentChar(); + + continue; + } + + // not in line comment or comment + + else if (isInQuote) + { + if (isSpecialChar) + { + isSpecialChar = false; + appendCurrentChar(); + } + else if (currentChar == '\\') + { + isSpecialChar = true; + appendCurrentChar(); + } + else if (quoteChar == currentChar) + { + isInQuote = false; + appendCurrentChar(); + } + else + { + appendCurrentChar(); + } + + continue; + } + + // handle white space - needed to simplify the rest. + if (isWhiteSpace(currentChar) || isInPreprocessor) + { + appendCurrentChar(); + continue; + } + + /* not in MIDDLE of quote or comment or white-space of any type ... */ + + if (isSequenceReached("//")) + { + if (currentLine[charNum+2] == '\xf2') // check for windows line marker + isAppendPostBlockEmptyLineRequested = false; + isInLineComment = true; + // do not indent if in column 1 or 2 + if (lineCommentNoIndent == false) + { + if (charNum == 0) + lineCommentNoIndent = true; + else if (charNum == 1 && currentLine[0] == ' ') + lineCommentNoIndent = true; + } + // move comment if spaces were added or deleted + if (lineCommentNoIndent == false && spacePadNum != 0) + adjustComments(); + formattedLineCommentNum = formattedLine.length(); + appendSequence(AS_OPEN_LINE_COMMENT); + goForward(1); + // explicitely break a line when a line comment's end is found. + if (charNum + 1 == (int) currentLine.length()) + { + isInLineBreak = true; + isInLineComment = false; + isImmediatelyPostLineComment = true; + currentChar = 0; //make sure it is a neutral char. + } + continue; + } + else if (isSequenceReached("/*")) + { + isInComment = true; + if (spacePadNum != 0) + adjustComments(); + formattedLineCommentNum = formattedLine.length(); + appendSequence(AS_OPEN_COMMENT); + goForward(1); + continue; + } + else if (currentChar == '"' || currentChar == '\'') + { + isInQuote = true; + quoteChar = currentChar; + appendCurrentChar(); + continue; + } + + /* not in quote or comment or white-space of any type ... */ + + // check if in preprocessor + // ** isInPreprocessor will be automatically reset at the begining + // of a new line in getnextChar() + if (currentChar == '#') + { + isInPreprocessor = true; + appendCurrentChar(); + continue; + } + + /* not in preprocessor ... */ + + if (isImmediatelyPostComment) + { + isImmediatelyPostComment = false; + isCharImmediatelyPostComment = true; + } + + if (isImmediatelyPostLineComment) + { + isImmediatelyPostLineComment = false; + isCharImmediatelyPostLineComment = true; + } + + if (shouldBreakLineAfterComments) + { + shouldBreakLineAfterComments = false; + shouldReparseCurrentChar = true; + breakLine(); + continue; + } + + // reset isImmediatelyPostHeader information + if (isImmediatelyPostHeader) + { + isImmediatelyPostHeader = false; + + // Make sure headers are broken from their succeeding blocks + // (e.g. + // if (isFoo) DoBar(); + // should become + // if (isFoo) + // DoBar; + // ) + // But treat else if() as a special case which should not be broken! + if (shouldBreakOneLineStatements) + { + // if may break 'else if()'s, then simply break the line + + if (shouldBreakElseIfs) + isInLineBreak = true; + } + } + + if (passedSemicolon) // need to break the formattedLine + { + passedSemicolon = false; + if (parenStack->back() == 0 && currentChar != ';') // allow ;; + { + // does a one-line statement have ending comments? + if (IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE)) + { + size_t blockEnd = currentLine.rfind(AS_CLOSE_BRACKET); + assert(blockEnd != string::npos); + // move ending comments to this formattedLine + if (isBeforeLineEndComment(blockEnd)) + { + size_t commentStart = currentLine.find_first_not_of(" \t", blockEnd + 1); + assert(commentStart != string::npos); + assert((currentLine.compare(commentStart, 2, "//") == 0) + || (currentLine.compare(commentStart, 2, "/*") == 0)); + size_t commentLength = currentLine.length() - commentStart; + int tabCount = getIndentLength(); + appendSpacePad(); + for (int i=1; iback() == 0 && !isBeforeComment()) + { + shouldReparseCurrentChar = true; + isInLineBreak = true; + continue; + } + } + + // Check if in template declaration, e.g. foo or foo + // If so, set isInTemplate to true + if (!isInTemplate && currentChar == '<') + { + int maxTemplateDepth = 0; + templateDepth = 0; + const string *oper; + for (size_t i = charNum; + i < currentLine.length(); + i += (oper ? oper->length() : 1)) + { + oper = ASBeautifier::findHeader(currentLine, i, operators); + + if (oper == &AS_LS) + { + templateDepth++; + maxTemplateDepth++; + } + else if (oper == &AS_GR) + { + templateDepth--; + if (templateDepth == 0) + { + // this is a template! + isInTemplate = true; + templateDepth = maxTemplateDepth; + break; + } + } + else if (oper == &AS_COMMA // comma, e.g. A + || oper == &AS_BIT_AND // reference, e.g. A + || oper == &AS_MULT // pointer, e.g. A + || oper == &AS_COLON_COLON) // ::, e.g. std::string + { + continue; + } + else if (!isLegalNameChar(currentLine[i]) && !isWhiteSpace(currentLine[i])) + { + // this is not a template -> leave... + isInTemplate = false; + break; + } + } + } + + // handle parenthesies + if (currentChar == '(' || currentChar == '[' || (isInTemplate && currentChar == '<')) + { + parenStack->back()++; + if (currentChar == '[') + isInBlParen = true; + } + else if (currentChar == ')' || currentChar == ']' || (isInTemplate && currentChar == '>')) + { + parenStack->back()--; + if (isInTemplate && currentChar == '>') + { + templateDepth--; + if (templateDepth == 0) + { + isInTemplate = false; + isCharImmediatelyPostTemplate = true; + } + } + + // check if this parenthesis closes a header, e.g. if (...), while (...) + if (isInHeader && parenStack->back() == 0) + { + isInHeader = false; + isImmediatelyPostHeader = true; + } + if (currentChar == ']') + isInBlParen = false; + if (currentChar == ')') + foundCastOperator = false; + } + + // handle brackets + if (currentChar == '{' || currentChar == '}') + { + if (currentChar == '{') + { + BracketType newBracketType = getBracketType(); + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + isInPotentialCalculation = false; + + bracketTypeStack->push_back(newBracketType); + preBracketHeaderStack->push_back(currentHeader); + currentHeader = NULL; + + isPreviousBracketBlockRelated = !IS_A(newBracketType, ARRAY_TYPE); + } + + // this must be done before the bracketTypeStack is popped + BracketType bracketType = bracketTypeStack->back(); + bool isOpeningArrayBracket = (IS_A(bracketType, ARRAY_TYPE) + && bracketTypeStack->size() >= 2 + && !IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], ARRAY_TYPE) + ); + + if (currentChar == '}') + { + // if a request has been made to append a post block empty line, + // but the block exists immediately before a closing bracket, + // then there is not need for the post block empty line. + // + isAppendPostBlockEmptyLineRequested = false; + + if (!bracketTypeStack->empty()) + { + previousBracketType = bracketTypeStack->back(); + bracketTypeStack->pop_back(); + isPreviousBracketBlockRelated = !IS_A(bracketType, ARRAY_TYPE); + } + + if (!preBracketHeaderStack->empty()) + { + currentHeader = preBracketHeaderStack->back(); + preBracketHeaderStack->pop_back(); + } + else + currentHeader = NULL; + } + + // format brackets + if (IS_A(bracketType, ARRAY_TYPE)) + formatArrayBrackets(bracketType, isOpeningArrayBracket); + else + formatBrackets(bracketType); + continue; + } + + if (((previousCommandChar == '{' && isPreviousBracketBlockRelated) + || (previousCommandChar == '}' + && bracketFormatMode != NONE_MODE + && !isImmediatelyPostEmptyBlock + && isPreviousBracketBlockRelated + && !isPreviousCharPostComment // Fixes wrongly appended newlines after '}' immediately after comments + && peekNextChar() != ' ' + && !IS_A(previousBracketType, DEFINITION_TYPE) + && !(ASBeautifier::isJavaStyle && currentChar == ')')) + && !IS_A(bracketTypeStack->back(), DEFINITION_TYPE)) + && (shouldBreakOneLineBlocks + || !IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE))) + { + isCharImmediatelyPostOpenBlock = (previousCommandChar == '{'); + isCharImmediatelyPostCloseBlock = (previousCommandChar == '}'); + + //if (bracketFormatMode != NONE_MODE) + //{ + previousCommandChar = ' '; + isInLineBreak = true; + //} + } + + // reset block handling flags + isImmediatelyPostEmptyBlock = false; + + // look for headers + if (!isInTemplate) + { + if ((newHeader = findHeader(headers)) != NULL) + { + foundClosingHeader = false; + const string *previousHeader; + + // recognize closing headers of do..while, if..else, try..catch..finally + if ((newHeader == &AS_ELSE && currentHeader == &AS_IF) + || (newHeader == &AS_WHILE && currentHeader == &AS_DO) + || (newHeader == &AS_CATCH && currentHeader == &AS_TRY) + || (newHeader == &AS_CATCH && currentHeader == &AS_CATCH) + || (newHeader == &AS_FINALLY && currentHeader == &AS_TRY) + || (newHeader == &AS_FINALLY && currentHeader == &AS_CATCH)) + foundClosingHeader = true; + + previousHeader = currentHeader; + currentHeader = newHeader; + + // If in ATTACH or LINUX bracket modes, attach closing headers (e.g. 'else', 'catch') + // to their preceding bracket, + // But do not perform the attachment if the shouldBreakClosingHeaderBrackets is set! + if (!shouldBreakClosingHeaderBrackets + && foundClosingHeader + && (bracketFormatMode == ATTACH_MODE || bracketFormatMode == BDAC_MODE) + && (shouldBreakOneLineBlocks || !IS_A(previousBracketType, SINGLE_LINE_TYPE)) + && previousNonWSChar == '}') + { + spacePadNum = 0; // don't count as padding + + size_t firstChar = formattedLine.find_first_not_of(" \t"); + if (firstChar != string::npos) // if a blank line does not preceed this + { + isInLineBreak = false; + appendSpacePad(); + } + + if (shouldBreakBlocks) + isAppendPostBlockEmptyLineRequested = false; + } + + // If NONE bracket mode, leave closing headers as they are (e.g. 'else', 'catch') + if (foundClosingHeader && bracketFormatMode == NONE_MODE && previousCommandChar == '}') + { + if (lineBeginsWith('}')) // is closing bracket broken? + { + isInLineBreak = false; + appendSpacePad(); + } + + if (shouldBreakBlocks) + isAppendPostBlockEmptyLineRequested = false; + } + + if (foundClosingHeader && bracketFormatMode == BREAK_MODE && previousCommandChar == '}') + breakLine(); + + //Check if a template definition as been reached, e.g. template + //if (newHeader == &AS_TEMPLATE) + //{ + // isInTemplate = true; + //} + + // check if the found header is non-paren header + isNonParenHeader = (find(nonParenHeaders.begin(), nonParenHeaders.end(), + newHeader) != nonParenHeaders.end()); + + appendSequence(*currentHeader); + goForward(currentHeader->length() - 1); + // if a paren-header is found add a space after it, if needed + // this checks currentLine, appendSpacePad() checks formattedLine + if (!isNonParenHeader && charNum < (int) currentLine.length() && !isWhiteSpace(currentLine[charNum+1])) + appendSpacePad(); + + // Signal that a header has been reached + // *** But treat a closing while() (as in do...while) + // as if it where NOT a header since a closing while() + // should never have a block after it! + if (!(foundClosingHeader && currentHeader == &AS_WHILE)) + { + isInHeader = true; + if (isNonParenHeader) + { + isImmediatelyPostHeader = true; + isInHeader = false; + } + } + + if (currentHeader == &AS_IF && previousHeader == &AS_ELSE) + isInLineBreak = false; + + if (shouldBreakBlocks) + { + if (previousHeader == NULL + && !foundClosingHeader + && !isCharImmediatelyPostOpenBlock) + { + isPrependPostBlockEmptyLineRequested = true; + } + + if (currentHeader == &AS_ELSE + || currentHeader == &AS_CATCH + || currentHeader == &AS_FINALLY + || foundClosingHeader) + { + isPrependPostBlockEmptyLineRequested = false; + } + + if (shouldBreakClosingHeaderBlocks + && isCharImmediatelyPostCloseBlock) + { + isPrependPostBlockEmptyLineRequested = true; + } + + } + + continue; + } + else if ((newHeader = findHeader(preDefinitionHeaders)) != NULL + && parenStack->back() == 0) + { + if (newHeader == &AS_NAMESPACE) + foundNamespaceHeader = true; + if (newHeader == &AS_CLASS) + foundClassHeader = true; + foundPreDefinitionHeader = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + if (shouldBreakBlocks) + isPrependPostBlockEmptyLineRequested = true; + + continue; + } + else if ((newHeader = findHeader(preCommandHeaders)) != NULL) + { + if (ASBeautifier::isJavaStyle + || (*newHeader == AS_CONST && previousCommandChar == ')') // 'const' member functions is a command bracket + || *newHeader == AS_EXTERN) + foundPreCommandHeader = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + continue; + } + else if ((newHeader = findHeader(castOperators)) != NULL) + { + foundCastOperator = true; + appendSequence(*newHeader); + goForward(newHeader->length() - 1); + + continue; + } + + } + + if (isInLineBreak) // OK to break line here + breakLine(); + + if (previousNonWSChar == '}' || currentChar == ';') + { + if (shouldBreakOneLineStatements && currentChar == ';' + && (shouldBreakOneLineBlocks || !IS_A(bracketTypeStack->back(), SINGLE_LINE_TYPE)) + //&& (! bracketFormatMode == NONE_MODE) + ) + { + passedSemicolon = true; + } + + if (shouldBreakBlocks && currentHeader != NULL && parenStack->back() == 0) + { + isAppendPostBlockEmptyLineRequested = true; + } + + if (currentChar != ';') + currentHeader = NULL; + + foundQuestionMark = false; + foundNamespaceHeader = false; + foundClassHeader = false; + foundPreDefinitionHeader = false; + foundPreCommandHeader = false; + foundCastOperator = false; + isInPotentialCalculation = false; + isNonInStatementArray = false; + } + + if (currentChar == ':' + && shouldBreakOneLineStatements + && !foundQuestionMark // not in a ... ? ... : ... sequence + && !foundPreDefinitionHeader // not in a definition block (e.g. class foo : public bar + && previousCommandChar != ')' // not immediately after closing paren of a method header, e.g. ASFormatter::ASFormatter(...) : ASBeautifier(...) + && previousChar != ':' // not part of '::' + && peekNextChar() != ':') // not part of '::' + { + passedColon = true; + if (shouldBreakBlocks) + isPrependPostBlockEmptyLineRequested = true; + } + + if (currentChar == '?') + foundQuestionMark = true; + + // determine if this is a potential calculation + newHeader = findHeader(operators); + + if (newHeader != NULL) + { + if (!isInPotentialCalculation) + { + if (find(assignmentOperators.begin(), assignmentOperators.end(), newHeader) + != assignmentOperators.end()) + { + char peekedChar = peekNextChar(); + isInPotentialCalculation = (newHeader != &AS_RETURN + && !(newHeader == &AS_EQUAL && peekedChar == '*') + && !(newHeader == &AS_EQUAL && peekedChar == '&')); + } + } + } + else + { + // the following are not calculations + if (currentLine.compare(charNum, 3, "new") == 0 && !isLegalNameChar(currentLine[charNum+3])) + isInPotentialCalculation = false; + } + + if (shouldPadOperators && newHeader != NULL) + { + padOperators(newHeader); + continue; + } + + if ((shouldPadParensOutside || shouldPadParensInside || shouldUnPadParens) + && (currentChar == '(' || currentChar == ')')) + { + padParens(); + continue; + } + + appendCurrentChar(); + } // end of while loop * end of while loop * end of while loop * end of while loop + + // return a beautified (i.e. correctly indented) line. + + string beautifiedLine; + size_t readyFormattedLineLength = trim(readyFormattedLine).length(); + + if (prependEmptyLine // prepend a blank line before this formatted line + && readyFormattedLineLength > 0 + && previousReadyFormattedLineLength > 0) + { + isLineReady = true; // signal that a readyFormattedLine is still waiting + beautifiedLine = beautify(""); + previousReadyFormattedLineLength = 0; + } + else // format the current formatted line + { + isLineReady = false; + beautifiedLine = beautify(readyFormattedLine); + previousReadyFormattedLineLength = readyFormattedLineLength; + lineCommentNoBeautify = lineCommentNoIndent; + lineCommentNoIndent = false; + if (appendOpeningBracket) // insert bracket after this formatted line + { + appendOpeningBracket = false; + isLineReady = true; // signal that a readyFormattedLine is still waiting + readyFormattedLine = "{"; + isPrependPostBlockEmptyLineRequested = false; // next line should not be empty + } + } + + prependEmptyLine = false; + enhance(beautifiedLine); // call the enhancer function + return beautifiedLine; +} + + +/** +* check if there are any indented lines ready to be read by nextLine() +* +* @return are there any indented lines ready? +*/ +bool ASFormatter::hasMoreLines() const +{ + return !endOfCodeReached; +} + +/** + * set the bracket formatting mode. + * options: + * astyle::NONE_MODE no formatting of brackets. + * astyle::ATTACH_MODE Java, K&R style bracket placement. + * astyle::BREAK_MODE ANSI C/C++ style bracket placement. + * + * @param mode the bracket formatting mode. + */ +void ASFormatter::setBracketFormatMode(BracketMode mode) +{ + bracketFormatMode = mode; +} + +/** + * set closing header bracket breaking mode + * options: + * true brackets just before closing headers (e.g. 'else', 'catch') + * will be broken, even if standard brackets are attached. + * false closing header brackets will be treated as standard brackets. + * + * @param state the closing header bracket breaking mode. + */ +void ASFormatter::setBreakClosingHeaderBracketsMode(bool state) +{ + shouldBreakClosingHeaderBrackets = state; +} + +/** + * set 'else if()' breaking mode + * options: + * true 'else' headers will be broken from their succeeding 'if' headers. + * false 'else' headers will be attached to their succeeding 'if' headers. + * + * @param state the 'else if()' breaking mode. + */ +void ASFormatter::setBreakElseIfsMode(bool state) +{ + shouldBreakElseIfs = state; +} + +/** + * set operator padding mode. + * options: + * true statement operators will be padded with spaces around them. + * false statement operators will not be padded. + * + * @param state the padding mode. + */ +void ASFormatter::setOperatorPaddingMode(bool state) +{ + shouldPadOperators = state; +} + +/** +* set parenthesis outside padding mode. +* options: +* true statement parenthesiss will be padded with spaces around them. +* false statement parenthesiss will not be padded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensOutsidePaddingMode(bool state) +{ + shouldPadParensOutside = state; +} + +/** +* set parenthesis inside padding mode. +* options: +* true statement parenthesis will be padded with spaces around them. +* false statement parenthesis will not be padded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensInsidePaddingMode(bool state) +{ + shouldPadParensInside = state; +} + +/** +* set parenthesis unpadding mode. +* options: +* true statement parenthesis will be unpadded with spaces removed around them. +* false statement parenthesis will not be unpadded. +* +* @param state the padding mode. +*/ +void ASFormatter::setParensUnPaddingMode(bool state) +{ + shouldUnPadParens = state; +} + +/** + * set option to break/not break one-line blocks + * + * @param state true = break, false = don't break. + */ +void ASFormatter::setBreakOneLineBlocksMode(bool state) +{ + shouldBreakOneLineBlocks = state; +} + +/** + * set option to break/not break lines consisting of multiple statements. + * + * @param state true = break, false = don't break. + */ +void ASFormatter::setSingleStatementsMode(bool state) +{ + shouldBreakOneLineStatements = state; +} + +/** + * set option to convert tabs to spaces. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setTabSpaceConversionMode(bool state) +{ + shouldConvertTabs = state; +} + + +/** + * set option to break unrelated blocks of code with empty lines. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setBreakBlocksMode(bool state) +{ + shouldBreakBlocks = state; +} + +/** + * set option to break closing header blocks of code (such as 'else', 'catch', ...) with empty lines. + * + * @param state true = convert, false = don't convert. + */ +void ASFormatter::setBreakClosingHeaderBlocksMode(bool state) +{ + shouldBreakClosingHeaderBlocks = state; +} + +/** + * jump over several characters. + * + * @param i the number of characters to jump over. + */ +void ASFormatter::goForward(int i) +{ + while (--i >= 0) + getNextChar(); +} + +/** +* peek at the next unread character. +* +* @return the next unread character. +*/ +char ASFormatter::peekNextChar() const +{ + char ch = ' '; + size_t peekNum = currentLine.find_first_not_of(" \t", charNum + 1); + + if (peekNum == string::npos) + return ch; + + ch = currentLine[peekNum]; + +// if (shouldConvertTabs && ch == '\t') +// ch = ' '; + + return ch; +} + +/** +* check if current placement is before a comment or line-comment +* +* @return is before a comment or line-comment. +*/ +bool ASFormatter::isBeforeComment() const +{ + bool foundComment = false; + size_t peekNum = currentLine.find_first_not_of(" \t", charNum + 1); + + if (peekNum == string::npos) + return foundComment; + + foundComment = (currentLine.compare(peekNum, 2, "/*") == 0 + || currentLine.compare(peekNum, 2, "//") == 0); + + return foundComment; +} + +/** +* check if current placement is before a comment or line-comment +* if a block comment it must be at the end of the line +* +* @return is before a comment or line-comment. +*/ +bool ASFormatter::isBeforeLineEndComment(int startPos) const +{ + bool foundLineEndComment = false; + size_t peekNum = currentLine.find_first_not_of(" \t", startPos + 1); + + if (peekNum != string::npos) + { + if (currentLine.compare(peekNum, 2, "//") == 0) + foundLineEndComment = true; + else if (currentLine.compare(peekNum, 2, "/*") == 0) + { + // comment must be closed on this line with nothing after it + size_t endNum = currentLine.find("*/", peekNum + 2); + if (endNum != string::npos) + if (currentLine.find_first_not_of(" \t", endNum + 2) == string::npos) + foundLineEndComment = true; + } + } + return foundLineEndComment; +} + + +/** +* get the next character, increasing the current placement in the process. +* the new character is inserted into the variable currentChar. +* +* @return whether succeded to recieve the new character. +*/ +bool ASFormatter::getNextChar() +{ + isInLineBreak = false; + previousChar = currentChar; + + if (!isWhiteSpace(currentChar)) + { + previousNonWSChar = currentChar; + if (!isInComment && !isInLineComment && !isInQuote + && !isImmediatelyPostComment + && !isImmediatelyPostLineComment + && !isSequenceReached("/*") + && !isSequenceReached("//")) + previousCommandChar = previousNonWSChar; + } + + int currentLineLength = currentLine.length(); + + if (charNum + 1 < currentLineLength + && (!isWhiteSpace(peekNextChar()) || isInComment || isInLineComment)) + { + currentChar = currentLine[++charNum]; + + if (shouldConvertTabs && currentChar == '\t') + currentChar = ' '; + + return true; + } + else // end of line has been reached + { + if (sourceIterator->hasMoreLines()) + { + currentLine = sourceIterator->nextLine(); + spacePadNum = 0; + inLineNumber++; + + if (currentLine.length() == 0) + { + currentLine = string(" "); // a null is inserted if this is not done + } + + // unless reading in the first line of the file, + // break a new line. + if (!isVirgin) + isInLineBreak = true; + else + isVirgin = false; + + if (isInLineComment) + isImmediatelyPostLineComment = true; + isInLineComment = false; + + // check if is in preprocessor before line trimming + isImmediatelyPostPreprocessor = isInPreprocessor; + if (previousNonWSChar != '\\') + isInPreprocessor = false; + + trimNewLine(); + currentChar = currentLine[charNum]; + + if (shouldConvertTabs && currentChar == '\t') + currentChar = ' '; + + return true; + } + else + { + endOfCodeReached = true; + return false; + } + } +} + +/** +* jump over the leading white space in the current line, +* IF the line does not begin a comment or is in a preprocessor definition. +*/ +void ASFormatter::trimNewLine() +{ + int len = currentLine.length(); + charNum = 0; + + if (isInComment || isInPreprocessor) + return; + + while (isWhiteSpace(currentLine[charNum]) && charNum + 1 < len) + ++charNum; + + doesLineStartComment = false; + if (isSequenceReached("/*")) + { + charNum = 0; + doesLineStartComment = true; + } +} + +/** + * append a character to the current formatted line. + * Unless disabled (via canBreakLine == false), first check if a + * line-break has been registered, and if so break the + * formatted line, and only then append the character into + * the next formatted line. + * + * @param ch the character to append. + * @param canBreakLine if true, a registered line-break + */ +void ASFormatter::appendChar(char ch, bool canBreakLine) +{ + if (canBreakLine && isInLineBreak) + breakLine(); + formattedLine.append(1, ch); +} + +/** + * append a string sequence to the current formatted line. + * Unless disabled (via canBreakLine == false), first check if a + * line-break has been registered, and if so break the + * formatted line, and only then append the sequence into + * the next formatted line. + * + * @param sequence the sequence to append. + * @param canBreakLine if true, a registered line-break + */ +void ASFormatter::appendSequence(const string &sequence, bool canBreakLine) +{ + if (canBreakLine && isInLineBreak) + breakLine(); + formattedLine.append(sequence); +} + +/** + * append a space to the current formattedline, UNLESS the + * last character is already a white-space character. + */ +void ASFormatter::appendSpacePad() +{ + int len = formattedLine.length(); + if (len > 0 && !isWhiteSpace(formattedLine[len-1])) + { + formattedLine.append(1, ' '); + spacePadNum++; + } +} + +/** + * append a space to the current formattedline, UNLESS the + * next character is already a white-space character. + */ +void ASFormatter::appendSpaceAfter() +{ + int len = currentLine.length(); + if (charNum + 1 < len && !isWhiteSpace(currentLine[charNum+1])) + { + formattedLine.append(1, ' '); + spacePadNum++; + } +} + +/** + * register a line break for the formatted line. + */ +void ASFormatter::breakLine() +{ + isLineReady = true; + isInLineBreak = false; + spacePadNum = 0; + formattedLineCommentNum = string::npos; + + // queue an empty line prepend request if one exists + prependEmptyLine = isPrependPostBlockEmptyLineRequested; + + readyFormattedLine = formattedLine; + if (isAppendPostBlockEmptyLineRequested) + { + isAppendPostBlockEmptyLineRequested = false; + isPrependPostBlockEmptyLineRequested = true; + } + else + { + isPrependPostBlockEmptyLineRequested = false; + } + + formattedLine = ""; +} + +/** + * check if the currently reached open-bracket (i.e. '{') + * opens a: + * - a definition type block (such as a class or namespace), + * - a command block (such as a method block) + * - a static array + * this method takes for granted that the current character + * is an opening bracket. + * + * @return the type of the opened block. + */ +BracketType ASFormatter::getBracketType() const +{ + BracketType returnVal; + + if (foundPreDefinitionHeader) + { + returnVal = DEFINITION_TYPE; + if (foundNamespaceHeader) + returnVal = (BracketType)(returnVal | NAMESPACE_TYPE); + else if (foundClassHeader) + returnVal = (BracketType)(returnVal | CLASS_TYPE); + } + else + { + bool isCommandType = false; + + if (previousNonWSChar != '=') + isCommandType = (foundPreCommandHeader + || (currentHeader != NULL && isNonParenHeader) + || (previousCommandChar == ')') + || (previousCommandChar == ':' && !foundQuestionMark) + || (previousCommandChar == ';') + || ((previousCommandChar == '{' || previousCommandChar == '}') + && isPreviousBracketBlockRelated)); + + returnVal = (isCommandType ? COMMAND_TYPE : ARRAY_TYPE); + } + + if (isOneLineBlockReached()) + returnVal = (BracketType)(returnVal | SINGLE_LINE_TYPE); + + TRbracket(returnVal); + return returnVal; +} + +/** + * check if the currently reached '*' or '&' character is + * a pointer-or-reference symbol, or another operator. + * this method takes for granted that the current character + * is either a '*' or '&'. + * + * @return whether current character is a reference-or-pointer + */ +bool ASFormatter::isPointerOrReference() const +{ + bool isPR; + isPR = (!isInPotentialCalculation + || IS_A(bracketTypeStack->back(), DEFINITION_TYPE) + || (!isLegalNameChar(previousNonWSChar) + && previousNonWSChar != ')' + && previousNonWSChar != ']') + ); + + if (!isPR) + { + char nextChar = peekNextChar(); + isPR |= (!isWhiteSpace(nextChar) + && nextChar != '-' + && nextChar != '(' + && nextChar != '[' + && !isLegalNameChar(nextChar)); + } + + return isPR; +} + + +/** + * check if the currently reached '-' character is + * a unary minus + * this method takes for granted that the current character + * is a '-'. + * + * @return whether the current '-' is a unary minus. + */ +bool ASFormatter::isUnaryMinus() const +{ + return ((previousOperator == &AS_RETURN || !isalnum(previousCommandChar)) + && previousCommandChar != '.' + && previousCommandChar != ')' + && previousCommandChar != ']'); +} + + +/** + * check if the currently reached '-' or '+' character is + * part of an exponent, i.e. 0.2E-5. + * this method takes for granted that the current character + * is a '-' or '+'. + * + * @return whether the current '-' is in an exponent. + */ +bool ASFormatter::isInExponent() const +{ + int formattedLineLength = formattedLine.length(); + if (formattedLineLength >= 2) + { + char prevPrevFormattedChar = formattedLine[formattedLineLength - 2]; + char prevFormattedChar = formattedLine[formattedLineLength - 1]; + + return ((prevFormattedChar == 'e' || prevFormattedChar == 'E') + && (prevPrevFormattedChar == '.' || isdigit(prevPrevFormattedChar))); + } + else + return false; +} + +/** + * check if a one-line bracket has been reached, + * i.e. if the currently reached '{' character is closed + * with a complimentry '}' elsewhere on the current line, + *. + * @return has a one-line bracket been reached? + */ +bool ASFormatter::isOneLineBlockReached() const +{ + bool isInComment = false; + bool isInQuote = false; + int bracketCount = 1; + int currentLineLength = currentLine.length(); + char quoteChar = ' '; + + for (int i = charNum + 1; i < currentLineLength; ++i) + { + char ch = currentLine[i]; + + if (isInComment) + { + if (currentLine.compare(i, 2, "*/") == 0) + { + isInComment = false; + ++i; + } + continue; + } + + if (ch == '\\') + { + ++i; + continue; + } + + if (isInQuote) + { + if (ch == quoteChar) + isInQuote = false; + continue; + } + + if (ch == '"' || ch == '\'') + { + isInQuote = true; + quoteChar = ch; + continue; + } + + if (currentLine.compare(i, 2, "//") == 0) + break; + + if (currentLine.compare(i, 2, "/*") == 0) + { + isInComment = true; + ++i; + continue; + } + + if (ch == '{') + ++bracketCount; + else if (ch == '}') + --bracketCount; + + if (bracketCount == 0) + return true; + } + + return false; +} + +/** + * check if one of a set of headers has been reached in the + * current position of the current line. + * + * @return a pointer to the found header. Or a NULL if no header has been reached. + * @param headers a vector of headers. + * @param checkBoundry + */ +const string *ASFormatter::findHeader(const vector &headers, bool checkBoundry) +{ + return ASBeautifier::findHeader(currentLine, charNum, headers, checkBoundry); +} + +/** + * check if a line begins with the specified character + * i.e. if the current line begins with a open bracket. + * + * @return true or false + */ +bool ASFormatter::lineBeginsWith(char charToCheck) const +{ + bool beginsWith = false; + size_t i = currentLine.find_first_not_of(" \t"); + + if (i != string::npos) + if (currentLine[i] == charToCheck && (int) i == charNum) + beginsWith = true; + + return beginsWith; +} + +/** + * adjust comment position because of adding or deleting spaces + * the spaces are added or deleted to formattedLine + * spacePadNum contains the adjustment + */ +void ASFormatter::adjustComments(void) +{ + assert(spacePadNum != 0); + assert(currentLine.compare(charNum, 2, "//") == 0 + || currentLine.compare(charNum, 2, "/*") == 0); + + + // block comment must be closed on this line with nothing after it + if (currentLine.compare(charNum, 2, "/*") == 0) + { + size_t endNum = currentLine.find("*/", charNum + 2); + if (endNum == string::npos) + return; + if (currentLine.find_first_not_of(" \t", endNum + 2) != string::npos) + return; + } + + size_t len = formattedLine.length(); + // if spaces were removed, need to add spaces before the comment + if (spacePadNum < 0) + { + int adjust = -spacePadNum; // make the number positive + if (formattedLine[len-1] != '\t') // don't adjust if a tab + formattedLine.append(adjust, ' '); +// else // comment out to avoid compiler warning +// adjust = 0; +// TRcomment(adjust); // trace macro + } + // if spaces were added, need to delete spaces before the comment, if possible + else if (spacePadNum > 0) + { + int adjust = spacePadNum; + if (formattedLine.find_last_not_of(' ') < len - adjust - 1 + && formattedLine[len-1] != '\t') // don't adjust a tab + formattedLine.resize(len - adjust); + // the following are commented out to avoid a Borland compiler warning + //else + // adjust = 0; + TRcomment(-adjust); // trace macro + } +} + +/** + * append the current bracket inside the end of line comments + * currentChar contains the bracket, it will be appended to formattedLine + * formattedLineCommentNum is the comment location on formattedLine + */ +void ASFormatter::appendCharInsideComments(void) +{ + if (formattedLineCommentNum == string::npos // does the comment start on the previous line? + || isBeforeComment()) // does a comment follow on this line? + { + appendCurrentChar(true); // don't attach + return; + } + assert(formattedLine.compare(formattedLineCommentNum, 2, "//") == 0 + || formattedLine.compare(formattedLineCommentNum, 2, "/*") == 0); + + // find the previous non space char + size_t end = formattedLineCommentNum; + size_t beg = formattedLine.find_last_not_of(" \t", end-1); + if (beg == string::npos) // is the previous line comment only? + { + appendCurrentChar(true); // don't attach + return; + } + beg++; + + // insert the bracket + if (end - beg < 3) // is there room to insert? + formattedLine.insert(beg, 3-end+beg, ' '); + if (formattedLine[beg] == '\t') // don't pad with a tab + formattedLine.insert(beg, 1, ' '); + formattedLine[beg+1] = currentChar; +} + +/** + * add or remove space padding to operators + * currentChar contains the paren + * the operators and necessary padding will be appended to formattedLine + * the calling function should have a continue statement after calling this method + * + * @param *newOperator the operator to be padded + */ +void ASFormatter::padOperators(const string *newOperator) +{ + assert (shouldPadOperators); + assert(newOperator != NULL); + + bool shouldPad = (newOperator != &AS_COLON_COLON + && newOperator != &AS_PAREN_PAREN + && newOperator != &AS_BLPAREN_BLPAREN + && newOperator != &AS_PLUS_PLUS + && newOperator != &AS_MINUS_MINUS + && newOperator != &AS_NOT + && newOperator != &AS_BIT_NOT + && newOperator != &AS_ARROW + && newOperator != &AS_OPERATOR + && newOperator != &AS_RETURN + && !(newOperator == &AS_MINUS && isInExponent()) + && !(newOperator == &AS_MINUS // check for negative number + && (previousNonWSChar == '(' + || previousNonWSChar == '=' + || previousNonWSChar == ',')) + && !(newOperator == &AS_PLUS && isInExponent()) + && previousOperator != &AS_OPERATOR + && !((newOperator == &AS_MULT || newOperator == &AS_BIT_AND) + && isPointerOrReference()) + && !(newOperator == &AS_MULT + && (previousNonWSChar == '.' + || previousNonWSChar == '>')) // check for -> + && !((isInTemplate || isCharImmediatelyPostTemplate) + && (newOperator == &AS_LS || newOperator == &AS_GR)) + ); + // pad before operator + if (shouldPad + && !isInBlParen + && !(newOperator == &AS_COLON && !foundQuestionMark) + && newOperator != &AS_SEMICOLON + && newOperator != &AS_COMMA) + appendSpacePad(); + appendSequence(*newOperator); + goForward(newOperator->length() - 1); + + // since this block handles '()' and '[]', + // the parenStack must be updated here accordingly! + if (newOperator == &AS_PAREN_PAREN + || newOperator == &AS_BLPAREN_BLPAREN) + parenStack->back()--; + + currentChar = (*newOperator)[newOperator->length() - 1]; + // pad after operator + // but do not pad after a '-' that is a unary-minus. + if (shouldPad + && !isInBlParen + && !isBeforeComment() + && !(newOperator == &AS_MINUS && isUnaryMinus()) + && !(currentLine.compare(charNum + 1, 1, ";") == 0) + && !(currentLine.compare(charNum + 1, 2, "::") == 0)) + appendSpaceAfter(); + + previousOperator = newOperator; + return; +} + +/** + * add or remove space padding to parens + * currentChar contains the paren + * the parens and necessary padding will be appended to formattedLine + * the calling function should have a continue statement after calling this method + */ +void ASFormatter::padParens(void) +{ + assert(shouldPadParensOutside || shouldPadParensInside || shouldUnPadParens); + assert (currentChar == '(' || currentChar == ')'); + + if (currentChar == '(') + { + int spacesOutsideToDelete = formattedLine.length() - 1; + int spacesInsideToDelete = 0; + + // compute spaces outside the opening paren to delete + if (shouldUnPadParens) + { + char lastChar = ' '; + bool prevIsParenHeader = false; + size_t i = formattedLine.find_last_not_of(" \t"); + if (i != string::npos) + { + size_t end = i; + spacesOutsideToDelete -= i; + lastChar = formattedLine[i]; + // was last word a paren header? + int start; // start of the previous word + for (start = i; start > 0; start--) + { + if (isLegalNameChar(formattedLine[start]) || formattedLine[start] == '*') + continue; + start++; + break; + } + string prevWord = formattedLine.substr(start, end-start+1); + // if previous word is a header, it will be a paren header + const string *prevWordH = ASBeautifier::findHeader(formattedLine, start, headers); + if (prevWordH != NULL) + { + prevIsParenHeader = true; + TRxtra(*prevWordH); // trace macro + } + else if (prevWord == "return" // don't unpad return statements + || prevWord == "*") // don't unpad multiply or pointer + { + prevIsParenHeader = true; + TRxtra(prevWord); // trace macro + } + // don't unpad variables + else if (prevWord == "bool" + || prevWord == "int" + || prevWord == "void" + || prevWord == "void*" + || (prevWord.length() >= 6 // check end of word for _t + && prevWord.compare(prevWord.length()-2, 2, "_t") == 0) + || prevWord == "BOOL" + || prevWord == "DWORD" + || prevWord == "HWND" + || prevWord == "INT" + || prevWord == "LPSTR" + || prevWord == "VOID" + || prevWord == "LPVOID" + ) + { + prevIsParenHeader = true; + TRxtra(prevWord); // trace macro + } + } + // do not unpad operators, but leave them if already padded + if (shouldPadParensOutside || prevIsParenHeader) + spacesOutsideToDelete--; + else if (lastChar == '|' // check for || + || lastChar == '&' // check for && + || lastChar == ',' + || (lastChar == '>' && !foundCastOperator) + || lastChar == '<' + || lastChar == '?' + || lastChar == ':' + || lastChar == ';' + || lastChar == '=' + || lastChar == '+' + || lastChar == '-' + || (lastChar == '*' && isInPotentialCalculation) + || lastChar == '/' + || lastChar == '%') + spacesOutsideToDelete--; + + if (spacesOutsideToDelete > 0) + { + formattedLine.erase(i + 1, spacesOutsideToDelete); + spacePadNum -= spacesOutsideToDelete; + } + } + + // pad open paren outside + char peekedCharOutside = peekNextChar(); + if (shouldPadParensOutside) + if (!(currentChar == '(' && peekedCharOutside == ')')) + appendSpacePad(); + + appendCurrentChar(); + + // unpad open paren inside + if (shouldUnPadParens) + { + size_t j = currentLine.find_first_not_of(" \t", charNum + 1); + if (j != string::npos) + spacesInsideToDelete = j - charNum - 1; + if (shouldPadParensInside) + spacesInsideToDelete--; + if (spacesInsideToDelete > 0) + { + currentLine.erase(charNum + 1, spacesInsideToDelete); + spacePadNum -= spacesInsideToDelete; + } + } + + // pad open paren inside + char peekedCharInside = peekNextChar(); + if (shouldPadParensInside) + if (!(currentChar == '(' && peekedCharInside == ')')) + appendSpaceAfter(); + + TRunpad('(', spacesOutsideToDelete, spacesInsideToDelete); // trace macro + } + else if (currentChar == ')' /*|| currentChar == ']'*/) + { + int spacesOutsideToDelete = 0; + int spacesInsideToDelete = formattedLine.length(); + + // unpad close paren inside + if (shouldUnPadParens) + { + size_t i = formattedLine.find_last_not_of(" \t"); + if (i != string::npos) + spacesInsideToDelete = formattedLine.length() - 1 - i; + if (shouldPadParensInside) + spacesInsideToDelete--; + if (spacesInsideToDelete > 0) + { + formattedLine.erase(i + 1, spacesInsideToDelete); + spacePadNum -= spacesInsideToDelete; + } + } + + // pad close paren inside + if (shouldPadParensInside) + if (!(previousChar == '(' && currentChar == ')')) + appendSpacePad(); + + appendCurrentChar(); + + // unpad close paren outside + if (shouldUnPadParens) + { + // may have end of line comments + size_t j = currentLine.find_first_not_of(" \t", charNum + 1); + if (j != string::npos) + if (currentLine[j] == '[' || currentLine[j] == ']') + spacesOutsideToDelete = j - charNum - 1; + if (shouldPadParensOutside) + spacesOutsideToDelete--; +// spacesOutsideToDelete--; // always leave 1 space + + if (spacesOutsideToDelete > 0) + { + currentLine.erase(charNum + 1, spacesOutsideToDelete); + spacePadNum -= spacesOutsideToDelete; + } + } + + // pad close paren outside + char peekedCharOutside = peekNextChar(); + if (shouldPadParensOutside) + if (peekedCharOutside != ';' + && peekedCharOutside != ',' + && peekedCharOutside != '.' + && peekedCharOutside != '-') // check for -> +// && !(currentChar == ']' && peekedCharOutside == '[')) + appendSpaceAfter(); + + TRunpad(')', spacesInsideToDelete, 0 /*spacesOutsideToDelete*/); // trace macro + } + return; +} + +/** + * format brackets as attached or broken + * currentChar contains the bracket + * the brackets will be appended to the current formattedLine or a new formattedLine as necessary + * the calling function should have a continue statement after calling this method + * + * @param bracketType the type of bracket to be formatted. + */ +void ASFormatter::formatBrackets(BracketType bracketType) +{ + assert(!IS_A(bracketType, ARRAY_TYPE)); + assert (currentChar == '{' || currentChar == '}'); + + if (currentChar == '{') + { + parenStack->push_back(0); + } + else if (currentChar == '}') + { + if (!parenStack->empty()) + { + parenStack->pop_back(); + } + } + + if (currentChar == '{') + { + bool bdacBreak = false; + // should a Linux bracket be broken? + if (bracketFormatMode == BDAC_MODE) + { + // always break a class + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], CLASS_TYPE)) + bdacBreak = true; + // break a namespace and the first bracket if a function + else if (bracketTypeStack->size() <= 2) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], NAMESPACE_TYPE) + || IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + // break the first bracket after a namespace if a function + else if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], NAMESPACE_TYPE)) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + // if not C style then break the first bracket after a class if a function + else if (!ASBeautifier::isCStyle) + { + if (IS_A((*bracketTypeStack)[bracketTypeStack->size()-2], CLASS_TYPE) + && IS_A((*bracketTypeStack)[bracketTypeStack->size()-1], COMMAND_TYPE)) + bdacBreak = true; + } + } + if (bracketFormatMode == ATTACH_MODE + || (bracketFormatMode == BDAC_MODE && !bdacBreak)) + { + // are there comments before the bracket? + if (isCharImmediatelyPostComment || isCharImmediatelyPostLineComment) + { + if ((shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) + && peekNextChar() != '}') + appendCharInsideComments(); + else + appendCurrentChar(true); // don't attach + } + else if (previousCommandChar == '{' + || previousCommandChar == '}' + || previousCommandChar == ';') // '}' , ';' chars added for proper handling of '{' immediately after a '}' or ';' + { + appendCurrentChar(true); // don't attach + } + else + { + size_t firstChar = formattedLine.find_first_not_of(" \t"); + if (firstChar == string::npos) // if a blank line preceeds this + appendCurrentChar(true); // don't attach + else if (shouldBreakOneLineBlocks + || !IS_A(bracketType, SINGLE_LINE_TYPE) + || peekNextChar() == '}') + { + appendSpacePad(); + appendCurrentChar(false); // OK to attach + } + else + appendCurrentChar(true); // don't attach + } + } + else if (bracketFormatMode == BREAK_MODE + || (bracketFormatMode == BDAC_MODE && bdacBreak)) + { + if (isBeforeComment()) + { + // do not break unless comment is at line end + if (isBeforeLineEndComment(charNum)) + { + currentChar = ' '; // remove bracket from current line + appendOpeningBracket = true; // append bracket to following line + } + } + else if (!IS_A(bracketType, SINGLE_LINE_TYPE)) + breakLine(); + else if (shouldBreakOneLineBlocks && peekNextChar() != '}') + breakLine(); + + appendCurrentChar(); + } + else if (bracketFormatMode == NONE_MODE) + { + if (lineBeginsWith('{')) // is opening bracket broken? + appendCurrentChar(true); + else + appendCurrentChar(false); + } + } + else if (currentChar == '}') + { + // mark state of immediately after empty block + // this state will be used for locating brackets that appear immedately AFTER an empty block (e.g. '{} \n}'). + if (previousCommandChar == '{') + isImmediatelyPostEmptyBlock = true; + + if ((!(previousCommandChar == '{' && isPreviousBracketBlockRelated)) // this '{' does not close an empty block + && (shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) // astyle is allowed to break on line blocks + && (!(bracketFormatMode == NONE_MODE && IS_A(bracketType, SINGLE_LINE_TYPE))) + && !isImmediatelyPostEmptyBlock) // this '}' does not immediately follow an empty block + { + breakLine(); + appendCurrentChar(); + } + else + { + if (!isCharImmediatelyPostComment + && !bracketFormatMode == NONE_MODE + && !isImmediatelyPostEmptyBlock) + isInLineBreak = false; + + appendCurrentChar(); + + //if (!bracketFormatMode == NONE_MODE) + // if ((shouldBreakOneLineBlocks || !IS_A(bracketType, SINGLE_LINE_TYPE)) + // && !(currentChar == '}' && peekNextChar() == ';')) // fixes }; placed on separate lines + // shouldBreakLineAfterComments = true; + } + + if (shouldBreakBlocks) + { + isAppendPostBlockEmptyLineRequested = true; + } + } + return; +} + +/** + * format array brackets as attached or broken + * determine if the brackets can have an inStatement indent + * currentChar contains the bracket + * the brackets will be appended to the current formattedLine or a new formattedLine as necessary + * the calling function should have a continue statement after calling this method + * + * @param bracketType the type of bracket to be formatted, must be an ARRAY_TYPE. + * @param isOpeningArrayBracket indicates if this is the opening bracket for the array block. + */ +void ASFormatter::formatArrayBrackets(BracketType bracketType, bool isOpeningArrayBracket) +{ + assert(IS_A(bracketType, ARRAY_TYPE)); + assert (currentChar == '{' || currentChar == '}'); + + if (currentChar == '{') + { + // is this the first opening bracket in the array? + if (isOpeningArrayBracket) + { + if (bracketFormatMode == ATTACH_MODE || bracketFormatMode == BDAC_MODE) + { + // don't attach to a preprocessor directive + if (isImmediatelyPostPreprocessor) + appendCurrentChar(true); // don't attach + // are there comments before the bracket? + else if (isCharImmediatelyPostComment || isCharImmediatelyPostLineComment) + { + appendCharInsideComments(); + } + else + { + // if bracket is broken or not an assignment + if (lineBeginsWith('{') || previousNonWSChar != '=') + appendSpacePad(); + appendCurrentChar(false); // OK to attach + } + } + else if (bracketFormatMode == BREAK_MODE) + { + if (isWhiteSpace(peekNextChar())) + breakLine(); + else if (isBeforeComment()) + { + // do not break unless comment is at line end + if (isBeforeLineEndComment(charNum)) + { + currentChar = ' '; // remove bracket from current line + appendOpeningBracket = true; // append bracket to following line + } + } + appendCurrentChar(); + } + else if (bracketFormatMode == NONE_MODE) + { + if (lineBeginsWith('{')) // is opening bracket broken? + appendCurrentChar(); + else + appendCurrentChar(false); + } + } + else + appendCurrentChar(); // not the first opening bracket - don't change + + // if an opening bracket ends the line there will be no inStatement indent + char nextChar = peekNextChar(); + if (isWhiteSpace(nextChar) + || isBeforeLineEndComment(charNum) + || nextChar == '{') + isNonInStatementArray = true; + if (isNonInStatementArray) + TRarray('x'); + else + TRarray(' '); + + } + else if (currentChar == '}') + { + // does this close the first opening bracket in the array? + if (isOpeningArrayBracket && !IS_A(bracketType, SINGLE_LINE_TYPE) ) + { + breakLine(); + appendCurrentChar(); + } + else + appendCurrentChar(); + } +} + + +} // end namespace astyle diff --git a/sdk/astyle/src/ASResource.cpp b/sdk/astyle/src/ASResource.cpp new file mode 100644 index 0000000000..d27cbdc610 --- /dev/null +++ b/sdk/astyle/src/ASResource.cpp @@ -0,0 +1,389 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * ASResource.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + + +namespace astyle +{ +const string ASResource::AS_IF = string("if"); +const string ASResource::AS_ELSE = string("else"); +const string ASResource::AS_FOR = string("for"); +const string ASResource::AS_DO = string("do"); +const string ASResource::AS_WHILE = string("while"); +const string ASResource::AS_SWITCH = string("switch"); +const string ASResource::AS_CASE = string("case"); +const string ASResource::AS_DEFAULT = string("default"); +const string ASResource::AS_CLASS = string("class"); +const string ASResource::AS_STRUCT = string("struct"); +const string ASResource::AS_UNION = string("union"); +const string ASResource::AS_INTERFACE = string("interface"); +const string ASResource::AS_NAMESPACE = string("namespace"); +const string ASResource::AS_EXTERN = string("extern"); +const string ASResource::AS_PUBLIC = string("public"); +const string ASResource::AS_PROTECTED = string("protected"); +const string ASResource::AS_PRIVATE = string("private"); +const string ASResource::AS_STATIC = string("static"); +const string ASResource::AS_SYNCHRONIZED = string("synchronized"); +const string ASResource::AS_OPERATOR = string("operator"); +const string ASResource::AS_TEMPLATE = string("template"); +const string ASResource::AS_TRY = string("try"); +const string ASResource::AS_CATCH = string("catch"); +const string ASResource::AS_FINALLY = string("finally"); +const string ASResource::AS_THROWS = string("throws"); +const string ASResource::AS_CONST = string("const"); + +const string ASResource::AS_ASM = string("asm"); + +const string ASResource::AS_BAR_DEFINE = string("#define"); +const string ASResource::AS_BAR_INCLUDE = string("#include"); +const string ASResource::AS_BAR_IF = string("#if"); +const string ASResource::AS_BAR_EL = string("#el"); +const string ASResource::AS_BAR_ENDIF = string("#endif"); + +const string ASResource::AS_OPEN_BRACKET = string("{"); +const string ASResource::AS_CLOSE_BRACKET = string("}"); +const string ASResource::AS_OPEN_LINE_COMMENT = string("//"); +const string ASResource::AS_OPEN_COMMENT = string("/*"); +const string ASResource::AS_CLOSE_COMMENT = string("*/"); + +const string ASResource::AS_ASSIGN = string("="); +const string ASResource::AS_PLUS_ASSIGN = string("+="); +const string ASResource::AS_MINUS_ASSIGN = string("-="); +const string ASResource::AS_MULT_ASSIGN = string("*="); +const string ASResource::AS_DIV_ASSIGN = string("/="); +const string ASResource::AS_MOD_ASSIGN = string("%="); +const string ASResource::AS_OR_ASSIGN = string("|="); +const string ASResource::AS_AND_ASSIGN = string("&="); +const string ASResource::AS_XOR_ASSIGN = string("^="); +const string ASResource::AS_GR_GR_ASSIGN = string(">>="); +const string ASResource::AS_LS_LS_ASSIGN = string("<<="); +const string ASResource::AS_GR_GR_GR_ASSIGN = string(">>>="); +const string ASResource::AS_LS_LS_LS_ASSIGN = string("<<<="); +const string ASResource::AS_RETURN = string("return"); + +const string ASResource::AS_EQUAL = string("=="); +const string ASResource::AS_PLUS_PLUS = string("++"); +const string ASResource::AS_MINUS_MINUS = string("--"); +const string ASResource::AS_NOT_EQUAL = string("!="); +const string ASResource::AS_GR_EQUAL = string(">="); +const string ASResource::AS_GR_GR = string(">>"); +const string ASResource::AS_GR_GR_GR = string(">>>"); +const string ASResource::AS_LS_EQUAL = string("<="); +const string ASResource::AS_LS_LS = string("<<"); +const string ASResource::AS_LS_LS_LS = string("<<<"); +const string ASResource::AS_ARROW = string("->"); +const string ASResource::AS_AND = string("&&"); +const string ASResource::AS_OR = string("||"); +const string ASResource::AS_COLON_COLON = string("::"); +const string ASResource::AS_PAREN_PAREN = string("()"); +const string ASResource::AS_BLPAREN_BLPAREN = string("[]"); + +const string ASResource::AS_PLUS = string("+"); +const string ASResource::AS_MINUS = string("-"); +const string ASResource::AS_MULT = string("*"); +const string ASResource::AS_DIV = string("/"); +const string ASResource::AS_MOD = string("%"); +const string ASResource::AS_GR = string(">"); +const string ASResource::AS_LS = string("<"); +const string ASResource::AS_NOT = string("!"); +const string ASResource::AS_BIT_OR = string("|"); +const string ASResource::AS_BIT_AND = string("&"); +const string ASResource::AS_BIT_NOT = string("~"); +const string ASResource::AS_BIT_XOR = string("^"); +const string ASResource::AS_QUESTION = string("?"); +const string ASResource::AS_COLON = string(":"); +const string ASResource::AS_COMMA = string(","); +const string ASResource::AS_SEMICOLON = string(";"); + +const string ASResource::AS_FOREACH = string("foreach"); +const string ASResource::AS_LOCK = string("lock"); +const string ASResource::AS_UNSAFE = string("unsafe"); +const string ASResource::AS_FIXED = string("fixed"); +const string ASResource::AS_GET = string("get"); +const string ASResource::AS_SET = string("set"); +const string ASResource::AS_ADD = string("add"); +const string ASResource::AS_REMOVE = string("remove"); + +const string ASResource::AS_CONST_CAST = string("const_cast"); +const string ASResource::AS_DYNAMIC_CAST = string("dynamic_cast"); +const string ASResource::AS_REINTERPRET_CAST = string("reinterpret_cast"); +const string ASResource::AS_STATIC_CAST = string("static_cast"); + + +/** + * Build the vector of assignment operators. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param assignmentOperators a reference to the vector to be built. + */ +void ASResource::buildAssignmentOperators(vector &assignmentOperators) +{ + assignmentOperators.push_back(&AS_ASSIGN); + assignmentOperators.push_back(&AS_PLUS_ASSIGN); + assignmentOperators.push_back(&AS_MINUS_ASSIGN); + assignmentOperators.push_back(&AS_MULT_ASSIGN); + assignmentOperators.push_back(&AS_DIV_ASSIGN); + assignmentOperators.push_back(&AS_MOD_ASSIGN); + assignmentOperators.push_back(&AS_OR_ASSIGN); + assignmentOperators.push_back(&AS_AND_ASSIGN); + assignmentOperators.push_back(&AS_XOR_ASSIGN); + + // Java + assignmentOperators.push_back(&AS_GR_GR_GR_ASSIGN); + assignmentOperators.push_back(&AS_GR_GR_ASSIGN); + assignmentOperators.push_back(&AS_LS_LS_ASSIGN); + + // Unknown + assignmentOperators.push_back(&AS_LS_LS_LS_ASSIGN); + + assignmentOperators.push_back(&AS_RETURN); +} + +/** + * Build the vector of C++ cast operators. + * Used by ONLY ASFormatter.cpp + * + * @param castOperators a reference to the vector to be built. + */ +void ASResource::buildCastOperators(vector &castOperators) +{ + castOperators.push_back(&AS_CONST_CAST); + castOperators.push_back(&AS_DYNAMIC_CAST); + castOperators.push_back(&AS_REINTERPRET_CAST); + castOperators.push_back(&AS_STATIC_CAST); +} + +/** + * Build the vector of header words. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param headers a reference to the vector to be built. + */ +void ASResource::buildHeaders(vector &headers, int fileType, bool beautifier) +{ + headers.push_back(&AS_IF); + headers.push_back(&AS_ELSE); + headers.push_back(&AS_FOR); + headers.push_back(&AS_WHILE); + headers.push_back(&AS_DO); + headers.push_back(&AS_SWITCH); + headers.push_back(&AS_TRY); + headers.push_back(&AS_CATCH); + + if (beautifier) + { + headers.push_back(&AS_CASE); + headers.push_back(&AS_DEFAULT); + headers.push_back(&AS_CONST); + headers.push_back(&AS_STATIC); + headers.push_back(&AS_EXTERN); + headers.push_back(&AS_TEMPLATE); + } + + if (fileType == JAVA_TYPE) + { + headers.push_back(&AS_FINALLY); + headers.push_back(&AS_SYNCHRONIZED); + } + + if (fileType == SHARP_TYPE) + { + headers.push_back(&AS_FINALLY); + headers.push_back(&AS_FOREACH); + headers.push_back(&AS_LOCK); + headers.push_back(&AS_UNSAFE); + headers.push_back(&AS_FIXED); + headers.push_back(&AS_GET); + headers.push_back(&AS_SET); + headers.push_back(&AS_ADD); + headers.push_back(&AS_REMOVE); + } +} + +/** + * Build the vector of non-assignment operators. + * Used by ONLY ASBeautifier.cpp + * + * @param nonParenHeaders a reference to the vector to be built. + */ +void ASResource::buildNonAssignmentOperators(vector &nonAssignmentOperators) +{ + nonAssignmentOperators.push_back(&AS_EQUAL); + nonAssignmentOperators.push_back(&AS_PLUS_PLUS); + nonAssignmentOperators.push_back(&AS_MINUS_MINUS); + nonAssignmentOperators.push_back(&AS_NOT_EQUAL); + nonAssignmentOperators.push_back(&AS_GR_EQUAL); + nonAssignmentOperators.push_back(&AS_GR_GR_GR); + nonAssignmentOperators.push_back(&AS_GR_GR); + nonAssignmentOperators.push_back(&AS_LS_EQUAL); + nonAssignmentOperators.push_back(&AS_LS_LS_LS); + nonAssignmentOperators.push_back(&AS_LS_LS); + nonAssignmentOperators.push_back(&AS_ARROW); + nonAssignmentOperators.push_back(&AS_AND); + nonAssignmentOperators.push_back(&AS_OR); +} + +/** + * Build the vector of header non-paren headers. + * Used by BOTH ASFormatter.cpp and ASBeautifier.cpp + * + * @param nonParenHeaders a reference to the vector to be built. + */ +void ASResource::buildNonParenHeaders(vector &nonParenHeaders, int fileType, bool beautifier) +{ + nonParenHeaders.push_back(&AS_ELSE); + nonParenHeaders.push_back(&AS_DO); + nonParenHeaders.push_back(&AS_TRY); + + if (beautifier) + { + nonParenHeaders.push_back(&AS_CASE); + nonParenHeaders.push_back(&AS_DEFAULT); + nonParenHeaders.push_back(&AS_CONST); + nonParenHeaders.push_back(&AS_STATIC); + nonParenHeaders.push_back(&AS_EXTERN); + nonParenHeaders.push_back(&AS_TEMPLATE); + } + + if (fileType == JAVA_TYPE) + { + nonParenHeaders.push_back(&AS_FINALLY); + } + + if (fileType == SHARP_TYPE) + { + nonParenHeaders.push_back(&AS_FINALLY); + nonParenHeaders.push_back(&AS_UNSAFE); + nonParenHeaders.push_back(&AS_GET); + nonParenHeaders.push_back(&AS_SET); + nonParenHeaders.push_back(&AS_ADD); + nonParenHeaders.push_back(&AS_REMOVE); + } +} + +/** + * Build the vector of operators. + * Used by ONLY ASFormatter.cpp + * + * @param operators a reference to the vector to be built. + */ +void ASResource::buildOperators(vector &operators) +{ + operators.push_back(&AS_PLUS_ASSIGN); + operators.push_back(&AS_MINUS_ASSIGN); + operators.push_back(&AS_MULT_ASSIGN); + operators.push_back(&AS_DIV_ASSIGN); + operators.push_back(&AS_MOD_ASSIGN); + operators.push_back(&AS_OR_ASSIGN); + operators.push_back(&AS_AND_ASSIGN); + operators.push_back(&AS_XOR_ASSIGN); + operators.push_back(&AS_EQUAL); + operators.push_back(&AS_PLUS_PLUS); + operators.push_back(&AS_MINUS_MINUS); + operators.push_back(&AS_NOT_EQUAL); + operators.push_back(&AS_GR_EQUAL); + operators.push_back(&AS_GR_GR_GR_ASSIGN); + operators.push_back(&AS_GR_GR_ASSIGN); + operators.push_back(&AS_GR_GR_GR); + operators.push_back(&AS_GR_GR); + operators.push_back(&AS_LS_EQUAL); + operators.push_back(&AS_LS_LS_LS_ASSIGN); + operators.push_back(&AS_LS_LS_ASSIGN); + operators.push_back(&AS_LS_LS_LS); + operators.push_back(&AS_LS_LS); + operators.push_back(&AS_ARROW); + operators.push_back(&AS_AND); + operators.push_back(&AS_OR); + operators.push_back(&AS_COLON_COLON); + operators.push_back(&AS_PLUS); + operators.push_back(&AS_MINUS); + operators.push_back(&AS_MULT); + operators.push_back(&AS_DIV); + operators.push_back(&AS_MOD); + operators.push_back(&AS_QUESTION); + operators.push_back(&AS_COLON); + operators.push_back(&AS_ASSIGN); + operators.push_back(&AS_LS); + operators.push_back(&AS_GR); + operators.push_back(&AS_NOT); + operators.push_back(&AS_BIT_OR); + operators.push_back(&AS_BIT_AND); + operators.push_back(&AS_BIT_NOT); + operators.push_back(&AS_BIT_XOR); + operators.push_back(&AS_OPERATOR); + operators.push_back(&AS_COMMA); + operators.push_back(&AS_RETURN); +} + +/** + * Build the vector of pre-block statements. + * Used by ONLY ASBeautifier.cpp + * + * @param preBlockStatements a reference to the vector to be built. + */ +void ASResource::buildPreBlockStatements(vector &preBlockStatements) +{ + preBlockStatements.push_back(&AS_CLASS); + preBlockStatements.push_back(&AS_STRUCT); + preBlockStatements.push_back(&AS_UNION); + preBlockStatements.push_back(&AS_INTERFACE); + preBlockStatements.push_back(&AS_NAMESPACE); + preBlockStatements.push_back(&AS_THROWS); + preBlockStatements.push_back(&AS_EXTERN); +} + +/** + * Build the vector of pre-command headers. + * Used by ONLY ASFormatter.cpp + * + * @param preCommandHeaders a reference to the vector to be built. + */ +void ASResource::buildPreCommandHeaders(vector &preCommandHeaders) +{ + preCommandHeaders.push_back(&AS_EXTERN); + preCommandHeaders.push_back(&AS_THROWS); + preCommandHeaders.push_back(&AS_CONST); +} + +/** + * Build the vector of pre-definition headers. + * Used by ONLY ASFormatter.cpp + * + * @param preDefinitionHeaders a reference to the vector to be built. + */ +void ASResource::buildPreDefinitionHeaders(vector &preDefinitionHeaders) +{ + preDefinitionHeaders.push_back(&AS_CLASS); + preDefinitionHeaders.push_back(&AS_INTERFACE); + preDefinitionHeaders.push_back(&AS_NAMESPACE); + preDefinitionHeaders.push_back(&AS_STRUCT); +} + + +} // end namespace astyle diff --git a/sdk/astyle/src/astyle.h b/sdk/astyle/src/astyle.h new file mode 100644 index 0000000000..98991965f1 --- /dev/null +++ b/sdk/astyle/src/astyle.h @@ -0,0 +1,495 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * astyle.h + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#ifndef ASTYLE_H +#define ASTYLE_H + +#ifdef __VMS +#define __USE_STD_IOSTREAM 1 +#include +#endif + +#include +#include +#include + +using namespace std; + + +// 4996 - secure version deprecation warnings for .NET 2005 +// 4267 - 64 bit signed/unsigned loss of data +#ifdef _MSC_VER +#pragma warning(disable: 4996) +#pragma warning(disable: 4267) +#endif + +namespace astyle +{ + +enum FileType { C_TYPE=0, JAVA_TYPE=1, SHARP_TYPE=2 }; + +/* The enums below are not recognized by 'vectors' in Microsoft Visual C++ + V5 when they are part of a namespace!!! Use Visual C++ V6 or higher. +*/ +enum BracketMode { NONE_MODE, ATTACH_MODE, BREAK_MODE, BDAC_MODE }; + +enum BracketType { NULL_TYPE = 0, + NAMESPACE_TYPE = 1, // also a DEFINITION_TYPE + CLASS_TYPE = 2, // also a DEFINITION_TYPE + DEFINITION_TYPE = 4, + COMMAND_TYPE = 8, + ARRAY_TYPE = 16, // arrays and enums + SINGLE_LINE_TYPE = 32 + }; + +class ASSourceIterator +{ + public: + int eolWindows; + int eolLinux; + int eolMacOld; + char outputEOL[4]; // output end of line char + ASSourceIterator() { eolWindows = eolLinux = eolMacOld = 0; } + virtual ~ASSourceIterator() {} + virtual bool hasMoreLines() const = 0; + virtual string nextLine() = 0; +}; + +class ASResource +{ + public: + void buildAssignmentOperators(vector &assignmentOperators); + void buildCastOperators(vector &castOperators); + void buildHeaders(vector &headers, int fileType, bool beautifier=false); + void buildNonAssignmentOperators(vector &nonAssignmentOperators); + void buildNonParenHeaders(vector &nonParenHeaders, int fileType, bool beautifier=false); + void buildOperators(vector &operators); + void buildPreBlockStatements(vector &preBlockStatements); + void buildPreCommandHeaders(vector &preCommandHeaders); + void buildPreDefinitionHeaders(vector &preDefinitionHeaders); + + public: + static const string AS_IF, AS_ELSE; + static const string AS_DO, AS_WHILE; + static const string AS_FOR; + static const string AS_SWITCH, AS_CASE, AS_DEFAULT; + static const string AS_TRY, AS_CATCH, AS_THROWS, AS_FINALLY; + static const string AS_PUBLIC, AS_PROTECTED, AS_PRIVATE; + static const string AS_CLASS, AS_STRUCT, AS_UNION, AS_INTERFACE, AS_NAMESPACE, AS_EXTERN; + static const string AS_STATIC; + static const string AS_CONST; + static const string AS_SYNCHRONIZED; + static const string AS_OPERATOR, AS_TEMPLATE; + static const string AS_OPEN_BRACKET, AS_CLOSE_BRACKET; + static const string AS_OPEN_LINE_COMMENT, AS_OPEN_COMMENT, AS_CLOSE_COMMENT; + static const string AS_BAR_DEFINE, AS_BAR_INCLUDE, AS_BAR_IF, AS_BAR_EL, AS_BAR_ENDIF; + static const string AS_RETURN; + static const string AS_ASSIGN, AS_PLUS_ASSIGN, AS_MINUS_ASSIGN, AS_MULT_ASSIGN; + static const string AS_DIV_ASSIGN, AS_MOD_ASSIGN, AS_XOR_ASSIGN, AS_OR_ASSIGN, AS_AND_ASSIGN; + static const string AS_GR_GR_ASSIGN, AS_LS_LS_ASSIGN, AS_GR_GR_GR_ASSIGN, AS_LS_LS_LS_ASSIGN; + static const string AS_EQUAL, AS_PLUS_PLUS, AS_MINUS_MINUS, AS_NOT_EQUAL, AS_GR_EQUAL, AS_GR_GR_GR, AS_GR_GR; + static const string AS_LS_EQUAL, AS_LS_LS_LS, AS_LS_LS, AS_ARROW, AS_AND, AS_OR; + static const string AS_COLON_COLON, AS_PAREN_PAREN, AS_BLPAREN_BLPAREN; + static const string AS_PLUS, AS_MINUS, AS_MULT, AS_DIV, AS_MOD, AS_GR, AS_LS; + static const string AS_NOT, AS_BIT_XOR, AS_BIT_OR, AS_BIT_AND, AS_BIT_NOT; + static const string AS_QUESTION, AS_COLON, AS_SEMICOLON, AS_COMMA; + static const string AS_ASM; + static const string AS_FOREACH, AS_LOCK, AS_UNSAFE, AS_FIXED; + static const string AS_GET, AS_SET, AS_ADD, AS_REMOVE; + static const string AS_CONST_CAST, AS_DYNAMIC_CAST, AS_REINTERPRET_CAST, AS_STATIC_CAST; +}; + +class ASBeautifier : protected ASResource +{ + public: + ASBeautifier(); + virtual ~ASBeautifier(); + virtual void init(ASSourceIterator* iter); // pointer to dynamically created iterator. + void init(); + virtual bool hasMoreLines() const; + virtual string nextLine(); + virtual string beautify(const string &line); + void setTabIndentation(int length = 4, bool forceTabs = false); + void setSpaceIndentation(int length = 4); + void setMaxInStatementIndentLength(int max); + void setMinConditionalIndentLength(int min); + void setClassIndent(bool state); + void setSwitchIndent(bool state); + void setCaseIndent(bool state); + void setBracketIndent(bool state); + void setBlockIndent(bool state); + void setNamespaceIndent(bool state); + void setLabelIndent(bool state); + void setCStyle(); + void setJavaStyle(); + void setSharpStyle(); + void setEmptyLineFill(bool state); + void setPreprocessorIndent(bool state); + int getIndentLength(void); + string getIndentString(void); + bool getCaseIndent(void); + bool getCStyle(void); + bool getJavaStyle(void); + bool getSharpStyle(void); + bool getEmptyLineFill(void); + + protected: + int getNextProgramCharDistance(const string &line, int i); +// bool isLegalNameChar(char ch) const; + const string *findHeader(const string &line, int i, + const vector &possibleHeaders, + bool checkBoundry = true); + string trim(const string &str); + int indexOf(vector &container, const string *element); + int fileType; + bool isCStyle; + bool isJavaStyle; + bool isSharpStyle; + + // variables set by ASFormatter - must be updated in preprocessor + int inLineNumber; // for debugging + int outLineNumber; // for debugging + bool lineCommentNoBeautify; + bool isNonInStatementArray; + + private: + ASBeautifier(const ASBeautifier ©); + void operator=(ASBeautifier&); // not to be implemented + + void initStatic(); + void registerInStatementIndent(const string &line, int i, int spaceTabCount, + int minIndent, bool updateParenStack); + string preLineWS(int spaceTabCount, int tabCount); + + static vector headers; + static vector nonParenHeaders; + static vector preBlockStatements; + static vector assignmentOperators; + static vector nonAssignmentOperators; + + ASSourceIterator *sourceIterator; + vector *waitingBeautifierStack; + vector *activeBeautifierStack; + vector *waitingBeautifierStackLengthStack; + vector *activeBeautifierStackLengthStack; + vector *headerStack; + vector< vector* > *tempStacks; + vector *blockParenDepthStack; + vector *blockStatementStack; + vector *parenStatementStack; + vector *inStatementIndentStack; + vector *inStatementIndentStackSizeStack; + vector *parenIndentStack; + vector *bracketBlockStateStack; + string indentString; + const string *currentHeader; + const string *previousLastLineHeader; + const string *immediatelyPreviousAssignmentOp; + const string *probationHeader; + bool isInQuote; + bool isInComment; + bool isInCase; + bool isInQuestion; + bool isInStatement; + bool isInHeader; + bool isInOperator; + bool isInTemplate; + bool isInDefine; + bool isInDefineDefinition; + bool classIndent; + bool isInClassHeader; + bool isInClassHeaderTab; + bool switchIndent; + bool caseIndent; + bool namespaceIndent; + bool bracketIndent; + bool blockIndent; + bool labelIndent; + bool preprocessorIndent; + bool isInConditional; + bool isMinimalConditinalIndentSet; + bool shouldForceTabIndentation; + bool emptyLineFill; + bool backslashEndsPrevLine; + bool blockCommentNoIndent; + bool blockCommentNoBeautify; + bool previousLineProbationTab; + int minConditionalIndent; + int parenDepth; + int indentLength; + int blockTabCount; + int leadingWhiteSpaces; + int maxInStatementIndent; + int templateDepth; + int prevFinalLineSpaceTabCount; + int prevFinalLineTabCount; + int defineTabCount; + char quoteChar; + char prevNonSpaceCh; + char currentNonSpaceCh; + char currentNonLegalCh; + char prevNonLegalCh; + char peekNextChar(string &line, int i); + + protected: // inline functions + // check if a specific character can be used in a legal variable/method/class name + inline bool isLegalNameChar(char ch) const { + return (isalnum(ch) || ch == '.' || ch == '_' || (isJavaStyle && ch == '$') || (isCStyle && ch == '~')); + } + + // check if a specific character is a whitespace character + inline bool isWhiteSpace(char ch) const { + return (ch == ' ' || ch == '\t'); + } +}; + + +class ASEnhancer +{ + public: + // functions + ASEnhancer(); + ~ASEnhancer(); + void init(int, string, bool, bool, bool, bool, bool); + void enhance(string &line); + + private: + // set by init function + int indentLength; + bool useTabs; + bool isCStyle; + bool isJavaStyle; + bool isSharpStyle; + bool caseIndent; + bool emptyLineFill; + + // parsing variables + int lineNumber; + bool isInQuote; + bool isInComment; + char quoteChar; + + // unindent variables + int bracketCount; + int switchDepth; + bool lookingForCaseBracket; + bool unindentNextLine; + + // stringstream for trace + stringstream *traceOut; + + private: // private functions + bool findKeyword(const string &line, int i, const char *header) const; + int indentLine(string &line, const int indent) const; + int unindentLine(string &line, const int unindent) const; + + private: + // struct used by ParseFormattedLine function + // contains variables used to unindent the case blocks + struct switchVariables { + int switchBracketCount; + int unindentDepth; + bool unindentCase; + + switchVariables() { // constructor + switchBracketCount = 0; + unindentDepth = 0; + unindentCase = false; + } + }; + + private: // inline functions + // check if a specific character can be used in a legal variable/method/class name + inline bool isLegalNameCharX(char ch) const { + return (isalnum(ch) || ch == '.' || ch == '_' || (isJavaStyle && ch == '$') || (isCStyle && ch == '~')); + } + + // check if a specific character is a whitespace character + inline bool isWhiteSpaceX(char ch) const { + return (ch == ' ' || ch == '\t'); + } +}; + + +class ASFormatter : public ASBeautifier, private ASEnhancer +{ + public: + ASFormatter(); + virtual ~ASFormatter(); + virtual void init(ASSourceIterator* iter); + virtual bool hasMoreLines() const; + virtual string nextLine(); + void setBracketFormatMode(BracketMode mode); + void setBreakClosingHeaderBracketsMode(bool state); + void setOperatorPaddingMode(bool mode); + void setParensOutsidePaddingMode(bool mode); + void setParensInsidePaddingMode(bool mode); + void setParensUnPaddingMode(bool state); + void setBreakOneLineBlocksMode(bool state); + void setSingleStatementsMode(bool state); + void setTabSpaceConversionMode(bool state); + void setBreakBlocksMode(bool state); + void setBreakClosingHeaderBlocksMode(bool state); + void setBreakElseIfsMode(bool state); + string fileName; + + private: + void ASformatter(ASFormatter ©); // not to be imlpemented + void operator=(ASFormatter&); // not to be implemented + void staticInit(); + void goForward(int i); + void trimNewLine(); + char peekNextChar() const; + BracketType getBracketType() const; + bool getNextChar(); + bool isBeforeComment() const; + bool isBeforeLineEndComment(int startPos) const; + bool isPointerOrReference() const; + bool isUnaryMinus() const; + bool isInExponent() const; + bool isOneLineBlockReached() const; +// bool isNextCharWhiteSpace() const; + bool lineBeginsWith(char charToCheck) const; + void appendChar(char ch, bool canBreakLine = true); + void appendCharInsideComments(); + void appendSequence(const string &sequence, bool canBreakLine = true); + void appendSpacePad(); + void appendSpaceAfter(); + void breakLine(); + void padOperators(const string *newOperator); + void padParens(); + void formatBrackets(BracketType bracketType); + void formatArrayBrackets(BracketType bracketType, bool isOpeningArrayBracket); + void adjustComments(); + const string *findHeader(const vector &headers, bool checkBoundry = true); + + static vector headers; + static vector nonParenHeaders; + static vector preDefinitionHeaders; + static vector preCommandHeaders; + static vector operators; + static vector assignmentOperators; + static vector castOperators; + + ASSourceIterator *sourceIterator; + vector *preBracketHeaderStack; + vector *bracketTypeStack; + vector *parenStack; + string readyFormattedLine; + string currentLine; + string formattedLine; + const string *currentHeader; + const string *previousOperator; // used ONLY by pad=oper + char currentChar; + char previousChar; + char previousNonWSChar; + char previousCommandChar; + char quoteChar; + int charNum; + int spacePadNum; + int templateDepth; + int traceFileNumber; + size_t formattedLineCommentNum; // comment location on formattedLine + size_t previousReadyFormattedLineLength; + BracketMode bracketFormatMode; + BracketType previousBracketType; + bool isVirgin; + bool shouldPadOperators; + bool shouldPadParensOutside; + bool shouldPadParensInside; + bool shouldUnPadParens; + bool shouldConvertTabs; + bool isInLineComment; + bool isInComment; + bool isInPreprocessor; + bool isInTemplate; // true both in template definitions (e.g. template) and template usage (e.g. F). + bool doesLineStartComment; + bool isInQuote; + bool isInBlParen; + bool isSpecialChar; + bool isNonParenHeader; + bool foundQuestionMark; + bool foundPreDefinitionHeader; + bool foundNamespaceHeader; + bool foundClassHeader; + bool foundPreCommandHeader; + bool foundCastOperator; + bool isInLineBreak; +// bool isInClosingBracketLineBreak; + bool endOfCodeReached; + bool lineCommentNoIndent; + bool isLineReady; + bool isPreviousBracketBlockRelated; + bool isInPotentialCalculation; + bool isCharImmediatelyPostComment; + bool isPreviousCharPostComment; + bool isCharImmediatelyPostLineComment; + bool isCharImmediatelyPostOpenBlock; + bool isCharImmediatelyPostCloseBlock; + bool isCharImmediatelyPostTemplate; + bool shouldBreakOneLineBlocks; + bool shouldReparseCurrentChar; + bool shouldBreakOneLineStatements; + bool shouldBreakLineAfterComments; + bool shouldBreakClosingHeaderBrackets; + bool shouldBreakElseIfs; + bool passedSemicolon; + bool passedColon; + bool isImmediatelyPostComment; + bool isImmediatelyPostLineComment; + bool isImmediatelyPostEmptyBlock; + bool isImmediatelyPostPreprocessor; + + bool shouldBreakBlocks; + bool shouldBreakClosingHeaderBlocks; + bool isPrependPostBlockEmptyLineRequested; + bool isAppendPostBlockEmptyLineRequested; + + bool prependEmptyLine; + bool appendOpeningBracket; + bool foundClosingHeader; + + bool isInHeader; + bool isImmediatelyPostHeader; + + private: // inline functions + // append the CURRENT character (curentChar)to the current formatted line. + inline void appendCurrentChar(bool canBreakLine = true) { + appendChar(currentChar, canBreakLine); + } + + // check if a specific sequence exists in the current placement of the current line + inline bool isSequenceReached(const char *sequence) const { + return currentLine.compare(charNum, strlen(sequence), sequence) == 0; + } +}; + +} // end of namespace astyle + +#endif // closes ASTYLE_H + diff --git a/sdk/astyle/src/astyle_main.cpp b/sdk/astyle/src/astyle_main.cpp new file mode 100644 index 0000000000..807889fb11 --- /dev/null +++ b/sdk/astyle/src/astyle_main.cpp @@ -0,0 +1,1138 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * astyle_main.cpp + * + * This file is a part of "Artistic Style" - an indentation and + * reformatting tool for C, C++, C# and Java source files. + * http://astyle.sourceforge.net + * + * The "Artistic Style" project, including all files needed to + * compile it, is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this project; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + +#include "astyle.h" + +#include +#include +#include +#include +#include + +#ifndef ASTYLE_LIB // for console build only +#if defined(_MSC_VER) || defined(__DMC__) +#include +#include +//#define utimbuf _utimbuf +//#define utime _utime +#else +#include +#include +#endif // end compiler checks +#endif // end ASTYLE_LIB + +// for G++ implementation of string.compare: +// compare((str), (place), (length)) instead of compare(place, length, str) +#if defined(__GNUC__) && __GNUC__ < 3 +#error - Use GNU C compiler release 3 or higher +#endif + +// for namespace problem in version 5.0 +#if defined(_MSC_VER) && _MSC_VER < 1200 // check for V6.0 +#error - Use Microsoft compiler version 6 or higher +#endif + +#ifdef _WIN32 +#define STDCALL __stdcall +#define EXPORT __declspec(dllexport) +#else +#define STDCALL +#define EXPORT +#endif + +#define IS_OPTION(arg,op) ((arg).compare(op)==0) +#define IS_OPTIONS(arg,a,b) (IS_OPTION((arg),(a)) || IS_OPTION((arg),(b))) + +#define GET_PARAM(arg,op) ((arg).substr(strlen(op))) +#define GET_PARAMS(arg,a,b) (isParamOption((arg),(a)) ? GET_PARAM((arg),(a)) : GET_PARAM((arg),(b))) + +using namespace astyle; + +const char* _version = "1.21"; + +// some compilers want this declared +bool parseOption(ASFormatter &formatter, const string &arg, const string &errorInfo); + +#ifdef ASTYLE_LIB +// GUI function pointers +typedef void (STDCALL *fpError)(int, char*); // pointer to callback error handler +typedef char* (STDCALL *fpAlloc)(unsigned long); // pointer to callback memory allocation +// GUI variables +stringstream *_err = NULL; +#else +// console variables +ostream *_err = &cerr; +bool _purgeOrigIn = false; +bool _preserveDate = false; +string _suffix = ".orig"; +stringstream _msg; // info messages are not printed until a file is read +#endif +bool _modeManuallySet = false; + + +// typename will be istringstream for GUI and istream otherwise +template +class ASStreamIterator : + public ASSourceIterator +{ + public: + ASStreamIterator(T *in); + virtual ~ASStreamIterator(); + bool hasMoreLines() const; + string nextLine(); + + private: + T * inStream; + string buffer; + bool inStreamEOF; +}; + +template +ASStreamIterator::ASStreamIterator(T *in) +{ + inStream = in; + buffer.reserve(200); + inStreamEOF = false; +} + + +template +ASStreamIterator::~ASStreamIterator() +{ +} + + +template +bool ASStreamIterator::hasMoreLines() const +{ + return !inStreamEOF; +} + + +/** + * read the input stream, delete any end of line characters, + * and build a string that contains the input line. + * + * @return string containing the next input line minus any end of line characters + */ +template +string ASStreamIterator::nextLine() +{ + char ch; + char LF = '\n'; + char CR = '\r'; + inStream->get(ch); + buffer.clear(); + + while (!inStream->eof() && ch != LF && ch != CR) + { + buffer.append(1, ch); + inStream->get(ch); + } + + if (inStream->eof()) + { + inStreamEOF = true; + return buffer; + } + + int peekch = inStream->peek(); + + if (ch == CR) // CR+LF is windows otherwise Mac OS 9 + { + if (peekch == LF) + { + inStream->get(); + eolWindows++; + } + else + eolMacOld++; + } + else // LF is Linux, allow for improbable LF/CR + { + if (peekch == CR) + { + inStream->get(); + eolWindows++; + } + else + eolLinux++; + } + + // set output end of line character + if (eolWindows >= eolLinux) + if (eolWindows >= eolMacOld) + strcpy(outputEOL, "\r\n"); // Windows (CR+LF) + else + strcpy(outputEOL, "\r"); // MacOld (CR) + else + if (eolLinux >= eolMacOld) + strcpy(outputEOL, "\n"); // Linux (LF) + else + strcpy(outputEOL, "\r"); // MacOld (CR) + + return buffer; +} + + +template +bool parseOptions(ASFormatter &formatter, + const ITER &optionsBegin, + const ITER &optionsEnd, + const string &errorInfo) +{ + ITER option; + bool ok = true; + string arg, subArg; + + for (option = optionsBegin; option != optionsEnd; ++option) + { + arg = *option; + + if (arg.compare(0, 2, "--") == 0) + ok &= parseOption(formatter, arg.substr(2), errorInfo); + else if (arg[0] == '-') + { + size_t i; + + for (i = 1; i < arg.length(); ++i) + { + if (isalpha(arg[i]) && i > 1) + { + ok &= parseOption(formatter, subArg, errorInfo); + subArg = ""; + } + subArg.append(1, arg[i]); + } + ok &= parseOption(formatter, subArg, errorInfo); + subArg = ""; + } + else + { + ok &= parseOption(formatter, arg, errorInfo); + subArg = ""; + } + } + return ok; +} + +void importOptions(istream &in, vector &optionsVector) +{ + char ch; + string currentToken; + + while (in) + { + currentToken = ""; + do + { + in.get(ch); + if (in.eof()) + break; + // treat '#' as line comments + if (ch == '#') + while (in) + { + in.get(ch); + if (ch == '\n') + break; + } + + // break options on spaces, tabs or new-lines + if (in.eof() || ch == ' ' || ch == '\t' || ch == '\n') + break; + else + currentToken.append(1, ch); + + } + while (in); + + if (currentToken.length() != 0) + optionsVector.push_back(currentToken); + } +} + +bool isParamOption(const string &arg, const char *option) +{ + bool retVal = arg.compare(0, strlen(option), option) == 0; + // if comparing for short option, 2nd char of arg must be numeric + if (retVal && strlen(option) == 1 && arg.length() > 1) + if (!isdigit(arg[1])) + retVal = false; + return retVal; +} + +void isOptionError(const string &arg, const string &errorInfo) +{ +#ifdef ASTYLE_LIB + if (_err->str().length() == 0) + { + (*_err) << errorInfo << endl; // need main error message + (*_err) << arg; // output the option in error + } + else + (*_err) << endl << arg; // put endl after previous option +#else + if (errorInfo.length() > 0) // to avoid a compiler warning + (*_err) << "Error in param: " << arg << endl; +#endif +} + +bool isParamOption(const string &arg, const char *option1, const char *option2) +{ + return isParamOption(arg, option1) || isParamOption(arg, option2); +} + + +bool parseOption(ASFormatter &formatter, const string &arg, const string &errorInfo) +{ + if ( IS_OPTION(arg, "style=ansi") ) + { + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(BREAK_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=gnu") ) + { + formatter.setSpaceIndentation(2); + formatter.setBracketFormatMode(BREAK_MODE); + formatter.setBlockIndent(true); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=java") ) + { +// formatter.setJavaStyle(); +// _modeManuallySet = true; + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(ATTACH_MODE); + formatter.setBracketIndent(false); + formatter.setSwitchIndent(false); + } + else if ( IS_OPTION(arg, "style=kr") ) + { + //manuallySetCStyle(formatter); + formatter.setSpaceIndentation(4); + formatter.setBracketFormatMode(ATTACH_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + else if ( IS_OPTION(arg, "style=linux") ) + { + formatter.setSpaceIndentation(8); + formatter.setBracketFormatMode(BDAC_MODE); + formatter.setBracketIndent(false); + formatter.setClassIndent(false); + formatter.setSwitchIndent(false); + formatter.setNamespaceIndent(false); + } + // must check for mode=cs before mode=c !!! + else if ( IS_OPTION(arg, "mode=cs") ) + { + formatter.setSharpStyle(); + _modeManuallySet = true; + } + else if ( IS_OPTION(arg, "mode=c") ) + { + formatter.setCStyle(); + _modeManuallySet = true; + } + else if ( IS_OPTION(arg, "mode=java") ) + { + formatter.setJavaStyle(); + _modeManuallySet = true; + } + else if ( isParamOption(arg, "t", "indent=tab=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setTabIndentation(spaceNum, false); + } + else if ( isParamOption(arg, "T", "force-indent=tab=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setTabIndentation(spaceNum, true); + } + else if ( IS_OPTION(arg, "indent=tab") ) + { + formatter.setTabIndentation(4); + } + else if ( isParamOption(arg, "s", "indent=spaces=") ) + { + int spaceNum = 4; + string spaceNumParam = GET_PARAMS(arg, "s", "indent=spaces="); + if (spaceNumParam.length() > 0) + spaceNum = atoi(spaceNumParam.c_str()); + if (spaceNum < 2 || spaceNum > 20) + isOptionError(arg, errorInfo); + else + formatter.setSpaceIndentation(spaceNum); + } + else if ( IS_OPTION(arg, "indent=spaces") ) + { + formatter.setSpaceIndentation(4); + } + else if ( isParamOption(arg, "m", "min-conditional-indent=") ) + { + int minIndent = 8; + string minIndentParam = GET_PARAMS(arg, "m", "min-conditional-indent="); + if (minIndentParam.length() > 0) + minIndent = atoi(minIndentParam.c_str()); + if (minIndent > 40) + isOptionError(arg, errorInfo); + else + formatter.setMinConditionalIndentLength(minIndent); + } + else if ( isParamOption(arg, "M", "max-instatement-indent=") ) + { + int maxIndent = 40; + string maxIndentParam = GET_PARAMS(arg, "M", "max-instatement-indent="); + if (maxIndentParam.length() > 0) + maxIndent = atoi(maxIndentParam.c_str()); + if (maxIndent > 80) + isOptionError(arg, errorInfo); + else + formatter.setMaxInStatementIndentLength(maxIndent); + } + else if ( IS_OPTIONS(arg, "B", "indent-brackets") ) + { + formatter.setBracketIndent(true); + } + else if ( IS_OPTIONS(arg, "G", "indent-blocks") ) + { + formatter.setBlockIndent(true); + } + else if ( IS_OPTIONS(arg, "N", "indent-namespaces") ) + { + formatter.setNamespaceIndent(true); + } + else if ( IS_OPTIONS(arg, "C", "indent-classes") ) + { + formatter.setClassIndent(true); + } + else if ( IS_OPTIONS(arg, "S", "indent-switches") ) + { + formatter.setSwitchIndent(true); + } + else if ( IS_OPTIONS(arg, "K", "indent-cases") ) + { + formatter.setCaseIndent(true); + } + else if ( IS_OPTIONS(arg, "L", "indent-labels") ) + { + formatter.setLabelIndent(true); + } + else if ( IS_OPTIONS(arg, "y", "brackets=break-closing") ) + { + formatter.setBreakClosingHeaderBracketsMode(true); + } + else if ( IS_OPTIONS(arg, "b", "brackets=break") ) + { + formatter.setBracketFormatMode(BREAK_MODE); + } + else if ( IS_OPTIONS(arg, "a", "brackets=attach") ) + { + formatter.setBracketFormatMode(ATTACH_MODE); + } + else if ( IS_OPTIONS(arg, "l", "brackets=linux") ) + { + formatter.setBracketFormatMode(BDAC_MODE); + } + else if ( IS_OPTIONS(arg, "O", "one-line=keep-blocks") ) + { + formatter.setBreakOneLineBlocksMode(false); + } + else if ( IS_OPTIONS(arg, "o", "one-line=keep-statements") ) + { + formatter.setSingleStatementsMode(false); + } + else if ( IS_OPTIONS(arg, "P", "pad=paren") ) + { + formatter.setParensOutsidePaddingMode(true); + formatter.setParensInsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "d", "pad=paren-out") ) + { + formatter.setParensOutsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "D", "pad=paren-in") ) + { + formatter.setParensInsidePaddingMode(true); + } + else if ( IS_OPTIONS(arg, "U", "unpad=paren") ) + { + formatter.setParensUnPaddingMode(true); + } + else if ( IS_OPTIONS(arg, "p", "pad=oper") ) + { + formatter.setOperatorPaddingMode(true); + } + else if ( IS_OPTIONS(arg, "E", "fill-empty-lines") ) + { + formatter.setEmptyLineFill(true); + } + else if ( IS_OPTIONS(arg, "w", "indent-preprocessor") ) + { + formatter.setPreprocessorIndent(true); + } + else if ( IS_OPTIONS(arg, "V", "convert-tabs") ) + { + formatter.setTabSpaceConversionMode(true); + } + else if ( IS_OPTIONS(arg, "F", "break-blocks=all") ) + { + formatter.setBreakBlocksMode(true); + formatter.setBreakClosingHeaderBlocksMode(true); + } + else if ( IS_OPTIONS(arg, "f", "break-blocks") ) + { + formatter.setBreakBlocksMode(true); + } + else if ( IS_OPTIONS(arg, "e", "break-elseifs") ) + { + formatter.setBreakElseIfsMode(true); + } +#ifdef ASTYLE_LIB + // End of options used by GUI + else + isOptionError(arg, errorInfo); +#else + // Options used by only console + else if ( IS_OPTIONS(arg, "n", "suffix=none") ) + { + _purgeOrigIn = true; + } + else if ( isParamOption(arg, "suffix=") ) + { + string suffixParam = GET_PARAM(arg, "suffix="); + if (suffixParam.length() > 0) + { + _suffix = suffixParam; +// if (_suffix[0] != '.') +// _suffix = '.' + _suffix; + } + } + else if ( IS_OPTIONS(arg, "Z", "preserve-date") ) + { + _preserveDate =true; + } + else if ( IS_OPTIONS(arg, "X", "errors-to-stdout") ) + { + _err = &cout; + } + else if ( IS_OPTIONS(arg, "v", "version") ) + { + (*_err) << "Artistic Style " << _version << endl; + exit(0); + } + else + { + (*_err) << errorInfo << arg << endl; + return false; // unknown option + } +#endif +// End of parseOption function + return true; //o.k. +} + + +#ifdef ASTYLE_LIB +// ************************* GUI functions ***************************************************** +/* + * IMPORTANT VC DLL linker must have the parameter /EXPORT:AStyleMain=_AStyleMain@16 + * /EXPORT:AStyleGetVersion=_AStyleGetVersion@0 + * For Dll only - "warning C4702: unreachable code" in the header + * is caused by using the Optimization options. + * /O2 Maximize speed + * /O1 Minimize size + * /Ob2 Inline Expansion + * This is a bug in the Microsoft compiler. The program runs about twice as fast + * with the options set. There haven't been any problems so far. +*/ +extern "C" EXPORT char* STDCALL + AStyleMain(const char* pSourceIn, // pointer to the source to be formatted + const char* pOptions, // pointer to AStyle options, separated by \n + fpError fpErrorHandler, // pointer to error handler function + fpAlloc fpMemoryAlloc) // pointer to memory allocation function +{ + if (fpErrorHandler == NULL) // cannot display a message if no error handler + return NULL; + + if (pSourceIn == NULL) + { + fpErrorHandler(101, "No pointer to source input"); + return NULL; + } + if (pOptions == NULL) + { + fpErrorHandler(102, "No pointer to AStyle options"); + return NULL; + } + if (fpMemoryAlloc == NULL) + { + fpErrorHandler(103, "No pointer to memory allocation function"); + return NULL; + } + + ASFormatter formatter; + + string arg; + vector optionsVector; + istringstream opt(pOptions); + _err = new stringstream; + _modeManuallySet = false; + + importOptions(opt, optionsVector); + + parseOptions(formatter, + optionsVector.begin(), + optionsVector.end(), + "Unknown Artistic Style options\n" + "The following options were not processed:"); + + if (_err->str().length() > 0) + fpErrorHandler(210, (char*) _err->str().c_str()); + + delete _err; + _err = NULL; + + istringstream in(pSourceIn); + ASStreamIterator streamIterator(&in); + ostringstream out; + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + out << formatter.nextLine(); + out << streamIterator.outputEOL; + } + + unsigned long textSizeOut = out.str().length(); + char* pTextOut = fpMemoryAlloc(textSizeOut + 1); // call memory allocation function +// pTextOut = NULL; // for testing + if (pTextOut == NULL) + { + fpErrorHandler(110, "Allocation failure on output"); + return NULL; + } + + strcpy(pTextOut, out.str().c_str()); + + return pTextOut; +} + +extern "C" EXPORT const char* STDCALL AStyleGetVersion (void) +{ + return _version; +} + +#else + +void preserveFileDate(const char *oldFileName, const char *newFileName) +{ + struct stat stBuf; + bool statErr = false; + if (stat (oldFileName, &stBuf) == -1) + statErr = true; + else + { + struct utimbuf outBuf; + outBuf.actime = stBuf.st_atime; + // add 1 so RCS will recoginze a change + outBuf.modtime = stBuf.st_mtime + 1; + if (utime (newFileName, &outBuf) == -1) + statErr = true; + } + if (statErr) + (*_err) << " Could not preserve file date" << endl; +} + +bool stringEndsWith(const string &str, const string &suffix) +{ + int strIndex = (int) str.length() - 1; + int suffixIndex = (int) suffix.length() - 1; + + while (strIndex >= 0 && suffixIndex >= 0) + { + if (tolower(str[strIndex]) != tolower(suffix[suffixIndex])) + return false; + + --strIndex; + --suffixIndex; + } + + return true; +} + + +void error(const char *why, const char* what) +{ + (*_err) << why << ' ' << what << '\n' << endl; + exit(1); +} + + +void printHelp() +{ + (*_err) << endl; + (*_err) << " Artistic Style " << _version << endl; + (*_err) << " Maintained by: Jim Pattee\n"; + (*_err) << " Original Author: Tal Davidson\n"; + (*_err) << endl; + (*_err) << "Usage : astyle [options] Source1.cpp Source2.cpp [...]\n"; + (*_err) << " astyle [options] < Original > Beautified\n"; + (*_err) << endl; + (*_err) << "When indenting a specific file, the resulting indented file RETAINS the\n"; + (*_err) << "original file-name. The original pre-indented file is renamed, with a\n"; + (*_err) << "suffix of \".orig\" added to the original filename.\n"; + (*_err) << endl; + (*_err) << "By default, astyle is set up to indent C/C++/C#/Java files, with 4 spaces\n"; + (*_err) << "per indent, a maximal indentation of 40 spaces inside continuous statements,\n"; + (*_err) << "and NO formatting.\n"; + (*_err) << endl; + (*_err) << "Option's Format:\n"; + (*_err) << "----------------\n"; + (*_err) << " Long options (starting with '--') must be written one at a time.\n"; + (*_err) << " Short options (starting with '-') may be appended together.\n"; + (*_err) << " Thus, -bps4 is the same as -b -p -s4.\n"; + (*_err) << endl; + (*_err) << "Predefined Style Options:\n"; + (*_err) << "-------------------------\n"; + (*_err) << " --style=ansi\n"; + (*_err) << " ANSI style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=gnu\n"; + (*_err) << " GNU style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=kr\n"; + (*_err) << " Kernighan&Ritchie style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << " --style=linux\n"; + (*_err) << " Linux mode (8 spaces per indent, break definition-block\n"; + (*_err) << " brackets but attach command-block brackets).\n"; + (*_err) << endl; + (*_err) << " --style=java\n"; + (*_err) << " Java mode, with standard java style formatting/indenting.\n"; + (*_err) << endl; + (*_err) << "Tab and Bracket Options:\n"; + (*_err) << "------------------------\n"; + (*_err) << " default indent option\n"; + (*_err) << " If no indentation option is set,\n"; + (*_err) << " the default option of 4 spaces will be used.\n"; + (*_err) << endl; + (*_err) << " --indent=spaces=# OR -s#\n"; + (*_err) << " Indent using # spaces per indent. Not specifying #\n"; + (*_err) << " will result in a default of 4 spaces per indent.\n"; + (*_err) << endl; + (*_err) << " --indent=tab OR --indent=tab=# OR -t OR -t#\n"; + (*_err) << " Indent using tab characters, assuming that each\n"; + (*_err) << " tab is # spaces long. Not specifying # will result\n"; + (*_err) << " in a default assumption of 4 spaces per tab.\n"; + (*_err) << endl; + (*_err) << " --force-indent=tab=# OR -T#\n"; + (*_err) << " Indent using tab characters, assuming that each\n"; + (*_err) << " tab is # spaces long. Force tabs to be used in areas\n"; + (*_err) << " Astyle would prefer to use spaces.\n"; + (*_err) << endl; + (*_err) << " default brackets option\n"; + (*_err) << " If no brackets option is set,\n"; + (*_err) << " the brackets will not be changed.\n"; + (*_err) << endl; + (*_err) << " --brackets=break OR -b\n"; + (*_err) << " Break brackets from pre-block code (i.e. ANSI C/C++ style).\n"; + (*_err) << endl; + (*_err) << " --brackets=attach OR -a\n"; + (*_err) << " Attach brackets to pre-block code (i.e. Java/K&R style).\n"; + (*_err) << endl; + (*_err) << " --brackets=linux OR -l\n"; + (*_err) << " Break definition-block brackets and attach command-block\n"; + (*_err) << " brackets.\n"; + (*_err) << endl; + (*_err) << " --brackets=break-closing OR -y\n"; + (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ...).\n"; + (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n"; + (*_err) << endl; + (*_err) << "Indentation options:\n"; + (*_err) << "--------------------\n"; + (*_err) << " --indent-classes OR -C\n"; + (*_err) << " Indent 'class' blocks, so that the inner 'public:',\n"; + (*_err) << " 'protected:' and 'private: headers are indented in\n"; + (*_err) << " relation to the class block.\n"; + (*_err) << endl; + (*_err) << " --indent-switches OR -S\n"; + (*_err) << " Indent 'switch' blocks, so that the inner 'case XXX:'\n"; + (*_err) << " headers are indented in relation to the switch block.\n"; + (*_err) << endl; + (*_err) << " --indent-cases OR -K\n"; + (*_err) << " Indent case blocks from the 'case XXX:' headers.\n"; + (*_err) << " Case statements not enclosed in blocks are NOT indented.\n"; + (*_err) << endl; + (*_err) << " --indent-brackets OR -B\n"; + (*_err) << " Add extra indentation to '{' and '}' block brackets.\n"; + (*_err) << endl; + (*_err) << " --indent-blocks OR -G\n"; + (*_err) << " Add extra indentation entire blocks (including brackets).\n"; + (*_err) << endl; + (*_err) << " --indent-namespaces OR -N\n"; + (*_err) << " Indent the contents of namespace blocks.\n"; + (*_err) << endl; + (*_err) << " --indent-labels OR -L\n"; + (*_err) << " Indent labels so that they appear one indent less than\n"; + (*_err) << " the current indentation level, rather than being\n"; + (*_err) << " flushed completely to the left (which is the default).\n"; + (*_err) << endl; + (*_err) << " --indent-preprocessor OR -w\n"; + (*_err) << " Indent multi-line #define statements.\n"; + (*_err) << endl; + (*_err) << " --max-instatement-indent=# OR -M#\n"; + (*_err) << " Indent a maximal # spaces in a continuous statement,\n"; + (*_err) << " relative to the previous line.\n"; + (*_err) << endl; + (*_err) << " --min-conditional-indent=# OR -m#\n"; + (*_err) << " Indent a minimal # spaces in a continuous conditional\n"; + (*_err) << " belonging to a conditional header.\n"; + (*_err) << endl; + (*_err) << "Formatting options:\n"; + (*_err) << "-------------------\n"; + (*_err) << " --break-blocks OR -f\n"; + (*_err) << " Insert empty lines around unrelated blocks, labels, classes, ...\n"; + (*_err) << endl; + (*_err) << " --break-blocks=all OR -F\n"; + (*_err) << " Like --break-blocks, except also insert empty lines \n"; + (*_err) << " around closing headers (e.g. 'else', 'catch', ...).\n"; + (*_err) << endl; + (*_err) << " --break-elseifs OR -e\n"; + (*_err) << " Break 'else if()' statements into two different lines.\n"; + (*_err) << endl; + (*_err) << " --pad=oper OR -p\n"; + (*_err) << " Insert space paddings around operators.\n"; + (*_err) << endl; + (*_err) << " --pad=paren OR -P\n"; + (*_err) << " Insert space padding around parenthesis on both the outside\n"; + (*_err) << " and the inside.\n"; + (*_err) << endl; + (*_err) << " --pad=paren-out OR -d\n"; + (*_err) << " Insert space padding around parenthesis on the outside only.\n"; + (*_err) << endl; + (*_err) << " --pad=paren-in OR -D\n"; + (*_err) << " Insert space padding around parenthesis on the inside only.\n"; + (*_err) << endl; + (*_err) << " --unpad=paren OR -U\n"; + (*_err) << " Remove unnecessary space padding around parenthesis. This\n"; + (*_err) << " can be used in combination with the 'pad' options above.\n"; + (*_err) << endl; + (*_err) << " --one-line=keep-statements OR -o\n"; + (*_err) << " Don't break lines containing multiple statements into\n"; + (*_err) << " multiple single-statement lines.\n"; + (*_err) << endl; + (*_err) << " --one-line=keep-blocks OR -O\n"; + (*_err) << " Don't break blocks residing completely on one line.\n"; + (*_err) << endl; + (*_err) << " --convert-tabs OR -V\n"; + (*_err) << " Convert tabs to spaces.\n"; + (*_err) << endl; + (*_err) << " --fill-empty-lines OR -E\n"; + (*_err) << " Fill empty lines with the white space of their\n"; + (*_err) << " previous lines.\n"; + (*_err) << endl; + (*_err) << " --mode=c OR -c\n"; + (*_err) << " Indent a C, C++ or C# source file (this is the default).\n"; + (*_err) << endl; + (*_err) << " --mode=java OR -j\n"; + (*_err) << " Indent a Java(TM) source file.\n"; + (*_err) << endl; + (*_err) << "Other options:\n"; + (*_err) << "--------------\n"; + (*_err) << " --suffix=####\n"; + (*_err) << " Append the suffix #### instead of '.orig' to original filename.\n"; + (*_err) << endl; + (*_err) << " --suffix=none OR -n\n"; + (*_err) << " Do not retain a backup of the original file.\n"; + (*_err) << endl; + (*_err) << " --options=####\n"; + (*_err) << " Specify an options file #### to read and use.\n"; + (*_err) << endl; + (*_err) << " --options=none\n"; + (*_err) << " Disable the default options file.\n"; + (*_err) << " Only the command-line parameters will be used.\n"; + (*_err) << endl; + (*_err) << " --preserve-date OR -Z\n"; + (*_err) << " The date and time modified will not be changed in the formatted file.\n"; + (*_err) << endl; + (*_err) << " --errors-to-stdout OR -X\n"; + (*_err) << " Print errors and help information to standard-output rather than\n"; + (*_err) << " to standard-error.\n"; + (*_err) << endl; + (*_err) << " --version OR -v\n"; + (*_err) << " Print version number.\n"; + (*_err) << endl; + (*_err) << " --help OR -h OR -?\n"; + (*_err) << " Print this help message.\n"; + (*_err) << endl; + (*_err) << "Default options file:\n"; + (*_err) << "---------------------\n"; + (*_err) << " Artistic Style looks for a default options file in the\n"; + (*_err) << " following order:\n"; + (*_err) << " 1. The contents of the ARTISTIC_STYLE_OPTIONS environment\n"; + (*_err) << " variable if it exists.\n"; + (*_err) << " 2. The file called .astylerc in the directory pointed to by the\n"; + (*_err) << " HOME environment variable ( i.e. $HOME/.astylerc ).\n"; + (*_err) << " 3. The file called astylerc in the directory pointed to by the\n"; + (*_err) << " USERPROFILE environment variable ( i.e. %USERPROFILE%\\astylerc ).\n"; + (*_err) << " If a default options file is found, the options in this file\n"; + (*_err) << " will be parsed BEFORE the command-line options.\n"; + (*_err) << " Long options within the default option file may be written without\n"; + (*_err) << " the preliminary '--'.\n"; + (*_err) << endl; +} + +int main(int argc, char *argv[]) +{ + ASFormatter formatter; + vector fileNameVector; + vector optionsVector; + string optionsFileName = ""; + string arg; + bool ok = true; + bool shouldPrintHelp = false; + bool shouldParseOptionsFile = true; + + _modeManuallySet = false; + + _msg << "\nArtistic Style " << _version << endl; + // manage flags + for (int i = 1; i < argc; i++) + { + arg = string(argv[i]); + + if ( IS_OPTION(arg, "--options=none") ) + { + shouldParseOptionsFile = false; + } + else if ( isParamOption(arg, "--options=") ) + { + optionsFileName = GET_PARAM(arg, "--options="); + } + else if ( IS_OPTION(arg, "-h") + || IS_OPTION(arg, "--help") + || IS_OPTION(arg, "-?") ) + { + shouldPrintHelp = true; + } + else if (arg[0] == '-') + { + optionsVector.push_back(arg); + } + else // file-name + { + fileNameVector.push_back(arg); + } + } + + // parse options file + if (shouldParseOptionsFile) + { + if (optionsFileName.compare("") == 0) + { + char* env = getenv("ARTISTIC_STYLE_OPTIONS"); + if (env != NULL) + optionsFileName = string(env); + } + if (optionsFileName.compare("") == 0) + { + char* env = getenv("HOME"); + if (env != NULL) + optionsFileName = string(env) + string("/.astylerc"); + } + if (optionsFileName.compare("") == 0) + { + char* env = getenv("USERPROFILE"); + if (env != NULL) + optionsFileName = string(env) + string("/astylerc"); + } + + if (optionsFileName.compare("") != 0) + { + ifstream optionsIn(optionsFileName.c_str()); + if (optionsIn) + { + _msg << "Using default options file " << optionsFileName << endl; + vector fileOptionsVector; + importOptions(optionsIn, fileOptionsVector); + ok = parseOptions(formatter, + fileOptionsVector.begin(), + fileOptionsVector.end(), + string("Unknown option in default options file: ")); + } + + optionsIn.close(); + if (!ok) + { + (*_err) << "For help on options, type 'astyle -h' " << endl; + } + } + } + + // parse options from command line + + ok = parseOptions(formatter, + optionsVector.begin(), + optionsVector.end(), + string("Unknown command line option: ")); + if (!ok) + { + (*_err) << "For help on options, type 'astyle -h' \n" << endl; + exit(1); + } + + if (shouldPrintHelp) + { + printHelp(); + exit(0); + } + + // if no files have been given, use cin for input and cout for output + // this is used to format text for text editors like TextWrangler + // do NOT display any console messages when this branch is used + if (fileNameVector.empty()) + { + ASStreamIterator streamIterator(&cin); + + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + cout << formatter.nextLine(); + if (formatter.hasMoreLines()) + cout << streamIterator.outputEOL; + } + cout.flush(); + } + else + { + // indent the given files + cout << _msg.str().c_str(); + clock_t startTime = clock(); + for (size_t i = 0; i < fileNameVector.size(); i++) + { + string originalFileName = fileNameVector[i]; + string inFileName = originalFileName + _suffix; + + remove(inFileName.c_str()); // remove the old .orig if present + + // check if the file is present before rename + ifstream inCheck(originalFileName.c_str()); + if (!inCheck) + error("Could not open input file", originalFileName.c_str()); + inCheck.close(); + + if (rename(originalFileName.c_str(), inFileName.c_str()) < 0) + error("Could not rename ", string(originalFileName + " to " + inFileName).c_str()); + + ifstream in(inFileName.c_str(), ios::binary); + if (!in) + error("Could not open input file", inFileName.c_str()); + + ofstream out(originalFileName.c_str(), ios::binary); + if (!out) + error("Could not open output file", originalFileName.c_str()); + + // Unless a specific language mode has been, set the language mode + // according to the file's suffix. + if (!_modeManuallySet) + { + if (stringEndsWith(originalFileName, string(".java"))) + formatter.setJavaStyle(); + else if (stringEndsWith(originalFileName, string(".cs"))) + formatter.setSharpStyle(); + else + formatter.setCStyle(); + } + // display file formatting message and save the filename + cout << "formatting " << originalFileName.c_str() << endl; + size_t fname = originalFileName.find_last_of("/\\"); + if (fname == string::npos) + fname = 0; + else + fname +=1; + formatter.fileName = originalFileName.substr(fname); + + ASStreamIterator streamIterator(&in); + formatter.init(&streamIterator); + + while (formatter.hasMoreLines()) + { + out << formatter.nextLine(); + // the last line does not get an eol + if (formatter.hasMoreLines()) + out << streamIterator.outputEOL; + } + out.flush(); + out.close(); + in.close(); + + // change date modified to original file date + if (_preserveDate) + preserveFileDate(inFileName.c_str(), originalFileName.c_str()); + + if (_purgeOrigIn) + remove(inFileName.c_str()); + } + // all files formatted + clock_t stopTime = clock(); + float secs = (float) (stopTime - startTime) / CLOCKS_PER_SEC; + // show tenths of a second if time is less than 20 seconds + cout.precision(2); + if (secs >= 100 || (secs >= 10 && secs < 20)) + cout.precision(3); + cout << "total time " << secs << " seconds" << endl; + cout.precision(0); + cout << endl; + } + return 0; +} + +#endif +// ************************* end of console functions ***************************************** diff --git a/sdk/ctags/.mk_mvc.mak.swp b/sdk/ctags/.mk_mvc.mak.swp new file mode 100644 index 0000000000000000000000000000000000000000..e4b202fcd69c6855bb0cde11c4a646895d359269 GIT binary patch literal 12288 zcmeI2%WoT16vl6hK!moG#~z(vBPDI)aU4n&BbT@yHyNodYbXjyq`pI`@&OMLs%*-M=?fijJ zr)#-9!|@Vh_kQ|Nw<{TT?+wOmGYGgZZ=8O(!ZO{S2%}uGvV~_lkK6Xi*r8_gA$P?< zt3+lu)Q%i~t)N+Qef2HP>$kk2mGjL0=`qz^rGQf4Nfo%j)(Wfn%MQ$Cx>?yP z1(X6x0i}RaKq;UUPzopolmbt=0@2_M`x`Z!1toAM1wZOg3Md7X0!jg;fKosypcGIF zC zf%D)TczA)aU%>^txc_!@i#z63+?0oVZza2=Gu%i#BO zjQs|F1RsNsfD7IM&w*#b!xtF)7TgD)g7?6?pak;ZHE&P@@1xYZMsUDB&JjqU30GM2`6rM9n+*Sn4VW@Wsr-rj4LTQ%bbjIL95 zgQf9`*fM9fRW0k)CT!-1LKiHTGz*4}oxNq!Zi?*2e9RTy5`Gw!9tqy8ZdPx%bfdZa ze!#o@IAFikS-n3kO!e7{4}iP2D55p*f|AP^d>aeD{t<$>Sbe_0&d!}Pmj%IdJ~N< z&Y6zmOa(hp*}p5Aw)#I5#1iA;-1EiI6)KU|D3G>!l}-AOOA{$@X_=*u2rjSaw~Xzz z0&b@*N*Il~rn3C?2XIg=vNRU19O)uS@c$>J8_DRa5 z*J^LGv^Z!k)iLI)dn99{Im_5+!g^YK%XY#@77(AvDyxu=`fbX#{MjZ{5Fx}qg*E>+X=W8iC}a^mhUH9EYnZ6!O4zr zAj~X0xQS+02ilz_i9 + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/sdk/ctags/EXTENDING.html b/sdk/ctags/EXTENDING.html new file mode 100644 index 0000000000..40483d7243 --- /dev/null +++ b/sdk/ctags/EXTENDING.html @@ -0,0 +1,386 @@ + + + +Exuberant Ctags: Adding support for a new language + + + +

    How to Add Support for a New Language to Exuberant Ctags

    + +

    +Exuberant Ctags has been designed to make it very easy to add your own +custom language parser. As an exercise, let us assume that I want to add +support for my new language, Swine, the successor to Perl (i.e. Perl +before Swine <wince>). This language consists of simple definitions of +labels in the form "def my_label". Let us now examine the various +ways to do this. +

    + +

    Operational background

    + +

    +As ctags considers each file name, it tries to determine the language of the +file by applying the following three tests in order: if the file extension has +been mapped to a language, if the file name matches a shell pattern mapped to +a language, and finally if the file is executable and its first line specifies +an interpreter using the Unix-style "#!" specification (if supported on the +platform). If a language was identified, the file is opened and then the +appropriate language parser is called to operate on the currently open file. +The parser parses through the file and whenever it finds some interesting +token, calls a function to define a tag entry. +

    + +

    Creating a user-defined language

    + +

    +The quickest and easiest way to do this is by defining a new language using +the program options. In order to have Swine support available every time I +start ctags, I will place the following lines into the file +$HOME/.ctags, which is read in every time ctags starts: + + +

    +  --langdef=swine
    +  --langmap=swine:.swn
    +  --regex-swine=/^def[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/
    +
    + +The first line defines the new language, the second maps a file extension to +it, and the third defines a regular expression to identify a language +definition and generate a tag file entry for it. +

    + +

    Integrating a new language parser

    + +

    +Now suppose that I want to truly integrate compiled-in support for Swine into +ctags. First, I create a new module, swine.c, and add one +externally visible function to it, extern parserDefinition +*SwineParser(void), and add its name to the table in +parsers.h. The job of this parser definition function is to +create an instance of the parserDefinition structure (using +parserNew()) and populate it with information defining how files +of this language are recognized, what kinds of tags it can locate, and the +function used to invoke the parser on the currently open file. +

    + +

    +The structure parserDefinition allows assignment of the following +fields: + + +

    +  const char *name;               /* name of language */
    +  kindOption *kinds;              /* tag kinds handled by parser */
    +  unsigned int kindCount;         /* size of `kinds' list */
    +  const char *const *extensions;  /* list of default extensions */
    +  const char *const *patterns;    /* list of default file name patterns */
    +  parserInitialize initialize;    /* initialization routine, if needed */
    +  simpleParser parser;            /* simple parser (common case) */
    +  rescanParser parser2;           /* rescanning parser (unusual case) */
    +  boolean regex;                  /* is this a regex parser? */
    +
    + +

    + +

    +The name field must be set to a non-empty string. Also, unless +regex is set true (see below), either parser or +parser2 must set to point to a parsing routine which will +generate the tag entries. All other fields are optional. + +

    +Now all that is left is to implement the parser. In order to do its job, the +parser should read the file stream using using one of the two I/O interfaces: +either the character-oriented fileGetc(), or the line-oriented +fileReadLine(). When using fileGetc(), the parser +can put back a character using fileUngetc(). How our Swine parser +actually parses the contents of the file is entirely up to the writer of the +parser--it can be as crude or elegant as desired. You will note a variety of +examples from the most complex (c.c) to the simplest (make.c). +

    + +

    +When the Swine parser identifies an interesting token for which it wants to +add a tag to the tag file, it should create a tagEntryInfo +structure and initialize it by calling initTagEntry(), which +initializes defaults and fills information about the current line number and +the file position of the beginning of the line. After filling in information +defining the current entry (and possibly overriding the file position or other +defaults), the parser passes this structure to makeTagEntry(). +

    + +

    +Instead of writing a character-oriented parser, it may be possible to specify +regular expressions which define the tags. In this case, instead of defining a +parsing function, SwineParser(), sets regex to true, +and points initialize to a function which calls +addTagRegex() to install the regular expressions which define its +tags. The regular expressions thus installed are compared against each line +of the input file and generate a specified tag when matched. It is usually +much easier to write a regex-based parser, although they can be slower (one +parser example was 4 times slower). Whether the speed difference matters to +you depends upon how much code you have to parse. It is probably a good +strategy to implement a regex-based parser first, and if it is too slow for +you, then invest the time and effort to write a character-based parser. +

    + +

    +A regex-based parser is inherently line-oriented (i.e. the entire tag must be +recognizable from looking at a single line) and context-insensitive (i.e the +generation of the tag is entirely based upon when the regular expression +matches a single line). However, a regex-based callback mechanism is also +available, installed via the function addCallbackRegex(). This +allows a specified function to be invoked whenever a specific regular +expression is matched. This allows a character-oriented parser to operate +based upon context of what happened on a previous line (e.g. the start or end +of a multi-line comment). Note that regex callbacks are called just before the +first character of that line can is read via either fileGetc() or +using fileGetc(). The effect of this is that before either of +these routines return, a callback routine may be invoked because the line +matched a regex callback. A callback function to be installed is defined by +these types: + + +

    +  typedef void (*regexCallback) (const char *line, const regexMatch *matches, unsigned int count);
    +
    +  typedef struct {
    +      size_t start;   /* character index in line where match starts */
    +      size_t length;  /* length of match */
    +  } regexMatch;
    +
    + +

    + +

    +The callback function is passed the line matching the regular expression and +an array of count structures defining the subexpression matches +of the regular expression, starting from \0 (the entire line). +

    + +

    +Lastly, be sure to add your the name of the file containing your parser (e.g. +swine.c) to the macro SOURCES in the file source.mak +and an entry for the object file to the macro OBJECTS in the same +file, so that your new module will be compiled into the program. +

    + +

    +This is all there is to it. All other details are specific to the parser and +how it wants to do its job. There are some support functions which can take +care of some commonly needed parsing tasks, such as keyword table lookups (see +keyword.c), which you can make use of if desired (examples of its use can be +found in c.c, eiffel.c, and fortran.c). Almost everything is already taken care +of automatically for you by the infrastructure. Writing the actual parsing +algorithm is the hardest part, but is not constrained by any need to conform +to anything in ctags other than that mentioned above. +

    + +

    +There are several different approaches used in the parsers inside Exuberant +Ctags and you can browse through these as examples of how to go about +creating your own. +

    + +

    Examples

    + +

    +Below you will find several example parsers demonstrating most of the +facilities available. These include three alternative implementations +of a Swine parser, which generate tags for lines beginning with +"def" followed by some name. +

    + + +
    +/***************************************************************************
    + * swine.c
    + * Character-based parser for Swine definitions
    + **************************************************************************/
    +/* INCLUDE FILES */
    +#include "general.h"    /* always include first */
    +
    +#include <string.h>     /* to declare strxxx() functions */
    +#include <ctype.h>      /* to define isxxx() macros */
    +
    +#include "parse.h"      /* always include */
    +#include "read.h"       /* to define file fileReadLine() */
    +
    +/* DATA DEFINITIONS */
    +typedef enum eSwineKinds {
    +    K_DEFINE
    +} swineKind;
    +
    +static kindOption SwineKinds [] = {
    +    { TRUE, 'd', "definition", "pig definition" }
    +};
    +
    +/* FUNCTION DEFINITIONS */
    +
    +static void findSwineTags (void)
    +{
    +    vString *name = vStringNew ();
    +    const unsigned char *line;
    +
    +    while ((line = fileReadLine ()) != NULL)
    +    {
    +        /* Look for a line beginning with "def" followed by name */
    +        if (strncmp ((const char*) line, "def", (size_t) 3) == 0  &&
    +            isspace ((int) line [3]))
    +        {
    +            const unsigned char *cp = line + 4;
    +            while (isspace ((int) *cp))
    +                ++cp;
    +            while (isalnum ((int) *cp)  ||  *cp == '_')
    +            {
    +                vStringPut (name, (int) *cp);
    +                ++cp;
    +            }
    +            vStringTerminate (name);
    +            makeSimpleTag (name, SwineKinds, K_DEFINE);
    +            vStringClear (name);
    +        }
    +    }
    +    vStringDelete (name);
    +}
    +
    +/* Create parser definition stucture */
    +extern parserDefinition* SwineParser (void)
    +{
    +    static const char *const extensions [] = { "swn", NULL };
    +    parserDefinition* def = parserNew ("Swine");
    +    def->kinds      = SwineKinds;
    +    def->kindCount  = KIND_COUNT (SwineKinds);
    +    def->extensions = extensions;
    +    def->parser     = findSwineTags;
    +    return def;
    +}
    +
    +
    + +

    +

    +
    +/***************************************************************************
    + * swine.c
    + * Regex-based parser for Swine
    + **************************************************************************/
    +/* INCLUDE FILES */
    +#include "general.h"    /* always include first */
    +#include "parse.h"      /* always include */
    +
    +/* FUNCTION DEFINITIONS */
    +
    +static void installSwineRegex (const langType language)
    +{
    +    addTagRegex (language, "^def[ \t]*([a-zA-Z0-9_]+)", "\\1", "d,definition", NULL);
    +}
    +
    +/* Create parser definition stucture */
    +extern parserDefinition* SwineParser (void)
    +{
    +    static const char *const extensions [] = { "swn", NULL };
    +    parserDefinition* def = parserNew ("Swine");
    +    parserDefinition* const def = parserNew ("Makefile");
    +    def->patterns   = patterns;
    +    def->extensions = extensions;
    +    def->initialize = installMakefileRegex;
    +    def->regex      = TRUE;
    +    return def;
    +}
    +
    +
    + +

    +

    +/***************************************************************************
    + * swine.c
    + * Regex callback-based parser for Swine definitions
    + **************************************************************************/
    +/* INCLUDE FILES */
    +#include "general.h"    /* always include first */
    +
    +#include "parse.h"      /* always include */
    +#include "read.h"       /* to define file fileReadLine() */
    +
    +/* DATA DEFINITIONS */
    +typedef enum eSwineKinds {
    +    K_DEFINE
    +} swineKind;
    +
    +static kindOption SwineKinds [] = {
    +    { TRUE, 'd', "definition", "pig definition" }
    +};
    +
    +/* FUNCTION DEFINITIONS */
    +
    +static void definition (const char *const line, const regexMatch *const matches,
    +                       const unsigned int count)
    +{
    +    if (count > 1)    /* should always be true per regex */
    +    {
    +        vString *const name = vStringNew ();
    +        vStringNCopyS (name, line + matches [1].start, matches [1].length);
    +        makeSimpleTag (name, SwineKinds, K_DEFINE);
    +    }
    +}
    +
    +static void findSwineTags (void)
    +{
    +    while (fileReadLine () != NULL)
    +        ;  /* don't need to do anything here since callback is sufficient */
    +}
    +
    +static void installSwine (const langType language)
    +{
    +    addCallbackRegex (language, "^def[ \t]+([a-zA-Z0-9_]+)", NULL, definition);
    +}
    +
    +/* Create parser definition stucture */
    +extern parserDefinition* SwineParser (void)
    +{
    +    static const char *const extensions [] = { "swn", NULL };
    +    parserDefinition* def = parserNew ("Swine");
    +    def->kinds      = SwineKinds;
    +    def->kindCount  = KIND_COUNT (SwineKinds);
    +    def->extensions = extensions;
    +    def->parser     = findSwineTags;
    +    def->initialize = installSwine;
    +    return def;
    +}
    +
    + +

    +

    +/***************************************************************************
    + * make.c
    + * Regex-based parser for makefile macros
    + **************************************************************************/
    +/* INCLUDE FILES */
    +#include "general.h"    /* always include first */
    +#include "parse.h"      /* always include */
    +
    +/* FUNCTION DEFINITIONS */
    +
    +static void installMakefileRegex (const langType language)
    +{
    +    addTagRegex (language, "(^|[ \t])([A-Z0-9_]+)[ \t]*:?=", "\\2", "m,macro", "i");
    +}
    +
    +/* Create parser definition stucture */
    +extern parserDefinition* MakefileParser (void)
    +{
    +    static const char *const patterns [] = { "[Mm]akefile", NULL };
    +    static const char *const extensions [] = { "mak", NULL };
    +    parserDefinition* const def = parserNew ("Makefile");
    +    def->patterns   = patterns;
    +    def->extensions = extensions;
    +    def->initialize = installMakefileRegex;
    +    def->regex      = TRUE;
    +    return def;
    +}
    +
    + + + diff --git a/sdk/ctags/FAQ b/sdk/ctags/FAQ new file mode 100644 index 0000000000..0a7c8fa393 --- /dev/null +++ b/sdk/ctags/FAQ @@ -0,0 +1,371 @@ +Frequently Asked Questions +========================== + + * 1. Why do you call it "Exuberant Ctags"? + * 2. Why doesn't my editor work with these tag files? + * 3. What are these strange bits of text beginning with ;"? + * 4. Why doesn't XEmacs' Speedbar module work with Exuberant Ctags? + * 5. Why doesn't Xemacs correctly locate the tag in the source file? + * 6. Why doesn't NEdit correctly locate the tag in the source file? + * 7. Why can't I jump to "class::member"? + * 8. How can I avoid having to specify my favorite option every time? + * 9. Why do I end up on the wrong line when I jump to a tag? + * 10. How do I jump to the tag I want instead of the wrong one by the + same name? + * 11. What is "Vim"? + * 12. How can I locate all references to a specific function or variable? + * 13. Why does appending tags to a tag file tag so long? + * 14. How do I get regex support for Win32? + * 15. How should I set up tag files for a multi-level directory hierarchy? + + ---------------------------------------------------------------------- +1. Why do you call it "Exuberant Ctags"? + +Because one of the meanings of the word "exuberant" is: + + exuberant : produced in extreme abundance : PLENTIFUL syn see PROFUSE + +Compare the tag file produced by Exuberant Ctags with that produced by any +other ctags and you will see how appropriate the name is. + + ---------------------------------------------------------------------- +2. Why doesn't my editor work with these tag files? + +3. What are these strange bits of text beginning with ;" which follow + many of the lines in the tag file? + +These are "extension flags". They are added in order to provide extra +information about the tag that may be utilized by the editor in order to +more intelligently handle tags. They are appended to the EX command part of +the tag line in a manner that provides backwards compatibility with existing +implementations of the Vi editor. The semicolon is an EX command separator +and the double quote begins an EX comment. Thus, the extension flags appear +as an EX comment and should be ignored by the editor when it processes the +EX command. + +Some non-vi editors, however, implement only the bare minimum of EX commands +in order to process the search command or line number in the third field of +the tag file. If you encounter this problem, use the option "--format=1" to +generate a tag file without these extensions (remember that you can set the +CTAGS environment variable to any default arguments you wish to supply). Then +ask the supplier of your editor to implement handling of this feature of EX +commands. + + ---------------------------------------------------------------------- +4. Why doesn't XEmacs' Speedbar module work with Exuberant Ctags? + +The default command line switches used by XEmacs for "etags" are not +compatible with Exuberant Ctags options. By default, Exuberant Ctags installs +a symbolic link, "etags", pointing to the ctags executable. When Exuberant +Ctags is started with the name "etags", it produces Emacs-style tag files by +default. + +To fix this, add the following lines to your .emacs file, replacing the path +to "etags" with the path where the symbolic link was installed. + +(autoload 'speedbar "speedbar") +(setq speedbar-fetch-etags-command "/usr/local/bin/etags" + speedbar-fetch-etags-arguments '("-f" "-")) + + ---------------------------------------------------------------------- +5. Why doesn't Xemacs correctly locate the tag in the source file? + +This has been observed with version 20.3. It seems that when Xemacs searches +for a tag, it searches using the tag name instead of the search string located +in the TAGS file. This is a bug in Xemacs and does not occur in the GNU +version of Emacs. + + ---------------------------------------------------------------------- +6. Why doesn't NEdit correctly locate the tag in the source file? + +Versions of NEdit prior to 5.1 did not support the extended tag file format +generated by Exuberant Ctags by default. Either upgrade to version 5.1 or +specify the option "--format=1" when running ctags to output the old tag file +format. + + ---------------------------------------------------------------------- +7. Why can't I jump to "class::member"? + +Because, by default, ctags only generates tags for the separate identifiers +found in the source files. If you specify the --extra=+q option, then +ctags will also generate a second, class-qualified tag for each class member +(data and function/method) in the form class::member for C++, and in the form +class.method for Eiffel and Java. + + ---------------------------------------------------------------------- +8. How can I avoid having to specify my favorite option every time? + +Either by setting the environment variable CTAGS to your custom +options, or putting them into a .ctags file in your home directory. + + ---------------------------------------------------------------------- +9. Why do I end up on the wrong line when I jump to a tag? + +By default, ctags encodes the line number in the file where macro (#define) +tags are found. This was done to remain compatible with the original UNIX +version of ctags. If you change the file containing the tag without +rebuilding the tag file, the location of tag in the tag file may no longer +match the current location. + +In order to avoid this problem, you can specify the option "--excmd=p", +which causes ctags to use a search pattern to locate macro tags. I have +never uncovered the reason why the original UNIX ctags used line numbers +exclusively for macro tags, but have so far resisted changing the default +behaviour of Exuberant Ctags to behave differently. + + ---------------------------------------------------------------------- +10. How do I jump to the tag I want instead of the wrong one by the + same name? + +A tag file is simple a list of tag names and where to find them. If there +are duplicate entries, you often end up going to the wrong one because the +tag file is sorted and your editor locates the first one in the tag file. + +Standard Vi provides no facilities to alter this behavior. However, Vim +has some nice features to minimize this problem, primarly by examining all +matches and choosing the best one under the circumstances. Vim also provides +commands which allow for selection of the desired matching tag. + + ---------------------------------------------------------------------- +11. What is "Vim"? + +Vim is a vi-compatible editor available as source and compilable for any +platform. Yeah, I know the first reaction is to shy away from this. But you +will never regret getting it, and you will become greatly attached to its +features, which you can learn gradually. I would be willing to say that it +is the best vi-clone available within 4 light-years of Alpha Centauri. It +works (nearly) exactly like standard vi, but provides some incredibly useful +extensions (some of which I have participated in designing with the author). +Most Linux distributions have adopted Vim as its standard vi. + + ---------------------------------------------------------------------- +12. How can I locate all references to a specific function or variable? + +There are several packages already available which provide this capability. +Namely, these are: GLOBAL source code tag system, GNU id-utils, cscope, +and cflow. As of this writing, they can be found in the following locations: + +GLOBAL: http://www.gnu.org/software/global +id-utils: http://www.gnu.org/software/idutils/idutils.html +cscope: http://cscope.sourceforge.net +cflow: ftp://www.ibiblio.org/pub/Linux/devel/lang/c + + ---------------------------------------------------------------------- +13. Why does appending tags to a tag file tag so long? + +Sometimes, in an attempt to build a global tag file for all source files in +a large source tree of many directories, someone will make an attempt to run +ctags in append (-a) mode on every directory in the hierarchy. Each time +ctags is invoked, its default behavior is to sort the tag file once the tags +for that execution have been added. As the cumulative tag file grows, the sort +time increases arithmetically. + +The best way to avoid this problem (and the most efficient) is to make +use of the --recurse (or -R) option of ctags by executing the following +command in the root of the directory hierarchy (thus running ctags only once): + + ctags -R + +If you really insist on running ctags separately on each directory, you can +avoid the sort pass each time by specifying the option "--sort=no". Once the +tag file is completely built, use the sort command to manually sort the +final tag file, or let the final invocation of ctags sort the file. + + ---------------------------------------------------------------------- +14. How do I get regex support for Win32? + +You need to download the GNU regex package for Win32 from the following +location: + + http://people.delphiforums.com/gjc/gnu_regex.html + +Then point the makefile macro, REGEX_DIR, found in mk_mvc.mak and mk_bc5.mak, +to the directory created by extracting this archive. + + ---------------------------------------------------------------------- +15. How should I set up tag files for a multi-level directory hierarchy? + +There are a few ways of approaching this: + +1. A local tag file in each directory containing only the tags for source + files in that directory. + +2. One single big, global tag file present in the root directory of your + hierarchy, containing all tags present in all source files in the + hierarchy. + +3. A local tag file in each directory containing only the tags for source + files in that directory, in addition to one single global tag file + present in the root directory of your hierarchy, containing all + non-static tags present in all source files in the hierarchy. + +4. A local tag file in each directory of the hierarchy, each one + containing all tags present in source files in that directory and all + non-static tags in every directory below it (note that this implies + also having one big tag file in the root directory of the hierarchy). + +Each of these approaches has its own set of advantages and disadvantages, +depending upon your particular conditions. Which approach is deemed best +depends upon the following factors: + +A. The ability of your editor to use multiple tag files. + + If your editor cannot make use of multiple tag files (original vi + implementations could not), then one large tag file is the only way to + go if you ever desire to jump to tags located in other directories. If + you never need to jump to tags in another directory (i.e. the source + in each directory is entirely self-contained), then a local tag file + in each directory will fit your needs. + +B. The time is takes for your editor to look up a tag in the tag file. + + The significance of this factor depends upon the size of your source + tree and on whether the source files are located on a local or remote + file system. For source and tag files located on a local file system, + looking up a tag is not as big a hit as one might first imagine, since + vi implementations typically perform a binary search on a sorted tag + file. This may or may not be true for the editor you use. For files + located on a remote file system, reading a large file is an expensive + operation. + +C. Whether or not you expect the source code to change and the time it + takes to rebuild a tag file to account for changes to the source code. + + While Exuberant Ctags is particularly fast in scanning source code + (around 1-2 MB/sec), a large project may still result in objectionable + delays if one wishes to keep their tag file(s) up to date on a + frequent basis, or if the files are located on a remote file system. + +D. The presence of duplicate tags in the source code and the ability to + handle them. + + The impact of this factor is influenced by the following three issues: + + 1. How common are duplicate tags in your project? + + 2. Does your editor provide any facilities for dealing with duplicate + tags? + + While standard vi does not, many modern vi implementations, such + as Vim have good facilities for selecting the desired match from + the list of duplicates. If your editor does not support duplicate + tags, then it will typically send you to only one of them, whether + or not that is the one you wanted (and not even notifying you that + there are other potential matches). + + 3. What is the significance of duplicate tags? + + For example, if you have two tags of the same name from entirely + isolated software components, jumping first to the match found + in component B while working in component A may be entirely + misleading, distracting or inconvenient (to keep having to choose + which one if your editor provides you with a list of matches). + However, if you have two tags of the same name for parallel builds + (say two initialization routines for different hosts), you may + always want to specify which one you want. + +Of the approaches listed above, I tend to favor Approach 3. My editor of +choice is Vim, which provides a rich set of features for handling multiple +tag files, which partly influences my choice. If you are working with +source files on a remote file system, then I would recommend either +Approach 3 or Approach 4, depending upon the hit when reading the global +tag file. + +The advantages of Approach 3 are many (assuming that your editor has +the ability to support both multiple tag files and duplicate tags). All +lookups of tag located in the currect directory are fast and the local +tag file can be quickly and easily regenerated in one second or less +(I have even mapped a keystroke to do this easily). A lookup of a +(necessarily non-static) tag found in another directory fails a lookup in +the local tag file, but is found in the global tag file, which satisfies +all cross-directory lookups. The global tag file can be automatically +regenerated periodically with a cron job (and perhaps the local tag files +also). + +Now I give an example of how you would implement Approach 3. Means of +implementing the other approaches can be performed in a similar manner. + +Here is a visual representation of an example directory hierarchy: + +project + `-----misccomp + | `... + `-----sysint + `-----client + | `-----hdrs + | `-----lib + | `-----src + | `-----test + `-----common + | `-----hdrs + | `-----lib + | `-----src + | `-----test + `-----server + `-----hdrs + `-----lib + `-----src + `-----test + +Here is a recommended solution (conceptually) to build the tag files: + +1. Within each of the leaf nodes (i.e. hdrs, lib, src, test) build a tag + file using "ctags *.[ch]". This can be easily be done for the whole + hierarchy by making a shell script, call it "dirtags", containing the + following lines: + + #!/bin/sh + cd $1 + ctags * + + Now execute the following command: + + find * -type d -exec dirtags {} \; + + These tag files are trivial (and extremely quick) to rebuild while + making changes within a directory. The following Vim key mapping is + quite useful to rebuild the tag file in the directory of the current + source file: + + :nmap ,t :!(cd %:p:h;ctags *.[ch])& + +2. Build the global tag file: + + cd ~/project + ctags --file-scope=no -R + + thus constructing a tag file containing only non-static tags for all + source files in all descendent directories. + +3. Configure your editor to read the local tag file first, then consult + the global tag file when not found in the local tag file. In Vim, + this is done as follows: + + :set tags=./tags,tags,~/project/tags + +If you wish to implement Approach 4, you would need to replace the +"dirtags" script of step 1 with the following: + + #!/bin/sh + cd $1 + ctags * + # Now append the non-static tags from descendent directories + find * -type d -prune -print | ctags -aR --file-scope=no -L- + +And replace the configuration of step 3 with this: + + :set tags=./tags,./../tags,./../../tags,./../../../tags,tags + +As a caveat, it should be noted that step 2 builds a global tag file whose +file names will be relative to the directory in which the global tag file +is being built. This takes advantage of the Vim 'tagrelative' option, +which causes the path to be interpreted a relative to the location of the +tag file instead of the current directory. For standard vi, which always +interprets the paths as relative to the current directory, we need to +build the global tag file with absolute path names. This can be +accomplished by replacing step 2 with the following: + + cd ~/project + ctags --file-scope=no -R `pwd` + +-- diff --git a/sdk/ctags/INSTALL.oth b/sdk/ctags/INSTALL.oth new file mode 100644 index 0000000000..903460bf77 --- /dev/null +++ b/sdk/ctags/INSTALL.oth @@ -0,0 +1,84 @@ +If you are attempting to install Exuberant Ctags on a Unix-like platform +(one that can at least run a Bourne shell script) see the file INSTALL. + +Installation Notes +================== + +For non-Unix platforms, simple makefiles are provided: + + descrip.mms For VMS using either DEC C or VAX C + mk_bc3.mak For MSDOS using Borland C/C++ 3.x + mk_bc5.mak For Win32 using Borland C++ 5.5 + mk_djg.mak For MSDOS using DJGPP Gnu GCC (better to follow Unix install) + mk_manx.mak For Amiga using Aztec/Manx C 5.0 + mk_ming.mak For Win32 using Mingw32 + mk_mpw.mak For Macintosh using MPW + mk_mvc.mak For Win32 using Microsoft Visual C++ + mk_os2.mak For OS/2 using GCC (EMX) + mk_qdos.mak For QDOS using C68 + mk_riscos.mak For RISC OS using the GCC SDK + mk_sas.mak For Amiga using SAS/C + + +Special Notes +============= + +Win32: +------ + + Regex support on Win32 is available when compiled to use the Win32 port of + the Gnu regex library, which can be obtained here: + + http://people.delphiforums.com/gjc/gnu_regex.html + + See the makefiles, mk_mvc.mak or mk_bc5.mak, to learn how to build with + this library. + +DJGPP: +------ + + It is better to follow the standard Unix install on DJGPP, but this requires + that you use BASH and requires a fairly complete installation of GJGPP + packages. You can use mk_djg.mak if you can't run configure. + +Macintosh with MPW: +------------------- + + To build Ctags on MPW you will have to have the Metrowerks compilers + or you will have to edit the makefiles yourself. + + Since the makefile for MPW is called mk_mpw.mak you will have to give + the command: `Make -f mk_mpw.mak CTags` and then select the output + and execute it. Alternatively you could rename this makefile to + CTags.make and issue the command `Build CTags`. + + If the build process goes wrong make sure the line endings for the + makefile are set to MacOS (CR instead of LF). + + This version of Ctags only accepts and emits unix style paths. This was + done since it was easier to implement (few changes in main source files) + and since I ported Ctags to MPW to use with Pepper which also works with + unix style paths internally. Besides, since we're now moving to MacOS X + anyway, Mac programmers are getting used to unix style paths anyway. + + Example, suppose you have a project using PowerPlant which is located in + 'HD20:tools:PowerPlant:' and you want a tags file for all powerplant + sources and your projects sources. Go to the root directory of your + project and type: + + CTags -R . '/HD20/tools/PowerPlant/' + + The '.' in this command means current directory. You will also have to + put quotes around the full unix style path since / has a special meaning + in MPW. + +RISC OS: +-------- + + Regex support on RISC OS is available when compiled to use the RISC OS port + of the GNU regex library, which can be obtained from: + + + + Using 'Set RexEx$Path .' in the regex-0/12 directory will ensure + it can be found. diff --git a/sdk/ctags/Makefile.in b/sdk/ctags/Makefile.in new file mode 100644 index 0000000000..25e0efcbc0 --- /dev/null +++ b/sdk/ctags/Makefile.in @@ -0,0 +1,221 @@ +# $Id: Makefile.in,v 1.8 2003/07/27 22:09:58 darren Exp $ +# +# Makefile for UNIX-like platforms. +# + +# These are the names of the installed programs, in case you wish to change +# them. +# +CTAGS_PROG = ctags-le +ETAGS_PROG = etags-le + +# Set this to the path to your shell (must run Bourne shell commands). +# +SHELL = /bin/sh + +# GNU Autoconf variables. These are set by the "configure" script when it +# runs. +# +exec_prefix = @exec_prefix@ +prefix = @prefix@ +bindir = @bindir@ +srcdir = @srcdir@ +libdir = @libdir@ +incdir = @includedir@ +mandir = @mandir@ +SLINK = @LN_S@ +STRIP = @STRIP@ +CC = @CC@ +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ + +# If you cannot run the "configure" script to set the variables above, then +# uncomment the defines below and customize them for your environment. If +# your system does not support symbolic (soft) links, then remove the -s +# from SLINK. +# +#srcdir = . +#bindir = /usr/local/bin +#mandir = /usr/local/man +#SLINK = ln -s +#STRIP = strip +#CC = cc +#DEFS = -DHAVE_CONFIG_H +#CFLAGS = -O +#LDFLAGS= + +include $(srcdir)/source.mak + +# +#--- You should not need to modify anything below this line. ---# +# + +.SUFFIXES: +.SUFFIXES: .c .$(OBJEXT) + +VPATH = $(srcdir) + +INSTALL = cp +INSTALL_PROG = $(INSTALL) +INSTALL_DATA = $(INSTALL) + +READ_LIB = readtags.$(OBJEXT) +READ_INC = readtags.h + +MANPAGE = ctags.1 + +AUTO_GEN = configure config.h.in +CONFIG_GEN = config.cache config.log config.status config.run config.h Makefile + +# +# names for installed man pages +# +manext = 1 +man1dir = $(mandir)/man1 +CMAN = $(CTAGS_PROG).$(manext) +EMAN = $(ETAGS_PROG).$(manext) + +# +# destinations for installed files +# +CTAGS_EXEC = $(CTAGS_PROG)$(EXEEXT) +ETAGS_EXEC = $(ETAGS_PROG)$(EXEEXT) +DEST_CTAGS = $(bindir)/$(CTAGS_EXEC) +DEST_ETAGS = $(bindir)/$(ETAGS_EXEC) +DEST_READ_LIB = $(libdir)/$(READ_LIB) +DEST_READ_INC = $(incdir)/$(READ_INC) +DEST_CMAN = $(man1dir)/$(CMAN) +DEST_EMAN = $(man1dir)/$(EMAN) + +# +# primary rules +# +all: $(CTAGS_EXEC) $(READ_LIB) + +$(CTAGS_EXEC): $(OBJECTS) + $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) + +dctags$(EXEEXT): debug.c $(SOURCES) $(HEADERS) + $(CC) -I. -I$(srcdir) $(DEFS) -DDEBUG -g $(LDFLAGS) -o $@ debug.c $(SOURCES) + +readtags$(EXEEXT): readtags.c readtags.h + $(CC) -DREADTAGS_MAIN -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(LDFLAGS) -o $@ readtags.c + +ETYPEREF_OBJS = etyperef.o keyword.o routines.o strlist.o vstring.o +etyperef$(EXEEXT): $(ETYPEREF_OBJS) + $(CC) $(LDFLAGS) -o $@ $(ETYPEREF_OBJS) + +etyperef.o: eiffel.c + $(CC) -DTYPE_REFERENCE_TOOL -I. -I$(srcdir) $(DEFS) $(CFLAGS) -o $@ -c eiffel.c + +$(OBJECTS): $(HEADERS) config.h + +# +# generic install rules +# +install: @install_targets@ + +install-strip: install + +install-ctags: install-cbin install-cman +install-etags: install-ebin install-eman + +$(bindir) $(man1dir) $(libdir) $(incdir): + $(srcdir)/mkinstalldirs $@ + +FORCE: + +# +# install the executables +# +install-bin: install-cbin install-ebin install-lib +install-cbin: $(DEST_CTAGS) +install-ebin: $(DEST_ETAGS) +install-lib: $(DEST_READ_LIB) $(DEST_READ_INC) + +$(DEST_CTAGS): $(CTAGS_EXEC) $(bindir) FORCE + $(INSTALL_PROG) $(CTAGS_EXEC) $@ && chmod 755 $@ + +$(DEST_ETAGS): + - if [ -x $(DEST_CTAGS) ]; then \ + cd $(bindir) && $(SLINK) $(CTAGS_EXEC) $(ETAGS_EXEC); \ + fi + +# +# install the man pages +# +install-man: install-cman install-eman +install-cman: $(DEST_CMAN) +install-eman: $(DEST_EMAN) + +$(DEST_CMAN): $(man1dir) $(MANPAGE) FORCE + - $(INSTALL_DATA) $(srcdir)/$(MANPAGE) $@ && chmod 644 $@ + +$(DEST_EMAN): + - if [ -f $(DEST_CMAN) ]; then \ + cd $(man1dir) && $(SLINK) $(CMAN) $(EMAN); \ + fi + +# +# install the library +# +$(DEST_READ_LIB): $(READ_LIB) $(libdir) FORCE + $(INSTALL_PROG) $(READ_LIB) $@ && chmod 644 $@ + +$(DEST_READ_INC): $(READ_INC) $(incdir) FORCE + $(INSTALL_PROG) $(READ_INC) $@ && chmod 644 $@ + + +# +# rules for uninstalling +# +uninstall: uninstall-bin uninstall-lib uninstall-man + +uninstall-bin: + - rm -f $(DEST_CTAGS) $(DEST_ETAGS) + +uninstall-lib: + - rm -f $(DEST_READ_LIB) $(DEST_READ_INC) + +uninstall-man: + - rm -f $(DEST_CMAN) $(DEST_EMAN) + +uninstall-ctags: + - rm -f $(DEST_CTAGS) $(DEST_CMAN) + +uninstall-etags: + - rm -f $(DEST_ETAGS) $(DEST_EMAN) + +# +# miscellaneous rules +# +tags: $(CTAGS_EXEC) + ./$(CTAGS_EXEC) $(srcdir)/* + +TAGS: $(CTAGS_EXEC) + ./$(CTAGS_EXEC) -e $(srcdir)/* + +clean: + rm -f $(OBJECTS) $(CTAGS_EXEC) tags TAGS $(READ_LIB) + rm -f dctags$(EXEEXT) readtags$(EXEEXT) + rm -f etyperef$(EXEEXT) etyperef.$(OBJEXT) + +mostlyclean: clean + +distclean: clean + rm -f $(CONFIG_GEN) + +maintainerclean: distclean + rm -f $(AUTO_GEN) + +# +# implicit rules +# +.c.$(OBJEXT): + $(CC) -I. -I$(srcdir) $(DEFS) $(CFLAGS) -c $< + +# vi:set tabstop=8: diff --git a/sdk/ctags/NEWS b/sdk/ctags/NEWS new file mode 100644 index 0000000000..a93d6ed351 --- /dev/null +++ b/sdk/ctags/NEWS @@ -0,0 +1,796 @@ +Current Version: 5.6 + +ctags-5.6 (Mon May 29 2006) +* Reformatted code for independence of tab stop setting. +* Changed default configuration to disable installation of etags links. +* Changed --langmap to first unmap each supplied extension from other languages. +* Added support for ASP constants [ASP, Patch #961842]. +* Added support for GNU make extensions [Make]. +* Added .mk as extension recognized as a make language file [Make]. +* Added missing help for list-maps options [Bug #1201826]. +* Added new extension field "typeref" [thanks to Bram Moolenaar]. +* Extended functionality of Ruby parser with patch from Elliot Hughes [Ruby]. +* Fixed creation of TAGS file with etags-include but no files [Bug #941233]. +* Fixed problem reading last line of list file (-L) without final newline. +* Fixed infinite loop that could occur on files without final newline [C, Java]. +* Fixed incorrect tag for first field of table [SQL]. +* Fixed missing tags for functions beginning with underscore [Sh]. +* Fixed missing tags for functions with variable arg list [C, Bug #1201689]. +* Fixed parsing problem with parentheses in argument list [C, Bug #1085585]. +* Fixed problem in preprocessor directive handling [C, Bug #1086609]. + +ctags-5.5.4 (Thu Mar 25 2004) +* Fixed broken -R option. + +ctags-5.5.3 (Sun Mar 14 2004) +* Removed forgotten debug statement [Bug #811704]. +* Added support for Perl labels. +* Added support for Perl "use constant" [Perl, Patch #853704, Feature Request + #710017]. +* Added support for package qualification of tags, removing useless "package" + tag kind [Perl, Feature Request #448887]. +* Added support for "and" keyword [SML, Bug #816636]. +* Added support for variables [PHP]. +* Fixed problem destroying tag file with certain info options [Bug #845502]. +* Fixed portability problem [DJGPP]. +* Fixed problem of double characters in signature field [C, Bug #852368]. +* Fixed problem manifested by errant preprocessor conditionals [Bug #839162]. +* Fixed incorrect line address in tag file for SQL tags [SQL, Bug #823000]. +* Fixed incorrect recognition of POD paragraph [Perl, Bug #842077]. +* Fixed spurious tags for for C++ member templtates [C++, Bug #849591]. +* Fixed missing tags related to template specializations [C++, Bug #872494]. +* Fixed spurious local tags for statements following labels [C]. +* Fixed missing tags for certain scoped functions [Vim]. +* Fixed infinite loop in Fortran parser. +* Fixed missing tags for certain initializers [Fortran, Bug #877956]. +* Fixed problem with comment line after continuation character [Fortran, + Bug #858165]. + +ctags-5.5.2 (Wed Sep 17 2003) +* Added tags for local variables for C-based languages [C/C++/C#/Java/Vera, + Feature Request #449503]. +* Fixed compilation problem due to type change made to accomodate change of + return type of _findfirst() in VisualStudio.Net [Win32, Bug #775789]. +* Fixed problems with certain bit fields. + +ctags-5.5.1 (Wed Jul 30 2003) +* Changed supported tag kinds for Verilog parser during overhaul. +* Restored exit of program after --help, --license, and --version options [Bug + #717311, #751240]. +* Removed inclusion of general.h (GPL) from readtags.c (public domain). +* Added support for tags for labels [PL/SQL]. +* Added support for tags for constant definitions [PHP]. +* Fixed redundant parsing of configuration file [Windows, Bug #768814]. +* Fixed missing tags for definitions spanning lines [Verilog, Bug #762027]. +* Fixed compilation error for uncommon hosts. +* Fixed missing tags for Korn shell specific function definitions. [Sh, + Bug #769184] +* Fixed missing tags when semicolon separator appears [Fortran, Bug #734933]. +* Fixed missing tags when endsubroutine keyword appears [Fortran, Bug #726712]. +* Fixed problem with fixed-form line continuation following comment [Fortran, + Bug #726875]. +* Fixed missing tags for nested blocks [PL/SQL, Bug #722501]. +* Fixed missing tags for function typedefs [C]. +* Fixed inability to map empty extension when path contained dot [Bug #742689]. + +ctags-5.5 (Tue Apr 1 2003) +* Changed kind indicator for methods from 'f' to 'm' [Tcl]. +* Changed tags within interfaces to be disabled by default (like prototypes in + C/C++) [Fortran]. +* Removed explicit descriptions of individual ---types options from + --help output. See new --list-languages and --list-kinds options. +* Removed explicit list of supported languages and supported tag kinds and + mapping patterns from man page. See new --list-languages, --list-kinds, and + --list-maps options. +* Renamed ---types option to ---kinds (still accepts old name). +* Added --list-kinds option. +* Added --list-maps option. +* Added --list-languages option. +* Added support for dimensioned variables, contributed by Simon Bohlin [ASP]. +* Added support for C# language. +* Added support for Erlang language, contributed by Brent Fulgham. +* Added support for HTML language files. +* Added support for JavaScript language files. +* Added support for SML (Standard ML) language, contributed by Venkatesh Prasad. +* Added mapping for .plx to Perl. +* Added tags for autocommand groups [Vim, Patch #664685]. +* Added support for numerous language extensions [Fortran]. +* Added '$', 'D', and 'd' in column 1 as comment characters [Fortran]. +* Added special handling of --options=NONE to disable automatic reading of + options from configuration files or environment. +* Added check for case-insensitive filenames to configure. +* Fixed problem with lower case tag [Vim, Bug #657327]. +* Fixed problem recognizing indented code [Vim, Patch #664685]. +* Fixed problem with infinite loop in certain comments [PL/SQL, Bug #629115]. +* Fixed problem of incorrect extension field [C, Bug #639639]. +* Fixed problem of empty scoping extension field [C, Bug #639644]. +* Fixed missing tags for functions split across lines [PHP, Bug #681824]. +* Fixed missing tags for nested subprograms using 'contains' [Fortran, + Bug #670433]. +* Fixed missing tags when variable has same name as keyword [Fortran]. +* Fixed spurious tag when an array-spec occurs within an entity-decl [Fortran]. +* Fixed mishandling of multiline raw strings [Python, Bug #699171]. +* Fixed missing scope extension field on namespaces [C++, C#, Bug #665086]. +* Fixed several bugs causing missed tags [Fortran]. +* Fixed problem with --langmap option preventing clearing of map [Bug #688442]. +* Fixed recognition of Unicode-8 characters [Java]. +* Fixed man page errors and omissions. +* Fixed bug in readFieldValue() in readtags library. +* Fixed bug in option parsing in readtags command-line program. +* Fixed portability problems with DJGPP [Bug #692569]. +* Fixed portability problems with Cygwin. + +ctags-5.4 (Thu Oct 17 2002) +* Improved ability for tagsOpen() in readtags library to report failure to + open tag file, adding new fields to tagFileInfo structure. +* Improved Cobol support to include data, files, groups, and sections [Cobol]. +* Added '$' a valid character for C identifier [VMS]. +* Added support for recording routine argument declarations for C-like + languages. See the --fields option and man page section TAG FILE FORMAT for + more information [C, C++, Java]. +* Added class and method support to TCL parser [TCL]. +* Added support for PL/SQL language. +* Added support for Vera language, inspired by Dave Eggum [Vera]. +* Fixed problem terminating Perl POD block [Perl, Bug #612621]. +* Fixed problem re whitespace preceding subprogram name [Pascal, Bug #612019]. +* Fixed problem with leading spaces before instruction [TCL, Bug #615928]. +* Fixed problem with double precision functions [Fortran, Bug #620288]. +* Fixed inverted test causing TMPDIR to be used for temporary files when + ctags is setuid instead of when not setuid [Bug #623713]. + +ctags-5.3.1 (Thu Sep 12 2002) +* Renamed tagsSetSorted() to tagsSetSortType() and "sorted" member of + tagFileInfo structure of readtags library to "sort". +* Added new function, tagsFirst() to readtags library. +* Fixed incorrect tag kinds [Verilog]. +* Fixed null tags for unnamed BLOCK DATA statements [Fortran]. +* Fixed missing tags for function preceded by "" [Vim]. +* Fixed missing tags for equate statements not in column 1 [Asm, Bug #538629]. +* Fixed Ruby parser (why didn't the compiler report my screw-up?) [Ruby]. + +ctags-5.3 (Wed Jul 17 2002) +* Allowed --etags-include option without input files. +* Changed Asm parser to back to C-based parser to remove redundant tags, + and extending its support for more variants [Asm]. +* Changed to using _tempnam() to create temporary files on Windows, allowing + "TMP" environment variable to set temporary directory. +* Changed the -x output to match that of traditional ctags when the --format=1 + option is supplied. The new format was also changed slightly to conform more + closely to the original format, with the addition of the extra tag type field. +* Added support for Verilog language, submitted by Nam SungHyun. +* Added support for RISC OS platform, contributed by Andrew Wingate. +* Added support for "#pragma weak", generating macro tags for weak symbols [C]. +* Added support for mixins and class methods to Ruby parser, submitted by + Matthias Veit [Ruby]. +* Added support to ctags and readtags library for case-folded sorting of tag + files, submitted by Flemming Madsen. +* Added identification of class methods [Python]. +* Fixed portability problems [Bugs #541997, #571240]. +* Fixed bug in configure script [Solaris, Bug #542966]. +* Fixed invalid package name tags [Perl, Bug #535068]. +* Fixed failure to output relative paths into etags TAGS files on Win32 + [Bug #568365]. +* Fixed incorrect line address in cases of line continuation [Fortran]. +* Fixed missing tags for certain cases of invalid syntax [C]. +* Fixed missing tags in Fortran with HPF extensions [Fortran, Bug #565813]. +* Fixed spurious tag for clients portion of feature clause when following + an empty feature clause [Eiffel]. + +ctags-5.2.3 (Sun Feb 24 2002) +* Fixed portability problem in makefile [Solaris, FreeBSD]. +* Fixed infinite loop for certain cases of invalid syntax [Eiffel]. +* Changed Asm parser to regex, extending its support for more variants [Asm]. + +ctags-5.2.2 (Sat Feb 16 2002) +* Fixed spurious tags following empty feature clause [Eiffel]. +* Fixed missing tags for classes specifying generic creation routine [Eiffel]. +* Fixed missing tags when label not followed by white space [YACC]. +* Fixed for portability [Solaris, MacOS X]. +* Added support for type reference tool [Eiffel]. + +ctags-5.2.1 (Sun Jan 20 2002) +* Portability fixes [Mingw32]. +* Added "RCS" and "CVS" to list of directories excluded by default. +* Fixed missing tags for function pointers declared const or volatile + [C, Bug #503764]. + +ctags-5.2 (Sun Dec 23 2001) +* Portability fixes [HP-UX, Solaris, VMS, OS/2]. +* Made code compilable by a C++ compiler. +* Changed reading of option files to ignore blank lines. +* Changed and enhanced interface to readtags library (see readtags.h). +* Changed from using addLanguageRegex() to addTagRegex() in regex-based + parsers. +* Added support for Lua language, submitted by Max Ischenko. +* Added instructions to man page on using tags with NEdit. +* Added setargv.obj to link for wildcard expansion [MSVC]. +* Added capability to have regex invoke a callback in a regex parser. +* Fixed regex tag problem which left newlines in back-references. +* Fixed missing class-qualified tags [Eiffel]. +* Fixed spurious tags for entries in final indexing clause [Eiffel]. +* Fixed problem with invalid filenames in preprocessor line directives. +* Fixed bug parsing scoped variables (e.g. "b:variable") [Vim, Bug #487608]. +* Fixed problem compiling readtags.c on some hosts. +* Fixed memory overwrite problem in readtags library. + +ctags-5.1 (Tue Nov 06 2001) +* Changed name of option configuration files for MSDOS, MSWindows, and OS/2. +* Changed regex support to enforce REG_NEWLINE. This fixes problem where the + newline character was explicity being matched by user patterns [Bug #431477]. +* Added new public domain library for reading tag files (see readtags.h). +* Added support for variables and namespaces, provided by Jay Glanville [Vim]. +* Added report of non-options in option configuration files and CTAGS + environment variable. +* Added support for YACC language, submitted by Nick Hibma [YACC]. +* Added support for Perl packages, submitted by Nick Hibma [Perl]. +* Added '$' as valid identifier character for DEC C compiler [VMS, Bug #425147]. +* Added compilation date and time to --version output. +* Added configure check for HP-UX to determine if ANSI options needed [HP-UX]. +* Removed tags for forward class/struct declarations [C/C++, Bug #432563]. +* Eliminated ;" separator from end of tag line when no extension fields are + present. +* Fixed segmentation violation for some Lisp files [Lisp]. +* Fixed segmentation violation occurring when file referenced in #line + directive was from an unknown language. +* Fixed loss of sync when parsing bit fields named with C++ reserved word [C]. +* Fixed compilation problem on gcc-2.7.2. +* Fixed problem parsing verbatim strings [Eiffel]. +* Fixed problem with PHP references [PHP]. +* Fixed handling of Perl __DATA__ sections [Perl]. +* Fixed problem resulting from white space in tag name due to regex name + specifier. +* Fixed double reading of $HOME/.ctags when current directory is $HOME. +* Fixed problem reading option configuration files using CR-LF newlines. +* Fixed problem preventing output control over tag kinds of regex patterns + [Bug #429869] +* Fixed incorrect parsing of Vim functions with ':' modifiers [Bug #466517]. + +ctags-5.0.1 (Sun Apr 15 2001) +* Fixed problem checking recursive links [SunOS 4.x]. +* Improved security on hosts where mkstemp() is not available. + +ctags-5.0 (Sun Mar 18 2001) +* Restructured code to simplify support for new language parsers. +* Changed source code to use ANSI-style function definitions. +* Changed scope-qualified tag entries to omit enumeration name [C/C++]. +* Changed reading of files supplied to -I option to read one token per line. +* Changed reading of option files to read one argument per line. +* Changed default extension fields, now controlled by new option --fields. +* Changed detection of etags invocation to accept any name containing "etags". +* Removed -p option, which only caused confusion and is rendered obsolete by + the change immediately above. +* Removed 'A' flag to the --c-types, --eiffel-types, and --java-types + options, replacing its functionality with the new --fields option. +* Removed 'C' flag to the --c-types, --eiffel-types, and --java-types + options, replacing its functionality with the new --extra option. +* Deprecated -i option, which was long ago replaced with the --c-types option. +* Deprecated --file-tags option, now incorporated into new --extra option. +* Deprecated --kind-long option, now incorporated into new --fields option. +* Renamed --lang[uage] option to --language-force. +* Renamed makefiles for non-Unix platforms. +* Improved parsing of assembly language files [Asm]. +* Improved parsing of Fortran language files, adding new tag kinds [Fortran]. +* Added documentation explaining how to extend ctags with new parsers. +* Added support for regular expressions, using either Posix or Gnu interface. +* Added support for mapping file names to languages using shell patterns. +* Added support for ASP scripts, submitted by Patrick Dehne [ASP]. +* Added support for Makefiles [Make]. +* Added support for Pascal language [Pascal]. +* Added support for PHP scripts, submitted by Jesus Castagnetto [PHP]. +* Added support for REXX language [REXX], based on submission by Alexaner Mai. +* Added support for Ruby, submitted by Thaddeus Covert [Ruby]. +* Added support for S-Lang, submitted by Francesc Rocher [SLang]. +* Added support for Macintosh platform using MPW (by Maarten Hekkelman). +* Added .tk as recognized extension [Tcl]. +* Added .cp and .hp as C++ extensions [C++]. +* Added .zsh as shell script extension [Sh]. +* Added support for trigraphs for C-based languages [C/C++]. +* Added language recognition for shell scripts using "#!/usr/bin/env command". +* Added check for recursive directory links. +* Added support for "[" form of verbatim strings [Eiffel]. +* Added --exclude option to exclude directories while recursing. +* Added --fields option to specify extension fields to include in output. +* Added --extra option to allow control over extra tags. +* Added --regex- option to define language-specific regular expressions. +* Added ---types options for all supported languages. +* Added --langdef option to define new languages to be parsed with regex. +* Added --languages option to restrict set of languages scanned for tags. +* Added --tag-relative option to make file paths recorded in tag file relative + to location of tag file itself instead of the current working directory when + file arguments are specified using relative paths. +* Added restriction of permissions of created temporary files when mkstemp() + is not available for security. +* Reimplemented line directive handling to work for all languages. +* Fixed tag generation for packages [Java]. +* Fixed Lisp parser [Lisp]. +* Fixed Mingw32 port [Win32]. +* Fixed bug in procedure name parsing [Tcl]. +* Fixed bug resulting in wrong column being checked for paragraphs [Cobol]. +* Fixed bug in language dispatch for executable "#!" scripts [Unix]. +* Fixed bugs resulting in incorrect scope entries in tag file [C++/Java]. +* Fixed warning caused by reinstallation of etags link [Unix]. +* Fixed destruction of existing tag file when no files supplied on invocation. +* Fixed problem in Makefile.in which prevented configuring and building in + non-source directory. Also changed Makefile.in to generate and use correct + object and executable file extensions when run on Win32. + +ctags-4.0.3 (Sun Jul 16 2000) +* Fixed compiler warnings [Amiga]. +* Fixed problem in configure.in causing struct stat st_ino member test to fail. +* Fixed problem with TAGS entries for files using DOS-style (CR-LF) new lines. +* Improved algorithm for locating Perl functions and skipping pods. +* Improved algorithm for locating shell functions [Sh]. +* Renamed Makefile.amiga to Makefile.manx [Amiga]. +* Added Makefile.sas for SAS C compiler [Amiga]. +* Updated Makefile.qdos [QDOS]. +* Improved support for DECC compiler [VAX]. + +ctags-4.0.2 (Mon Jul 10 2000) +* Now silently ignore -w option for backwards compatibility with SVR4 ctags. +* Fixed bug resulting in no extension flags when using --kind-long option. + +ctags-4.0.1 (Wed Jun 28 2000) +* Fixed segmentation violation when using --file-tags. + +ctags-4.0 (Thu Jun 22 2000) +* Fixed infinite loop on certain syntactically invalid class constructs [C++]. +* Fixed problem of incorrect tags for some pure virtual functions [C++]. +* Fixed inability to clear all tag types when using --c-types= (all languages). +* Fixed problem of arguments to parameterized class being reported as + ancestors in the "inherits" extension flag. +* Fixed missed tags for typedef-ed function pointers having a PROTO((a,b)) + style argument list. +* Fixed missing file tags for referenced files when using --line-directives + option [C/C++]. +* Fixed failure to recognize drive-qualified file name as a file name when + supplied as argument to -I option [Win32]. +* Fixed problem with missing comma in "inherits" extension flag [Java]. +* Fixed problem with incorrect or redundant parents listed for "inherits" + extension flag [Java]. +* Added check to avoid recursive symbolic links to directories. +* Added warning message for -i option, which is deprecated and being dropped. +* Added support for Assembler, COBOL, LISP, PERL, and Scheme, taken from Gnu + etags. +* Added support for AWK, Bourne/Korn/Z Shell, Python, TCL, and Vim scripts. +* Added support for the BETA language, submitted by Erik Corry. +* Added ability to determine language from interpreter specified in first line + of executable files if they are not recognized by their extension. +* Added --options option. +* Added ability to specify files having no extension with -h and --langmap + options. +* Added compile time option to separate path components with a unix-style path + separator for sharing tag file across platforms, enabled by defining the + label UNIX_PATH_SEPARATOR [Win32]. +* Fixed portability issues [VMS]. + +ctags-3.5.2 (Mon Apr 24 2000) +* Fixed problem preventing Emacs-style tags from being written to stdout. + +ctags-3.5.1 (Sun Apr 23 2000) +* Fixed infinite loop in writing Emacs-style TAGS file on platforms using + tmpnam() instead of mkstemp() [Win32]. +* Fixed minor problems in Borland makefiles [Win32]. +* Fixed compiler warning [DJGPP]. + +ctags-3.5 (Fri Apr 14 2000) +* Fixed core dump when including access field in tag file [Java]. +* Fixed failure to identify end of statement for block statements [Java]. +* Fixed bug with lone "end" in feature adaptation part of inheritance clause + [Eiffel]. +* Fixed problem preventing const functions from being recognized as pure + virtual [C/C++]. +* Fixed problem with no tags found after certain macro calls [C/C++]. +* Fixed bug in descrip.mms build file [VMS]. +* Changed to use mkstemp() (when available) to create temporary files for + security reasons and allow configuring default temporary directory, and to + override this directory at run-time by setting TMPDIR environment variable. +* Added support for extracting inheritance information into new "inherits" + extension flag [C++, Java]. +* Added Makefile.bc5 for Borland C++ version 5.5 compiler (free version). +* Added new question to FAQ regarding Xemacs. +* Updated FAQ regarding new release of NEdit. +* Renamed Borland 3.1 makefile from Makefile.bcc to Makefile.bc3. +* Renamed Microsoft Visual C++ makefile from Makefile.w32 to Makefile.mvc. + +ctags-3.4 (Thu Jan 13 2000) +* Fixed sorting problems when LC_ALL environment variable was set to foreign + locale (not fixed by previous release). +* Fixed nested scoping reported in extension flags and class-qualified tags. +* Eliminated generation of class-qualified tag entries when --c-types=+C + option is in effect but scope is empty (e.g. "::main"). +* Added support for default access of class members in Java. +* Added new extension flag "implementation", which indicates if a routine or + class is virtual or abstract. +* Minor changes for OS/2 compilation. + +ctags-3.3.3 (Thu Dec 16 1999) +* Changed how input is read for -L and --filter options to permit file names + containing spaces (see man page). +* Fixed scope recorded for C++ class elements, especially in namespaces. +* Fixed spurious tag generated for MODULE PROCEDURE in interfaces [Fortran]. +* Fixed sorting problems when LC_ALL environment variable was set to foreign + locale. +* Fixed crash on Windows when compiled with Mingw32 gcc compiler. +* Fixed compilation problems on Cray. + +ctags-3.3.2 (Fri Sep 24 1999) +* Fixed compile problem on AIX 4.1. +* Improved recovery from syntax error [Fortran]. +* Changed name of configure option (now --enable-custom-config). +* Changed Makefile.bcc to optimize for space, since code size exceeded 64KB. + +ctags-3.3.1 (Mon Sep 20 1999) +* Fixed segmentation violation occurring when directory recursion was selected. +* Fixed misleading message when out of memory during internal sort. + +ctags-3.3 (Fri Sep 17 1999) +* Fixed missing class-qualified tags [Java]. +* Fixed missing tag for functions having function pointer argument [C]. +* Fixed parsing of conversion functions [C++]. +* Added missing space following "operator" keyword to the tag names generated + for function call operators [C++]. +* Fixed string parsing to retry file as free source form upon EOF [Fortran]. +* Fixed missing tags following comments [Fortran]. +* Fixed missing labels for free source form [Fortran]. +* Removed 72 character limit for fixed form source lines, since many compilers + relax this limit and it is commonly taken advantage of. This was sometimes + causing fixed form source to be parsed as free form source [Fortran]. +* Changed misleading message when file could not be accessed. +* Changed behavior of --verbose option to display option processing. +* Changed -I option to permit clearing the token list with "-I-". +* Changed --lang option to accept new "auto" parameter. +* Changed --langmap option to accept new "default" parameter. +* Changed --eiffel-types option to accept new 'C' flag to generate + class-qualified tags. +* Changed -h option to accept new "default" parameter. +* Changed option processing. Most options may now appear anywhere on the + command line, affecting only those files which follow them. +* Added ability to specify default options in any of the files /etc/ctags.conf, + /usr/local/etc/ctags.conf, $HOME/.ctags, .ctags, and one optional file, + which can be supplied at configure time. +* Added --filter option. +* Added --filter-terminator option. + +ctags-3.2.4 (Thu Jul 01 1999) +* Changed name of macro in Makefile.in to avoid being overriden by CTAGS + environment variable. + +ctags-3.2.3 (Mon Jun 21 1999) +* Small portability change for EMX compiler on OS/2. +* Slight change to W32 and BCC makefiles. + +ctags-3.2.2 (Sat May 29 1999) +* Fixed endless error loop in the case of unreadable file. +* Fixed redundant include entries in TAGS file when using --etags-include. + +ctags-3.2.1 (Wed May 09 1999) +* Fixed problem reading -I token list from file. +* Fixed with "using" declarations which corrupted tag file [C++]. +* Fixed configure.in to more reliably recognize existing prototypes. +* Added ability to ignore preprocessor directives in Fortran files. +* Added support for egcs/MingW32 compiler [Win32]. + +ctags-3.2 (Wed Mar 03 1999) +* Fixed spurious tags related to export specifiers of feature clauses [Eiffel]. +* Fixed problem with template in ctor-initialer [C++]. +* Fixed typo causing compiler error [MSVC]. +* Extended -I option to allow token replacement [thanks to Flemming Madsen]. +* Added --etags-include option to support TAGS file includes. +* Added support for QDOS [thanks to Thierry Godefroy]. + +ctags-3.1.2 (Tue Jan 26 1999) +* Changed extension flags to eliminate space between label and value to remain + true to the intent of the agreement on the extended format made with editor + authors. +* Added --links option to permit ignoring symbolic links. +* Fixed missing tags upon ANSI style variable function argument lists. +* Fixed missing tags for methods with fully qualified type names in argument + list [Java]. +* Fixed double tags generated for enumerators followed by comma. +* Fixed missing path prefix for -p option [Win 95/NT]. + +ctags-3.1 (Wed Jan 20 1999) +* Changed -h and -langmap options to accept a plus sign as the first character + of their arguments to indicate that arguments should be added to current. +* Changed default for member tags to 'on' [C/C++]. +* Changed default for local entities to 'off' [Eiffel]. +* Added tags for forward class/struct/union/enum declarations when using + -c-types=+x [C/C++]. +* Fixed memory overwrite bug causing general protection fault [Win 95/NT]. +* Fixed missing tags for methods with throws clause [Java]. +* Fixed bad tags generated for null macro names [C]. +* Fixed spurious tag for features and entities of BIT type [Eiffel]. +* Fixed spurious tags when local entity declaration list was empty [Eiffel]. +* Fixed missing tags for contructors and destructors [C++]. +* Fixed failure to recognize function when declaration for first argument + was of template type [C++]. + +ctags-3.0.3 (Mon Dec 21 1998) +* Fixed mistake made in previous version which caused macro tags to be missed. +* Fixed parsing of --langmap option. + +ctags-3.0.2 (Mon Dec 21 1998) +* Added tags for names undefined with #undef [C/C++]. +* Added tags for renamed features (Eiffel). +* Improved Emacs-style tag file contents (per Ian Zimmerman). +* Fixed problem handling deferred, external, once, obsolete features in Eiffel. +* Fixed porting problem [OSF1 V4.0]. + +ctags-3.0.1 (Sat Dec 12 1998) +* Fixed problem with certain macros and functions with no declared return type. +* Fixed problem causing endless loop on MSDOS/Win32 by restoring use of binary + mode on opening of source files. +* Fixed porting problems [SunOS 4.1.x and MSVC++ 5.0]. + +ctags-3.0 (Sun Dec 06 1998) +* Added support for the Eiffel language (everyone should learn Eiffel). +* Added support for the Fortran language. +* Added --c-types option to specify tag types to be included for C/C++. +* Added --eiffel-types option to specify tag types to be included for Eiffel. +* Added --fortran-types option to specify tag types to be included for Fortran. +* Added --file-scope option to place verbose tag description into tag file. +* Added --file-tags option to place tags for source file names into tag file. +* Added --java-types option to specify tag types to be included for Java. +* Added --kind-long option to place verbose tag description into tag file. +* Added --linedirectives option to enable processing of #line directives so + that running ctags on preprocessor output can generate line numbers and file + names which correspond to the original source files. +* Added -V option to enable verbose message for each file considered. +* Added special handling for macros of form "INIT(= value)". +* Added ability to suffix an ignored identifier (-I option) with the '+' + character, thus instructing ctags to also ignore any argument list which + may follow the identifier. +* Changed the -i option, moving Java language options to the new --java-types + option. The -i option is now deprecated in favor of the new language + specific tag type options. +* Changed behavior of handling of ignored identifiers (-I option) to still + generate a tag for any macro definition for that identifier. +* Changed handling of -h option so that include files are no longer assumed to + be C++ files. +* Changed tags for operators to always precede the operator with the string + "operator ", thus making it consistent for all operators. [C++] +* Changed C/C++ parsing, catching many more tricky constructs. +* Changed extension flags to place a space between the label and the value for + readability. +* Fixed core dump which occurred when using -iF (now --file-tags) together + with -e (etags) on a zero-length file. +* Fixed missing or incorrect tags for conversions operators or operator "()". +* Fixed incorrect parent class in extension flags for type declarations of the + form "class Bar { OtherClass::sometype foo; }". +* Fixed missing tags for "friend" and "static" prototypes in header files. +* Fixed problem of external "sort" reporting locale not available on HPUX. +* Fixed -p option. +* Fixed VMS support. It should now work for any source file type. + +ctags-2.3.2 (Wed Sep 09 1998) +* Fixed -h option; broken since version 1.7, yet only just reported. + +ctags-2.3.1 (Sun Aug 30 1998) +* Fixed improper handling of derived structs. +* Fixed wrong class name tag when a nested-name-specifier was present in class + declaration. +* Added parent information into tag extension flags for data structures to + match that already present for members. +* Add missing documentation for --langmap option in the --help output. +* Eliminated compiler warning [gcc 2.8.1]. + +ctags-2.3 (Thu Aug 20 1998) +* Eliminated compiler warnings [SGI MIPSpro]. + +ctags-2.2.7 (Mon Aug 17 1998) +* Fixed porting problem [Borland C++]. + +ctags-2.2.6 (Wed Aug 12 1998) +* Fixed core dump encountered on some platforms when the CTAGS environment + variable was set but empty. +* Fixed porting problem [MSVC]. +* Added directory recursion support for Amiga. + +ctags-2.2.3 (Sun Aug 02 1998) +ctags-2.2.2 (Fri Jul 24 1998) +* Fixed porting problems [AIX, HP-UX, OSF/1, SunOS, MSVC]. + +ctags-2.2.1 (Fri Jul 24 1998) +* Now uses a default directory name of "." when using -R or --recurse option + (e.g. "ctags -R" is equivalent to "ctags -R ."). +* Directories named "SCCS" are skipped when using the -R or --recurse option + under Unix. +* Fixed porting problems [HP-UX, IRIX, SunOS, MSDOS/Windows]. + +ctags-2.2 (Mon Jul 20 1998) +* Added the --recurse and -R options to allow recursing into directories. + This allows running ctags on an entire source directory tree using the + single command "ctags -R ". Currently, this option is only supported on + UNIX, MSDOS, Windows 95/NT, and OS/2. Other platforms will have to wait. +* Changed writing of Emacs-style TAGS file to binary mode [MSDOS/Windows]. +* Fixed porting problems [HP-UX, OSF/1]. + +ctags-2.1.1 (Mon Jul 06 1998) +* Changed -h option to allow only periods to separate extensions. +* Added the --langmap option to allow overriding the default associations + between source language and file extension. +* Added configuration check and code work-around for putenv() prototypes + missing the const from the argument declaration [IRIX 5.2 and CRAY J90]. +* Added makefile for VMS. +* Fixed porting problem [HP-UX]. + +ctags-2.1 (Wed Jul 01 1998) +* Added Java support. +* Eliminated the --keywords option introduced in the 2.0.4, replacing it with + automatic detection of the language (i.e. recognized keywords) based upon + the file extension. +* Added the --lang option for manually overriding the automatic selection of + the language. +* Added new flag 'i' to the -i option to allow generating tags for Java + interfaces. +* Added new flag 'n' to the -i option to allow generating tags for C++ + namespaces. +* Added new flag 'x' to the -i option to allow generating tags for extern + variable declarations. +* Added new extension flags, "private", "protected", and "public", which + indicate the visibility of class members when it can be determined. +* Changed behavior of flag 'C' of the -i option to add tags of form + "class.member" for Java. +* Changed how files on command line are handled. Ctags will now only scan + those files whose extensions it knows about unless the --lang option is + specified. This allows running ctags on all files in a directory without + having to be specific (e.g. "ctags *"). +* Removed support for duplicate tag warnings and the -w and -W options. These + options are silently ignored for now. + +ctags-2.0.4 (Sat May 23 1998) +* Added sorting time to the output of the --totals option. +* Added the --keywords option to allow restricting the recognized + declaration keywords in order to handle legacy source code which uses + newer keywords for variable and parameter names. +* Ignore list now also applies to macro tags. +* /dev/stdout now properly handled as parameter to -f/-o option. +* Fixed problem handling an operator definition in C++ when white space + appeared between the "operator" keyword and the operator (e.g. "="). +* Fixed handling of non-symbolic operators (e.g. "new", "delete", etc.). +* Fixed sort order problem for some locale settings. +* Fixed segmentation violation when using ignore list (-I) on SunOS 4.x. +* Fixed a segmentation violation caused by a stack overwrite when testing a + particular kind of non-standard tag file format. + +ctags-2.0.3 (Sun Mar 12 1998) +* Added configure check for "strip" program. +* Added new flag 'C' to the -i option to allow adding extra tags to the tag + file in the form "class::member" for class methods and members. + +ctags-2.0.2 (Wed Feb 25 1998) +* Added stripping of installed binary for "install" target. + +ctags-2.0.1 (Thu Feb 19 1998) +* Added support for C++. +* Added new flag 'F' to the -i option to allow adding an extra tag for the + basename of each source file supplied to ctags. This provides the ability to + jump to a source file in Vi using ":tag file.c". +* Added new flag 'm' to generate tags for class, structure, and union members + (disabled by default). +* Added several new flags to the -i option to allow finer specification of + which types of tags to include/exclude. +* Added ".hh" extension to the default list of files recognized as header + files. +* Added explicit handling of special gcc construct __attribute((..)), + which could lead to incorrect tag generation. +* Added configure option --disable-extended-format to allow building ctags + with the extended format disabled by default. +* Added configure option --enable-macro-patterns to change the default + behavior of ctags to generate patterns instead of line numbers for macro + (define) tags. +* Changed configure option --enable-internal-sort to --disable-external-sort. +* Changed makefile for OS/2. +* Removed support for the -d, -t and -T options which had been deprecated + for some time. +* Removed ANNOUNCE file in distribution, consolidating it with the README + file. +* Replaced CHANGES file with NEWS for more GNU-like standard distribution. +* Improved the detection of macros of the type generated by Microsoft Visual C + when generating source code. These caused subsequent statements to fail to + have tags generated for them. Still not bullet proof, though. +* Fixed a problem which prevented the use of / as a path separator under MSDOS + and Win 95/NT. +* Fixed problem of blank lines occuring in the tag file. +* Fixed recognition of declarations with parentheses. +* Fixed problem of missing tags for objects within extern "C" blocks. +* Fixed problem in source file counts when using --totals option. +* Extended the length of tag type field in -x output to be more verbose. +* Fixed option initialization error which caused static tags to be excluded. + +ctags-1.7 (Mon Oct 13 1997) +* Tag files now use a new extended format which is backwards compatible with + existing Vi implementations, yet provides extended information which can be + used by supporting editors. +* Added documentation pseudo-tags (e.g. !_TAG_FILE_FORMAT) to tag file. +* Added the --excmd option as alternative to the -n and -N options. +* Added the --format option to allow forcing the old-style tag file format. +* Added the --if0 to control how "#if 0" branches are handled. +* Added the --sort option as alternative to -u option. +* Added the --totals option to print statistics of tag generation. +* Added the --version option. +* Improved handling of preprocessor conditionals. +* Code within an #if 0 is now never scanned for non-macro tags by default + since tags within that code could conceivably be overridden by more + desirable tags in the #else branch to follow. Macro tags in these branches + are always included. +* Fixed problem which could leave invalid tag entries in tag file when an + internal re-scan of a source file occurred. +* Fixed problem with internal sort mechanism when appending tags to existing + file. +* Changed external sort command to filter out duplicate identical tags lines + (including the pattern) unless warnings for duplicate tags are enabled. +* Added data to emacs style tag entries to more closely match that produced by + the GNU etags. +* Removed fixed limits on maximum tag line length. +* Correction to Amiga makefile. +* Improvements to Win32 portability with changes to Makefile.w32. + +ctags-1.6 (Tue May 13 1997) +* Now using GNU autoconf to permit automatic host configuration. +* Added the -e option to generate Emacs style tag files +* Added ETAGS environment variable to be used when -e option is in effect. +* Added the -p option to supply a default path for source files. +* Fixed problem of incorrect line numbers in tag file when form feeds and + vertical tabs occured in the source file. +* Fixed problem preventing ignoring of identifiers specified via the -I option + when the identifiers were followed by a parameter list in the source code. +* Changed the search patterns generated for #define macros when using -N + option. It now includes the character following the name (or "$" if end of + line) instead of the "\>" used previously. Some editors did not support this + metacharacter for tag searches. +* Removed -u (unique) flag from sort command line invocation to retain exactly + indentical tag patterns in the same file. This is in preparation for editor + support of duplicate tags. +* Fixed problem resulting in no tags generated following a function-like + macro reference outside of a function block. +* Fixed problem of no tags generated for typedef for function or function + pointer. +* Fixed problem of no tags generated after encountering strange function + declarations (e.g. "foo(params) saywhat (void);") + +ctags-1.5 (Sat Oct 5 1996) +* Added generation of tags for objects inside C++ extern blocks (e.g. + 'extern "C" {...}' construct). +* Added generation of tags for function definitions inside brace-enclosed + ("{}") blocks, since function definitions are allowed inside classes and + extern blocks. +* Added the -N option to force patterns to be used for all tags (including + macro tags). +* Changed the search patterns generated for macro definitions to be terminated + with "\>", which allows the pattern to still match even when the #define + line beyond the macro name is changed. +* Fixed problem resulting in no tags generated for files containing a + function-like macro, such as 'MODULE_ID("$Id")', even when ignoring the + keyword. This also fixed a problem that caused tags to be missed for + initialized function pointer definitions. +* Redirected error messages to stdout for MSDOS version. + +ctags-1.4 (Sun Aug 18 1996) +* Added recursive parsing of class/struct/enum blocks to look for + class/struct/enum tags and enumeration values. +* Added the -I option to specify keywords to ignore in the source files. +* Fixed problem resulting in no tag generated when declaring a pointer const + or volatile. +* Fixed problem resulting in no tag generated for comma terminated function + declarations. + +ctags-1.3 (Sun Jun 16 1996) +* Fixed problem problem which caused "struct tag;" to be misinterpreted as a + variable definition. +* Added the -n option to use line numbers in the tag file instead of patterns. +* Added the -? option as an alternative for the --help option. + +ctags-1.2 (Wed Jun 5 1996) +* Fixed a problem caused by an unitialized variable. + +ctags-1.1 (Tue Jun 4 1996) +* Fixed problem reading parameter list to the -h option. + +ctags-1.0a (Mon Jun 3 1996) +* Added ctags.lsm to distribution + +ctags-1.0 (Fri May 31 1996) +* First public release. + +vim:tw=78 diff --git a/sdk/ctags/README b/sdk/ctags/README new file mode 100644 index 0000000000..eae1399b48 --- /dev/null +++ b/sdk/ctags/README @@ -0,0 +1,73 @@ +Exuberant Ctags +=============== +Author: Darren Hiebert + http://ctags.sourceforge.net + Instant Messaging: + Yahoo! ID : dbhiebert + AIM ScreenName: darrenhiebert + +Exuberant Ctags is a multilanguage reimplementation of the much-underused +ctags(1) program and is intended to be the mother of all ctags programs. It +generates indexes of source code definitions which are used by a number of +editors and tools. The motivation which drove the development of Exuberant +Ctags was the need for a ctags program which supported generation of tags +for all possible C language constructs (which no other ctags offers), and +because most were easily fooled by a number of preprocessor contructs. + + +Exuberant Ctags offers the following features: + +1. It supports the following languages: Assembler, AWK, ASP, BETA, + Bourne/Korn/Z Shell, C, C++, C#, COBOL, Eiffel, Erlang, Fortran, Java, Lisp, + Lua, Makefile, Pascal, Perl, PHP, PL/SQL, Python, REXX, Ruby, Scheme, + S-Lang, SML (Standard ML), Tcl, Vera, Verilog, Vim, and YACC. + +2. It is capable of generating tags for virtually all C language constructs. + +3. It is very robust in parsing code. In particular, the C/C++ parser is + far less easily fooled by code containing #if preprocessor conditional + constructs, using a conditional path selection algorithm to resolve + complicated situations, and a fall-back algorithm when this one fails. + +4. Supports output of Emacs-style TAGS files (i.e. "etags"). + +5. User-defined languages, using Posix regular expressions. + +6. Supports UNIX, MSDOS, Windows 95/98/NT/2000/XP, OS/2, QNX, Amiga, QDOS, + RISC OS, VMS, Macintosh, and Cray. Some pre-compiled binaries are + available on the web site. + + +Visit the Exuberant Ctags web site: + + http://ctags.sourceforge.net + + +Which brings us to the most obvious question: + + Q: Why is it called "Exuberant" ctags? + A: Because one of the meanings of the word is: + + exuberant : produced in extreme abundance : PLENTIFUL syn see PROFUSE + +Compare the tag file produced by Exuberant Ctags with that produced by any +other ctags and you will see how appropriate the name is. + + +This source code is distributed according to the terms of the GNU General +Public License. It is provided on an as-is basis and no responsibility is +accepted for its failure to perform as expected. It is worth at least as +much as you paid for it! + +Exuberant Ctags was originally derived from and inspired by the ctags +program by Steve Kirkendall (kirkenda@cs.pdx.edu) that comes with the Elvis +vi clone (though almost none of the original code remains). This, too, is +freely available. + +Please report any problems you find. The two problems I expect to be most +likely are either a tag which you expected but is missing, or a tag created +in error (shouldn't really be a tag). Please include a sample of code (the +definition) for the object which misbehaves. + +-- +vim:tw=76:sw=4:et: diff --git a/sdk/ctags/argproc.c b/sdk/ctags/argproc.c new file mode 100644 index 0000000000..6bbcf8da16 --- /dev/null +++ b/sdk/ctags/argproc.c @@ -0,0 +1,505 @@ +/* +* $Id: argproc.c,v 1.2 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1989, Mark Pizzolato (mark@infopiz.uucp) +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Provided by Stephen P. Wall +* Extracted from the VMS port of GNU patch-2.1. +* +* This module provides redirection support for the VAX DECC port of +* Exuberant Ctags. +*/ +/* + * @(#)argproc.c 1.0 89/02/01 Mark Pizzolato (mark@infopiz.uucp) + */ + +#ifndef lint +char argproc_version [] = "@(#)argproc.c VMS uucp Version infopiz-1.0"; +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* System Information Definitions */ + +#define EXIT_OK 1 /* image exit code */ +#define EXIT_ERR 0x10000000 /* image exit code */ + +/* + * getredirection() is intended to aid in porting C programs + * to VMS (Vax-11 C) which does not support '>' and '<' + * I/O redirection, along with a command line pipe mechanism + * using the '|' AND background command execution '&'. + * The piping mechanism will probably work with almost any 'filter' type + * of program. With suitable modification, it may useful for other + * portability problems as well. + * + * Author: Mark Pizzolato mark@infopiz.UUCP + * Mods: Steve Wall Don't return a full path unless the + * original filename included a path. + */ +struct list_item + { + struct list_item *next; + char *value; + }; + +static expand_wild_cards (); +static char *pipe_and_fork (); + +int +getredirection (ac, av) +int *ac; +char ***av; +/* + * Process vms redirection arg's. Exit if any error is seen. + * If getredirection() processes an argument, it is erased + * from the vector. getredirection () returns a new argc and argv value. + * In the event that a background command is requested (by a trailing "&"), + * this routine creates a background subprocess, and simply exits the program. + * + * Warning: do not try to simplify the code for vms. The code + * presupposes that getredirection() is called before any data is + * read from stdin or written to stdout. + * + * Normal usage is as follows: + * + * main (argc, argv) + * int argc; + * char *argv []; + * { + * getredirection (&argc, &argv); + * } + */ +{ + int argc = *ac; /* Argument Count */ + char **argv = *av; /* Argument Vector */ + char *ap; /* Argument pointer */ + int j; /* argv [] index */ + extern int errno; /* Last vms i/o error */ + int item_count = 0; /* Count of Items in List */ + struct list_item *list_head = 0; /* First Item in List */ + struct list_item *list_tail; /* Last Item in List */ + char *in = NULL; /* Input File Name */ + char *out = NULL; /* Output File Name */ + char *outmode = "w"; /* Mode to Open Output File */ + int cmargc = 0; /* Piped Command Arg Count */ + char **cmargv = NULL;/* Piped Command Arg Vector */ + + /* + * First handle the case where the last thing on the line ends with + * a '&'. This indicates the desire for the command to be run in a + * subprocess, so we satisfy that desire. + */ + { + extern background_process (); + ap = argv [argc-1]; + if (0 == strcmp ("&", ap)) + exit (background_process (--argc, argv)); + if ('&' == ap [strlen (ap)-1]) + { + ap [strlen (ap)-1] = '\0'; + exit (background_process (argc, argv)); + } + } + /* + * Now we handle the general redirection cases that involve '>', '>>', + * '<', and pipes '|'. + */ + for (j = 0; j < argc; ++j) + { + if (0 == strcmp ("<", argv [j])) + { + if (j+1 >= argc) + { + errno = EINVAL; + perror ("No input file"); + exit (EXIT_ERR); + } + in = argv [++j]; + continue; + } + if ('<' == *(ap = argv [j])) + { + in = 1 + ap; + continue; + } + if (0 == strcmp (">", ap)) + { + if (j+1 >= argc) + { + errno = EINVAL; + perror ("No output file"); + exit (EXIT_ERR); + } + out = argv [++j]; + continue; + } + if ('>' == *ap) + { + if ('>' == ap [1]) + { + outmode = "a"; + if ('\0' == ap [2]) + out = argv [++j]; + else + out = 2 + ap; + } + else + out = 1 + ap; + continue; + } + if (0 == strcmp ("|", argv [j])) + { + if (j+1 >= argc) + { + errno = EPIPE; + perror ("No command to Pipe to"); + exit (EXIT_ERR); + } + cmargc = argc- (j+1); + cmargv = &argv [j+1]; + argc = j; + continue; + } + if ('|' == *(ap = argv [j])) + { + ++argv [j]; + cmargc = argc-j; + cmargv = &argv [j]; + argc = j; + continue; + } + expand_wild_cards (ap, &list_head, &list_tail, &item_count); + } + /* + * Allocate and fill in the new argument vector, Some Unix's terminate + * the list with an extra null pointer. + */ + argv = *av = calloc (item_count+1, sizeof (char *)); + for (j = 0; j < item_count; ++j, list_head = list_head->next) + argv [j] = list_head->value; + *ac = item_count; + if (cmargv != NULL) + { + char subcmd [1024]; + + if (out != NULL) + { + errno = EINVAL; + perror ("Invalid '|' and '>' specified"); + exit (EXIT_ERR); + } + strcpy (subcmd, cmargv [0]); + for (j = 1; j < cmargc; ++j) + { + strcat (subcmd, " \""); + strcat (subcmd, cmargv [j]); + strcat (subcmd, "\""); + } + out = pipe_and_fork (subcmd); + } + if ((in != NULL) && (NULL == freopen (in, "r", stdin, "mbc=32", "mbf=2"))) + { + perror (in); /* Can't find file */ + exit (EXIT_ERR); /* Is a fatal error */ + } + if ((out != NULL) && (NULL == freopen (out, outmode, stdout, "mbc=32", "mbf=2"))) + { + perror (ap); /* Error, can't write or append */ + exit (EXIT_ERR); /* Is a fatal error */ + } +#ifdef DEBUG + fprintf (stderr, "Arglist:\n"); + for (j = 0; j < *ac; ++j) + fprintf (stderr, "argv[%d] = '%s'\n", j, argv [j]); +#endif + return 0; +} + +static add_item (head, tail, value, count) +struct list_item **head; +struct list_item **tail; +char *value; +int *count; +{ + if (*head == 0) + { + if (NULL == (*head = calloc (1, sizeof (**head)))) + { + errno = ENOMEM; + perror (""); + exit (EXIT_ERR); + } + *tail = *head; + } + else + if (NULL == ((*tail)->next = calloc (1, sizeof (**head)))) + { + errno = ENOMEM; + perror (""); + exit (EXIT_ERR); + } + else + *tail = (*tail)->next; + (*tail)->value = value; + ++ (*count); +} + +static expand_wild_cards (item, head, tail, count) +char *item; +struct list_item **head; +struct list_item **tail; +int *count; +{ +int expcount = 0; +int context = 0; +int status; +int status_value; +char *had_version; +int had_path; +$DESCRIPTOR (filespec, item); +/*$DESCRIPTOR (defaultspec, "SYS$DISK:[]*.*;");*/ +$DESCRIPTOR (defaultspec, ""); +$DESCRIPTOR (resultspec, ""); + + if (strcspn (item, "*%") == strlen (item)) + { + add_item (head, tail, item, count); + return; + } + resultspec.dsc$b_dtype = DSC$K_DTYPE_T; + resultspec.dsc$b_class = DSC$K_CLASS_D; + resultspec.dsc$a_pointer = NULL; + filespec.dsc$w_length = strlen (item); + /* + * Only return version specs, if the caller specified a version + */ + had_version = strchr (item, ';'); + /* + * Only return full path if the caller specified a path + */ + had_path = (strchr (item, ']') || strchr (item, ':')); + while (1 == (1&lib$find_file (&filespec, &resultspec, &context, + &defaultspec, 0, &status_value, &0))) + { + char *string; + char *c; + + if (NULL == (string = calloc (1, resultspec.dsc$w_length+1))) + { + errno = ENOMEM; + perror (""); + exit (EXIT_ERR); + } + strncpy (string, resultspec.dsc$a_pointer, resultspec.dsc$w_length); + string [resultspec.dsc$w_length] = '\0'; + if (NULL == had_version) + *((char *) strrchr (string, ';')) = '\0'; + if (!had_path) { + char *s = strrchr (string, ']'); + if ( s == NULL ) s = strrchr (string, ':'); + if ( s != NULL ) strcpy (string, s+1); + } + /* + * Be consistent with what the C RTL has already done to the rest of + * the argv items and lowercase all of these names. + */ + for (c = string; *c; ++c) + if (isupper (*c)) + *c = tolower (*c); + add_item (head, tail, string, count); + ++expcount; + } + if (expcount == 0) + add_item (head, tail, item, count); + lib$sfree1_dd (&resultspec); + lib$find_file_end (&context); +} + +static int child_st [2]; /* Event Flag set when child process completes */ + +static short child_chan;/* I/O Channel for Pipe Mailbox */ + +static exit_handler (status) +int *status; +{ +short iosb [4]; + + if (0 == child_st [0]) + { +#ifdef DEBUG + fprintf (stderr, "Waiting for Child Process to Finnish . . .\n"); +#endif + sys$qiow (0, child_chan, IO$_WRITEOF, iosb, 0, 0, 0, 0, 0, 0, 0, 0); + sys$dassgn (child_chan); + fclose (stdout); + sys$synch (0, child_st); + } +} + + +static sig_child (chan) +int chan; +{ +#ifdef DEBUG + fprintf (stderr, "Child Completion AST\n"); +#endif + if (child_st [0] == 0) + child_st [0] = 1; +} + +static struct exit_control_block + { + struct exit_control_block *flink; + int (*exit_routine) (); + int arg_count; + int *status_address; + int exit_status; + } exit_block = + { + 0, + exit_handler, + 1, + &exit_block.exit_status, + 0 + }; + +static char *pipe_and_fork (cmd) +char *cmd; +{ + $DESCRIPTOR (cmddsc, cmd); + static char mbxname [64]; + $DESCRIPTOR (mbxdsc, mbxname); + short iosb [4]; + int status; + int pid; + struct + { + short dna_buflen; + short dna_itmcod; + char *dna_buffer; + unsigned short *dna_retlen; + int listend; + } itmlst = + { + sizeof (mbxname), + DVI$_DEVNAM, + mbxname, + &mbxdsc.dsc$w_length, + 0 + }; + int mbxsize; + struct + { + short mbf_buflen; + short mbf_itmcod; + int *mbf_maxbuf; + unsigned short *mbf_retlen; + int listend; + } syiitmlst = + { + sizeof (mbxsize), + SYI$_MAXBUF, + &mbxsize, + 0, + 0 + }; + + cmddsc.dsc$w_length = strlen (cmd); + /* + * Get the SYSGEN parameter MAXBUF, and the smaller of it and 2048 as + * the size of the 'pipe' mailbox. + */ + if (1 == (1& (vaxc$errno = sys$getsyiw (0, 0, 0, &syiitmlst, iosb, 0, 0, 0)))) + vaxc$errno = iosb [0]; + if (0 == (1&vaxc$errno)) + { + errno = EVMSERR; + perror ("Can't get SYSGEN parameter value for MAXBUF"); + exit (EXIT_ERR); + } + if (mbxsize > 2048) + mbxsize = 2048; + if (0 == (1& (vaxc$errno = sys$crembx (0, &child_chan, mbxsize, mbxsize, 0, 0, 0)))) + { + errno = EVMSERR; + perror ("Can't create pipe mailbox"); + exit (EXIT_ERR); + } + if (1 == (1& (vaxc$errno = sys$getdviw (0, child_chan, 0, &itmlst, iosb, + 0, 0, 0)))) + vaxc$errno = iosb [0]; + if (0 == (1&vaxc$errno)) + { + errno = EVMSERR; + perror ("Can't get pipe mailbox device name"); + exit (EXIT_ERR); + } + mbxname [mbxdsc.dsc$w_length] = '\0'; +#ifdef DEBUG + fprintf (stderr, "Pipe Mailbox Name = '%s'\n", mbxname); +#endif + if (0 == (1& (vaxc$errno = lib$spawn (&cmddsc, &mbxdsc, 0, &1, + 0, &pid, child_st, &0, sig_child, + &child_chan)))) + { + errno = EVMSERR; + perror ("Can't spawn subprocess"); + exit (EXIT_ERR); + } +#ifdef DEBUG + fprintf (stderr, "Subprocess's Pid = %08X\n", pid); +#endif + sys$dclexh (&exit_block); + return (mbxname); +} + +background_process (argc, argv) +int argc; +char **argv; +{ +char command [2048] = "$"; +$DESCRIPTOR (value, command); +$DESCRIPTOR (cmd, "BACKGROUND$COMMAND"); +$DESCRIPTOR (null, "NLA0:"); +int pid; + + strcat (command, argv [0]); + while (--argc) + { + strcat (command, " \""); + strcat (command, *(++argv)); + strcat (command, "\""); + } + value.dsc$w_length = strlen (command); + if (0 == (1& (vaxc$errno = lib$set_symbol (&cmd, &value)))) + { + errno = EVMSERR; + perror ("Can't create symbol for subprocess command"); + exit (EXIT_ERR); + } + if (0 == (1& (vaxc$errno = lib$spawn (&cmd, &null, 0, &17, 0, &pid)))) + { + errno = EVMSERR; + perror ("Can't spawn subprocess"); + exit (EXIT_ERR); + } +#ifdef DEBUG + fprintf (stderr, "%s\n", command); +#endif + fprintf (stderr, "%08X\n", pid); + return (EXIT_OK); +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/args.c b/sdk/ctags/args.c new file mode 100644 index 0000000000..02dbe65e22 --- /dev/null +++ b/sdk/ctags/args.c @@ -0,0 +1,273 @@ +/* +* $Id: args.c,v 1.7 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1999-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for reading command line arguments. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include +#include + +#include "args.h" +#include "debug.h" +#include "routines.h" + +/* +* FUNCTION DEFINITIONS +*/ + +static char *nextStringArg (const char** const next) +{ + char* result = NULL; + const char* start; + + Assert (*next != NULL); + for (start = *next ; isspace ((int) *start) ; ++start) + ; + if (*start == '\0') + *next = start; + else + { + size_t length; + const char* end; + + for (end = start ; *end != '\0' && ! isspace ((int) *end) ; ++end) + ; + length = end - start; + Assert (length > 0); + result = xMalloc (length + 1, char); + strncpy (result, start, length); + result [length] = '\0'; + *next = end; + } + return result; +} + +static char* nextStringLine (const char** const next) +{ + char* result = NULL; + size_t length; + const char* end; + + Assert (*next != NULL); + for (end = *next ; *end != '\n' && *end != '\0' ; ++end) + ; + length = end - *next; + if (length > 0) + { + result = xMalloc (length + 1, char); + strncpy (result, *next, length); + result [length] = '\0'; + } + if (*end == '\n') + ++end; + else if (*end == '\r') + { + ++end; + if (*end == '\n') + ++end; + } + *next = end; + return result; +} + +static char* nextString (const Arguments* const current, const char** const next) +{ + char* result; + if (current->lineMode) + result = nextStringLine (next); + else + result = nextStringArg (next); + return result; +} + +static char* nextFileArg (FILE* const fp) +{ + char* result = NULL; + Assert (fp != NULL); + if (! feof (fp)) + { + vString* vs = vStringNew (); + int c; + do + c = fgetc (fp); + while (isspace (c)); + + if (c != EOF) + { + do + { + vStringPut (vs, c); + c = fgetc (fp); + } while (c != EOF && ! isspace (c)); + vStringTerminate (vs); + Assert (vStringLength (vs) > 0); + result = xMalloc (vStringLength (vs) + 1, char); + strcpy (result, vStringValue (vs)); + } + vStringDelete (vs); + } + return result; +} + +static char* nextFileLine (FILE* const fp) +{ + char* result = NULL; + if (! feof (fp)) + { + vString* vs = vStringNew (); + int c; + + Assert (fp != NULL); + c = fgetc (fp); + while (c != EOF) + { + if (c != '\n' && c != '\r') + vStringPut (vs, c); + else if (vStringLength (vs) > 0) + break; + c = fgetc (fp); + } + if (c != EOF || vStringLength (vs) > 0) + { + if (c == '\r') + { + c = fgetc (fp); + if (c != '\n') + c = ungetc (c, fp); + } + vStringTerminate (vs); + result = xMalloc (vStringLength (vs) + 1, char); + strcpy (result, vStringValue (vs)); + vStringDelete (vs); + } + } + return result; +} + +static char* nextFileString (const Arguments* const current, FILE* const fp) +{ + char* result; + if (current->lineMode) + result = nextFileLine (fp); + else + result = nextFileArg (fp); + return result; +} + +extern Arguments* argNewFromString (const char* const string) +{ + Arguments* result = xMalloc (1, Arguments); + memset (result, 0, sizeof (Arguments)); + result->type = ARG_STRING; + result->u.stringArgs.string = string; + result->u.stringArgs.item = string; + result->u.stringArgs.next = string; + result->item = nextString (result, &result->u.stringArgs.next); + return result; +} + +extern Arguments* argNewFromArgv (char* const* const argv) +{ + Arguments* result = xMalloc (1, Arguments); + memset (result, 0, sizeof (Arguments)); + result->type = ARG_ARGV; + result->u.argvArgs.argv = argv; + result->u.argvArgs.item = result->u.argvArgs.argv; + result->item = *result->u.argvArgs.item; + return result; +} + +extern Arguments* argNewFromFile (FILE* const fp) +{ + Arguments* result = xMalloc (1, Arguments); + memset (result, 0, sizeof (Arguments)); + result->type = ARG_FILE; + result->u.fileArgs.fp = fp; + result->item = nextFileString (result, result->u.fileArgs.fp); + return result; +} + +extern Arguments* argNewFromLineFile (FILE* const fp) +{ + Arguments* result = xMalloc (1, Arguments); + memset (result, 0, sizeof (Arguments)); + result->type = ARG_FILE; + result->lineMode = TRUE; + result->u.fileArgs.fp = fp; + result->item = nextFileString (result, result->u.fileArgs.fp); + return result; +} + +extern char *argItem (const Arguments* const current) +{ + Assert (current != NULL); + Assert (! argOff (current)); + return current->item; +} + +extern boolean argOff (const Arguments* const current) +{ + Assert (current != NULL); + return (boolean) (current->item == NULL); +} + +extern void argSetWordMode (Arguments* const current) +{ + Assert (current != NULL); + current->lineMode = FALSE; +} + +extern void argSetLineMode (Arguments* const current) +{ + Assert (current != NULL); + current->lineMode = TRUE; +} + +extern void argForth (Arguments* const current) +{ + Assert (current != NULL); + Assert (! argOff (current)); + switch (current->type) + { + case ARG_STRING: + if (current->item != NULL) + eFree (current->item); + current->u.stringArgs.item = current->u.stringArgs.next; + current->item = nextString (current, ¤t->u.stringArgs.next); + break; + case ARG_ARGV: + ++current->u.argvArgs.item; + current->item = *current->u.argvArgs.item; + break; + case ARG_FILE: + if (current->item != NULL) + eFree (current->item); + current->item = nextFileString (current, current->u.fileArgs.fp); + break; + default: + Assert ("Invalid argument type" == NULL); + break; + } +} + +extern void argDelete (Arguments* const current) +{ + Assert (current != NULL); + if (current->type == ARG_STRING && current->item != NULL) + eFree (current->item); + memset (current, 0, sizeof (Arguments)); + eFree (current); +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/args.h b/sdk/ctags/args.h new file mode 100644 index 0000000000..743fd893b0 --- /dev/null +++ b/sdk/ctags/args.h @@ -0,0 +1,63 @@ +/* +* $Id: args.h,v 1.5 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1999-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Defines external interface to command line argument reading. +*/ +#ifndef _ARGS_H +#define _ARGS_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +/* +* DATA DECLARATIONS +*/ + +typedef enum { ARG_NONE, ARG_STRING, ARG_ARGV, ARG_FILE } argType; + +typedef struct sArgs { + argType type; + union { + struct sStringArgs { + const char* string; + const char* next; + const char* item; + } stringArgs; + struct sArgvArgs { + char* const* argv; + char* const* item; + } argvArgs; + struct sFileArgs { + FILE* fp; + } fileArgs; + } u; + char* item; + boolean lineMode; +} Arguments; + +/* +* FUNCTION PROTOTYPES +*/ +extern Arguments* argNewFromString (const char* const string); +extern Arguments* argNewFromArgv (char* const* const argv); +extern Arguments* argNewFromFile (FILE* const fp); +extern Arguments* argNewFromLineFile (FILE* const fp); +extern char *argItem (const Arguments* const current); +extern boolean argOff (const Arguments* const current); +extern void argSetWordMode (Arguments* const current); +extern void argSetLineMode (Arguments* const current); +extern void argForth (Arguments* const current); +extern void argDelete (Arguments* const current); + +#endif /* _ARGS_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/asm.c b/sdk/ctags/asm.c new file mode 100644 index 0000000000..ac1d8b5fe7 --- /dev/null +++ b/sdk/ctags/asm.c @@ -0,0 +1,388 @@ +/* +* $Id: asm.c,v 1.18 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for assembly language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "debug.h" +#include "keyword.h" +#include "parse.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DECLARATIONS +*/ +typedef enum { + K_NONE = -1, K_DEFINE, K_LABEL, K_MACRO, K_TYPE +} AsmKind; + +typedef enum { + OP_UNDEFINED = -1, + OP_ALIGN, + OP_COLON_EQUAL, + OP_END, + OP_ENDM, + OP_ENDMACRO, + OP_ENDP, + OP_ENDS, + OP_EQU, + OP_EQUAL, + OP_LABEL, + OP_MACRO, + OP_PROC, + OP_RECORD, + OP_SECTIONS, + OP_SET, + OP_STRUCT, + OP_LAST +} opKeyword; + +typedef struct { + const char *operator; + opKeyword keyword; +} asmKeyword; + +typedef struct { + opKeyword keyword; + AsmKind kind; +} opKind; + +/* +* DATA DEFINITIONS +*/ +static langType Lang_asm; + +static kindOption AsmKinds [] = { + { TRUE, 'd', "define", "defines" }, + { TRUE, 'l', "label", "labels" }, + { TRUE, 'm', "macro", "macros" }, + { TRUE, 't', "type", "types (structs and records)" } +}; + +static const asmKeyword AsmKeywords [] = { + { "align", OP_ALIGN }, + { "endmacro", OP_ENDMACRO }, + { "endm", OP_ENDM }, + { "end", OP_END }, + { "endp", OP_ENDP }, + { "ends", OP_ENDS }, + { "equ", OP_EQU }, + { "label", OP_LABEL }, + { "macro", OP_MACRO }, + { ":=", OP_COLON_EQUAL }, + { "=", OP_EQUAL }, + { "proc", OP_PROC }, + { "record", OP_RECORD }, + { "sections", OP_SECTIONS }, + { "set", OP_SET }, + { "struct", OP_STRUCT } +}; + +static const opKind OpKinds [] = { + /* must be ordered same as opKeyword enumeration */ + { OP_ALIGN, K_NONE }, + { OP_COLON_EQUAL, K_DEFINE }, + { OP_END, K_NONE }, + { OP_ENDM, K_NONE }, + { OP_ENDMACRO, K_NONE }, + { OP_ENDP, K_NONE }, + { OP_ENDS, K_NONE }, + { OP_EQU, K_DEFINE }, + { OP_EQUAL, K_DEFINE }, + { OP_LABEL, K_LABEL }, + { OP_MACRO, K_MACRO }, + { OP_PROC, K_LABEL }, + { OP_RECORD, K_TYPE }, + { OP_SECTIONS, K_NONE }, + { OP_SET, K_DEFINE }, + { OP_STRUCT, K_TYPE } +}; + +/* +* FUNCTION DEFINITIONS +*/ +static void buildAsmKeywordHash (void) +{ + const size_t count = sizeof (AsmKeywords) / sizeof (AsmKeywords [0]); + size_t i; + for (i = 0 ; i < count ; ++i) + { + const asmKeyword* const p = AsmKeywords + i; + addKeyword (p->operator, Lang_asm, (int) p->keyword); + } +} + +static opKeyword analyzeOperator (const vString *const op) +{ + static vString *keyword = NULL; + opKeyword result = OP_UNDEFINED; + + if (keyword == NULL) + keyword = vStringNew (); + vStringCopyToLower (keyword, op); + result = (opKeyword) lookupKeyword (vStringValue (keyword), Lang_asm); + return result; +} + +static boolean isInitialSymbolCharacter (int c) +{ + return (boolean) (c != '\0' && (isalpha (c) || strchr ("_$", c) != NULL)); +} + +static boolean isSymbolCharacter (int c) +{ + /* '?' character is allowed in AMD 29K family */ + return (boolean) (c != '\0' && (isalnum (c) || strchr ("_$?", c) != NULL)); +} + +static boolean readPreProc (const unsigned char *const line) +{ + boolean result; + const unsigned char *cp = line; + vString *name = vStringNew (); + while (isSymbolCharacter ((int) *cp)) + { + vStringPut (name, *cp); + ++cp; + } + vStringTerminate (name); + result = (boolean) (strcmp (vStringValue (name), "define") == 0); + if (result) + { + while (isspace ((int) *cp)) + ++cp; + vStringClear (name); + while (isSymbolCharacter ((int) *cp)) + { + vStringPut (name, *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, AsmKinds, K_DEFINE); + } + vStringDelete (name); + return result; +} + +static AsmKind operatorKind ( + const vString *const operator, + boolean *const found) +{ + AsmKind result = K_NONE; + const opKeyword kw = analyzeOperator (operator); + *found = (boolean) (kw != OP_UNDEFINED); + if (*found) + { + result = OpKinds [kw].kind; + Assert (OpKinds [kw].keyword == kw); + } + return result; +} + +/* We must check for "DB", "DB.L", "DCB.W" (68000) + */ +static boolean isDefineOperator (const vString *const operator) +{ + const unsigned char *const op = + (unsigned char*) vStringValue (operator); + const size_t length = vStringLength (operator); + const boolean result = (boolean) (length > 0 && + toupper ((int) *op) == 'D' && + (length == 2 || + (length == 4 && (int) op [2] == '.') || + (length == 5 && (int) op [3] == '.'))); + return result; +} + +static void makeAsmTag ( + const vString *const name, + const vString *const operator, + const boolean labelCandidate, + const boolean nameFollows) +{ + if (vStringLength (name) > 0) + { + boolean found; + const AsmKind kind = operatorKind (operator, &found); + if (found) + { + if (kind != K_NONE) + makeSimpleTag (name, AsmKinds, kind); + } + else if (isDefineOperator (operator)) + { + if (! nameFollows) + makeSimpleTag (name, AsmKinds, K_DEFINE); + } + else if (labelCandidate) + { + operatorKind (name, &found); + if (! found) + makeSimpleTag (name, AsmKinds, K_LABEL); + } + } +} + +static const unsigned char *readSymbol ( + const unsigned char *const start, + vString *const sym) +{ + const unsigned char *cp = start; + vStringClear (sym); + if (isInitialSymbolCharacter ((int) *cp)) + { + while (isSymbolCharacter ((int) *cp)) + { + vStringPut (sym, *cp); + ++cp; + } + vStringTerminate (sym); + } + return cp; +} + +static const unsigned char *readOperator ( + const unsigned char *const start, + vString *const operator) +{ + const unsigned char *cp = start; + vStringClear (operator); + while (*cp != '\0' && ! isspace ((int) *cp)) + { + vStringPut (operator, *cp); + ++cp; + } + vStringTerminate (operator); + return cp; +} + +static void findAsmTags (void) +{ + vString *name = vStringNew (); + vString *operator = vStringNew (); + const unsigned char *line; + boolean inCComment = FALSE; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + boolean labelCandidate = (boolean) (! isspace ((int) *cp)); + boolean nameFollows = FALSE; + const boolean isComment = (boolean) + (*cp != '\0' && strchr (";*@", *cp) != NULL); + + /* skip comments */ + if (strncmp ((const char*) cp, "/*", (size_t) 2) == 0) + { + inCComment = TRUE; + cp += 2; + } + if (inCComment) + { + do + { + if (strncmp ((const char*) cp, "*/", (size_t) 2) == 0) + { + inCComment = FALSE; + cp += 2; + break; + } + ++cp; + } while (*cp != '\0'); + } + if (isComment || inCComment) + continue; + + /* read preprocessor defines */ + if (*cp == '#') + { + ++cp; + readPreProc (cp); + continue; + } + + /* skip white space */ + while (isspace ((int) *cp)) + ++cp; + + /* read symbol */ + cp = readSymbol (cp, name); + if (vStringLength (name) > 0 && *cp == ':') + { + labelCandidate = TRUE; + ++cp; + } + + if (! isspace ((int) *cp) && *cp != '\0') + continue; + + /* skip white space */ + while (isspace ((int) *cp)) + ++cp; + + /* skip leading dot */ +#if 0 + if (*cp == '.') + ++cp; +#endif + + cp = readOperator (cp, operator); + + /* attempt second read of symbol */ + if (vStringLength (name) == 0) + { + while (isspace ((int) *cp)) + ++cp; + cp = readSymbol (cp, name); + nameFollows = TRUE; + } + makeAsmTag (name, operator, labelCandidate, nameFollows); + } + vStringDelete (name); + vStringDelete (operator); +} + +static void initialize (const langType language) +{ + Lang_asm = language; + buildAsmKeywordHash (); +} + +extern parserDefinition* AsmParser (void) +{ + static const char *const extensions [] = { + "asm", "ASM", "s", "S", NULL + }; + static const char *const patterns [] = { + "*.A51", + "*.29[kK]", + "*.[68][68][kKsSxX]", + "*.[xX][68][68]", + NULL + }; + parserDefinition* def = parserNew ("Asm"); + def->kinds = AsmKinds; + def->kindCount = KIND_COUNT (AsmKinds); + def->extensions = extensions; + def->patterns = patterns; + def->parser = findAsmTags; + def->initialize = initialize; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/asp.c b/sdk/ctags/asp.c new file mode 100644 index 0000000000..30c20948cd --- /dev/null +++ b/sdk/ctags/asp.c @@ -0,0 +1,211 @@ +/* +* $Id: asp.c,v 1.8 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 2000, Patrick Dehne +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for the ASP (Active +* Server Pages) web page scripting language. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_CONST, K_FUNCTION, K_SUB, K_DIM +} aspKind; + +static kindOption AspKinds [] = { + { TRUE, 'c', "constant", "constants"}, + { TRUE, 'f', "function", "functions"}, + { TRUE, 's', "subroutine", "subroutines"}, + { TRUE, 'v', "variable", "variables"} +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static void findAspTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + + while (*cp != '\0') + { + /* jump over whitespace */ + while (isspace ((int)*cp)) + cp++; + + /* jump over strings */ + if (*cp == '"') + { + cp++; + while (*cp!='"' && *cp!='\0') + cp++; + } + + /* jump over comments */ + else if (*cp == '\'') + break; + + /* jump over end function/sub lines */ + else if (strncasecmp ((const char*) cp, "end", (size_t) 3)== 0) + { + cp += 3; + if (isspace ((int)*cp)) + { + while (isspace ((int)*cp)) + ++cp; + + if (strncasecmp ((const char*) cp, "function", (size_t) 8) == 0) + { + cp+=8; + break; + } + + else if (strncasecmp ((const char*) cp, "sub", (size_t) 3) == 0) + { + cp+=3; + break; + } + } + } + + /* jump over exit function/sub lines */ + else if (strncasecmp ((const char*) cp, "exit", (size_t) 4)==0) + { + cp += 4; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + + if (strncasecmp ((const char*) cp, "function", (size_t) 8) == 0) + { + cp+=8; + break; + } + + else if (strncasecmp ((const char*) cp, "sub", (size_t) 3) == 0) + { + cp+=3; + break; + } + } + } + + /* function? */ + else if (strncasecmp ((const char*) cp, "function", (size_t) 8) == 0) + { + cp += 8; + + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, AspKinds, K_FUNCTION); + vStringClear (name); + } + } + + /* sub? */ + else if (strncasecmp ((const char*) cp, "sub", (size_t) 3) == 0) + { + cp += 3; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, AspKinds, K_SUB); + vStringClear (name); + } + } + + /* dim variable? */ + else if (strncasecmp ((const char*) cp, "dim", (size_t) 3) == 0) + { + cp += 3; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, AspKinds, K_DIM); + vStringClear (name); + } + } + + /* const declaration? */ + else if (strncasecmp ((const char*) cp, "const", (size_t) 5) == 0) + { + cp += 5; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, AspKinds, K_CONST); + vStringClear (name); + } + } + + /* nothing relevant */ + else if (*cp != '\0') + cp++; + } + } + vStringDelete (name); +} + +extern parserDefinition* AspParser (void) +{ + static const char *const extensions [] = { "asp", "asa", NULL }; + parserDefinition* def = parserNew ("Asp"); + def->kinds = AspKinds; + def->kindCount = KIND_COUNT (AspKinds); + def->extensions = extensions; + def->parser = findAspTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/awk.c b/sdk/ctags/awk.c new file mode 100644 index 0000000000..474056b3ea --- /dev/null +++ b/sdk/ctags/awk.c @@ -0,0 +1,81 @@ +/* +* $Id: awk.c,v 1.3 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 2000-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for AWK functions. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum eAwkKinds { + K_FUNCTION +} awkKind; + +static kindOption AwkKinds [] = { + { TRUE, 'f', "function", "functions" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static void findAwkTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + if (strncmp ((const char*) line, "function", (size_t) 8) == 0 && + isspace ((int) line [8])) + { + const unsigned char *cp = line + 8; + + while (isspace ((int) *cp)) + ++cp; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + while (isspace ((int) *cp)) + ++cp; + if (*cp == '(') + makeSimpleTag (name, AwkKinds, K_FUNCTION); + vStringClear (name); + if (*cp != '\0') + ++cp; + } + } + vStringDelete (name); +} + +extern parserDefinition* AwkParser () +{ + static const char *const extensions [] = { "awk", "gawk", "mawk", NULL }; + parserDefinition* def = parserNew ("Awk"); + def->kinds = AwkKinds; + def->kindCount = KIND_COUNT (AwkKinds); + def->extensions = extensions; + def->parser = findAwkTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/beta.c b/sdk/ctags/beta.c new file mode 100644 index 0000000000..ceb2cfa67d --- /dev/null +++ b/sdk/ctags/beta.c @@ -0,0 +1,320 @@ +/* +* $Id: beta.c,v 1.7 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1999-2000, Mjølner Informatics +* +* Written by Erik Corry +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for BETA language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "parse.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* MACROS +*/ +#define isbident(c) (identarray [(unsigned char) (c)]) + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FRAGMENT, K_PATTERN, K_SLOT, K_VIRTUAL +} betaKind; + +static kindOption BetaKinds [] = { + { TRUE, 'f', "fragment", "fragment definitions"}, + { FALSE, 'p', "pattern", "all patterns"}, + { TRUE, 's', "slot", "slots (fragment uses)"}, + { TRUE, 'v', "virtual", "patterns (virtual or rebound)"} +}; + +/* [A-Z_a-z0-9] */ +static const char identarray [256] = { +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0-15 */ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-31 */ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 32-47 !"#$%&'()*+'-./ */ +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 48-63 0123456789:;<=>? */ +0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 64-79 @ABCDEFGHIJKLMNO */ +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 80-95 PQRSTUVWXYZ [\]^_ */ +0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 96-111 `abcdefghijklmno */ +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 112-127 pqrstuvwxyz{|}~ */ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 128- */ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; /* -255 */ + +/* +* FUNCTION DEFINITIONS +*/ + +static void makeBetaTag (const char* const name, const betaKind kind) +{ + if (BetaKinds [kind].enabled) + { + tagEntryInfo e; + initTagEntry (&e, name); + e.kindName = BetaKinds [kind].name; + e.kind = BetaKinds [kind].letter; + makeTagEntry (&e); + } +} + +static void findBetaTags (void) +{ + vString *line = vStringNew (); + boolean incomment = FALSE; + boolean inquote = FALSE; + boolean dovirtuals = BetaKinds [K_VIRTUAL].enabled; + boolean dopatterns = BetaKinds [K_PATTERN].enabled; + + do + { + boolean foundfragmenthere = FALSE; + /* find fragment definition (line that starts and ends with --) */ + int last; + int first; + int c; + + vStringClear (line); + + while ((c = fileGetc ()) != EOF && c != '\n' && c != '\r') + vStringPut (line, c); + + vStringTerminate (line); + + last = vStringLength (line) - 1; + first = 0; + /* skip white space at start and end of line */ + while (last && isspace ((int) vStringChar (line, last))) last--; + while (first < last && isspace ((int) vStringChar (line, first))) first++; + /* if line still has a reasonable length and ... */ + if (last - first > 4 && + (vStringChar (line, first) == '-' && + vStringChar (line, first + 1) == '-' && + vStringChar (line, last) == '-' && + vStringChar (line, last - 1) == '-')) + { + if (!incomment && !inquote) + { + foundfragmenthere = TRUE; + /* skip past -- and whitespace. Also skip back past 'dopart' + or 'attributes' to the :. We have to do this because there + is no sensible way to include whitespace in a ctags token + so the conventional space after the ':' would mess us up */ + last -= 2; + first += 2; + while (last && vStringChar (line, last) != ':') last--; + while (last && (isspace ((int) vStringChar (line, last-1)))) last--; + while (first < last && + (isspace ((int) vStringChar (line, first)) || + vStringChar (line, first) == '-')) + first++; + /* If there's anything left it is a fragment title */ + if (first < last - 1) + { + vStringChar (line, last) = 0; + if (strcasecmp ("LIB", vStringValue (line) + first) && + strcasecmp ("PROGRAM", vStringValue (line) + first)) + { + makeBetaTag (vStringValue (line) + first, K_FRAGMENT); + } + } + } + } else { + int pos = 0; + int len = vStringLength (line); + if (inquote) goto stringtext; + if (incomment) goto commenttext; + programtext: + for ( ; pos < len; pos++) + { + if (vStringChar (line, pos) == '\'') + { + pos++; + inquote = TRUE; + goto stringtext; + } + if (vStringChar (line, pos) == '{') + { + pos++; + incomment = TRUE; + goto commenttext; + } + if (vStringChar (line, pos) == '(' && pos < len - 1 && + vStringChar (line, pos+1) == '*') + { + pos +=2; + incomment = TRUE; + goto commenttext; + } + /* + * SLOT definition looks like this: + * <> + * or + * <> + */ + if (!foundfragmenthere && + vStringChar (line, pos) == '<' && + pos+1 < len && + vStringChar (line, pos+1) == '<' && + strstr (vStringValue (line) + pos, ">>")) + { + /* Found slot name, get start and end */ + int eoname; + char c2; + pos += 2; /* skip past << */ + /* skip past space before SLOT */ + while (pos < len && isspace ((int) vStringChar (line, pos))) + pos++; + /* skip past SLOT */ + if (pos+4 <= len && + !strncasecmp (vStringValue(line) + pos, "SLOT", (size_t)4)) + pos += 4; + /* skip past space after SLOT */ + while (pos < len && isspace ((int) vStringChar (line, pos))) + pos++; + eoname = pos; + /* skip to end of name */ + while (eoname < len && + (c2 = vStringChar (line, eoname)) != '>' && + c2 != ':' && + !isspace ((int) c2)) + eoname++; + if (eoname < len) + { + vStringChar (line, eoname) = 0; + if (strcasecmp ("LIB", vStringValue (line) + pos) && + strcasecmp ("PROGRAM", vStringValue (line) + pos) && + strcasecmp ("SLOT", vStringValue (line) + pos)) + { + makeBetaTag (vStringValue (line) + pos, K_SLOT); + } + } + if (eoname+1 < len) { + pos = eoname + 1; + } else { + pos = len; + continue; + } + } + /* Only patterns that are virtual, extensions of virtuals or + * final bindings are normally included so as not to overload + * totally. + * That means one of the forms name:: name:< or name::< + */ + if (!foundfragmenthere && + vStringChar (line, pos) == ':' && + (dopatterns || + (dovirtuals && + (vStringChar (line, pos+1) == ':' || + vStringChar (line, pos+1) == '<') + ) + ) + ) + { + /* Found pattern name, get start and end */ + int eoname = pos; + int soname; + while (eoname && isspace ((int) vStringChar (line, eoname-1))) + eoname--; + foundanothername: + /* terminate right after name */ + vStringChar (line, eoname) = 0; + soname = eoname; + while (soname && + isbident (vStringChar (line, soname-1))) + { + soname--; + } + if (soname != eoname) + { + makeBetaTag (vStringValue (line) + soname, K_PATTERN); + /* scan back past white space */ + while (soname && + isspace ((int) vStringChar (line, soname-1))) + soname--; + if (soname && vStringChar (line, soname-1) == ',') + { + /* we found a new pattern name before comma */ + eoname = soname; + goto foundanothername; + } + } + } + } + goto endofline; + commenttext: + for ( ; pos < len; pos++) + { + if (vStringChar (line, pos) == '*' && pos < len - 1 && + vStringChar (line, pos+1) == ')') + { + pos += 2; + incomment = FALSE; + goto programtext; + } + if (vStringChar (line, pos) == '}') + { + pos++; + incomment = FALSE; + goto programtext; + } + } + goto endofline; + stringtext: + for ( ; pos < len; pos++) + { + if (vStringChar (line, pos) == '\\') + { + if (pos < len - 1) pos++; + } + else if (vStringChar (line, pos) == '\'') + { + pos++; + /* support obsolete '' syntax */ + if (pos < len && vStringChar (line, pos) == '\'') + { + continue; + } + inquote = FALSE; + goto programtext; + } + } + } + endofline: + inquote = FALSE; /* This shouldn't really make a difference */ + } while (!feof (File.fp)); +} + +extern parserDefinition* BetaParser (void) +{ + static const char *const extensions [] = { "bet", NULL }; + parserDefinition* def = parserNew ("BETA"); + def->kinds = BetaKinds; + def->kindCount = KIND_COUNT (BetaKinds); + def->extensions = extensions; + def->parser = findBetaTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/build/ctags.cbp b/sdk/ctags/build/ctags.cbp new file mode 100644 index 0000000000..b269ec58b1 --- /dev/null +++ b/sdk/ctags/build/ctags.cbp @@ -0,0 +1,319 @@ + + + + + + \ No newline at end of file diff --git a/sdk/ctags/c.c b/sdk/ctags/c.c new file mode 100644 index 0000000000..4168e6e714 --- /dev/null +++ b/sdk/ctags/c.c @@ -0,0 +1,2850 @@ +/* +* $Id: c.c,v 1.34 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for parsing and scanning C, C++ and Java +* source files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include + +#include "debug.h" +#include "entry.h" +#include "get.h" +#include "keyword.h" +#include "options.h" +#include "parse.h" +#include "read.h" +#include "routines.h" + +/* +* MACROS +*/ +#define MaxFields 6 + +#define stringValue(a) #a +#define activeToken(st) ((st)->token [(int) (st)->tokenIndex]) +#define parentDecl(st) ((st)->parent == NULL ? \ + DECL_NONE : (st)->parent->declaration) +#define isType(token,t) (boolean) ((token)->type == (t)) +#define insideEnumBody(st) ((st)->parent == NULL ? FALSE : \ + (boolean) ((st)->parent->declaration == DECL_ENUM)) +#define isExternCDecl(st,c) (boolean) ((c) == STRING_SYMBOL && \ + ! (st)->haveQualifyingName && (st)->scope == SCOPE_EXTERN) + +#define isOneOf(c,s) (boolean) (strchr ((s), (c)) != NULL) + +#define isHighChar(c) ((c) != EOF && (unsigned char)(c) >= 0xc0) + +/* +* DATA DECLARATIONS +*/ + +enum { NumTokens = 11 }; + +typedef enum eException { + ExceptionNone, ExceptionEOF, ExceptionFormattingError, + ExceptionBraceFormattingError +} exception_t; + +/* Used to specify type of keyword. + */ +typedef enum eKeywordId { + KEYWORD_NONE = -1, + KEYWORD_ATTRIBUTE, KEYWORD_ABSTRACT, + KEYWORD_BOOLEAN, KEYWORD_BYTE, KEYWORD_BAD_STATE, KEYWORD_BAD_TRANS, + KEYWORD_BIND, KEYWORD_BIND_VAR, KEYWORD_BIT, + KEYWORD_CASE, KEYWORD_CATCH, KEYWORD_CHAR, KEYWORD_CLASS, KEYWORD_CONST, + KEYWORD_CONSTRAINT, KEYWORD_COVERAGE_BLOCK, KEYWORD_COVERAGE_DEF, + KEYWORD_DEFAULT, KEYWORD_DELEGATE, KEYWORD_DELETE, KEYWORD_DO, + KEYWORD_DOUBLE, + KEYWORD_ELSE, KEYWORD_ENUM, KEYWORD_EXPLICIT, KEYWORD_EXTERN, + KEYWORD_EXTENDS, KEYWORD_EVENT, + KEYWORD_FINAL, KEYWORD_FLOAT, KEYWORD_FOR, KEYWORD_FRIEND, KEYWORD_FUNCTION, + KEYWORD_GOTO, + KEYWORD_IF, KEYWORD_IMPLEMENTS, KEYWORD_IMPORT, KEYWORD_INLINE, KEYWORD_INT, + KEYWORD_INOUT, KEYWORD_INPUT, KEYWORD_INTEGER, KEYWORD_INTERFACE, + KEYWORD_INTERNAL, + KEYWORD_LOCAL, KEYWORD_LONG, + KEYWORD_M_BAD_STATE, KEYWORD_M_BAD_TRANS, KEYWORD_M_STATE, KEYWORD_M_TRANS, + KEYWORD_MUTABLE, + KEYWORD_NAMESPACE, KEYWORD_NEW, KEYWORD_NEWCOV, KEYWORD_NATIVE, + KEYWORD_OPERATOR, KEYWORD_OUTPUT, KEYWORD_OVERLOAD, KEYWORD_OVERRIDE, + KEYWORD_PACKED, KEYWORD_PORT, KEYWORD_PACKAGE, KEYWORD_PRIVATE, + KEYWORD_PROGRAM, KEYWORD_PROTECTED, KEYWORD_PUBLIC, + KEYWORD_REGISTER, KEYWORD_RETURN, + KEYWORD_SHADOW, KEYWORD_STATE, + KEYWORD_SHORT, KEYWORD_SIGNED, KEYWORD_STATIC, KEYWORD_STRING, + KEYWORD_STRUCT, KEYWORD_SWITCH, KEYWORD_SYNCHRONIZED, + KEYWORD_TASK, KEYWORD_TEMPLATE, KEYWORD_THIS, KEYWORD_THROW, + KEYWORD_THROWS, KEYWORD_TRANSIENT, KEYWORD_TRANS, KEYWORD_TRANSITION, + KEYWORD_TRY, KEYWORD_TYPEDEF, KEYWORD_TYPENAME, + KEYWORD_UINT, KEYWORD_ULONG, KEYWORD_UNION, KEYWORD_UNSIGNED, KEYWORD_USHORT, + KEYWORD_USING, + KEYWORD_VIRTUAL, KEYWORD_VOID, KEYWORD_VOLATILE, + KEYWORD_WCHAR_T, KEYWORD_WHILE +} keywordId; + +/* Used to determine whether keyword is valid for the current language and + * what its ID is. + */ +typedef struct sKeywordDesc { + const char *name; + keywordId id; + short isValid [5]; /* indicates languages for which kw is valid */ +} keywordDesc; + +/* Used for reporting the type of object parsed by nextToken (). + */ +typedef enum eTokenType { + TOKEN_NONE, /* none */ + TOKEN_ARGS, /* a parenthetical pair and its contents */ + TOKEN_BRACE_CLOSE, + TOKEN_BRACE_OPEN, + TOKEN_COLON, /* the colon character */ + TOKEN_COMMA, /* the comma character */ + TOKEN_DOUBLE_COLON, /* double colon indicates nested-name-specifier */ + TOKEN_KEYWORD, + TOKEN_NAME, /* an unknown name */ + TOKEN_PACKAGE, /* a Java package name */ + TOKEN_PAREN_NAME, /* a single name in parentheses */ + TOKEN_SEMICOLON, /* the semicolon character */ + TOKEN_SPEC, /* a storage class specifier, qualifier, type, etc. */ + TOKEN_COUNT +} tokenType; + +/* This describes the scoping of the current statement. + */ +typedef enum eTagScope { + SCOPE_GLOBAL, /* no storage class specified */ + SCOPE_STATIC, /* static storage class */ + SCOPE_EXTERN, /* external storage class */ + SCOPE_FRIEND, /* declares access only */ + SCOPE_TYPEDEF, /* scoping depends upon context */ + SCOPE_COUNT +} tagScope; + +typedef enum eDeclaration { + DECL_NONE, + DECL_BASE, /* base type (default) */ + DECL_CLASS, + DECL_ENUM, + DECL_EVENT, + DECL_FUNCTION, + DECL_IGNORE, /* non-taggable "declaration" */ + DECL_INTERFACE, + DECL_NAMESPACE, + DECL_NOMANGLE, /* C++ name demangling block */ + DECL_PACKAGE, + DECL_PROGRAM, /* Vera program */ + DECL_STRUCT, + DECL_TASK, /* Vera task */ + DECL_UNION, + DECL_COUNT +} declType; + +typedef enum eVisibilityType { + ACCESS_UNDEFINED, + ACCESS_LOCAL, + ACCESS_PRIVATE, + ACCESS_PROTECTED, + ACCESS_PUBLIC, + ACCESS_DEFAULT, /* Java-specific */ + ACCESS_COUNT +} accessType; + +/* Information about the parent class of a member (if any). + */ +typedef struct sMemberInfo { + accessType access; /* access of current statement */ + accessType accessDefault; /* access default for current statement */ +} memberInfo; + +typedef struct sTokenInfo { + tokenType type; + keywordId keyword; + vString* name; /* the name of the token */ + unsigned long lineNumber; /* line number of tag */ + fpos_t filePosition; /* file position of line containing name */ +} tokenInfo; + +typedef enum eImplementation { + IMP_DEFAULT, + IMP_ABSTRACT, + IMP_VIRTUAL, + IMP_PURE_VIRTUAL, + IMP_COUNT +} impType; + +/* Describes the statement currently undergoing analysis. + */ +typedef struct sStatementInfo { + tagScope scope; + declType declaration; /* specifier associated with TOKEN_SPEC */ + boolean gotName; /* was a name parsed yet? */ + boolean haveQualifyingName; /* do we have a name we are considering? */ + boolean gotParenName; /* was a name inside parentheses parsed yet? */ + boolean gotArgs; /* was a list of parameters parsed yet? */ + boolean isPointer; /* is 'name' a pointer? */ + boolean inFunction; /* are we inside of a function? */ + boolean assignment; /* have we handled an '='? */ + boolean notVariable; /* has a variable declaration been disqualified ? */ + impType implementation; /* abstract or concrete implementation? */ + unsigned int tokenIndex; /* currently active token */ + tokenInfo* token [(int) NumTokens]; + tokenInfo* context; /* accumulated scope of current statement */ + tokenInfo* blockName; /* name of current block */ + memberInfo member; /* information regarding parent class/struct */ + vString* parentClasses; /* parent classes */ + struct sStatementInfo *parent; /* statement we are nested within */ +} statementInfo; + +/* Describes the type of tag being generated. + */ +typedef enum eTagType { + TAG_UNDEFINED, + TAG_CLASS, /* class name */ + TAG_ENUM, /* enumeration name */ + TAG_ENUMERATOR, /* enumerator (enumeration value) */ + TAG_EVENT, /* event */ + TAG_FIELD, /* field (Java) */ + TAG_FUNCTION, /* function definition */ + TAG_INTERFACE, /* interface declaration */ + TAG_LOCAL, /* local variable definition */ + TAG_MEMBER, /* structure, class or interface member */ + TAG_METHOD, /* method declaration */ + TAG_NAMESPACE, /* namespace name */ + TAG_PACKAGE, /* package name */ + TAG_PROGRAM, /* program name */ + TAG_PROPERTY, /* property name */ + TAG_PROTOTYPE, /* function prototype or declaration */ + TAG_STRUCT, /* structure name */ + TAG_TASK, /* task name */ + TAG_TYPEDEF, /* typedef name */ + TAG_UNION, /* union name */ + TAG_VARIABLE, /* variable definition */ + TAG_EXTERN_VAR, /* external variable declaration */ + TAG_COUNT /* must be last */ +} tagType; + +typedef struct sParenInfo { + boolean isPointer; + boolean isParamList; + boolean isKnrParamList; + boolean isNameCandidate; + boolean invalidContents; + boolean nestedArgs; + unsigned int parameterCount; +} parenInfo; + +/* +* DATA DEFINITIONS +*/ + +static jmp_buf Exception; + +static langType Lang_c; +static langType Lang_cpp; +static langType Lang_csharp; +static langType Lang_java; +static langType Lang_vera; +static vString *Signature; +static boolean CollectingSignature; + +/* Number used to uniquely identify anonymous structs and unions. */ +static int AnonymousID = 0; + +/* Used to index into the CKinds table. */ +typedef enum { + CK_UNDEFINED = -1, + CK_CLASS, CK_DEFINE, CK_ENUMERATOR, CK_FUNCTION, + CK_ENUMERATION, CK_LOCAL, CK_MEMBER, CK_NAMESPACE, CK_PROTOTYPE, + CK_STRUCT, CK_TYPEDEF, CK_UNION, CK_VARIABLE, + CK_EXTERN_VARIABLE +} cKind; + +static kindOption CKinds [] = { + { TRUE, 'c', "class", "classes"}, + { TRUE, 'd', "macro", "macro definitions"}, + { TRUE, 'e', "enumerator", "enumerators (values inside an enumeration)"}, + { TRUE, 'f', "function", "function definitions"}, + { TRUE, 'g', "enum", "enumeration names"}, + { FALSE, 'l', "local", "local variables"}, + { TRUE, 'm', "member", "class, struct, and union members"}, + { TRUE, 'n', "namespace", "namespaces"}, + { FALSE, 'p', "prototype", "function prototypes"}, + { TRUE, 's', "struct", "structure names"}, + { TRUE, 't', "typedef", "typedefs"}, + { TRUE, 'u', "union", "union names"}, + { TRUE, 'v', "variable", "variable definitions"}, + { FALSE, 'x', "externvar", "external variable declarations"}, +}; + +typedef enum { + CSK_UNDEFINED = -1, + CSK_CLASS, CSK_DEFINE, CSK_ENUMERATOR, CSK_EVENT, CSK_FIELD, + CSK_ENUMERATION, CSK_INTERFACE, CSK_LOCAL, CSK_METHOD, + CSK_NAMESPACE, CSK_PROPERTY, CSK_STRUCT, CSK_TYPEDEF +} csharpKind; + +static kindOption CsharpKinds [] = { + { TRUE, 'c', "class", "classes"}, + { TRUE, 'd', "macro", "macro definitions"}, + { TRUE, 'e', "enumerator", "enumerators (values inside an enumeration)"}, + { TRUE, 'E', "event", "events"}, + { TRUE, 'f', "field", "fields"}, + { TRUE, 'g', "enum", "enumeration names"}, + { TRUE, 'i', "interface", "interfaces"}, + { FALSE, 'l', "local", "local variables"}, + { TRUE, 'm', "method", "methods"}, + { TRUE, 'n', "namespace", "namespaces"}, + { TRUE, 'p', "property", "properties"}, + { TRUE, 's', "struct", "structure names"}, + { TRUE, 't', "typedef", "typedefs"}, +}; + +/* Used to index into the JavaKinds table. */ +typedef enum { + JK_UNDEFINED = -1, + JK_CLASS, JK_FIELD, JK_INTERFACE, JK_LOCAL, JK_METHOD, + JK_PACKAGE, JK_ACCESS, JK_CLASS_PREFIX +} javaKind; + +static kindOption JavaKinds [] = { + { TRUE, 'c', "class", "classes"}, + { TRUE, 'f', "field", "fields"}, + { TRUE, 'i', "interface", "interfaces"}, + { FALSE, 'l', "local", "local variables"}, + { TRUE, 'm', "method", "methods"}, + { TRUE, 'p', "package", "packages"}, +}; + +/* Used to index into the VeraKinds table. */ +typedef enum { + VK_UNDEFINED = -1, + VK_CLASS, VK_DEFINE, VK_ENUMERATOR, VK_FUNCTION, + VK_ENUMERATION, VK_LOCAL, VK_MEMBER, VK_PROGRAM, VK_PROTOTYPE, + VK_TASK, VK_TYPEDEF, VK_VARIABLE, + VK_EXTERN_VARIABLE +} veraKind; + +static kindOption VeraKinds [] = { + { TRUE, 'c', "class", "classes"}, + { TRUE, 'd', "macro", "macro definitions"}, + { TRUE, 'e', "enumerator", "enumerators (values inside an enumeration)"}, + { TRUE, 'f', "function", "function definitions"}, + { TRUE, 'g', "enum", "enumeration names"}, + { FALSE, 'l', "local", "local variables"}, + { TRUE, 'm', "member", "class, struct, and union members"}, + { TRUE, 'p', "program", "programs"}, + { FALSE, 'P', "prototype", "function prototypes"}, + { TRUE, 't', "task", "tasks"}, + { TRUE, 'T', "typedef", "typedefs"}, + { TRUE, 'v', "variable", "variable definitions"}, + { FALSE, 'x', "externvar", "external variable declarations"} +}; + +static const keywordDesc KeywordTable [] = { + /* C++ */ + /* ANSI C | C# Java */ + /* | | | | Vera */ + /* keyword keyword ID | | | | | */ + { "__attribute__", KEYWORD_ATTRIBUTE, { 1, 1, 1, 0, 0 } }, + { "abstract", KEYWORD_ABSTRACT, { 0, 0, 1, 1, 0 } }, + { "bad_state", KEYWORD_BAD_STATE, { 0, 0, 0, 0, 1 } }, + { "bad_trans", KEYWORD_BAD_TRANS, { 0, 0, 0, 0, 1 } }, + { "bind", KEYWORD_BIND, { 0, 0, 0, 0, 1 } }, + { "bind_var", KEYWORD_BIND_VAR, { 0, 0, 0, 0, 1 } }, + { "bit", KEYWORD_BIT, { 0, 0, 0, 0, 1 } }, + { "boolean", KEYWORD_BOOLEAN, { 0, 0, 0, 1, 0 } }, + { "byte", KEYWORD_BYTE, { 0, 0, 0, 1, 0 } }, + { "case", KEYWORD_CASE, { 1, 1, 1, 1, 0 } }, + { "catch", KEYWORD_CATCH, { 0, 1, 1, 0, 0 } }, + { "char", KEYWORD_CHAR, { 1, 1, 1, 1, 0 } }, + { "class", KEYWORD_CLASS, { 0, 1, 1, 1, 1 } }, + { "const", KEYWORD_CONST, { 1, 1, 1, 1, 0 } }, + { "constraint", KEYWORD_CONSTRAINT, { 0, 0, 0, 0, 1 } }, + { "coverage_block", KEYWORD_COVERAGE_BLOCK, { 0, 0, 0, 0, 1 } }, + { "coverage_def", KEYWORD_COVERAGE_DEF, { 0, 0, 0, 0, 1 } }, + { "do", KEYWORD_DO, { 1, 1, 1, 1, 0 } }, + { "default", KEYWORD_DEFAULT, { 1, 1, 1, 1, 0 } }, + { "delegate", KEYWORD_DELEGATE, { 0, 0, 1, 0, 0 } }, + { "delete", KEYWORD_DELETE, { 0, 1, 0, 0, 0 } }, + { "double", KEYWORD_DOUBLE, { 1, 1, 1, 1, 0 } }, + { "else", KEYWORD_ELSE, { 1, 1, 0, 1, 0 } }, + { "enum", KEYWORD_ENUM, { 1, 1, 1, 0, 1 } }, + { "event", KEYWORD_EVENT, { 0, 0, 1, 0, 1 } }, + { "explicit", KEYWORD_EXPLICIT, { 0, 1, 1, 0, 0 } }, + { "extends", KEYWORD_EXTENDS, { 0, 0, 0, 1, 1 } }, + { "extern", KEYWORD_EXTERN, { 1, 1, 1, 0, 1 } }, + { "final", KEYWORD_FINAL, { 0, 0, 0, 1, 0 } }, + { "float", KEYWORD_FLOAT, { 1, 1, 1, 1, 0 } }, + { "for", KEYWORD_FOR, { 1, 1, 1, 1, 0 } }, + { "friend", KEYWORD_FRIEND, { 0, 1, 0, 0, 0 } }, + { "function", KEYWORD_FUNCTION, { 0, 0, 0, 0, 1 } }, + { "goto", KEYWORD_GOTO, { 1, 1, 1, 1, 0 } }, + { "if", KEYWORD_IF, { 1, 1, 1, 1, 0 } }, + { "implements", KEYWORD_IMPLEMENTS, { 0, 0, 0, 1, 0 } }, + { "import", KEYWORD_IMPORT, { 0, 0, 0, 1, 0 } }, + { "inline", KEYWORD_INLINE, { 0, 1, 0, 0, 0 } }, + { "inout", KEYWORD_INOUT, { 0, 0, 0, 0, 1 } }, + { "input", KEYWORD_INPUT, { 0, 0, 0, 0, 1 } }, + { "int", KEYWORD_INT, { 1, 1, 1, 1, 0 } }, + { "integer", KEYWORD_INTEGER, { 0, 0, 0, 0, 1 } }, + { "interface", KEYWORD_INTERFACE, { 0, 0, 1, 1, 1 } }, + { "internal", KEYWORD_INTERNAL, { 0, 0, 1, 0, 0 } }, + { "local", KEYWORD_LOCAL, { 0, 0, 0, 0, 1 } }, + { "long", KEYWORD_LONG, { 1, 1, 1, 1, 0 } }, + { "m_bad_state", KEYWORD_M_BAD_STATE, { 0, 0, 0, 0, 1 } }, + { "m_bad_trans", KEYWORD_M_BAD_TRANS, { 0, 0, 0, 0, 1 } }, + { "m_state", KEYWORD_M_STATE, { 0, 0, 0, 0, 1 } }, + { "m_trans", KEYWORD_M_TRANS, { 0, 0, 0, 0, 1 } }, + { "mutable", KEYWORD_MUTABLE, { 0, 1, 0, 0, 0 } }, + { "namespace", KEYWORD_NAMESPACE, { 0, 1, 1, 0, 0 } }, + { "native", KEYWORD_NATIVE, { 0, 0, 0, 1, 0 } }, + { "new", KEYWORD_NEW, { 0, 1, 1, 1, 0 } }, + { "newcov", KEYWORD_NEWCOV, { 0, 0, 0, 0, 1 } }, + { "operator", KEYWORD_OPERATOR, { 0, 1, 1, 0, 0 } }, + { "output", KEYWORD_OUTPUT, { 0, 0, 0, 0, 1 } }, + { "overload", KEYWORD_OVERLOAD, { 0, 1, 0, 0, 0 } }, + { "override", KEYWORD_OVERRIDE, { 0, 0, 1, 0, 0 } }, + { "package", KEYWORD_PACKAGE, { 0, 0, 0, 1, 0 } }, + { "packed", KEYWORD_PACKED, { 0, 0, 0, 0, 1 } }, + { "port", KEYWORD_PORT, { 0, 0, 0, 0, 1 } }, + { "private", KEYWORD_PRIVATE, { 0, 1, 1, 1, 0 } }, + { "program", KEYWORD_PROGRAM, { 0, 0, 0, 0, 1 } }, + { "protected", KEYWORD_PROTECTED, { 0, 1, 1, 1, 1 } }, + { "public", KEYWORD_PUBLIC, { 0, 1, 1, 1, 1 } }, + { "register", KEYWORD_REGISTER, { 1, 1, 0, 0, 0 } }, + { "return", KEYWORD_RETURN, { 1, 1, 1, 1, 0 } }, + { "shadow", KEYWORD_SHADOW, { 0, 0, 0, 0, 1 } }, + { "short", KEYWORD_SHORT, { 1, 1, 1, 1, 0 } }, + { "signed", KEYWORD_SIGNED, { 1, 1, 0, 0, 0 } }, + { "state", KEYWORD_STATE, { 0, 0, 0, 0, 1 } }, + { "static", KEYWORD_STATIC, { 1, 1, 1, 1, 1 } }, + { "string", KEYWORD_STRING, { 0, 0, 1, 0, 1 } }, + { "struct", KEYWORD_STRUCT, { 1, 1, 1, 0, 0 } }, + { "switch", KEYWORD_SWITCH, { 1, 1, 1, 1, 0 } }, + { "synchronized", KEYWORD_SYNCHRONIZED, { 0, 0, 0, 1, 0 } }, + { "task", KEYWORD_TASK, { 0, 0, 0, 0, 1 } }, + { "template", KEYWORD_TEMPLATE, { 0, 1, 0, 0, 0 } }, + { "this", KEYWORD_THIS, { 0, 1, 1, 1, 0 } }, + { "throw", KEYWORD_THROW, { 0, 1, 1, 1, 0 } }, + { "throws", KEYWORD_THROWS, { 0, 0, 0, 1, 0 } }, + { "trans", KEYWORD_TRANS, { 0, 0, 0, 0, 1 } }, + { "transition", KEYWORD_TRANSITION, { 0, 0, 0, 0, 1 } }, + { "transient", KEYWORD_TRANSIENT, { 0, 0, 0, 1, 0 } }, + { "try", KEYWORD_TRY, { 0, 1, 1, 0, 0 } }, + { "typedef", KEYWORD_TYPEDEF, { 1, 1, 1, 0, 1 } }, + { "typename", KEYWORD_TYPENAME, { 0, 1, 0, 0, 0 } }, + { "uint", KEYWORD_UINT, { 0, 0, 1, 0, 0 } }, + { "ulong", KEYWORD_ULONG, { 0, 0, 1, 0, 0 } }, + { "union", KEYWORD_UNION, { 1, 1, 0, 0, 0 } }, + { "unsigned", KEYWORD_UNSIGNED, { 1, 1, 1, 0, 0 } }, + { "ushort", KEYWORD_USHORT, { 0, 0, 1, 0, 0 } }, + { "using", KEYWORD_USING, { 0, 1, 1, 0, 0 } }, + { "virtual", KEYWORD_VIRTUAL, { 0, 1, 1, 0, 1 } }, + { "void", KEYWORD_VOID, { 1, 1, 1, 1, 1 } }, + { "volatile", KEYWORD_VOLATILE, { 1, 1, 1, 1, 0 } }, + { "wchar_t", KEYWORD_WCHAR_T, { 1, 1, 1, 0, 0 } }, + { "while", KEYWORD_WHILE, { 1, 1, 1, 1, 0 } } +}; + +/* +* FUNCTION PROTOTYPES +*/ +static void createTags (const unsigned int nestLevel, statementInfo *const parent); + +/* +* FUNCTION DEFINITIONS +*/ + +extern boolean includingDefineTags (void) +{ + return CKinds [CK_DEFINE].enabled; +} + +/* +* Token management +*/ + +static void initToken (tokenInfo* const token) +{ + token->type = TOKEN_NONE; + token->keyword = KEYWORD_NONE; + token->lineNumber = getSourceLineNumber (); + token->filePosition = getInputFilePosition (); + vStringClear (token->name); +} + +static void advanceToken (statementInfo* const st) +{ + if (st->tokenIndex >= (unsigned int) NumTokens - 1) + st->tokenIndex = 0; + else + ++st->tokenIndex; + initToken (st->token [st->tokenIndex]); +} + +static tokenInfo *prevToken (const statementInfo *const st, unsigned int n) +{ + unsigned int tokenIndex; + unsigned int num = (unsigned int) NumTokens; + Assert (n < num); + tokenIndex = (st->tokenIndex + num - n) % num; + return st->token [tokenIndex]; +} + +static void setToken (statementInfo *const st, const tokenType type) +{ + tokenInfo *token; + token = activeToken (st); + initToken (token); + token->type = type; +} + +static void retardToken (statementInfo *const st) +{ + if (st->tokenIndex == 0) + st->tokenIndex = (unsigned int) NumTokens - 1; + else + --st->tokenIndex; + setToken (st, TOKEN_NONE); +} + +static tokenInfo *newToken (void) +{ + tokenInfo *const token = xMalloc (1, tokenInfo); + token->name = vStringNew (); + initToken (token); + return token; +} + +static void deleteToken (tokenInfo *const token) +{ + if (token != NULL) + { + vStringDelete (token->name); + eFree (token); + } +} + +static const char *accessString (const accessType access) +{ + static const char *const names [] = { + "?", "local", "private", "protected", "public", "default" + }; + Assert (sizeof (names) / sizeof (names [0]) == ACCESS_COUNT); + Assert ((int) access < ACCESS_COUNT); + return names [(int) access]; +} + +static const char *implementationString (const impType imp) +{ + static const char *const names [] ={ + "?", "abstract", "virtual", "pure virtual" + }; + Assert (sizeof (names) / sizeof (names [0]) == IMP_COUNT); + Assert ((int) imp < IMP_COUNT); + return names [(int) imp]; +} + +/* +* Debugging functions +*/ + +#ifdef DEBUG + +#define boolString(c) ((c) ? "TRUE" : "FALSE") + +static const char *tokenString (const tokenType type) +{ + static const char *const names [] = { + "none", "args", "}", "{", "colon", "comma", "double colon", "keyword", + "name", "package", "paren-name", "semicolon", "specifier" + }; + Assert (sizeof (names) / sizeof (names [0]) == TOKEN_COUNT); + Assert ((int) type < TOKEN_COUNT); + return names [(int) type]; +} + +static const char *scopeString (const tagScope scope) +{ + static const char *const names [] = { + "global", "static", "extern", "friend", "typedef" + }; + Assert (sizeof (names) / sizeof (names [0]) == SCOPE_COUNT); + Assert ((int) scope < SCOPE_COUNT); + return names [(int) scope]; +} + +static const char *declString (const declType declaration) +{ + static const char *const names [] = { + "?", "base", "class", "enum", "event", "function", "ignore", + "interface", "namespace", "no mangle", "package", "program", + "struct", "task", "union", + }; + Assert (sizeof (names) / sizeof (names [0]) == DECL_COUNT); + Assert ((int) declaration < DECL_COUNT); + return names [(int) declaration]; +} + +static const char *keywordString (const keywordId keyword) +{ + const size_t count = sizeof (KeywordTable) / sizeof (KeywordTable [0]); + const char *name = "none"; + size_t i; + for (i = 0 ; i < count ; ++i) + { + const keywordDesc *p = &KeywordTable [i]; + if (p->id == keyword) + { + name = p->name; + break; + } + } + return name; +} + +static void __unused__ pt (tokenInfo *const token) +{ + if (isType (token, TOKEN_NAME)) + printf ("type: %-12s: %-13s line: %lu\n", + tokenString (token->type), vStringValue (token->name), + token->lineNumber); + else if (isType (token, TOKEN_KEYWORD)) + printf ("type: %-12s: %-13s line: %lu\n", + tokenString (token->type), keywordString (token->keyword), + token->lineNumber); + else + printf ("type: %-12s line: %lu\n", + tokenString (token->type), token->lineNumber); +} + +static void __unused__ ps (statementInfo *const st) +{ + unsigned int i; + printf ("scope: %s decl: %s gotName: %s gotParenName: %s\n", + scopeString (st->scope), declString (st->declaration), + boolString (st->gotName), boolString (st->gotParenName)); + printf ("haveQualifyingName: %s\n", boolString (st->haveQualifyingName)); + printf ("access: %s default: %s\n", accessString (st->member.access), + accessString (st->member.accessDefault)); + printf ("token : "); + pt (activeToken (st)); + for (i = 1 ; i < (unsigned int) NumTokens ; ++i) + { + printf ("prev %u : ", i); + pt (prevToken (st, i)); + } + printf ("context: "); + pt (st->context); +} + +#endif + +/* +* Statement management +*/ + +static boolean isContextualKeyword (const tokenInfo *const token) +{ + boolean result; + switch (token->keyword) + { + case KEYWORD_CLASS: + case KEYWORD_ENUM: + case KEYWORD_INTERFACE: + case KEYWORD_NAMESPACE: + case KEYWORD_STRUCT: + case KEYWORD_UNION: + result = TRUE; + break; + + default: result = FALSE; break; + } + return result; +} + +static boolean isContextualStatement (const statementInfo *const st) +{ + boolean result = FALSE; + if (st != NULL) switch (st->declaration) + { + case DECL_CLASS: + case DECL_ENUM: + case DECL_INTERFACE: + case DECL_STRUCT: + case DECL_UNION: + result = TRUE; + break; + + default: result = FALSE; break; + } + return result; +} + +static boolean isMember (const statementInfo *const st) +{ + boolean result; + if (isType (st->context, TOKEN_NAME)) + result = TRUE; + else + result = (boolean) + (st->parent != NULL && isContextualStatement (st->parent)); + return result; +} + +static void initMemberInfo (statementInfo *const st) +{ + accessType accessDefault = ACCESS_UNDEFINED; + + if (st->parent != NULL) switch (st->parent->declaration) + { + case DECL_ENUM: + case DECL_NAMESPACE: + case DECL_UNION: + accessDefault = ACCESS_UNDEFINED; + break; + + case DECL_CLASS: + if (isLanguage (Lang_java)) + accessDefault = ACCESS_DEFAULT; + else + accessDefault = ACCESS_PRIVATE; + break; + + case DECL_INTERFACE: + case DECL_STRUCT: + accessDefault = ACCESS_PUBLIC; + break; + + default: break; + } + st->member.accessDefault = accessDefault; + st->member.access = accessDefault; +} + +static void reinitStatement (statementInfo *const st, const boolean partial) +{ + unsigned int i; + + if (! partial) + { + st->scope = SCOPE_GLOBAL; + if (isContextualStatement (st->parent)) + st->declaration = DECL_BASE; + else + st->declaration = DECL_NONE; + } + st->gotParenName = FALSE; + st->isPointer = FALSE; + st->inFunction = FALSE; + st->assignment = FALSE; + st->notVariable = FALSE; + st->implementation = IMP_DEFAULT; + st->gotArgs = FALSE; + st->gotName = FALSE; + st->haveQualifyingName = FALSE; + st->tokenIndex = 0; + + if (st->parent != NULL) + st->inFunction = st->parent->inFunction; + + for (i = 0 ; i < (unsigned int) NumTokens ; ++i) + initToken (st->token [i]); + + initToken (st->context); + + /* Keep the block name, so that a variable following after a comma will + * still have the structure name. + */ + if (! partial) + initToken (st->blockName); + + vStringClear (st->parentClasses); + + /* Init member info. + */ + if (! partial) + st->member.access = st->member.accessDefault; +} + +static void initStatement (statementInfo *const st, statementInfo *const parent) +{ + st->parent = parent; + initMemberInfo (st); + reinitStatement (st, FALSE); +} + +/* +* Tag generation functions +*/ +static cKind cTagKind (const tagType type) +{ + cKind result = CK_UNDEFINED; + switch (type) + { + case TAG_CLASS: result = CK_CLASS; break; + case TAG_ENUM: result = CK_ENUMERATION; break; + case TAG_ENUMERATOR: result = CK_ENUMERATOR; break; + case TAG_FUNCTION: result = CK_FUNCTION; break; + case TAG_LOCAL: result = CK_LOCAL; break; + case TAG_MEMBER: result = CK_MEMBER; break; + case TAG_NAMESPACE: result = CK_NAMESPACE; break; + case TAG_PROTOTYPE: result = CK_PROTOTYPE; break; + case TAG_STRUCT: result = CK_STRUCT; break; + case TAG_TYPEDEF: result = CK_TYPEDEF; break; + case TAG_UNION: result = CK_UNION; break; + case TAG_VARIABLE: result = CK_VARIABLE; break; + case TAG_EXTERN_VAR: result = CK_EXTERN_VARIABLE; break; + + default: Assert ("Bad C tag type" == NULL); break; + } + return result; +} + +static csharpKind csharpTagKind (const tagType type) +{ + csharpKind result = CSK_UNDEFINED; + switch (type) + { + case TAG_CLASS: result = CSK_CLASS; break; + case TAG_ENUM: result = CSK_ENUMERATION; break; + case TAG_ENUMERATOR: result = CSK_ENUMERATOR; break; + case TAG_EVENT: result = CSK_EVENT; break; + case TAG_FIELD: result = CSK_FIELD ; break; + case TAG_INTERFACE: result = CSK_INTERFACE; break; + case TAG_LOCAL: result = CSK_LOCAL; break; + case TAG_METHOD: result = CSK_METHOD; break; + case TAG_NAMESPACE: result = CSK_NAMESPACE; break; + case TAG_PROPERTY: result = CSK_PROPERTY; break; + case TAG_STRUCT: result = CSK_STRUCT; break; + case TAG_TYPEDEF: result = CSK_TYPEDEF; break; + + default: Assert ("Bad C# tag type" == NULL); break; + } + return result; +} + +static javaKind javaTagKind (const tagType type) +{ + javaKind result = JK_UNDEFINED; + switch (type) + { + case TAG_CLASS: result = JK_CLASS; break; + case TAG_FIELD: result = JK_FIELD; break; + case TAG_INTERFACE: result = JK_INTERFACE; break; + case TAG_LOCAL: result = JK_LOCAL; break; + case TAG_METHOD: result = JK_METHOD; break; + case TAG_PACKAGE: result = JK_PACKAGE; break; + + default: Assert ("Bad Java tag type" == NULL); break; + } + return result; +} + +static veraKind veraTagKind (const tagType type) { + veraKind result = VK_UNDEFINED; + switch (type) + { + case TAG_CLASS: result = VK_CLASS; break; + case TAG_ENUM: result = VK_ENUMERATION; break; + case TAG_ENUMERATOR: result = VK_ENUMERATOR; break; + case TAG_FUNCTION: result = VK_FUNCTION; break; + case TAG_LOCAL: result = VK_LOCAL; break; + case TAG_MEMBER: result = VK_MEMBER; break; + case TAG_PROGRAM: result = VK_PROGRAM; break; + case TAG_PROTOTYPE: result = VK_PROTOTYPE; break; + case TAG_TASK: result = VK_TASK; break; + case TAG_TYPEDEF: result = VK_TYPEDEF; break; + case TAG_VARIABLE: result = VK_VARIABLE; break; + case TAG_EXTERN_VAR: result = VK_EXTERN_VARIABLE; break; + + default: Assert ("Bad Vera tag type" == NULL); break; + } + return result; +} + +static const char *tagName (const tagType type) +{ + const char* result; + if (isLanguage (Lang_csharp)) + result = CsharpKinds [csharpTagKind (type)].name; + else if (isLanguage (Lang_java)) + result = JavaKinds [javaTagKind (type)].name; + else if (isLanguage (Lang_vera)) + result = VeraKinds [veraTagKind (type)].name; + else + result = CKinds [cTagKind (type)].name; + return result; +} + +static int tagLetter (const tagType type) +{ + int result; + if (isLanguage (Lang_csharp)) + result = CsharpKinds [csharpTagKind (type)].letter; + else if (isLanguage (Lang_java)) + result = JavaKinds [javaTagKind (type)].letter; + else if (isLanguage (Lang_vera)) + result = VeraKinds [veraTagKind (type)].letter; + else + result = CKinds [cTagKind (type)].letter; + return result; +} + +static boolean includeTag (const tagType type, const boolean isFileScope) +{ + boolean result; + if (isFileScope && ! Option.include.fileScope) + result = FALSE; + else if (isLanguage (Lang_csharp)) + result = CsharpKinds [csharpTagKind (type)].enabled; + else if (isLanguage (Lang_java)) + result = JavaKinds [javaTagKind (type)].enabled; + else if (isLanguage (Lang_vera)) + result = VeraKinds [veraTagKind (type)].enabled; + else + result = CKinds [cTagKind (type)].enabled; + return result; +} + +static tagType declToTagType (const declType declaration) +{ + tagType type = TAG_UNDEFINED; + + switch (declaration) + { + case DECL_CLASS: type = TAG_CLASS; break; + case DECL_ENUM: type = TAG_ENUM; break; + case DECL_EVENT: type = TAG_EVENT; break; + case DECL_FUNCTION: type = TAG_FUNCTION; break; + case DECL_INTERFACE: type = TAG_INTERFACE; break; + case DECL_NAMESPACE: type = TAG_NAMESPACE; break; + case DECL_PROGRAM: type = TAG_PROGRAM; break; + case DECL_TASK: type = TAG_TASK; break; + case DECL_STRUCT: type = TAG_STRUCT; break; + case DECL_UNION: type = TAG_UNION; break; + + default: Assert ("Unexpected declaration" == NULL); break; + } + return type; +} + +static const char* accessField (const statementInfo *const st) +{ + const char* result = NULL; + if (isLanguage (Lang_cpp) && st->scope == SCOPE_FRIEND) + result = "friend"; + else if (st->member.access != ACCESS_UNDEFINED) + result = accessString (st->member.access); + return result; +} + +static void addContextSeparator (vString *const scope) +{ + if (isLanguage (Lang_c) || isLanguage (Lang_cpp)) + vStringCatS (scope, "::"); + else if (isLanguage (Lang_java) || isLanguage (Lang_csharp)) + vStringCatS (scope, "."); +} + +static void addOtherFields (tagEntryInfo* const tag, const tagType type, + const statementInfo *const st, + vString *const scope, vString *const typeRef) +{ + /* For selected tag types, append an extension flag designating the + * parent object in which the tag is defined. + */ + switch (type) + { + default: break; + + case TAG_FUNCTION: + case TAG_METHOD: + case TAG_PROTOTYPE: + if (vStringLength (Signature) > 0) + tag->extensionFields.signature = vStringValue (Signature); + case TAG_CLASS: + case TAG_ENUM: + case TAG_ENUMERATOR: + case TAG_EVENT: + case TAG_FIELD: + case TAG_INTERFACE: + case TAG_MEMBER: + case TAG_NAMESPACE: + case TAG_PROPERTY: + case TAG_STRUCT: + case TAG_TASK: + case TAG_TYPEDEF: + case TAG_UNION: + if (vStringLength (scope) > 0 && + (isMember (st) || st->parent->declaration == DECL_NAMESPACE)) + { + if (isType (st->context, TOKEN_NAME)) + tag->extensionFields.scope [0] = tagName (TAG_CLASS); + else + tag->extensionFields.scope [0] = + tagName (declToTagType (parentDecl (st))); + tag->extensionFields.scope [1] = vStringValue (scope); + } + if ((type == TAG_CLASS || type == TAG_INTERFACE || + type == TAG_STRUCT) && vStringLength (st->parentClasses) > 0) + { + + tag->extensionFields.inheritance = + vStringValue (st->parentClasses); + } + if (st->implementation != IMP_DEFAULT && + (isLanguage (Lang_cpp) || isLanguage (Lang_csharp) || + isLanguage (Lang_java))) + { + tag->extensionFields.implementation = + implementationString (st->implementation); + } + if (isMember (st)) + { + tag->extensionFields.access = accessField (st); + } + break; + } + + /* Add typename info, type of the tag and name of struct/union/etc. */ + if ((type == TAG_TYPEDEF || type == TAG_VARIABLE || type == TAG_MEMBER) + && isContextualStatement(st)) + { + char *p; + + tag->extensionFields.typeRef [0] = + tagName (declToTagType (st->declaration)); + p = vStringValue (st->blockName->name); + + /* If there was no {} block get the name from the token before the + * name (current token is ';' or ',', previous token is the name). + */ + if (p == NULL || *p == '\0') + { + tokenInfo *const prev2 = prevToken (st, 2); + if (isType (prev2, TOKEN_NAME)) + p = vStringValue (prev2->name); + } + + /* Prepend the scope name if there is one. */ + if (vStringLength (scope) > 0) + { + vStringCopy(typeRef, scope); + addContextSeparator (typeRef); + vStringCatS(typeRef, p); + p = vStringValue (typeRef); + } + tag->extensionFields.typeRef [1] = p; + } +} + +static void findScopeHierarchy (vString *const string, + const statementInfo *const st) +{ + vStringClear (string); + if (isType (st->context, TOKEN_NAME)) + vStringCopy (string, st->context->name); + if (st->parent != NULL) + { + vString *temp = vStringNew (); + const statementInfo *s; + for (s = st->parent ; s != NULL ; s = s->parent) + { + if (isContextualStatement (s) || + s->declaration == DECL_NAMESPACE || + s->declaration == DECL_PROGRAM) + { + vStringCopy (temp, string); + vStringClear (string); + Assert (isType (s->blockName, TOKEN_NAME)); + if (isType (s->context, TOKEN_NAME) && + vStringLength (s->context->name) > 0) + { + vStringCat (string, s->context->name); + addContextSeparator (string); + } + vStringCat (string, s->blockName->name); + if (vStringLength (temp) > 0) + addContextSeparator (string); + vStringCat (string, temp); + } + } + vStringDelete (temp); + } +} + +static void makeExtraTagEntry (const tagType type, tagEntryInfo *const e, + vString *const scope) +{ + if (Option.include.qualifiedTags && + scope != NULL && vStringLength (scope) > 0) + { + vString *const scopedName = vStringNew (); + + if (type != TAG_ENUMERATOR) + vStringCopy (scopedName, scope); + else + { + /* remove last component (i.e. enumeration name) from scope */ + const char* const sc = vStringValue (scope); + const char* colon = strrchr (sc, ':'); + if (colon != NULL) + { + while (*colon == ':' && colon > sc) + --colon; + vStringNCopy (scopedName, scope, colon + 1 - sc); + } + } + if (vStringLength (scopedName) > 0) + { + addContextSeparator (scopedName); + vStringCatS (scopedName, e->name); + e->name = vStringValue (scopedName); + makeTagEntry (e); + } + vStringDelete (scopedName); + } +} + +static void makeTag (const tokenInfo *const token, + const statementInfo *const st, + boolean isFileScope, const tagType type) +{ + /* Nothing is really of file scope when it appears in a header file. + */ + isFileScope = (boolean) (isFileScope && ! isHeaderFile ()); + + if (isType (token, TOKEN_NAME) && vStringLength (token->name) > 0 && + includeTag (type, isFileScope)) + { + vString *scope = vStringNew (); + /* Use "typeRef" to store the typename from addOtherFields() until + * it's used in makeTagEntry(). + */ + vString *typeRef = vStringNew (); + tagEntryInfo e; + + initTagEntry (&e, vStringValue (token->name)); + + e.lineNumber = token->lineNumber; + e.filePosition = token->filePosition; + e.isFileScope = isFileScope; + e.kindName = tagName (type); + e.kind = tagLetter (type); + + findScopeHierarchy (scope, st); + addOtherFields (&e, type, st, scope, typeRef); + if(st->token[0]->keyword == KEYWORD_TEMPLATE){ + e.templatefilePosition = st->token[0]->filePosition; + e.hasTemplate = TRUE; + }else{ + e.hasTemplate = FALSE; + } + + makeTagEntry (&e); + makeExtraTagEntry (type, &e, scope); + vStringDelete (scope); + vStringDelete (typeRef); + } +} + +static boolean isValidTypeSpecifier (const declType declaration) +{ + boolean result; + switch (declaration) + { + case DECL_BASE: + case DECL_CLASS: + case DECL_ENUM: + case DECL_EVENT: + case DECL_STRUCT: + case DECL_UNION: + result = TRUE; + break; + + default: + result = FALSE; + break; + } + return result; +} + +static void qualifyEnumeratorTag (const statementInfo *const st, + const tokenInfo *const nameToken) +{ + if (isType (nameToken, TOKEN_NAME)) + makeTag (nameToken, st, TRUE, TAG_ENUMERATOR); +} + +static void qualifyFunctionTag (const statementInfo *const st, + const tokenInfo *const nameToken) +{ + if (isType (nameToken, TOKEN_NAME)) + { + tagType type; + const boolean isFileScope = + (boolean) (st->member.access == ACCESS_PRIVATE || + (!isMember (st) && st->scope == SCOPE_STATIC)); + if (isLanguage (Lang_java) || isLanguage (Lang_csharp)) + type = TAG_METHOD; + else if (isLanguage (Lang_vera) && st->declaration == DECL_TASK) + type = TAG_TASK; + else + type = TAG_FUNCTION; + makeTag (nameToken, st, isFileScope, type); + } +} + +static void qualifyFunctionDeclTag (const statementInfo *const st, + const tokenInfo *const nameToken) +{ + if (! isType (nameToken, TOKEN_NAME)) + ; + else if (isLanguage (Lang_java) || isLanguage (Lang_csharp)) + qualifyFunctionTag (st, nameToken); + else if (st->scope == SCOPE_TYPEDEF) + makeTag (nameToken, st, TRUE, TAG_TYPEDEF); + else if (isValidTypeSpecifier (st->declaration) && ! isLanguage (Lang_csharp)) + makeTag (nameToken, st, TRUE, TAG_PROTOTYPE); +} + +static void qualifyCompoundTag (const statementInfo *const st, + const tokenInfo *const nameToken) +{ + if (isType (nameToken, TOKEN_NAME)) + { + const tagType type = declToTagType (st->declaration); + const boolean fileScoped = (boolean) + (!(isLanguage (Lang_java) || + isLanguage (Lang_csharp) || + isLanguage (Lang_vera))); + + if (type != TAG_UNDEFINED) + makeTag (nameToken, st, fileScoped, type); + } +} + +static void qualifyBlockTag (statementInfo *const st, + const tokenInfo *const nameToken) +{ + switch (st->declaration) + { + case DECL_CLASS: + case DECL_ENUM: + case DECL_INTERFACE: + case DECL_NAMESPACE: + case DECL_PROGRAM: + case DECL_STRUCT: + case DECL_UNION: + qualifyCompoundTag (st, nameToken); + break; + default: break; + } +} + +static void qualifyVariableTag (const statementInfo *const st, + const tokenInfo *const nameToken) +{ + /* We have to watch that we do not interpret a declaration of the + * form "struct tag;" as a variable definition. In such a case, the + * token preceding the name will be a keyword. + */ + if (! isType (nameToken, TOKEN_NAME)) + ; + else if (st->scope == SCOPE_TYPEDEF) + makeTag (nameToken, st, TRUE, TAG_TYPEDEF); + else if (st->declaration == DECL_EVENT) + makeTag (nameToken, st, (boolean) (st->member.access == ACCESS_PRIVATE), + TAG_EVENT); + else if (st->declaration == DECL_PACKAGE) + makeTag (nameToken, st, FALSE, TAG_PACKAGE); + else if (isValidTypeSpecifier (st->declaration)) + { + if (st->notVariable) + ; + else if (isMember (st)) + { + if (isLanguage (Lang_java) || isLanguage (Lang_csharp)) + makeTag (nameToken, st, + (boolean) (st->member.access == ACCESS_PRIVATE), TAG_FIELD); + else if (st->scope == SCOPE_GLOBAL || st->scope == SCOPE_STATIC) + makeTag (nameToken, st, TRUE, TAG_MEMBER); + } + else + { + if (st->scope == SCOPE_EXTERN || ! st->haveQualifyingName) + makeTag (nameToken, st, FALSE, TAG_EXTERN_VAR); + else if (st->inFunction) + makeTag (nameToken, st, (boolean) (st->scope == SCOPE_STATIC), + TAG_LOCAL); + else + makeTag (nameToken, st, (boolean) (st->scope == SCOPE_STATIC), + TAG_VARIABLE); + } + } +} + +/* +* Parsing functions +*/ + +static int skipToOneOf (const char *const chars) +{ + int c; + do + c = cppGetc (); + while (c != EOF && c != '\0' && strchr (chars, c) == NULL); + return c; +} + +/* Skip to the next non-white character. + */ +static int skipToNonWhite (void) +{ + boolean found = FALSE; + int c; + +#if 0 + do + c = cppGetc (); + while (isspace (c)); +#else + while (1) + { + c = cppGetc (); + if (isspace (c)) + found = TRUE; + else + break; + } + if (CollectingSignature && found) + vStringPut (Signature, ' '); +#endif + + return c; +} + +/* Skips to the next brace in column 1. This is intended for cases where + * preprocessor constructs result in unbalanced braces. + */ +static void skipToFormattedBraceMatch (void) +{ + int c, next; + + c = cppGetc (); + next = cppGetc (); + while (c != EOF && (c != '\n' || next != '}')) + { + c = next; + next = cppGetc (); + } +} + +/* Skip to the matching character indicated by the pair string. If skipping + * to a matching brace and any brace is found within a different level of a + * #if conditional statement while brace formatting is in effect, we skip to + * the brace matched by its formatting. It is assumed that we have already + * read the character which starts the group (i.e. the first character of + * "pair"). + */ +static void skipToMatch (const char *const pair) +{ + const boolean braceMatching = (boolean) (strcmp ("{}", pair) == 0); + const boolean braceFormatting = (boolean) (isBraceFormat () && braceMatching); + const unsigned int initialLevel = getDirectiveNestLevel (); + const int begin = pair [0], end = pair [1]; + const unsigned long inputLineNumber = getInputLineNumber (); + int matchLevel = 1; + int c = '\0'; + + while (matchLevel > 0 && (c = skipToNonWhite ()) != EOF) + { + if (CollectingSignature) + vStringPut (Signature, c); + if (c == begin) + { + ++matchLevel; + if (braceFormatting && getDirectiveNestLevel () != initialLevel) + { + skipToFormattedBraceMatch (); + break; + } + } + else if (c == end) + { + --matchLevel; + if (braceFormatting && getDirectiveNestLevel () != initialLevel) + { + skipToFormattedBraceMatch (); + break; + } + } + } + if (c == EOF) + { + verbose ("%s: failed to find match for '%c' at line %lu\n", + getInputFileName (), begin, inputLineNumber); + if (braceMatching) + longjmp (Exception, (int) ExceptionBraceFormattingError); + else + longjmp (Exception, (int) ExceptionFormattingError); + } +} + +static void skipParens (void) +{ + const int c = skipToNonWhite (); + + if (c == '(') + skipToMatch ("()"); + else + cppUngetc (c); +} + +static void skipBraces (void) +{ + const int c = skipToNonWhite (); + + if (c == '{') + skipToMatch ("{}"); + else + cppUngetc (c); +} + +static keywordId analyzeKeyword (const char *const name) +{ + const keywordId id = (keywordId) lookupKeyword (name, getSourceLanguage ()); + return id; +} + +static void analyzeIdentifier (tokenInfo *const token) +{ + char *const name = vStringValue (token->name); + const char *replacement = NULL; + boolean parensToo = FALSE; + + if (isLanguage (Lang_java) || + ! isIgnoreToken (name, &parensToo, &replacement)) + { + if (replacement != NULL) + { + //Eran Ifrah: in case we have replacement string, replace the + //token's name as well + vStringDelete(token->name); + token->name = vStringNewInit(replacement); + token->keyword = analyzeKeyword (replacement); + } + else + token->keyword = analyzeKeyword (vStringValue (token->name)); + + if (token->keyword == KEYWORD_NONE) + token->type = TOKEN_NAME; + else + token->type = TOKEN_KEYWORD; + } + else + { + initToken (token); + if (parensToo) + { + int c = skipToNonWhite (); + + if (c == '(') + skipToMatch ("()"); + } + } +} + +static void readIdentifier (tokenInfo *const token, const int firstChar) +{ + vString *const name = token->name; + int c = firstChar; + boolean first = TRUE; + + initToken (token); + + do + { + vStringPut (name, c); + if (CollectingSignature) + { + if (!first) + vStringPut (Signature, c); + first = FALSE; + } + c = cppGetc (); + } while (isident (c) || (isLanguage (Lang_java) && isHighChar (c))); + vStringTerminate (name); + cppUngetc (c); /* unget non-identifier character */ + + analyzeIdentifier (token); +} + +static void readPackageName (tokenInfo *const token, const int firstChar) +{ + vString *const name = token->name; + int c = firstChar; + + initToken (token); + + while (isident (c) || c == '.') + { + vStringPut (name, c); + c = cppGetc (); + } + vStringTerminate (name); + cppUngetc (c); /* unget non-package character */ +} + +static void readPackage (statementInfo *const st) +{ + tokenInfo *const token = activeToken (st); + Assert (isType (token, TOKEN_KEYWORD)); + readPackageName (token, skipToNonWhite ()); + token->type = TOKEN_NAME; + st->declaration = DECL_PACKAGE; + st->gotName = TRUE; + st->haveQualifyingName = TRUE; +} + +static void processName (statementInfo *const st) +{ + Assert (isType (activeToken (st), TOKEN_NAME)); + if (st->gotName && st->declaration == DECL_NONE) + st->declaration = DECL_BASE; + st->gotName = TRUE; + st->haveQualifyingName = TRUE; +} + +static void readOperator (statementInfo *const st) +{ + const char *const acceptable = "+-*/%^&|~!=<>,[]"; + const tokenInfo* const prev = prevToken (st,1); + tokenInfo *const token = activeToken (st); + vString *const name = token->name; + int c = skipToNonWhite (); + + /* When we arrive here, we have the keyword "operator" in 'name'. + */ + if (isType (prev, TOKEN_KEYWORD) && (prev->keyword == KEYWORD_ENUM || + prev->keyword == KEYWORD_STRUCT || prev->keyword == KEYWORD_UNION)) + ; /* ignore "operator" keyword if preceded by these keywords */ + else if (c == '(') + { + /* Verify whether this is a valid function call (i.e. "()") operator. + */ + if (cppGetc () == ')') + { + vStringPut (name, ' '); /* always separate operator from keyword */ + c = skipToNonWhite (); + if (c == '(') + vStringCatS (name, "()"); + } + else + { + skipToMatch ("()"); + c = cppGetc (); + } + } + else if (isident1 (c)) + { + /* Handle "new" and "delete" operators, and conversion functions + * (per 13.3.1.1.2 [2] of the C++ spec). + */ + boolean whiteSpace = TRUE; /* default causes insertion of space */ + do + { + if (isspace (c)) + whiteSpace = TRUE; + else + { + if (whiteSpace) + { + vStringPut (name, ' '); + whiteSpace = FALSE; + } + vStringPut (name, c); + } + c = cppGetc (); + } while (! isOneOf (c, "(;") && c != EOF); + vStringTerminate (name); + } + else if (isOneOf (c, acceptable)) + { + vStringPut (name, ' '); /* always separate operator from keyword */ + do + { + vStringPut (name, c); + c = cppGetc (); + } while (isOneOf (c, acceptable)); + vStringTerminate (name); + } + + cppUngetc (c); + + token->type = TOKEN_NAME; + token->keyword = KEYWORD_NONE; + processName (st); +} + +static void copyToken (tokenInfo *const dest, const tokenInfo *const src) +{ + dest->type = src->type; + dest->keyword = src->keyword; + dest->filePosition = src->filePosition; + dest->lineNumber = src->lineNumber; + vStringCopy (dest->name, src->name); +} + +static void setAccess (statementInfo *const st, const accessType access) +{ + if (isMember (st)) + { + if (isLanguage (Lang_cpp)) + { + int c = skipToNonWhite (); + + if (c == ':') + reinitStatement (st, FALSE); + else + cppUngetc (c); + + st->member.accessDefault = access; + } + st->member.access = access; + } +} + +static void discardTypeList (tokenInfo *const token) +{ + int c = skipToNonWhite (); + while (isident1 (c)) + { + readIdentifier (token, c); + c = skipToNonWhite (); + if (c == '.' || c == ',') + c = skipToNonWhite (); + } + cppUngetc (c); +} + +static void addParentClass (statementInfo *const st, tokenInfo *const token) +{ + if (vStringLength (token->name) > 0 && + vStringLength (st->parentClasses) > 0) + { + vStringPut (st->parentClasses, ','); + } + vStringCat (st->parentClasses, token->name); +} + +static void readParents (statementInfo *const st, const int qualifier) +{ + tokenInfo *const token = newToken (); + tokenInfo *const parent = newToken (); + int c; + + do + { + c = skipToNonWhite (); + if (isident1 (c)) + { + readIdentifier (token, c); + if (isType (token, TOKEN_NAME)) + vStringCat (parent->name, token->name); + else + { + addParentClass (st, parent); + initToken (parent); + } + } + else if (c == qualifier) + vStringPut (parent->name, c); + else if (c == '<') + skipToMatch ("<>"); + else if (isType (token, TOKEN_NAME)) + { + addParentClass (st, parent); + initToken (parent); + } + } while (c != '{' && c != EOF); + cppUngetc (c); + deleteToken (parent); + deleteToken (token); +} + +static void skipStatement (statementInfo *const st) +{ + st->declaration = DECL_IGNORE; + skipToOneOf (";"); +} + +static void processToken (tokenInfo *const token, statementInfo *const st) +{ + switch (token->keyword) /* is it a reserved word? */ + { + default: break; + + case KEYWORD_NONE: processName (st); break; + case KEYWORD_ABSTRACT: st->implementation = IMP_ABSTRACT; break; + case KEYWORD_ATTRIBUTE: skipParens (); initToken (token); break; + case KEYWORD_BIND: st->declaration = DECL_BASE; break; + case KEYWORD_BIT: st->declaration = DECL_BASE; break; + case KEYWORD_CATCH: skipParens (); skipBraces (); break; + case KEYWORD_CHAR: st->declaration = DECL_BASE; break; + case KEYWORD_CLASS: st->declaration = DECL_CLASS; break; + case KEYWORD_CONST: st->declaration = DECL_BASE; break; + case KEYWORD_DOUBLE: st->declaration = DECL_BASE; break; + case KEYWORD_ENUM: st->declaration = DECL_ENUM; break; + case KEYWORD_EXTENDS: readParents (st, '.'); + setToken (st, TOKEN_NONE); break; + case KEYWORD_FLOAT: st->declaration = DECL_BASE; break; + case KEYWORD_FUNCTION: st->declaration = DECL_BASE; break; + case KEYWORD_FRIEND: st->scope = SCOPE_FRIEND; break; + case KEYWORD_GOTO: skipStatement (st); break; + case KEYWORD_IMPLEMENTS:readParents (st, '.'); + setToken (st, TOKEN_NONE); break; + case KEYWORD_IMPORT: skipStatement (st); break; + case KEYWORD_INT: st->declaration = DECL_BASE; break; + case KEYWORD_INTEGER: st->declaration = DECL_BASE; break; + case KEYWORD_INTERFACE: st->declaration = DECL_INTERFACE; break; + case KEYWORD_LOCAL: setAccess (st, ACCESS_LOCAL); break; + case KEYWORD_LONG: st->declaration = DECL_BASE; break; + case KEYWORD_NAMESPACE: st->declaration = DECL_NAMESPACE; break; + case KEYWORD_OPERATOR: readOperator (st); break; + case KEYWORD_PACKAGE: readPackage (st); break; + case KEYWORD_PRIVATE: setAccess (st, ACCESS_PRIVATE); break; + case KEYWORD_PROGRAM: st->declaration = DECL_PROGRAM; break; + case KEYWORD_PROTECTED: setAccess (st, ACCESS_PROTECTED); break; + case KEYWORD_PUBLIC: setAccess (st, ACCESS_PUBLIC); break; + case KEYWORD_RETURN: skipStatement (st); break; + case KEYWORD_SHORT: st->declaration = DECL_BASE; break; + case KEYWORD_SIGNED: st->declaration = DECL_BASE; break; + case KEYWORD_STRING: st->declaration = DECL_BASE; break; + case KEYWORD_STRUCT: st->declaration = DECL_STRUCT; break; + case KEYWORD_TASK: st->declaration = DECL_TASK; break; + case KEYWORD_THROWS: discardTypeList (token); break; + case KEYWORD_UNION: st->declaration = DECL_UNION; break; + case KEYWORD_UNSIGNED: st->declaration = DECL_BASE; break; + case KEYWORD_USING: skipStatement (st); break; + case KEYWORD_VOID: st->declaration = DECL_BASE; break; + case KEYWORD_VOLATILE: st->declaration = DECL_BASE; break; + case KEYWORD_VIRTUAL: st->implementation = IMP_VIRTUAL; break; + + case KEYWORD_EVENT: + if (isLanguage (Lang_csharp)) + st->declaration = DECL_EVENT; + break; + + case KEYWORD_TYPEDEF: + reinitStatement (st, FALSE); + st->scope = SCOPE_TYPEDEF; + break; + + case KEYWORD_EXTERN: + if (! isLanguage (Lang_csharp) || !st->gotName) + { + reinitStatement (st, FALSE); + st->scope = SCOPE_EXTERN; + st->declaration = DECL_BASE; + } + break; + + case KEYWORD_STATIC: + if (! (isLanguage (Lang_java) || isLanguage (Lang_csharp))) + { + reinitStatement (st, FALSE); + st->scope = SCOPE_STATIC; + st->declaration = DECL_BASE; + } + break; + + case KEYWORD_FOR: + case KEYWORD_IF: + case KEYWORD_SWITCH: + case KEYWORD_WHILE: + { + int c = skipToNonWhite (); + if (c == '(') + skipToMatch ("()"); + break; + } + } +} + +/* +* Parenthesis handling functions +*/ + +static void restartStatement (statementInfo *const st) +{ + tokenInfo *const save = newToken (); + tokenInfo *token = activeToken (st); + + copyToken (save, token); + DebugStatement ( if (debug (DEBUG_PARSE)) printf ("");) + reinitStatement (st, FALSE); + token = activeToken (st); + copyToken (token, save); + deleteToken (save); + processToken (token, st); +} + +/* Skips over a the mem-initializer-list of a ctor-initializer, defined as: + * + * mem-initializer-list: + * mem-initializer, mem-initializer-list + * + * mem-initializer: + * [::] [nested-name-spec] class-name (...) + * identifier + */ +static void skipMemIntializerList (tokenInfo *const token) +{ + int c; + + do + { + c = skipToNonWhite (); + while (isident1 (c) || c == ':') + { + if (c != ':') + readIdentifier (token, c); + c = skipToNonWhite (); + } + if (c == '<') + { + skipToMatch ("<>"); + c = skipToNonWhite (); + } + if (c == '(') + { + skipToMatch ("()"); + c = skipToNonWhite (); + } + } while (c == ','); + cppUngetc (c); +} + +static void skipMacro (statementInfo *const st) +{ + tokenInfo *const prev2 = prevToken (st, 2); + + if (isType (prev2, TOKEN_NAME)) + retardToken (st); + skipToMatch ("()"); +} + +/* Skips over characters following the parameter list. This will be either + * non-ANSI style function declarations or C++ stuff. Our choices: + * + * C (K&R): + * int func (); + * int func (one, two) int one; float two; {...} + * C (ANSI): + * int func (int one, float two); + * int func (int one, float two) {...} + * C++: + * int foo (...) [const|volatile] [throw (...)]; + * int foo (...) [const|volatile] [throw (...)] [ctor-initializer] {...} + * int foo (...) [const|volatile] [throw (...)] try [ctor-initializer] {...} + * catch (...) {...} + */ +static boolean skipPostArgumentStuff ( + statementInfo *const st, parenInfo *const info) +{ + tokenInfo *const token = activeToken (st); + unsigned int parameters = info->parameterCount; + unsigned int elementCount = 0; + boolean restart = FALSE; + boolean end = FALSE; + int c = skipToNonWhite (); + + do + { + switch (c) + { + case ')': break; + case ':': skipMemIntializerList (token);break; /* ctor-initializer */ + case '[': skipToMatch ("[]"); break; + case '=': cppUngetc (c); end = TRUE; break; + case '{': cppUngetc (c); end = TRUE; break; + case '}': cppUngetc (c); end = TRUE; break; + + case '(': + if (elementCount > 0) + ++elementCount; + skipToMatch ("()"); + break; + + case ';': + if (parameters == 0 || elementCount < 2) + { + cppUngetc (c); + end = TRUE; + } + else if (--parameters == 0) + end = TRUE; + break; + + default: + if (isident1 (c)) + { + readIdentifier (token, c); + switch (token->keyword) + { + case KEYWORD_ATTRIBUTE: skipParens (); break; + case KEYWORD_THROW: skipParens (); break; + case KEYWORD_TRY: break; + + case KEYWORD_CONST: + case KEYWORD_VOLATILE: + if (vStringLength (Signature) > 0) + { + vStringPut (Signature, ' '); + vStringCat (Signature, token->name); + } + break; + + case KEYWORD_CATCH: + case KEYWORD_CLASS: + case KEYWORD_EXPLICIT: + case KEYWORD_EXTERN: + case KEYWORD_FRIEND: + case KEYWORD_INLINE: + case KEYWORD_MUTABLE: + case KEYWORD_NAMESPACE: + case KEYWORD_NEW: + case KEYWORD_NEWCOV: + case KEYWORD_OPERATOR: + case KEYWORD_OVERLOAD: + case KEYWORD_PRIVATE: + case KEYWORD_PROTECTED: + case KEYWORD_PUBLIC: + case KEYWORD_STATIC: + case KEYWORD_TEMPLATE: + case KEYWORD_TYPEDEF: + case KEYWORD_TYPENAME: + case KEYWORD_USING: + case KEYWORD_VIRTUAL: + /* Never allowed within parameter declarations. */ + restart = TRUE; + end = TRUE; + break; + + default: + if (isType (token, TOKEN_NONE)) + ; + else if (info->isKnrParamList && info->parameterCount > 0) + ++elementCount; + else + { + /* If we encounter any other identifier immediately + * following an empty parameter list, this is almost + * certainly one of those Microsoft macro "thingies" + * that the automatic source code generation sticks + * in. Terminate the current statement. + */ + restart = TRUE; + end = TRUE; + } + break; + } + } + } + if (! end) + { + c = skipToNonWhite (); + if (c == EOF) + end = TRUE; + } + } while (! end); + + if (restart) + restartStatement (st); + else + setToken (st, TOKEN_NONE); + + return (boolean) (c != EOF); +} + +static void skipJavaThrows (statementInfo *const st) +{ + tokenInfo *const token = activeToken (st); + int c = skipToNonWhite (); + + if (isident1 (c)) + { + readIdentifier (token, c); + if (token->keyword == KEYWORD_THROWS) + { + do + { + c = skipToNonWhite (); + if (isident1 (c)) + { + readIdentifier (token, c); + c = skipToNonWhite (); + } + } while (c == '.' || c == ','); + } + } + cppUngetc (c); + setToken (st, TOKEN_NONE); +} + +static void analyzePostParens (statementInfo *const st, parenInfo *const info) +{ + const unsigned long inputLineNumber = getInputLineNumber (); + int c = skipToNonWhite (); + + cppUngetc (c); + if (isOneOf (c, "{;,=")) + ; + else if (isLanguage (Lang_java)) + skipJavaThrows (st); + else + { + if (! skipPostArgumentStuff (st, info)) + { + verbose ( + "%s: confusing argument declarations beginning at line %lu\n", + getInputFileName (), inputLineNumber); + longjmp (Exception, (int) ExceptionFormattingError); + } + } +} + +static int parseParens (statementInfo *const st, parenInfo *const info) +{ + tokenInfo *const token = activeToken (st); + unsigned int identifierCount = 0; + unsigned int depth = 1; + boolean firstChar = TRUE; + int nextChar = '\0'; + + CollectingSignature = TRUE; + vStringClear (Signature); + vStringPut (Signature, '('); + info->parameterCount = 1; + do + { + int c = skipToNonWhite (); + vStringPut (Signature, c); + + switch (c) + { + case '&': + case '*': + info->isPointer = TRUE; + info->isKnrParamList = FALSE; + if (identifierCount == 0) + info->isParamList = FALSE; + initToken (token); + break; + + case ':': + info->isKnrParamList = FALSE; + break; + + case '.': + info->isNameCandidate = FALSE; + c = cppGetc (); + if (c != '.') + { + cppUngetc (c); + info->isKnrParamList = FALSE; + } + else + { + c = cppGetc (); + if (c != '.') + { + cppUngetc (c); + info->isKnrParamList = FALSE; + } + else + vStringCatS (Signature, "..."); /* variable arg list */ + } + break; + + case ',': + info->isNameCandidate = FALSE; + if (info->isKnrParamList) + { + ++info->parameterCount; + identifierCount = 0; + } + break; + + case '=': + info->isKnrParamList = FALSE; + info->isNameCandidate = FALSE; + if (firstChar) + { + info->isParamList = FALSE; + skipMacro (st); + depth = 0; + } + break; + + case '[': + info->isKnrParamList = FALSE; + skipToMatch ("[]"); + break; + + case '<': + info->isKnrParamList = FALSE; + skipToMatch ("<>"); + break; + + case ')': + if (firstChar) + info->parameterCount = 0; + --depth; + break; + + case '(': + info->isKnrParamList = FALSE; + if (firstChar) + { + info->isNameCandidate = FALSE; + cppUngetc (c); + vStringClear (Signature); + skipMacro (st); + depth = 0; + vStringChop (Signature); + } + else if (isType (token, TOKEN_PAREN_NAME)) + { + c = skipToNonWhite (); + if (c == '*') /* check for function pointer */ + { + skipToMatch ("()"); + c = skipToNonWhite (); + if (c == '(') + skipToMatch ("()"); + else + cppUngetc (c); + } + else + { + cppUngetc (c); + cppUngetc ('('); + info->nestedArgs = TRUE; + } + } + else + ++depth; + break; + + default: + if (isident1 (c)) + { + if (++identifierCount > 1) + info->isKnrParamList = FALSE; + readIdentifier (token, c); + if (isType (token, TOKEN_NAME) && info->isNameCandidate) + token->type = TOKEN_PAREN_NAME; + else if (isType (token, TOKEN_KEYWORD)) + { + if (token->keyword != KEYWORD_CONST && + token->keyword != KEYWORD_VOLATILE) + { + info->isKnrParamList = FALSE; + info->isNameCandidate = FALSE; + } + } + } + else + { + info->isParamList = FALSE; + info->isKnrParamList = FALSE; + info->isNameCandidate = FALSE; + info->invalidContents = TRUE; + } + break; + } + firstChar = FALSE; + } while (! info->nestedArgs && depth > 0 && + (info->isKnrParamList || info->isNameCandidate)); + + if (! info->nestedArgs) while (depth > 0) + { + skipToMatch ("()"); + --depth; + } + + if (! info->isNameCandidate) + initToken (token); + + vStringTerminate (Signature); + if (info->isKnrParamList) + vStringClear (Signature); + CollectingSignature = FALSE; + return nextChar; +} + +static void initParenInfo (parenInfo *const info) +{ + info->isPointer = FALSE; + info->isParamList = TRUE; + info->isKnrParamList = isLanguage (Lang_c); + info->isNameCandidate = TRUE; + info->invalidContents = FALSE; + info->nestedArgs = FALSE; + info->parameterCount = 0; +} + +static void analyzeParens (statementInfo *const st) +{ + tokenInfo *const prev = prevToken (st, 1); + + if (st->inFunction && ! st->assignment) + st->notVariable = TRUE; + if (! isType (prev, TOKEN_NONE)) /* in case of ignored enclosing macros */ + { + tokenInfo *const token = activeToken (st); + parenInfo info; + int c; + + initParenInfo (&info); + parseParens (st, &info); + c = skipToNonWhite (); + cppUngetc (c); + if (info.invalidContents) + reinitStatement (st, FALSE); + else if (info.isNameCandidate && isType (token, TOKEN_PAREN_NAME) && + ! st->gotParenName && + (! info.isParamList || ! st->haveQualifyingName || + c == '(' || + (c == '=' && st->implementation != IMP_VIRTUAL) || + (st->declaration == DECL_NONE && isOneOf (c, ",;")))) + { + token->type = TOKEN_NAME; + processName (st); + st->gotParenName = TRUE; + if (! (c == '(' && info.nestedArgs)) + st->isPointer = info.isPointer; + } + else if (! st->gotArgs && info.isParamList) + { + st->gotArgs = TRUE; + setToken (st, TOKEN_ARGS); + advanceToken (st); + if (st->scope != SCOPE_TYPEDEF) + analyzePostParens (st, &info); + } + else + setToken (st, TOKEN_NONE); + } +} + +/* +* Token parsing functions +*/ + +static void addContext (statementInfo *const st, const tokenInfo* const token) +{ + if (isType (token, TOKEN_NAME)) + { + if (vStringLength (st->context->name) > 0) + { + if (isLanguage (Lang_c) || isLanguage (Lang_cpp)) + vStringCatS (st->context->name, "::"); + else if (isLanguage (Lang_java) || isLanguage (Lang_csharp)) + vStringCatS (st->context->name, "."); + } + vStringCat (st->context->name, token->name); + st->context->type = TOKEN_NAME; + } +} + +static boolean inheritingDeclaration (declType decl) +{ + return (boolean) ( + decl == DECL_CLASS || + decl == DECL_STRUCT || + decl == DECL_INTERFACE); +} + +static void processColon (statementInfo *const st) +{ + int c = skipToNonWhite (); + const boolean doubleColon = (boolean) (c == ':'); + + if (doubleColon) + { + setToken (st, TOKEN_DOUBLE_COLON); + st->haveQualifyingName = FALSE; + } + else + { + cppUngetc (c); + if ((isLanguage (Lang_cpp) || isLanguage (Lang_csharp)) && + inheritingDeclaration (st->declaration)) + { + readParents (st, ':'); + } + else if (parentDecl (st) == DECL_STRUCT) + { + c = skipToOneOf (",;"); + if (c == ',') + setToken (st, TOKEN_COMMA); + else if (c == ';') + setToken (st, TOKEN_SEMICOLON); + } + else + { + const tokenInfo *const prev = prevToken (st, 1); + const tokenInfo *const prev2 = prevToken (st, 2); + if (prev->keyword == KEYWORD_DEFAULT || + prev2->keyword == KEYWORD_CASE || + st->parent != NULL) + { + reinitStatement (st, FALSE); + } + } + } +} + +static void processAngleBracket (void) +{ + int c = cppGetc (); + if (c == '>') + ; /* already found match for template */ + else if (isLanguage (Lang_cpp) && c != '<' && c != '=') + skipToMatch ("<>"); /* this is a template */ + else + cppUngetc (c); +} + +/* Skips over any initializing value which may follow an '=' character in a + * variable definition. + */ +static int skipInitializer (statementInfo *const st) +{ + boolean done = FALSE; + int c; + + while (! done) + { + c = skipToNonWhite (); + + if (c == EOF) + longjmp (Exception, (int) ExceptionFormattingError); + else switch (c) + { + case ',': + case ';': done = TRUE; break; + + case '0': + if (st->implementation == IMP_VIRTUAL) + st->implementation = IMP_PURE_VIRTUAL; + break; + + case '[': skipToMatch ("[]"); break; + case '(': skipToMatch ("()"); break; + case '{': skipToMatch ("{}"); break; + + case '}': + if (insideEnumBody (st)) + done = TRUE; + else if (! isBraceFormat ()) + { + verbose ("%s: unexpected closing brace at line %lu\n", + getInputFileName (), getInputLineNumber ()); + longjmp (Exception, (int) ExceptionBraceFormattingError); + } + break; + + default: break; + } + } + return c; +} + +static void processInitializer (statementInfo *const st) +{ + const boolean inEnumBody = insideEnumBody (st); + int c = cppGetc (); + + if (c != '=') + { + cppUngetc (c); + c = skipInitializer (st); + st->assignment = TRUE; + if (c == ';') + setToken (st, TOKEN_SEMICOLON); + else if (c == ',') + setToken (st, TOKEN_COMMA); + else if ('}' && inEnumBody) + { + cppUngetc (c); + setToken (st, TOKEN_COMMA); + } + if (st->scope == SCOPE_EXTERN) + st->scope = SCOPE_GLOBAL; + } +} + +static void parseIdentifier (statementInfo *const st, const int c) +{ + tokenInfo *const token = activeToken (st); + + readIdentifier (token, c); + if (! isType (token, TOKEN_NONE)) + processToken (token, st); +} + +static void parseGeneralToken (statementInfo *const st, const int c) +{ + const tokenInfo *const prev = prevToken (st, 1); + + if (isident1 (c) || (isLanguage (Lang_java) && isHighChar (c))) + { + parseIdentifier (st, c); + if (isType (st->context, TOKEN_NAME) && + isType (activeToken (st), TOKEN_NAME) && isType (prev, TOKEN_NAME)) + { + initToken (st->context); + } + } + else if (c == '.' || c == '-') + { + if (! st->assignment) + st->notVariable = TRUE; + if (c == '-') + { + int c2 = cppGetc (); + if (c2 != '>') + cppUngetc (c2); + } + } + else if (c == '!' || c == '>') + { + int c2 = cppGetc (); + if (c2 != '=') + cppUngetc (c2); + } + else if (isExternCDecl (st, c)) + { + st->declaration = DECL_NOMANGLE; + st->scope = SCOPE_GLOBAL; + } +} + +/* Reads characters from the pre-processor and assembles tokens, setting + * the current statement state. + */ +static void nextToken (statementInfo *const st) +{ + tokenInfo *token; + do + { + int c = skipToNonWhite (); + switch (c) + { + case EOF: longjmp (Exception, (int) ExceptionEOF); break; + case '(': analyzeParens (st); break; + case '<': processAngleBracket (); break; + case '*': st->haveQualifyingName = FALSE; break; + case ',': setToken (st, TOKEN_COMMA); break; + case ':': processColon (st); break; + case ';': setToken (st, TOKEN_SEMICOLON); break; + case '=': processInitializer (st); break; + case '[': skipToMatch ("[]"); break; + case '{': setToken (st, TOKEN_BRACE_OPEN); break; + case '}': setToken (st, TOKEN_BRACE_CLOSE); break; + default: parseGeneralToken (st, c); break; + } + token = activeToken (st); + } while (isType (token, TOKEN_NONE)); +} + +/* +* Scanning support functions +*/ + +static statementInfo *CurrentStatement = NULL; + +static statementInfo *newStatement (statementInfo *const parent) +{ + statementInfo *const st = xMalloc (1, statementInfo); + unsigned int i; + + for (i = 0 ; i < (unsigned int) NumTokens ; ++i) + st->token [i] = newToken (); + + st->context = newToken (); + st->blockName = newToken (); + st->parentClasses = vStringNew (); + + initStatement (st, parent); + CurrentStatement = st; + + return st; +} + +static void deleteStatement (void) +{ + statementInfo *const st = CurrentStatement; + statementInfo *const parent = st->parent; + unsigned int i; + + for (i = 0 ; i < (unsigned int) NumTokens ; ++i) + { + deleteToken (st->token [i]); st->token [i] = NULL; + } + deleteToken (st->blockName); st->blockName = NULL; + deleteToken (st->context); st->context = NULL; + vStringDelete (st->parentClasses); st->parentClasses = NULL; + eFree (st); + CurrentStatement = parent; +} + +static void deleteAllStatements (void) +{ + while (CurrentStatement != NULL) + deleteStatement (); +} + +static boolean isStatementEnd (const statementInfo *const st) +{ + const tokenInfo *const token = activeToken (st); + boolean isEnd; + + if (isType (token, TOKEN_SEMICOLON)) + isEnd = TRUE; + else if (isType (token, TOKEN_BRACE_CLOSE)) + /* Java and C# do not require semicolons to end a block. Neither do C++ + * namespaces. All other blocks require a semicolon to terminate them. + */ + isEnd = (boolean) (isLanguage (Lang_java) || isLanguage (Lang_csharp) || + ! isContextualStatement (st)); + else + isEnd = FALSE; + + return isEnd; +} + +static void checkStatementEnd (statementInfo *const st) +{ + const tokenInfo *const token = activeToken (st); + + if (isType (token, TOKEN_COMMA)) + reinitStatement (st, TRUE); + else if (isStatementEnd (st)) + { + DebugStatement ( if (debug (DEBUG_PARSE)) printf (""); ) + reinitStatement (st, FALSE); + cppEndStatement (); + } + else + { + cppBeginStatement (); + advanceToken (st); + } +} + +static void nest (statementInfo *const st, const unsigned int nestLevel) +{ + switch (st->declaration) + { + case DECL_CLASS: + case DECL_ENUM: + case DECL_INTERFACE: + case DECL_NAMESPACE: + case DECL_NOMANGLE: + case DECL_STRUCT: + case DECL_UNION: + createTags (nestLevel, st); + break; + + case DECL_FUNCTION: + case DECL_TASK: + st->inFunction = TRUE; + /* fall through */ + default: + if (includeTag (TAG_LOCAL, FALSE)) + createTags (nestLevel, st); + else + skipToMatch ("{}"); + break; + } + advanceToken (st); + setToken (st, TOKEN_BRACE_CLOSE); +} + +static void tagCheck (statementInfo *const st) +{ + const tokenInfo *const token = activeToken (st); + const tokenInfo *const prev = prevToken (st, 1); + const tokenInfo *const prev2 = prevToken (st, 2); + + switch (token->type) + { + case TOKEN_NAME: + if (insideEnumBody (st)) + qualifyEnumeratorTag (st, token); + break; +#if 0 + case TOKEN_PACKAGE: + if (st->haveQualifyingName) + makeTag (token, st, FALSE, TAG_PACKAGE); + break; +#endif + case TOKEN_BRACE_OPEN: + if (isType (prev, TOKEN_ARGS)) + { + if (st->haveQualifyingName) + { + if (! isLanguage (Lang_vera)) + st->declaration = DECL_FUNCTION; + if (isType (prev2, TOKEN_NAME)) + copyToken (st->blockName, prev2); + qualifyFunctionTag (st, prev2); + } + } + else if (isContextualStatement (st) || + st->declaration == DECL_NAMESPACE || + st->declaration == DECL_PROGRAM) + { + if (isType (prev, TOKEN_NAME)) + copyToken (st->blockName, prev); + else + { + /* For an anonymous struct or union we use a unique ID + * a number, so that the members can be found. + */ + char buf [20]; /* length of "_anon" + digits + null */ + sprintf (buf, "__anon%d", ++AnonymousID); + vStringCopyS (st->blockName->name, buf); + st->blockName->type = TOKEN_NAME; + st->blockName->keyword = KEYWORD_NONE; + } + qualifyBlockTag (st, prev); + } + else if (isLanguage (Lang_csharp)) + makeTag (prev, st, FALSE, TAG_PROPERTY); + break; + + case TOKEN_SEMICOLON: + case TOKEN_COMMA: + if (insideEnumBody (st)) + ; + else if (isType (prev, TOKEN_NAME)) + { + if (isContextualKeyword (prev2)) + st->scope = SCOPE_EXTERN; + else + qualifyVariableTag (st, prev); + } + else if (isType (prev, TOKEN_ARGS) && isType (prev2, TOKEN_NAME)) + { + if (st->isPointer) + qualifyVariableTag (st, prev2); + else + qualifyFunctionDeclTag (st, prev2); + } + break; + + default: break; + } +} + +/* Parses the current file and decides whether to write out and tags that + * are discovered. + */ +static void createTags (const unsigned int nestLevel, + statementInfo *const parent) +{ + statementInfo *const st = newStatement (parent); + + DebugStatement ( if (nestLevel > 0) debugParseNest (TRUE, nestLevel); ) + while (TRUE) + { + tokenInfo *token; + + nextToken (st); + token = activeToken (st); + if (isType (token, TOKEN_BRACE_CLOSE)) + { + if (nestLevel > 0) + break; + else + { + verbose ("%s: unexpected closing brace at line %lu\n", + getInputFileName (), getInputLineNumber ()); + longjmp (Exception, (int) ExceptionBraceFormattingError); + } + } + else if (isType (token, TOKEN_DOUBLE_COLON)) + { + addContext (st, prevToken (st, 1)); + advanceToken (st); + } + else + { + tagCheck (st); + if (isType (token, TOKEN_BRACE_OPEN)) + nest (st, nestLevel + 1); + checkStatementEnd (st); + } + } + deleteStatement (); + DebugStatement ( if (nestLevel > 0) debugParseNest (FALSE, nestLevel - 1); ) +} + +static boolean findCTags (const unsigned int passCount) +{ + exception_t exception; + boolean retry; + + Assert (passCount < 3); + cppInit ((boolean) (passCount > 1)); + Signature = vStringNew (); + + exception = (exception_t) setjmp (Exception); + retry = FALSE; + if (exception == ExceptionNone) + createTags (0, NULL); + else + { + deleteAllStatements (); + if (exception == ExceptionBraceFormattingError && passCount == 1) + { + retry = TRUE; + verbose ("%s: retrying file with fallback brace matching algorithm\n", + getInputFileName ()); + } + } + vStringDelete (Signature); + cppTerminate (); + return retry; +} + +static void buildKeywordHash (const langType language, unsigned int idx) +{ + const size_t count = sizeof (KeywordTable) / sizeof (KeywordTable [0]); + size_t i; + for (i = 0 ; i < count ; ++i) + { + const keywordDesc* const p = &KeywordTable [i]; + if (p->isValid [idx]) + addKeyword (p->name, language, (int) p->id); + } +} + +static void initializeCParser (const langType language) +{ + Lang_c = language; + buildKeywordHash (language, 0); +} + +static void initializeCppParser (const langType language) +{ + Lang_cpp = language; + buildKeywordHash (language, 1); +} + +static void initializeCsharpParser (const langType language) +{ + Lang_csharp = language; + buildKeywordHash (language, 2); +} + +static void initializeJavaParser (const langType language) +{ + Lang_java = language; + buildKeywordHash (language, 3); +} + +static void initializeVeraParser (const langType language) +{ + Lang_vera = language; + buildKeywordHash (language, 4); +} + +extern parserDefinition* CParser (void) +{ + static const char *const extensions [] = { "c", NULL }; + parserDefinition* def = parserNew ("C"); + def->kinds = CKinds; + def->kindCount = KIND_COUNT (CKinds); + def->extensions = extensions; + def->parser2 = findCTags; + def->initialize = initializeCParser; + return def; +} + +extern parserDefinition* CppParser (void) +{ + static const char *const extensions [] = { + "c++", "cc", "cp", "cpp", "cxx", "h", "h++", "hh", "hp", "hpp", "hxx", +#ifndef CASE_INSENSITIVE_FILENAMES + "C", "H", +#endif + NULL + }; + parserDefinition* def = parserNew ("C++"); + def->kinds = CKinds; + def->kindCount = KIND_COUNT (CKinds); + def->extensions = extensions; + def->parser2 = findCTags; + def->initialize = initializeCppParser; + return def; +} + +extern parserDefinition* CsharpParser (void) +{ + static const char *const extensions [] = { "cs", NULL }; + parserDefinition* def = parserNew ("C#"); + def->kinds = CsharpKinds; + def->kindCount = KIND_COUNT (CsharpKinds); + def->extensions = extensions; + def->parser2 = findCTags; + def->initialize = initializeCsharpParser; + return def; +} + +extern parserDefinition* JavaParser (void) +{ + static const char *const extensions [] = { "java", NULL }; + parserDefinition* def = parserNew ("Java"); + def->kinds = JavaKinds; + def->kindCount = KIND_COUNT (JavaKinds); + def->extensions = extensions; + def->parser2 = findCTags; + def->initialize = initializeJavaParser; + return def; +} + +extern parserDefinition* VeraParser (void) +{ + static const char *const extensions [] = { "vr", "vri", "vrh", NULL }; + parserDefinition* def = parserNew ("Vera"); + def->kinds = VeraKinds; + def->kindCount = KIND_COUNT (VeraKinds); + def->extensions = extensions; + def->parser2 = findCTags; + def->initialize = initializeVeraParser; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4 noexpandtab: */ diff --git a/sdk/ctags/cobol.c b/sdk/ctags/cobol.c new file mode 100644 index 0000000000..8e443f041e --- /dev/null +++ b/sdk/ctags/cobol.c @@ -0,0 +1,50 @@ +/* +* $Id: cobol.c,v 1.6 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for COBOL language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ +#include "parse.h" + +/* +* FUNCTION DEFINITIONS +*/ + +static void installCobolRegex (const langType language) +{ + addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)[ \t]+(BLANK|OCCURS|IS|JUST|PIC|REDEFINES|RENAMES|SIGN|SYNC|USAGE|VALUE)", + "\\1", "d,data,data items", "i"); + addTagRegex (language, "^[ \t]*[FSR]D[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", + "\\1", "f,file,file descriptions (FD, SD, RD)", "i"); + addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", + "\\1", "g,group,group items", "i"); + addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)\\.", + "\\1", "p,paragraph,paragraphs", "i"); + addTagRegex (language, "^[ \t]*PROGRAM-ID\\.[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", + "\\1", "P,program,program ids", "i"); + addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)[ \t]+SECTION\\.", + "\\1", "s,section,sections", "i"); +} + +extern parserDefinition* CobolParser () +{ + static const char *const extensions [] = { + "cbl", "cob", "CBL", "COB", NULL }; + parserDefinition* def = parserNew ("Cobol"); + def->extensions = extensions; + def->initialize = installCobolRegex; + def->regex = TRUE; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/config.h.in b/sdk/ctags/config.h.in new file mode 100644 index 0000000000..6ea3275c82 --- /dev/null +++ b/sdk/ctags/config.h.in @@ -0,0 +1,274 @@ +/* config.h.in. Generated from configure.in by autoheader. */ +/* +* $Id: acconfig.h,v 1.4 2003/04/01 05:02:21 darren Exp $ +* +* Copyright (c) 1998-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains input source for generating config.h.in +*/ + +/* Package name. + */ +#undef PACKAGE + +/* Package version. + */ +#undef VERSION + +/* Define to the appropriate type if does not define this. + */ +#undef clock_t + +/* Define to long if does not define this. + */ +#undef fpos_t + +/* Define to the appropriate size for tmpnam() if does not define + * this. + */ +#undef L_tmpnam + +/* Define this macro if the field "st_ino" exists in struct stat in + * . + * */ +#undef HAVE_STAT_ST_INO + +/* Define remove to unlink if you have unlink(), but not remove(). + */ +#undef remove + +/* Define this value used by fseek() appropriately if + * (or on SunOS 4.1.x) does not define them. + */ +#undef SEEK_SET + +/* Define as the maximum integer on your system if not defined . + */ +#undef INT_MAX + +/* You can define this label to be a string containing the name of a + * site-specific configuration file containing site-wide default options. The + * files /etc/ctags.conf and /usr/local/etc/ctags.conf are already checked, + * so only define one here if you need a file somewhere else. + */ +#undef CUSTOM_CONFIGURATION_FILE + +/* Define this label if you want macro tags (defined lables) to use patterns + * in the EX command by default (original ctags behavior is to use line + * numbers). + */ +#undef MACROS_USE_PATTERNS + +/* Define this as desired. + * 1: Original ctags format + * 2: Extended ctags format with extension flags in EX-style comment. + */ +#define DEFAULT_FILE_FORMAT 2 + +/* Define this label if your system supports starting scripts with a line of + * the form "#! /bin/sh" to select the interpreter to use for the script. + */ +#undef SYS_INTERPRETER + +/* Define this label if your system uses case-insensitive file names + */ +#undef CASE_INSENSITIVE_FILENAMES + +/* Define this label to use the system sort utility (which is probably more + * efficient) over the internal sorting algorithm. + */ +#ifndef INTERNAL_SORT +# undef EXTERNAL_SORT +#endif + +/* If you wish to change the directory in which temporary files are stored, + * define this label to the directory desired. + */ +#undef TMPDIR + +/* Define this label if regcomp() is broken. + */ +#undef REGCOMP_BROKEN + +/* Define this label if you wish to check the regcomp() function at run time + * for correct behavior. This function is currently broken on Cygwin. + */ +#undef CHECK_REGCOMP + +/* This corrects the problem of missing prototypes for certain functions + * in some GNU installations (e.g. SunOS 4.1.x). + */ +#undef __USE_FIXED_PROTOTYPES__ + +/* Define this is you have a prototype for putenv() in , but + * doesn't declare its argument as "const char *". + */ +#undef NON_CONST_PUTENV_PROTOTYPE + +/* If you receive error or warning messages indicating that you are missing + * a prototype for, or a type mismatch using, one of the following functions, + * define the appropriate label and remake. + */ +#undef NEED_PROTO_REMOVE +#undef NEED_PROTO_UNLINK +#undef NEED_PROTO_MALLOC +#undef NEED_PROTO_GETENV +#undef NEED_PROTO_FGETPOS +#undef NEED_PROTO_STAT +#undef NEED_PROTO_LSTAT +#undef NEED_PROTO_TRUNCATE +#undef NEED_PROTO_FTRUNCATE + +/*---------------------------------------------------------------------------- +- Lines below this are automatically generated by autoheader +----------------------------------------------------------------------------*/ + +/* Define to 1 if you have the `chmod' function. */ +#undef HAVE_CHMOD + +/* Define to 1 if you have the `chsize' function. */ +#undef HAVE_CHSIZE + +/* Define to 1 if you have the `clock' function. */ +#undef HAVE_CLOCK + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fgetpos' function. */ +#undef HAVE_FGETPOS + +/* Define to 1 if you have the `findfirst' function. */ +#undef HAVE_FINDFIRST + +/* Define to 1 if you have the `fnmatch' function. */ +#undef HAVE_FNMATCH + +/* Define to 1 if you have the header file. */ +#undef HAVE_FNMATCH_H + +/* Define to 1 if you have the `ftruncate' function. */ +#undef HAVE_FTRUNCATE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have the `opendir' function. */ +#undef HAVE_OPENDIR + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the `regcomp' function. */ +#undef HAVE_REGCOMP + +/* Define to 1 if you have the `remove' function. */ +#undef HAVE_REMOVE + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the header file. */ +#undef HAVE_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the `stricmp' function. */ +#undef HAVE_STRICMP + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define to 1 if you have the `strnicmp' function. */ +#undef HAVE_STRNICMP + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the `tempnam' function. */ +#undef HAVE_TEMPNAM + +/* Define to 1 if you have the `times' function. */ +#undef HAVE_TIMES + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the `truncate' function. */ +#undef HAVE_TRUNCATE + +/* Define to 1 if you have the header file. */ +#undef HAVE_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `_findfirst' function. */ +#undef HAVE__FINDFIRST + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to `unsigned' if does not define. */ +#undef size_t diff --git a/sdk/ctags/configure b/sdk/ctags/configure new file mode 100644 index 0000000000..88e560ba5b --- /dev/null +++ b/sdk/ctags/configure @@ -0,0 +1,7413 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="ctags.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS install_targets CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S STRIP sort_found CPP EGREP LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-etags enable the installation of links for etags + --disable-extended-format + disable extension flags; use original ctags file + format only + --disable-external-sort use internal sort algorithm instead of sort program + --enable-custom-config=FILE + enable custom config file for site-wide defaults + --enable-macro-patterns use patterns as default method to locate macros + instead of line numbers + --enable-maintainer-mode + use maintainer makefile + --enable-shell-globbing=DIR + does shell expand wildcards (yes|no)? yes + --enable-tmpdir=DIR default directory for temporary files ARG=/tmp + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-posix-regex use Posix regex interface, if available + --with-readlib include readtags library object during install + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h" + + +echo 'Exuberant Ctags, version 5.6' +uname -mrsv 2>/dev/null + + + + + +# Check whether --with-posix-regex or --without-posix-regex was given. +if test "${with_posix_regex+set}" = set; then + withval="$with_posix_regex" + +fi; + + +# Check whether --with-readlib or --without-readlib was given. +if test "${with_readlib+set}" = set; then + withval="$with_readlib" + +fi; + + +# Check whether --enable-etags or --disable-etags was given. +if test "${enable_etags+set}" = set; then + enableval="$enable_etags" + +fi; + +# Check whether --enable-extended-format or --disable-extended-format was given. +if test "${enable_extended_format+set}" = set; then + enableval="$enable_extended_format" + cat >>confdefs.h <<\_ACEOF +#define DEFAULT_FILE_FORMAT 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define DEFAULT_FILE_FORMAT 2 +_ACEOF + +fi; + +# Check whether --enable-external-sort or --disable-external-sort was given. +if test "${enable_external_sort+set}" = set; then + enableval="$enable_external_sort" + +fi; + +# Check whether --enable-custom-config or --disable-custom-config was given. +if test "${enable_custom_config+set}" = set; then + enableval="$enable_custom_config" + +fi; + +# Check whether --enable-macro-patterns or --disable-macro-patterns was given. +if test "${enable_macro_patterns+set}" = set; then + enableval="$enable_macro_patterns" + +fi; + +# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + +fi; + +# Check whether --enable-shell-globbing or --disable-shell-globbing was given. +if test "${enable_shell_globbing+set}" = set; then + enableval="$enable_shell_globbing" + +fi; + +# Check whether --enable-tmpdir or --disable-tmpdir was given. +if test "${enable_tmpdir+set}" = set; then + enableval="$enable_tmpdir" + tmpdir_specified=yes +fi; + + + +if test "$enable_maintainer_mode" = yes ; then + echo "$as_me:$LINENO: result: enabling maintainer mode" >&5 +echo "${ECHO_T}enabling maintainer mode" >&6 +fi + +install_targets="install-ctags" +echo "$as_me:$LINENO: checking whether to install link to etags" >&5 +echo $ECHO_N "checking whether to install link to etags... $ECHO_C" >&6 +if test yes = "$enable_etags"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + install_targets="$install_targets install-etags" +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +echo "$as_me:$LINENO: checking whether to install readtags object file" >&5 +echo $ECHO_N "checking whether to install readtags object file... $ECHO_C" >&6 +if test yes = "$with_readlib"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + install_targets="$install_targets install-lib" +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test "$enable_custom_config" = no -o "$enable_custom_config" = yes ; then + echo "$as_me:$LINENO: result: no name supplied for custom configuration file" >&5 +echo "${ECHO_T}no name supplied for custom configuration file" >&6 +elif test -n "$enable_custom_config" ; then + cat >>confdefs.h <<_ACEOF +#define CUSTOM_CONFIGURATION_FILE "$enable_custom_config" +_ACEOF + + echo "$as_me:$LINENO: result: $enable_custom_config will be used as custom configuration file" >&5 +echo "${ECHO_T}$enable_custom_config will be used as custom configuration file" >&6 +fi + +if test "$enable_macro_patterns" = yes ; then + cat >>confdefs.h <<\_ACEOF +#define MACROS_USE_PATTERNS 1 +_ACEOF + + echo "$as_me:$LINENO: result: tag file will use patterns for macros by default" >&5 +echo "${ECHO_T}tag file will use patterns for macros by default" >&6 +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +case `uname` in + HP-UX) + echo "$as_me:$LINENO: checking \"HP-UX native compiler\"" >&5 +echo $ECHO_N "checking \"HP-UX native compiler\"... $ECHO_C" >&6 + if test "$CC" = "cc"; then + echo "$as_me:$LINENO: result: yes; adding compiler options for ANSI support" >&5 +echo "${ECHO_T}yes; adding compiler options for ANSI support" >&6 + CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + ;; + SunOS) + if uname -r | grep '5\.' >/dev/null 2>&1; then + echo "$as_me:$LINENO: checking \"Solaris native compiler\"" >&5 +echo $ECHO_N "checking \"Solaris native compiler\"... $ECHO_C" >&6 + if test "$CC" = "cc" -a "`which cc`" = "/usr/ucb/cc"; then + echo "$as_me:$LINENO: result: yes; adding compiler option for ANSI support" >&5 +echo "${ECHO_T}yes; adding compiler option for ANSI support" >&6 + CC="$CC -Xa" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi + ;; +esac + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +# Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + +echo "$as_me:$LINENO: checking directory to use for temporary files" >&5 +echo $ECHO_N "checking directory to use for temporary files... $ECHO_C" >&6 +if test -n "$enable_tmpdir"; then + tmpdir="$enable_tmpdir" +elif test -n "$TMPDIR"; then + tmpdir="$TMPDIR" +elif test -n "$TMPDIR"; then + tmpdir="$TMPDIR" +elif test -n "$TMP"; then + tmpdir="$TMP" +elif test -n "$TEMP"; then + tmpdir="$TEMP" +elif test -d "c:/"; then + tmpdir="c:/" +else + tmpdir="/tmp" +fi +if test -d $tmpdir ; then + echo "$as_me:$LINENO: result: $tmpdir" >&5 +echo "${ECHO_T}$tmpdir" >&6 + cat >>confdefs.h <<_ACEOF +#define TMPDIR "$tmpdir" +_ACEOF + +else + { { echo "$as_me:$LINENO: error: $tmpdir does not exist" >&5 +echo "$as_me: error: $tmpdir does not exist" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 +echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6 +if test "${ac_cv_sys_interpreter+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo '#! /bin/cat +exit 69 +' >conftest +chmod u+x conftest +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) +if test $? -ne 69; then + ac_cv_sys_interpreter=yes +else + ac_cv_sys_interpreter=no +fi +rm -f conftest +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 +echo "${ECHO_T}$ac_cv_sys_interpreter" >&6 +interpval=$ac_cv_sys_interpreter + +if test yes = "$interpval"; then + cat >>confdefs.h <<\_ACEOF +#define SYS_INTERPRETER 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking \"for case-insensitive filenames\"" >&5 +echo $ECHO_N "checking \"for case-insensitive filenames\"... $ECHO_C" >&6 +touch conftest.cif +if test -f CONFTEST.CIF; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define CASE_INSENSITIVE_FILENAMES 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.cif + +echo "$as_me:$LINENO: checking selected sort method" >&5 +echo $ECHO_N "checking selected sort method... $ECHO_C" >&6 +if test no = "$enable_external_sort"; then + echo "$as_me:$LINENO: result: simple internal algorithm" >&5 +echo "${ECHO_T}simple internal algorithm" >&6 +else + echo "$as_me:$LINENO: result: external sort utility" >&5 +echo "${ECHO_T}external sort utility" >&6 + enable_external_sort=no + # Extract the first word of "sort", so it can be a program name with args. +set dummy sort; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_sort_found+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$sort_found"; then + ac_cv_prog_sort_found="$sort_found" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_sort_found="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_sort_found" && ac_cv_prog_sort_found="no" +fi +fi +sort_found=$ac_cv_prog_sort_found +if test -n "$sort_found"; then + echo "$as_me:$LINENO: result: $sort_found" >&5 +echo "${ECHO_T}$sort_found" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "$sort_found" = yes ; then + echo "$as_me:$LINENO: checking if sort accepts our command line" >&5 +echo $ECHO_N "checking if sort accepts our command line... $ECHO_C" >&6 + touch ${tmpdir}/sort.test + sort -u -f -o ${tmpdir}/sort.test ${tmpdir}/sort.test 1>/dev/null 2>&1 + if test $? -ne 0 ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define EXTERNAL_SORT 1 +_ACEOF + + enable_external_sort=yes + fi + rm -f ${tmpdir}/sort.test + fi +fi +if test "$enable_external_sort" != yes ; then + echo "$as_me:$LINENO: result: using internal sort algorithm as fallback" >&5 +echo "${ECHO_T}using internal sort algorithm as fallback" >&6 +fi + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + +for ac_header in dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in time.h types.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in sys/dir.h sys/stat.h sys/times.h sys/types.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + echo "$as_me:$LINENO: checking \"if L_tmpnam is defined in stdio.h\"" >&5 +echo $ECHO_N "checking \"if L_tmpnam is defined in stdio.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef L_tmpnam + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define L_tmpnam 20 +_ACEOF + + +fi +rm -f conftest* + + + + echo "$as_me:$LINENO: checking \"if INT_MAX is defined in limits.h\"" >&5 +echo $ECHO_N "checking \"if INT_MAX is defined in limits.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef INT_MAX + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + echo "$as_me:$LINENO: checking \"if MAXINT is defined in limits.h\"" >&5 +echo $ECHO_N "checking \"if MAXINT is defined in limits.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef MAXINT + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF +#define INT_MAX MAXINT +_ACEOF + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define INT_MAX 32767 +_ACEOF + + +fi +rm -f conftest* + + +fi +rm -f conftest* + + + + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking \"for fpos_t\"" >&5 +echo $ECHO_N "checking \"for fpos_t\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "fpos_t" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define fpos_t long +_ACEOF + + +fi +rm -f conftest* + + +echo "$as_me:$LINENO: checking \"for clock_t\"" >&5 +echo $ECHO_N "checking \"for clock_t\"... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "clock_t" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define clock_t long +_ACEOF + + +fi +rm -f conftest* + + + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + + + + +echo "$as_me:$LINENO: checking if struct stat contains st_ino" >&5 +echo $ECHO_N "checking if struct stat contains st_ino... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + + struct stat st; + stat(".", &st); + if (st.st_ino > 0) + exit(0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + have_st_ino=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +have_st_ino=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $have_st_ino" >&5 +echo "${ECHO_T}$have_st_ino" >&6 +if test yes = "$have_st_ino"; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_STAT_ST_INO 1 +_ACEOF + +fi + + + + +for ac_func in fnmatch +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in strstr +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +for ac_func in strcasecmp stricmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + + +for ac_func in strncasecmp strnicmp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + +for ac_func in fgetpos +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_fgetpos=yes +fi +done + + +if test "$have_fgetpos" != yes ; then + + echo "$as_me:$LINENO: checking \"if SEEK_SET is defined in stdio.h\"" >&5 +echo $ECHO_N "checking \"if SEEK_SET is defined in stdio.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef SEEK_SET + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + echo "$as_me:$LINENO: checking \"if SEEK_SET is defined in unistd.h\"" >&5 +echo $ECHO_N "checking \"if SEEK_SET is defined in unistd.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef SEEK_SET + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define SEEK_SET 0 +_ACEOF + + +fi +rm -f conftest* + + +fi +rm -f conftest* + +fi + + +for ac_func in mkstemp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_mkstemp=yes +fi +done + +if test "$have_mkstemp" != yes ; then + +for ac_func in tempnam +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_tempnam=yes +fi +done + +fi +if test "$have_mkstemp" != yes -a "$have_tempnam" != yes; then + +for ac_func in chmod +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + if test "$tmpdir_specified" = yes ; then + echo "$as_me:$LINENO: result: use of tmpnam overrides temporary directory selection" >&5 +echo "${ECHO_T}use of tmpnam overrides temporary directory selection" >&6 + fi +fi + + + + +for ac_func in opendir findfirst _findfirst +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + +for ac_func in strerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +for ac_func in clock times +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + break +fi +done + + +for ac_func in remove +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_remove=yes +else + + echo "$as_me:$LINENO: checking \"if remove is defined in unistd.h\"" >&5 +echo $ECHO_N "checking \"if remove is defined in unistd.h\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef remove + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + cat >>confdefs.h <<\_ACEOF +#define remove unlink +_ACEOF + + +fi +rm -f conftest* + +fi +done + + + +for ac_func in truncate +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_truncate=yes +fi +done + +if test "$have_truncate" != yes ; then + +for ac_func in ftruncate +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_ftruncate=yes +fi +done + + if test "$have_ftruncate" != yes ; then + +for ac_func in chsize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi +fi + + +for ac_func in setenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_setenv=yes +fi +done + +if test "$have_setenv" != yes ; then + +for ac_func in putenv +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + have_putenv=yes +fi +done + + if test "$have_putenv" = yes ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "putenv" >/dev/null 2>&1; then + have_putenv_prototype=yes +fi +rm -f conftest* + + if test "$have_putenv_prototype" = yes ; then + echo "$as_me:$LINENO: checking \"putenv prototype\"" >&5 +echo $ECHO_N "checking \"putenv prototype\"... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-zo-9_]putenv[ ]*\(.*const.*\)[ ]*;" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: correct" >&5 +echo "${ECHO_T}correct" >&6 +else + + echo "$as_me:$LINENO: result: no const" >&5 +echo "${ECHO_T}no const" >&6 + cat >>confdefs.h <<\_ACEOF +#define NON_CONST_PUTENV_PROTOTYPE 1 +_ACEOF + + +fi +rm -f conftest* + + fi + fi +fi + +if test no != "$with_posix_regex"; then + +for ac_func in regcomp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + echo "$as_me:$LINENO: checking if regcomp works" >&5 +echo $ECHO_N "checking if regcomp works... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + cat >>confdefs.h <<\_ACEOF +#define CHECK_REGCOMP 1 +_ACEOF + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +main() { + regex_t patbuf; + exit (regcomp (&patbuf, "/hello/", 0) != 0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + regcomp_works=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +regcomp_works=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + echo "$as_me:$LINENO: result: $regcomp_works" >&5 +echo "${ECHO_T}$regcomp_works" >&6 + if test yes != "$regcomp_works"; then + cat >>confdefs.h <<\_ACEOF +#define REGCOMP_BROKEN 1 +_ACEOF + + fi +fi + + + +{ echo "$as_me:$LINENO: checking \"for missing prototypes\"..." >&5 +echo "$as_me: checking \"for missing prototypes\"..." >&6;} + + + +if test "$have_remove" = yes ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]remove([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_REMOVE 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for remove" >&5 +echo "${ECHO_T}adding prototype for remove" >&6 +fi +rm -f conftest* + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]unlink([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_UNLINK 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for unlink" >&5 +echo "${ECHO_T}adding prototype for unlink" >&6 +fi +rm -f conftest* + +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]malloc([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_MALLOC 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for malloc" >&5 +echo "${ECHO_T}adding prototype for malloc" >&6 +fi +rm -f conftest* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]getenv([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_GETENV 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for getenv" >&5 +echo "${ECHO_T}adding prototype for getenv" >&6 +fi +rm -f conftest* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]stat([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_STAT 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for stat" >&5 +echo "${ECHO_T}adding prototype for stat" >&6 +fi +rm -f conftest* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]lstat([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_LSTAT 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for lstat" >&5 +echo "${ECHO_T}adding prototype for lstat" >&6 +fi +rm -f conftest* + +if test "$have_fgetpos" = yes ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]fgetpos([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_FGETPOS 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for fgetpos" >&5 +echo "${ECHO_T}adding prototype for fgetpos" >&6 +fi +rm -f conftest* + +fi +if test "$have_truncate" = yes ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]truncate([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_TRUNCATE 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for truncate" >&5 +echo "${ECHO_T}adding prototype for truncate" >&6 +fi +rm -f conftest* + +fi +if test "$have_ftruncate" = yes ; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "[^A-Za-z0-9_]ftruncate([ ]+[A-Za-z0-9_]*)?\(" >/dev/null 2>&1; then + : +else + cat >>confdefs.h <<\_ACEOF +#define NEED_PROTO_FTRUNCATE 1 +_ACEOF + echo "$as_me:$LINENO: result: adding prototype for ftruncate" >&5 +echo "${ECHO_T}adding prototype for ftruncate" >&6 +fi +rm -f conftest* + +fi + + + + +rm -f Makefile +if test "$enable_maintainer_mode" = yes ; then + echo "$as_me:$LINENO: result: creating maintainer Makefile" >&5 +echo "${ECHO_T}creating maintainer Makefile" >&6 + ln -s maintainer.mak Makefile + makefile_out= +else + makefile_out=Makefile +fi + ac_config_files="$ac_config_files $makefile_out" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "$makefile_out" ) CONFIG_FILES="$CONFIG_FILES $makefile_out" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@install_targets@,$install_targets,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@LN_S@,$LN_S,;t t +s,@STRIP@,$STRIP,;t t +s,@sort_found@,$sort_found,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + + diff --git a/sdk/ctags/configure.in b/sdk/ctags/configure.in new file mode 100644 index 0000000000..cacf184d33 --- /dev/null +++ b/sdk/ctags/configure.in @@ -0,0 +1,423 @@ +dnl $Id: configure.in,v 1.13 2006/05/30 04:52:27 darren Exp $ + +dnl Copyright (c) 1996-2002, Darren Hiebert +dnl +dnl This source code is released for free distribution under the terms +dnl of the GNU General Public License. + +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(1.12) +AC_INIT(ctags.h) +AC_CONFIG_HEADER(config.h) + +dnl Report system info +dnl ------------------ +echo 'Exuberant Ctags, version 5.6' +uname -mrsv 2>/dev/null + +dnl Define convenience macros +dnl ------------------------- +dnl CHECK_HEADER_DEFINE(LABEL, HEADER [,ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ] ]) +AC_DEFUN(CHECK_HEADER_DEFINE, +[ + AC_MSG_CHECKING("if $1 is defined in $2") + AC_EGREP_CPP(yes, +[#include <$2> +#ifdef $1 + yes +#endif +], [ + AC_MSG_RESULT(yes) + $3 +], [ + AC_MSG_RESULT(no) + $4 +]) ]) + +dnl Checks for configuration options +dnl -------------------------------- + +AC_ARG_WITH(posix-regex, +[ --with-posix-regex use Posix regex interface, if available]) + +AC_ARG_WITH(readlib, +[ --with-readlib include readtags library object during install]) + +dnl AC_ARG_WITH(perl-regex, +dnl [ --with-perl-regex use Perl pcre interface, if available]) + +AC_ARG_ENABLE(etags, +[ --enable-etags enable the installation of links for etags]) + +AC_ARG_ENABLE(extended-format, +[ --disable-extended-format + disable extension flags; use original ctags file + format only], + AC_DEFINE(DEFAULT_FILE_FORMAT, 1), AC_DEFINE(DEFAULT_FILE_FORMAT, 2)) + +AC_ARG_ENABLE(external-sort, +[ --disable-external-sort use internal sort algorithm instead of sort program]) + +AC_ARG_ENABLE(custom-config, +[ --enable-custom-config=FILE + enable custom config file for site-wide defaults]) + +AC_ARG_ENABLE(macro-patterns, +[ --enable-macro-patterns use patterns as default method to locate macros + instead of line numbers]) + +AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode + use maintainer makefile]) + +AC_ARG_ENABLE(shell-globbing, +[ --enable-shell-globbing=DIR + does shell expand wildcards (yes|no)? [yes]]) + +AC_ARG_ENABLE(tmpdir, +[ --enable-tmpdir=DIR default directory for temporary files [ARG=/tmp]], + tmpdir_specified=yes) + + +dnl Process configuration options +dnl ----------------------------- + +if test "$enable_maintainer_mode" = yes ; then + AC_MSG_RESULT(enabling maintainer mode) +fi + +install_targets="install-ctags" +AC_MSG_CHECKING(whether to install link to etags) +if test yes = "$enable_etags"; then + AC_MSG_RESULT(yes) + install_targets="$install_targets install-etags" +else + AC_MSG_RESULT(no) +fi +AC_MSG_CHECKING(whether to install readtags object file) +if test yes = "$with_readlib"; then + AC_MSG_RESULT(yes) + install_targets="$install_targets install-lib" +else + AC_MSG_RESULT(no) +fi +AC_SUBST(install_targets) + +if test "$enable_custom_config" = no -o "$enable_custom_config" = yes ; then + AC_MSG_RESULT(no name supplied for custom configuration file) +elif test -n "$enable_custom_config" ; then + AC_DEFINE_UNQUOTED(CUSTOM_CONFIGURATION_FILE, "$enable_custom_config") + AC_MSG_RESULT($enable_custom_config will be used as custom configuration file) +fi + +if test "$enable_macro_patterns" = yes ; then + AC_DEFINE(MACROS_USE_PATTERNS) + AC_MSG_RESULT(tag file will use patterns for macros by default) +fi + +dnl Checks for programs +dnl ------------------- + +AC_PROG_CC + +case `uname` in + HP-UX) + AC_MSG_CHECKING("HP-UX native compiler") + if test "$CC" = "cc"; then + AC_MSG_RESULT(yes; adding compiler options for ANSI support) + CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE" + else + AC_MSG_RESULT(no) + fi + ;; + SunOS) + if uname -r | grep '5\.' >/dev/null 2>&1; then + AC_MSG_CHECKING("Solaris native compiler") + if test "$CC" = "cc" -a "`which cc`" = "/usr/ucb/cc"; then + AC_MSG_RESULT(yes; adding compiler option for ANSI support) + CC="$CC -Xa" + else + AC_MSG_RESULT(no) + fi + fi + ;; +esac + +AC_PROG_LN_S +AC_CHECK_PROG(STRIP, strip, strip, :) + + +dnl Checks for operating environment +dnl -------------------------------- + +dnl Check for temporary directory +AC_MSG_CHECKING(directory to use for temporary files) +if test -n "$enable_tmpdir"; then + tmpdir="$enable_tmpdir" +elif test -n "$TMPDIR"; then + tmpdir="$TMPDIR" +elif test -n "$TMPDIR"; then + tmpdir="$TMPDIR" +elif test -n "$TMP"; then + tmpdir="$TMP" +elif test -n "$TEMP"; then + tmpdir="$TEMP" +elif test -d "c:/"; then + tmpdir="c:/" +else + tmpdir="/tmp" +fi +if test -d $tmpdir ; then + AC_MSG_RESULT($tmpdir) + AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir") +else + AC_MSG_ERROR($tmpdir does not exist) +fi + +dnl Check whether system supports #! scripts +AC_SYS_INTERPRETER +if test yes = "$interpval"; then + AC_DEFINE(SYS_INTERPRETER) +fi + +dnl Test for case-insensitive filenames +AC_MSG_CHECKING("for case-insensitive filenames") +touch conftest.cif +if test -f CONFTEST.CIF; then + AC_MSG_RESULT(yes) + AC_DEFINE(CASE_INSENSITIVE_FILENAMES) +else + AC_MSG_RESULT(no) +fi +rm -f conftest.cif + +AC_MSG_CHECKING(selected sort method) +if test no = "$enable_external_sort"; then + AC_MSG_RESULT(simple internal algorithm) +else + AC_MSG_RESULT(external sort utility) + enable_external_sort=no + AC_CHECK_PROG(sort_found, sort, yes, no) + if test "$sort_found" = yes ; then + AC_MSG_CHECKING(if sort accepts our command line) + touch ${tmpdir}/sort.test + sort -u -f -o ${tmpdir}/sort.test ${tmpdir}/sort.test 1>/dev/null 2>&1 + if test $? -ne 0 ; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + AC_DEFINE(EXTERNAL_SORT) + enable_external_sort=yes + fi + rm -f ${tmpdir}/sort.test + fi +fi +if test "$enable_external_sort" != yes ; then + AC_MSG_RESULT(using internal sort algorithm as fallback) +fi + + +dnl Checks for header files +dnl ----------------------- + +AC_CHECK_HEADERS(dirent.h fcntl.h fnmatch.h stat.h stdlib.h string.h) +AC_CHECK_HEADERS(time.h types.h unistd.h) +AC_CHECK_HEADERS(sys/dir.h sys/stat.h sys/times.h sys/types.h) + + +dnl Checks for header file macros +dnl ----------------------------- + +CHECK_HEADER_DEFINE(L_tmpnam, stdio.h,, AC_DEFINE(L_tmpnam, 20)) + +CHECK_HEADER_DEFINE(INT_MAX, limits.h,, + CHECK_HEADER_DEFINE(MAXINT, limits.h, + AC_DEFINE(INT_MAX, MAXINT), AC_DEFINE(INT_MAX, 32767))) + + +dnl Checks for typedefs +dnl ------------------- + +AC_TYPE_SIZE_T +AC_TYPE_OFF_T + +AC_MSG_CHECKING("for fpos_t") +AC_EGREP_HEADER(fpos_t, stdio.h, AC_MSG_RESULT(yes), +[ + AC_MSG_RESULT(no) + AC_DEFINE(fpos_t, long) +]) + +AC_MSG_CHECKING("for clock_t") +AC_EGREP_HEADER(clock_t, time.h, AC_MSG_RESULT(yes), +[ + AC_MSG_RESULT(no) + AC_DEFINE(clock_t, long) +]) + + +dnl Checks for compiler characteristics +dnl ----------------------------------- + +dnl AC_CYGWIN +dnl AC_MINGW32 +AC_C_CONST +AC_OBJEXT +AC_EXEEXT + +AC_MSG_CHECKING(if struct stat contains st_ino) +AC_TRY_COMPILE([#include ], [ + struct stat st; + stat(".", &st); + if (st.st_ino > 0) + exit(0); +], have_st_ino=yes, have_st_ino=no) +AC_MSG_RESULT($have_st_ino) +if test yes = "$have_st_ino"; then + AC_DEFINE(HAVE_STAT_ST_INO) +fi + + +dnl Checks for library functions +dnl ---------------------------- + +AC_CHECK_FUNCS(fnmatch) +AC_CHECK_FUNCS(strstr) +AC_CHECK_FUNCS(strcasecmp stricmp, break) +AC_CHECK_FUNCS(strncasecmp strnicmp, break) +AC_CHECK_FUNCS(fgetpos, have_fgetpos=yes) + +dnl SEEK_SET should be in stdio.h, but may be in unistd.h on SunOS 4.1.x +if test "$have_fgetpos" != yes ; then + CHECK_HEADER_DEFINE(SEEK_SET, stdio.h,, + CHECK_HEADER_DEFINE(SEEK_SET, unistd.h,, + AC_DEFINE(SEEK_SET, 0))) +fi + +AC_CHECK_FUNCS(mkstemp, have_mkstemp=yes) +if test "$have_mkstemp" != yes ; then + AC_CHECK_FUNCS(tempnam, have_tempnam=yes) +fi +if test "$have_mkstemp" != yes -a "$have_tempnam" != yes; then + AC_CHECK_FUNCS(chmod) + if test "$tmpdir_specified" = yes ; then + AC_MSG_RESULT(use of tmpnam overrides temporary directory selection) + fi +fi + +AC_CHECK_FUNCS(opendir findfirst _findfirst, break) +AC_CHECK_FUNCS(strerror) +AC_CHECK_FUNCS(clock times, break) +AC_CHECK_FUNCS(remove, have_remove=yes, + CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink))) + +AC_CHECK_FUNCS(truncate, have_truncate=yes) +dnl === Cannot nest AC_CHECK_FUNCS() calls +if test "$have_truncate" != yes ; then + AC_CHECK_FUNCS(ftruncate, have_ftruncate=yes) + if test "$have_ftruncate" != yes ; then + AC_CHECK_FUNCS(chsize) + fi +fi + +AC_CHECK_FUNCS(setenv, have_setenv=yes) +dnl === Cannot nest AC_CHECK_FUNCS() calls +if test "$have_setenv" != yes ; then + AC_CHECK_FUNCS(putenv, have_putenv=yes) + if test "$have_putenv" = yes ; then + AC_EGREP_HEADER(putenv, stdlib.h, have_putenv_prototype=yes) + if test "$have_putenv_prototype" = yes ; then + AC_MSG_CHECKING("putenv prototype") + AC_EGREP_HEADER([[^A-Za-zo-9_]putenv[ ]*\(.*const.*\)[ ]*;], + stdlib.h, AC_MSG_RESULT(correct), + [ + AC_MSG_RESULT(no const) + AC_DEFINE(NON_CONST_PUTENV_PROTOTYPE) + ]) + fi + fi +fi + +dnl +dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi +if test no != "$with_posix_regex"; then + AC_CHECK_FUNCS(regcomp) + AC_MSG_CHECKING(if regcomp works) + AC_TRY_RUN([ +#include +#include +main() { + regex_t patbuf; + exit (regcomp (&patbuf, "/hello/", 0) != 0); +}],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP)) + AC_MSG_RESULT($regcomp_works) + if test yes != "$regcomp_works"; then + AC_DEFINE(REGCOMP_BROKEN) + fi +fi + +dnl if test yes = "$with_perl_regex"; then +dnl AC_MSG_CHECKING(for Perl regex library) +dnl pcre_candidates="$with_perl_regex $HOME/local/lib* /usr*/local/lib* /usr/lib*" +dnl for lib in $pcre_candidates; do +dnl if test -f $lib/libpcreposix.so; then +dnl pcre_lib="-L$lib -lpcreposix" +dnl break +dnl elif test -f $lib/libpcreposix.a; then +dnl pcre_lib="$lib/libpcreposix.a" +dnl break +dnl fi +dnl done +dnl if test -z "$pcre_lib"; then +dnl AC_MSG_RESULT(not found) +dnl else +dnl AC_MSG_RESULT($lib) +dnl AC_DEFINE(HAVE_REGCOMP) +dnl LDFLAGS="$LDFLAGS $pcre_lib" +dnl have_regex=yes +dnl fi +dnl fi + + +dnl Checks for missing prototypes +dnl ----------------------------- +AC_CHECKING("for missing prototypes") + +AC_DEFUN(CHECK_PROTO, [AC_EGREP_HEADER([[^A-Za-z0-9_]$1([ ]+[A-Za-z0-9_]*)?\(], $2,, AC_DEFINE(patsubst([NEED_PROTO_NAME], [NAME], translit($1, [a-z], [A-Z]))) AC_MSG_RESULT(adding prototype for $1))]) + +if test "$have_remove" = yes ; then + CHECK_PROTO(remove, stdio.h) +else + CHECK_PROTO(unlink, unistd.h) +fi +CHECK_PROTO(malloc, stdlib.h) +CHECK_PROTO(getenv, stdlib.h) +CHECK_PROTO(stat, sys/stat.h) +CHECK_PROTO(lstat, sys/stat.h) +if test "$have_fgetpos" = yes ; then + CHECK_PROTO(fgetpos, stdio.h) +fi +if test "$have_truncate" = yes ; then + CHECK_PROTO(truncate, unistd.h) +fi +if test "$have_ftruncate" = yes ; then + CHECK_PROTO(ftruncate, unistd.h) +fi + + +dnl Output files +dnl ------------ + + +rm -f Makefile +if test "$enable_maintainer_mode" = yes ; then + AC_MSG_RESULT(creating maintainer Makefile) + ln -s maintainer.mak Makefile + makefile_out= +else + makefile_out=Makefile +fi +AC_OUTPUT($makefile_out) + +dnl vim:ts=4:sw=4: diff --git a/sdk/ctags/ctags.1 b/sdk/ctags/ctags.1 new file mode 100644 index 0000000000..304585ed46 --- /dev/null +++ b/sdk/ctags/ctags.1 @@ -0,0 +1,1186 @@ +.TH CTAGS 1 "Version 5.6" "Darren Hiebert" "Exuberant Ctags" + + +.SH "NAME" +ctags \- Generate tag files for source code + + +.SH SYNOPSIS +.TP 6 +\fBctags\fP [\fBoptions\fP] [\fIfile(s)\fP] +.TP 6 +\fBetags\fP [\fBoptions\fP] [\fIfile(s)\fP] + + +.SH "DESCRIPTION" +The \fBctags\fP and \fBetags\fP programs (hereinafter collectively referred to +as \fBctags\fP, except where distinguished) generate an index (or "tag") file +for a variety of language objects found in \fIfile(s)\fP. +This tag file allows these items to be quickly and easily located by a text +editor or other utility. A "tag" signifies a language object for which an +index entry is available (or, alternatively, the index entry created for that +object). + +Alternatively, \fBctags\fP can generate a cross reference file which lists, in +human readable form, information about the various source objects found in a +set of language files. + +Tag index files are supported by numerous editors, which allow the user to +locate the object associated with a name appearing in a source file and jump +to the file and line which defines the name. Those known about at the time of +this release are: + +.RS 4 +\fBVi\fP(1) and its derivatives (e.g. Elvis, Vim, Vile, Lemmy), +\fBCRiSP\fP, +\fBEmacs\fP, +\fBFTE\fP (Folding Text Editor), +\fBJED\fP, +\fBjEdit\fP, +\fBMined\fP, +\fBNEdit\fP (Nirvana Edit), +\fBTSE\fP (The SemWare Editor), +\fBUltraEdit\fP, +\fBWorkSpace\fP, +\fBX2\fP, +\fBZeus\fP +.RE + +\fBCtags\fP is capable of generating different kinds of tags for each of many +different languages. For a complete list of supported languages, the names +by which they are recognized, and the kinds of tags which are generated for +each, see the \fB--list-languages\fP and \fB--list-kinds\fP options. + + +.SH "SOURCE FILES" + +Unless the \fB--language-force\fP option is specified, the language of each +source file is automatically selected based upon a mapping of file names to +languages. The mappings in effect for each language may be display using the +\fB--list-maps\fP option and may be changed using the \fB--langmap\fP option. +On platforms which support it, if the name of a file is not mapped +to a language and the file is executable, the first line of the file is +checked to see if the file is a "#!" script for a recognized language. + +By default, all other files names are ignored. This permits running +\fBctags\fP on all files in either a single directory (e.g. "ctags *"), or on +all files in an entire source directory tree (e.g. "ctags -R"), since only +those files whose names are mapped to languages will be scanned. + +[The reason that .h extensions are mapped to C++ files rather than C files +is because it is common to use .h extensions in C++, and no harm results in +treating them as C++ files.] + + +.SH "OPTIONS" + +Despite the wealth of available options, defaults are set so that \fBctags\fP +is most commonly executed without any options (e.g. "ctags *", or "ctags -R"), +which will create a tag file in the current directory for all recognized +source files. The options described below are provided merely to allow custom +tailoring to meet special needs. + +Note that spaces separating the single-letter options from their parameters +are optional. + +Note also that the boolean parameters to the long form options (those +beginning with "--" and that take a "\fI[=yes\fP|\fIno]\fP" parameter) may +be omitted, in which case "\fB=\fP\fIyes\fP" is implied. (e.g. \fB--sort\fP +is equivalent to \fB--sort\fP=\fIyes\fP). Note further that "=\fI1\fP" and +"=\fIon\fP" are considered synonyms for "=\fIyes\fP", and that "=\fI0\fP" +and "=\fIoff\fP" are considered synonyms for "=\fIno\fP". + +Some options are either ignored or useful only when used while running in +etags mode (see \fB-e\fP option). Such options will be noted. + +Most options may appear anywhere on the command line, affecting only those +files which follow the option. A few options, however, must appear before the +first file name and will be noted as such. + +Options taking language names will accept those names in either upper or lower +case. See the \fB--list-languages\fP option for a complete list of the +built-in language names. + +.TP 5 +.B \-a +Equivalent to \fB--append\fP. + +.TP 5 +.B \-B +Use backward searching patterns (e.g. ?pattern?). [Ignored in etags mode] + +.TP 5 +.B \-e +Enable etags mode, which will create a tag file for use with the Emacs editor. +Alternatively, if \fBctags\fP is invoked by a name containing the string +"etags" (either by renaming, or creating a link to, the executable), etags +mode will be enabled. This option must appear before the first file name. + +.TP 5 +.BI \-f " tagfile" +Use the name specified by \fItagfile\fP for the tag file (default is "tags", +or "TAGS" when running in etags mode). If \fItagfile\fP is specified as +"-", then the tag file is written to standard output instead. \fBCtags\fP +will stubbornly refuse to take orders if \fItagfile\fP exists and its first +line contains something other than a valid tags line. This will save your neck +if you mistakenly type "ctags -f *.c", which would otherwise overwrite your +first C file with the tags generated by the rest! It will also refuse to +accept a multi character file name which begins with a '-' (dash) character, +since this most likely means that you left out the tag file name and this +option tried to grab the next option as the file name. If you really want to +name your output tag file "-ugly", specify it as "./-ugly". This option must +appear before the first file name. If this option is specified more than once, +only the last will apply. + +.TP 5 +.B \-F +Use forward searching patterns (e.g. /pattern/) (default). +[Ignored in etags mode] + +.TP 5 +.BI \-h " list" +Specifies a list of file extensions, separated by periods, which are to be +interpreted as include (or header) files. To indicate files having no +extension, use a period not followed by a non-period character (e.g. ".", +"..x", ".x."). This option only affects how the scoping of a particular kinds +of tags is interpreted (i.e. whether or not they are considered as globally +visible or visible only within the file in which they are defined); it does +not map the extension to any particular language. Any tag which is located in +a non-include file and cannot be seen (e.g. linked to) from another file is +considered to have file-limited (e.g. static) scope. No kind of tag appearing +in an include file will be considered to have file-limited scope. If the first +character in the list is a plus sign, then the extensions in the list will be +appended to the current list; otherwise, the list will replace the current +list. See, also, the \fB--file-scope\fP option. The default list is +".h.H.hh.hpp.hxx.h++.inc.def". To restore the default list, specify \fB-h\fP +\fIdefault\fP. Note that if an extension supplied to this option is not +already mapped to a particular language (see \fBSOURCE FILES\fP, above), you +will also need to use either the \fB--langmap\fP or \fB--language-force\fP +option. + +.TP 5 +.BI \-I " identifier-list" +Specifies a list of identifiers which are to be specially handled while +parsing C and C++ source files. This option is specifically provided to handle +special cases arising through the use of preprocessor macros. When the +identifiers listed are simple identifiers, these identifiers will be ignored +during parsing of the source files. If an identifier is suffixed with a '+' +character, \fBctags\fP will also ignore any parenthesis-enclosed argument list +which may immediately follow the identifier in the source files. If two +identifiers are separated with the '=' character, the first identifiers is +replaced by the second identifiers for parsing purposes. The list of +identifiers may be supplied directly on the command line or read in from a +separate file. If the first character of \fIidentifier-list\fP is '@', '.' or +a pathname separator ('/' or '\\'), or the first two characters specify a +drive letter (e.g. "C:"), the parameter \fIidentifier-list\fP will be +interpreted as a filename from which to read a list of identifiers, one per +input line. Otherwise, \fIidentifier-list\fP is a list of identifiers (or +identifier pairs) to be specially handled, each delimited by a either a comma +or by white space (in which case the list should be quoted to keep the entire +list as one command line argument). Multiple \fB-I\fP options may be supplied. +To clear the list of ignore identifiers, supply a single dash ("-") for +\fIidentifier-list\fP. + +This feature is useful when preprocessor macros are used in such a way that +they cause syntactic confusion due to their presence. Indeed, this is the best +way of working around a number of problems caused by the presence of +syntax-busting macros in source files (see \fBCAVEATS\fP, below). Some +examples will illustrate this point. + +.RS 8 +int foo ARGDECL4(void *, ptr, long int, nbytes) +.RE + +.IP +In the above example, the macro "ARGDECL4" would be mistakenly interpreted to +be the name of the function instead of the correct name of "foo". Specifying +\fB-I\fP \fIARGDECL4\fP results in the correct behavior. + +.RS 8 +/* creates an RCS version string in module */ +.br +MODULE_VERSION("$Revision: 1.41 $") +.RE + +.IP +In the above example the macro invocation looks too much like a function +definition because it is not followed by a semicolon (indeed, it could even be +followed by a global variable definition that would look much like a K&R style +function parameter declaration). In fact, this seeming function definition +could possibly even cause the rest of the file to be skipped over while trying +to complete the definition. Specifying \fB-I\fP \fIMODULE_VERSION+\fP would +avoid such a problem. + +.RS 8 +CLASS Example { +.br + // your content here +.br +}; +.RE + +.IP +The example above uses "CLASS" as a preprocessor macro which expands to +something different for each platform. For instance CLASS may be defined as +"class __declspec(dllexport)" on Win32 platforms and simply "class" on UNIX. +Normally, the absence of the C++ keyword "class" would cause the source file +to be incorrectly parsed. Correct behavior can be restored by specifying +\fB-I\fP \fICLASS=class\fP. + +.TP 5 +.BI \-L " file" +Read from \fIfile\fP a list of file names for which tags should be generated. +If \fIfile\fP is specified as "-", then file names are read from standard +input. File names read using this option are processed following file names +appearing on the command line. Options all also accepted in this input. If +this option is specified more than once, only the last will apply. \fBNote:\fP +\fIfile\fP is read in line-oriented mode, where a new line is the only +delimiter and spaces are considered significant, in order that file names +containing spaces may be supplied; this can affect how options are parsed if +included in the input. + +.TP 5 +.B \-n +Equivalent to \fB--excmd\fP=\fInumber\fP. + +.TP 5 +.B \-N +Equivalent to \fB--excmd\fP=\fIpattern\fP. + +.TP 5 +.BI \-o " tagfile" +Equivalent to \fB-f\fP \fItagfile\fP. + +.TP 5 +.B \-R +Equivalent to \fB--recurse\fP. + +.TP 5 +.B \-u +Equivalent to \fB--sort\fP=\fIno\fP (i.e. "unsorted"). + +.TP 5 +.B \-V +Equivalent to \fB--verbose\fP. + +.TP 5 +.B \-w +This option is silently ignored for backward-compatibility with the ctags +of SVR4 Unix. + +.TP 5 +.B \-x +Print a tabular, human-readable cross reference (xref) file to standard output +instead of generating a tag file. The information contained in the output +includes: the tag name; the kind of tag; the line number, file name, and +source line (with extra white space condensed) of the file which defines the +tag. No tag file is written and all options affecting tag file output will be +ignored. Example applications for this feature are generating a listing of all +functions located in a source file (e.g. \fBctags -x --c-kinds\fP=\fIf\fP +\fIfile\fP), or generating a list of all externally visible global variables +located in a source file (e.g. \fBctags -x --c-kinds\fP=\fIv\fP +\fB--file-scope\fP=\fIno file\fP). This option must appear before the first +file name. + +.TP 5 +\fB--append\fP[=\fIyes\fP|\fIno\fP] +Indicates whether tags generated from the specified files should be appended +to those already present in the tag file or should replace them. This option +is off by default. This option must appear before the first file name. + +.TP 5 +\fB--etags-include\fP=\fIfile\fP +Include a reference to \fIfile\fP in the tag file. This option may be +specified as many times as desired. This supports Emacs' capability to use a +tag file which "includes" other tag files. [Available only in etags mode] + +.TP 5 +\fB--exclude\fP=[\fIpattern\fP] +Add \fIpattern\fP to a list of excluded files and directories. This option +may be specified as many times as desired. For each file name considered by +\fBctags\fP, each \fIpattern\fP specified using this option will be compared +against both the complete path (e.g. some/path/base.ext) and the base name +(e.g. base.ext) of the file, thus allowing patterns which match a given file +name irrespective of its path, or match only a specific path. If appropriate +support is available from the runtime library of your C compiler, then +\fIpattern\fP may contain the usual shell wildcards (not regular expressions) +common on Unix (be sure to quote the option parameter to protect the wildcards +from being expanded by the shell before being passed to \fBctags\fP; also be +aware that wildcards can match the slash character, '/'). You can determine if +shell wildcards are available on your platform by examining the output of the +\fB--version\fP option, which will include "+wildcards" in the compiled +feature list; otherwise, \fIpattern\fP is matched against file names using a +simple textual comparison. + +If \fIpattern\fP begins with the character '@', then the rest of the string +is interpreted as a file name from which to read exclusion patterns, one per +line. If \fIpattern\fP is empty, the list of excluded patterns is cleared. +Note that at program startup, the default exclude list contains "EIFGEN", +"SCCS", "RCS", and "CVS", which are names of directories for which it is +generally not desirable to descend while processing the \fB--recurse\fP +option. + +.TP 5 +\fB--excmd\fP=\fItype\fP +Determines the type of EX command used to locate tags in the source file. +[Ignored in etags mode] + +The valid values for \fItype\fP (either the entire word or the first letter is +accepted) are: + +.RS 5 +.TP 9 +.I number +Use only line numbers in the tag file for locating tags. This has four +advantages: +.PD 0 +.RS 9 +.TP 4 +1. +Significantly reduces the size of the resulting tag file. +.TP 4 +2. +Eliminates failures to find tags because the line defining the tag has +changed, causing the pattern match to fail (note that some editors, such as +\fBvim\fP, are able to recover in many such instances). +.TP 4 +3. +Eliminates finding identical matching, but incorrect, source lines (see +\fBBUGS\fP, below). +.TP 4 +4. +Retains separate entries in the tag file for lines which are identical in +content. In \fIpattern\fP mode, duplicate entries are dropped because the +search patterns they generate are identical, making the duplicate entries +useless. +.RE +.PD 1 + +.IP +However, this option has one significant drawback: changes to the source files +can cause the line numbers recorded in the tag file to no longer correspond +to the lines in the source file, causing jumps to some tags to miss the target +definition by one or more lines. Basically, this option is best used when the +source code to which it is applied is not subject to change. Selecting this +option type causes the following options to be ignored: \fB-BF\fP. + +.TP 9 +.I pattern +Use only search patterns for all tags, rather than the line numbers usually +used for macro definitions. This has the advantage of not referencing obsolete +line numbers when lines have been added or removed since the tag file was +generated. + +.TP 9 +.I mixed +In this mode, patterns are generally used with a few exceptions. For C, line +numbers are used for macro definition tags. This was the default format +generated by the original \fBctags\fP and is, therefore, retained as the +default for this option. For Fortran, line numbers are used for common blocks +because their corresponding source lines are generally identical, making +pattern searches useless for finding all matches. +.RE + +.TP 5 +\fB--extra\fP=\fI[+|-]flags\fP +Specifies whether to include extra tag entries for certain kinds of +information. The parameter \fIflags\fP is a set of one-letter flags, each +representing one kind of extra tag entry to include in the tag file. If +\fIflags\fP is preceded by by either the '+' or '-' character, the effect of +each flag is added to, or removed from, those currently enabled; otherwise the +flags replace any current settings. The meaning of each flag is as follows: + +.PP +.RS 8 +.TP 4 +.I f +Include an entry for the base file name of every source file (e.g. +"example.c"), which addresses the first line of the file. +.TP 4 +.I q +Include an extra class-qualified tag entry for each tag which is a member +of a class (for languages for which this information is extracted; currently +C++, Eiffel, and Java). The actual form of the qualified tag depends upon the +language from which the tag was derived (using a form that is most natural for +how qualified calls are specified in the language). For C++, it is in the form +"class::member"; for Eiffel and Java, it is in the form "class.member". This +may allow easier location of a specific tags when multiple occurrences of a +tag name occur in the tag file. Note, however, that this could potentially +more than double the size of the tag file. +.RE + +.TP 5 +\fB--fields\fP=\fI[+|-]flags\fP +Specifies the available extension fields which are to be included in the +entries of the tag file (see \fBTAG FILE FORMAT\fP, below, for more +information). The parameter \fIflags\fP is a set of one-letter flags, each +representing one type of extension field to include, with the following +meanings (disabled by default unless indicated): + +.PP +.PD 0 +.RS 8 +.TP 4 +.I a +Access (or export) of class members +.TP 4 +.I f +File-restricted scoping [enabled] +.TP 4 +.I i +Inheritance information +.TP 4 +.I k +Kind of tag as a single letter [enabled] +.TP 4 +.I K +Kind of tag as full name +.TP 4 +.I l +Language of source file containing tag +.TP 4 +.I m +Implementation information +.TP 4 +.I n +Line number of tag definition +.TP 4 +.I s +Scope of tag definition [enabled] +.TP 4 +.I S +Signature of routine (e.g. prototype or parameter list) +.TP 4 +.I z +Include the "kind:" key in kind field +.TP 4 +.I t +Type and name of a variable or typedef as "typeref:" field [enabled] +.PD 1 +.RE + +.RS 5 +Each letter or group of letters may be preceded by either '+' to add it to the +default set, or '-' to exclude it. In the absence of any preceding '+' or '-' +sign, only those kinds explicitly listed in \fIflags\fP will be included in +the output (i.e. overriding the default set). This option is ignored if the +option \fB--format\fP=\fI1\fP has been specified. The default value +of this options is \fIfks\fP. +.RE + +.TP 5 +\fB--file-scope\fP[=\fIyes\fP|\fIno\fP] +Indicates whether tags scoped only for a single file (i.e. tags which cannot +be seen outside of the file in which they are defined, such as "static" tags) +should be included in the output. See, also, the \fB-h\fP option. This option +is enabled by default. + +.TP 5 +\fB--filter\fP[=\fIyes\fP|\fIno\fP] +Causes \fBctags\fP to behave as a filter, reading source file names from +standard input and printing their tags to standard output on a file-by-file +basis. If \fB--sorted\fP is enabled, tags are sorted only within the source +file in which they are defined. File names are read from standard output in +line-oriented input mode (see note for \fB-L\fP option) and only after file +names listed on the command line or from any file supplied using the \fB-L\fP +option. When this option is enabled, the options \fB-f\fP, \fB-o\fP, +and \fB--totals\fP are ignored. This option is quite esoteric and is disabled +by default. This option must appear before the first file name. + +.TP 5 +\fB--filter-terminator\fP=\fIstring\fP +Specifies a string to print to standard output following the tags for each +file name parsed when the \fB--filter\fP option is enabled. This may permit an +application reading the output of ctags to determine when the output for each +file is finished. Note that if the file name read is a directory and +\fB--recurse\fP is enabled, this string will be printed only one once at the +end of all tags found for by descending the directory. This string will always +be separated from the last tag line for the file by its terminating newline. +This option is quite esoteric and is empty by default. This option must appear +before the first file name. + +.TP 5 +\fB--format\fP=\fIlevel\fP +Change the format of the output tag file. Currently the only valid values for +\fIlevel\fP are \fI1\fP or \fI2\fP. Level 1 specifies the original tag file +format and level 2 specifies a new extended format containing extension fields +(but in a manner which retains backward-compatibility with original +\fBvi\fP(1) implementations). The default level is 2. This option must appear +before the first file name. [Ignored in etags mode] + +.TP 5 +.B \--help +Prints to standard output a detailed usage description, and then exits. + +.TP 5 +\fB--if0\fP[=\fIyes\fP|\fIno\fP] +Indicates a preference as to whether code within an "#if 0" branch of a +preprocessor conditional should be examined for non-macro tags (macro tags are +always included). Because the intent of this construct is to disable code, the +default value of this options is \fIno\fP. Note that this indicates a +preference only and does not guarantee skipping code within an "#if 0" branch, +since the fall-back algorithm used to generate tags when preprocessor +conditionals are too complex follows all branches of a conditional. This +option is disabled by default. + +.TP 5 +\fB---kinds\fP=\fI[+|-]kinds\fP +Specifies a list of language-specific kinds of tags (or kinds) to include in +the output file for a particular language, where \fB\fP is +case-insensitive and is one of the built-in language names (see the +\fB--list-languages\fP option for a complete list). The parameter \fIkinds\fP +is a group of one-letter flags designating kinds of tags (particular to the +language) to either include or exclude from the output. The specific sets of +flags recognized for each language, their meanings and defaults may be list +using the \fB--list-kinds\fP option. Each letter or group of letters may be +preceded by either '+' to add it to, or '-' to remove it from, the default +set. In the absence of any preceding '+' or '-' sign, only those kinds +explicitly listed in \fIkinds\fP will be included in the output (i.e. +overriding the default for the specified language). + +As an example for the C language, in order to add prototypes and external +variable declarations to the default set of tag kinds, but exclude macros, +use \fB--c-kinds\fP=\fI+px-d\fP; to include only tags for functions, use +\fB--c-kinds\fP=\fIf\fP. + +.TP 5 +\fB--langdef\fP=\fIname\fP +Defines a new user-defined language, \fIname\fP, to be parsed with regular +expressions. Once defined, \fIname\fP may be used in other options taking +language names. The typical use of this option is to first define the +language, then map file names to it using \fI--langmap\fP, then specify +regular expressions using \fI--regex-\fP to define how its tags are +found. + +.TP 5 +\fB--langmap\fP=\fImap[,map[...]]\fP +Controls how file names are mapped to languages (see the \fB--list-maps\fP +option). Each comma-separated \fImap\fP consists of the language name (either +a built-in or user-defined language), a colon, and a list of file extensions +and/or file name patterns. A file extension is specified by preceding the +extension with a period (e.g. ".c"). A file name pattern is specified by +enclosing the pattern in parentheses (e.g. "([Mm]akefile)"). If appropriate +support is available from the runtime library of your C compiler, then the +file name pattern may contain the usual shell wildcards common on Unix (be +sure to quote the option parameter to protect the wildcards from being +expanded by the shell before being passed to \fBctags\fP). You can determine +if shell wildcards are available on your platform by examining the output of +the \fB--version\fP option, which will include "+wildcards" in the compiled +feature list; otherwise, the file name patterns are matched against file names +using a simple textual comparison. When mapping a file extension, it will +first be unmapped from any other languages. + +If the first character in a map is a plus sign, then the extensions and file +name patterns in that map will be appended to the current map for that +language; otherwise, the map will replace the current map. For example, to +specify that only files with extensions of .c and .x are to be treated as C +language files, use "\fB--langmap\fP=\fIc:.c.x\fP"; to also add files with +extensions of .j as Java language files, specify +"\fB--langmap\fP=\fIc:.c.x,java:+.j\fP". To map makefiles (.e.g files +named either "Makefile", "makefile", or having the extension ".mak") to a +language called "make", specify "\fB--langmap\fP=\fImake:([Mm]akefile).mak\fP". +To map files having no extension, specify a period not followed by a +non-period character (e.g. ".", "..x", ".x."). To clear the mapping for a +particular language (thus inhibiting automatic generation of tags for that +language), specify an empty extension list (e.g. +"\fB--langmap\fP=\fIfortran:\fP"). To restore the default language mappings +for all a particular language, supply the keyword "default" for the mapping. +To specify restore the default language mappings for all languages, specify +"\fB--langmap\fP=\fIdefault\fP". Note that file extensions are tested before +file name patterns when inferring the language of a file. + +.TP 5 +\fB--language-force\fP=\fIlanguage\fP +By default, \fBctags\fP automatically selects the language of a source file, +ignoring those files whose language cannot be determined (see +\fBSOURCE FILES\fP, above). This option forces the specified \fIlanguage\fP +(case-insensitive; either built-in or user-defined) to be used for every +supplied file instead of automatically selecting the language based upon its +extension. In addition, the special value \fIauto\fP indicates that the +language should be automatically selected (which effectively disables this +option). + +.TP 5 +\fB--languages\fP=\fI[+|-]list\fP +Specifies the languages for which tag generation is enabled, with \fIlist\fP +containing a comma-separated list of language names (case-insensitive; either +built-in or user-defined). If the first language of \fIlist\fP is not preceded +by either a '+' or '-', the current list will be cleared before adding or +removing the languages in \fIlist\fP. Until a '-' is encountered, each +language in the list will be added to the current list. As either the '+' or +'-' is encountered in the list, the languages following it are added or +removed from the current list, respectively. Thus, it becomes simple to +replace the current list with a new one, or to add or remove languages from +the current list. The actual list of files for which tags will be generated +depends upon the language extension mapping in effect (see the \fB--langmap\fP +option). Note that all languages, including user-defined languages are enabled +unless explicitly disabled using this option. Language names included in +\fIlist\fP may be any built-in language or one previously defined with +\fB--langdef\fP. The default is "all", which is also accepted as a valid +argument. See the \fB--list-languages\fP option for a complete list of the +built-in language names. + +.TP 5 +\fB--license\fP +Prints a summary of the software license to standard output, and then exits. + +.TP 5 +\fB--line-directives\fP[=\fIyes\fP|\fIno\fP] +Specifies whether "#line" directives should be recognized. These are present +in the output of preprocessors and contain the line number, and possibly the +file name, of the original source file(s) from which the preprocessor output +file was generated. When enabled, this option will cause \fBctags\fP to +generate tag entries marked with the file names and line numbers of their +locations original source file(s), instead of their actual locations in the +preprocessor output. The actual file names placed into the tag file will have +the same leading path components as the preprocessor output file, since it is +assumed that the original source files are located relative to the +preprocessor output file (unless, of course, the #line directive specifies an +absolute path). This option is off by default. \fBNote:\fP This option is +generally only useful when used together with the \fB--excmd\fP=\fInumber\fP +(\fB-n\fP) option. Also, you may have to use either the \fB--langmap\fP or +\fB--language-force\fP option if the extension of the preprocessor output file +is not known to \fBctags\fP. + +.TP 5 +\fB--links\fP[=\fIyes\fP|\fIno\fP] +Indicates whether symbolic links (if supported) should be followed. When +disabled, symbolic links are ignored. This option is on by default. + +.TP 5 +\fB--list-kinds\fP[=\fIlanguage\fP|\fIall\fP] +Lists the tag kinds recognized for either the specified language or all +languages, and then exits. Each kind of tag recorded in the tag file is +represented by a one-letter flag, which is also used to filter the tags placed +into the output through use of the \fB---kinds\fP option. Note that some +languages and/or tag kinds may be implemented using regular expressions and +may not be available if regex support is not compiled into \fBctags\fP (see +the \fB--regex-\fP option). Each kind listed is enabled unless followed +by "[off]". + +.TP 5 +\fB--list-maps\fP[=\fIlanguage\fP|\fIall\fP] +Lists the file extensions and file name patterns which associate a file name +with a language for either the specified language or all languages, and then +exits. See the \fB--langmap\fP option, and \fBSOURCE FILES\fP, above. + +.TP 5 +\fB--list-languages\fP +Lists the names of the languages understood by \fBctags\fP, and then exits. +These language names are case insensitive and may be used in the +\fB--language-force\fP, \fB--languages\fP, \fB---kinds\fP, and +\fB--regex-\fP options. + +.TP 5 +\fB--options\fP=\fIfile\fP +Read additional options from \fIfile\fP. As a special case, if +\fB--options\fP=\fINONE\fP is specified as the first option on the command +line, it will disable the automatic reading of any configuration options from +either a file or the environment (see \fBFILES\fP). + +.TP 5 +\fB--recurse\fP[=\fIyes\fP|\fIno\fP] +Recurse into directories encountered in the list of supplied files. If the +list of supplied files is empty and no file list is specified with the +\fB-L\fP option, then the current directory (i.e. ".") is assumed. Symbolic +links are followed. If you don't like these behaviors, either explicitly +specify the files or pipe the output of \fBfind\fP(1) into \fBctags -L-\fP +instead. \fBNote:\fP This option is not supported on all platforms at present. +It is available if the output of the \fB--help\fP option includes this option. +See, also, the \fB--exclude\fP to limit recursion. + +.TP 5 +\fB--regex-\fP=\fI/regexp/replacement/[kind-spec/][flags]\fP +The \fI/regexp/replacement/\fP pair define a regular expression replacement +pattern, similar in style to \fBsed\fP substitution commands, with which to +generate tags from source files mapped to the named language, \fB\fP, +(case-insensitive; either a built-in or user-defined language). The regular +expression, \fIregexp\fP, defines an extended regular expression (roughly that +used by \fBegrep\fP(1)), which is used to locate a single source line +containing a tag and may specify tab characters using \\t. When a matching +line is found, a tag will be generated for the name defined by +\fIreplacement\fP, which generally will contain the special back-references +\\1 through \\9 to refer to matching sub-expression groups within +\fIregexp\fP. The '/' separator characters shown in the parameter to the +option can actually be replaced by any character. Note that whichever +separator character is used will have to be escaped with a backslash ('\\') +character wherever it is used in the parameter as something other than a +separator. The regular expression defined by this option is added to the +current list of regular expressions for the specified language unless the +parameter is omitted, in which case the current list is cleared. + +Unless modified by \fIflags\fP, \fIregexp\fP is interpreted as a Posix +extended regular expression. The \fIreplacement\fP should expand for all +matching lines to a non-empty string of characters, or a warning message will +be reported. An optional kind specifier for tags matching \fIregexp\fP may +follow \fIreplacement\fP, which will determine what kind of tag is reported in +the "kind" extension field (see \fBTAG FILE FORMAT\fP, below). The full form +of \fIkind-spec\fP is in the form of a single letter, a comma, a name (without +spaces), a comma, a description, followed by a separator, which specify +the short and long forms of the kind value and its textual description +(displayed using \fB--list-kinds\fP). Either the kind name and/or the +description may be omitted. If \fIkind-spec\fP is omitted, it defaults to +"\fIr,regex\fP". Finally, \fIflags\fP are one or more single-letter characters +having the following effect upon the interpretation of \fIregexp\fP: + +.PP +.RS 8 +.TP 4 +.I b +The pattern is interpreted as a Posix basic regular expression. +.TP 4 +.I e +The pattern is interpreted as a Posix extended regular expression (default). +.TP 4 +.I i +The regular expression is to be applied in a case-insensitive manner. +.RE + +.RS 5 +Note that this option is available only if \fBctags\fP was compiled with +support for regular expressions, which depends upon your platform. You can +determine if support for regular expressions is compiled in by examining the +output of the \fB--version\fP option, which will include "+regex" in the +compiled feature list. + +For more information on the regular expressions used by \fBctags\fP, see +either the \fBregex(5,7)\fP man page, or the GNU info documentation for regex +(e.g. "info regex"). +.RE + +.TP 5 +\fB--sort\fP[=\fIyes\fP|\fIno\fP|\fIfoldcase\fP] +Indicates whether the tag file should be sorted on the tag name (default is +\fIyes\fP). Note that the original \fBvi\fP(1) required sorted tags. +The \fIfoldcase\fP value specifies case insensitive (or case-folded) sorting. +Fast binary searches of tag files sorted with case-folding will require +special support from tools using tag files, such as that found in the ctags +readtags library, or Vim version 6.2 or higher (using "set ignorecase"). This +option must appear before the first file name. [Ignored in etags mode] + +.TP 5 +\fB--tag-relative\fP[=\fIyes\fP|\fIno\fP] +Indicates that the file paths recorded in the tag file should be relative to +the directory containing the tag file, rather than relative to the current +directory, unless the files supplied on the command line are specified with +absolute paths. This option must appear before the first file name. The +default is \fIyes\fP when running in etags mode (see the \fB-e\fP +option), \fIno\fP otherwise. + +.TP 5 +\fB--totals\fP[=\fIyes\fP|\fIno\fP] +Prints statistics about the source files read and the tag file written during +the current invocation of \fBctags\fP. This option is off by default. +This option must appear before the first file name. + +.TP 5 +\fB--verbose\fP[=\fIyes\fP|\fIno\fP] +Enable verbose mode. This prints out information on option processing and a +brief message describing what action is being taken for each file considered +by \fBctags\fP. Normally, \fBctags\fP does not read command line arguments +until after options are read from the configuration files (see \fBFILES\fP, +below) and the \fBCTAGS\fP environment variable. However, if this option is +the first argument on the command line, it will take effect before any options +are read from these sources. The default is \fIno\fP. + +.TP 5 +\fB--version\fP +Prints a version identifier for \fBctags\fP to standard output, and then +exits. This is guaranteed to always contain the string "Exuberant Ctags". + + +.SH "OPERATIONAL DETAILS" + +As \fBctags\fP considers each file name in turn, it tries to determine the +language of the file by applying the following three tests in order: if the +file extension has been mapped to a language, if the file name matches a shell +pattern mapped to a language, and finally if the file is executable and its +first line specifies an interpreter using the Unix-style "#!" specification +(if supported on the platform). If a language was identified, the file is +opened and then the appropriate language parser is called to operate on the +currently open file. The parser parses through the file and adds an entry to +the tag file for each language object it is written to handle. See +\fBTAG FILE FORMAT\fP, below, for details on these entries. + +This implementation of \fBctags\fP imposes no formatting requirements on C +code as do legacy implementations. Older implementations of ctags tended to +rely upon certain formatting assumptions in order to help it resolve coding +dilemmas caused by preprocessor conditionals. + +In general, \fBctags\fP tries to be smart about conditional preprocessor +directives. If a preprocessor conditional is encountered within a statement +which defines a tag, \fBctags\fP follows only the first branch of that +conditional (except in the special case of "#if 0", in which case it follows +only the last branch). The reason for this is that failing to pursue only one +branch can result in ambiguous syntax, as in the following example: + +.RS +#ifdef TWO_ALTERNATIVES +.br +struct { +.br +#else +.br +union { +.br +#endif +.RS 4 +short a; +.br +long b; +.RE +} +.RE + +Both branches cannot be followed, or braces become unbalanced and \fBctags\fP +would be unable to make sense of the syntax. + +If the application of this heuristic fails to properly parse a file, +generally due to complicated and inconsistent pairing within the conditionals, +\fBctags\fP will retry the file using a different heuristic which does not +selectively follow conditional preprocessor branches, but instead falls back +to relying upon a closing brace ("}") in column 1 as indicating the end of a +block once any brace imbalance results from following a #if conditional branch. + +\fBCtags\fP will also try to specially handle arguments lists enclosed in +double sets of parentheses in order to accept the following conditional +construct: + +.RS +extern void foo __ARGS((int one, char two)); +.RE + +Any name immediately preceding the "((" will be automatically ignored and +the previous name will be used. + +C++ operator definitions are specially handled. In order for consistency with +all types of operators (overloaded and conversion), the operator name in the +tag file will always be preceded by the string "operator " (i.e. even if the +actual operator definition was written as "operator<<"). + +After creating or appending to the tag file, it is sorted by the tag name, +removing identical tag lines. + + +.SH "TAG FILE FORMAT" + +When not running in etags mode, each entry in the tag file consists of a +separate line, each looking like this in the most general case: + +.RS 1 +tag_namefile_nameex_cmd;"extension_fields +.RE + +The fields and separators of these lines are specified as follows: + +.PD 0 +.RS 4 +.TP 4 +1. +tag name +.TP 4 +2. +single tab character +.TP 4 +3. +name of the file in which the object associated with the tag is located +.TP 4 +4. +single tab character +.TP 4 +5. +EX command used to locate the tag within the file; generally a search pattern +(either /pattern/ or ?pattern?) or line number (see \fB--excmd\fP). Tag file +format 2 (see \fB--format\fP) extends this EX command under certain +circumstances to include a set of extension fields (described below) embedded +in an EX comment immediately appended to the EX command, which leaves it +backward-compatible with original \fBvi\fP(1) implementations. +.RE +.PD 1 + +A few special tags are written into the tag file for internal purposes. These +tags are composed in such a way that they always sort to the top of the file. +Therefore, the first two characters of these tags are used a magic number to +detect a tag file for purposes of determining whether a valid tag file is +being overwritten rather than a source file. + +Note that the name of each source file will be recorded in the tag file +exactly as it appears on the command line. Therefore, if the path you +specified on the command line was relative to the current directory, then it +will be recorded in that same manner in the tag file. See, however, the +\fB--tag-relative\fP option for how this behavior can be modified. + +Extension fields are tab-separated key-value pairs appended to the end of the +EX command as a comment, as described above. These key value pairs appear in +the general form "\fIkey\fP:\fIvalue\fP". Their presence in the lines of the +tag file are controlled by the \fB--fields\fP option. The possible keys and +the meaning of their values are as follows: + +.TP 12 +.I access +Indicates the visibility of this class member, where \fIvalue\fP is specific +to the language. + +.TP 12 +.I file +Indicates that the tag has file-limited visibility. This key has no +corresponding value. + +.TP 12 +.I kind +Indicates the type, or kind, of tag. Its value is either one of the +corresponding one-letter flags described under the various +\fB---kinds\fP options above, or a full name. It is permitted (and is, +in fact, the default) for the key portion of this field to be omitted. The +optional behaviors are controlled with the \fB--fields\fP option. + +.TP 12 +.I implementation +When present, this indicates a limited implementation (abstract vs. concrete) +of a routine or class, where \fIvalue\fP is specific to the language +("virtual" or "pure virtual" for C++; "abstract" for Java). + +.TP 12 +.I inherits +When present, \fIvalue\fP. is a comma-separated list of classes from which +this class is derived (i.e. inherits from). + +.TP 12 +.I signature +When present, \fIvalue\fP. is a language-dependent representation of the +signature of a routine. A routine signature in its complete form specifies the +return type of a routine and its formal argument list. This extension field is +presently supported only for C-based languages and does not include the return +type. + +.PP +In addition, information on the scope of the tag definition may be available, +with the key portion equal to some language-dependent construct name and its +value the name declared for that construct in the program. This scope entry +indicates the scope in which the tag was found. For example, a tag generated +for a C structure member would have a scope looking like "struct:myStruct". + + +.SH "HOW TO USE WITH VI" +Vi will, by default, expect a tag file by the name "tags" in the current +directory. Once the tag file is built, the following commands exercise the tag +indexing feature: +.TP 12 +.B vi -t tag +Start vi and position the cursor at the file and line where "tag" is defined. +.TP 12 +.B :ta tag +Find a tag. +.TP 12 +.B Ctrl-] +Find the tag under the cursor. +.TP 12 +.B Ctrl-T +Return to previous location before jump to tag (not widely implemented). + + +.SH "HOW TO USE WITH GNU EMACS" +Emacs will, by default, expect a tag file by the name "TAGS" in the current +directory. Once the tag file is built, the following commands exercise the +tag indexing feature: +.TP 10 +.B "M-x visit-tags-table FILE " +Select the tag file, "FILE", to use. +.TP 10 +.B "M-. [TAG] " +Find the first definition of TAG. The default tag is the identifier under the +cursor. +.TP 10 +.B "M-*" +Pop back to where you previously invoked "M-.". +.TP 10 +.B "C-u M-." +Find the next definition for the last tag. + +.PP +For more commands, see the \fITags\fP topic in the Emacs info document. + + +.SH "HOW TO USE WITH NEDIT" +NEdit version 5.1 and later can handle the new extended tag file format (see +\fB--format\fP). To make NEdit use the tag file, select "File->Load Tags +File". To jump to the definition for a tag, highlight the word, the press +Ctrl-D. NEdit 5.1 can can read multiple tag files from different directories. +Setting the X resource nedit.tagFile to the name of a tag file instructs NEdit +to automatically load that tag file at startup time. + + +.SH "CAVEATS" +Because \fBctags\fP is neither a preprocessor nor a compiler, use of +preprocessor macros can fool \fBctags\fP into either missing tags or +improperly generating inappropriate tags. Although \fBctags\fP has been +designed to handle certain common cases, this is the single biggest cause of +reported problems. In particular, the use of preprocessor constructs which +alter the textual syntax of C can fool \fBctags\fP. You can work around many +such problems by using the \fB-I\fP option. + +White space is treated as a separator for file names and options read from +list files, specified using the \fB-L\fP option, and in filter mode (specified +using the \fB--filter\fP option). Therefore, it is not currently possible to +supply file names or other options containing embedded white space (spaces, +etc.) through these options. + +Note that when \fBctags\fP generates uses patterns for locating tags (see +the \fB--excmd\fP option), it is entirely possible that the wrong line may be +found by your editor if there exists another source line which is identical to +the line containing the tag. The following example demonstrates this condition: + +.RS +int variable; + +/* ... */ +.br +void foo(variable) +.br +int variable; +.br +{ +.RS 4 +/* ... */ +.RE +} +.RE + +Depending upon which editor you use and where in the code you happen to be, it +is possible that the search pattern may locate the local parameter declaration +in foo() before it finds the actual global variable definition, since the +lines (and therefore their search patterns are identical). This can be avoided +by use of the \fB--excmd\fP=\fIn\fP option. + + +.SH "BUGS" +\fBCtags\fP has more options than \fBls\fP(1). + +When parsing a C++ member function definition (e.g. "className::function"), +\fBctags\fP cannot determine whether the scope specifier is a class name or a +namespace specifier and always lists it as a class name in the scope portion +of the extension fields. Also, if a C++ function is defined outside of the +class declaration (the usual case), the access specification (i.e. public, +protected, or private) and implementation information (e.g. virtual, pure +virtual) contained in the function declaration are not known when the tag is +generated for the function definition. It will, however be available for +prototypes (e.g \fB--c++-kinds\fP=\fI+p\fP). + +No qualified tags are generated for language objects inherited into a class. + + +.SH "ENVIRONMENT VARIABLES" + +.TP 8 +.B CTAGS +If this environment variable exists, it will be expected to contain a set of +default options which are read when \fBctags\fP starts, after the +configuration files listed in \fBFILES\fP, below, are read, but before any +command line options are read. Options appearing on the command line will +override options specified in this variable. Only options will be read from +this variable. Note that all white space in this variable in considered a +separator, making it impossible to pass an option parameter containing an +embedded space. If this is a problem, use a configuration file instead. + +.TP 8 +.B ETAGS +Similar to the \fBCTAGS\fP variable above, this variable, if found, will be +read when \fBetags\fP starts. If this variable is not found, \fBetags\fP will +try to use \fBCTAGS\fP instead. + +.TP 8 +.B TMPDIR +On Unix-like hosts where mkstemp() is available, the value of this variable +specifies the directory in which to place temporary files. This can be useful +if the size of a temporary file becomes too large to fit on the partition +holding the default temporary directory defined at compilation time. +\fBctags\fP creates temporary files only if either (1) an emacs-style tag file +is being generated, (2) the tag file is being sent to standard output, or (3) +the program was compiled to use an internal sort algorithm to sort the tag +files instead of the the sort utility of the operating system. If the sort +utility of the operating system is being used, it will generally observe this +variable also. Note that if \fBctags\fP is setuid, the value of TMPDIR will be +ignored. + + +.SH "FILES" +.PD 0 +.I /ctags.cnf (on MSDOS, MSWindows only) +.br +.I /etc/ctags.conf +.br +.I /usr/local/etc/ctags.conf +.br +.I $HOME/.ctags ($HOME/ctags.cnf on MSDOS, MSWindows) +.br +.I .ctags (ctags.cnf on MSDOS, MSWindows) +.IP +If any of these configuration files exist, each will be expected to contain a +set of default options which are read in the order listed when \fBctags\fP +starts, but before the \fBCTAGS\fP environment variable is read or any command +line options are read. This makes it possible to set up site-wide, personal +or project-level defaults. It is possible to compile \fBctags\fP to read an +additional configuration file before any of those shown above, which will be +indicated if the output produced by the \fB--version\fP option lists the +"custom-conf" feature. Options appearing in the \fBCTAGS\fP environment +variable or on the command line will override options specified in these +files. Only options will be read from these files. Note that the option files +are read in line-oriented mode in which spaces are significant (since +shell quoting is not possible). Each line of the file is read as one command +line parameter (as if it were quoted with single quotes). Therefore, use new +lines to indicate separate command-line arguments. +.PD 1 + +.TP +.I tags +The default tag file created by \fBctags\fP. +.TP +.I TAGS +The default tag file created by \fBetags\fP. + +.SH "SEE ALSO" +The official Exuberant Ctags web site at: + +.RS +http://ctags.sourceforge.net +.RE + +Also \fBex\fP(1), \fBvi\fP(1), \fBelvis\fP, or, better yet, \fBvim\fP, the +official editor of \fBctags\fP. For more information on \fBvim\fP, see the VIM +Pages web site at: + +.RS +http://www.vim.org/ +.RE + + +.SH "AUTHOR" +Darren Hiebert +.br +http://DarrenHiebert.com/ + + +.SH "MOTIVATION" +"Think ye at all times of rendering some service to every member of the human +race." + +"All effort and exertion put forth by man from the fullness of his heart is +worship, if it is prompted by the highest motives and the will to do service +to humanity." + +.RS +\-- From the Baha'i Writings +.RE + + +.SH "CREDITS" +This version of \fBctags\fP was originally derived from and inspired by the +ctags program by Steve Kirkendall that comes with the +Elvis vi clone (though virtually none of the original code remains). + +Credit is also due Bram Moolenaar , the author of \fBvim\fP, who +has devoted so much of his time and energy both to developing the editor as a +service to others, and to helping the orphans of Uganda. + +The section entitled "HOW TO USE WITH GNU EMACS" was shamelessly stolen from +the info page for GNU \fBetags\fP. diff --git a/sdk/ctags/ctags.h b/sdk/ctags/ctags.h new file mode 100644 index 0000000000..b14a66e61f --- /dev/null +++ b/sdk/ctags/ctags.h @@ -0,0 +1,27 @@ +/* +* $Id: ctags.h,v 1.4 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Program definitions +*/ +#ifndef _CTAGS_H +#define _CTAGS_H + +/* +* MACROS +*/ +#ifndef PROGRAM_VERSION +# define PROGRAM_VERSION "5.6" +#endif +#define PROGRAM_NAME "Exuberant Ctags" +#define PROGRAM_URL "http://ctags.sourceforge.net" +#define AUTHOR_NAME "Darren Hiebert" +#define AUTHOR_EMAIL "dhiebert@users.sourceforge.net" + +#endif /* _CTAGS_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/ctags.html b/sdk/ctags/ctags.html new file mode 100644 index 0000000000..56211a33e8 --- /dev/null +++ b/sdk/ctags/ctags.html @@ -0,0 +1,1354 @@ +Content-type: text/html + +Manpage of CTAGS + +

    CTAGS

    +Section: Exuberant Ctags (1)
    Updated: Version 5.6
    Index +Return to Main Contents
    + + + +  +

    NAME

    + +ctags - Generate tag files for source code + + +  +

    SYNOPSIS

    + +
    +
    ctags [options] [file(s)]
    +
    etags [options] [file(s)]
    + + +
    +  +

    DESCRIPTION

    + +The ctags and etags programs (hereinafter collectively referred to +as ctags, except where distinguished) generate an index (or "tag") file +for a variety of language objects found in file(s). +This tag file allows these items to be quickly and easily located by a text +editor or other utility. A "tag" signifies a language object for which an +index entry is available (or, alternatively, the index entry created for that +object). + +Alternatively, ctags can generate a cross reference file which lists, in +human readable form, information about the various source objects found in a +set of language files. + +Tag index files are supported by numerous editors, which allow the user to +locate the object associated with a name appearing in a source file and jump +to the file and line which defines the name. Those known about at the time of +this release are: + +
    +Vi(1) and its derivatives (e.g. Elvis, Vim, Vile, Lemmy), +CRiSP, +Emacs, +FTE (Folding Text Editor), +JED, +jEdit, +Mined, +NEdit (Nirvana Edit), +TSE (The SemWare Editor), +UltraEdit, +WorkSpace, +X2, +Zeus +
    + + +Ctags is capable of generating different kinds of tags for each of many +different languages. For a complete list of supported languages, the names +by which they are recognized, and the kinds of tags which are generated for +each, see the --list-languages and --list-kinds options. + + +  +

    SOURCE FILES

    + + +Unless the --language-force option is specified, the language of each +source file is automatically selected based upon a mapping of file names to +languages. The mappings in effect for each language may be display using the +--list-maps option and may be changed using the --langmap option. +On platforms which support it, if the name of a file is not mapped +to a language and the file is executable, the first line of the file is +checked to see if the file is a "#!" script for a recognized language. + +By default, all other files names are ignored. This permits running +ctags on all files in either a single directory (e.g. "ctags *"), or on +all files in an entire source directory tree (e.g. "ctags -R"), since only +those files whose names are mapped to languages will be scanned. + +[The reason that .h extensions are mapped to C++ files rather than C files +is because it is common to use .h extensions in C++, and no harm results in +treating them as C++ files.] + + +  +

    OPTIONS

    + + +Despite the wealth of available options, defaults are set so that ctags +is most commonly executed without any options (e.g. "ctags *", or "ctags -R"), +which will create a tag file in the current directory for all recognized +source files. The options described below are provided merely to allow custom +tailoring to meet special needs. + +Note that spaces separating the single-letter options from their parameters +are optional. + +Note also that the boolean parameters to the long form options (those +beginning with "--" and that take a "[=yes|no]" parameter) may +be omitted, in which case "=yes" is implied. (e.g. --sort +is equivalent to --sort=yes). Note further that "=1" and +"=on" are considered synonyms for "=yes", and that "=0" +and "=off" are considered synonyms for "=no". + +Some options are either ignored or useful only when used while running in +etags mode (see -e option). Such options will be noted. + +Most options may appear anywhere on the command line, affecting only those +files which follow the option. A few options, however, must appear before the +first file name and will be noted as such. + +Options taking language names will accept those names in either upper or lower +case. See the --list-languages option for a complete list of the +built-in language names. + +
    +
    -a + +
    +Equivalent to --append. + +
    -B + +
    +Use backward searching patterns (e.g. ?pattern?). [Ignored in etags mode] + +
    -e + +
    +Enable etags mode, which will create a tag file for use with the Emacs editor. +Alternatively, if ctags is invoked by a name containing the string +"etags" (either by renaming, or creating a link to, the executable), etags +mode will be enabled. This option must appear before the first file name. + +
    -f tagfile + +
    +Use the name specified by tagfile for the tag file (default is "tags", +or "TAGS" when running in etags mode). If tagfile is specified as +"-", then the tag file is written to standard output instead. Ctags +will stubbornly refuse to take orders if tagfile exists and its first +line contains something other than a valid tags line. This will save your neck +if you mistakenly type "ctags -f *.c", which would otherwise overwrite your +first C file with the tags generated by the rest! It will also refuse to +accept a multi character file name which begins with a '-' (dash) character, +since this most likely means that you left out the tag file name and this +option tried to grab the next option as the file name. If you really want to +name your output tag file "-ugly", specify it as "./-ugly". This option must +appear before the first file name. If this option is specified more than once, +only the last will apply. + +
    -F + +
    +Use forward searching patterns (e.g. /pattern/) (default). +[Ignored in etags mode] + +
    -h list + +
    +Specifies a list of file extensions, separated by periods, which are to be +interpreted as include (or header) files. To indicate files having no +extension, use a period not followed by a non-period character (e.g. ".", +"..x", ".x."). This option only affects how the scoping of a particular kinds +of tags is interpreted (i.e. whether or not they are considered as globally +visible or visible only within the file in which they are defined); it does +not map the extension to any particular language. Any tag which is located in +a non-include file and cannot be seen (e.g. linked to) from another file is +considered to have file-limited (e.g. static) scope. No kind of tag appearing +in an include file will be considered to have file-limited scope. If the first +character in the list is a plus sign, then the extensions in the list will be +appended to the current list; otherwise, the list will replace the current +list. See, also, the --file-scope option. The default list is +".h.H.hh.hpp.hxx.h++.inc.def". To restore the default list, specify -h +default. Note that if an extension supplied to this option is not +already mapped to a particular language (see SOURCE FILES, above), you +will also need to use either the --langmap or --language-force +option. + +
    -I identifier-list + +
    +Specifies a list of identifiers which are to be specially handled while +parsing C and C++ source files. This option is specifically provided to handle +special cases arising through the use of preprocessor macros. When the +identifiers listed are simple identifiers, these identifiers will be ignored +during parsing of the source files. If an identifier is suffixed with a '+' +character, ctags will also ignore any parenthesis-enclosed argument list +which may immediately follow the identifier in the source files. If two +identifiers are separated with the '=' character, the first identifiers is +replaced by the second identifiers for parsing purposes. The list of +identifiers may be supplied directly on the command line or read in from a +separate file. If the first character of identifier-list is '@', '.' or +a pathname separator ('/' or '\'), or the first two characters specify a +drive letter (e.g. "C:"), the parameter identifier-list will be +interpreted as a filename from which to read a list of identifiers, one per +input line. Otherwise, identifier-list is a list of identifiers (or +identifier pairs) to be specially handled, each delimited by a either a comma +or by white space (in which case the list should be quoted to keep the entire +list as one command line argument). Multiple -I options may be supplied. +To clear the list of ignore identifiers, supply a single dash ("-") for +identifier-list. + +This feature is useful when preprocessor macros are used in such a way that +they cause syntactic confusion due to their presence. Indeed, this is the best +way of working around a number of problems caused by the presence of +syntax-busting macros in source files (see CAVEATS, below). Some +examples will illustrate this point. + +
    +int foo ARGDECL4(void *, ptr, long int, nbytes) +
    + + +
    +In the above example, the macro "ARGDECL4" would be mistakenly interpreted to +be the name of the function instead of the correct name of "foo". Specifying +-I ARGDECL4 results in the correct behavior. + +
    +/* creates an RCS version string in module */ +
    + +MODULE_VERSION("$Revision: 1.41 $") +
    + + +
    +In the above example the macro invocation looks too much like a function +definition because it is not followed by a semicolon (indeed, it could even be +followed by a global variable definition that would look much like a K&R style +function parameter declaration). In fact, this seeming function definition +could possibly even cause the rest of the file to be skipped over while trying +to complete the definition. Specifying -I MODULE_VERSION+ would +avoid such a problem. + +
    +CLASS Example { +
    + +
        // your content here +
    + +}; +
    + + +
    +The example above uses "CLASS" as a preprocessor macro which expands to +something different for each platform. For instance CLASS may be defined as +"class __declspec(dllexport)" on Win32 platforms and simply "class" on UNIX. +Normally, the absence of the C++ keyword "class" would cause the source file +to be incorrectly parsed. Correct behavior can be restored by specifying +-I CLASS=class. + +
    -L file + +
    +Read from file a list of file names for which tags should be generated. +If file is specified as "-", then file names are read from standard +input. File names read using this option are processed following file names +appearing on the command line. Options all also accepted in this input. If +this option is specified more than once, only the last will apply. Note: +file is read in line-oriented mode, where a new line is the only +delimiter and spaces are considered significant, in order that file names +containing spaces may be supplied; this can affect how options are parsed if +included in the input. + +
    -n + +
    +Equivalent to --excmd=number. + +
    -N + +
    +Equivalent to --excmd=pattern. + +
    -o tagfile + +
    +Equivalent to -f tagfile. + +
    -R + +
    +Equivalent to --recurse. + +
    -u + +
    +Equivalent to --sort=no (i.e. "unsorted"). + +
    -V + +
    +Equivalent to --verbose. + +
    -w + +
    +This option is silently ignored for backward-compatibility with the ctags +of SVR4 Unix. + +
    -x + +
    +Print a tabular, human-readable cross reference (xref) file to standard output +instead of generating a tag file. The information contained in the output +includes: the tag name; the kind of tag; the line number, file name, and +source line (with extra white space condensed) of the file which defines the +tag. No tag file is written and all options affecting tag file output will be +ignored. Example applications for this feature are generating a listing of all +functions located in a source file (e.g. ctags -x --c-kinds=f +file), or generating a list of all externally visible global variables +located in a source file (e.g. ctags -x --c-kinds=v +--file-scope=no file). This option must appear before the first +file name. + +
    --append[=yes|no]
    +Indicates whether tags generated from the specified files should be appended +to those already present in the tag file or should replace them. This option +is off by default. This option must appear before the first file name. + +
    --etags-include=file
    +Include a reference to file in the tag file. This option may be +specified as many times as desired. This supports Emacs' capability to use a +tag file which "includes" other tag files. [Available only in etags mode] + +
    --exclude=[pattern]
    +Add pattern to a list of excluded files and directories. This option +may be specified as many times as desired. For each file name considered by +ctags, each pattern specified using this option will be compared +against both the complete path (e.g. some/path/base.ext) and the base name +(e.g. base.ext) of the file, thus allowing patterns which match a given file +name irrespective of its path, or match only a specific path. If appropriate +support is available from the runtime library of your C compiler, then +pattern may contain the usual shell wildcards (not regular expressions) +common on Unix (be sure to quote the option parameter to protect the wildcards +from being expanded by the shell before being passed to ctags; also be +aware that wildcards can match the slash character, '/'). You can determine if +shell wildcards are available on your platform by examining the output of the +--version option, which will include "+wildcards" in the compiled +feature list; otherwise, pattern is matched against file names using a +simple textual comparison. + +If pattern begins with the character '@', then the rest of the string +is interpreted as a file name from which to read exclusion patterns, one per +line. If pattern is empty, the list of excluded patterns is cleared. +Note that at program startup, the default exclude list contains "EIFGEN", +"SCCS", "RCS", and "CVS", which are names of directories for which it is +generally not desirable to descend while processing the --recurse +option. + +
    --excmd=type
    +Determines the type of EX command used to locate tags in the source file. +[Ignored in etags mode] + +The valid values for type (either the entire word or the first letter is +accepted) are: + +
    +
    +
    number + +
    +Use only line numbers in the tag file for locating tags. This has four +advantages: + +
    +
    +
    1.
    +Significantly reduces the size of the resulting tag file. +
    2.
    +Eliminates failures to find tags because the line defining the tag has +changed, causing the pattern match to fail (note that some editors, such as +vim, are able to recover in many such instances). +
    3.
    +Eliminates finding identical matching, but incorrect, source lines (see +BUGS, below). +
    4.
    +Retains separate entries in the tag file for lines which are identical in +content. In pattern mode, duplicate entries are dropped because the +search patterns they generate are identical, making the duplicate entries +useless. +
    +
    + + + +
    +However, this option has one significant drawback: changes to the source files +can cause the line numbers recorded in the tag file to no longer correspond +to the lines in the source file, causing jumps to some tags to miss the target +definition by one or more lines. Basically, this option is best used when the +source code to which it is applied is not subject to change. Selecting this +option type causes the following options to be ignored: -BF. + +
    pattern + +
    +Use only search patterns for all tags, rather than the line numbers usually +used for macro definitions. This has the advantage of not referencing obsolete +line numbers when lines have been added or removed since the tag file was +generated. + +
    mixed + +
    +In this mode, patterns are generally used with a few exceptions. For C, line +numbers are used for macro definition tags. This was the default format +generated by the original ctags and is, therefore, retained as the +default for this option. For Fortran, line numbers are used for common blocks +because their corresponding source lines are generally identical, making +pattern searches useless for finding all matches. +
    +
    + + +
    --extra=[+|-]flags
    +Specifies whether to include extra tag entries for certain kinds of +information. The parameter flags is a set of one-letter flags, each +representing one kind of extra tag entry to include in the tag file. If +flags is preceded by by either the '+' or '-' character, the effect of +each flag is added to, or removed from, those currently enabled; otherwise the +flags replace any current settings. The meaning of each flag is as follows: + +
    +

    + +

    +
    +
    f + +
    +Include an entry for the base file name of every source file (e.g. +"example.c"), which addresses the first line of the file. +
    q + +
    +Include an extra class-qualified tag entry for each tag which is a member +of a class (for languages for which this information is extracted; currently +C++, Eiffel, and Java). The actual form of the qualified tag depends upon the +language from which the tag was derived (using a form that is most natural for +how qualified calls are specified in the language). For C++, it is in the form +"class::member"; for Eiffel and Java, it is in the form "class.member". This +may allow easier location of a specific tags when multiple occurrences of a +tag name occur in the tag file. Note, however, that this could potentially +more than double the size of the tag file. +
    +
    + + +
    +
    --fields=[+|-]flags
    +Specifies the available extension fields which are to be included in the +entries of the tag file (see TAG FILE FORMAT, below, for more +information). The parameter flags is a set of one-letter flags, each +representing one type of extension field to include, with the following +meanings (disabled by default unless indicated): + +
    +

    + + +

    +
    +
    a + +
    +Access (or export) of class members +
    f + +
    +File-restricted scoping [enabled] +
    i + +
    +Inheritance information +
    k + +
    +Kind of tag as a single letter [enabled] +
    K + +
    +Kind of tag as full name +
    l + +
    +Language of source file containing tag +
    m + +
    +Implementation information +
    n + +
    +Line number of tag definition +
    s + +
    +Scope of tag definition [enabled] +
    S + +
    +Signature of routine (e.g. prototype or parameter list) +
    z + +
    +Include the "kind:" key in kind field +
    t + +
    +Type and name of a variable or typedef as "typeref:" field [enabled] + +
    +
    + + +
    +Each letter or group of letters may be preceded by either '+' to add it to the +default set, or '-' to exclude it. In the absence of any preceding '+' or '-' +sign, only those kinds explicitly listed in flags will be included in +the output (i.e. overriding the default set). This option is ignored if the +option --format=1 has been specified. The default value +of this options is fks. +
    + + +
    +
    --file-scope[=yes|no]
    +Indicates whether tags scoped only for a single file (i.e. tags which cannot +be seen outside of the file in which they are defined, such as "static" tags) +should be included in the output. See, also, the -h option. This option +is enabled by default. + +
    --filter[=yes|no]
    +Causes ctags to behave as a filter, reading source file names from +standard input and printing their tags to standard output on a file-by-file +basis. If --sorted is enabled, tags are sorted only within the source +file in which they are defined. File names are read from standard output in +line-oriented input mode (see note for -L option) and only after file +names listed on the command line or from any file supplied using the -L +option. When this option is enabled, the options -f, -o, +and --totals are ignored. This option is quite esoteric and is disabled +by default. This option must appear before the first file name. + +
    --filter-terminator=string
    +Specifies a string to print to standard output following the tags for each +file name parsed when the --filter option is enabled. This may permit an +application reading the output of ctags to determine when the output for each +file is finished. Note that if the file name read is a directory and +--recurse is enabled, this string will be printed only one once at the +end of all tags found for by descending the directory. This string will always +be separated from the last tag line for the file by its terminating newline. +This option is quite esoteric and is empty by default. This option must appear +before the first file name. + +
    --format=level
    +Change the format of the output tag file. Currently the only valid values for +level are 1 or 2. Level 1 specifies the original tag file +format and level 2 specifies a new extended format containing extension fields +(but in a manner which retains backward-compatibility with original +vi(1) implementations). The default level is 2. This option must appear +before the first file name. [Ignored in etags mode] + +
    --help + +
    +Prints to standard output a detailed usage description, and then exits. + +
    --if0[=yes|no]
    +Indicates a preference as to whether code within an "#if 0" branch of a +preprocessor conditional should be examined for non-macro tags (macro tags are +always included). Because the intent of this construct is to disable code, the +default value of this options is no. Note that this indicates a +preference only and does not guarantee skipping code within an "#if 0" branch, +since the fall-back algorithm used to generate tags when preprocessor +conditionals are too complex follows all branches of a conditional. This +option is disabled by default. + +
    --<LANG>-kinds=[+|-]kinds
    +Specifies a list of language-specific kinds of tags (or kinds) to include in +the output file for a particular language, where <LANG> is +case-insensitive and is one of the built-in language names (see the +--list-languages option for a complete list). The parameter kinds +is a group of one-letter flags designating kinds of tags (particular to the +language) to either include or exclude from the output. The specific sets of +flags recognized for each language, their meanings and defaults may be list +using the --list-kinds option. Each letter or group of letters may be +preceded by either '+' to add it to, or '-' to remove it from, the default +set. In the absence of any preceding '+' or '-' sign, only those kinds +explicitly listed in kinds will be included in the output (i.e. +overriding the default for the specified language). + +As an example for the C language, in order to add prototypes and external +variable declarations to the default set of tag kinds, but exclude macros, +use --c-kinds=+px-d; to include only tags for functions, use +--c-kinds=f. + +
    --langdef=name
    +Defines a new user-defined language, name, to be parsed with regular +expressions. Once defined, name may be used in other options taking +language names. The typical use of this option is to first define the +language, then map file names to it using --langmap, then specify +regular expressions using --regex-<LANG> to define how its tags are +found. + +
    --langmap=map[,map[...]]
    +Controls how file names are mapped to languages (see the --list-maps +option). Each comma-separated map consists of the language name (either +a built-in or user-defined language), a colon, and a list of file extensions +and/or file name patterns. A file extension is specified by preceding the +extension with a period (e.g. ".c"). A file name pattern is specified by +enclosing the pattern in parentheses (e.g. "([Mm]akefile)"). If appropriate +support is available from the runtime library of your C compiler, then the +file name pattern may contain the usual shell wildcards common on Unix (be +sure to quote the option parameter to protect the wildcards from being +expanded by the shell before being passed to ctags). You can determine +if shell wildcards are available on your platform by examining the output of +the --version option, which will include "+wildcards" in the compiled +feature list; otherwise, the file name patterns are matched against file names +using a simple textual comparison. When mapping a file extension, it will +first be unmapped from any other languages. + +If the first character in a map is a plus sign, then the extensions and file +name patterns in that map will be appended to the current map for that +language; otherwise, the map will replace the current map. For example, to +specify that only files with extensions of .c and .x are to be treated as C +language files, use "--langmap=c:.c.x"; to also add files with +extensions of .j as Java language files, specify +"--langmap=c:.c.x,java:+.j". To map makefiles (.e.g files +named either "Makefile", "makefile", or having the extension ".mak") to a +language called "make", specify "--langmap=make:([Mm]akefile).mak". +To map files having no extension, specify a period not followed by a +non-period character (e.g. ".", "..x", ".x."). To clear the mapping for a +particular language (thus inhibiting automatic generation of tags for that +language), specify an empty extension list (e.g. +"--langmap=fortran:"). To restore the default language mappings +for all a particular language, supply the keyword "default" for the mapping. +To specify restore the default language mappings for all languages, specify +"--langmap=default". Note that file extensions are tested before +file name patterns when inferring the language of a file. + +
    --language-force=language
    +By default, ctags automatically selects the language of a source file, +ignoring those files whose language cannot be determined (see +SOURCE FILES, above). This option forces the specified language +(case-insensitive; either built-in or user-defined) to be used for every +supplied file instead of automatically selecting the language based upon its +extension. In addition, the special value auto indicates that the +language should be automatically selected (which effectively disables this +option). + +
    --languages=[+|-]list
    +Specifies the languages for which tag generation is enabled, with list +containing a comma-separated list of language names (case-insensitive; either +built-in or user-defined). If the first language of list is not preceded +by either a '+' or '-', the current list will be cleared before adding or +removing the languages in list. Until a '-' is encountered, each +language in the list will be added to the current list. As either the '+' or + +removed from the current list, respectively. Thus, it becomes simple to +replace the current list with a new one, or to add or remove languages from +the current list. The actual list of files for which tags will be generated +depends upon the language extension mapping in effect (see the --langmap +option). Note that all languages, including user-defined languages are enabled +unless explicitly disabled using this option. Language names included in +list may be any built-in language or one previously defined with +--langdef. The default is "all", which is also accepted as a valid +argument. See the --list-languages option for a complete list of the +built-in language names. + +
    --license
    +Prints a summary of the software license to standard output, and then exits. + +
    --line-directives[=yes|no]
    +Specifies whether "#line" directives should be recognized. These are present +in the output of preprocessors and contain the line number, and possibly the +file name, of the original source file(s) from which the preprocessor output +file was generated. When enabled, this option will cause ctags to +generate tag entries marked with the file names and line numbers of their +locations original source file(s), instead of their actual locations in the +preprocessor output. The actual file names placed into the tag file will have +the same leading path components as the preprocessor output file, since it is +assumed that the original source files are located relative to the +preprocessor output file (unless, of course, the #line directive specifies an +absolute path). This option is off by default. Note: This option is +generally only useful when used together with the --excmd=number +(-n) option. Also, you may have to use either the --langmap or +--language-force option if the extension of the preprocessor output file +is not known to ctags. + +
    --links[=yes|no]
    +Indicates whether symbolic links (if supported) should be followed. When +disabled, symbolic links are ignored. This option is on by default. + +
    --list-kinds[=language|all]
    +Lists the tag kinds recognized for either the specified language or all +languages, and then exits. Each kind of tag recorded in the tag file is +represented by a one-letter flag, which is also used to filter the tags placed +into the output through use of the --<LANG>-kinds option. Note that some +languages and/or tag kinds may be implemented using regular expressions and +may not be available if regex support is not compiled into ctags (see +the --regex-<LANG> option). Each kind listed is enabled unless followed +by "[off]". + +
    --list-maps[=language|all]
    +Lists the file extensions and file name patterns which associate a file name +with a language for either the specified language or all languages, and then +exits. See the --langmap option, and SOURCE FILES, above. + +
    --list-languages
    +Lists the names of the languages understood by ctags, and then exits. +These language names are case insensitive and may be used in the +--language-force, --languages, --<LANG>-kinds, and +--regex-<LANG> options. + +
    --options=file
    +Read additional options from file. As a special case, if +--options=NONE is specified as the first option on the command +line, it will disable the automatic reading of any configuration options from +either a file or the environment (see FILES). + +
    --recurse[=yes|no]
    +Recurse into directories encountered in the list of supplied files. If the +list of supplied files is empty and no file list is specified with the +-L option, then the current directory (i.e. ".") is assumed. Symbolic +links are followed. If you don't like these behaviors, either explicitly +specify the files or pipe the output of find(1) into ctags -L- +instead. Note: This option is not supported on all platforms at present. +It is available if the output of the --help option includes this option. +See, also, the --exclude to limit recursion. + +
    --regex-<LANG>=/regexp/replacement/[kind-spec/][flags]
    +The /regexp/replacement/ pair define a regular expression replacement +pattern, similar in style to sed substitution commands, with which to +generate tags from source files mapped to the named language, <LANG>, +(case-insensitive; either a built-in or user-defined language). The regular +expression, regexp, defines an extended regular expression (roughly that +used by egrep(1)), which is used to locate a single source line +containing a tag and may specify tab characters using \t. When a matching +line is found, a tag will be generated for the name defined by +replacement, which generally will contain the special back-references +\1 through \9 to refer to matching sub-expression groups within +regexp. The '/' separator characters shown in the parameter to the +option can actually be replaced by any character. Note that whichever +separator character is used will have to be escaped with a backslash ('\') +character wherever it is used in the parameter as something other than a +separator. The regular expression defined by this option is added to the +current list of regular expressions for the specified language unless the +parameter is omitted, in which case the current list is cleared. + +Unless modified by flags, regexp is interpreted as a Posix +extended regular expression. The replacement should expand for all +matching lines to a non-empty string of characters, or a warning message will +be reported. An optional kind specifier for tags matching regexp may +follow replacement, which will determine what kind of tag is reported in +the "kind" extension field (see TAG FILE FORMAT, below). The full form +of kind-spec is in the form of a single letter, a comma, a name (without +spaces), a comma, a description, followed by a separator, which specify +the short and long forms of the kind value and its textual description +(displayed using --list-kinds). Either the kind name and/or the +description may be omitted. If kind-spec is omitted, it defaults to +"r,regex". Finally, flags are one or more single-letter characters +having the following effect upon the interpretation of regexp: + +
    +

    + +

    +
    +
    b + +
    +The pattern is interpreted as a Posix basic regular expression. +
    e + +
    +The pattern is interpreted as a Posix extended regular expression (default). +
    i + +
    +The regular expression is to be applied in a case-insensitive manner. +
    +
    + + +
    +Note that this option is available only if ctags was compiled with +support for regular expressions, which depends upon your platform. You can +determine if support for regular expressions is compiled in by examining the +output of the --version option, which will include "+regex" in the +compiled feature list. + +For more information on the regular expressions used by ctags, see +either the regex(5,7) man page, or the GNU info documentation for regex +(e.g. "info regex"). +
    + + +
    +
    --sort[=yes|no|foldcase]
    +Indicates whether the tag file should be sorted on the tag name (default is +yes). Note that the original vi(1) required sorted tags. +The foldcase value specifies case insensitive (or case-folded) sorting. +Fast binary searches of tag files sorted with case-folding will require +special support from tools using tag files, such as that found in the ctags +readtags library, or Vim version 6.2 or higher (using "set ignorecase"). This +option must appear before the first file name. [Ignored in etags mode] + +
    --tag-relative[=yes|no]
    +Indicates that the file paths recorded in the tag file should be relative to +the directory containing the tag file, rather than relative to the current +directory, unless the files supplied on the command line are specified with +absolute paths. This option must appear before the first file name. The +default is yes when running in etags mode (see the -e +option), no otherwise. + +
    --totals[=yes|no]
    +Prints statistics about the source files read and the tag file written during +the current invocation of ctags. This option is off by default. +This option must appear before the first file name. + +
    --verbose[=yes|no]
    +Enable verbose mode. This prints out information on option processing and a +brief message describing what action is being taken for each file considered +by ctags. Normally, ctags does not read command line arguments +until after options are read from the configuration files (see FILES, +below) and the CTAGS environment variable. However, if this option is +the first argument on the command line, it will take effect before any options +are read from these sources. The default is no. + +
    --version
    +Prints a version identifier for ctags to standard output, and then +exits. This is guaranteed to always contain the string "Exuberant Ctags". + + +
    +  +

    OPERATIONAL DETAILS

    + + +As ctags considers each file name in turn, it tries to determine the +language of the file by applying the following three tests in order: if the +file extension has been mapped to a language, if the file name matches a shell +pattern mapped to a language, and finally if the file is executable and its +first line specifies an interpreter using the Unix-style "#!" specification +(if supported on the platform). If a language was identified, the file is +opened and then the appropriate language parser is called to operate on the +currently open file. The parser parses through the file and adds an entry to +the tag file for each language object it is written to handle. See +TAG FILE FORMAT, below, for details on these entries. + +This implementation of ctags imposes no formatting requirements on C +code as do legacy implementations. Older implementations of ctags tended to +rely upon certain formatting assumptions in order to help it resolve coding +dilemmas caused by preprocessor conditionals. + +In general, ctags tries to be smart about conditional preprocessor +directives. If a preprocessor conditional is encountered within a statement +which defines a tag, ctags follows only the first branch of that +conditional (except in the special case of "#if 0", in which case it follows +only the last branch). The reason for this is that failing to pursue only one +branch can result in ambiguous syntax, as in the following example: + +
    +#ifdef TWO_ALTERNATIVES +
    + +struct { +
    + +#else +
    + +union { +
    + +#endif +
    +short a; +
    + +long b; +
    + +} +
    + + +Both branches cannot be followed, or braces become unbalanced and ctags +would be unable to make sense of the syntax. + +If the application of this heuristic fails to properly parse a file, +generally due to complicated and inconsistent pairing within the conditionals, +ctags will retry the file using a different heuristic which does not +selectively follow conditional preprocessor branches, but instead falls back +to relying upon a closing brace ("}") in column 1 as indicating the end of a +block once any brace imbalance results from following a #if conditional branch. + +Ctags will also try to specially handle arguments lists enclosed in +double sets of parentheses in order to accept the following conditional +construct: + +
    +extern void foo __ARGS((int one, char two)); +
    + + +Any name immediately preceding the "((" will be automatically ignored and +the previous name will be used. + +C++ operator definitions are specially handled. In order for consistency with +all types of operators (overloaded and conversion), the operator name in the +tag file will always be preceded by the string "operator " (i.e. even if the +actual operator definition was written as "operator<<"). + +After creating or appending to the tag file, it is sorted by the tag name, +removing identical tag lines. + + +  +

    TAG FILE FORMAT

    + + +When not running in etags mode, each entry in the tag file consists of a +separate line, each looking like this in the most general case: + +
    +tag_name<TAB>file_name<TAB>ex_cmd;"<TAB>extension_fields +
    + + +The fields and separators of these lines are specified as follows: + + +
    +
    +
    1.
    +tag name +
    2.
    +single tab character +
    3.
    +name of the file in which the object associated with the tag is located +
    4.
    +single tab character +
    5.
    +EX command used to locate the tag within the file; generally a search pattern +(either /pattern/ or ?pattern?) or line number (see --excmd). Tag file +format 2 (see --format) extends this EX command under certain +circumstances to include a set of extension fields (described below) embedded +in an EX comment immediately appended to the EX command, which leaves it +backward-compatible with original vi(1) implementations. +
    +
    + + + +A few special tags are written into the tag file for internal purposes. These +tags are composed in such a way that they always sort to the top of the file. +Therefore, the first two characters of these tags are used a magic number to +detect a tag file for purposes of determining whether a valid tag file is +being overwritten rather than a source file. + +Note that the name of each source file will be recorded in the tag file +exactly as it appears on the command line. Therefore, if the path you +specified on the command line was relative to the current directory, then it +will be recorded in that same manner in the tag file. See, however, the +--tag-relative option for how this behavior can be modified. + +Extension fields are tab-separated key-value pairs appended to the end of the +EX command as a comment, as described above. These key value pairs appear in +the general form "key:value". Their presence in the lines of the +tag file are controlled by the --fields option. The possible keys and +the meaning of their values are as follows: + +
    +
    access + +
    +Indicates the visibility of this class member, where value is specific +to the language. + +
    file + +
    +Indicates that the tag has file-limited visibility. This key has no +corresponding value. + +
    kind + +
    +Indicates the type, or kind, of tag. Its value is either one of the +corresponding one-letter flags described under the various +--<LANG>-kinds options above, or a full name. It is permitted (and is, +in fact, the default) for the key portion of this field to be omitted. The +optional behaviors are controlled with the --fields option. + +
    implementation + +
    +When present, this indicates a limited implementation (abstract vs. concrete) +of a routine or class, where value is specific to the language +("virtual" or "pure virtual" for C++; "abstract" for Java). + +
    inherits + +
    +When present, value. is a comma-separated list of classes from which +this class is derived (i.e. inherits from). + +
    signature + +
    +When present, value. is a language-dependent representation of the +signature of a routine. A routine signature in its complete form specifies the +return type of a routine and its formal argument list. This extension field is +presently supported only for C-based languages and does not include the return +type. + +
    +

    + +In addition, information on the scope of the tag definition may be available, +with the key portion equal to some language-dependent construct name and its +value the name declared for that construct in the program. This scope entry +indicates the scope in which the tag was found. For example, a tag generated +for a C structure member would have a scope looking like "struct:myStruct". + + +  +

    HOW TO USE WITH VI

    + +Vi will, by default, expect a tag file by the name "tags" in the current +directory. Once the tag file is built, the following commands exercise the tag +indexing feature: +
    +
    vi -t tag + +
    +Start vi and position the cursor at the file and line where "tag" is defined. +
    :ta tag + +
    +Find a tag. +
    Ctrl-] + +
    +Find the tag under the cursor. +
    Ctrl-T + +
    +Return to previous location before jump to tag (not widely implemented). + + +
    +  +

    HOW TO USE WITH GNU EMACS

    + +Emacs will, by default, expect a tag file by the name "TAGS" in the current +directory. Once the tag file is built, the following commands exercise the +tag indexing feature: +
    +
    M-x visit-tags-table <RET> FILE <RET> + +
    +Select the tag file, "FILE", to use. +
    M-. [TAG] <RET> + +
    +Find the first definition of TAG. The default tag is the identifier under the +cursor. +
    M-* + +
    +Pop back to where you previously invoked "M-.". +
    C-u M-. + +
    +Find the next definition for the last tag. + +
    +

    + +For more commands, see the Tags topic in the Emacs info document. + + +  +

    HOW TO USE WITH NEDIT

    + +NEdit version 5.1 and later can handle the new extended tag file format (see +--format). To make NEdit use the tag file, select "File->Load Tags +File". To jump to the definition for a tag, highlight the word, the press +Ctrl-D. NEdit 5.1 can can read multiple tag files from different directories. +Setting the X resource nedit.tagFile to the name of a tag file instructs NEdit +to automatically load that tag file at startup time. + + +  +

    CAVEATS

    + +Because ctags is neither a preprocessor nor a compiler, use of +preprocessor macros can fool ctags into either missing tags or +improperly generating inappropriate tags. Although ctags has been +designed to handle certain common cases, this is the single biggest cause of +reported problems. In particular, the use of preprocessor constructs which +alter the textual syntax of C can fool ctags. You can work around many +such problems by using the -I option. + +White space is treated as a separator for file names and options read from +list files, specified using the -L option, and in filter mode (specified +using the --filter option). Therefore, it is not currently possible to +supply file names or other options containing embedded white space (spaces, +etc.) through these options. + +Note that when ctags generates uses patterns for locating tags (see +the --excmd option), it is entirely possible that the wrong line may be +found by your editor if there exists another source line which is identical to +the line containing the tag. The following example demonstrates this condition: + +
    +int variable; + +/* ... */ +
    + +void foo(variable) +
    + +int variable; +
    + +{ +
    +/* ... */ +
    + +} +
    + + +Depending upon which editor you use and where in the code you happen to be, it +is possible that the search pattern may locate the local parameter declaration +in foo() before it finds the actual global variable definition, since the +lines (and therefore their search patterns are identical). This can be avoided +by use of the --excmd=n option. + + +  +

    BUGS

    + +Ctags has more options than ls(1). + +When parsing a C++ member function definition (e.g. "className::function"), +ctags cannot determine whether the scope specifier is a class name or a +namespace specifier and always lists it as a class name in the scope portion +of the extension fields. Also, if a C++ function is defined outside of the +class declaration (the usual case), the access specification (i.e. public, +protected, or private) and implementation information (e.g. virtual, pure +virtual) contained in the function declaration are not known when the tag is +generated for the function definition. It will, however be available for +prototypes (e.g --c++-kinds=+p). + +No qualified tags are generated for language objects inherited into a class. + + +  +

    ENVIRONMENT VARIABLES

    + + +
    +
    CTAGS + +
    +If this environment variable exists, it will be expected to contain a set of +default options which are read when ctags starts, after the +configuration files listed in FILES, below, are read, but before any +command line options are read. Options appearing on the command line will +override options specified in this variable. Only options will be read from +this variable. Note that all white space in this variable in considered a +separator, making it impossible to pass an option parameter containing an +embedded space. If this is a problem, use a configuration file instead. + +
    ETAGS + +
    +Similar to the CTAGS variable above, this variable, if found, will be +read when etags starts. If this variable is not found, etags will +try to use CTAGS instead. + +
    TMPDIR + +
    +On Unix-like hosts where mkstemp() is available, the value of this variable +specifies the directory in which to place temporary files. This can be useful +if the size of a temporary file becomes too large to fit on the partition +holding the default temporary directory defined at compilation time. +ctags creates temporary files only if either (1) an emacs-style tag file +is being generated, (2) the tag file is being sent to standard output, or (3) +the program was compiled to use an internal sort algorithm to sort the tag +files instead of the the sort utility of the operating system. If the sort +utility of the operating system is being used, it will generally observe this +variable also. Note that if ctags is setuid, the value of TMPDIR will be +ignored. + + +
    +  +

    FILES

    + + +/ctags.cnf (on MSDOS, MSWindows only) + +
    + +/etc/ctags.conf + +
    + +/usr/local/etc/ctags.conf + +
    + +$HOME/.ctags ($HOME/ctags.cnf on MSDOS, MSWindows) + +
    + +.ctags (ctags.cnf on MSDOS, MSWindows) + +
    +
    +If any of these configuration files exist, each will be expected to contain a +set of default options which are read in the order listed when ctags +starts, but before the CTAGS environment variable is read or any command +line options are read. This makes it possible to set up site-wide, personal +or project-level defaults. It is possible to compile ctags to read an +additional configuration file before any of those shown above, which will be +indicated if the output produced by the --version option lists the +"custom-conf" feature. Options appearing in the CTAGS environment +variable or on the command line will override options specified in these +files. Only options will be read from these files. Note that the option files +are read in line-oriented mode in which spaces are significant (since +shell quoting is not possible). Each line of the file is read as one command +line parameter (as if it were quoted with single quotes). Therefore, use new +lines to indicate separate command-line arguments. + + +
    tags + +
    +The default tag file created by ctags. +
    TAGS + +
    +The default tag file created by etags. + +
    +  +

    SEE ALSO

    + +The official Exuberant Ctags web site at: + +
    +http://ctags.sourceforge.net +
    + + +Also ex(1), vi(1), elvis, or, better yet, vim, the +official editor of ctags. For more information on vim, see the VIM +Pages web site at: + +
    +http://www.vim.org/ +
    + + + +  +

    AUTHOR

    + +Darren Hiebert <dhiebert at users.sourceforge.net> +
    + +http://DarrenHiebert.com/ + + +  +

    MOTIVATION

    + +"Think ye at all times of rendering some service to every member of the human +race." + +"All effort and exertion put forth by man from the fullness of his heart is +worship, if it is prompted by the highest motives and the will to do service +to humanity." + +
    +-- From the Baha'i Writings +
    + + + +  +

    CREDITS

    + +This version of ctags was originally derived from and inspired by the +ctags program by Steve Kirkendall <kirkenda@cs.pdx.edu> that comes with the +Elvis vi clone (though virtually none of the original code remains). + +Credit is also due Bram Moolenaar <Bram@vim.org>, the author of vim, who +has devoted so much of his time and energy both to developing the editor as a +service to others, and to helping the orphans of Uganda. + +The section entitled "HOW TO USE WITH GNU EMACS" was shamelessly stolen from +the info page for GNU etags. +

    + +


    + 

    Index

    +
    +
    NAME
    +
    SYNOPSIS
    +
    DESCRIPTION
    +
    SOURCE FILES
    +
    OPTIONS
    +
    OPERATIONAL DETAILS
    +
    TAG FILE FORMAT
    +
    HOW TO USE WITH VI
    +
    HOW TO USE WITH GNU EMACS
    +
    HOW TO USE WITH NEDIT
    +
    CAVEATS
    +
    BUGS
    +
    ENVIRONMENT VARIABLES
    +
    FILES
    +
    SEE ALSO
    +
    AUTHOR
    +
    MOTIVATION
    +
    CREDITS
    +
    +
    +This document was created by +man2html, +using the manual pages.
    +Time: 04:52:47 GMT, May 30, 2006 + + diff --git a/sdk/ctags/ctags.lsm b/sdk/ctags/ctags.lsm new file mode 100644 index 0000000000..3a01240762 --- /dev/null +++ b/sdk/ctags/ctags.lsm @@ -0,0 +1,19 @@ +Begin4 +Title: Exuberant Ctags +Version: 5.6 +Entered-date: 29MAY06 +Description: An improved ctags with multilanguage support. +Keywords: tag tags ctags etags ftags ptags Exuberant Assembler ASP AWK + Bourne sh BETA C C++ C# COBOL Eiffel Fortran Java JavaScript + Korn ksh Lisp Lua Makefile Pascal Perl PHP PL/SQL Python REXX + Ruby Scheme SLang S-Lang SML Tcl Vera Verilog Vim YACC zsh + source index +Author: dhiebert@users.sourceforge.net (Darren Hiebert) +Maintained-by: dhiebert@users.sourceforge.net (Darren Hiebert) +Primary-site: http://prdownloads.sourceforge.net/ctags + 260K ctags-5.6.tar.gz +Original-site: http://ctags.sourceforge.net +Platforms: UNIX, MSDOS, Windows 95/98/NT/2000/XP, OS/2, QNX, Amiga, QDOS, + RISC OS, VMS, Macintosh, MacOS X, Cray +Copying-policy: Gnu General Public License (GPL) +End diff --git a/sdk/ctags/ctags.sln b/sdk/ctags/ctags.sln new file mode 100644 index 0000000000..190bf79be3 --- /dev/null +++ b/sdk/ctags/ctags.sln @@ -0,0 +1,35 @@ + +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctags", "ctags.vcproj", "{5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug.ActiveCfg = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug.Build.0 = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release.ActiveCfg = Release|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug|Win32.ActiveCfg = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Debug|Win32.Build.0 = Debug|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release|Win32.ActiveCfg = Release|Win32 + {5839C67E-4639-4CF5-8085-4CEE4A7A0E9D}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sdk/ctags/ctags.vcproj b/sdk/ctags/ctags.vcproj new file mode 100644 index 0000000000..a65d91ee15 --- /dev/null +++ b/sdk/ctags/ctags.vcproj @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/ctags/debug.c b/sdk/ctags/debug.c new file mode 100644 index 0000000000..b0eedc3e19 --- /dev/null +++ b/sdk/ctags/debug.c @@ -0,0 +1,120 @@ +/* +* $Id: debug.c,v 1.5 2006/05/30 04:37:11 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains debugging functions. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include + +#include "debug.h" +#include "options.h" +#include "read.h" + +/* +* FUNCTION DEFINITIONS +*/ + +#ifdef DEBUG + +extern void lineBreak (void) {} /* provides a line-specified break point */ + +extern void debugPrintf ( + const enum eDebugLevels level, const char *const format, ... ) +{ + va_list ap; + + va_start (ap, format); + if (debug (level)) + vprintf (format, ap); + fflush (stdout); + va_end (ap); +} + +extern void debugPutc (const int level, const int c) +{ + if (debug (level) && c != EOF) + { + if (c == STRING_SYMBOL) printf ("\"string\""); + else if (c == CHAR_SYMBOL) printf ("'c'"); + else putchar (c); + + fflush (stdout); + } +} + +extern void debugParseNest (const boolean increase, const unsigned int level) +{ + debugPrintf (DEBUG_PARSE, "<*%snesting:%d*>", increase ? "++" : "--", level); +} + +extern void debugCppNest (const boolean begin, const unsigned int level) +{ + debugPrintf (DEBUG_CPP, "<*cpp:%s level %d*>", begin ? "begin":"end", level); +} + +extern void debugCppIgnore (const boolean ignore) +{ + debugPrintf (DEBUG_CPP, "<*cpp:%s ignore*>", ignore ? "begin":"end"); +} + +extern void clearString (char *const string, const int length) +{ + int i; + for (i = 0 ; i < length ; ++i) + string [i] = '\0'; +} + +extern void debugEntry (const tagEntryInfo *const tag) +{ + const char *const scope = tag->isFileScope ? "{fs}" : ""; + + if (debug (DEBUG_PARSE)) + { + printf ("<#%s%s:%s", scope, tag->kindName, tag->name); + + if (tag->extensionFields.scope [0] != NULL && + tag->extensionFields.scope [1] != NULL) + printf (" [%s:%s]", tag->extensionFields.scope [0], + tag->extensionFields.scope [1]); + + if (Option.extensionFields.inheritance && + tag->extensionFields.inheritance != NULL) + printf (" [inherits:%s]", tag->extensionFields.inheritance); + + if (Option.extensionFields.fileScope && + tag->isFileScope && ! isHeaderFile ()) + printf (" [file:]"); + + if (Option.extensionFields.access && + tag->extensionFields.access != NULL) + printf (" [access:%s]", tag->extensionFields.access); + + if (Option.extensionFields.implementation && + tag->extensionFields.implementation != NULL) + printf (" [imp:%s]", tag->extensionFields.implementation); + + if (Option.extensionFields.typeRef && + tag->extensionFields.typeRef [0] != NULL && + tag->extensionFields.typeRef [1] != NULL) + printf (" [%s:%s]", tag->extensionFields.typeRef [0], + tag->extensionFields.typeRef [1]); + + printf ("#>"); + fflush (stdout); + } +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/debug.h b/sdk/ctags/debug.h new file mode 100644 index 0000000000..d8769911bb --- /dev/null +++ b/sdk/ctags/debug.h @@ -0,0 +1,71 @@ +/* +* $Id: debug.h,v 1.3 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to debug.c +*/ +#ifndef _DEBUG_H +#define _DEBUG_H + +/* +* Include files +*/ +#include "general.h" /* must always come first */ + +#ifdef DEBUG +# include +#endif +#include "entry.h" + +/* +* Macros +*/ + +#ifdef DEBUG +# define debug(level) ((Option.debugLevel & (long)(level)) != 0) +# define DebugStatement(x) x +# define PrintStatus(x) if (debug(DEBUG_STATUS)) printf x; +# define Assert(c) assert(c) +#else +# define DebugStatement(x) +# define PrintStatus(x) +# define Assert(c) +# ifndef NDEBUG +# define NDEBUG +# endif +#endif + +/* +* Data declarations +*/ + +/* Defines the debugging levels. + */ +enum eDebugLevels { + DEBUG_READ = 0x01, /* echo raw (filtered) characters */ + DEBUG_PARSE = 0x02, /* echo parsing results */ + DEBUG_STATUS = 0x04, /* echo file status information */ + DEBUG_OPTION = 0x08, /* echo option parsing */ + DEBUG_CPP = 0x10, /* echo characters out of pre-processor */ + DEBUG_RAW = 0x20 /* echo raw (filtered) characters */ +}; + +/* +* Function prototypes +*/ +extern void lineBreak (void); +extern void debugPrintf (const enum eDebugLevels level, const char *const format, ...) __printf__ (2, 3); +extern void debugPutc (const int level, const int c); +extern void debugParseNest (const boolean increase, const unsigned int level); +extern void debugCppNest (const boolean begin, const unsigned int level); +extern void debugCppIgnore (const boolean ignore); +extern void clearString (char *const string, const int length); +extern void debugEntry (const tagEntryInfo *const tag); + +#endif /* _DEBUG_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/e_amiga.h b/sdk/ctags/e_amiga.h new file mode 100644 index 0000000000..3c52813b03 --- /dev/null +++ b/sdk/ctags/e_amiga.h @@ -0,0 +1,24 @@ +/* +* $Id: e_amiga.h,v 1.1 2002/03/08 22:35:19 darren Exp $ +* +* Copyright (c) 2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for Amiga environment. +*/ +#ifndef E_AMIGA_H +#define E_AMIGA_H + +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_STRERROR 1 +#define HAVE_STRICMP 1 +#define HAVE_STRNICMP 1 + +#endif diff --git a/sdk/ctags/e_djgpp.h b/sdk/ctags/e_djgpp.h new file mode 100644 index 0000000000..5a45671ac9 --- /dev/null +++ b/sdk/ctags/e_djgpp.h @@ -0,0 +1,47 @@ +/* +* $Id: e_djgpp.h,v 1.5 2003/10/31 04:15:35 darren Exp $ +* +* Copyright (c) 2002-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for DJGPP environment. +*/ +#ifndef E_DJGPP_H +#define E_DJGPP_H + +#define CASE_INSENSITIVE_FILENAMES 1 +#define MSDOS_STYLE_PATH 1 + +#define HAVE_DIR_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FNMATCH_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_DIR_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 + +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_FNMATCH 1 +#define HAVE_MKSTEMP 1 +#define HAVE_OPENDIR 1 +#define HAVE_REGCOMP 1 +#define HAVE_REMOVE 1 +#define HAVE_SETENV 1 +#define HAVE_STAT_ST_INO 1 +#define HAVE_STRCASECMP 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNCASECMP 1 +#define HAVE_STRSTR 1 +#define HAVE_TRUNCATE 1 +#define NEED_PROTO_LSTAT 1 +#define STDC_HEADERS 1 + +#endif diff --git a/sdk/ctags/e_mac.h b/sdk/ctags/e_mac.h new file mode 100644 index 0000000000..aa27c487c3 --- /dev/null +++ b/sdk/ctags/e_mac.h @@ -0,0 +1,143 @@ +/* +* $Id: e_mac.h,v 1.2 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2001, Maarten L. Hekkelman +* +* Author: Maarten L. Hekkelman +* http://www.hekkelman.com +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. It is provided on an as-is basis and no +* responsibility is accepted for its failure to perform as expected. +* +* Configures ctags for Macintosh environment. +*/ +#ifndef E_MAC_H +#define E_MAC_H + +#define BUILD_MPW_TOOL 1 + +#define MACROS_USE_PATTERNS 1 +#define DEFAULT_FILE_FORMAT 2 +#define INTERNAL_SORT 1 +#define TMPDIR "/tmp" +#define NEED_PROTO_TRUNCATE 1 +#define STDC_HEADERS 1 +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_OPENDIR 1 +#define HAVE_REMOVE 1 +#define HAVE_SETENV 1 +#define HAVE_STRERROR 1 +#define HAVE_STRSTR 1 +#define HAVE_FCNTL_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_DIR_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_TYPES_H 1 +#define HAVE_STDLIB_H 1 + +#include +#include +#include +#include +#include + +#include + +#if BUILD_MPW_TOOL + +/* + The following defines are collected from various header files from some + Linux distribution +*/ + +typedef unsigned long mode_t; +typedef unsigned long ino_t; +typedef unsigned long dev_t; +typedef short nlink_t; +typedef unsigned long uid_t; +typedef unsigned long gid_t; + +/* Encoding of the file mode. */ +#define S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define S_IFDIR 0040000 /* Directory. */ +#define S_IFCHR 0020000 /* Character device. */ +#define S_IFBLK 0060000 /* Block device. */ +#define S_IFREG 0100000 /* Regular file. */ + +#define S_ISTYPE(mode, mask) (((mode) & S_IFMT) == (mask)) + +#define S_ISDIR(mode) S_ISTYPE((mode), S_IFDIR) +#define S_ISCHR(mode) S_ISTYPE((mode), S_IFCHR) +#define S_ISBLK(mode) S_ISTYPE((mode), S_IFBLK) +#define S_ISREG(mode) S_ISTYPE((mode), S_IFREG) + +struct stat { + dev_t st_dev; /* Device. */ + unsigned short int __pad1; + ino_t st_ino; /* File serial number. */ + mode_t st_mode; /* File mode. */ + nlink_t st_nlink; /* Link count. */ + uid_t st_uid; /* User ID of the file's owner. */ + gid_t st_gid; /* Group ID of the file's group.*/ + off_t st_size; /* Size of file, in bytes. */ + unsigned long int st_blksize; /* Optimal block size for I/O. */ + long st_blocks; /* Number 512-byte blocks allocated. */ + time_t st_atime; /* Time of last access. */ + time_t st_mtime; /* Time of last modification. */ + time_t st_ctime; /* Time of last status change. */ +}; + +int fstat(int fildes, struct stat *buf); + +#else +#include +#include +#endif + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +/* + Our own stat, accepts unix like paths. +*/ +int mstat(const char *path, struct stat *buf); + +struct dirent { + char d_name[64]; +}; + +typedef struct { + FSSpec file; + int index; + struct dirent ent; +} DIR; + +extern DIR* opendir(const char *dirname); +extern struct dirent* readdir(DIR* dirp); +extern int closedir(DIR* dirp); +extern void rewinddir(DIR* dirp); +extern char* getcwd(char*, int); + +/* + Our own fopen, accepts unix like paths. +*/ +extern FILE* mfopen(const char* file, const char* mode); + +/* + Dirty, define the standard functions fopen, stat and lstat to map to our + own routines. +*/ +#define fopen mfopen +#define stat(a,b) mstat(a,b) +#define lstat(a,b) mstat(a,b) + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/e_msoft.h b/sdk/ctags/e_msoft.h new file mode 100644 index 0000000000..a8462b818c --- /dev/null +++ b/sdk/ctags/e_msoft.h @@ -0,0 +1,75 @@ +/* +* $Id: e_msoft.h,v 1.8 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2002-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for Microsoft environment. +*/ +#ifndef E_MSOFT_H +#define E_MSOFT_H + +/* MS-DOS/Windows doesn't allow manipulation of standard error, + * so we send it to stdout instead. + */ +#define errout stdout + +#define CASE_INSENSITIVE_FILENAMES 1 +#define MANUAL_GLOBBING 1 +#define MSDOS_STYLE_PATH 1 +#define HAVE_DOS_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_IO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_CLOCK 1 +#define HAVE_CHSIZE 1 +#define HAVE_FGETPOS 1 +#define HAVE_STRICMP 1 +#define HAVE_STRNICMP 1 +#define HAVE_STRSTR 1 +#define HAVE_STRERROR 1 +#define HAVE_FINDNEXT 1 +#define HAVE_TEMPNAM 1 +#define tempnam(dir,pfx) _tempnam(dir,pfx) +#define TMPDIR "\\" + +#ifdef __BORLANDC__ + +# define HAVE_DIR_H 1 +# define HAVE_DIRENT_H 1 +# define HAVE_FINDFIRST 1 + +#elif defined (_MSC_VER) + +# define HAVE__FINDFIRST 1 +# define HAVE_DIRECT_H 1 + +# if _MSC_VER >= 1300 +# define findfirst_t intptr_t /* Visual Studio 7 */ +# else +# define findfirst_t long /* Visual Studio 6 or earlier */ +# endif + +#elif defined (__MINGW32__) + +# include <_mingw.h> +# if defined (__MSVCRT__) && __MINGW32_MAJOR_VERSION == 1 && __MINGW32_MINOR_VERSION < 2 +/* Work-around for broken implementation of fgetpos()/fsetpos() on Mingw32 */ +# undef HAVE_FGETPOS +# define NEED_PROTO_FGETPOS 1 +# endif +# define HAVE_DIR_H 1 +# define HAVE_DIRENT_H 1 +# define HAVE__FINDFIRST 1 +# define ffblk _finddata_t +# define FA_DIREC _A_SUBDIR +# define ff_name name + +#endif + +#endif diff --git a/sdk/ctags/e_os2.h b/sdk/ctags/e_os2.h new file mode 100644 index 0000000000..bd8e7428d5 --- /dev/null +++ b/sdk/ctags/e_os2.h @@ -0,0 +1,37 @@ +/* +* $Id: e_os2.h,v 1.1 2002/03/08 22:35:19 darren Exp $ +* +* Copyright (c) 2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for OS/2 environment. +*/ +#ifndef E_OS2_H +#define E_OS2_H + +#define UNIX_PATH_SEPARATOR 1 +#define CASE_INSENSITIVE_FILENAMES 1 +#define HAVE_DIRENT_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_IO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_CLOCK 1 +#define HAVE_CHSIZE 1 +#define HAVE_FGETPOS 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_OPENDIR 1 +#define HAVE_REGCOMP 1 +#define HAVE_REMOVE 1 +#define HAVE_STRERROR 1 +#define HAVE_STRICMP 1 +#define HAVE_STRNICMP 1 +#define HAVE_STRSTR 1 +#define HAVE_TRUNCATE 1 + +#endif diff --git a/sdk/ctags/e_qdos.h b/sdk/ctags/e_qdos.h new file mode 100644 index 0000000000..a2f69202f3 --- /dev/null +++ b/sdk/ctags/e_qdos.h @@ -0,0 +1,34 @@ +/* +* $Id: e_qdos.h,v 1.1 2002/03/08 22:35:19 darren Exp $ +* +* Copyright (c) 2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for QDOS environment. +*/ +#ifndef E_QDOS_H +#define E_QDOS_H + +#define HAVE_DIRENT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define STDC_HEADERS 1 +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_OPENDIR 1 +#define HAVE_PUTENV 1 +#define HAVE_REMOVE 1 +#define HAVE_STRERROR 1 +#define HAVE_STRSTR 1 +#define HAVE_TIMES 1 +#define HAVE_TRUNCATE 1 +#define NON_CONST_PUTENV_PROTOTYPE 1 + +#endif diff --git a/sdk/ctags/e_riscos.h b/sdk/ctags/e_riscos.h new file mode 100644 index 0000000000..8fb96903fd --- /dev/null +++ b/sdk/ctags/e_riscos.h @@ -0,0 +1,58 @@ +/* +* $Id: e_riscos.h,v 1.1 2002/03/08 22:35:19 darren Exp $ +* +* Copyright (c) 2002, Andrew Wingate +* +* Author: Andrew Wingate +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. It is provided on an as-is basis and no +* responsibility is accepted for its failure to perform as expected. +* +* Configures ctags for RISC OS environment. +* +* We currently use UnixLib. This file is subject to change if +* we move to using SharedCLibrary and libGNU. +*/ +#ifndef E_RISCOS_H +#define E_RISCOS_H + +#define MACROS_USE_PATTERNS 1 +#define DEFAULT_FILE_FORMAT 2 +#define INTERNAL_SORT 1 /* Not all systems will have installed sort(1) */ +#define TMPDIR "" + +/* Various definitions for UnixLib */ +#define STDC_HEADERS 1 +#define HAVE_CHMOD 1 +#define HAVE_CHSIZE 1 +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_FNMATCH 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_MKSTEMP 1 +#define HAVE_OPENDIR 1 +#define HAVE_PUTENV 1 +#define HAVE_REGCOMP 1 /* Requires RegEx library */ +#define HAVE_REMOVE 1 +#define HAVE_SETENV 1 +#define HAVE_STRERROR 1 +#define HAVE_STRICMP 1 +#define HAVE_STRNICMP 1 +#define HAVE_STRSTR 1 +#define HAVE_TIMES 1 +#define HAVE_TRUNCATE 1 +#define HAVE_DIRENT_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FNMATCH_H 1 +#define HAVE_STAT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_DIR_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 + +#endif diff --git a/sdk/ctags/e_vms.h b/sdk/ctags/e_vms.h new file mode 100644 index 0000000000..7ae5692acc --- /dev/null +++ b/sdk/ctags/e_vms.h @@ -0,0 +1,31 @@ +/* +* $Id: e_vms.h,v 1.1 2002/03/08 22:35:19 darren Exp $ +* +* Copyright (c) 2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Configures ctags for VMS environment. +*/ +#ifndef E_VMS_H +#define E_VMS_H + +#define CASE_INSENSITIVE_FILENAMES 1 +#define HAVE_STDLIB_H 1 +#define HAVE_TIME_H 1 +#ifdef VAXC +# define HAVE_STAT_H 1 +# define HAVE_TYPES_H 1 +#else +# define HAVE_FCNTL_H 1 +# define HAVE_SYS_STAT_H 1 +# define HAVE_SYS_TYPES_H 1 +#endif +#define HAVE_CLOCK 1 +#define HAVE_FGETPOS 1 +#define HAVE_STRERROR 1 +#define HAVE_STRSTR 1 +#define HAVE_UNISTD_H 1 + +#endif diff --git a/sdk/ctags/eiffel.c b/sdk/ctags/eiffel.c new file mode 100644 index 0000000000..03477944ee --- /dev/null +++ b/sdk/ctags/eiffel.c @@ -0,0 +1,1319 @@ +/* +* $Id: eiffel.c,v 1.18 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Eiffel language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#ifdef TYPE_REFERENCE_TOOL +#include +#endif +#include +#include +#include /* to define tolower () */ +#include + +#include "debug.h" +#include "keyword.h" +#include "routines.h" +#include "vstring.h" +#ifndef TYPE_REFERENCE_TOOL +#include "entry.h" +#include "options.h" +#include "parse.h" +#include "read.h" +#endif + +/* +* MACROS +*/ +#define isident(c) (isalnum(c) || (c) == '_') +#define isFreeOperatorChar(c) ((c) == '@' || (c) == '#' || \ + (c) == '|' || (c) == '&') +#define isType(token,t) (boolean) ((token)->type == (t)) +#define isKeyword(token,k) (boolean) ((token)->keyword == (k)) + +/* +* DATA DECLARATIONS +*/ + +typedef enum eException { ExceptionNone, ExceptionEOF } exception_t; + +/* Used to specify type of keyword. + */ +typedef enum eKeywordId { + KEYWORD_NONE = -1, + KEYWORD_alias, KEYWORD_all, KEYWORD_and, KEYWORD_as, KEYWORD_check, + KEYWORD_class, KEYWORD_create, KEYWORD_creation, KEYWORD_Current, + KEYWORD_debug, KEYWORD_deferred, KEYWORD_do, KEYWORD_else, + KEYWORD_elseif, KEYWORD_end, KEYWORD_ensure, KEYWORD_expanded, + KEYWORD_export, KEYWORD_external, KEYWORD_false, KEYWORD_feature, + KEYWORD_from, KEYWORD_frozen, KEYWORD_if, KEYWORD_implies, + KEYWORD_indexing, KEYWORD_infix, KEYWORD_inherit, KEYWORD_inspect, + KEYWORD_invariant, KEYWORD_is, KEYWORD_like, KEYWORD_local, + KEYWORD_loop, KEYWORD_not, KEYWORD_obsolete, KEYWORD_old, KEYWORD_once, + KEYWORD_or, KEYWORD_prefix, KEYWORD_redefine, KEYWORD_rename, + KEYWORD_require, KEYWORD_rescue, KEYWORD_Result, KEYWORD_retry, + KEYWORD_select, KEYWORD_separate, KEYWORD_strip, KEYWORD_then, + KEYWORD_true, KEYWORD_undefine, KEYWORD_unique, KEYWORD_until, + KEYWORD_variant, KEYWORD_when, KEYWORD_xor +} keywordId; + +/* Used to determine whether keyword is valid for the token language and + * what its ID is. + */ +typedef struct sKeywordDesc { + const char *name; + keywordId id; +} keywordDesc; + +typedef enum eTokenType { + TOKEN_UNDEFINED, + TOKEN_BANG, + TOKEN_CHARACTER, + TOKEN_CLOSE_BRACE, + TOKEN_CLOSE_BRACKET, + TOKEN_CLOSE_PAREN, + TOKEN_COLON, + TOKEN_COMMA, + TOKEN_CONSTRAINT, + TOKEN_DOT, + TOKEN_DOLLAR, + TOKEN_IDENTIFIER, + TOKEN_KEYWORD, + TOKEN_NUMERIC, + TOKEN_OPEN_BRACE, + TOKEN_OPEN_BRACKET, + TOKEN_OPEN_PAREN, + TOKEN_OPERATOR, + TOKEN_OTHER, + TOKEN_SEPARATOR, + TOKEN_STRING, + TOKEN_TILDE +} tokenType; + +typedef struct sTokenInfo { + tokenType type; + keywordId keyword; + boolean isExported; + vString* string; + vString* className; + vString* featureName; +} tokenInfo; + +/* +* DATA DEFINITIONS +*/ + +static langType Lang_eiffel; + +#ifdef TYPE_REFERENCE_TOOL + +static const char *FileName; +static FILE *File; +static int PrintClass; +static int PrintReferences; +static int SelfReferences; +static int Debug; +static stringList *GenericNames; +static stringList *ReferencedTypes; + +#else + +typedef enum { + EKIND_CLASS, EKIND_FEATURE, EKIND_LOCAL, EKIND_QUALIFIED_TAGS +} eiffelKind; + +static kindOption EiffelKinds [] = { + { TRUE, 'c', "class", "classes"}, + { TRUE, 'f', "feature", "features"}, + { FALSE, 'l', "local", "local entities"} +}; + +#endif + +static langType Lang_eiffel; + +static jmp_buf Exception; + +static const keywordDesc EiffelKeywordTable [] = { + /* keyword keyword ID */ + { "alias", KEYWORD_alias }, + { "all", KEYWORD_all }, + { "and", KEYWORD_and }, + { "as", KEYWORD_as }, + { "check", KEYWORD_check }, + { "class", KEYWORD_class }, + { "create", KEYWORD_create }, + { "creation", KEYWORD_creation }, + { "current", KEYWORD_Current }, + { "debug", KEYWORD_debug }, + { "deferred", KEYWORD_deferred }, + { "do", KEYWORD_do }, + { "else", KEYWORD_else }, + { "elseif", KEYWORD_elseif }, + { "end", KEYWORD_end }, + { "ensure", KEYWORD_ensure }, + { "expanded", KEYWORD_expanded }, + { "export", KEYWORD_export }, + { "external", KEYWORD_external }, + { "false", KEYWORD_false }, + { "feature", KEYWORD_feature }, + { "from", KEYWORD_from }, + { "frozen", KEYWORD_frozen }, + { "if", KEYWORD_if }, + { "implies", KEYWORD_implies }, + { "indexing", KEYWORD_indexing }, + { "infix", KEYWORD_infix }, + { "inherit", KEYWORD_inherit }, + { "inspect", KEYWORD_inspect }, + { "invariant", KEYWORD_invariant }, + { "is", KEYWORD_is }, + { "like", KEYWORD_like }, + { "local", KEYWORD_local }, + { "loop", KEYWORD_loop }, + { "not", KEYWORD_not }, + { "obsolete", KEYWORD_obsolete }, + { "old", KEYWORD_old }, + { "once", KEYWORD_once }, + { "or", KEYWORD_or }, + { "prefix", KEYWORD_prefix }, + { "redefine", KEYWORD_redefine }, + { "rename", KEYWORD_rename }, + { "require", KEYWORD_require }, + { "rescue", KEYWORD_rescue }, + { "result", KEYWORD_Result }, + { "retry", KEYWORD_retry }, + { "select", KEYWORD_select }, + { "separate", KEYWORD_separate }, + { "strip", KEYWORD_strip }, + { "then", KEYWORD_then }, + { "true", KEYWORD_true }, + { "undefine", KEYWORD_undefine }, + { "unique", KEYWORD_unique }, + { "until", KEYWORD_until }, + { "variant", KEYWORD_variant }, + { "when", KEYWORD_when }, + { "xor", KEYWORD_xor } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static void buildEiffelKeywordHash (void) +{ + const size_t count = sizeof (EiffelKeywordTable) / + sizeof (EiffelKeywordTable [0]); + size_t i; + for (i = 0 ; i < count ; ++i) + { + const keywordDesc* const p = &EiffelKeywordTable [i]; + addKeyword (p->name, Lang_eiffel, (int) p->id); + } +} + +#ifdef TYPE_REFERENCE_TOOL + +static void addGenericName (tokenInfo *const token) +{ + vStringUpper (token->string); + if (vStringLength (token->string) > 0) + stringListAdd (GenericNames, vStringNewCopy (token->string)); +} + +static boolean isGeneric (tokenInfo *const token) +{ + return (boolean) stringListHas (GenericNames, vStringValue (token->string)); +} + +static void reportType (tokenInfo *const token) +{ + vStringUpper (token->string); + if (vStringLength (token->string) > 0 && ! isGeneric (token) && + (SelfReferences || strcmp (vStringValue ( + token->string), vStringValue (token->className)) != 0) && + ! stringListHas (ReferencedTypes, vStringValue (token->string))) + { + printf ("%s\n", vStringValue (token->string)); + stringListAdd (ReferencedTypes, vStringNewCopy (token->string)); + } +} + +static int fileGetc (void) +{ + int c = getc (File); + if (c == '\r') + { + c = getc (File); + if (c != '\n') + { + ungetc (c, File); + c = '\n'; + } + } + if (Debug > 0 && c != EOF) + putc (c, errout); + return c; +} + +static int fileUngetc (c) +{ + return ungetc (c, File); +} + +extern char *readLine (vString *const vLine, FILE *const fp) +{ + return NULL; +} + +#else + +/* +* Tag generation functions +*/ + +static void makeEiffelClassTag (tokenInfo *const token) +{ + if (EiffelKinds [EKIND_CLASS].enabled) + { + const char *const name = vStringValue (token->string); + tagEntryInfo e; + + initTagEntry (&e, name); + + e.kindName = EiffelKinds [EKIND_CLASS].name; + e.kind = EiffelKinds [EKIND_CLASS].letter; + + makeTagEntry (&e); + } + vStringCopy (token->className, token->string); +} + +static void makeEiffelFeatureTag (tokenInfo *const token) +{ + if (EiffelKinds [EKIND_FEATURE].enabled && + (token->isExported || Option.include.fileScope)) + { + const char *const name = vStringValue (token->string); + tagEntryInfo e; + + initTagEntry (&e, name); + + e.isFileScope = (boolean) (! token->isExported); + e.kindName = EiffelKinds [EKIND_FEATURE].name; + e.kind = EiffelKinds [EKIND_FEATURE].letter; + e.extensionFields.scope [0] = EiffelKinds [EKIND_CLASS].name; + e.extensionFields.scope [1] = vStringValue (token->className); + + makeTagEntry (&e); + + if (Option.include.qualifiedTags) + { + vString* qualified = vStringNewInit (vStringValue (token->className)); + vStringPut (qualified, '.'); + vStringCat (qualified, token->string); + e.name = vStringValue (qualified); + makeTagEntry (&e); + vStringDelete (qualified); + } + } + vStringCopy (token->featureName, token->string); +} + +static void makeEiffelLocalTag (tokenInfo *const token) +{ + if (EiffelKinds [EKIND_LOCAL].enabled && Option.include.fileScope) + { + const char *const name = vStringValue (token->string); + vString* scope = vStringNew (); + tagEntryInfo e; + + initTagEntry (&e, name); + + e.isFileScope = TRUE; + e.kindName = EiffelKinds [EKIND_LOCAL].name; + e.kind = EiffelKinds [EKIND_LOCAL].letter; + + vStringCopy (scope, token->className); + vStringPut (scope, '.'); + vStringCat (scope, token->featureName); + + e.extensionFields.scope [0] = EiffelKinds [EKIND_FEATURE].name; + e.extensionFields.scope [1] = vStringValue (scope); + + makeTagEntry (&e); + vStringDelete (scope); + } +} + +#endif + +/* +* Parsing functions +*/ + +static int skipToCharacter (const int c) +{ + int d; + + do + { + d = fileGetc (); + } while (d != EOF && d != c); + + return d; +} + +/* If a numeric is passed in 'c', this is used as the first digit of the + * numeric being parsed. + */ +static vString *parseInteger (int c) +{ + static vString *string = NULL; + + if (string == NULL) + string = vStringNew (); + vStringClear (string); + + if (c == '\0') + c = fileGetc (); + if (c == '-') + { + vStringPut (string, c); + c = fileGetc (); + } + else if (! isdigit (c)) + c = fileGetc (); + while (c != EOF && (isdigit (c) || c == '_')) + { + vStringPut (string, c); + c = fileGetc (); + } + vStringTerminate (string); + fileUngetc (c); + + return string; +} + +static vString *parseNumeric (int c) +{ + static vString *string = NULL; + + if (string == NULL) + string = vStringNew (); + vStringCopy (string, parseInteger (c)); + + c = fileGetc (); + if (c == '.') + { + vStringPut (string, c); + vStringCat (string, parseInteger ('\0')); + c = fileGetc (); + } + if (tolower (c) == 'e') + { + vStringPut (string, c); + vStringCat (string, parseInteger ('\0')); + } + else if (!isspace (c)) + fileUngetc (c); + + vStringTerminate (string); + + return string; +} + +static int parseEscapedCharacter (void) +{ + int d = '\0'; + int c = fileGetc (); + + switch (c) + { + case 'A': d = '@'; break; + case 'B': d = '\b'; break; + case 'C': d = '^'; break; + case 'D': d = '$'; break; + case 'F': d = '\f'; break; + case 'H': d = '\\'; break; + case 'L': d = '~'; break; + case 'N': d = '\n'; break; +#ifdef QDOS + case 'Q': d = 0x9F; break; +#else + case 'Q': d = '`'; break; +#endif + case 'R': d = '\r'; break; + case 'S': d = '#'; break; + case 'T': d = '\t'; break; + case 'U': d = '\0'; break; + case 'V': d = '|'; break; + case '%': d = '%'; break; + case '\'': d = '\''; break; + case '"': d = '"'; break; + case '(': d = '['; break; + case ')': d = ']'; break; + case '<': d = '{'; break; + case '>': d = '}'; break; + + case '\n': skipToCharacter ('%'); break; + + case '/': + { + vString *string = parseInteger ('\0'); + const char *value = vStringValue (string); + const unsigned long ascii = atol (value); + + c = fileGetc (); + if (c == '/' && ascii < 256) + d = ascii; + break; + } + + default: break; + } + return d; +} + +static int parseCharacter (void) +{ + int c = fileGetc (); + int result = c; + + if (c == '%') + result = parseEscapedCharacter (); + + c = fileGetc (); + if (c != '\'') + skipToCharacter ('\n'); + + return result; +} + +static void parseString (vString *const string) +{ + boolean verbatim = FALSE; + boolean align = FALSE; + boolean end = FALSE; + vString *verbatimCloser = NULL; + vString *lastLine = NULL; + int prev = '\0'; + int c; + + while (! end) + { + c = fileGetc (); + if (c == EOF) + end = TRUE; + else if (c == '"') + { + if (! verbatim) + end = TRUE; + else + end = (boolean) (strcmp (vStringValue (lastLine), + vStringValue (verbatimCloser)) == 0); + } + else if (c == '\n') + { + if (verbatim) + vStringClear (lastLine); + if (prev == '[' /* || prev == '{' */) + { + verbatim = TRUE; + verbatimCloser = vStringNew (); + lastLine = vStringNew (); + if (prev == '{') + vStringPut (verbatimCloser, '}'); + else + { + vStringPut (verbatimCloser, ']'); + align = TRUE; + } + vStringNCat (verbatimCloser, string, vStringLength (string) - 1); + vStringClear (string); + } + if (verbatim && align) + { + do + c = fileGetc (); + while (isspace (c)); + } + } + else if (c == '%') + c = parseEscapedCharacter (); + if (! end) + { + vStringPut (string, c); + if (verbatim) + { + vStringPut (lastLine, c); + vStringTerminate (lastLine); + } + prev = c; + } + } + vStringTerminate (string); +} + +/* Read a C identifier beginning with "firstChar" and places it into "name". + */ +static void parseIdentifier (vString *const string, const int firstChar) +{ + int c = firstChar; + + do + { + vStringPut (string, c); + c = fileGetc (); + } while (isident (c)); + + vStringTerminate (string); + if (!isspace (c)) + fileUngetc (c); /* unget non-identifier character */ +} + +static void parseFreeOperator (vString *const string, const int firstChar) +{ + int c = firstChar; + + do + { + vStringPut (string, c); + c = fileGetc (); + } while (c > ' '); + + vStringTerminate (string); + if (!isspace (c)) + fileUngetc (c); /* unget non-identifier character */ +} + +static keywordId analyzeToken (vString *const name) +{ + static vString *keyword = NULL; + keywordId id; + + if (keyword == NULL) + keyword = vStringNew (); + vStringCopyToLower (keyword, name); + id = (keywordId) lookupKeyword (vStringValue (keyword), Lang_eiffel); + + return id; +} + +static void readToken (tokenInfo *const token) +{ + int c; + + token->type = TOKEN_UNDEFINED; + token->keyword = KEYWORD_NONE; + vStringClear (token->string); + +getNextChar: + + do + c = fileGetc (); + while (c == '\t' || c == ' ' || c == '\n'); + + switch (c) + { + case EOF: longjmp (Exception, (int)ExceptionEOF); break; + case '!': token->type = TOKEN_BANG; break; + case '$': token->type = TOKEN_DOLLAR; break; + case '(': token->type = TOKEN_OPEN_PAREN; break; + case ')': token->type = TOKEN_CLOSE_PAREN; break; + case ',': token->type = TOKEN_COMMA; break; + case '.': token->type = TOKEN_DOT; break; + case ';': goto getNextChar; + case '[': token->type = TOKEN_OPEN_BRACKET; break; + case ']': token->type = TOKEN_CLOSE_BRACKET; break; + case '{': token->type = TOKEN_OPEN_BRACE; break; + case '}': token->type = TOKEN_CLOSE_BRACE; break; + case '~': token->type = TOKEN_TILDE; break; + + + case '+': + case '*': + case '^': + case '=': token->type = TOKEN_OPERATOR; break; + + case '-': + c = fileGetc (); + if (c == '>') + token->type = TOKEN_CONSTRAINT; + else if (c == '-') /* is this the start of a comment? */ + { + skipToCharacter ('\n'); + goto getNextChar; + } + else + { + if (!isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + } + break; + + case '?': + case ':': + c = fileGetc (); + if (c == '=') + token->type = TOKEN_OPERATOR; + else + { + token->type = TOKEN_COLON; + if (!isspace (c)) + fileUngetc (c); + } + break; + + case '<': + c = fileGetc (); + if (c != '=' && c != '>' && !isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + break; + + case '>': + c = fileGetc (); + if (c != '=' && c != '>' && !isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + break; + + case '/': + c = fileGetc (); + if (c != '/' && c != '=' && !isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + break; + + case '\\': + c = fileGetc (); + if (c != '\\' && !isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + break; + + case '"': + token->type = TOKEN_STRING; + parseString (token->string); + break; + + case '\'': + token->type = TOKEN_CHARACTER; + parseCharacter (); + break; + + default: + if (isalpha (c)) + { + parseIdentifier (token->string, c); + token->keyword = analyzeToken (token->string); + if (isKeyword (token, KEYWORD_NONE)) + token->type = TOKEN_IDENTIFIER; + else + token->type = TOKEN_KEYWORD; + } + else if (isdigit (c)) + { + vStringCat (token->string, parseNumeric (c)); + token->type = TOKEN_NUMERIC; + } + else if (isFreeOperatorChar (c)) + { + parseFreeOperator (token->string, c); + token->type = TOKEN_OPERATOR; + } + else + { + token->type = TOKEN_UNDEFINED; + Assert (! isType (token, TOKEN_UNDEFINED)); + } + break; + } +} + +/* +* Scanning functions +*/ + +static boolean isIdentifierMatch ( + const tokenInfo *const token, const char *const name) +{ + return (boolean) (isType (token, TOKEN_IDENTIFIER) && + strcasecmp (vStringValue (token->string), name) == 0); +} + +static void findToken (tokenInfo *const token, const tokenType type) +{ + while (! isType (token, type)) + readToken (token); +} + +static void findKeyword (tokenInfo *const token, const keywordId keyword) +{ + while (! isKeyword (token, keyword)) + readToken (token); +} + +static void parseGeneric (tokenInfo *const token, boolean declaration __unused__) +{ + unsigned int depth = 0; +#ifdef TYPE_REFERENCE_TOOL + boolean constraint = FALSE; +#endif + Assert (isType (token, TOKEN_OPEN_BRACKET)); + do + { + if (isType (token, TOKEN_OPEN_BRACKET)) + ++depth; + else if (isType (token, TOKEN_CLOSE_BRACKET)) + --depth; +#ifdef TYPE_REFERENCE_TOOL + else if (declaration) + { + if (depth == 1) + { + if (isType (token, TOKEN_CONSTRAINT)) + constraint = TRUE; + else if (isKeyword (token, KEYWORD_create)) + findKeyword (token, KEYWORD_end); + else if (isType (token, TOKEN_IDENTIFIER)) + { + if (constraint) + reportType (token); + else + addGenericName (token); + constraint = FALSE; + } + } + else if (isKeyword (token, KEYWORD_like)) + readToken (token); + else if (isType (token, TOKEN_IDENTIFIER)) + reportType (token); + } + else + { + if (isType (token, TOKEN_OPEN_BRACKET)) + ++depth; + else if (isType (token, TOKEN_IDENTIFIER)) + reportType (token); + else if (isKeyword (token, KEYWORD_like)) + readToken (token); + } +#endif + readToken (token); + } while (depth > 0); +} + +static void parseType (tokenInfo *const token) +{ + boolean bitType; + Assert (isType (token, TOKEN_IDENTIFIER)); +#ifdef TYPE_REFERENCE_TOOL + reportType (token); +#endif + bitType = (boolean)(strcmp ("BIT", vStringValue (token->string)) == 0); + readToken (token); + if (bitType && isType (token, TOKEN_NUMERIC)) + readToken (token); + else if (isType (token, TOKEN_OPEN_BRACKET)) + parseGeneric (token, FALSE); +} + +static void parseEntityType (tokenInfo *const token) +{ + Assert (isType (token, TOKEN_COLON)); + readToken (token); + + if (isKeyword (token, KEYWORD_expanded)) + readToken (token); + + /* Skip over the type name, with possible generic parameters. + */ + if (isType (token, TOKEN_IDENTIFIER)) + parseType (token); + else if (isKeyword (token, KEYWORD_like)) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER) || + isKeyword (token, KEYWORD_Current)) + readToken (token); + } +} + + +static void parseLocal (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_local)); + readToken (token); + + /* Check keyword first in case local clause is empty + */ + while (! isKeyword (token, KEYWORD_do) && + ! isKeyword (token, KEYWORD_once)) + { +#ifndef TYPE_REFERENCE_TOOL + if (isType (token, TOKEN_IDENTIFIER)) + makeEiffelLocalTag (token); +#endif + readToken (token); + if (isType (token, TOKEN_COLON)) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + parseType (token); + } + } +} + +static void findFeatureEnd (tokenInfo *const token) +{ + readToken (token); + + switch (token->keyword) + { + default: + if (isType (token, TOKEN_OPERATOR)) /* sign of manifest constant */ + readToken (token); + readToken (token); /* skip to next token after constant */ + break; + + case KEYWORD_deferred: + case KEYWORD_do: + case KEYWORD_external: + case KEYWORD_local: + case KEYWORD_obsolete: + case KEYWORD_once: + case KEYWORD_require: + { + int depth = 1; + + while (depth > 0) + { +#ifdef TYPE_REFERENCE_TOOL + if (isType (token, TOKEN_OPEN_BRACE)) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + parseType (token); + } + else if (isType (token, TOKEN_BANG)) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + parseType (token); + if (isType (token, TOKEN_BANG)) + readToken (token); + } + else +#endif + switch (token->keyword) + { + case KEYWORD_check: + case KEYWORD_debug: + case KEYWORD_from: + case KEYWORD_if: + case KEYWORD_inspect: + ++depth; + break; + + case KEYWORD_local: + parseLocal (token); + break; + + case KEYWORD_end: + --depth; + break; + + default: + break; + } + readToken (token); + } + break; + } + } +} + +static boolean readFeatureName (tokenInfo *const token) +{ + boolean isFeatureName = FALSE; + + if (isKeyword (token, KEYWORD_frozen)) + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + isFeatureName = TRUE; + else if (isKeyword (token, KEYWORD_infix) || + isKeyword (token, KEYWORD_prefix)) + { + readToken (token); + if (isType (token, TOKEN_STRING)) + isFeatureName = TRUE; + } + return isFeatureName; +} + +static void parseArguments (tokenInfo *const token) +{ +#ifndef TYPE_REFERENCE_TOOL + findToken (token, TOKEN_CLOSE_PAREN); + readToken (token); +#else + Assert (isType (token, TOKEN_OPEN_PAREN)); + readToken (token); + do + { + if (! isType (token, TOKEN_COLON)) + readToken (token); + else + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + parseType (token); + } + } while (! isType (token, TOKEN_CLOSE_PAREN)); + readToken (token); +#endif +} + +static boolean parseFeature (tokenInfo *const token) +{ + boolean found = FALSE; + while (readFeatureName (token)) + { + found = TRUE; +#ifndef TYPE_REFERENCE_TOOL + makeEiffelFeatureTag (token); +#endif + readToken (token); + if (isType (token, TOKEN_COMMA)) + readToken (token); + } + if (found) + { + if (isType (token, TOKEN_OPEN_PAREN)) /* arguments? */ + parseArguments (token); + if (isType (token, TOKEN_COLON)) /* a query? */ + parseEntityType (token); + if (isKeyword (token, KEYWORD_obsolete)) + { + readToken (token); + if (isType (token, TOKEN_STRING)) + readToken (token); + } + if (isKeyword (token, KEYWORD_is)) + findFeatureEnd (token); + } + return found; +} + +static void parseExport (tokenInfo *const token) +{ + token->isExported = TRUE; + readToken (token); + if (isType (token, TOKEN_OPEN_BRACE)) + { + token->isExported = FALSE; + while (! isType (token, TOKEN_CLOSE_BRACE)) + { + if (isType (token, TOKEN_IDENTIFIER)) + token->isExported |= !isIdentifierMatch (token, "NONE"); + readToken (token); + } + readToken (token); + } +} + +static void parseFeatureClauses (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_feature)); + do + { + if (isKeyword (token, KEYWORD_feature)) + parseExport (token); + if (! isKeyword (token, KEYWORD_feature) && + ! isKeyword (token, KEYWORD_invariant) && + ! isKeyword (token, KEYWORD_indexing)) + { + if (! parseFeature (token)) + readToken (token); + } + } while (! isKeyword (token, KEYWORD_end) && + ! isKeyword (token, KEYWORD_invariant) && + ! isKeyword (token, KEYWORD_indexing)); +} + +static void parseRename (tokenInfo *const token) +{ + do { + readToken (token); + if (readFeatureName (token)) + { + readToken (token); + if (isKeyword (token, KEYWORD_as)) + { + readToken (token); + if (readFeatureName (token)) + { +#ifndef TYPE_REFERENCE_TOOL + makeEiffelFeatureTag (token); /* renamed feature */ +#endif + readToken (token); + } + } + } + } while (isType (token, TOKEN_COMMA)); + + findKeyword (token, KEYWORD_end); + readToken (token); +} + + +static void parseInherit (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_inherit)); +#ifdef TYPE_REFERENCE_TOOL + readToken (token); + while (isType (token, TOKEN_IDENTIFIER)) + { + parseType (token); + if (isType (token, TOKEN_KEYWORD)) + { + switch (token->keyword) /* check for feature adaptation */ + { + case KEYWORD_rename: + case KEYWORD_export: + case KEYWORD_undefine: + case KEYWORD_redefine: + case KEYWORD_select: + findKeyword (token, KEYWORD_end); + readToken (token); + default: break; + } + } + } +#else + readToken (token); + while (isType (token, TOKEN_IDENTIFIER)) + { + parseType (token); + switch (token->keyword) /* check for feature adaptation */ + { + case KEYWORD_rename: + parseRename (token); + if (isKeyword (token, KEYWORD_end)) + readToken (token); + break; + + case KEYWORD_export: + case KEYWORD_undefine: + case KEYWORD_redefine: + case KEYWORD_select: + findKeyword (token, KEYWORD_end); + readToken (token); + break; + + case KEYWORD_end: + readToken (token); + break; + + default: break; + } + } +#endif +} + +static void parseClass (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_class)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + { +#ifndef TYPE_REFERENCE_TOOL + makeEiffelClassTag (token); + readToken (token); +#else + vStringCopy (token->className, token->string); + vStringUpper (token->className); + if (PrintClass) + puts (vStringValue (token->className)); + if (! PrintReferences) + exit (0); + readToken (token); +#endif + } + + do + { + if (isType (token, TOKEN_OPEN_BRACKET)) + parseGeneric (token, TRUE); + else if (! isType (token, TOKEN_KEYWORD)) + readToken (token); + else switch (token->keyword) + { + case KEYWORD_inherit: parseInherit (token); break; + case KEYWORD_feature: parseFeatureClauses (token); break; + default: readToken (token); break; + } + } while (! isKeyword (token, KEYWORD_end)); +} + +static tokenInfo *newToken (void) +{ + tokenInfo *const token = xMalloc (1, tokenInfo); + + token->type = TOKEN_UNDEFINED; + token->keyword = KEYWORD_NONE; + token->isExported = TRUE; + + token->string = vStringNew (); + token->className = vStringNew (); + token->featureName = vStringNew (); + + return token; +} + +static void deleteToken (tokenInfo *const token) +{ + vStringDelete (token->string); + vStringDelete (token->className); + vStringDelete (token->featureName); + + eFree (token); +} + +static void initialize (const langType language) +{ + Lang_eiffel = language; + buildEiffelKeywordHash (); +} + +static void findEiffelTags (void) +{ + tokenInfo *const token = newToken (); + exception_t exception; + + exception = (exception_t) (setjmp (Exception)); + while (exception == ExceptionNone) + { + findKeyword (token, KEYWORD_class); + parseClass (token); + } + deleteToken (token); +} + +#ifndef TYPE_REFERENCE_TOOL + +extern parserDefinition* EiffelParser (void) +{ + static const char *const extensions [] = { "e", NULL }; + parserDefinition* def = parserNew ("Eiffel"); + def->kinds = EiffelKinds; + def->kindCount = KIND_COUNT (EiffelKinds); + def->extensions = extensions; + def->parser = findEiffelTags; + def->initialize = initialize; + return def; +} + +#else + +static void findReferences (void) +{ + ReferencedTypes = stringListNew (); + GenericNames = stringListNew (); + initialize (0); + + findEiffelTags (); + + stringListDelete (GenericNames); + GenericNames = NULL; + stringListDelete (ReferencedTypes); + ReferencedTypes = NULL; +} + +static const char *const Usage = + "Prints names of types referenced by an Eiffel language file.\n" + "\n" + "Usage: %s [-cdrs] [file_name | -]\n" + "\n" + "Options:\n" + " -c Print class name of current file (on first line of output).\n" + " -d Enable debug output.\n" + " -r Print types referenced by current file (default unless -c).\n" + " -s Include self-references.\n" + "\n"; + +extern int main (int argc, char** argv) +{ + int i; + for (i = 1 ; argv [i] != NULL ; ++i) + { + const char *const arg = argv [i]; + if (arg [0] == '-') + { + int j; + if (arg [1] == '\0') + { + File = stdin; + FileName = "stdin"; + } + else for (j = 1 ; arg [j] != '\0' ; ++j) switch (arg [j]) + { + case 'c': PrintClass = 1; break; + case 'r': PrintReferences = 1; break; + case 's': SelfReferences = 1; break; + case 'd': Debug = 1; break; + default: + fprintf (errout, "%s: unknown option: %c\n", argv [0], arg [1]); + fprintf (errout, Usage, argv [0]); + exit (1); + break; + } + } + else if (File != NULL) + { + fprintf (errout, Usage, argv [0]); + exit (1); + } + else + { + FileName = arg; + File = fopen (FileName, "r"); + if (File == NULL) + { + perror (argv [0]); + exit (1); + } + } + } + if (! PrintClass) + PrintReferences = 1; + if (File == NULL) + { + fprintf (errout, Usage, argv [0]); + exit (1); + } + else + { + findReferences (); + fclose (File); + } + return 0; +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/entry.c b/sdk/ctags/entry.c new file mode 100644 index 0000000000..4d16fea13a --- /dev/null +++ b/sdk/ctags/entry.c @@ -0,0 +1,869 @@ +/* +* $Id: entry.c,v 1.11 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for creating tag entries. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include /* to define isspace () */ +#include + +#if defined (HAVE_SYS_TYPES_H) +# include /* to declare off_t on some hosts */ +#endif +#if defined (HAVE_TYPES_H) +# include /* to declare off_t on some hosts */ +#endif +#if defined (HAVE_UNISTD_H) +# include /* to declare close (), ftruncate (), truncate () */ +#endif + +/* These header files provide for the functions necessary to do file + * truncation. + */ +#ifdef HAVE_FCNTL_H +# include +#endif +#ifdef HAVE_IO_H +# include +#endif + +#include "debug.h" +#include "ctags.h" +#include "entry.h" +#include "main.h" +#include "options.h" +#include "read.h" +#include "routines.h" +#include "sort.h" +#include "strlist.h" + +/* +* MACROS +*/ +#define PSEUDO_TAG_PREFIX "!_" + +#define includeExtensionFlags() (Option.tagFileFormat > 1) + +/* + * Portability defines + */ +#if !defined(HAVE_TRUNCATE) && !defined(HAVE_FTRUNCATE) && !defined(HAVE_CHSIZE) +# define USE_REPLACEMENT_TRUNCATE +#endif + +/* Hack for rediculous practice of Microsoft Visual C++. + */ +#if defined (WIN32) && defined (_MSC_VER) +# define chsize _chsize +# define open _open +# define close _close +# define O_RDWR _O_RDWR +#endif + +/* +* DATA DEFINITIONS +*/ + +tagFile TagFile = { + NULL, /* tag file name */ + NULL, /* tag file directory (absolute) */ + NULL, /* file pointer */ + { 0, 0 }, /* numTags */ + { 0, 0, 0 }, /* max */ + { NULL, NULL, 0 }, /* etags */ + NULL /* vLine */ +}; + +static boolean TagsToStdout = FALSE; + +/* +* FUNCTION PROTOTYPES +*/ +#ifdef NEED_PROTO_TRUNCATE +extern int truncate (const char *path, off_t length); +#endif + +#ifdef NEED_PROTO_FTRUNCATE +extern int ftruncate (int fd, off_t length); +#endif + +/* +* FUNCTION DEFINITIONS +*/ + +extern void freeTagFileResources (void) +{ + if (TagFile.directory != NULL) + eFree (TagFile.directory); + vStringDelete (TagFile.vLine); +} + +extern const char *tagFileName (void) +{ + return TagFile.name; +} + +/* +* Pseudo tag support +*/ + +static void rememberMaxLengths (const size_t nameLength, const size_t lineLength) +{ + if (nameLength > TagFile.max.tag) + TagFile.max.tag = nameLength; + + if (lineLength > TagFile.max.line) + TagFile.max.line = lineLength; +} + +static void writePseudoTag ( + const char *const tagName, + const char *const fileName, + const char *const pattern) +{ + const int length = fprintf ( + TagFile.fp, "%s%s\t%s\t/%s/\n", + PSEUDO_TAG_PREFIX, tagName, fileName, pattern); + ++TagFile.numTags.added; + rememberMaxLengths (strlen (tagName), (size_t) length); +} + +static void addPseudoTags (void) +{ + if (! Option.xref) + { + char format [11]; + const char *formatComment = "unknown format"; + + sprintf (format, "%u", Option.tagFileFormat); + + if (Option.tagFileFormat == 1) + formatComment = "original ctags format"; + else if (Option.tagFileFormat == 2) + formatComment = + "extended format; --format=1 will not append ;\" to lines"; + + writePseudoTag ("TAG_FILE_FORMAT", format, formatComment); + writePseudoTag ("TAG_FILE_SORTED", + Option.sorted == SO_FOLDSORTED ? "2" : + (Option.sorted == SO_SORTED ? "1" : "0"), + "0=unsorted, 1=sorted, 2=foldcase"); + writePseudoTag ("TAG_PROGRAM_AUTHOR", AUTHOR_NAME, AUTHOR_EMAIL); + writePseudoTag ("TAG_PROGRAM_NAME", PROGRAM_NAME, ""); + writePseudoTag ("TAG_PROGRAM_URL", PROGRAM_URL, "official site"); + writePseudoTag ("TAG_PROGRAM_VERSION", PROGRAM_VERSION, ""); + } +} + +static void updateSortedFlag ( + const char *const line, FILE *const fp, fpos_t startOfLine) +{ + const char *const tab = strchr (line, '\t'); + + if (tab != NULL) + { + const long boolOffset = tab - line + 1; /* where it should be */ + + if (line [boolOffset] == '0' || line [boolOffset] == '1') + { + fpos_t nextLine; + + if (fgetpos (fp, &nextLine) == -1 || fsetpos (fp, &startOfLine) == -1) + error (WARNING, "Failed to update 'sorted' pseudo-tag"); + else + { + fpos_t flagLocation; + int c, d; + + do + c = fgetc (fp); + while (c != '\t' && c != '\n'); + fgetpos (fp, &flagLocation); + d = fgetc (fp); + if (c == '\t' && (d == '0' || d == '1') && + d != (int) Option.sorted) + { + fsetpos (fp, &flagLocation); + fputc (Option.sorted == SO_FOLDSORTED ? '2' : + (Option.sorted == SO_SORTED ? '1' : '0'), fp); + } + fsetpos (fp, &nextLine); + } + } + } +} + +/* Look through all line beginning with "!_TAG_FILE", and update those which + * require it. + */ +static long unsigned int updatePseudoTags (FILE *const fp) +{ + enum { maxEntryLength = 20 }; + char entry [maxEntryLength + 1]; + unsigned long linesRead = 0; + fpos_t startOfLine; + size_t entryLength; + const char *line; + + sprintf (entry, "%sTAG_FILE", PSEUDO_TAG_PREFIX); + entryLength = strlen (entry); + Assert (entryLength < maxEntryLength); + + fgetpos (fp, &startOfLine); + line = readLine (TagFile.vLine, fp); + while (line != NULL && line [0] == entry [0]) + { + ++linesRead; + if (strncmp (line, entry, entryLength) == 0) + { + char tab, classType [16]; + + if (sscanf (line + entryLength, "%15s%c", classType, &tab) == 2 && + tab == '\t') + { + if (strcmp (classType, "_SORTED") == 0) + updateSortedFlag (line, fp, startOfLine); + } + fgetpos (fp, &startOfLine); + } + line = readLine (TagFile.vLine, fp); + } + while (line != NULL) /* skip to end of file */ + { + ++linesRead; + line = readLine (TagFile.vLine, fp); + } + return linesRead; +} + +/* + * Tag file management + */ + +static boolean isValidTagAddress (const char *const excmd) +{ + boolean isValid = FALSE; + + if (strchr ("/?", excmd [0]) != NULL) + isValid = TRUE; + else + { + char *address = xMalloc (strlen (excmd) + 1, char); + if (sscanf (excmd, "%[^;\n]", address) == 1 && + strspn (address,"0123456789") == strlen (address)) + isValid = TRUE; + eFree (address); + } + return isValid; +} + +static boolean isCtagsLine (const char *const line) +{ + enum fieldList { TAG, TAB1, SRC_FILE, TAB2, EXCMD, NUM_FIELDS }; + boolean ok = FALSE; /* we assume not unless confirmed */ + const size_t fieldLength = strlen (line) + 1; + char *const fields = xMalloc (NUM_FIELDS * fieldLength, char); + + if (fields == NULL) + error (FATAL, "Cannot analyze tag file"); + else + { +#define field(x) (fields + ((size_t) (x) * fieldLength)) + + const int numFields = sscanf ( + line, "%[^\t]%[\t]%[^\t]%[\t]%[^\r\n]", + field (TAG), field (TAB1), field (SRC_FILE), + field (TAB2), field (EXCMD)); + + /* There must be exactly five fields: two tab fields containing + * exactly one tab each, the tag must not begin with "#", and the + * file name should not end with ";", and the excmd must be + * accceptable. + * + * These conditions will reject tag-looking lines like: + * int a; + * #define LABEL + */ + if (numFields == NUM_FIELDS && + strlen (field (TAB1)) == 1 && + strlen (field (TAB2)) == 1 && + field (TAG) [0] != '#' && + field (SRC_FILE) [strlen (field (SRC_FILE)) - 1] != ';' && + isValidTagAddress (field (EXCMD))) + ok = TRUE; + + eFree (fields); + } + return ok; +} + +static boolean isEtagsLine (const char *const line) +{ + boolean result = FALSE; + if (line [0] == '\f') + result = (boolean) (line [1] == '\n' || line [1] == '\r'); + return result; +} + +static boolean isTagFile (const char *const filename) +{ + boolean ok = FALSE; /* we assume not unless confirmed */ + FILE *const fp = fopen (filename, "rb"); + + if (fp == NULL && errno == ENOENT) + ok = TRUE; + else if (fp != NULL) + { + const char *line = readLine (TagFile.vLine, fp); + + if (line == NULL) + ok = TRUE; + else + ok = (boolean) (isCtagsLine (line) || isEtagsLine (line)); + fclose (fp); + } + return ok; +} + +extern void copyBytes (FILE* const fromFp, FILE* const toFp, const long size) +{ + enum { BufferSize = 1000 }; + long toRead, numRead; + char* buffer = xMalloc (BufferSize, char); + long remaining = size; + do + { + toRead = (0 < remaining && remaining < BufferSize) ? + remaining : (long) BufferSize; + numRead = fread (buffer, (size_t) 1, (size_t) toRead, fromFp); + if (fwrite (buffer, (size_t)1, (size_t)numRead, toFp) < (size_t)numRead) + error (FATAL | PERROR, "cannot complete write"); + if (remaining > 0) + remaining -= numRead; + } while (numRead == toRead && remaining != 0); + eFree (buffer); +} + +extern void copyFile (const char *const from, const char *const to, const long size) +{ + FILE* const fromFp = fopen (from, "rb"); + if (fromFp == NULL) + error (FATAL | PERROR, "cannot open file to copy"); + else + { + FILE* const toFp = fopen (to, "wb"); + if (toFp == NULL) + error (FATAL | PERROR, "cannot open copy destination"); + else + { + copyBytes (fromFp, toFp, size); + fclose (toFp); + } + fclose (fromFp); + } +} + +extern void openTagFile (void) +{ + setDefaultTagFileName (); + TagsToStdout = isDestinationStdout (); + + if (TagFile.vLine == NULL) + TagFile.vLine = vStringNew (); + + /* Open the tags file. + */ + if (TagsToStdout) + TagFile.fp = tempFile ("w", &TagFile.name); + else + { + boolean fileExists; + + setDefaultTagFileName (); + TagFile.name = eStrdup (Option.tagFileName); + fileExists = doesFileExist (TagFile.name); + if (fileExists && ! isTagFile (TagFile.name)) + error (FATAL, + "\"%s\" doesn't look like a tag file; I refuse to overwrite it.", + TagFile.name); + + if (Option.etags) + { + if (Option.append && fileExists) + TagFile.fp = fopen (TagFile.name, "a+b"); + else + TagFile.fp = fopen (TagFile.name, "w+b"); + } + else + { + if (Option.append && fileExists) + { + TagFile.fp = fopen (TagFile.name, "r+"); + if (TagFile.fp != NULL) + { + TagFile.numTags.prev = updatePseudoTags (TagFile.fp); + fclose (TagFile.fp); + TagFile.fp = fopen (TagFile.name, "a+"); + } + } + else + { + TagFile.fp = fopen (TagFile.name, "w"); + if (TagFile.fp != NULL) + addPseudoTags (); + } + } + if (TagFile.fp == NULL) + { + error (FATAL | PERROR, "cannot open tag file"); + exit (1); + } + } + if (TagsToStdout) + TagFile.directory = eStrdup (CurrentDirectory); + else + TagFile.directory = absoluteDirname (TagFile.name); +} + +#ifdef USE_REPLACEMENT_TRUNCATE + +/* Replacement for missing library function. + */ +static int replacementTruncate (const char *const name, const long size) +{ + char *tempName = NULL; + FILE *fp = tempFile ("w", &tempName); + fclose (fp); + copyFile (name, tempName, size); + copyFile (tempName, name, WHOLE_FILE); + remove (tempName); + eFree (tempName); + + return 0; +} + +#endif + +static void sortTagFile (void) +{ + if (TagFile.numTags.added > 0L) + { + if (Option.sorted != SO_UNSORTED) + { + verbose ("sorting tag file\n"); +#ifdef EXTERNAL_SORT + externalSortTags (TagsToStdout); +#else + internalSortTags (TagsToStdout); +#endif + } + else if (TagsToStdout) + catFile (tagFileName ()); + } + if (TagsToStdout) + remove (tagFileName ()); /* remove temporary file */ +} + +static void resizeTagFile (const long newSize) +{ + int result; + +#ifdef USE_REPLACEMENT_TRUNCATE + result = replacementTruncate (TagFile.name, newSize); +#else +# ifdef HAVE_TRUNCATE + result = truncate (TagFile.name, (off_t) newSize); +# else + const int fd = open (TagFile.name, O_RDWR); + + if (fd == -1) + result = -1; + else + { +# ifdef HAVE_FTRUNCATE + result = ftruncate (fd, (off_t) newSize); +# else +# ifdef HAVE_CHSIZE + result = chsize (fd, newSize); +# endif +# endif + close (fd); + } +# endif +#endif + if (result == -1) + fprintf (errout, "Cannot shorten tag file: errno = %d\n", errno); +} + +static void writeEtagsIncludes (FILE *const fp) +{ + if (Option.etagsInclude) + { + unsigned int i; + for (i = 0 ; i < stringListCount (Option.etagsInclude) ; ++i) + { + vString *item = stringListItem (Option.etagsInclude, i); + fprintf (fp, "\f\n%s,include\n", vStringValue (item)); + } + } +} + +extern void closeTagFile (const boolean resize) +{ + long desiredSize, size; + + if (Option.etags) + writeEtagsIncludes (TagFile.fp); + desiredSize = ftell (TagFile.fp); + fseek (TagFile.fp, 0L, SEEK_END); + size = ftell (TagFile.fp); + fclose (TagFile.fp); + if (resize && desiredSize < size) + { + DebugStatement ( + debugPrintf (DEBUG_STATUS, "shrinking %s from %ld to %ld bytes\n", + TagFile.name, size, desiredSize); ) + resizeTagFile (desiredSize); + } + sortTagFile (); + eFree (TagFile.name); + TagFile.name = NULL; +} + +extern void beginEtagsFile (void) +{ + TagFile.etags.fp = tempFile ("w+b", &TagFile.etags.name); + TagFile.etags.byteCount = 0; +} + +extern void endEtagsFile (const char *const name) +{ + const char *line; + + fprintf (TagFile.fp, "\f\n%s,%ld\n", name, (long) TagFile.etags.byteCount); + if (TagFile.etags.fp != NULL) + { + rewind (TagFile.etags.fp); + while ((line = readLine (TagFile.vLine, TagFile.etags.fp)) != NULL) + fputs (line, TagFile.fp); + fclose (TagFile.etags.fp); + remove (TagFile.etags.name); + eFree (TagFile.etags.name); + TagFile.etags.fp = NULL; + TagFile.etags.name = NULL; + } +} + +/* + * Tag entry management + */ + +/* This function copies the current line out to a specified file. It has no + * effect on the fileGetc () function. During copying, any '\' characters + * are doubled and a leading '^' or trailing '$' is also quoted. End of line + * characters (line feed or carriage return) are dropped. + */ +static size_t writeSourceLine (FILE *const fp, const char *const line) +{ + size_t length = 0; + const char *p; + + /* Write everything up to, but not including, a line end character. + */ + for (p = line ; *p != '\0' ; ++p) + { + const int next = *(p + 1); + const int c = *p; + + if (c == CRETURN || c == NEWLINE) + break; + + /* If character is '\', or a terminal '$', then quote it. + */ + if (c == BACKSLASH || c == (Option.backward ? '?' : '/') || + (c == '$' && (next == NEWLINE || next == CRETURN))) + { + putc (BACKSLASH, fp); + ++length; + } + putc (c, fp); + ++length; + } + return length; +} + +/* Writes "line", stripping leading and duplicate white space. + */ +static size_t writeCompactSourceLine (FILE *const fp, const char *const line) +{ + boolean lineStarted = FALSE; + size_t length = 0; + const char *p; + int c; + + /* Write everything up to, but not including, the newline. + */ + for (p = line, c = *p ; c != NEWLINE && c != '\0' ; c = *++p) + { + if (lineStarted || ! isspace (c)) /* ignore leading spaces */ + { + lineStarted = TRUE; + if (isspace (c)) + { + int next; + + /* Consume repeating white space. + */ + while (next = *(p+1) , isspace (next) && next != NEWLINE) + ++p; + c = ' '; /* force space character for any white space */ + } + if (c != CRETURN || *(p + 1) != NEWLINE) + { + putc (c, fp); + ++length; + } + } + } + return length; +} + +static int writeXrefEntry (const tagEntryInfo *const tag) +{ + const char *const line = + readSourceLine (TagFile.vLine, tag->filePosition, NULL); + int length; + + if (Option.tagFileFormat == 1) + length = fprintf (TagFile.fp, "%-16s %4lu %-16s ", tag->name, + tag->lineNumber, tag->sourceFileName); + else + length = fprintf (TagFile.fp, "%-16s %-10s %4lu %-16s ", tag->name, + tag->kindName, tag->lineNumber, tag->sourceFileName); + + length += writeCompactSourceLine (TagFile.fp, line); + putc (NEWLINE, TagFile.fp); + ++length; + + return length; +} + +/* Truncates the text line containing the tag at the character following the + * tag, providing a character which designates the end of the tag. + */ +static void truncateTagLine ( + char *const line, const char *const token, const boolean discardNewline) +{ + char *p = strstr (line, token); + + if (p != NULL) + { + p += strlen (token); + if (*p != '\0' && ! (*p == '\n' && discardNewline)) + ++p; /* skip past character terminating character */ + *p = '\0'; + } +} + +static int writeEtagsEntry (const tagEntryInfo *const tag) +{ + int length; + + if (tag->isFileEntry) + length = fprintf (TagFile.etags.fp, "\177%s\001%lu,0\n", + tag->name, tag->lineNumber); + else + { + long seekValue; + char *const line = + readSourceLine (TagFile.vLine, tag->filePosition, &seekValue); + + if (tag->truncateLine) + truncateTagLine (line, tag->name, TRUE); + else + line [strlen (line) - 1] = '\0'; + + length = fprintf (TagFile.etags.fp, "%s\177%s\001%lu,%ld\n", line, + tag->name, tag->lineNumber, seekValue); + } + TagFile.etags.byteCount += length; + + return length; +} + +static int addExtensionFields (const tagEntryInfo *const tag) +{ + const char* const kindKey = Option.extensionFields.kindKey ? "kind:" : ""; + boolean first = TRUE; + const char* separator = ";\""; + const char* const empty = ""; + int length = 0; +/* "sep" returns a value only the first time it is evaluated */ +#define sep (first ? (first = FALSE, separator) : empty) + + if (tag->kindName != NULL && (Option.extensionFields.kindLong || + (Option.extensionFields.kind && tag->kind == '\0'))) + length += fprintf (TagFile.fp,"%s\t%s%s", sep, kindKey, tag->kindName); + else if (tag->kind != '\0' && (Option.extensionFields.kind || + (Option.extensionFields.kindLong && tag->kindName == NULL))) + length += fprintf (TagFile.fp, "%s\t%s%c", sep, kindKey, tag->kind); + + if (Option.extensionFields.lineNumber) + length += fprintf (TagFile.fp, "%s\tline:%ld", sep, tag->lineNumber); + + if (Option.extensionFields.language && tag->language != NULL) + length += fprintf (TagFile.fp, "%s\tlanguage:%s", sep, tag->language); + + if (Option.extensionFields.scope && + tag->extensionFields.scope [0] != NULL && + tag->extensionFields.scope [1] != NULL) + length += fprintf (TagFile.fp, "%s\t%s:%s", sep, + tag->extensionFields.scope [0], + tag->extensionFields.scope [1]); + + if (Option.extensionFields.typeRef && + tag->extensionFields.typeRef [0] != NULL && + tag->extensionFields.typeRef [1] != NULL) + length += fprintf (TagFile.fp, "%s\ttyperef:%s:%s", sep, + tag->extensionFields.typeRef [0], + tag->extensionFields.typeRef [1]); + + if (Option.extensionFields.fileScope && tag->isFileScope) + length += fprintf (TagFile.fp, "%s\tfile:", sep); + + if (Option.extensionFields.inheritance && + tag->extensionFields.inheritance != NULL) + length += fprintf (TagFile.fp, "%s\tinherits:%s", sep, + tag->extensionFields.inheritance); + + if (Option.extensionFields.access && tag->extensionFields.access != NULL) + length += fprintf (TagFile.fp, "%s\taccess:%s", sep, + tag->extensionFields.access); + + if (Option.extensionFields.implementation && + tag->extensionFields.implementation != NULL) + length += fprintf (TagFile.fp, "%s\timplementation:%s", sep, + tag->extensionFields.implementation); + + if (Option.extensionFields.signature && + tag->extensionFields.signature != NULL) + length += fprintf (TagFile.fp, "%s\tsignature:%s", sep, + tag->extensionFields.signature); + + return length; +#undef sep +} + +static int writePatternEntry (const tagEntryInfo *const tag) +{ + int i=0; + int length = 0; + char *line = NULL; + const int searchChar = Option.backward ? '?' : '/'; + boolean newlineTerminated; + + //Eran Ifrah [PATCH START] + if (tag->hasTemplate) { + char *const line = readSourceLines(TagFile.vLine, tag->templatefilePosition, tag->filePosition); + + for(; ilength; i++){ + if(TagFile.vLine->buffer[i] == '\n'){ + TagFile.vLine->buffer[i] = ' '; + } + } + vStringCatS(TagFile.vLine, "\n"); + + newlineTerminated = (boolean) (line [strlen (line) - 1] == '\n'); + length += fprintf (TagFile.fp, "%c^", searchChar); + length += writeSourceLine (TagFile.fp, line); + length += fprintf (TagFile.fp, "%s%c", newlineTerminated ? "$":"", searchChar); + + return length; + //Eran Ifrah [PATCH END] + }else{ + char *const line = readSourceLine (TagFile.vLine, tag->filePosition, NULL); + if (tag->truncateLine) + truncateTagLine (line, tag->name, FALSE); + newlineTerminated = (boolean) (line [strlen (line) - 1] == '\n'); + + length += fprintf (TagFile.fp, "%c^", searchChar); + length += writeSourceLine (TagFile.fp, line); + length += fprintf (TagFile.fp, "%s%c", newlineTerminated ? "$":"", searchChar); + + return length; + } +} + +static int writeLineNumberEntry (const tagEntryInfo *const tag) +{ + return fprintf (TagFile.fp, "%lu", tag->lineNumber); +} + +static int writeCtagsEntry (const tagEntryInfo *const tag) +{ + int length = fprintf (TagFile.fp, "%s\t%s\t", + tag->name, tag->sourceFileName); + + if (tag->lineNumberEntry) + length += writeLineNumberEntry (tag); + else + length += writePatternEntry (tag); + + if (includeExtensionFlags ()) + length += addExtensionFields (tag); + + length += fprintf (TagFile.fp, "\n"); + + return length; +} + +extern void makeTagEntry (const tagEntryInfo *const tag) +{ + Assert (tag->name != NULL); + if (tag->name [0] == '\0') + error (WARNING, "ignoring null tag in %s", vStringValue (File.name)); + else + { + int length = 0; + + DebugStatement ( debugEntry (tag); ) + if (Option.xref) + { + if (! tag->isFileEntry) + length = writeXrefEntry (tag); + } + else if (Option.etags) + length = writeEtagsEntry (tag); + else + length = writeCtagsEntry (tag); + + ++TagFile.numTags.added; + rememberMaxLengths (strlen (tag->name), (size_t) length); + DebugStatement ( fflush (TagFile.fp); ) + } +} + +extern void initTagEntry (tagEntryInfo *const e, const char *const name) +{ + Assert (File.source.name != NULL); + memset (e, 0, sizeof (tagEntryInfo)); + e->lineNumberEntry = (boolean) (Option.locate == EX_LINENUM); + e->lineNumber = getSourceLineNumber (); + e->language = getSourceLanguageName (); + e->filePosition = getInputFilePosition (); + e->sourceFileName = getSourceFileTagPath (); + e->name = name; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/entry.h b/sdk/ctags/entry.h new file mode 100644 index 0000000000..cef4993bb6 --- /dev/null +++ b/sdk/ctags/entry.h @@ -0,0 +1,105 @@ +/* +* $Id: entry.h,v 1.5 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to entry.c +*/ +#ifndef _ENTRY_H +#define _ENTRY_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "vstring.h" + +/* +* MACROS +*/ +#define WHOLE_FILE -1L + +/* +* DATA DECLARATIONS +*/ + +/* Maintains the state of the tag file. + */ +typedef struct eTagFile { + char *name; + char *directory; + FILE *fp; + struct sNumTags { unsigned long added, prev; } numTags; + struct sMax { size_t line, tag, file; } max; + struct sEtags { + char *name; + FILE *fp; + size_t byteCount; + } etags; + vString *vLine; +} tagFile; + +typedef struct sTagFields { + unsigned int count; /* number of additional extension flags */ + const char *const *label; /* list of labels for extension flags */ + const char *const *value; /* list of values for extension flags */ +} tagFields; + +/* Information about the current tag candidate. + */ +typedef struct sTagEntryInfo { + boolean lineNumberEntry; /* pattern or line number entry */ + unsigned long lineNumber; /* line number of tag */ + fpos_t filePosition; /* file position of line containing tag */ + fpos_t templatefilePosition; /* template keyword position */ + boolean hasTemplate; /* does the token has template keyword? */ + const char* language; /* language of source file */ + boolean isFileScope; /* is tag visibile only within source file? */ + boolean isFileEntry; /* is this just an entry for a file name? */ + boolean truncateLine; /* truncate tag line at end of tag name? */ + const char *sourceFileName; /* name of source file */ + const char *name; /* name of the tag */ + const char *kindName; /* kind of tag */ + char kind; /* single character representation of kind */ + struct { + const char* access; + const char* fileScope; + const char* implementation; + const char* inheritance; + const char* scope [2]; /* value and key */ + const char* signature; + + /* type (union/struct/etc.) and name for a variable or typedef. */ + const char* typeRef [2]; /* e.g., "struct" and struct name */ + + } extensionFields; /* list of extension fields*/ +} tagEntryInfo; + +/* +* GLOBAL VARIABLES +*/ +extern tagFile TagFile; + +/* +* FUNCTION PROTOTYPES +*/ +extern void freeTagFileResources (void); +extern const char *tagFileName (void); +extern void copyBytes (FILE* const fromFp, FILE* const toFp, const long size); +extern void copyFile (const char *const from, const char *const to, const long size); +extern void openTagFile (void); +extern void closeTagFile (const boolean resize); +extern void beginEtagsFile (void); +extern void endEtagsFile (const char *const name); +extern void makeTagEntry (const tagEntryInfo *const tag); +extern void initTagEntry (tagEntryInfo *const e, const char *const name); + +#endif /* _ENTRY_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/erlang.c b/sdk/ctags/erlang.c new file mode 100644 index 0000000000..57297c5b49 --- /dev/null +++ b/sdk/ctags/erlang.c @@ -0,0 +1,189 @@ +/* +* $Id: erlang.c,v 1.3 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2003, Brent Fulgham +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Erlang language +* files. Some of the parsing constructs are based on the Emacs 'etags' +* program by Francesco Potori +*/ +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "options.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_MACRO, K_FUNCTION, K_MODULE, K_RECORD +} erlangKind; + +static kindOption ErlangKinds[] = { + {TRUE, 'd', "macro", "macro definitions"}, + {TRUE, 'f', "function", "functions"}, + {TRUE, 'm', "module", "modules"}, + {TRUE, 'r', "record", "record definitions"}, +}; + +/* +* FUNCTION DEFINITIONS +*/ +/* tagEntryInfo and vString should be preinitialized/preallocated but not + * necessary. If successful you will find class name in vString + */ + +static boolean isIdentifierFirstCharacter (int c) +{ + return (boolean) (isalpha (c)); +} + +static boolean isIdentifierCharacter (int c) +{ + return (boolean) (isalnum (c) || c == '_' || c == ':'); +} + +static const unsigned char *skipSpace (const unsigned char *cp) +{ + while (isspace ((int) *cp)) + ++cp; + return cp; +} + +static const unsigned char *parseIdentifier ( + const unsigned char *cp, vString *const identifier) +{ + vStringClear (identifier); + while (isIdentifierCharacter ((int) *cp)) + { + vStringPut (identifier, (int) *cp); + ++cp; + } + vStringTerminate (identifier); + return cp; +} + +static void makeMemberTag ( + vString *const identifier, erlangKind kind, vString *const module) +{ + if (ErlangKinds [kind].enabled && vStringLength (identifier) > 0) + { + tagEntryInfo tag; + initTagEntry (&tag, vStringValue (identifier)); + tag.kindName = ErlangKinds[kind].name; + tag.kind = ErlangKinds[kind].letter; + + if (module != NULL && vStringLength (module) > 0) + { + tag.extensionFields.scope [0] = "module"; + tag.extensionFields.scope [1] = vStringValue (module); + } + makeTagEntry (&tag); + } +} + +static void parseModuleTag (const unsigned char *cp, vString *const module) +{ + vString *const identifier = vStringNew (); + parseIdentifier (cp, identifier); + makeSimpleTag (identifier, ErlangKinds, K_MODULE); + + /* All further entries go in the new module */ + vStringCopy (module, identifier); + vStringDelete (identifier); +} + +static void parseSimpleTag (const unsigned char *cp, erlangKind kind) +{ + vString *const identifier = vStringNew (); + parseIdentifier (cp, identifier); + makeSimpleTag (identifier, ErlangKinds, kind); + vStringDelete (identifier); +} + +static void parseFunctionTag (const unsigned char *cp, vString *const module) +{ + vString *const identifier = vStringNew (); + parseIdentifier (cp, identifier); + makeMemberTag (identifier, K_FUNCTION, module); + vStringDelete (identifier); +} + +/* + * Directives are of the form: + * -module(foo) + * -define(foo, bar) + * -record(graph, {vtab = notable, cyclic = true}). + */ +static void parseDirective (const unsigned char *cp, vString *const module) +{ + /* + * A directive will be either a record definition or a directive. + * Record definitions are handled separately + */ + vString *const directive = vStringNew (); + const char *const drtv = vStringValue (directive); + cp = parseIdentifier (cp, directive); + cp = skipSpace (cp); + if (*cp == '(') + ++cp; + + if (strcmp (drtv, "record") == 0) + parseSimpleTag (cp, K_RECORD); + else if (strcmp (drtv, "define") == 0) + parseSimpleTag (cp, K_MACRO); + else if (strcmp (drtv, "module") == 0) + parseModuleTag (cp, module); + /* Otherwise, it was an import, export, etc. */ + + vStringDelete (directive); +} + +static void findErlangTags (void) +{ + vString *const module = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + + if (*cp == '%') /* skip initial comment */ + continue; + if (*cp == '"') /* strings sometimes start in column one */ + continue; + + if ( *cp == '-') + { + ++cp; /* Move off of the '-' */ + parseDirective(cp, module); + } + else if (isIdentifierFirstCharacter ((int) *cp)) + parseFunctionTag (cp, module); + } + vStringDelete (module); +} + +extern parserDefinition *ErlangParser (void) +{ + static const char *const extensions[] = { "erl", "ERL", "hrl", "HRL", NULL }; + parserDefinition *def = parserNew ("Erlang"); + def->kinds = ErlangKinds; + def->kindCount = KIND_COUNT (ErlangKinds); + def->extensions = extensions; + def->parser = findErlangTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/fortran.c b/sdk/ctags/fortran.c new file mode 100644 index 0000000000..51dda53d61 --- /dev/null +++ b/sdk/ctags/fortran.c @@ -0,0 +1,2220 @@ +/* +* $Id: fortran.c,v 1.42 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Fortran language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include +#include /* to define tolower () */ +#include + +#include "debug.h" +#include "entry.h" +#include "keyword.h" +#include "options.h" +#include "parse.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* MACROS +*/ +#define isident(c) (isalnum(c) || (c) == '_') +#define isBlank(c) (boolean) (c == ' ' || c == '\t') +#define isType(token,t) (boolean) ((token)->type == (t)) +#define isKeyword(token,k) (boolean) ((token)->keyword == (k)) +#define isSecondaryKeyword(token,k) (boolean) ((token)->secondary == NULL ? \ + FALSE : (token)->secondary->keyword == (k)) + +/* +* DATA DECLARATIONS +*/ + +typedef enum eException { + ExceptionNone, ExceptionEOF, ExceptionFixedFormat, ExceptionLoop +} exception_t; + +/* Used to designate type of line read in fixed source form. + */ +typedef enum eFortranLineType { + LTYPE_UNDETERMINED, + LTYPE_INVALID, + LTYPE_COMMENT, + LTYPE_CONTINUATION, + LTYPE_EOF, + LTYPE_INITIAL, + LTYPE_SHORT +} lineType; + +/* Used to specify type of keyword. + */ +typedef enum eKeywordId { + KEYWORD_NONE = -1, + KEYWORD_allocatable, + KEYWORD_assignment, + KEYWORD_automatic, + KEYWORD_block, + KEYWORD_byte, + KEYWORD_cexternal, + KEYWORD_cglobal, + KEYWORD_character, + KEYWORD_common, + KEYWORD_complex, + KEYWORD_contains, + KEYWORD_data, + KEYWORD_dimension, + KEYWORD_dllexport, + KEYWORD_dllimport, + KEYWORD_do, + KEYWORD_double, + KEYWORD_elemental, + KEYWORD_end, + KEYWORD_entry, + KEYWORD_equivalence, + KEYWORD_external, + KEYWORD_format, + KEYWORD_function, + KEYWORD_if, + KEYWORD_implicit, + KEYWORD_include, + KEYWORD_inline, + KEYWORD_integer, + KEYWORD_intent, + KEYWORD_interface, + KEYWORD_intrinsic, + KEYWORD_logical, + KEYWORD_map, + KEYWORD_module, + KEYWORD_namelist, + KEYWORD_operator, + KEYWORD_optional, + KEYWORD_parameter, + KEYWORD_pascal, + KEYWORD_pexternal, + KEYWORD_pglobal, + KEYWORD_pointer, + KEYWORD_precision, + KEYWORD_private, + KEYWORD_program, + KEYWORD_public, + KEYWORD_pure, + KEYWORD_real, + KEYWORD_record, + KEYWORD_recursive, + KEYWORD_save, + KEYWORD_select, + KEYWORD_sequence, + KEYWORD_static, + KEYWORD_stdcall, + KEYWORD_structure, + KEYWORD_subroutine, + KEYWORD_target, + KEYWORD_then, + KEYWORD_type, + KEYWORD_union, + KEYWORD_use, + KEYWORD_value, + KEYWORD_virtual, + KEYWORD_volatile, + KEYWORD_where, + KEYWORD_while +} keywordId; + +/* Used to determine whether keyword is valid for the token language and + * what its ID is. + */ +typedef struct sKeywordDesc { + const char *name; + keywordId id; +} keywordDesc; + +typedef enum eTokenType { + TOKEN_UNDEFINED, + TOKEN_COMMA, + TOKEN_DOUBLE_COLON, + TOKEN_IDENTIFIER, + TOKEN_KEYWORD, + TOKEN_LABEL, + TOKEN_NUMERIC, + TOKEN_OPERATOR, + TOKEN_PAREN_CLOSE, + TOKEN_PAREN_OPEN, + TOKEN_PERCENT, + TOKEN_STATEMENT_END, + TOKEN_STRING +} tokenType; + +typedef enum eTagType { + TAG_UNDEFINED = -1, + TAG_BLOCK_DATA, + TAG_COMMON_BLOCK, + TAG_ENTRY_POINT, + TAG_FUNCTION, + TAG_INTERFACE, + TAG_COMPONENT, + TAG_LABEL, + TAG_LOCAL, + TAG_MODULE, + TAG_NAMELIST, + TAG_PROGRAM, + TAG_SUBROUTINE, + TAG_DERIVED_TYPE, + TAG_VARIABLE, + TAG_COUNT /* must be last */ +} tagType; + +typedef struct sTokenInfo { + tokenType type; + keywordId keyword; + tagType tag; + vString* string; + struct sTokenInfo *secondary; + unsigned long lineNumber; + fpos_t filePosition; +} tokenInfo; + +/* +* DATA DEFINITIONS +*/ + +static langType Lang_fortran; +static jmp_buf Exception; +static int Ungetc; +static unsigned int Column; +static boolean FreeSourceForm; +static boolean ParsingString; +static tokenInfo *Parent; + +/* indexed by tagType */ +static kindOption FortranKinds [] = { + { TRUE, 'b', "block data", "block data"}, + { TRUE, 'c', "common", "common blocks"}, + { TRUE, 'e', "entry", "entry points"}, + { TRUE, 'f', "function", "functions"}, + { FALSE, 'i', "interface", "interface contents, generic names, and operators"}, + { TRUE, 'k', "component", "type and structure components"}, + { TRUE, 'l', "label", "labels"}, + { FALSE, 'L', "local", "local, common block, and namelist variables"}, + { TRUE, 'm', "module", "modules"}, + { TRUE, 'n', "namelist", "namelists"}, + { TRUE, 'p', "program", "programs"}, + { TRUE, 's', "subroutine", "subroutines"}, + { TRUE, 't', "type", "derived types and structures"}, + { TRUE, 'v', "variable", "program (global) and module variables"} +}; + +/* For a definition of Fortran 77 with extensions: + * http://scienide.uwaterloo.ca/MIPSpro7/007-2362-004/sgi_html/index.html + * + * For the Compaq Fortran Reference Manual: + * http://h18009.www1.hp.com/fortran/docs/lrm/dflrm.htm + */ + +static const keywordDesc FortranKeywordTable [] = { + /* keyword keyword ID */ + { "allocatable", KEYWORD_allocatable }, + { "assignment", KEYWORD_assignment }, + { "automatic", KEYWORD_automatic }, + { "block", KEYWORD_block }, + { "byte", KEYWORD_byte }, + { "cexternal", KEYWORD_cexternal }, + { "cglobal", KEYWORD_cglobal }, + { "character", KEYWORD_character }, + { "common", KEYWORD_common }, + { "complex", KEYWORD_complex }, + { "contains", KEYWORD_contains }, + { "data", KEYWORD_data }, + { "dimension", KEYWORD_dimension }, + { "dll_export", KEYWORD_dllexport }, + { "dll_import", KEYWORD_dllimport }, + { "do", KEYWORD_do }, + { "double", KEYWORD_double }, + { "elemental", KEYWORD_elemental }, + { "end", KEYWORD_end }, + { "entry", KEYWORD_entry }, + { "equivalence", KEYWORD_equivalence }, + { "external", KEYWORD_external }, + { "format", KEYWORD_format }, + { "function", KEYWORD_function }, + { "if", KEYWORD_if }, + { "implicit", KEYWORD_implicit }, + { "include", KEYWORD_include }, + { "inline", KEYWORD_inline }, + { "integer", KEYWORD_integer }, + { "intent", KEYWORD_intent }, + { "interface", KEYWORD_interface }, + { "intrinsic", KEYWORD_intrinsic }, + { "logical", KEYWORD_logical }, + { "map", KEYWORD_map }, + { "module", KEYWORD_module }, + { "namelist", KEYWORD_namelist }, + { "operator", KEYWORD_operator }, + { "optional", KEYWORD_optional }, + { "parameter", KEYWORD_parameter }, + { "pascal", KEYWORD_pascal }, + { "pexternal", KEYWORD_pexternal }, + { "pglobal", KEYWORD_pglobal }, + { "pointer", KEYWORD_pointer }, + { "precision", KEYWORD_precision }, + { "private", KEYWORD_private }, + { "program", KEYWORD_program }, + { "public", KEYWORD_public }, + { "pure", KEYWORD_pure }, + { "real", KEYWORD_real }, + { "record", KEYWORD_record }, + { "recursive", KEYWORD_recursive }, + { "save", KEYWORD_save }, + { "select", KEYWORD_select }, + { "sequence", KEYWORD_sequence }, + { "static", KEYWORD_static }, + { "stdcall", KEYWORD_stdcall }, + { "structure", KEYWORD_structure }, + { "subroutine", KEYWORD_subroutine }, + { "target", KEYWORD_target }, + { "then", KEYWORD_then }, + { "type", KEYWORD_type }, + { "union", KEYWORD_union }, + { "use", KEYWORD_use }, + { "value", KEYWORD_value }, + { "virtual", KEYWORD_virtual }, + { "volatile", KEYWORD_volatile }, + { "where", KEYWORD_where }, + { "while", KEYWORD_while } +}; + +static struct { + unsigned int count; + unsigned int max; + tokenInfo* list; +} Ancestors = { 0, 0, NULL }; + +/* +* FUNCTION PROTOTYPES +*/ +static void parseStructureStmt (tokenInfo *const token); +static void parseUnionStmt (tokenInfo *const token); +static void parseDerivedTypeDef (tokenInfo *const token); +static void parseFunctionSubprogram (tokenInfo *const token); +static void parseSubroutineSubprogram (tokenInfo *const token); + +/* +* FUNCTION DEFINITIONS +*/ + +static void ancestorPush (tokenInfo *const token) +{ + enum { incrementalIncrease = 10 }; + if (Ancestors.list == NULL) + { + Assert (Ancestors.max == 0); + Ancestors.count = 0; + Ancestors.max = incrementalIncrease; + Ancestors.list = xMalloc (Ancestors.max, tokenInfo); + } + else if (Ancestors.count == Ancestors.max) + { + Ancestors.max += incrementalIncrease; + Ancestors.list = xRealloc (Ancestors.list, Ancestors.max, tokenInfo); + } + Ancestors.list [Ancestors.count] = *token; + Ancestors.list [Ancestors.count].string = vStringNewCopy (token->string); + Ancestors.count++; +} + +static void ancestorPop (void) +{ + Assert (Ancestors.count > 0); + --Ancestors.count; + vStringDelete (Ancestors.list [Ancestors.count].string); + + Ancestors.list [Ancestors.count].type = TOKEN_UNDEFINED; + Ancestors.list [Ancestors.count].keyword = KEYWORD_NONE; + Ancestors.list [Ancestors.count].secondary = NULL; + Ancestors.list [Ancestors.count].tag = TAG_UNDEFINED; + Ancestors.list [Ancestors.count].string = NULL; + Ancestors.list [Ancestors.count].lineNumber = 0L; +} + +static const tokenInfo* ancestorScope (void) +{ + tokenInfo *result = NULL; + unsigned int i; + for (i = Ancestors.count ; i > 0 && result == NULL ; --i) + { + tokenInfo *const token = Ancestors.list + i - 1; + if (token->type == TOKEN_IDENTIFIER && + token->tag != TAG_UNDEFINED && token->tag != TAG_INTERFACE) + result = token; + } + return result; +} + +static const tokenInfo* ancestorTop (void) +{ + Assert (Ancestors.count > 0); + return &Ancestors.list [Ancestors.count - 1]; +} + +#define ancestorCount() (Ancestors.count) + +static void ancestorClear (void) +{ + while (Ancestors.count > 0) + ancestorPop (); + if (Ancestors.list != NULL) + eFree (Ancestors.list); + Ancestors.list = NULL; + Ancestors.count = 0; + Ancestors.max = 0; +} + +static boolean insideInterface (void) +{ + boolean result = FALSE; + unsigned int i; + for (i = 0 ; i < Ancestors.count && !result ; ++i) + { + if (Ancestors.list [i].tag == TAG_INTERFACE) + result = TRUE; + } + return result; +} + +static void buildFortranKeywordHash (void) +{ + const size_t count = + sizeof (FortranKeywordTable) / sizeof (FortranKeywordTable [0]); + size_t i; + for (i = 0 ; i < count ; ++i) + { + const keywordDesc* const p = &FortranKeywordTable [i]; + addKeyword (p->name, Lang_fortran, (int) p->id); + } +} + +/* +* Tag generation functions +*/ + +static tokenInfo *newToken (void) +{ + tokenInfo *const token = xMalloc (1, tokenInfo); + + token->type = TOKEN_UNDEFINED; + token->keyword = KEYWORD_NONE; + token->tag = TAG_UNDEFINED; + token->string = vStringNew (); + token->secondary = NULL; + token->lineNumber = getSourceLineNumber (); + token->filePosition = getInputFilePosition (); + + return token; +} + +static tokenInfo *newTokenFrom (tokenInfo *const token) +{ + tokenInfo *result = newToken (); + *result = *token; + result->string = vStringNewCopy (token->string); + token->secondary = NULL; + return result; +} + +static void deleteToken (tokenInfo *const token) +{ + if (token != NULL) + { + vStringDelete (token->string); + deleteToken (token->secondary); + token->secondary = NULL; + eFree (token); + } +} + +static boolean isFileScope (const tagType type) +{ + return (boolean) (type == TAG_LABEL || type == TAG_LOCAL); +} + +static boolean includeTag (const tagType type) +{ + boolean include; + Assert (type != TAG_UNDEFINED); + include = FortranKinds [(int) type].enabled; + if (include && isFileScope (type)) + include = Option.include.fileScope; + return include; +} + +static void makeFortranTag (tokenInfo *const token, tagType tag) +{ + token->tag = tag; + if (includeTag (token->tag)) + { + const char *const name = vStringValue (token->string); + tagEntryInfo e; + + initTagEntry (&e, name); + + if (token->tag == TAG_COMMON_BLOCK) + e.lineNumberEntry = (boolean) (Option.locate != EX_PATTERN); + + e.lineNumber = token->lineNumber; + e.filePosition = token->filePosition; + e.isFileScope = isFileScope (token->tag); + e.kindName = FortranKinds [token->tag].name; + e.kind = FortranKinds [token->tag].letter; + e.truncateLine = (boolean) (token->tag != TAG_LABEL); + + if (ancestorCount () > 0) + { + const tokenInfo* const scope = ancestorScope (); + if (scope != NULL) + { + e.extensionFields.scope [0] = FortranKinds [scope->tag].name; + e.extensionFields.scope [1] = vStringValue (scope->string); + } + } + if (! insideInterface () || includeTag (TAG_INTERFACE)) + makeTagEntry (&e); + } +} + +/* +* Parsing functions +*/ + +static int skipLine (void) +{ + int c; + + do + c = fileGetc (); + while (c != EOF && c != '\n'); + + return c; +} + +static void makeLabelTag (vString *const label) +{ + tokenInfo *token = newToken (); + token->type = TOKEN_LABEL; + vStringCopy (token->string, label); + makeFortranTag (token, TAG_LABEL); + deleteToken (token); +} + +static lineType getLineType (void) +{ + static vString *label = NULL; + int column = 0; + lineType type = LTYPE_UNDETERMINED; + + if (label == NULL) + label = vStringNew (); + + do /* read in first 6 "margin" characters */ + { + int c = fileGetc (); + + /* 3.2.1 Comment_Line. A comment line is any line that contains + * a C or an asterisk in column 1, or contains only blank characters + * in columns 1 through 72. A comment line that contains a C or + * an asterisk in column 1 may contain any character capable of + * representation in the processor in columns 2 through 72. + */ + /* EXCEPTION! Some compilers permit '!' as a commment character here. + * + * Treat # and $ in column 1 as comment to permit preprocessor directives. + * Treat D and d in column 1 as comment for HP debug statements. + */ + if (column == 0 && strchr ("*Cc!#$Dd", c) != NULL) + type = LTYPE_COMMENT; + else if (c == '\t') /* EXCEPTION! Some compilers permit a tab here */ + { + column = 8; + type = LTYPE_INITIAL; + } + else if (column == 5) + { + /* 3.2.2 Initial_Line. An initial line is any line that is not + * a comment line and contains the character blank or the digit 0 + * in column 6. Columns 1 through 5 may contain a statement label + * (3.4), or each of the columns 1 through 5 must contain the + * character blank. + */ + if (c == ' ' || c == '0') + type = LTYPE_INITIAL; + + /* 3.2.3 Continuation_Line. A continuation line is any line that + * contains any character of the FORTRAN character set other than + * the character blank or the digit 0 in column 6 and contains + * only blank characters in columns 1 through 5. + */ + else if (vStringLength (label) == 0) + type = LTYPE_CONTINUATION; + else + type = LTYPE_INVALID; + } + else if (c == ' ') + ; + else if (c == EOF) + type = LTYPE_EOF; + else if (c == '\n') + type = LTYPE_SHORT; + else if (isdigit (c)) + vStringPut (label, c); + else + type = LTYPE_INVALID; + + ++column; + } while (column < 6 && type == LTYPE_UNDETERMINED); + + Assert (type != LTYPE_UNDETERMINED); + + if (vStringLength (label) > 0) + { + vStringTerminate (label); + makeLabelTag (label); + vStringClear (label); + } + return type; +} + +static int getFixedFormChar (void) +{ + boolean newline = FALSE; + lineType type; + int c = '\0'; + + if (Column > 0) + { +#ifdef STRICT_FIXED_FORM + /* EXCEPTION! Some compilers permit more than 72 characters per line. + */ + if (Column > 71) + c = skipLine (); + else +#endif + { + c = fileGetc (); + ++Column; + } + if (c == '\n') + { + newline = TRUE; /* need to check for continuation line */ + Column = 0; + } + else if (c == '!' && ! ParsingString) + { + c = skipLine (); + newline = TRUE; /* need to check for continuation line */ + Column = 0; + } + else if (c == '&') /* check for free source form */ + { + const int c2 = fileGetc (); + if (c2 == '\n') + longjmp (Exception, (int) ExceptionFixedFormat); + else + fileUngetc (c2); + } + } + while (Column == 0) + { + type = getLineType (); + switch (type) + { + case LTYPE_UNDETERMINED: + case LTYPE_INVALID: + longjmp (Exception, (int) ExceptionFixedFormat); + break; + + case LTYPE_SHORT: break; + case LTYPE_COMMENT: skipLine (); break; + + case LTYPE_EOF: + Column = 6; + if (newline) + c = '\n'; + else + c = EOF; + break; + + case LTYPE_INITIAL: + if (newline) + { + c = '\n'; + Column = 6; + break; + } + /* fall through to next case */ + case LTYPE_CONTINUATION: + Column = 5; + do + { + c = fileGetc (); + ++Column; + } while (isBlank (c)); + if (c == '\n') + Column = 0; + else if (Column > 6) + { + fileUngetc (c); + c = ' '; + } + break; + + default: + Assert ("Unexpected line type" == NULL); + } + } + return c; +} + +static int skipToNextLine (void) +{ + int c = skipLine (); + if (c != EOF) + c = fileGetc (); + return c; +} + +static int getFreeFormChar (void) +{ + static boolean newline = TRUE; + boolean advanceLine = FALSE; + int c = fileGetc (); + + /* If the last nonblank, non-comment character of a FORTRAN 90 + * free-format text line is an ampersand then the next non-comment + * line is a continuation line. + */ + if (c == '&') + { + do + c = fileGetc (); + while (isspace (c) && c != '\n'); + if (c == '\n') + { + newline = TRUE; + advanceLine = TRUE; + } + else if (c == '!') + advanceLine = TRUE; + else + { + fileUngetc (c); + c = '&'; + } + } + else if (newline && (c == '!' || c == '#')) + advanceLine = TRUE; + while (advanceLine) + { + while (isspace (c)) + c = fileGetc (); + if (c == '!' || (newline && c == '#')) + { + c = skipToNextLine (); + newline = TRUE; + continue; + } + if (c == '&') + c = fileGetc (); + else + advanceLine = FALSE; + } + newline = (boolean) (c == '\n'); + return c; +} + +static int getChar (void) +{ + int c; + + if (Ungetc != '\0') + { + c = Ungetc; + Ungetc = '\0'; + } + else if (FreeSourceForm) + c = getFreeFormChar (); + else + c = getFixedFormChar (); + return c; +} + +static void ungetChar (const int c) +{ + Ungetc = c; +} + +/* If a numeric is passed in 'c', this is used as the first digit of the + * numeric being parsed. + */ +static vString *parseInteger (int c) +{ + static vString *string = NULL; + + if (string == NULL) + string = vStringNew (); + vStringClear (string); + + if (c == '-') + { + vStringPut (string, c); + c = getChar (); + } + else if (! isdigit (c)) + c = getChar (); + while (c != EOF && isdigit (c)) + { + vStringPut (string, c); + c = getChar (); + } + vStringTerminate (string); + + if (c == '_') + { + do + c = getChar (); + while (c != EOF && isalpha (c)); + } + ungetChar (c); + + return string; +} + +static vString *parseNumeric (int c) +{ + static vString *string = NULL; + + if (string == NULL) + string = vStringNew (); + vStringCopy (string, parseInteger (c)); + + c = getChar (); + if (c == '.') + { + vStringPut (string, c); + vStringCat (string, parseInteger ('\0')); + c = getChar (); + } + if (tolower (c) == 'e') + { + vStringPut (string, c); + vStringCat (string, parseInteger ('\0')); + } + else + ungetChar (c); + + vStringTerminate (string); + + return string; +} + +static void parseString (vString *const string, const int delimeter) +{ + const unsigned long inputLineNumber = getInputLineNumber (); + int c; + ParsingString = TRUE; + c = getChar (); + while (c != delimeter && c != '\n' && c != EOF) + { + vStringPut (string, c); + c = getChar (); + } + if (c == '\n' || c == EOF) + { + verbose ("%s: unterminated character string at line %lu\n", + getInputFileName (), inputLineNumber); + if (c == EOF) + longjmp (Exception, (int) ExceptionEOF); + else if (! FreeSourceForm) + longjmp (Exception, (int) ExceptionFixedFormat); + } + vStringTerminate (string); + ParsingString = FALSE; +} + +/* Read a C identifier beginning with "firstChar" and places it into "name". + */ +static void parseIdentifier (vString *const string, const int firstChar) +{ + int c = firstChar; + + do + { + vStringPut (string, c); + c = getChar (); + } while (isident (c)); + + vStringTerminate (string); + ungetChar (c); /* unget non-identifier character */ +} + +/* Analyzes the identifier contained in a statement described by the + * statement structure and adjusts the structure according the significance + * of the identifier. + */ +static keywordId analyzeToken (vString *const name) +{ + static vString *keyword = NULL; + keywordId id; + + if (keyword == NULL) + keyword = vStringNew (); + vStringCopyToLower (keyword, name); + id = (keywordId) lookupKeyword (vStringValue (keyword), Lang_fortran); + + return id; +} + +static void checkForLabel (void) +{ + tokenInfo* token = NULL; + int length; + int c; + + do + c = getChar (); + while (isBlank (c)); + + for (length = 0 ; isdigit (c) && length < 5 ; ++length) + { + if (token == NULL) + { + token = newToken (); + token->type = TOKEN_LABEL; + } + vStringPut (token->string, c); + c = getChar (); + } + if (length > 0) + { + Assert (token != NULL); + vStringTerminate (token->string); + makeFortranTag (token, TAG_LABEL); + deleteToken (token); + } + ungetChar (c); +} + +static void readIdentifier (tokenInfo *const token, const int c) +{ + parseIdentifier (token->string, c); + token->keyword = analyzeToken (token->string); + if (! isKeyword (token, KEYWORD_NONE)) + token->type = TOKEN_KEYWORD; + else + { + token->type = TOKEN_IDENTIFIER; + if (strncmp (vStringValue (token->string), "end", 3) == 0) + { + vString *const sub = vStringNewInit (vStringValue (token->string) + 3); + const keywordId kw = analyzeToken (sub); + vStringDelete (sub); + if (kw != KEYWORD_NONE) + { + token->secondary = newToken (); + token->secondary->type = TOKEN_KEYWORD; + token->secondary->keyword = kw; + token->keyword = KEYWORD_end; + } + } + } +} + +static void readToken (tokenInfo *const token) +{ + int c; + + deleteToken (token->secondary); + token->type = TOKEN_UNDEFINED; + token->tag = TAG_UNDEFINED; + token->keyword = KEYWORD_NONE; + token->secondary = NULL; + vStringClear (token->string); + +getNextChar: + c = getChar (); + + token->lineNumber = getSourceLineNumber (); + token->filePosition = getInputFilePosition (); + + switch (c) + { + case EOF: longjmp (Exception, (int) ExceptionEOF); break; + case ' ': goto getNextChar; + case '\t': goto getNextChar; + case ',': token->type = TOKEN_COMMA; break; + case '(': token->type = TOKEN_PAREN_OPEN; break; + case ')': token->type = TOKEN_PAREN_CLOSE; break; + case '%': token->type = TOKEN_PERCENT; break; + + case '*': + case '/': + case '+': + case '-': + case '=': + case '<': + case '>': + { + const char *const operatorChars = "*/+=<>"; + do { + vStringPut (token->string, c); + c = getChar (); + } while (strchr (operatorChars, c) != NULL); + ungetChar (c); + vStringTerminate (token->string); + token->type = TOKEN_OPERATOR; + break; + } + + case '!': + if (FreeSourceForm) + { + do + c = getChar (); + while (c != '\n'); + } + else + { + skipLine (); + Column = 0; + } + /* fall through to newline case */ + case '\n': + token->type = TOKEN_STATEMENT_END; + if (FreeSourceForm) + checkForLabel (); + break; + + case '.': + parseIdentifier (token->string, c); + c = getChar (); + if (c == '.') + { + vStringPut (token->string, c); + vStringTerminate (token->string); + token->type = TOKEN_OPERATOR; + } + else + { + ungetChar (c); + token->type = TOKEN_UNDEFINED; + } + break; + + case '"': + case '\'': + parseString (token->string, c); + token->type = TOKEN_STRING; + break; + + case ';': + token->type = TOKEN_STATEMENT_END; + break; + + case ':': + c = getChar (); + if (c == ':') + token->type = TOKEN_DOUBLE_COLON; + else + { + ungetChar (c); + token->type = TOKEN_UNDEFINED; + } + break; + + default: + if (isalpha (c)) + readIdentifier (token, c); + else if (isdigit (c)) + { + vStringCat (token->string, parseNumeric (c)); + token->type = TOKEN_NUMERIC; + } + else + token->type = TOKEN_UNDEFINED; + break; + } +} + +static void readSubToken (tokenInfo *const token) +{ + if (token->secondary == NULL) + { + token->secondary = newToken (); + readToken (token->secondary); + } + Assert (token->secondary != NULL); +} + +/* +* Scanning functions +*/ + +static void skipToToken (tokenInfo *const token, tokenType type) +{ + while (! isType (token, type) && ! isType (token, TOKEN_STATEMENT_END) && + !(token->secondary != NULL && isType (token->secondary, TOKEN_STATEMENT_END))) + readToken (token); +} + +static void skipPast (tokenInfo *const token, tokenType type) +{ + skipToToken (token, type); + if (! isType (token, TOKEN_STATEMENT_END)) + readToken (token); +} + +static void skipToNextStatement (tokenInfo *const token) +{ + do + { + skipToToken (token, TOKEN_STATEMENT_END); + readToken (token); + } while (isType (token, TOKEN_STATEMENT_END)); +} + +/* skip over parenthesis enclosed contents starting at next token. + * Token is left at the first token following closing parenthesis. If an + * opening parenthesis is not found, `token' is moved to the end of the + * statement. + */ +static void skipOverParens (tokenInfo *const token) +{ + int level = 0; + do { + if (isType (token, TOKEN_STATEMENT_END)) + break; + else if (isType (token, TOKEN_PAREN_OPEN)) + ++level; + else if (isType (token, TOKEN_PAREN_CLOSE)) + --level; + readToken (token); + } while (level > 0); +} + +static boolean isTypeSpec (tokenInfo *const token) +{ + boolean result; + switch (token->keyword) + { + case KEYWORD_byte: + case KEYWORD_integer: + case KEYWORD_real: + case KEYWORD_double: + case KEYWORD_complex: + case KEYWORD_character: + case KEYWORD_logical: + case KEYWORD_record: + case KEYWORD_type: + result = TRUE; + break; + default: + result = FALSE; + break; + } + return result; +} + +static boolean isSubprogramPrefix (tokenInfo *const token) +{ + boolean result; + switch (token->keyword) + { + case KEYWORD_elemental: + case KEYWORD_pure: + case KEYWORD_recursive: + case KEYWORD_stdcall: + result = TRUE; + break; + default: + result = FALSE; + break; + } + return result; +} + +/* type-spec + * is INTEGER [kind-selector] + * or REAL [kind-selector] is ( etc. ) + * or DOUBLE PRECISION + * or COMPLEX [kind-selector] + * or CHARACTER [kind-selector] + * or LOGICAL [kind-selector] + * or TYPE ( type-name ) + * + * Note that INTEGER and REAL may be followed by "*N" where "N" is an integer + */ +static void parseTypeSpec (tokenInfo *const token) +{ + /* parse type-spec, leaving `token' at first token following type-spec */ + Assert (isTypeSpec (token)); + switch (token->keyword) + { + case KEYWORD_character: + /* skip char-selector */ + readToken (token); + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "*") == 0) + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); + else if (isType (token, TOKEN_NUMERIC)) + readToken (token); + break; + + + case KEYWORD_byte: + case KEYWORD_complex: + case KEYWORD_integer: + case KEYWORD_logical: + case KEYWORD_real: + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); /* skip kind-selector */ + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "*") == 0) + { + readToken (token); + readToken (token); + } + break; + + case KEYWORD_double: + readToken (token); + if (isKeyword (token, KEYWORD_complex) || + isKeyword (token, KEYWORD_precision)) + readToken (token); + else + skipToToken (token, TOKEN_STATEMENT_END); + break; + + case KEYWORD_record: + readToken (token); + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "/") == 0) + { + readToken (token); /* skip to structure name */ + readToken (token); /* skip to '/' */ + readToken (token); /* skip to variable name */ + } + break; + + case KEYWORD_type: + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); /* skip type-name */ + else + parseDerivedTypeDef (token); + break; + + default: + skipToToken (token, TOKEN_STATEMENT_END); + break; + } +} + +static boolean skipStatementIfKeyword (tokenInfo *const token, keywordId keyword) +{ + boolean result = FALSE; + if (isKeyword (token, keyword)) + { + result = TRUE; + skipToNextStatement (token); + } + return result; +} + +/* parse a list of qualifying specifiers, leaving `token' at first token + * following list. Examples of such specifiers are: + * [[, attr-spec] ::] + * [[, component-attr-spec-list] ::] + * + * attr-spec + * is PARAMETER + * or access-spec (is PUBLIC or PRIVATE) + * or ALLOCATABLE + * or DIMENSION ( array-spec ) + * or EXTERNAL + * or INTENT ( intent-spec ) + * or INTRINSIC + * or OPTIONAL + * or POINTER + * or SAVE + * or TARGET + * + * component-attr-spec + * is POINTER + * or DIMENSION ( component-array-spec ) + */ +static void parseQualifierSpecList (tokenInfo *const token) +{ + do + { + readToken (token); /* should be an attr-spec */ + switch (token->keyword) + { + case KEYWORD_parameter: + case KEYWORD_allocatable: + case KEYWORD_external: + case KEYWORD_intrinsic: + case KEYWORD_optional: + case KEYWORD_private: + case KEYWORD_pointer: + case KEYWORD_public: + case KEYWORD_save: + case KEYWORD_target: + readToken (token); + break; + + case KEYWORD_dimension: + case KEYWORD_intent: + readToken (token); + skipOverParens (token); + break; + + default: skipToToken (token, TOKEN_STATEMENT_END); break; + } + } while (isType (token, TOKEN_COMMA)); + if (! isType (token, TOKEN_DOUBLE_COLON)) + skipToToken (token, TOKEN_STATEMENT_END); +} + +static tagType variableTagType (void) +{ + tagType result = TAG_VARIABLE; + if (ancestorCount () > 0) + { + const tokenInfo* const parent = ancestorTop (); + switch (parent->tag) + { + case TAG_MODULE: result = TAG_VARIABLE; break; + case TAG_DERIVED_TYPE: result = TAG_COMPONENT; break; + case TAG_FUNCTION: result = TAG_LOCAL; break; + case TAG_SUBROUTINE: result = TAG_LOCAL; break; + default: result = TAG_VARIABLE; break; + } + } + return result; +} + +static void parseEntityDecl (tokenInfo *const token) +{ + Assert (isType (token, TOKEN_IDENTIFIER)); + makeFortranTag (token, variableTagType ()); + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "*") == 0) + { + readToken (token); /* read char-length */ + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); + else + readToken (token); + } + if (isType (token, TOKEN_OPERATOR)) + { + if (strcmp (vStringValue (token->string), "/") == 0) + { /* skip over initializations of structure field */ + readToken (token); + skipPast (token, TOKEN_OPERATOR); + } + else if (strcmp (vStringValue (token->string), "=") == 0) + { + while (! isType (token, TOKEN_COMMA) && + ! isType (token, TOKEN_STATEMENT_END)) + { + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); + } + } + } + /* token left at either comma or statement end */ +} + +static void parseEntityDeclList (tokenInfo *const token) +{ + if (isType (token, TOKEN_PERCENT)) + skipToNextStatement (token); + else while (isType (token, TOKEN_IDENTIFIER) || + (isType (token, TOKEN_KEYWORD) && + !isKeyword (token, KEYWORD_function) && + !isKeyword (token, KEYWORD_subroutine))) + { + /* compilers accept keywoeds as identifiers */ + if (isType (token, TOKEN_KEYWORD)) + token->type = TOKEN_IDENTIFIER; + parseEntityDecl (token); + if (isType (token, TOKEN_COMMA)) + readToken (token); + else if (isType (token, TOKEN_STATEMENT_END)) + { + skipToNextStatement (token); + break; + } + } +} + +/* type-declaration-stmt is + * type-spec [[, attr-spec] ... ::] entity-decl-list + */ +static void parseTypeDeclarationStmt (tokenInfo *const token) +{ + Assert (isTypeSpec (token)); + parseTypeSpec (token); + if (!isType (token, TOKEN_STATEMENT_END)) /* if not end of derived type... */ + { + if (isType (token, TOKEN_COMMA)) + parseQualifierSpecList (token); + if (isType (token, TOKEN_DOUBLE_COLON)) + readToken (token); + parseEntityDeclList (token); + } + if (isType (token, TOKEN_STATEMENT_END)) + skipToNextStatement (token); +} + +/* namelist-stmt is + * NAMELIST /namelist-group-name/ namelist-group-object-list + * [[,]/[namelist-group-name]/ namelist-block-object-list] ... + * + * namelist-group-object is + * variable-name + * + * common-stmt is + * COMMON [/[common-block-name]/] common-block-object-list + * [[,]/[common-block-name]/ common-block-object-list] ... + * + * common-block-object is + * variable-name [ ( explicit-shape-spec-list ) ] + */ +static void parseCommonNamelistStmt (tokenInfo *const token, tagType type) +{ + Assert (isKeyword (token, KEYWORD_common) || + isKeyword (token, KEYWORD_namelist)); + readToken (token); + do + { + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "/") == 0) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + { + makeFortranTag (token, type); + readToken (token); + } + skipPast (token, TOKEN_OPERATOR); + } + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_LOCAL); + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + skipOverParens (token); /* skip explicit-shape-spec-list */ + if (isType (token, TOKEN_COMMA)) + readToken (token); + } while (! isType (token, TOKEN_STATEMENT_END)); + skipToNextStatement (token); +} + +static void parseFieldDefinition (tokenInfo *const token) +{ + if (isTypeSpec (token)) + parseTypeDeclarationStmt (token); + else if (isKeyword (token, KEYWORD_structure)) + parseStructureStmt (token); + else if (isKeyword (token, KEYWORD_union)) + parseUnionStmt (token); + else + skipToNextStatement (token); +} + +static void parseMap (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_map)); + skipToNextStatement (token); + while (! isKeyword (token, KEYWORD_end)) + parseFieldDefinition (token); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_map)); + skipToNextStatement (token); +} + +/* UNION + * MAP + * [field-definition] [field-definition] ... + * END MAP + * MAP + * [field-definition] [field-definition] ... + * END MAP + * [MAP + * [field-definition] + * [field-definition] ... + * END MAP] ... + * END UNION + * * + * + * Typed data declarations (variables or arrays) in structure declarations + * have the form of normal Fortran typed data declarations. Data items with + * different types can be freely intermixed within a structure declaration. + * + * Unnamed fields can be declared in a structure by specifying the pseudo + * name %FILL in place of an actual field name. You can use this mechanism to + * generate empty space in a record for purposes such as alignment. + * + * All mapped field declarations that are made within a UNION declaration + * share a common location within the containing structure. When initializing + * the fields within a UNION, the final initialization value assigned + * overlays any value previously assigned to a field definition that shares + * that field. + */ +static void parseUnionStmt (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_union)); + skipToNextStatement (token); + while (isKeyword (token, KEYWORD_map)) + parseMap (token); + Assert (isKeyword (token, KEYWORD_end)); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_union)); + skipToNextStatement (token); +} + +/* STRUCTURE [/structure-name/] [field-names] + * [field-definition] + * [field-definition] ... + * END STRUCTURE + * + * structure-name + * identifies the structure in a subsequent RECORD statement. + * Substructures can be established within a structure by means of either + * a nested STRUCTURE declaration or a RECORD statement. + * + * field-names + * (for substructure declarations only) one or more names having the + * structure of the substructure being defined. + * + * field-definition + * can be one or more of the following: + * + * Typed data declarations, which can optionally include one or more + * data initialization values. + * + * Substructure declarations (defined by either RECORD statements or + * subsequent STRUCTURE statements). + * + * UNION declarations, which are mapped fields defined by a block of + * statements. The syntax of a UNION declaration is described below. + * + * PARAMETER statements, which do not affect the form of the + * structure. + */ +static void parseStructureStmt (tokenInfo *const token) +{ + tokenInfo *name; + Assert (isKeyword (token, KEYWORD_structure)); + readToken (token); + if (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "/") == 0) + { /* read structure name */ + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_DERIVED_TYPE); + name = newTokenFrom (token); + skipPast (token, TOKEN_OPERATOR); + } + else + { /* fake out anonymous structure */ + name = newToken (); + name->type = TOKEN_IDENTIFIER; + name->tag = TAG_DERIVED_TYPE; + vStringCopyS (name->string, "anonymous"); + } + while (isType (token, TOKEN_IDENTIFIER)) + { /* read field names */ + makeFortranTag (token, TAG_COMPONENT); + readToken (token); + if (isType (token, TOKEN_COMMA)) + readToken (token); + } + skipToNextStatement (token); + ancestorPush (name); + while (! isKeyword (token, KEYWORD_end)) + parseFieldDefinition (token); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_structure)); + skipToNextStatement (token); + ancestorPop (); + deleteToken (name); +} + +/* specification-stmt + * is access-stmt (is access-spec [[::] access-id-list) + * or allocatable-stmt (is ALLOCATABLE [::] array-name etc.) + * or common-stmt (is COMMON [ / [common-block-name] /] etc.) + * or data-stmt (is DATA data-stmt-list [[,] data-stmt-set] ...) + * or dimension-stmt (is DIMENSION [::] array-name etc.) + * or equivalence-stmt (is EQUIVALENCE equivalence-set-list) + * or external-stmt (is EXTERNAL etc.) + * or intent-stmt (is INTENT ( intent-spec ) [::] etc.) + * or instrinsic-stmt (is INTRINSIC etc.) + * or namelist-stmt (is NAMELIST / namelist-group-name / etc.) + * or optional-stmt (is OPTIONAL [::] etc.) + * or pointer-stmt (is POINTER [::] object-name etc.) + * or save-stmt (is SAVE etc.) + * or target-stmt (is TARGET [::] object-name etc.) + * + * access-spec is PUBLIC or PRIVATE + */ +static boolean parseSpecificationStmt (tokenInfo *const token) +{ + boolean result = TRUE; + switch (token->keyword) + { + case KEYWORD_common: + parseCommonNamelistStmt (token, TAG_COMMON_BLOCK); + break; + + case KEYWORD_namelist: + parseCommonNamelistStmt (token, TAG_NAMELIST); + break; + + case KEYWORD_structure: + parseStructureStmt (token); + break; + + case KEYWORD_allocatable: + case KEYWORD_data: + case KEYWORD_dimension: + case KEYWORD_equivalence: + case KEYWORD_external: + case KEYWORD_intent: + case KEYWORD_intrinsic: + case KEYWORD_optional: + case KEYWORD_pointer: + case KEYWORD_private: + case KEYWORD_public: + case KEYWORD_save: + case KEYWORD_target: + skipToNextStatement (token); + break; + + default: + result = FALSE; + break; + } + return result; +} + +/* component-def-stmt is + * type-spec [[, component-attr-spec-list] ::] component-decl-list + * + * component-decl is + * component-name [ ( component-array-spec ) ] [ * char-length ] + */ +static void parseComponentDefStmt (tokenInfo *const token) +{ + Assert (isTypeSpec (token)); + parseTypeSpec (token); + if (isType (token, TOKEN_COMMA)) + parseQualifierSpecList (token); + if (isType (token, TOKEN_DOUBLE_COLON)) + readToken (token); + parseEntityDeclList (token); +} + +/* derived-type-def is + * derived-type-stmt is (TYPE [[, access-spec] ::] type-name + * [private-sequence-stmt] ... (is PRIVATE or SEQUENCE) + * component-def-stmt + * [component-def-stmt] ... + * end-type-stmt + */ +static void parseDerivedTypeDef (tokenInfo *const token) +{ + if (isType (token, TOKEN_COMMA)) + parseQualifierSpecList (token); + if (isType (token, TOKEN_DOUBLE_COLON)) + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_DERIVED_TYPE); + ancestorPush (token); + skipToNextStatement (token); + if (isKeyword (token, KEYWORD_private) || + isKeyword (token, KEYWORD_sequence)) + { + skipToNextStatement (token); + } + while (! isKeyword (token, KEYWORD_end)) + { + if (isTypeSpec (token)) + parseComponentDefStmt (token); + else + skipToNextStatement (token); + } + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_type)); + skipToToken (token, TOKEN_STATEMENT_END); + ancestorPop (); +} + +/* interface-block + * interface-stmt (is INTERFACE [generic-spec]) + * [interface-body] + * [module-procedure-stmt] ... + * end-interface-stmt (is END INTERFACE) + * + * generic-spec + * is generic-name + * or OPERATOR ( defined-operator ) + * or ASSIGNMENT ( = ) + * + * interface-body + * is function-stmt + * [specification-part] + * end-function-stmt + * or subroutine-stmt + * [specification-part] + * end-subroutine-stmt + * + * module-procedure-stmt is + * MODULE PROCEDURE procedure-name-list + */ +static void parseInterfaceBlock (tokenInfo *const token) +{ + tokenInfo *name = NULL; + Assert (isKeyword (token, KEYWORD_interface)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + { + makeFortranTag (token, TAG_INTERFACE); + name = newTokenFrom (token); + } + else if (isKeyword (token, KEYWORD_assignment) || + isKeyword (token, KEYWORD_operator)) + { + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + readToken (token); + if (isType (token, TOKEN_OPERATOR)) + { + makeFortranTag (token, TAG_INTERFACE); + name = newTokenFrom (token); + } + } + if (name == NULL) + { + name = newToken (); + name->type = TOKEN_IDENTIFIER; + name->tag = TAG_INTERFACE; + } + ancestorPush (name); + while (! isKeyword (token, KEYWORD_end)) + { + switch (token->keyword) + { + case KEYWORD_function: parseFunctionSubprogram (token); break; + case KEYWORD_subroutine: parseSubroutineSubprogram (token); break; + + default: + if (isSubprogramPrefix (token)) + readToken (token); + else if (isTypeSpec (token)) + parseTypeSpec (token); + else + skipToNextStatement (token); + break; + } + } + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_interface)); + skipToNextStatement (token); + ancestorPop (); + deleteToken (name); +} + +/* entry-stmt is + * ENTRY entry-name [ ( dummy-arg-list ) ] + */ +static void parseEntryStmt (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_entry)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_ENTRY_POINT); + skipToNextStatement (token); +} + +/* stmt-function-stmt is + * function-name ([dummy-arg-name-list]) = scalar-expr + */ +static boolean parseStmtFunctionStmt (tokenInfo *const token) +{ + boolean result = FALSE; + Assert (isType (token, TOKEN_IDENTIFIER)); +#if 0 /* cannot reliably parse this yet */ + makeFortranTag (token, TAG_FUNCTION); +#endif + readToken (token); + if (isType (token, TOKEN_PAREN_OPEN)) + { + skipOverParens (token); + result = (boolean) (isType (token, TOKEN_OPERATOR) && + strcmp (vStringValue (token->string), "=") == 0); + } + skipToNextStatement (token); + return result; +} + +static boolean isIgnoredDeclaration (tokenInfo *const token) +{ + boolean result; + switch (token->keyword) + { + case KEYWORD_cexternal: + case KEYWORD_cglobal: + case KEYWORD_dllexport: + case KEYWORD_dllimport: + case KEYWORD_external: + case KEYWORD_format: + case KEYWORD_include: + case KEYWORD_inline: + case KEYWORD_parameter: + case KEYWORD_pascal: + case KEYWORD_pexternal: + case KEYWORD_pglobal: + case KEYWORD_static: + case KEYWORD_value: + case KEYWORD_virtual: + case KEYWORD_volatile: + result = TRUE; + break; + + default: + result = FALSE; + break; + } + return result; +} + +/* declaration-construct + * [derived-type-def] + * [interface-block] + * [type-declaration-stmt] + * [specification-stmt] + * [parameter-stmt] (is PARAMETER ( named-constant-def-list ) + * [format-stmt] (is FORMAT format-specification) + * [entry-stmt] + * [stmt-function-stmt] + */ +static boolean parseDeclarationConstruct (tokenInfo *const token) +{ + boolean result = TRUE; + switch (token->keyword) + { + case KEYWORD_entry: parseEntryStmt (token); break; + case KEYWORD_interface: parseInterfaceBlock (token); break; + case KEYWORD_stdcall: readToken (token); break; + /* derived type handled by parseTypeDeclarationStmt(); */ + + case KEYWORD_automatic: + readToken (token); + if (isTypeSpec (token)) + parseTypeDeclarationStmt (token); + else + skipToNextStatement (token); + result = TRUE; + break; + + default: + if (isIgnoredDeclaration (token)) + skipToNextStatement (token); + else if (isTypeSpec (token)) + { + parseTypeDeclarationStmt (token); + result = TRUE; + } + else if (isType (token, TOKEN_IDENTIFIER)) + result = parseStmtFunctionStmt (token); + else + result = parseSpecificationStmt (token); + break; + } + return result; +} + +/* implicit-part-stmt + * is [implicit-stmt] (is IMPLICIT etc.) + * or [parameter-stmt] (is PARAMETER etc.) + * or [format-stmt] (is FORMAT etc.) + * or [entry-stmt] (is ENTRY entry-name etc.) + */ +static boolean parseImplicitPartStmt (tokenInfo *const token) +{ + boolean result = TRUE; + switch (token->keyword) + { + case KEYWORD_entry: parseEntryStmt (token); break; + + case KEYWORD_implicit: + case KEYWORD_include: + case KEYWORD_parameter: + case KEYWORD_format: + skipToNextStatement (token); + break; + + default: result = FALSE; break; + } + return result; +} + +/* specification-part is + * [use-stmt] ... (is USE module-name etc.) + * [implicit-part] (is [implicit-part-stmt] ... [implicit-stmt]) + * [declaration-construct] ... + */ +static boolean parseSpecificationPart (tokenInfo *const token) +{ + boolean result = FALSE; + while (skipStatementIfKeyword (token, KEYWORD_use)) + result = TRUE; + while (parseImplicitPartStmt (token)) + result = TRUE; + while (parseDeclarationConstruct (token)) + result = TRUE; + return result; +} + +/* block-data is + * block-data-stmt (is BLOCK DATA [block-data-name] + * [specification-part] + * end-block-data-stmt (is END [BLOCK DATA [block-data-name]]) + */ +static void parseBlockData (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_block)); + readToken (token); + if (isKeyword (token, KEYWORD_data)) + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_BLOCK_DATA); + } + ancestorPush (token); + skipToNextStatement (token); + parseSpecificationPart (token); + while (! isKeyword (token, KEYWORD_end)) + skipToNextStatement (token); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_NONE) || + isSecondaryKeyword (token, KEYWORD_block)); + skipToNextStatement (token); + ancestorPop (); +} + +/* internal-subprogram-part is + * contains-stmt (is CONTAINS) + * internal-subprogram + * [internal-subprogram] ... + * + * internal-subprogram + * is function-subprogram + * or subroutine-subprogram + */ +static void parseInternalSubprogramPart (tokenInfo *const token) +{ + boolean done = FALSE; + if (isKeyword (token, KEYWORD_contains)) + skipToNextStatement (token); + do + { + switch (token->keyword) + { + case KEYWORD_function: parseFunctionSubprogram (token); break; + case KEYWORD_subroutine: parseSubroutineSubprogram (token); break; + case KEYWORD_end: done = TRUE; break; + + default: + if (isSubprogramPrefix (token)) + readToken (token); + else if (isTypeSpec (token)) + parseTypeSpec (token); + else + readToken (token); + break; + } + } while (! done); +} + +/* module is + * mudule-stmt (is MODULE module-name) + * [specification-part] + * [module-subprogram-part] + * end-module-stmt (is END [MODULE [module-name]]) + * + * module-subprogram-part + * contains-stmt (is CONTAINS) + * module-subprogram + * [module-subprogram] ... + * + * module-subprogram + * is function-subprogram + * or subroutine-subprogram + */ +static void parseModule (tokenInfo *const token) +{ + Assert (isKeyword (token, KEYWORD_module)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, TAG_MODULE); + ancestorPush (token); + skipToNextStatement (token); + parseSpecificationPart (token); + if (isKeyword (token, KEYWORD_contains)) + parseInternalSubprogramPart (token); + while (! isKeyword (token, KEYWORD_end)) + skipToNextStatement (token); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_NONE) || + isSecondaryKeyword (token, KEYWORD_module)); + skipToNextStatement (token); + ancestorPop (); +} + +/* execution-part + * executable-construct + * + * executable-contstruct is + * execution-part-construct [execution-part-construct] + * + * execution-part-construct + * is executable-construct + * or format-stmt + * or data-stmt + * or entry-stmt + */ +static boolean parseExecutionPart (tokenInfo *const token) +{ + boolean result = FALSE; + boolean done = FALSE; + while (! done) + { + switch (token->keyword) + { + default: + if (isSubprogramPrefix (token)) + readToken (token); + else + skipToNextStatement (token); + result = TRUE; + break; + + case KEYWORD_entry: + parseEntryStmt (token); + result = TRUE; + break; + + case KEYWORD_contains: + case KEYWORD_function: + case KEYWORD_subroutine: + done = TRUE; + break; + + case KEYWORD_end: + readSubToken (token); + if (isSecondaryKeyword (token, KEYWORD_do) || + isSecondaryKeyword (token, KEYWORD_if) || + isSecondaryKeyword (token, KEYWORD_select) || + isSecondaryKeyword (token, KEYWORD_where)) + { + skipToNextStatement (token); + result = TRUE; + } + else + done = TRUE; + break; + } + } + return result; +} + +static void parseSubprogram (tokenInfo *const token, const tagType tag) +{ + Assert (isKeyword (token, KEYWORD_program) || + isKeyword (token, KEYWORD_function) || + isKeyword (token, KEYWORD_subroutine)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeFortranTag (token, tag); + ancestorPush (token); + skipToNextStatement (token); + parseSpecificationPart (token); + parseExecutionPart (token); + if (isKeyword (token, KEYWORD_contains)) + parseInternalSubprogramPart (token); + Assert (isKeyword (token, KEYWORD_end)); + readSubToken (token); + Assert (isSecondaryKeyword (token, KEYWORD_NONE) || + isSecondaryKeyword (token, KEYWORD_program) || + isSecondaryKeyword (token, KEYWORD_function) || + isSecondaryKeyword (token, KEYWORD_subroutine)); + skipToNextStatement (token); + ancestorPop (); +} + + +/* function-subprogram is + * function-stmt (is [prefix] FUNCTION function-name etc.) + * [specification-part] + * [execution-part] + * [internal-subprogram-part] + * end-function-stmt (is END [FUNCTION [function-name]]) + * + * prefix + * is type-spec [RECURSIVE] + * or [RECURSIVE] type-spec + */ +static void parseFunctionSubprogram (tokenInfo *const token) +{ + parseSubprogram (token, TAG_FUNCTION); +} + +/* subroutine-subprogram is + * subroutine-stmt (is [RECURSIVE] SUBROUTINE subroutine-name etc.) + * [specification-part] + * [execution-part] + * [internal-subprogram-part] + * end-subroutine-stmt (is END [SUBROUTINE [function-name]]) + */ +static void parseSubroutineSubprogram (tokenInfo *const token) +{ + parseSubprogram (token, TAG_SUBROUTINE); +} + +/* main-program is + * [program-stmt] (is PROGRAM program-name) + * [specification-part] + * [execution-part] + * [internal-subprogram-part ] + * end-program-stmt + */ +static void parseMainProgram (tokenInfo *const token) +{ + parseSubprogram (token, TAG_PROGRAM); +} + +/* program-unit + * is main-program + * or external-subprogram (is function-subprogram or subroutine-subprogram) + * or module + * or block-data + */ +static void parseProgramUnit (tokenInfo *const token) +{ + readToken (token); + do + { + if (isType (token, TOKEN_STATEMENT_END)) + readToken (token); + else switch (token->keyword) + { + case KEYWORD_block: parseBlockData (token); break; + case KEYWORD_end: skipToNextStatement (token); break; + case KEYWORD_function: parseFunctionSubprogram (token); break; + case KEYWORD_module: parseModule (token); break; + case KEYWORD_program: parseMainProgram (token); break; + case KEYWORD_subroutine: parseSubroutineSubprogram (token); break; + + default: + if (isSubprogramPrefix (token)) + readToken (token); + else + { + boolean one = parseSpecificationPart (token); + boolean two = parseExecutionPart (token); + if (! (one || two)) + readToken (token); + } + break; + } + } while (TRUE); +} + +static boolean findFortranTags (const unsigned int passCount) +{ + tokenInfo *token; + exception_t exception; + boolean retry; + + Assert (passCount < 3); + Parent = newToken (); + token = newToken (); + FreeSourceForm = (boolean) (passCount > 1); + Column = 0; + exception = (exception_t) setjmp (Exception); + if (exception == ExceptionEOF) + retry = FALSE; + else if (exception == ExceptionFixedFormat && ! FreeSourceForm) + { + verbose ("%s: not fixed source form; retry as free source form\n", + getInputFileName ()); + retry = TRUE; + } + else + { + parseProgramUnit (token); + retry = FALSE; + } + ancestorClear (); + deleteToken (token); + deleteToken (Parent); + + return retry; +} + +static void initialize (const langType language) +{ + Lang_fortran = language; + buildFortranKeywordHash (); +} + +extern parserDefinition* FortranParser (void) +{ + static const char *const extensions [] = { + "f", "for", "ftn", "f77", "f90", "f95", +#ifndef CASE_INSENSITIVE_FILENAMES + "F", "FOR", "FTN", "F77", "F90", "F95", +#endif + NULL + }; + parserDefinition* def = parserNew ("Fortran"); + def->kinds = FortranKinds; + def->kindCount = KIND_COUNT (FortranKinds); + def->extensions = extensions; + def->parser2 = findFortranTags; + def->initialize = initialize; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/general.h b/sdk/ctags/general.h new file mode 100644 index 0000000000..294a2b9153 --- /dev/null +++ b/sdk/ctags/general.h @@ -0,0 +1,127 @@ +/* +* $Id: general.h,v 1.15 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Provides the general (non-ctags-specific) environment assumed by all. +*/ +#ifndef _GENERAL_H +#define _GENERAL_H + +/* +* INCLUDE FILES +*/ +#if defined (HAVE_CONFIG_H) +# include +#elif defined (AMIGA) +# include "e_amiga.h" +#elif defined (DJGPP) +# include "e_djgpp.h" +#elif defined (macintosh) +# include "e_mac.h" +#elif defined (MSDOS) || defined (WIN32) +# include "e_msoft.h" +#elif defined (OS2) +# include "e_os2.h" +#elif defined (QDOS) +# include "e_qdos.h" +#elif defined (RISCOS) +# include "e_riscos.h" +#elif defined (__vms) || defined (VMS) +# include "e_vms.h" +# ifndef VMS +# define VMS 1 +# endif +#endif + + +/* +* MACROS +*/ + +/* Define standard error destination + */ +#ifndef errout +# define errout stderr +#endif + +/* Define regex if supported */ +#if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN)) +# define HAVE_REGEX 1 +#endif + +/* This is a helpful internal feature of later versions (> 2.7) of GCC + * to prevent warnings about unused variables. + */ +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__)) +# define __unused__ __attribute__((unused)) +# define __printf__(s,f) __attribute__((format (printf, s, f))) +#else +# define __unused__ +# define __printf__(s,f) +#endif + +/* + * Portability macros + */ +#if !defined(HAVE_STRCASECMP) && !defined(strcasecmp) +# ifdef HAVE_STRICMP +# define strcasecmp(s1,s2) stricmp(s1,s2) +# else +# define strcasecmp(s1,s2) struppercmp(s1,s2) +# endif +#endif + +#if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp) +# ifdef HAVE_STRNICMP +# define strncasecmp(s1,s2,n) strnicmp(s1,s2,n) +# else +# define strncasecmp(s1,s2,n) strnuppercmp(s1,s2,n) +# endif +#endif + +/* +* DATA DECLARATIONS +*/ + +#undef FALSE +#undef TRUE +#ifdef VAXC +typedef enum { FALSE, TRUE } booleanType; +typedef int boolean; +#else +# ifdef __cplusplus +typedef bool boolean; +#define FALSE false +#define TRUE true +# else +typedef enum { FALSE, TRUE } boolean; +# endif +#endif + +#if ! defined (HAVE_FGETPOS) && ! defined (fpos_t) +# define fpos_t long +#endif + +/* +* FUNCTION PROTOTYPES +*/ + +#if defined (NEED_PROTO_REMOVE) && defined (HAVE_REMOVE) +extern int remove (const char *); +#endif + +#if defined (NEED_PROTO_UNLINK) && ! defined (HAVE_REMOVE) +extern void *unlink (const char *); +#endif + +#ifdef NEED_PROTO_GETENV +extern char *getenv (const char *); +#endif + +#endif /* _GENERAL_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/get.c b/sdk/ctags/get.c new file mode 100644 index 0000000000..27c35f084c --- /dev/null +++ b/sdk/ctags/get.c @@ -0,0 +1,656 @@ +/* +* $Id: get.c,v 1.9 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains the high level source read functions (preprocessor +* directives are handled within this level). +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "debug.h" +#include "entry.h" +#include "get.h" +#include "options.h" +#include "read.h" +#include "vstring.h" + +/* +* MACROS +*/ +#define stringMatch(s1,s2) (strcmp (s1,s2) == 0) +#define isspacetab(c) ((c) == SPACE || (c) == TAB) + +/* +* DATA DECLARATIONS +*/ +typedef enum { COMMENT_NONE, COMMENT_C, COMMENT_CPLUS } Comment; + +enum eCppLimits { + MaxCppNestingLevel = 20, + MaxDirectiveName = 10 +}; + +/* Defines the one nesting level of a preprocessor conditional. + */ +typedef struct sConditionalInfo { + boolean ignoreAllBranches; /* ignoring parent conditional branch */ + boolean singleBranch; /* choose only one branch */ + boolean branchChosen; /* branch already selected */ + boolean ignoring; /* current ignore state */ +} conditionalInfo; + +enum eState { + DRCTV_NONE, /* no known directive - ignore to end of line */ + DRCTV_DEFINE, /* "#define" encountered */ + DRCTV_HASH, /* initial '#' read; determine directive */ + DRCTV_IF, /* "#if" or "#ifdef" encountered */ + DRCTV_PRAGMA, /* #pragma encountered */ + DRCTV_UNDEF /* "#undef" encountered */ +}; + +/* Defines the current state of the pre-processor. + */ +typedef struct sCppState { + int ungetch, ungetch2; /* ungotten characters, if any */ + boolean resolveRequired; /* must resolve if/else/elif/endif branch */ + struct sDirective { + enum eState state; /* current directive being processed */ + boolean accept; /* is a directive syntatically permitted? */ + vString * name; /* macro name */ + unsigned int nestLevel; /* level 0 is not used */ + conditionalInfo ifdef [MaxCppNestingLevel]; + } directive; +} cppState; + +/* +* DATA DEFINITIONS +*/ + +/* Use brace formatting to detect end of block. + */ +static boolean BraceFormat = FALSE; + +static cppState Cpp = { + '\0', '\0', /* ungetch characters */ + FALSE, /* resolveRequired */ + { + DRCTV_NONE, /* state */ + FALSE, /* accept */ + NULL, /* tag name */ + 0, /* nestLevel */ + { {FALSE,FALSE,FALSE,FALSE} } /* ifdef array */ + } /* directive */ +}; + +/* +* FUNCTION DEFINITIONS +*/ + +extern boolean isBraceFormat (void) +{ + return BraceFormat; +} + +extern unsigned int getDirectiveNestLevel (void) +{ + return Cpp.directive.nestLevel; +} + +extern void cppInit (const boolean state) +{ + BraceFormat = state; + + Cpp.ungetch = '\0'; + Cpp.ungetch2 = '\0'; + Cpp.resolveRequired = FALSE; + + Cpp.directive.state = DRCTV_NONE; + Cpp.directive.accept = TRUE; + Cpp.directive.nestLevel = 0; + + Cpp.directive.ifdef [0].ignoreAllBranches = FALSE; + Cpp.directive.ifdef [0].singleBranch = FALSE; + Cpp.directive.ifdef [0].branchChosen = FALSE; + Cpp.directive.ifdef [0].ignoring = FALSE; + + if (Cpp.directive.name == NULL) + Cpp.directive.name = vStringNew (); + else + vStringClear (Cpp.directive.name); +} + +extern void cppTerminate (void) +{ + if (Cpp.directive.name != NULL) + { + vStringDelete (Cpp.directive.name); + Cpp.directive.name = NULL; + } +} + +extern void cppBeginStatement (void) +{ + Cpp.resolveRequired = TRUE; +} + +extern void cppEndStatement (void) +{ + Cpp.resolveRequired = FALSE; +} + +/* +* Scanning functions +* +* This section handles preprocessor directives. It strips out all +* directives and may emit a tag for #define directives. +*/ + +/* This puts a character back into the input queue for the source File. + * Up to two characters may be ungotten. + */ +extern void cppUngetc (const int c) +{ + Assert (Cpp.ungetch2 == '\0'); + Cpp.ungetch2 = Cpp.ungetch; + Cpp.ungetch = c; +} + +/* Reads a directive, whose first character is given by "c", into "name". + */ +static boolean readDirective (int c, char *const name, unsigned int maxLength) +{ + unsigned int i; + + for (i = 0 ; i < maxLength - 1 ; ++i) + { + if (i > 0) + { + c = fileGetc (); + if (c == EOF || ! isalpha (c)) + { + fileUngetc (c); + break; + } + } + name [i] = c; + } + name [i] = '\0'; /* null terminate */ + + return (boolean) isspacetab (c); +} + +/* Reads an identifier, whose first character is given by "c", into "tag", + * together with the file location and corresponding line number. + */ +static void readIdentifier (int c, vString *const name) +{ + vStringClear (name); + do + { + vStringPut (name, c); + } while (c = fileGetc (), (c != EOF && isident (c))); + fileUngetc (c); + vStringTerminate (name); +} + +static conditionalInfo *currentConditional (void) +{ + return &Cpp.directive.ifdef [Cpp.directive.nestLevel]; +} + +static boolean isIgnore (void) +{ + return Cpp.directive.ifdef [Cpp.directive.nestLevel].ignoring; +} + +static boolean setIgnore (const boolean ignore) +{ + return Cpp.directive.ifdef [Cpp.directive.nestLevel].ignoring = ignore; +} + +static boolean isIgnoreBranch (void) +{ + conditionalInfo *const ifdef = currentConditional (); + + /* Force a single branch if an incomplete statement is discovered + * en route. This may have allowed earlier branches containing complete + * statements to be followed, but we must follow no further branches. + */ + if (Cpp.resolveRequired && ! BraceFormat) + ifdef->singleBranch = TRUE; + + /* We will ignore this branch in the following cases: + * + * 1. We are ignoring all branches (conditional was within an ignored + * branch of the parent conditional) + * 2. A branch has already been chosen and either of: + * a. A statement was incomplete upon entering the conditional + * b. A statement is incomplete upon encountering a branch + */ + return (boolean) (ifdef->ignoreAllBranches || + (ifdef->branchChosen && ifdef->singleBranch)); +} + +static void chooseBranch (void) +{ + if (! BraceFormat) + { + conditionalInfo *const ifdef = currentConditional (); + + ifdef->branchChosen = (boolean) (ifdef->singleBranch || + Cpp.resolveRequired); + } +} + +/* Pushes one nesting level for an #if directive, indicating whether or not + * the branch should be ignored and whether a branch has already been chosen. + */ +static boolean pushConditional (const boolean firstBranchChosen) +{ + const boolean ignoreAllBranches = isIgnore (); /* current ignore */ + boolean ignoreBranch = FALSE; + + if (Cpp.directive.nestLevel < (unsigned int) MaxCppNestingLevel - 1) + { + conditionalInfo *ifdef; + + ++Cpp.directive.nestLevel; + ifdef = currentConditional (); + + /* We take a snapshot of whether there is an incomplete statement in + * progress upon encountering the preprocessor conditional. If so, + * then we will flag that only a single branch of the conditional + * should be followed. + */ + ifdef->ignoreAllBranches = ignoreAllBranches; + ifdef->singleBranch = Cpp.resolveRequired; + ifdef->branchChosen = firstBranchChosen; + ifdef->ignoring = (boolean) (ignoreAllBranches || ( + ! firstBranchChosen && ! BraceFormat && + (ifdef->singleBranch || !Option.if0))); + ignoreBranch = ifdef->ignoring; + } + return ignoreBranch; +} + +/* Pops one nesting level for an #endif directive. + */ +static boolean popConditional (void) +{ + if (Cpp.directive.nestLevel > 0) + --Cpp.directive.nestLevel; + + return isIgnore (); +} + +static void makeDefineTag (const char *const name) +{ + const boolean isFileScope = (boolean) (! isHeaderFile ()); + + if (includingDefineTags () && + (! isFileScope || Option.include.fileScope)) + { + tagEntryInfo e; + initTagEntry (&e, name); + e.lineNumberEntry = (boolean) (Option.locate != EX_PATTERN); + e.isFileScope = isFileScope; + e.truncateLine = TRUE; + e.kindName = "macro"; + e.kind = 'd'; + makeTagEntry (&e); + } +} + +static void directiveDefine (const int c) +{ + if (isident1 (c)) + { + readIdentifier (c, Cpp.directive.name); + if (! isIgnore ()) + makeDefineTag (vStringValue (Cpp.directive.name)); + } + Cpp.directive.state = DRCTV_NONE; +} + +static void directivePragma (int c) +{ + if (isident1 (c)) + { + readIdentifier (c, Cpp.directive.name); + if (stringMatch (vStringValue (Cpp.directive.name), "weak")) + { + /* generate macro tag for weak name */ + do + { + c = fileGetc (); + } while (c == SPACE); + if (isident1 (c)) + { + readIdentifier (c, Cpp.directive.name); + makeDefineTag (vStringValue (Cpp.directive.name)); + } + } + } + Cpp.directive.state = DRCTV_NONE; +} + +static boolean directiveIf (const int c) +{ + DebugStatement ( const boolean ignore0 = isIgnore (); ) + const boolean ignore = pushConditional ((boolean) (c != '0')); + + Cpp.directive.state = DRCTV_NONE; + DebugStatement ( debugCppNest (TRUE, Cpp.directive.nestLevel); + if (ignore != ignore0) debugCppIgnore (ignore); ) + + return ignore; +} + +static boolean directiveHash (const int c) +{ + boolean ignore = FALSE; + char directive [MaxDirectiveName]; + DebugStatement ( const boolean ignore0 = isIgnore (); ) + + readDirective (c, directive, MaxDirectiveName); + if (stringMatch (directive, "define")) + Cpp.directive.state = DRCTV_DEFINE; + else if (stringMatch (directive, "undef")) + Cpp.directive.state = DRCTV_UNDEF; + else if (strncmp (directive, "if", (size_t) 2) == 0) + Cpp.directive.state = DRCTV_IF; + else if (stringMatch (directive, "elif") || + stringMatch (directive, "else")) + { + ignore = setIgnore (isIgnoreBranch ()); + if (! ignore && stringMatch (directive, "else")) + chooseBranch (); + Cpp.directive.state = DRCTV_NONE; + DebugStatement ( if (ignore != ignore0) debugCppIgnore (ignore); ) + } + else if (stringMatch (directive, "endif")) + { + DebugStatement ( debugCppNest (FALSE, Cpp.directive.nestLevel); ) + ignore = popConditional (); + Cpp.directive.state = DRCTV_NONE; + DebugStatement ( if (ignore != ignore0) debugCppIgnore (ignore); ) + } + else if (stringMatch (directive, "pragma")) + Cpp.directive.state = DRCTV_PRAGMA; + else + Cpp.directive.state = DRCTV_NONE; + + return ignore; +} + +/* Handles a pre-processor directive whose first character is given by "c". + */ +static boolean handleDirective (const int c) +{ + boolean ignore = isIgnore (); + + switch (Cpp.directive.state) + { + case DRCTV_NONE: ignore = isIgnore (); break; + case DRCTV_DEFINE: directiveDefine (c); break; + case DRCTV_HASH: ignore = directiveHash (c); break; + case DRCTV_IF: ignore = directiveIf (c); break; + case DRCTV_PRAGMA: directivePragma (c); break; + case DRCTV_UNDEF: directiveDefine (c); break; + } + return ignore; +} + +/* Called upon reading of a slash ('/') characters, determines whether a + * comment is encountered, and its type. + */ +static Comment isComment (void) +{ + Comment comment; + const int next = fileGetc (); + + if (next == '*') + comment = COMMENT_C; + else if (next == '/') + comment = COMMENT_CPLUS; + else + { + fileUngetc (next); + comment = COMMENT_NONE; + } + return comment; +} + +/* Skips over a C style comment. According to ANSI specification a comment + * is treated as white space, so we perform this subsitution. + */ +static int skipOverCComment (void) +{ + int c = fileGetc (); + + while (c != EOF) + { + if (c != '*') + c = fileGetc (); + else + { + const int next = fileGetc (); + + if (next != '/') + c = next; + else + { + c = SPACE; /* replace comment with space */ + break; + } + } + } + return c; +} + +/* Skips over a C++ style comment. + */ +static int skipOverCplusComment (void) +{ + int c; + + while ((c = fileGetc ()) != EOF) + { + if (c == BACKSLASH) + fileGetc (); /* throw away next character, too */ + else if (c == NEWLINE) + break; + } + return c; +} + +/* Skips to the end of a string, returning a special character to + * symbolically represent a generic string. + */ +static int skipToEndOfString (void) +{ + int c; + + while ((c = fileGetc ()) != EOF) + { + if (c == BACKSLASH) + fileGetc (); /* throw away next character, too */ + else if (c == DOUBLE_QUOTE) + break; + } + return STRING_SYMBOL; /* symbolic representation of string */ +} + +/* Skips to the end of the three (possibly four) 'c' sequence, returning a + * special character to symbolically represent a generic character. + * Also detects Vera numbers that include a base specifier (ie. 'b1010). + */ +static int skipToEndOfChar (void) +{ + int c; + int count = 0, veraBase = '\0'; + + while ((c = fileGetc ()) != EOF) + { + ++count; + if (c == BACKSLASH) + fileGetc (); /* throw away next character, too */ + else if (c == SINGLE_QUOTE) + break; + else if (c == NEWLINE) + { + fileUngetc (c); + break; + } + else if (count == 1 && strchr ("DHOB", toupper (c)) != NULL) + veraBase = c; + else if (veraBase != '\0' && ! isalnum (c)) + { + fileUngetc (c); + break; + } + } + return CHAR_SYMBOL; /* symbolic representation of character */ +} + +/* This function returns the next character, stripping out comments, + * C pre-processor directives, and the contents of single and double + * quoted strings. In short, strip anything which places a burden upon + * the tokenizer. + */ +extern int cppGetc (void) +{ + boolean directive = FALSE; + boolean ignore = FALSE; + int c; + + if (Cpp.ungetch != '\0') + { + c = Cpp.ungetch; + Cpp.ungetch = Cpp.ungetch2; + Cpp.ungetch2 = '\0'; + return c; /* return here to avoid re-calling debugPutc () */ + } + else do + { + c = fileGetc (); +process: + switch (c) + { + case EOF: + ignore = FALSE; + directive = FALSE; + break; + + case TAB: + case SPACE: + break; /* ignore most white space */ + + case NEWLINE: + if (directive && ! ignore) + directive = FALSE; + Cpp.directive.accept = TRUE; + break; + + case DOUBLE_QUOTE: + Cpp.directive.accept = FALSE; + c = skipToEndOfString (); + break; + + case '#': + if (Cpp.directive.accept) + { + directive = TRUE; + Cpp.directive.state = DRCTV_HASH; + Cpp.directive.accept = FALSE; + } + break; + + case SINGLE_QUOTE: + Cpp.directive.accept = FALSE; + c = skipToEndOfChar (); + break; + + case '/': + { + const Comment comment = isComment (); + + if (comment == COMMENT_C) + c = skipOverCComment (); + else if (comment == COMMENT_CPLUS) + { + c = skipOverCplusComment (); + if (c == NEWLINE) + fileUngetc (c); + } + else + Cpp.directive.accept = FALSE; + break; + } + + case BACKSLASH: + { + int next = fileGetc (); + + if (next == NEWLINE) + continue; + else if (next == '?') + cppUngetc (next); + else + fileUngetc (next); + break; + } + + case '?': + { + int next = fileGetc (); + if (next != '?') + fileUngetc (next); + else + { + next = fileGetc (); + switch (next) + { + case '(': c = '['; break; + case ')': c = ']'; break; + case '<': c = '{'; break; + case '>': c = '}'; break; + case '/': c = BACKSLASH; goto process; + case '!': c = '|'; break; + case SINGLE_QUOTE: c = '^'; break; + case '-': c = '~'; break; + case '=': c = '#'; goto process; + default: + fileUngetc (next); + cppUngetc ('?'); + break; + } + } + } break; + + default: + Cpp.directive.accept = FALSE; + if (directive) + ignore = handleDirective (c); + break; + } + } while (directive || ignore); + + DebugStatement ( debugPutc (DEBUG_CPP, c); ) + DebugStatement ( if (c == NEWLINE) + debugPrintf (DEBUG_CPP, "%6ld: ", getInputLineNumber () + 1); ) + + return c; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/get.h b/sdk/ctags/get.h new file mode 100644 index 0000000000..73d8633cf4 --- /dev/null +++ b/sdk/ctags/get.h @@ -0,0 +1,49 @@ +/* +* $Id: get.h,v 1.4 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to get.c +*/ +#ifndef _GET_H +#define _GET_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include "ctags.h" /* to define langType */ + +/* +* MACROS +*/ +/* Is the character valid as a character of a C identifier? + * VMS allows '$' in identifiers. + */ +#define isident(c) (isalnum(c) || (c) == '_' || (c) == '$') + +/* Is the character valid as the first character of a C identifier? + * C++ allows '~' in destructors. + * VMS allows '$' in identifiers. + */ +#define isident1(c) (isalpha(c) || (c) == '_' || (c) == '~' || (c) == '$') + +/* +* FUNCTION PROTOTYPES +*/ +extern boolean isBraceFormat (void); +extern unsigned int getDirectiveNestLevel (void); +extern void cppInit (const boolean state); +extern void cppTerminate (void); +extern void cppBeginStatement (void); +extern void cppEndStatement (void); +extern void cppUngetc (const int c); +extern int cppGetc (void); + +#endif /* _GET_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/html.c b/sdk/ctags/html.c new file mode 100644 index 0000000000..62832ca17e --- /dev/null +++ b/sdk/ctags/html.c @@ -0,0 +1,49 @@ +/* +* $Id: html.c,v 1.2 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for HTML language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ +#include "parse.h" + +/* +* FUNCTION DEFINITIONS +*/ + +static void installHtmlRegex (const langType language) +{ +#define POSSIBLE_ATTRIBUTES "([ \t]+[a-z]+=\"?[^>\"]*\"?)*" + addTagRegex (language, + "\"]+)\"?" + POSSIBLE_ATTRIBUTES + "[ \t]*>", + "\\2", "a,anchor,named anchors", "i"); + + addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(", + "\\1", "f,function,JavaScript functions", NULL); +} + +/* Create parser definition stucture */ +extern parserDefinition* HtmlParser (void) +{ + static const char *const extensions [] = { "htm", "html", NULL }; + parserDefinition *const def = parserNew ("HTML"); + def->extensions = extensions; + def->initialize = installHtmlRegex; + def->regex = TRUE; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/jscript.c b/sdk/ctags/jscript.c new file mode 100644 index 0000000000..0bf1f76d92 --- /dev/null +++ b/sdk/ctags/jscript.c @@ -0,0 +1,40 @@ +/* +* $Id: jscript.c,v 1.2 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for JavaScript language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ +#include "parse.h" + +/* +* FUNCTION DEFINITIONS +*/ + +static void installJavaScriptRegex (const langType language) +{ + addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(", + "\\1", "f,function,functions", NULL); +} + +/* Create parser definition stucture */ +extern parserDefinition* JavaScriptParser (void) +{ + static const char *const extensions [] = { "js", NULL }; + parserDefinition *const def = parserNew ("JavaScript"); + def->extensions = extensions; + def->initialize = installJavaScriptRegex; + def->regex = TRUE; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/keyword.c b/sdk/ctags/keyword.c new file mode 100644 index 0000000000..2a3d0aa7ee --- /dev/null +++ b/sdk/ctags/keyword.c @@ -0,0 +1,249 @@ +/* +* $Id: keyword.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Manages a keyword hash. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "debug.h" +#include "keyword.h" +#include "options.h" +#include "routines.h" + +/* +* MACROS +*/ +#define HASH_EXPONENT 7 /* must be less than 17 */ + +/* +* DATA DECLARATIONS +*/ +typedef struct sHashEntry { + struct sHashEntry *next; + const char *string; + langType language; + int value; +} hashEntry; + +/* +* DATA DEFINITIONS +*/ +static const unsigned int TableSize = 1 << HASH_EXPONENT; +static hashEntry **HashTable = NULL; + +/* +* FUNCTION DEFINITIONS +*/ + +static hashEntry **getHashTable (void) +{ + static boolean allocated = FALSE; + + if (! allocated) + { + unsigned int i; + + HashTable = xMalloc (TableSize, hashEntry*); + + for (i = 0 ; i < TableSize ; ++i) + HashTable [i] = NULL; + + allocated = TRUE; + } + return HashTable; +} + +static hashEntry *getHashTableEntry (unsigned long hashedValue) +{ + hashEntry **const table = getHashTable (); + hashEntry *entry; + + Assert (hashedValue < TableSize); + entry = table [hashedValue]; + + return entry; +} + +static unsigned long hashValue (const char *const string) +{ + unsigned long value = 0; + const unsigned char *p; + + Assert (string != NULL); + + /* We combine the various words of the multiword key using the method + * described on page 512 of Vol. 3 of "The Art of Computer Programming". + */ + for (p = (const unsigned char *) string ; *p != '\0' ; ++p) + { + value <<= 1; + if (value & 0x00000100L) + value = (value & 0x000000ffL) + 1L; + value ^= *p; + } + /* Algorithm from page 509 of Vol. 3 of "The Art of Computer Programming" + * Treats "value" as a 16-bit integer plus 16-bit fraction. + */ + value *= 40503L; /* = 2^16 * 0.6180339887 ("golden ratio") */ + value &= 0x0000ffffL; /* keep fractional part */ + value >>= 16 - HASH_EXPONENT; /* scale up by hash size and move down */ + + return value; +} + +static hashEntry *newEntry ( + const char *const string, langType language, int value) +{ + hashEntry *const entry = xMalloc (1, hashEntry); + + entry->next = NULL; + entry->string = string; + entry->language = language; + entry->value = value; + + return entry; +} + +/* Note that it is assumed that a "value" of zero means an undefined keyword + * and clients of this function should observe this. Also, all keywords added + * should be added in lower case. If we encounter a case-sensitive language + * whose keywords are in upper case, we will need to redesign this. + */ +extern void addKeyword (const char *const string, langType language, int value) +{ + const unsigned long hashedValue = hashValue (string); + hashEntry *tableEntry = getHashTableEntry (hashedValue); + hashEntry *entry = tableEntry; + + if (entry == NULL) + { + hashEntry **const table = getHashTable (); + table [hashedValue] = newEntry (string, language, value); + } + else + { + hashEntry *prev = NULL; + + while (entry != NULL) + { + if (language == entry->language && + strcmp (string, entry->string) == 0) + { + Assert (("Already in table" == NULL)); + } + prev = entry; + entry = entry->next; + } + if (entry == NULL) + { + Assert (prev != NULL); + prev->next = newEntry (string, language, value); + } + } +} + +extern int lookupKeyword (const char *const string, langType language) +{ + const unsigned long hashedValue = hashValue (string); + hashEntry *entry = getHashTableEntry (hashedValue); + int result = -1; + + while (entry != NULL) + { + if (language == entry->language && strcmp (string, entry->string) == 0) + { + result = entry->value; + break; + } + entry = entry->next; + } + return result; +} + +extern void freeKeywordTable (void) +{ + if (HashTable != NULL) + { + unsigned int i; + + for (i = 0 ; i < TableSize ; ++i) + { + hashEntry *entry = HashTable [i]; + + while (entry != NULL) + { + hashEntry *next = entry->next; + eFree (entry); + entry = next; + } + } + eFree (HashTable); + } +} + +#ifdef DEBUG + +static void printEntry (const hashEntry *const entry) +{ + printf (" %-15s %-7s\n", entry->string, getLanguageName (entry->language)); +} + +static unsigned int printBucket (const unsigned int i) +{ + hashEntry **const table = getHashTable (); + hashEntry *entry = table [i]; + unsigned int measure = 1; + boolean first = TRUE; + + printf ("%2d:", i); + if (entry == NULL) + printf ("\n"); + else while (entry != NULL) + { + if (! first) + printf (" "); + else + { + printf (" "); + first = FALSE; + } + printEntry (entry); + entry = entry->next; + measure = 2 * measure; + } + return measure - 1; +} + +extern void printKeywordTable (void) +{ + unsigned long emptyBucketCount = 0; + unsigned long measure = 0; + unsigned int i; + + for (i = 0 ; i < TableSize ; ++i) + { + const unsigned int pass = printBucket (i); + + measure += pass; + if (pass == 0) + ++emptyBucketCount; + } + + printf ("spread measure = %ld\n", measure); + printf ("%ld empty buckets\n", emptyBucketCount); +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/keyword.h b/sdk/ctags/keyword.h new file mode 100644 index 0000000000..0b891816df --- /dev/null +++ b/sdk/ctags/keyword.h @@ -0,0 +1,33 @@ +/* +* $Id: keyword.h,v 1.3 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to keyword.c +*/ +#ifndef _KEYWORD_H +#define _KEYWORD_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include "parse.h" + +/* +* FUNCTION PROTOTYPES +*/ +extern void addKeyword (const char *const string, langType language, int value); +extern int lookupKeyword (const char *const string, langType language); +extern void freeKeywordTable (void); +#ifdef DEBUG +extern void printKeywordTable (void); +#endif + +#endif /* _KEYWORD_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/lisp.c b/sdk/ctags/lisp.c new file mode 100644 index 0000000000..cee5c176ad --- /dev/null +++ b/sdk/ctags/lisp.c @@ -0,0 +1,139 @@ +/* +* $Id: lisp.c,v 1.3 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for LISP files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FUNCTION +} lispKind; + +static kindOption LispKinds [] = { + { TRUE, 'f', "function", "functions" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +/* + * lisp tag functions + * look for (def or (DEF, quote or QUOTE + */ +static int L_isdef (const unsigned char *strp) +{ + return ( (strp [1] == 'd' || strp [1] == 'D') + && (strp [2] == 'e' || strp [2] == 'E') + && (strp [3] == 'f' || strp [3] == 'F')); +} + +static int L_isquote (const unsigned char *strp) +{ + return ( (*(++strp) == 'q' || *strp == 'Q') + && (*(++strp) == 'u' || *strp == 'U') + && (*(++strp) == 'o' || *strp == 'O') + && (*(++strp) == 't' || *strp == 'T') + && (*(++strp) == 'e' || *strp == 'E') + && isspace (*(++strp))); +} + +static void L_getit (vString *const name, const unsigned char *dbp) +{ + const unsigned char *p; + + if (*dbp == '\'') /* Skip prefix quote */ + dbp++; + else if (*dbp == '(' && L_isquote (dbp)) /* Skip "(quote " */ + { + dbp += 7; + while (isspace (*dbp)) + dbp++; + } + for (p=dbp ; *p!='\0' && *p!='(' && !isspace ((int) *p) && *p!=')' ; p++) + vStringPut (name, *p); + vStringTerminate (name); + + if (vStringLength (name) > 0) + makeSimpleTag (name, LispKinds, K_FUNCTION); + vStringClear (name); +} + +/* Algorithm adapted from from GNU etags. + */ +static void findLispTags (void) +{ + vString *name = vStringNew (); + const unsigned char* p; + + + while ((p = fileReadLine ()) != NULL) + { + if (*p == '(') + { + if (L_isdef (p)) + { + while (*p != '\0' && !isspace ((int) *p)) + p++; + while (isspace ((int) *p)) + p++; + L_getit (name, p); + } + else + { + /* Check for (foo::defmumble name-defined ... */ + do + p++; + while (*p != '\0' && !isspace ((int) *p) + && *p != ':' && *p != '(' && *p != ')'); + if (*p == ':') + { + do + p++; + while (*p == ':'); + + if (L_isdef (p - 1)) + { + while (*p != '\0' && !isspace ((int) *p)) + p++; + while (isspace (*p)) + p++; + L_getit (name, p); + } + } + } + } + } + vStringDelete (name); +} + +extern parserDefinition* LispParser (void) +{ + static const char *const extensions [] = { + "cl", "clisp", "el", "l", "lisp", "lsp", "ml", NULL + }; + parserDefinition* def = parserNew ("Lisp"); + def->kinds = LispKinds; + def->kindCount = KIND_COUNT (LispKinds); + def->extensions = extensions; + def->parser = findLispTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/lregex.c b/sdk/ctags/lregex.c new file mode 100644 index 0000000000..304696cfd1 --- /dev/null +++ b/sdk/ctags/lregex.c @@ -0,0 +1,696 @@ +/* +* $Id: lregex.c,v 1.7 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for applying regular expression matching. +* +* The code for utlizing the Gnu regex package with regards to processing the +* regex option and checking for regex matches was adapted from routines in +* Gnu etags. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#ifdef HAVE_REGCOMP +# include +# include +# ifdef HAVE_SYS_TYPES_H +# include /* declare off_t (not known to regex.h on FreeBSD) */ +# endif +# include "regex.h" +#endif + +#include "debug.h" +#include "entry.h" +#include "parse.h" +#include "read.h" +#include "routines.h" + +#ifdef HAVE_REGEX + +/* +* MACROS +*/ + +/* Back-references \0 through \9 */ +#define BACK_REFERENCE_COUNT 10 + +#if defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN) +# define POSIX_REGEX +#endif + +#define REGEX_NAME "Regex" + +/* +* DATA DECLARATIONS +*/ +#if defined (POSIX_REGEX) + +struct sKind { + boolean enabled; + char letter; + char* name; + char* description; +}; + +enum pType { PTRN_TAG, PTRN_CALLBACK }; + +typedef struct { + regex_t *pattern; + enum pType type; + union { + struct { + char *name_pattern; + struct sKind kind; + } tag; + struct { + regexCallback function; + } callback; + } u; +} regexPattern; + +#endif + +typedef struct { + regexPattern *patterns; + unsigned int count; +} patternSet; + +/* +* DATA DEFINITIONS +*/ + +static boolean regexBroken = FALSE; + +/* Array of pattern sets, indexed by language */ +static patternSet* Sets = NULL; +static int SetUpper = -1; /* upper language index in list */ + +/* +* FUNCTION DEFINITIONS +*/ + +static void clearPatternSet (const langType language) +{ + if (language < SetUpper) + { + patternSet* const set = Sets + language; + unsigned int i; + for (i = 0 ; i < set->count ; ++i) + { +#if defined (POSIX_REGEX) + regfree (set->patterns [i].pattern); +#endif + eFree (set->patterns [i].pattern); + set->patterns [i].pattern = NULL; + + if (set->patterns [i].type == PTRN_TAG) + { + eFree (set->patterns [i].u.tag.name_pattern); + set->patterns [i].u.tag.name_pattern = NULL; + } + } + if (set->patterns != NULL) + eFree (set->patterns); + set->patterns = NULL; + set->count = 0; + } +} + +/* +* Regex psuedo-parser +*/ + +static void makeRegexTag ( + const vString* const name, const struct sKind* const kind) +{ + if (kind->enabled) + { + tagEntryInfo e; + Assert (name != NULL && vStringLength (name) > 0); + Assert (kind != NULL); + initTagEntry (&e, vStringValue (name)); + e.kind = kind->letter; + e.kindName = kind->name; + makeTagEntry (&e); + } +} + +/* +* Regex pattern definition +*/ + +/* Take a string like "/blah/" and turn it into "blah", making sure + * that the first and last characters are the same, and handling + * quoted separator characters. Actually, stops on the occurrence of + * an unquoted separator. Also turns "\t" into a Tab character. + * Returns pointer to terminating separator. Works in place. Null + * terminates name string. + */ +static char* scanSeparators (char* name) +{ + char sep = name [0]; + char *copyto = name; + boolean quoted = FALSE; + + for (++name ; *name != '\0' ; ++name) + { + if (quoted) + { + if (*name == sep) + *copyto++ = sep; + else if (*name == 't') + *copyto++ = '\t'; + else + { + /* Something else is quoted, so preserve the quote. */ + *copyto++ = '\\'; + *copyto++ = *name; + } + quoted = FALSE; + } + else if (*name == '\\') + quoted = TRUE; + else if (*name == sep) + { + break; + } + else + *copyto++ = *name; + } + *copyto = '\0'; + return name; +} + +/* Parse `regexp', in form "/regex/name/[k,Kind/]flags" (where the separator + * character is whatever the first character of `regexp' is), by breaking it + * up into null terminated strings, removing the separators, and expanding + * '\t' into tabs. When complete, `regexp' points to the line matching + * pattern, a pointer to the name matching pattern is written to `name', a + * pointer to the kinds is written to `kinds' (possibly NULL), and a pointer + * to the trailing flags is written to `flags'. If the pattern is not in the + * correct format, a false value is returned. + */ +static boolean parseTagRegex ( + char* const regexp, char** const name, + char** const kinds, char** const flags) +{ + boolean result = FALSE; + const int separator = (unsigned char) regexp [0]; + + *name = scanSeparators (regexp); + if (*regexp == '\0') + error (WARNING, "empty regexp"); + else if (**name != separator) + error (WARNING, "%s: incomplete regexp", regexp); + else + { + char* const third = scanSeparators (*name); + if (**name == '\0') + error (WARNING, "%s: regexp missing name pattern", regexp); + if ((*name) [strlen (*name) - 1] == '\\') + error (WARNING, "error in name pattern: \"%s\"", *name); + if (*third != separator) + error (WARNING, "%s: regexp missing final separator", regexp); + else + { + char* const fourth = scanSeparators (third); + if (*fourth == separator) + { + *kinds = third; + scanSeparators (fourth); + *flags = fourth; + } + else + { + *flags = third; + *kinds = NULL; + } + result = TRUE; + } + } + return result; +} + +static void addCompiledTagPattern ( + const langType language, regex_t* const pattern, + char* const name, const char kind, char* const kindName, + char *const description) +{ + patternSet* set; + regexPattern *ptrn; + if (language > SetUpper) + { + int i; + Sets = xRealloc (Sets, (language + 1), patternSet); + for (i = SetUpper + 1 ; i <= language ; ++i) + { + Sets [i].patterns = NULL; + Sets [i].count = 0; + } + SetUpper = language; + } + set = Sets + language; + set->patterns = xRealloc (set->patterns, (set->count + 1), regexPattern); + ptrn = &set->patterns [set->count]; + set->count += 1; + + ptrn->pattern = pattern; + ptrn->type = PTRN_TAG; + ptrn->u.tag.name_pattern = name; + ptrn->u.tag.kind.enabled = TRUE; + ptrn->u.tag.kind.letter = kind; + ptrn->u.tag.kind.name = kindName; + ptrn->u.tag.kind.description = description; +} + +static void addCompiledCallbackPattern ( + const langType language, regex_t* const pattern, + const regexCallback callback) +{ + patternSet* set; + regexPattern *ptrn; + if (language > SetUpper) + { + int i; + Sets = xRealloc (Sets, (language + 1), patternSet); + for (i = SetUpper + 1 ; i <= language ; ++i) + { + Sets [i].patterns = NULL; + Sets [i].count = 0; + } + SetUpper = language; + } + set = Sets + language; + set->patterns = xRealloc (set->patterns, (set->count + 1), regexPattern); + ptrn = &set->patterns [set->count]; + set->count += 1; + + ptrn->pattern = pattern; + ptrn->type = PTRN_CALLBACK; + ptrn->u.callback.function = callback; +} + +#if defined (POSIX_REGEX) + +static regex_t* compileRegex (const char* const regexp, const char* const flags) +{ + int cflags = REG_EXTENDED | REG_NEWLINE; + regex_t *result = NULL; + int errcode; + int i; + for (i = 0 ; flags != NULL && flags [i] != '\0' ; ++i) + { + switch ((int) flags [i]) + { + case 'b': cflags &= ~REG_EXTENDED; break; + case 'e': cflags |= REG_EXTENDED; break; + case 'i': cflags |= REG_ICASE; break; + default: error (WARNING, "unknown regex flag: '%c'", *flags); break; + } + } + result = xMalloc (1, regex_t); + errcode = regcomp (result, regexp, cflags); + if (errcode != 0) + { + char errmsg[256]; + regerror (errcode, result, errmsg, 256); + error (WARNING, "%s", errmsg); + regfree (result); + eFree (result); + result = NULL; + } + return result; +} + +#endif + +static void parseKinds ( + const char* const kinds, char* const kind, char** const kindName, + char **description) +{ + *kind = '\0'; + *kindName = NULL; + *description = NULL; + if (kinds == NULL || kinds [0] == '\0') + { + *kind = 'r'; + *kindName = eStrdup ("regex"); + } + else if (kinds [0] != '\0') + { + const char* k = kinds; + if (k [0] != ',' && (k [1] == ',' || k [1] == '\0')) + *kind = *k++; + else + *kind = 'r'; + if (*k == ',') + ++k; + if (k [0] == '\0') + *kindName = eStrdup ("regex"); + else + { + const char *const comma = strchr (k, ','); + if (comma == NULL) + *kindName = eStrdup (k); + else + { + *kindName = (char*) eMalloc (comma - k + 1); + strncpy (*kindName, k, comma - k); + (*kindName) [comma - k] = '\0'; + k = comma + 1; + if (k [0] != '\0') + *description = eStrdup (k); + } + } + } +} + +static void printRegexKind (const regexPattern *pat, unsigned int i, boolean indent) +{ + const struct sKind *const kind = &pat [i].u.tag.kind; + const char *const indentation = indent ? " " : ""; + Assert (pat [i].type == PTRN_TAG); + printf ("%s%c %s %s\n", indentation, + kind->letter != '\0' ? kind->letter : '?', + kind->description != NULL ? kind->description : kind->name, + kind->enabled ? "" : " [off]"); +} + +static void processLanguageRegex (const langType language, + const char* const parameter) +{ + if (parameter == NULL || parameter [0] == '\0') + clearPatternSet (language); + else if (parameter [0] != '@') + addLanguageRegex (language, parameter); + else if (! doesFileExist (parameter + 1)) + error (WARNING, "cannot open regex file"); + else + { + const char* regexfile = parameter + 1; + FILE* const fp = fopen (regexfile, "r"); + if (fp == NULL) + error (WARNING | PERROR, regexfile); + else + { + vString* const regex = vStringNew (); + while (readLine (regex, fp)) + addLanguageRegex (language, vStringValue (regex)); + fclose (fp); + vStringDelete (regex); + } + } +} + +/* +* Regex pattern matching +*/ + +#if defined (POSIX_REGEX) + +static vString* substitute ( + const char* const in, const char* out, + const int nmatch, const regmatch_t* const pmatch) +{ + vString* result = vStringNew (); + const char* p; + for (p = out ; *p != '\0' ; p++) + { + if (*p == '\\' && isdigit ((int) *++p)) + { + const int dig = *p - '0'; + if (0 < dig && dig < nmatch && pmatch [dig].rm_so != -1) + { + const int diglen = pmatch [dig].rm_eo - pmatch [dig].rm_so; + vStringNCatS (result, in + pmatch [dig].rm_so, diglen); + } + } + else if (*p != '\n' && *p != '\r') + vStringPut (result, *p); + } + vStringTerminate (result); + return result; +} + +static void matchTagPattern (const vString* const line, + const regexPattern* const patbuf, + const regmatch_t* const pmatch) +{ + vString *const name = substitute (vStringValue (line), + patbuf->u.tag.name_pattern, BACK_REFERENCE_COUNT, pmatch); + vStringStripLeading (name); + vStringStripTrailing (name); + if (vStringLength (name) > 0) + makeRegexTag (name, &patbuf->u.tag.kind); + else + error (WARNING, "%s:%ld: null expansion of name pattern \"%s\"", + getInputFileName (), getInputLineNumber (), + patbuf->u.tag.name_pattern); + vStringDelete (name); +} + +static void matchCallbackPattern ( + const vString* const line, const regexPattern* const patbuf, + const regmatch_t* const pmatch) +{ + regexMatch matches [BACK_REFERENCE_COUNT]; + unsigned int count = 0; + int i; + for (i = 0 ; i < BACK_REFERENCE_COUNT && pmatch [i].rm_so != -1 ; ++i) + { + matches [i].start = pmatch [i].rm_so; + matches [i].length = pmatch [i].rm_eo - pmatch [i].rm_so; + ++count; + } + patbuf->u.callback.function (vStringValue (line), matches, count); +} + +static boolean matchRegexPattern (const vString* const line, + const regexPattern* const patbuf) +{ + boolean result = FALSE; + regmatch_t pmatch [BACK_REFERENCE_COUNT]; + const int match = regexec (patbuf->pattern, vStringValue (line), + BACK_REFERENCE_COUNT, pmatch, 0); + if (match == 0) + { + result = TRUE; + if (patbuf->type == PTRN_TAG) + matchTagPattern (line, patbuf, pmatch); + else if (patbuf->type == PTRN_CALLBACK) + matchCallbackPattern (line, patbuf, pmatch); + else + { + Assert ("invalid pattern type" == NULL); + result = FALSE; + } + } + return result; +} + +#endif + +/* PUBLIC INTERFACE */ + +/* Match against all patterns for specified language. Returns true if at least + * on pattern matched. + */ +extern boolean matchRegex (const vString* const line, const langType language) +{ + boolean result = FALSE; + if (language != LANG_IGNORE && language <= SetUpper && + Sets [language].count > 0) + { + const patternSet* const set = Sets + language; + unsigned int i; + for (i = 0 ; i < set->count ; ++i) + if (matchRegexPattern (line, set->patterns + i)) + result = TRUE; + } + return result; +} + +extern void findRegexTags (void) +{ + /* merely read all lines of the file */ + while (fileReadLine () != NULL) + ; +} + +#endif /* HAVE_REGEX */ + +extern void addTagRegex ( + const langType language __unused__, + const char* const regex __unused__, + const char* const name __unused__, + const char* const kinds __unused__, + const char* const flags __unused__) +{ +#ifdef HAVE_REGEX + Assert (regex != NULL); + Assert (name != NULL); + if (! regexBroken) + { + regex_t* const cp = compileRegex (regex, flags); + if (cp != NULL) + { + char kind; + char* kindName; + char* description; + parseKinds (kinds, &kind, &kindName, &description); + addCompiledTagPattern (language, cp, eStrdup (name), + kind, kindName, description); + } + } +#endif +} + +extern void addCallbackRegex ( + const langType language __unused__, + const char* const regex __unused__, + const char* const flags __unused__, + const regexCallback callback __unused__) +{ +#ifdef HAVE_REGEX + Assert (regex != NULL); + if (! regexBroken) + { + regex_t* const cp = compileRegex (regex, flags); + if (cp != NULL) + addCompiledCallbackPattern (language, cp, callback); + } +#endif +} + +extern void addLanguageRegex ( + const langType language __unused__, const char* const regex __unused__) +{ +#ifdef HAVE_REGEX + if (! regexBroken) + { + char *const regex_pat = eStrdup (regex); + char *name, *kinds, *flags; + if (parseTagRegex (regex_pat, &name, &kinds, &flags)) + { + addTagRegex (language, regex_pat, name, kinds, flags); + eFree (regex_pat); + } + } +#endif +} + +/* +* Regex option parsing +*/ + +extern boolean processRegexOption (const char *const option, + const char *const parameter __unused__) +{ + boolean handled = FALSE; + const char* const dash = strchr (option, '-'); + if (dash != NULL && strncmp (option, "regex", dash - option) == 0) + { +#ifdef HAVE_REGEX + langType language; + language = getNamedLanguage (dash + 1); + if (language == LANG_IGNORE) + error (WARNING, "unknown language in --%s option", option); + else + processLanguageRegex (language, parameter); +#else + error (WARNING, "regex support not available; required for --%s option", + option); +#endif + handled = TRUE; + } + return handled; +} + +extern void disableRegexKinds (const langType language __unused__) +{ +#ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) + { + patternSet* const set = Sets + language; + unsigned int i; + for (i = 0 ; i < set->count ; ++i) + if (set->patterns [i].type == PTRN_TAG) + set->patterns [i].u.tag.kind.enabled = FALSE; + } +#endif +} + +extern boolean enableRegexKind ( + const langType language __unused__, + const int kind __unused__, const boolean mode __unused__) +{ + boolean result = FALSE; +#ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) + { + patternSet* const set = Sets + language; + unsigned int i; + for (i = 0 ; i < set->count ; ++i) + if (set->patterns [i].type == PTRN_TAG && + set->patterns [i].u.tag.kind.letter == kind) + { + set->patterns [i].u.tag.kind.enabled = mode; + result = TRUE; + } + } +#endif + return result; +} + +extern void printRegexKinds (const langType language __unused__, boolean indent) +{ +#ifdef HAVE_REGEX + if (language <= SetUpper && Sets [language].count > 0) + { + patternSet* const set = Sets + language; + unsigned int i; + for (i = 0 ; i < set->count ; ++i) + if (set->patterns [i].type == PTRN_TAG) + printRegexKind (set->patterns, i, indent); + } +#endif +} + +extern void freeRegexResources (void) +{ +#ifdef HAVE_REGEX + int i; + for (i = 0 ; i <= SetUpper ; ++i) + clearPatternSet (i); + if (Sets != NULL) + eFree (Sets); + Sets = NULL; + SetUpper = -1; +#endif +} + +/* Check for broken regcomp() on Cygwin */ +extern void checkRegex (void) +{ +#if defined (HAVE_REGEX) && defined (CHECK_REGCOMP) + regex_t patbuf; + int errcode; + if (regcomp (&patbuf, "/hello/", 0) != 0) + { + error (WARNING, "Disabling broken regex"); + regexBroken = TRUE; + } +#endif +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/lua.c b/sdk/ctags/lua.c new file mode 100644 index 0000000000..d8a072093a --- /dev/null +++ b/sdk/ctags/lua.c @@ -0,0 +1,133 @@ +/* +* $Id: lua.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2001, Max Ischenko . +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Lua language. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "options.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FUNCTION +} luaKind; + +static kindOption LuaKinds [] = { + { TRUE, 'f', "function", "functions" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +/* for debugging purposes */ +static void __unused__ print_string (char *p, char *q) +{ + for ( ; p != q; p++) + fprintf (errout, "%c", *p); + fprintf (errout, "\n"); +} + +/* + * Helper function. + * Returns 1 if line looks like a line of Lua code. + * + * TODO: Recognize UNIX bang notation. + * (Lua treat first line as a comment if it starts with #!) + * + */ +static boolean is_a_code_line (const unsigned char *line) +{ + boolean result; + const unsigned char *p = line; + while (isspace ((int) *p)) + p++; + if (p [0] == '\0') + result = FALSE; + else if (p [0] == '-' && p [1] == '-') + result = FALSE; + else + result = TRUE; + return result; +} + +static void extract_name (const char *begin, const char *end, vString *name) +{ + if (begin != NULL && end != NULL && begin < end) + { + const char *cp; + + while (isspace ((int) *begin)) + begin++; + while (isspace ((int) *end)) + end--; + if (begin < end) + { + for (cp = begin ; cp != end; cp++) + vStringPut (name, (int) *cp); + vStringTerminate (name); + + makeSimpleTag (name, LuaKinds, K_FUNCTION); + vStringClear (name); + } + } +} + +static void findLuaTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const char *p, *q; + + if (! is_a_code_line (line)) + continue; + + p = (const char*) strstr ((const char*) line, "function"); + if (p == NULL) + continue; + + q = strchr ((const char*) line, '='); + + if (q == NULL) { + p = p + 9; /* skip the `function' word */ + q = strchr ((const char*) p, '('); + extract_name (p, q, name); + } else { + p = (const char*) &line[0]; + extract_name (p, q, name); + } + } + vStringDelete (name); +} + +extern parserDefinition* LuaParser (void) +{ + static const char* const extensions [] = { "lua", NULL }; + parserDefinition* def = parserNew ("Lua"); + def->kinds = LuaKinds; + def->kindCount = KIND_COUNT (LuaKinds); + def->extensions = extensions; + def->parser = findLuaTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/mac.c b/sdk/ctags/mac.c new file mode 100644 index 0000000000..d8c17b9a85 --- /dev/null +++ b/sdk/ctags/mac.c @@ -0,0 +1,273 @@ +/* +* $Id: mac.c,v 1.2 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2001, Maarten L. Hekkelman +* +* Author: Maarten L. Hekkelman +* http://www.hekkelman.com +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. It is provided on an as-is basis and no +* responsibility is accepted for its failure to perform as expected. +* +* This module contains support functions for Exuberant Ctags on Macintosh. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" + +#include +#include +#include +#include +#include + +/* +* FUNCTION DEFINITIONS +*/ + +static int get_path(const char* in_unix_path, unsigned char* out_mac_path) +{ + int l = strlen(in_unix_path); + int result = 0; + + if (l > 254) + result = -1; + else + { + const char* s = in_unix_path; + char *d = (char*)out_mac_path + 1; + + if (*s != '/') + *d++ = ':'; + else + ++s; + + while (*s) + { + if (s[0] == '.' && s[1] == '.' && s[2] == '/') + { + s += 3; + *d++ = ':'; + } + else if (s[0] == '.' && s[1] == '/') + s += 2; + else if (s[0] == '/') + { + *d++ = ':'; + + ++s; + while (*s == '/') + ++s; + } + else + *d++ = *s++; + } + + out_mac_path[0] = (d - (char*)out_mac_path) - 1; + } + + return result; +} + +DIR *opendir(const char *dirname) +{ + DIR* dirp = (DIR*)calloc(1, sizeof(DIR)); + + if (dirp != NULL) + { + OSErr err; + Str255 s; + CInfoPBRec pb = { 0 }; + + if (strcmp(dirname, ".")) + { + get_path(dirname, s); + pb.hFileInfo.ioNamePtr = s; + } + else + pb.hFileInfo.ioNamePtr = NULL; + + err = PBGetCatInfoSync(&pb); + if (err != noErr || (pb.hFileInfo.ioFlAttrib & ioDirMask) == 0) + { + free(dirp); + dirp = NULL; + } + else + { + dirp->file.vRefNum = pb.hFileInfo.ioVRefNum; + dirp->file.parID = pb.hFileInfo.ioDirID; + dirp->file.name[0] = '\0'; + dirp->index = 1; + } + } + + return dirp; +} + +struct dirent *readdir(DIR *dirp) +{ + if (dirp) + { + CInfoPBRec pb = { 0 }; + + pb.hFileInfo.ioVRefNum = dirp->file.vRefNum; + pb.hFileInfo.ioDirID = dirp->file.parID; + pb.hFileInfo.ioFDirIndex = dirp->index++; + pb.hFileInfo.ioNamePtr = dirp->file.name; + + if (PBGetCatInfoSync(&pb) != noErr) + return NULL; + + memcpy(dirp->ent.d_name, dirp->file.name + 1, dirp->file.name[0]); + dirp->ent.d_name[dirp->file.name[0]] = 0; + return &dirp->ent; + } + return NULL; +} + +int closedir(DIR *dirp) +{ + if (dirp) + free(dirp); + return 0; +} + +void rewinddir(DIR *dirp) +{ + if (dirp) + dirp->index = 1; +} + +int mstat(const char* file, struct stat* st) +{ + CInfoPBRec pb; + unsigned char path[256]; + int result = 0; + + memset(&pb, 0, sizeof(CInfoPBRec)); + + if (strcmp(file, ".") == 0) + { + memset(st, 0, sizeof(struct stat)); + st->st_mode = S_IFDIR; + st->st_ino = -1; + } + else + { + result = get_path(file, path); + + if (result == 0) + { + pb.hFileInfo.ioNamePtr = path; + + if (PBGetCatInfoSync(&pb) != noErr) + result = -1; + else + { + memset(st, 0, sizeof(struct stat)); + + if (pb.hFileInfo.ioFlAttrib & ioDirMask) + st->st_mode = S_IFDIR; + else + st->st_mode = S_IFREG; + + st->st_ino = pb.hFileInfo.ioFlStBlk; + st->st_dev = pb.hFileInfo.ioVRefNum; + st->st_nlink = 1; + st->st_size = pb.hFileInfo.ioFlLgLen; + st->st_atime = pb.hFileInfo.ioFlMdDat; + st->st_mtime = pb.hFileInfo.ioFlMdDat; + st->st_ctime = pb.hFileInfo.ioFlCrDat; + } + } + } + + return result; +} + +#undef fopen + +FILE* mfopen(const char* file, const char* mode) +{ + unsigned char path[256]; + + if (get_path(file, path) == 0) + { + int l = path[0]; + memmove(path, path + 1, l); + path[l] = 0; + return fopen((char*)path, mode); + } + else + return NULL; +} + +char* getcwd(char* out_path, int out_path_len) +{ + OSErr err = noErr; + CInfoPBRec pb; + FSSpec cwd; + + if (out_path == NULL) + { + if (out_path_len < PATH_MAX) + out_path_len = PATH_MAX; + out_path = (char*)malloc(out_path_len); + } + + err = FSMakeFSSpec(0, 0, "\p:", &cwd); + + if (cwd.parID == fsRtParID) + { + *out_path = '/'; + memcpy(out_path + 1, cwd.name + 1, cwd.name[0]); + out_path[1 + cwd.name[0]] = 0; + } + else + { + /* The object isn't a volume */ + + /* Is the object a file or a directory? */ + + char t[PATH_MAX]; + char* s; + + s = t + PATH_MAX - cwd.name[0] - 1; + memcpy(s, cwd.name + 1, cwd.name[0]); + s[cwd.name[0]] = 0; + + /* Get the ancestor directory names */ + pb.dirInfo.ioNamePtr = cwd.name; + pb.dirInfo.ioVRefNum = cwd.vRefNum; + pb.dirInfo.ioDrParID = cwd.parID; + do /* loop until we have an error or find the root directory */ + { + pb.dirInfo.ioFDirIndex = -1; + pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; + err = PBGetCatInfoSync(&pb); + if ( err == noErr ) + { + *--s = '/'; + s -= cwd.name[0]; + memcpy(s, cwd.name + 1, cwd.name[0]); + } + } + while (err == noErr && pb.dirInfo.ioDrDirID != fsRtDirID && s > t + 1); + + if (s > t + 1) + { + *--s = '/'; + strcpy(out_path, s); + } + else + strcpy(out_path, "."); + } + + return out_path; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/main.c b/sdk/ctags/main.c new file mode 100644 index 0000000000..a5af4e8611 --- /dev/null +++ b/sdk/ctags/main.c @@ -0,0 +1,582 @@ +/* +* $Id: main.c,v 1.24 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* Author: Darren Hiebert +* http://ctags.sourceforge.net +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. It is provided on an as-is basis and no +* responsibility is accepted for its failure to perform as expected. +* +* This is a reimplementation of the ctags (1) program. It is an attempt to +* provide a fully featured ctags program which is free of the limitations +* which most (all?) others are subject to. +* +* This module contains the start-up code and routines to determine the list +* of files to parsed for tags. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +/* To provide timings features if available. + */ +#ifdef HAVE_CLOCK +# ifdef HAVE_TIME_H +# include +# endif +#else +# ifdef HAVE_TIMES +# ifdef HAVE_SYS_TIMES_H +# include +# endif +# endif +#endif + +/* To provide directory searching for recursion feature. + */ +#ifdef AMIGA +# include /* for struct AnchorPath */ +# include /* function prototypes */ +# define ANCHOR_BUF_SIZE 512 +# define ANCHOR_SIZE (sizeof (struct AnchorPath) + ANCHOR_BUF_SIZE) +# ifdef __SASC + extern struct DosLibrary *DOSBase; +# include +# endif +#endif + +#ifdef HAVE_DIRENT_H +# ifdef __BORLANDC__ +# define boolean BORLAND_boolean +# endif +# ifdef HAVE_SYS_TYPES_H +# include /* required by dirent.h */ +# endif +# include /* to declare opendir() */ +# undef boolean +#endif +#ifdef HAVE_DIRECT_H +# include /* to _getcwd() */ +#endif +#ifdef HAVE_DOS_H +# include /* to declare FA_DIREC */ +#endif +#ifdef HAVE_DIR_H +# include /* to declare findfirst() and findnext */ +#endif +#ifdef HAVE_IO_H +# include /* to declare _findfirst() */ +#endif + + +#include "debug.h" +#include "keyword.h" +#include "main.h" +#include "options.h" +#include "read.h" +#include "routines.h" + +/* +* MACROS +*/ +#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s") + +/* +* DATA DEFINITIONS +*/ +static struct { long files, lines, bytes; } Totals = { 0, 0, 0 }; + +#ifdef AMIGA +# include "ctags.h" + static const char *VERsion = "$VER: "PROGRAM_NAME" "PROGRAM_VERSION" " +# ifdef __SASC + __AMIGADATE__ +# else + __DATE__ +# endif + " "AUTHOR_NAME" $"; +#endif + +/* +* FUNCTION PROTOTYPES +*/ +static boolean createTagsForEntry (const char *const entryName); + +/* +* FUNCTION DEFINITIONS +*/ + +extern void addTotals ( + const unsigned int files, const long unsigned int lines, + const long unsigned int bytes) +{ + Totals.files += files; + Totals.lines += lines; + Totals.bytes += bytes; +} + +extern boolean isDestinationStdout (void) +{ + boolean toStdout = FALSE; + + if (Option.xref || Option.filter || + (Option.tagFileName != NULL && (strcmp (Option.tagFileName, "-") == 0 +#if defined (VMS) + || strcmp (Option.tagFileName, "sys$output") == 0 +#else + || strcmp (Option.tagFileName, "/dev/stdout") == 0 +#endif + ))) + toStdout = TRUE; + return toStdout; +} + +#if defined (HAVE_OPENDIR) +static boolean recurseUsingOpendir (const char *const dirName) +{ + boolean resize = FALSE; + DIR *const dir = opendir (dirName); + if (dir == NULL) + error (WARNING | PERROR, "cannot recurse into directory \"%s\"", dirName); + else + { + struct dirent *entry; + while ((entry = readdir (dir)) != NULL) + { + if (strcmp (entry->d_name, ".") != 0 && + strcmp (entry->d_name, "..") != 0) + { + vString *filePath; + if (strcmp (dirName, ".") == 0) + filePath = vStringNewInit (entry->d_name); + else + filePath = combinePathAndFile (dirName, entry->d_name); + resize |= createTagsForEntry (vStringValue (filePath)); + vStringDelete (filePath); + } + } + closedir (dir); + } + return resize; +} + +#elif defined (HAVE_FINDFIRST) || defined (HAVE__FINDFIRST) + +static boolean createTagsForWildcardEntry ( + const char *const pattern, const size_t dirLength, + const char *const entryName) +{ + boolean resize = FALSE; + /* we must not recurse into the directories "." or ".." */ + if (strcmp (entryName, ".") != 0 && strcmp (entryName, "..") != 0) + { + vString *const filePath = vStringNew (); + vStringNCopyS (filePath, pattern, dirLength); + vStringCatS (filePath, entryName); + resize = createTagsForEntry (vStringValue (filePath)); + vStringDelete (filePath); + } + return resize; +} + +static boolean createTagsForWildcardUsingFindfirst (const char *const pattern) +{ + boolean resize = FALSE; + const size_t dirLength = baseFilename (pattern) - pattern; +#if defined (HAVE_FINDFIRST) + struct ffblk fileInfo; + int result = _findfirst (pattern, &fileInfo, FA_DIREC); + while (result == 0) + { + const char *const entry = (const char *) fileInfo.ff_name; + resize |= createTagsForWildcardEntry (pattern, dirLength, entry); + result = _findnext (&fileInfo); + } +#elif defined (HAVE__FINDFIRST) + struct _finddata_t fileInfo; + intptr_t /*findfirst_t*/ hFile = _findfirst (pattern, &fileInfo); + if (hFile != -1L) + { + do + { + const char *const entry = (const char *) fileInfo.name; + resize |= createTagsForWildcardEntry (pattern, dirLength, entry); + } while (_findnext (hFile, &fileInfo) == 0); + _findclose (hFile); + } +#endif + return resize; +} + +#elif defined (AMIGA) + +static boolean createTagsForAmigaWildcard (const char *const pattern) +{ + boolean resize = FALSE; + struct AnchorPath *const anchor = + (struct AnchorPath *) eMalloc ((size_t) ANCHOR_SIZE); + LONG result; + + memset (anchor, 0, (size_t) ANCHOR_SIZE); + anchor->ap_Strlen = ANCHOR_BUF_SIZE; + /* Allow '.' for current directory */ +#ifdef APF_DODOT + anchor->ap_Flags = APF_DODOT | APF_DOWILD; +#else + anchor->ap_Flags = APF_DoDot | APF_DoWild; +#endif + result = MatchFirst ((UBYTE *) pattern, anchor); + while (result == 0) + { + resize |= createTagsForEntry ((char *) anchor->ap_Buf); + result = MatchNext (anchor); + } + MatchEnd (anchor); + eFree (anchor); + return resize; +} +#endif + +static boolean recurseIntoDirectory (const char *const dirName) +{ + boolean resize = FALSE; + if (isRecursiveLink (dirName)) + verbose ("ignoring \"%s\" (recursive link)\n", dirName); + else if (! Option.recurse) + verbose ("ignoring \"%s\" (directory)\n", dirName); + else + { + verbose ("RECURSING into directory \"%s\"\n", dirName); +#if defined (HAVE_OPENDIR) + resize = recurseUsingOpendir (dirName); +#elif defined (HAVE_FINDFIRST) || defined (HAVE__FINDFIRST) + { + vString *const pattern = vStringNew (); + vStringCopyS (pattern, dirName); + vStringPut (pattern, OUTPUT_PATH_SEPARATOR); + vStringCatS (pattern, "*.*"); + resize = createTagsForWildcardUsingFindfirst (vStringValue (pattern)); + vStringDelete (pattern); + } +#elif defined (AMIGA) + { + vString *const pattern = vStringNew (); + if (*dirName != '\0' && strcmp (dirName, ".") != 0) + { + vStringCopyS (pattern, dirName); + if (dirName [strlen (dirName) - 1] != '/') + vStringPut (pattern, '/'); + } + vStringCatS (pattern, "#?"); + resize = createTagsForAmigaWildcard (vStringValue (pattern)); + vStringDelete (pattern); + } +#endif + } + return resize; +} + +static boolean createTagsForEntry (const char *const entryName) +{ + boolean resize = FALSE; + fileStatus *status = eStat (entryName); + + Assert (entryName != NULL); + if (isExcludedFile (entryName)) + verbose ("excluding \"%s\"\n", entryName); + else if (status->isSymbolicLink && ! Option.followLinks) + verbose ("ignoring \"%s\" (symbolic link)\n", entryName); + else if (! status->exists) + error (WARNING | PERROR, "cannot open source file \"%s\"", entryName); + else if (status->isDirectory) + resize = recurseIntoDirectory (entryName); + else if (! status->isNormalFile) + verbose ("ignoring \"%s\" (special file)\n", entryName); + else + resize = parseFile (entryName); + + return resize; +} + +#ifdef MANUAL_GLOBBING + +static boolean createTagsForWildcardArg (const char *const arg) +{ + boolean resize = FALSE; + vString *const pattern = vStringNewInit (arg); + char *patternS = vStringValue (pattern); + +#if defined (HAVE_FINDFIRST) || defined (HAVE__FINDFIRST) + /* We must transform the "." and ".." forms into something that can + * be expanded by the findfirst/_findfirst functions. + */ + if (Option.recurse && + (strcmp (patternS, ".") == 0 || strcmp (patternS, "..") == 0)) + { + vStringPut (pattern, OUTPUT_PATH_SEPARATOR); + vStringCatS (pattern, "*.*"); + } + resize |= createTagsForWildcardUsingFindfirst (patternS); +#endif + vStringDelete (pattern); + return resize; +} + +#endif + +static boolean createTagsForArgs (cookedArgs *const args) +{ + boolean resize = FALSE; + + /* Generate tags for each argument on the command line. + */ + while (! cArgOff (args)) + { + const char *const arg = cArgItem (args); + +#ifdef MANUAL_GLOBBING + resize |= createTagsForWildcardArg (arg); +#else + resize |= createTagsForEntry (arg); +#endif + cArgForth (args); + parseOptions (args); + } + return resize; +} + +/* Read from an opened file a list of file names for which to generate tags. + */ +static boolean createTagsFromFileInput (FILE *const fp, const boolean filter) +{ + boolean resize = FALSE; + if (fp != NULL) + { + cookedArgs *args = cArgNewFromLineFile (fp); + parseOptions (args); + while (! cArgOff (args)) + { + resize |= createTagsForEntry (cArgItem (args)); + if (filter) + { + if (Option.filterTerminator != NULL) + { + fputs (Option.filterTerminator, stdout); + /** Eran Ifrah **/ + fputs ("\n", stdout); + } + fflush (stdout); + } + cArgForth (args); + parseOptions (args); + } + cArgDelete (args); + } + return resize; +} + +/* Read from a named file a list of file names for which to generate tags. + */ +static boolean createTagsFromListFile (const char *const fileName) +{ + boolean resize; + Assert (fileName != NULL); + if (strcmp (fileName, "-") == 0) + resize = createTagsFromFileInput (stdin, FALSE); + else + { + FILE *const fp = fopen (fileName, "r"); + if (fp == NULL) + error (FATAL | PERROR, "cannot open list file \"%s\"", fileName); + resize = createTagsFromFileInput (fp, FALSE); + fclose (fp); + } + return resize; +} + +#if defined (HAVE_CLOCK) +# define CLOCK_AVAILABLE +# ifndef CLOCKS_PER_SEC +# define CLOCKS_PER_SEC 1000000 +# endif +#elif defined (HAVE_TIMES) +# define CLOCK_AVAILABLE +# define CLOCKS_PER_SEC 60 +static clock_t clock (void) +{ + struct tms buf; + + times (&buf); + return (buf.tms_utime + buf.tms_stime); +} +#else +# define clock() (clock_t)0 +#endif + +static void printTotals (const clock_t *const timeStamps) +{ + const unsigned long totalTags = TagFile.numTags.added + + TagFile.numTags.prev; + + fprintf (errout, "%ld file%s, %ld line%s (%ld kB) scanned", + Totals.files, plural (Totals.files), + Totals.lines, plural (Totals.lines), + Totals.bytes/1024L); +#ifdef CLOCK_AVAILABLE + { + const double interval = ((double) (timeStamps [1] - timeStamps [0])) / + CLOCKS_PER_SEC; + + fprintf (errout, " in %.01f seconds", interval); + if (interval != (double) 0.0) + fprintf (errout, " (%lu kB/s)", + (unsigned long) (Totals.bytes / interval) / 1024L); + } +#endif + fputc ('\n', errout); + + fprintf (errout, "%lu tag%s added to tag file", + TagFile.numTags.added, plural (TagFile.numTags.added)); + if (Option.append) + fprintf (errout, " (now %lu tags)", totalTags); + fputc ('\n', errout); + + if (totalTags > 0 && Option.sorted != SO_UNSORTED) + { + fprintf (errout, "%lu tag%s sorted", totalTags, plural (totalTags)); +#ifdef CLOCK_AVAILABLE + fprintf (errout, " in %.02f seconds", + ((double) (timeStamps [2] - timeStamps [1])) / CLOCKS_PER_SEC); +#endif + fputc ('\n', errout); + } + +#ifdef DEBUG + fprintf (errout, "longest tag line = %lu\n", + (unsigned long) TagFile.max.line); +#endif +} + +static boolean etagsInclude (void) +{ + return (boolean)(Option.etags && Option.etagsInclude != NULL); +} + +static void makeTags (cookedArgs *args) +{ + clock_t timeStamps [3]; + boolean resize = FALSE; + boolean files = (boolean)(! cArgOff (args) || Option.fileList != NULL + || Option.filter); + + if (! files) + { + if (filesRequired ()) + error (FATAL, "No files specified. Try \"%s --help\".", + getExecutableName ()); + else if (! Option.recurse && ! etagsInclude ()) + return; + } + +#define timeStamp(n) timeStamps[(n)]=(Option.printTotals ? clock():(clock_t)0) + if (! Option.filter) + openTagFile (); + + timeStamp (0); + + if (! cArgOff (args)) + { + verbose ("Reading command line arguments\n"); + resize = createTagsForArgs (args); + } + if (Option.fileList != NULL) + { + verbose ("Reading list file\n"); + resize = (boolean) (createTagsFromListFile (Option.fileList) || resize); + } + if (Option.filter) + { + verbose ("Reading filter input\n"); + resize = (boolean) (createTagsFromFileInput (stdin, TRUE) || resize); + } + if (! files && Option.recurse) + resize = recurseIntoDirectory ("."); + + timeStamp (1); + + if (! Option.filter) + closeTagFile (resize); + + timeStamp (2); + + if (Option.printTotals) + printTotals (timeStamps); +#undef timeStamp +} + +/* + * Start up code + */ + +extern int main (int __unused__ argc, char **argv) +{ + cookedArgs *args; +#ifdef VMS + extern int getredirection (int *ac, char ***av); + + /* do wildcard expansion and I/O redirection */ + getredirection (&argc, &argv); +#endif + +#ifdef AMIGA + /* This program doesn't work when started from the Workbench */ + if (argc == 0) + exit (1); +#endif + +#ifdef __EMX__ + _wildcard (&argc, &argv); /* expand wildcards in argument list */ +#endif + +#if defined (macintosh) && BUILD_MPW_TOOL == 0 + argc = ccommand (&argv); +#endif + + setCurrentDirectory (); + setExecutableName (*argv++); + checkRegex (); + + args = cArgNewFromArgv (argv); + previewFirstOption (args); + testEtagsInvocation (); + initializeParsing (); + initOptions (); + readOptionConfiguration (); + verbose ("Reading initial options from command line\n"); + parseOptions (args); + checkOptions (); + makeTags (args); + + /* Clean up. + */ + cArgDelete (args); + freeKeywordTable (); + freeRoutineResources (); + freeSourceFileResources (); + freeTagFileResources (); + freeOptionResources (); + freeParserResources (); + freeRegexResources (); + + exit (0); + return 0; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/main.h b/sdk/ctags/main.h new file mode 100644 index 0000000000..dc3f99a2aa --- /dev/null +++ b/sdk/ctags/main.h @@ -0,0 +1,32 @@ +/* +* $Id: main.h,v 1.8 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to main.c +*/ +#ifndef _MAIN_H +#define _MAIN_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "vstring.h" + +/* +* FUNCTION PROTOTYPES +*/ +extern void addTotals (const unsigned int files, const long unsigned int lines, const long unsigned int bytes); +extern boolean isDestinationStdout (void); +extern int main (int argc, char **argv); + +#endif /* _MAIN_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/make.c b/sdk/ctags/make.c new file mode 100644 index 0000000000..59bd55ea1d --- /dev/null +++ b/sdk/ctags/make.c @@ -0,0 +1,211 @@ +/* +* $Id: make.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2005, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for makefiles. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include + +#include "options.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_MACRO +} shKind; + +static kindOption MakeKinds [] = { + { TRUE, 'm', "macro", "macros"} +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static int nextChar (void) +{ + int c = fileGetc (); + if (c == '\\') + { + c = fileGetc (); + if (c == '\n') + c = fileGetc (); + } + return c; +} + +static void skipLine (void) +{ + int c; + do + c = nextChar (); + while (c != EOF && c != '\n'); + if (c == '\n') + fileUngetc (c); +} + +static int skipToNonWhite (void) +{ + int c; + do + c = nextChar (); + while (c != '\n' && isspace (c)); + return c; +} + +static boolean isIdentifier (int c) +{ + return (boolean)(c != '\0' && (isalnum (c) || strchr (".-_", c) != NULL)); +} + +static void readIdentifier (const int first, vString *const id) +{ + int c = first; + vStringClear (id); + while (isIdentifier (c)) + { + vStringPut (id, c); + c = nextChar (); + } + fileUngetc (c); + vStringTerminate (id); +} + +static void skipToMatch (const char *const pair) +{ + const int begin = pair [0], end = pair [1]; + const unsigned long inputLineNumber = getInputLineNumber (); + int matchLevel = 1; + int c = '\0'; + + while (matchLevel > 0) + { + c = nextChar (); + if (c == begin) + ++matchLevel; + else if (c == end) + --matchLevel; + else if (c == '\n') + break; + } + if (c == EOF) + verbose ("%s: failed to find match for '%c' at line %lu\n", + getInputFileName (), begin, inputLineNumber); +} + +static void findMakeTags (void) +{ + vString *name = vStringNew (); + boolean newline = TRUE; + boolean in_define = FALSE; + boolean in_rule = FALSE; + boolean variable_possible = TRUE; + int c; + + while ((c = nextChar ()) != EOF) + { + if (newline) + { + if (in_rule) + { + if (c == '\t') + { + skipLine (); /* skip rule */ + continue; + } + else + in_rule = FALSE; + } + variable_possible = (boolean)(!in_rule); + newline = FALSE; + } + if (c == '\n') + newline = TRUE; + else if (isspace (c)) + continue; + else if (c == '#') + skipLine (); + else if (c == '(') + skipToMatch ("()"); + else if (c == '{') + skipToMatch ("{}"); + else if (c == ':') + { + variable_possible = TRUE; + in_rule = TRUE; + } + else if (variable_possible && isIdentifier (c)) + { + readIdentifier (c, name); + if (strcmp (vStringValue (name), "endef") == 0) + in_define = FALSE; + else if (in_define) + skipLine (); + else if (strcmp (vStringValue (name), "define") == 0 && + isIdentifier (c)) + { + in_define = TRUE; + c = skipToNonWhite (); + readIdentifier (c, name); + makeSimpleTag (name, MakeKinds, K_MACRO); + skipLine (); + } + else { + c = skipToNonWhite (); + if (strchr (":?+", c) != NULL) + { + boolean append = (boolean)(c == '+'); + if (c == ':') + in_rule = TRUE; + c = nextChar (); + if (c != '=') + fileUngetc (c); + else if (append) + { + skipLine (); + continue; + } + } + if (c == '=') + { + makeSimpleTag (name, MakeKinds, K_MACRO); + in_rule = FALSE; + skipLine (); + } + } + } + else + variable_possible = FALSE; + } + vStringDelete (name); +} + +extern parserDefinition* MakefileParser (void) +{ + static const char *const patterns [] = { "[Mm]akefile", NULL }; + static const char *const extensions [] = { "mak", "mk", NULL }; + parserDefinition* const def = parserNew ("Make"); + def->kinds = MakeKinds; + def->kindCount = KIND_COUNT (MakeKinds); + def->patterns = patterns; + def->extensions = extensions; + def->parser = findMakeTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/mk_bc3.mak b/sdk/ctags/mk_bc3.mak new file mode 100644 index 0000000000..065c7334c2 --- /dev/null +++ b/sdk/ctags/mk_bc3.mak @@ -0,0 +1,46 @@ +# $Id: mk_bc3.mak,v 1.2 2003/02/24 02:27:53 darren Exp $ +# +# Simple makefile for Borland C++ 3.1 + +!include source.mak + +# Adjust the paths to your location of the borland C files +BCCLOC = c:\borlandc +CC = $(BCCLOC)\bin\bcc +INC = -I$(BCCLOC)\include +LIB = -L$(BCCLOC)\lib + +# Add this file for wildcard expansion (does NOT work with 4.0!) +#EXTRA = $(BCCLOC)\lib\wildargs.obj + +# The following compile options can be changed for better machines. +# replace -1- with -2 to produce code for a 80286 or higher +# replace -1- with -3 to produce code for a 80386 or higher +# add -v for source debugging +OPTIMIZE= -1- -O1 + +CFLAGS = -DMSDOS -ml -d -w-ccc -w-par -w-pia -w-rch -w-sus $(INC) +LFLAGS = $(LIB) $(EXTRA) +EXTRA_LIBS = + +ctags.exe: $(SOURCES) respbc3 + $(CC) $(OPTIMIZE) -e$@ @respbc3 + +debug: dctags.exe + +dctags.exe: $(SOURCES) respbc3 debug.c + $(CC) -DDEBUG -v -e$@ @respbc3 debug.c + +respbc3: mk_bc3.mak + copy &&| +$(CFLAGS) +$(LFLAGS) +$(SOURCES) +$(EXTRA_LIBS) +| $@ + +clean: + del *.exe + del *.obj + del respbc3 + del tags diff --git a/sdk/ctags/mk_bc5.mak b/sdk/ctags/mk_bc5.mak new file mode 100644 index 0000000000..82fd5885a1 --- /dev/null +++ b/sdk/ctags/mk_bc5.mak @@ -0,0 +1,76 @@ +# $Id: mk_bc5.mak,v 1.5 2003/09/19 04:02:39 darren Exp $ +# +# Makefile for Win32 using Borland C++ compiler, version 5.5 (free version) + +!include source.mak + +BCC = bcc32 + +# You can obtain an Win32 version of the Gnu regex support library from +# http://people.delphiforums.com/gjc/gnu_regex.html +# Point REGEX_DIR to the directory created when you extract the archive. +# If you just run gnu_regex.exe in this directory, then you can just +# uncomment the REGEX_DIR macro below and everything should work. + +#REGEX_DIR = gnu_regex_dist + +!ifdef REGEX_DIR +EXTRA_INC = -I$(REGEX_DIR) + +# Uncomment the following macro to dynamically link against the regex DLL; +# otherwise link statically against regex. +# WARNING: Borland C++ does not successfully link dynamically. + +#REGEX_DLL=1 + +!ifdef REGEX_DLL +REGEX_DEFINE = -DHAVE_REGCOMP +EXTRA_LIBS = $(REGEX_DIR)\gnu_regex.lib +LDFLAGS = -tWCR +!else +REGEX_DEFINE = -DHAVE_REGCOMP -DREGEX_MALLOC -DSTDC_HEADERS=1 +EXTRA_LIBS = regex.obj +!endif +!endif + +DEFINES = -DWIN32 $(REGEX_DEFINE) +INCLUDES = $(EXTRA_INC) +WARNINGS = -w-aus -w-par -w-pia -w-pro -w-sus +CFLAGS = -d -DSTRICT -lTpe -lap + +# Optimizations if your platform supports all of them. +OPT = -O2 -OS -lGt + +# Allows multithreading +#MT_OPT = -tWM -lcw32mt + +ctags: ctags.exe + +ctags.exe: $(SOURCES) respbc5 $(EXTRA_LIBS) + $(BCC) $(OPT) $(MT_OPT) -e$@ $(LDFLAGS) @respbc5 + +readtags.exe: readtags.c + $(BCC) $(CFLAGS) $(OPT) $(MT_OPT) -e$@ $(DEFINES) -DREADTAGS_MAIN readtags.c $(LDFLAGS) + +# Debug version +dctags.exe: $(SOURCES) respbc5 $(EXTRA_LIBS) + $(BCC) -DDEBUG -e$@ $(LDFLAGS) @respbc5 debug.c + +regex.obj: + $(BCC) -c -o$@ -w- $(DEFINES) -Dconst= $(INCLUDES) $(REGEX_DIR)\regex.c + +respbc5: $(SOURCES) $(HEADERS) mk_bc5.mak + echo $(DEFINES) $(INCLUDES) > $@ + echo $(WARNINGS) >> $@ + echo $(CFLAGS) >> $@ + echo $(SOURCES) $(EXTRA_LIBS) >> $@ + +mostlyclean: + - del *.obj + - del *.tds + - del dctags.exe + - del respbc5 + - del tags + +clean: mostlyclean + - del ctags.exe diff --git a/sdk/ctags/mk_djg.mak b/sdk/ctags/mk_djg.mak new file mode 100644 index 0000000000..51898ae740 --- /dev/null +++ b/sdk/ctags/mk_djg.mak @@ -0,0 +1,18 @@ +# $Id: mk_djg.mak,v 1.2 2003/03/31 04:53:22 darren Exp $ +# +# The most simplistic Makefile, for DJGPP Version 2 on Windows +# +# Rather than using this makefile, it is preferable to run "configure", then +# "make" under BASH on DJGPP (i.e. the standard means of building a package on +# Unix), but you have to have a fuller complement of DJGPP packages installed +# to do this. + +include source.mak + +CFLAGS = -O2 -Wall -DMSDOS + +ctags.exe: $(SOURCES) + gcc $(CFLAGS) -s -o ctags.exe $(SOURCES) -lpc + +clean: + del ctags.exe diff --git a/sdk/ctags/mk_manx.mak b/sdk/ctags/mk_manx.mak new file mode 100644 index 0000000000..1ad5007ae2 --- /dev/null +++ b/sdk/ctags/mk_manx.mak @@ -0,0 +1,65 @@ +# $Id: mk_manx.mak,v 1.9 2003/02/13 02:59:30 darren Exp $ +# +# Makefile for ctags on the Amiga, using Aztec/Manx C 5.0 or later + +OBJEXT = o + +OBJECTS = \ + args.$(OBJEXT) \ + asm.$(OBJEXT) \ + asp.$(OBJEXT) \ + awk.$(OBJEXT) \ + beta.$(OBJEXT) \ + c.$(OBJEXT) \ + cobol.$(OBJEXT) \ + eiffel.$(OBJEXT) \ + entry.$(OBJEXT) \ + erlang.$(OBJEXT) \ + fortran.$(OBJEXT) \ + get.$(OBJEXT) \ + keyword.$(OBJEXT) \ + lisp.$(OBJEXT) \ + lregex.$(OBJEXT) \ + lua.$(OBJEXT) \ + main.$(OBJEXT) \ + make.$(OBJEXT) \ + options.$(OBJEXT) \ + parse.$(OBJEXT) \ + pascal.$(OBJEXT) \ + perl.$(OBJEXT) \ + php.$(OBJEXT) \ + python.$(OBJEXT) \ + read.$(OBJEXT) \ + rexx.$(OBJEXT) \ + routines.$(OBJEXT) \ + ruby.$(OBJEXT) \ + scheme.$(OBJEXT) \ + sh.$(OBJEXT) \ + slang.$(OBJEXT) \ + sort.$(OBJEXT) \ + sml.$(OBJEXT) \ + sql.$(OBJEXT) \ + strlist.$(OBJEXT) \ + tcl.$(OBJEXT) \ + verilog.$(OBJEXT) \ + vim.$(OBJEXT) \ + vstring.$(OBJEXT) \ + yacc.$(OBJEXT) + +CC = cc + +#>>>>> choose between debugging (-bs) or optimizing (-so) +OPTIONS = -so +#OPTIONS = -bs + +#>>>>>> choose -g for debugging +LN_DEBUG = +#LN_DEBUG = -g + +CFLAGS = $(OPTIONS) -wapruq -ps -qf -DAMIGA -Dconst= + +Ctags: $(OBJECTS) + ln +q -m $(LN_DEBUG) -o Ctags $(OBJECTS) -lc16 -lm16 + +.c.o: + $(CC) $(CFLAGS) -o $*.o $*.c diff --git a/sdk/ctags/mk_ming.mak b/sdk/ctags/mk_ming.mak new file mode 100644 index 0000000000..9dcfe94428 --- /dev/null +++ b/sdk/ctags/mk_ming.mak @@ -0,0 +1,26 @@ +# $Id: mk_ming.mak,v 1.1 2001/11/02 04:53:43 darren Exp $ +# +# Makefile for Exuberant Ctags under Win32 with Mingw32 compiler +# +# Note that only the crtdll variant of the compiler is supported. +# The msvcrt variant has broken implementations of fgetpos() and fsetpos(). + +include source.mak + +CFLAGS = -Wall +DEFINES = -DWIN32 +CC = gcc + +ctags: ctags.exe + +ctags.exe: OPT = -O4 +ctags.exe: LDFLAGS = -s +dctags.exe: OPT = -g + +ctags.exe dctags.exe: $(SOURCES) + $(CC) $(LDFLAGS) $(OPT) $(CFLAGS) $(DEFINES) -o $@ $(SOURCES) + +clean: + - del ctags.exe + - del dctags.exe + - del tags diff --git a/sdk/ctags/mk_mpw.mak b/sdk/ctags/mk_mpw.mak new file mode 100644 index 0000000000..ae4261cd96 --- /dev/null +++ b/sdk/ctags/mk_mpw.mak @@ -0,0 +1,130 @@ +# $Id: mk_mpw.mak,v 1.9 2003/02/13 02:59:30 darren Exp $ +# +# Makefile for Macintosh using MPW +# +# Created by: Maarten L. Hekkelman + +HEADERS = ¶ + args.h ctags.h debug.h entry.h general.h get.h keyword.h ¶ + main.h options.h parse.h parsers.h read.h routines.h sort.h ¶ + strlist.h vstring.h mac.h + +SOURCES = ¶ + args.c ¶ + asm.c ¶ + asp.c ¶ + awk.c ¶ + beta.c ¶ + c.c ¶ + cobol.c ¶ + eiffel.c ¶ + entry.c ¶ + erlang.c ¶ + fortran.c ¶ + get.c ¶ + keyword.c ¶ + lisp.c ¶ + lregex.c ¶ + lua.c ¶ + main.c ¶ + make.c ¶ + options.c ¶ + parse.c ¶ + pascal.c ¶ + perl.c ¶ + php.c ¶ + python.c ¶ + read.c ¶ + rexx.c ¶ ¶ + routines.c ¶ + ruby.c ¶ + scheme.c ¶ + sh.c ¶ + slang.c ¶ + sort.c ¶ + sml.c ¶ + sql.c ¶ + strlist.c ¶ + tcl.c ¶ + verilog.c ¶ + vim.c ¶ + vstring.c ¶ + yacc.c ¶ + mac.c + +OBJ = ¶ + args.o ¶ + asm.o ¶ + asp.o ¶ + awk.o ¶ + beta.o ¶ + c.o ¶ + cobol.o ¶ + eiffel.o ¶ + entry.o ¶ + erlang.o ¶ + fortran.o ¶ + get.o ¶ + keyword.o ¶ + lisp.o ¶ + lregex.o ¶ + lua.o ¶ + main.o ¶ + make.o ¶ + options.o ¶ + parse.o ¶ + pascal.o ¶ + perl.o ¶ + php.o ¶ + python.o ¶ + read.o ¶ + rexx.o ¶ + routines.o ¶ + ruby.o ¶ + scheme.o ¶ + sh.o ¶ + slang.o ¶ + sort.o ¶ + sml.o ¶ + sql.o ¶ + strlist.o ¶ + tcl.o ¶ + verilog.o ¶ + vim.o ¶ + vstring.o ¶ + yacc.o ¶ + mac.o + +LIBS = ¶ + {PPCLibraries}PPCToolLibs.o ¶ + {SharedLibraries}MathLib ¶ + {SharedLibraries}InterfaceLib ¶ + {SharedLibraries}StdCLib ¶ + {MWPPCLibraries}'MSL StdCRuntime.Lib' + +CC = mwcppc +LD = mwlinkppc + +# Using -nodefaults to avoid having {MWCIncludes} in our include paths +# Needed since we're building a MPW Tool and not an application. +COptions = -nodefaults -i : -i- -i {CIncludes} -opt full +LOptions = -xm m -stacksize 128 + +all Ä CTags + +CTags Ä TurnOfEcho {OBJ} + {LD} {LOptions} -o CTags {OBJ} {LIBS} + +{OBJ} Ä {HEADERS} + +tags Ä CTags + :CTags -p. {SOURCES} {HEADERS} + +clean Ä + Delete -y -i {OBJ} {CTags} tags + +.o Ä .c + {CC} {depDir}{default}.c -o {targDir}{default}.o {COptions} + +TurnOfEcho Ä + set echo 0 diff --git a/sdk/ctags/mk_mvc.mak b/sdk/ctags/mk_mvc.mak new file mode 100644 index 0000000000..aea1da85ab --- /dev/null +++ b/sdk/ctags/mk_mvc.mak @@ -0,0 +1,61 @@ +# $Id: mk_mvc.mak,v 1.7 2003/09/19 04:02:39 darren Exp $ +# +# Makefile for Win32 using Microsoft Visual C++ compiler + +include source.mak + +# You can obtain an Win32 version of the Gnu regex support library from +# http://people.delphiforums.com/gjc/gnu_regex.html +# Point REGEX_DIR to the directory created when you extract the archive. +# If you just run gnu_regex.exe in this directory, then you can just +# uncomment the REGEX_DIR macro below and everything should work. + +#REGEX_DIR = gnu_regex_dist + +!ifdef REGEX_DIR +EXTRA_INC = -I$(REGEX_DIR) + +# Uncomment the following macro to dynamically link against the regex DLL; +# otherwise link statically against regex. + +#REGEX_DLL=1 + +!ifdef REGEX_DLL +REGEX_DEFINE = -DHAVE_REGCOMP +EXTRA_LIBS = $(REGEX_DIR)\gnu_regex.lib +!else +REGEX_DEFINE = -DHAVE_REGCOMP -DREGEX_MALLOC -DSTDC_HEADERS=1 +EXTRA_LIBS = regex.obj +!endif +!endif + +DEFINES = -DWIN32 $(REGEX_DEFINE) +INCLUDES = $(EXTRA_INC) +OPT = /O2 /G5 + +ctags: ctags.exe + +ctags.exe: $(SOURCES) respmvc $(EXTRA_LIBS) + cl $(OPT) /Fe$@ @respmvc /link setargv.obj + +readtags.exe: readtags.c + cl /clr $(OPT) /Fe$@ $(DEFINES) -DREADTAGS_MAIN readtags.c /link setargv.obj + +# Debug version +dctags.exe: $(SOURCES) respmvc $(EXTRA_LIBS) + cl /Zi -DDEBUG /Fe$@ @respmvc debug.c /link setargv.obj + +regex.obj: + cl /c $(OPT) /Fo$@ $(DEFINES) -Dconst= $(INCLUDES) $(REGEX_DIR)\regex.c + +respmvc: $(SOURCES) $(HEADERS) mk_mvc.mak + echo $(DEFINES) $(INCLUDES) $(SOURCES) $(EXTRA_LIBS) > $@ + +mostlyclean: + - del *.obj + - del dctags.exe + - del respmvc + - del tags + +clean: mostlyclean + - del ctags.exe diff --git a/sdk/ctags/mk_os2.mak b/sdk/ctags/mk_os2.mak new file mode 100644 index 0000000000..4ff98377b7 --- /dev/null +++ b/sdk/ctags/mk_os2.mak @@ -0,0 +1,104 @@ +# $Id: mk_os2.mak,v 1.3 2002/01/27 21:20:55 darren Exp $ +# +# A Makefile for OS/2 using EMX/gcc +# You may want to use the OS/2 port of autoconf for building +# and comment-out the according statements in this Makefile. +# You need a library to provide regex support. +# libExt might do this, but currently (2/2001) it doesn't work well +# together with ctags ... +# +# Provided and supported by +# Alexander Mai +# or + +default: + @echo "Enter $(MAKE) -f mk_os2.mak target" + @echo "where target is one of:" + @echo " small (small executable req. EMX runtime)" + @echo " debug (executable for debugging purposes)" + @echo " release (stand-alone executable)" + @echo " clean (remove all files built)" + +# Use this to create a small binary +# (requires EMX runtime libraries) +small: + $(MAKE) -f mk_os2.mak all \ + CC="gcc" \ + CFLAGS="-O5 -mpentium -Wall" \ + LFLAGS="-Zcrtdll -s" \ + LIBS="-lregex" \ + OBJEXT="o" + +# Use this to create a binary for debugging purposes +# (requires EMX runtime libraries) +debug: + $(MAKE) -f mk_os2.mak all \ + CC="gcc" \ + CFLAGS="-O0 -Wall -g" \ + LFLAGS="-Zcrtdll -g" \ + LIBS="-lregex" \ + OBJEXT="o" + +# Use this to create a stand-alone binary for distribution +# (requires link386 for linking but no EMX runtime libraries) +release: + $(MAKE) -f mk_os2.mak all \ + CC="gcc" \ + CFLAGS="-g -O5 -mpentium -Wall" \ + LFLAGS="-s -Zomf -Zsys -Zlinker /PM:VIO" \ + LIBS="-lregex" \ + OBJEXT="obj" + +# Use the line below if you have created config.h +# (manually or by running configure) +# Otherwise use built-in defaults (#ifdef OS2)! +# DEFINES=-DHAVE_CONFIG_H +DEFINES=-DOS2 + + +# General rules and definitions + +.SUFFIXES: .c .exe .h .o .obj + +include source.mak + +all: ctags.exe readtags.exe readtags.a readtags.lib +ctags: ctags.exe +etags: etags.exe + +ctags.exe: $(OBJECTS) + $(CC) $(CFLAGS) $(LFLAGS) -o $@ $^ $(LIBS) + +etags.exe: ctags.exe + @copy $< $@ + +# The readtags executable +readtags.exe: readtags.c + $(CC) $(CFLAGS) $(DEFINES) $(LFLAGS) -DREADTAGS_MAIN -o $@ $^ $(LIBS) + +# We build a.out and omf version of the readtags library +readtags.o: readtags.c + $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $^ + +readtags.a: readtags.o + if exist $@ del $@ + ar rc $@ $^ + +readtags.lib: readtags.a + emxomf $< + +.c.o: + $(CC) $(CFLAGS) $(DEFINES) -I. -c $< -o $@ + +.c.obj: + $(CC) $(CFLAGS) -Zomf $(DEFINES) -I. -c $< -o $@ + +# Delete all files that are not part of the source distribution +clean: + @if exist ctags.exe del ctags.exe + @if exist etags.exe del etags.exe + @if exist readtags.exe del readtags.exe + @if exist readtags.a del readtags.a + @if exist readtags.lib del readtags.lib + @if exist *.obj del *.obj + @if exist *.o del *.o diff --git a/sdk/ctags/mk_qdos.mak b/sdk/ctags/mk_qdos.mak new file mode 100644 index 0000000000..fef626ba73 --- /dev/null +++ b/sdk/ctags/mk_qdos.mak @@ -0,0 +1,100 @@ +# $Id: mk_qdos.mak,v 1.10 2003/02/13 02:59:30 darren Exp $ +# +# Makefile for ctags on QDOS/SMS systems and C68 v4.24 +# Submitted by Thierry Godefroy + +# Directories: + +T = ram1_ +P = drv1_C68_ + +# Programs name: + +CC = $(P)cc +AS = $(P)as68 +ASM = $(P)qmac +LD = $(P)ld + +# Programs flags: + +CCFLAGS = -tmp$(T) -v -Y$(P) -I$(P)include_ -O +ASFLAGS = -V +ASMFLAGS = -nolist +LDFLAGS = -v -L$(P)lib_ -bufp150K\ + +# Target name: + +EXEC = ctags + +# Additional libraries: + +LIBS = + +# Target dependencies: + +OBJEXT = o + +HEADERS = e_qdos.h \ + args.h ctags.h debug.h entry.h general.h get.h keyword.h \ + main.h options.h parse.h parsers.h read.h routines.h sort.h \ + strlist.h vstring.h + +OBJECTS = qdos.$(OBJEXT) \ + args.$(OBJEXT) \ + asm.$(OBJEXT) \ + asp.$(OBJEXT) \ + awk.$(OBJEXT) \ + beta.$(OBJEXT) \ + c.$(OBJEXT) \ + cobol.$(OBJEXT) \ + eiffel.$(OBJEXT) \ + entry.$(OBJEXT) \ + erlang.$(OBJEXT) \ + fortran.$(OBJEXT) \ + get.$(OBJEXT) \ + keyword.$(OBJEXT) \ + lisp.$(OBJEXT) \ + lregex.$(OBJEXT) \ + lua.$(OBJEXT) \ + main.$(OBJEXT) \ + make.$(OBJEXT) \ + options.$(OBJEXT) \ + parse.$(OBJEXT) \ + pascal.$(OBJEXT) \ + perl.$(OBJEXT) \ + php.$(OBJEXT) \ + python.$(OBJEXT) \ + read.$(OBJEXT) \ + rexx.$(OBJEXT) \ + routines.$(OBJEXT) \ + ruby.$(OBJEXT) \ + scheme.$(OBJEXT) \ + sh.$(OBJEXT) \ + slang.$(OBJEXT) \ + sort.$(OBJEXT) \ + sml.$(OBJEXT) \ + sql.$(OBJEXT) \ + strlist.$(OBJEXT) \ + tcl.$(OBJEXT) \ + verilog.$(OBJEXT) \ + vim.$(OBJEXT) \ + vstring.$(OBJEXT) \ + yacc.$(OBJEXT) + +$(EXEC) : $(OBJECTS) + $(LD) -o$(EXEC) $(LDFLAGS) $(OBJECTS) $(LIBS) + +$(OBJECTS): $(HEADERS) + +# Construction rules: + +_c_o : + $(CC) -c $(CCFLAGS) $< + +_s_o : + $(AS) $(ASFLAGS) $< $@ + +_asm_rel : + $(ASM) $< $(ASMFLAGS) + +#end diff --git a/sdk/ctags/mk_sas.mak b/sdk/ctags/mk_sas.mak new file mode 100644 index 0000000000..ad18414d05 --- /dev/null +++ b/sdk/ctags/mk_sas.mak @@ -0,0 +1,63 @@ +# $Id: mk_sas.mak,v 1.9 2003/02/13 02:59:30 darren Exp $ +# +# Makefile for SAS/C Amiga Compiler +# Submitted by Stefan Haubenthal + +CFLAGS= def AMIGA opt parm r sint + +OBJEXT = o + +OBJECTS = \ + args.$(OBJEXT) \ + asm.$(OBJEXT) \ + asp.$(OBJEXT) \ + awk.$(OBJEXT) \ + beta.$(OBJEXT) \ + c.$(OBJEXT) \ + cobol.$(OBJEXT) \ + eiffel.$(OBJEXT) \ + entry.$(OBJEXT) \ + erlang.$(OBJEXT) \ + fortran.$(OBJEXT) \ + get.$(OBJEXT) \ + keyword.$(OBJEXT) \ + lisp.$(OBJEXT) \ + lregex.$(OBJEXT) \ + lua.$(OBJEXT) \ + main.$(OBJEXT) \ + make.$(OBJEXT) \ + options.$(OBJEXT) \ + parse.$(OBJEXT) \ + pascal.$(OBJEXT) \ + perl.$(OBJEXT) \ + php.$(OBJEXT) \ + python.$(OBJEXT) \ + read.$(OBJEXT) \ + rexx.$(OBJEXT) \ + routines.$(OBJEXT) \ + ruby.$(OBJEXT) \ + scheme.$(OBJEXT) \ + sh.$(OBJEXT) \ + slang.$(OBJEXT) \ + sort.$(OBJEXT) \ + sml.$(OBJEXT) \ + sql.$(OBJEXT) \ + strlist.$(OBJEXT) \ + tcl.$(OBJEXT) \ + verilog.$(OBJEXT) \ + vim.$(OBJEXT) \ + vstring.$(OBJEXT) \ + yacc.$(OBJEXT) + +ctags: $(OBJECTS) + sc link to $@ $(OBJECTS) math s sint + +.c.o: + $(CC) $(CFLAGS) -o $*.o $*.c + +clean: + -delete $(OBJECTS) ctags.lnk + +archive: clean + @-delete force RAM:ctags.lha + lha -r a RAM:ctags // ctags diff --git a/sdk/ctags/options.c b/sdk/ctags/options.c new file mode 100644 index 0000000000..4b2517b0bc --- /dev/null +++ b/sdk/ctags/options.c @@ -0,0 +1,1782 @@ +/* +* $Id: options.c,v 1.32 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions to process command line options. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include +#include +#include /* to declare isspace () */ + +#include "ctags.h" +#include "debug.h" +#include "main.h" +#define OPTION_WRITE +#include "options.h" +#include "parse.h" +#include "routines.h" + +/* +* MACROS +*/ +#define INVOCATION "Usage: %s [options] [file(s)]\n" + +#define CTAGS_ENVIRONMENT "CTAGS" +#define ETAGS_ENVIRONMENT "ETAGS" + +#define CTAGS_FILE "tags" +#define ETAGS_FILE "TAGS" + +#ifndef ETAGS +# define ETAGS "etags" /* name which causes default use of to -e */ +#endif + +/* The following separators are permitted for list options. + */ +#define EXTENSION_SEPARATOR '.' +#define PATTERN_START '(' +#define PATTERN_STOP ')' +#define IGNORE_SEPARATORS ", \t\n" + +#ifndef DEFAULT_FILE_FORMAT +# define DEFAULT_FILE_FORMAT 2 +#endif + +#if defined (HAVE_OPENDIR) || defined (HAVE_FINDFIRST) || defined (HAVE__FINDFIRST) || defined (AMIGA) +# define RECURSE_SUPPORTED +#endif + +#define isCompoundOption(c) (boolean) (strchr ("fohiILpDb", (c)) != NULL) + +/* +* Data declarations +*/ + +enum eOptionLimits { + MaxHeaderExtensions = 100, /* maximum number of extensions in -h option */ + MaxSupportedTagFormat = 2 +}; + +typedef struct sOptionDescription { + int usedByEtags; + const char *description; +} optionDescription; + +typedef void (*parametricOptionHandler) (const char *const option, const char *const parameter); + +typedef const struct { + const char* name; /* name of option as specified by user */ + parametricOptionHandler handler; /* routine to handle option */ + boolean initOnly; /* option must be specified before any files */ +} parametricOption; + +typedef const struct { + const char* name; /* name of option as specified by user */ + boolean* pValue; /* pointer to option value */ + boolean initOnly; /* option must be specified before any files */ +} booleanOption; + +/* +* DATA DEFINITIONS +*/ + +static boolean NonOptionEncountered; +static stringList *OptionFiles; +static stringList* Excluded; +static boolean FilesRequired = TRUE; +static boolean SkipConfiguration; + +static const char *const HeaderExtensions [] = { + "h", "H", "hh", "hpp", "hxx", "h++", "inc", "def", NULL +}; + +optionValues Option = { + { + FALSE, /* --extra=f */ + FALSE, /* --extra=q */ + TRUE, /* --file-scope */ + }, + { + FALSE, /* -fields=a */ + TRUE, /* -fields=f */ + FALSE, /* -fields=m */ + FALSE, /* -fields=i */ + TRUE, /* -fields=k */ + FALSE, /* -fields=z */ + FALSE, /* -fields=K */ + FALSE, /* -fields=l */ + FALSE, /* -fields=n */ + TRUE, /* -fields=s */ + FALSE, /* -fields=S */ + TRUE /* -fields=t */ + }, + NULL, /* -I */ + FALSE, /* -a */ + FALSE, /* -B */ + FALSE, /* -e */ +#ifdef MACROS_USE_PATTERNS + EX_PATTERN, /* -n, --excmd */ +#else + EX_MIX, /* -n, --excmd */ +#endif + FALSE, /* -R */ + SO_SORTED, /* -u, --sort */ + FALSE, /* -V */ + FALSE, /* -x */ + NULL, /* -L */ + NULL, /* -o */ + NULL, /* -h */ + NULL, /* --etags-include */ + DEFAULT_FILE_FORMAT,/* --format */ + FALSE, /* --if0 */ + FALSE, /* --kind-long */ + LANG_AUTO, /* --lang */ + TRUE, /* --links */ + FALSE, /* --filter */ + NULL, /* --filter-terminator */ + FALSE, /* --tag-relative */ + FALSE, /* --totals */ + FALSE, /* --line-directives */ +#ifdef DEBUG + 0, 0 /* -D, -b */ +#endif +}; + +/* +- Locally used only +*/ + +static optionDescription LongOptionDescription [] = { + {1," -a Append the tags to an existing tag file."}, +#ifdef DEBUG + {1," -b "}, + {1," Set break line."}, +#endif + {0," -B Use backward searching patterns (?...?)."}, +#ifdef DEBUG + {1," -D "}, + {1," Set debug level."}, +#endif + {0," -e Output tag file for use with Emacs."}, + {1," -f "}, + {1," Write tags to specified file. Value of \"-\" writes tags to stdout"}, + {1," [\"tags\"; or \"TAGS\" when -e supplied]."}, + {0," -F Use forward searching patterns (/.../) (default)."}, + {1," -h "}, + {1," Specify list of file extensions to be treated as include files."}, + {1," [\".h.H.hh.hpp.hxx.h++\"]."}, + {1," -I "}, + {1," A list of tokens to be specially handled is read from either the"}, + {1," command line or the specified file."}, + {1," -L "}, + {1," A list of source file names are read from the specified file."}, + {1," If specified as \"-\", then standard input is read."}, + {0," -n Equivalent to --excmd=number."}, + {0," -N Equivalent to --excmd=pattern."}, + {1," -o Alternative for -f."}, +#ifdef RECURSE_SUPPORTED + {1," -R Equivalent to --recurse."}, +#else + {1," -R Not supported on this platform."}, +#endif + {0," -u Equivalent to --sort=no."}, + {1," -V Equivalent to --verbose."}, + {1," -x Print a tabular cross reference file to standard output."}, + {1," --append=[yes|no]"}, + {1," Should tags should be appended to existing tag file [no]?"}, + {1," --etags-include=file"}, + {1," Include reference to 'file' in Emacs-style tag file (requires -e)."}, + {1," --exclude=pattern"}, + {1," Exclude files and directories matching 'pattern'."}, + {0," --excmd=number|pattern|mix"}, +#ifdef MACROS_USE_PATTERNS + {0," Uses the specified type of EX command to locate tags [pattern]."}, +#else + {0," Uses the specified type of EX command to locate tags [mix]."}, +#endif + {1," --extra=[+|-]flags"}, + {1," Include extra tag entries for selected information (flags: \"fq\")."}, + {1," --fields=[+|-]flags"}, + {1," Include selected extension fields (flags: \"afmikKlnsStz\") [fks]."}, + {1," --file-scope=[yes|no]"}, + {1," Should tags scoped only for a single file (e.g. \"static\" tags"}, + {1," be included in the output [yes]?"}, + {1," --filter=[yes|no]"}, + {1," Behave as a filter, reading file names from standard input and"}, + {1," writing tags to standard output [no]."}, + {1," --filter-terminator=string"}, + {1," Specify string to print to stdout following the tags for each file"}, + {1," parsed when --filter is enabled."}, + {0," --format=level"}, +#if DEFAULT_FILE_FORMAT == 1 + {0," Force output of specified tag file format [1]."}, +#else + {0," Force output of specified tag file format [2]."}, +#endif + {1," --help"}, + {1," Print this option summary."}, + {1," --if0=[yes|no]"}, + {1," Should C code within #if 0 conditional branches be parsed [no]?"}, + {1," ---kinds=[+|-]kinds"}, + {1," Enable/disable tag kinds for language ."}, + {1," --langdef=name"}, + {1," Define a new language to be parsed with regular expressions."}, + {1," --langmap=map(s)"}, + {1," Override default mapping of language to source file extension."}, + {1," --language-force=language"}, + {1," Force all files to be interpreted using specified language."}, + {1," --languages=[+|-]list"}, + {1," Restrict files scanned for tags to those mapped to langauges"}, + {1," specified in the comma-separated 'list'. The list can contain any"}, + {1," built-in or user-defined language [all]."}, + {1," --license"}, + {1," Print details of software license."}, + {0," --line-directives=[yes|no]"}, + {0," Should #line directives be processed [no]?"}, + {1," --links=[yes|no]"}, + {1," Indicate whether symbolic links should be followed [yes]."}, + {1," --list-kinds=[language|all]"}, + {1," Output a list of all tag kinds for specified language or all."}, + {1," --list-languages"}, + {1," Output list of supported languages."}, + {1," --list-maps=[language|all]"}, + {1," Output list of language mappings."}, + {1," --options=file"}, + {1," Specify file from which command line options should be read."}, + {1," --recurse=[yes|no]"}, +#ifdef RECURSE_SUPPORTED + {1," Recurse into directories supplied on command line [no]."}, +#else + {1," Not supported on this platform."}, +#endif +#ifdef HAVE_REGEX + {1," --regex-=/line_pattern/name_pattern/[flags]"}, + {1," Define regular expression for locating tags in specific language."}, +#endif + {0," --sort=[yes|no|foldcase]"}, + {0," Should tags be sorted (optionally ignoring case) [yes]?."}, + {0," --tag-relative=[yes|no]"}, + {0," Should paths be relative to location of tag file [no; yes when -e]?"}, + {1," --totals=[yes|no]"}, + {1," Print statistics about source and tag files [no]."}, + {1," --verbose=[yes|no]"}, + {1," Enable verbose messages describing actions on each source file."}, + {1," --version"}, + {1," Print version identifier to standard output."}, + {1, NULL} +}; + +static const char* const License1 = +"This program is free software; you can redistribute it and/or\n" +"modify it under the terms of the GNU General Public License\n" +"as published by the Free Software Foundation; either version 2\n" +"of the License, or (at your option) any later version.\n" +"\n"; +static const char* const License2 = +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"; + +/* Contains a set of strings describing the set of "features" compiled into + * the code. + */ +static const char *const Features [] = { +#ifdef WIN32 + "win32", +#endif +#ifdef DJGPP + "msdos_32", +#else +# ifdef MSDOS + "msdos_16", +# endif +#endif +#ifdef OS2 + "os2", +#endif +#ifdef AMIGA + "amiga", +#endif +#ifdef VMS + "vms", +#endif +#ifdef HAVE_FNMATCH + "wildcards", +#endif +#ifdef HAVE_REGEX + "regex", +#endif +#ifndef EXTERNAL_SORT + "internal-sort", +#endif +#ifdef CUSTOM_CONFIGURATION_FILE + "custom-conf", +#endif +#if (defined (MSDOS) || defined (WIN32) || defined (OS2)) && defined (UNIX_PATH_SEPARATOR) + "unix-path-separator", +#endif +#ifdef DEBUG + "debug", +#endif + NULL +}; + +/* +* FUNCTION PROTOTYPES +*/ +static boolean parseFileOptions (const char *const fileName); + +/* +* FUNCTION DEFINITIONS +*/ + +extern void verbose (const char *const format, ...) +{ + if (Option.verbose) + { + va_list ap; + va_start (ap, format); + vprintf (format, ap); + va_end (ap); + } +} + +static char *stringCopy (const char *const string) +{ + char* result = NULL; + if (string != NULL) + result = eStrdup (string); + return result; +} + +static void freeString (char **const pString) +{ + if (*pString != NULL) + { + eFree (*pString); + *pString = NULL; + } +} + +extern void freeList (stringList** const pList) +{ + if (*pList != NULL) + { + stringListDelete (*pList); + *pList = NULL; + } +} + +extern void setDefaultTagFileName (void) +{ + if (Option.tagFileName != NULL) + ; /* accept given name */ + else if (Option.etags) + Option.tagFileName = stringCopy (ETAGS_FILE); + else + Option.tagFileName = stringCopy (CTAGS_FILE); +} + +extern boolean filesRequired (void) +{ + boolean result = FilesRequired; + if (Option.recurse) + result = FALSE; + return result; +} + +extern void checkOptions (void) +{ + const char* notice; + if (Option.xref) + { + notice = "xref output"; + if (Option.include.fileNames) + { + error (WARNING, "%s disables file name tags", notice); + Option.include.fileNames = FALSE; + } + } + if (Option.append) + { + notice = "append mode is not compatible with"; + if (isDestinationStdout ()) + error (FATAL, "%s tags to stdout", notice); + } + if (Option.filter) + { + notice = "filter mode"; + if (Option.printTotals) + { + error (WARNING, "%s disables totals", notice); + Option.printTotals = FALSE; + } + if (Option.tagFileName != NULL) + error (WARNING, "%s ignores output tag file name", notice); + } +} + +static void setEtagsMode (void) +{ + Option.etags = TRUE; + Option.sorted = SO_UNSORTED; + Option.lineDirectives = FALSE; + Option.tagRelative = TRUE; +} + +extern void testEtagsInvocation (void) +{ + char* const execName = eStrdup (getExecutableName ()); + char* const etags = eStrdup (ETAGS); +#ifdef CASE_INSENSITIVE_FILENAMES + toLowerString (execName); + toLowerString (etags); +#endif + if (strstr (execName, etags) != NULL) + { + verbose ("Running in etags mode\n"); + setEtagsMode (); + } +} + +/* + * Cooked argument parsing + */ + +static void parseShortOption (cookedArgs *const args) +{ + args->simple [0] = *args->shortOptions++; + args->simple [1] = '\0'; + args->item = args->simple; + if (! isCompoundOption (*args->simple)) + args->parameter = ""; + else if (*args->shortOptions == '\0') + { + argForth (args->args); + if (argOff (args->args)) + args->parameter = NULL; + else + args->parameter = argItem (args->args); + args->shortOptions = NULL; + } + else + { + args->parameter = args->shortOptions; + args->shortOptions = NULL; + } +} + +static void parseLongOption (cookedArgs *const args, const char *item) +{ + const char* const equal = strchr (item, '='); + if (equal == NULL) + { + args->item = eStrdup (item); + args->parameter = ""; + } + else + { + const size_t length = equal - item; + args->item = xMalloc (length + 1, char); + strncpy (args->item, item, length); + args->item [length] = '\0'; + args->parameter = equal + 1; + } + Assert (args->item != NULL); + Assert (args->parameter != NULL); +} + +static void cArgRead (cookedArgs *const current) +{ + char* item; + + Assert (current != NULL); + if (! argOff (current->args)) + { + item = argItem (current->args); + current->shortOptions = NULL; + Assert (item != NULL); + if (strncmp (item, "--", (size_t) 2) == 0) + { + current->isOption = TRUE; + current->longOption = TRUE; + parseLongOption (current, item + 2); + Assert (current->item != NULL); + Assert (current->parameter != NULL); + } + else if (*item == '-') + { + current->isOption = TRUE; + current->longOption = FALSE; + current->shortOptions = item + 1; + parseShortOption (current); + } + else + { + current->isOption = FALSE; + current->longOption = FALSE; + current->item = item; + current->parameter = NULL; + } + } +} + +extern cookedArgs* cArgNewFromString (const char* string) +{ + cookedArgs* const result = xMalloc (1, cookedArgs); + memset (result, 0, sizeof (cookedArgs)); + result->args = argNewFromString (string); + cArgRead (result); + return result; +} + +extern cookedArgs* cArgNewFromArgv (char* const* const argv) +{ + cookedArgs* const result = xMalloc (1, cookedArgs); + memset (result, 0, sizeof (cookedArgs)); + result->args = argNewFromArgv (argv); + cArgRead (result); + return result; +} + +extern cookedArgs* cArgNewFromFile (FILE* const fp) +{ + cookedArgs* const result = xMalloc (1, cookedArgs); + memset (result, 0, sizeof (cookedArgs)); + result->args = argNewFromFile (fp); + cArgRead (result); + return result; +} + +extern cookedArgs* cArgNewFromLineFile (FILE* const fp) +{ + cookedArgs* const result = xMalloc (1, cookedArgs); + memset (result, 0, sizeof (cookedArgs)); + result->args = argNewFromLineFile (fp); + cArgRead (result); + return result; +} + +extern void cArgDelete (cookedArgs* const current) +{ + Assert (current != NULL); + argDelete (current->args); + memset (current, 0, sizeof (cookedArgs)); + eFree (current); +} + +static boolean cArgOptionPending (cookedArgs* const current) +{ + boolean result = FALSE; + if (current->shortOptions != NULL) + if (*current->shortOptions != '\0') + result = TRUE; + return result; +} + +extern boolean cArgOff (cookedArgs* const current) +{ + Assert (current != NULL); + return (boolean) (argOff (current->args) && ! cArgOptionPending (current)); +} + +extern boolean cArgIsOption (cookedArgs* const current) +{ + Assert (current != NULL); + return current->isOption; +} + +extern const char* cArgItem (cookedArgs* const current) +{ + Assert (current != NULL); + return current->item; +} + +extern void cArgForth (cookedArgs* const current) +{ + Assert (current != NULL); + Assert (! cArgOff (current)); + if (cArgOptionPending (current)) + parseShortOption (current); + else + { + Assert (! argOff (current->args)); + argForth (current->args); + if (! argOff (current->args)) + cArgRead (current); + else + { + current->isOption = FALSE; + current->longOption = FALSE; + current->shortOptions = NULL; + current->item = NULL; + current->parameter = NULL; + } + } +} + +/* + * File extension and language mapping + */ + +static void addExtensionList ( + stringList *const slist, const char *const elist, const boolean clear) +{ + char *const extensionList = eStrdup (elist); + const char *extension = NULL; + boolean first = TRUE; + + if (clear) + { + verbose (" clearing\n"); + stringListClear (slist); + } + verbose (" adding: "); + if (elist != NULL && *elist != '\0') + { + extension = extensionList; + if (elist [0] == EXTENSION_SEPARATOR) + ++extension; + } + while (extension != NULL) + { + char *separator = strchr (extension, EXTENSION_SEPARATOR); + if (separator != NULL) + *separator = '\0'; + verbose ("%s%s", first ? "" : ", ", + *extension == '\0' ? "(NONE)" : extension); + stringListAdd (slist, vStringNewInit (extension)); + first = FALSE; + if (separator == NULL) + extension = NULL; + else + extension = separator + 1; + } + if (Option.verbose) + { + printf ("\n now: "); + stringListPrint (slist); + putchar ('\n'); + } + eFree (extensionList); +} + +static boolean isFalse (const char *parameter) +{ + return (boolean) ( + strcasecmp (parameter, "0" ) == 0 || + strcasecmp (parameter, "n" ) == 0 || + strcasecmp (parameter, "no" ) == 0 || + strcasecmp (parameter, "off") == 0); +} + +static boolean isTrue (const char *parameter) +{ + return (boolean) ( + strcasecmp (parameter, "1" ) == 0 || + strcasecmp (parameter, "y" ) == 0 || + strcasecmp (parameter, "yes") == 0 || + strcasecmp (parameter, "on" ) == 0); +} + +/* Determines whether the specified file name is considered to be a header + * file for the purposes of determining whether enclosed tags are global or + * static. + */ +extern boolean isIncludeFile (const char *const fileName) +{ + boolean result = FALSE; + const char *const extension = fileExtension (fileName); + if (Option.headerExt != NULL) + result = stringListExtensionMatched (Option.headerExt, extension); + return result; +} + +/* + * Specific option processing + */ + +static void processEtagsInclude ( + const char *const option, const char *const parameter) +{ + if (! Option.etags) + error (FATAL, "Etags must be enabled to use \"%s\" option", option); + else + { + vString *const file = vStringNewInit (parameter); + if (Option.etagsInclude == NULL) + Option.etagsInclude = stringListNew (); + stringListAdd (Option.etagsInclude, file); + FilesRequired = FALSE; + } +} + +static void processExcludeOption ( + const char *const option __unused__, const char *const parameter) +{ + const char *const fileName = parameter + 1; + if (parameter [0] == '\0') + freeList (&Excluded); + else if (parameter [0] == '@') + { + stringList* const sl = stringListNewFromFile (fileName); + if (sl == NULL) + error (FATAL | PERROR, "cannot open \"%s\"", fileName); + if (Excluded == NULL) + Excluded = sl; + else + stringListCombine (Excluded, sl); + verbose (" adding exclude patterns from %s\n", fileName); + } + else + { + vString *const item = vStringNewInit (parameter); + if (Excluded == NULL) + Excluded = stringListNew (); + stringListAdd (Excluded, item); + verbose (" adding exclude pattern: %s\n", parameter); + } +} + +extern boolean isExcludedFile (const char* const name) +{ + const char* base = baseFilename (name); + boolean result = FALSE; + if (Excluded != NULL) + { + result = stringListFileMatched (Excluded, base); + if (! result && name != base) + result = stringListFileMatched (Excluded, name); + } +#ifdef AMIGA + /* not a good solution, but the only one which works often */ + if (! result) + result = (boolean) (strcmp (name, TagFile.name) == 0); +#endif + return result; +} + +static void processExcmdOption ( + const char *const option, const char *const parameter) +{ + switch (*parameter) + { + case 'm': Option.locate = EX_MIX; break; + case 'n': Option.locate = EX_LINENUM; break; + case 'p': Option.locate = EX_PATTERN; break; + default: + error (FATAL, "Invalid value for \"%s\" option", option); + break; + } +} + +static void processExtraTagsOption ( + const char *const option, const char *const parameter) +{ + struct sInclude *const inc = &Option.include; + const char *p = parameter; + boolean mode = TRUE; + int c; + + if (*p != '+' && *p != '-') + { + inc->fileNames = FALSE; + inc->qualifiedTags = FALSE; +#if 0 + inc->fileScope = FALSE; +#endif + } + while ((c = *p++) != '\0') switch (c) + { + case '+': mode = TRUE; break; + case '-': mode = FALSE; break; + + case 'f': inc->fileNames = mode; break; + case 'q': inc->qualifiedTags = mode; break; +#if 0 + case 'F': inc->fileScope = mode; break; +#endif + + default: error(WARNING, "Unsupported parameter '%c' for \"%s\" option", + c, option); + break; + } +} + +static void processFieldsOption ( + const char *const option, const char *const parameter) +{ + struct sExtFields *field = &Option.extensionFields; + const char *p = parameter; + boolean mode = TRUE; + int c; + + if (*p != '+' && *p != '-') + { + field->access = FALSE; + field->fileScope = FALSE; + field->implementation = FALSE; + field->inheritance = FALSE; + field->kind = FALSE; + field->kindKey = FALSE; + field->kindLong = FALSE; + field->language = FALSE; + field->scope = FALSE; + field->typeRef = FALSE; + } + while ((c = *p++) != '\0') switch (c) + { + case '+': mode = TRUE; break; + case '-': mode = FALSE; break; + + case 'a': field->access = mode; break; + case 'f': field->fileScope = mode; break; + case 'm': field->implementation = mode; break; + case 'i': field->inheritance = mode; break; + case 'k': field->kind = mode; break; + case 'K': field->kindLong = mode; break; + case 'l': field->language = mode; break; + case 'n': field->lineNumber = mode; break; + case 's': field->scope = mode; break; + case 'S': field->signature = mode; break; + case 'z': field->kindKey = mode; break; + case 't': field->typeRef = mode; break; + + default: error(WARNING, "Unsupported parameter '%c' for \"%s\" option", + c, option); + break; + } +} + +static void processFilterTerminatorOption ( + const char *const option __unused__, const char *const parameter) +{ + freeString (&Option.filterTerminator); + Option.filterTerminator = stringCopy (parameter); +} + +static void processFormatOption ( + const char *const option, const char *const parameter) +{ + unsigned int format; + + if (sscanf (parameter, "%u", &format) < 1) + error (FATAL, "Invalid value for \"%s\" option",option); + else if (format <= (unsigned int) MaxSupportedTagFormat) + Option.tagFileFormat = format; + else + error (FATAL, "Unsupported value for \"%s\" option", option); +} + +static void printInvocationDescription (void) +{ + printf (INVOCATION, getExecutableName ()); +} + +static void printOptionDescriptions (const optionDescription *const optDesc) +{ + int i; + for (i = 0 ; optDesc [i].description != NULL ; ++i) + { + if (! Option.etags || optDesc [i].usedByEtags) + puts (optDesc [i].description); + } +} + +static void printFeatureList (void) +{ + int i; + + for (i = 0 ; Features [i] != NULL ; ++i) + { + if (i == 0) + printf (" Optional compiled features: "); + printf ("%s+%s", (i>0 ? ", " : ""), Features [i]); +#ifdef CUSTOM_CONFIGURATION_FILE + if (strcmp (Features [i], "custom-conf") == 0) + printf ("=%s", CUSTOM_CONFIGURATION_FILE); +#endif + } + if (i > 0) + putchar ('\n'); +} + +static void printProgramIdentification (void) +{ + printf ("%s %s, Copyright (C) 1996-2004 %s\n", + PROGRAM_NAME, PROGRAM_VERSION, AUTHOR_NAME); + printf (" Compiled: %s, %s\n", __DATE__, __TIME__); + printf (" Addresses: <%s>, %s\n", AUTHOR_EMAIL, PROGRAM_URL); + printFeatureList (); +} + +static void processHelpOption ( + const char *const option __unused__, + const char *const parameter __unused__) +{ + printProgramIdentification (); + putchar ('\n'); + printInvocationDescription (); + putchar ('\n'); + printOptionDescriptions (LongOptionDescription); + exit (0); +} + +static void processLanguageForceOption ( + const char *const option, const char *const parameter) +{ + langType language; + if (strcasecmp (parameter, "auto") == 0) + language = LANG_AUTO; + else + language = getNamedLanguage (parameter); + + if (strcmp (option, "lang") == 0 || strcmp (option, "language") == 0) + error (WARNING, + "\"--%s\" option is obsolete; use \"--language-force\" instead", + option); + if (language == LANG_IGNORE) + error (FATAL, "Unknown language specified in \"%s\" option", option); + else + Option.language = language; +} +static char* skipPastMap (char* p) +{ + while (*p != EXTENSION_SEPARATOR && + *p != PATTERN_START && *p != ',' && *p != '\0') + ++p; + return p; +} + +/* Parses the mapping beginning at `map', adds it to the language map, and + * returns first character past the map. + */ +static char* addLanguageMap (const langType language, char* map) +{ + char* p = NULL; + const char first = *map; + if (first == EXTENSION_SEPARATOR) /* extension map */ + { + ++map; + p = skipPastMap (map); + if (*p == '\0') + { + verbose (" .%s", map); + addLanguageExtensionMap (language, map); + p = map + strlen (map); + } + else + { + const char separator = *p; + *p = '\0'; + verbose (" .%s", map); + addLanguageExtensionMap (language, map); + *p = separator; + } + } + else if (first == PATTERN_START) /* pattern map */ + { + ++map; + for (p = map ; *p != PATTERN_STOP && *p != '\0' ; ++p) + { + if (*p == '\\' && *(p + 1) == PATTERN_STOP) + ++p; + } + if (*p == '\0') + error (FATAL, "Unterminated file name pattern for %s language", + getLanguageName (language)); + else + { + *p++ = '\0'; + verbose (" (%s)", map); + addLanguagePatternMap (language, map); + } + } + else + error (FATAL, "Badly formed language map for %s language", + getLanguageName (language)); + return p; +} + +static char* processLanguageMap (char* map) +{ + char* const separator = strchr (map, ':'); + char* result = NULL; + if (separator != NULL) + { + langType language; + char *list = separator + 1; + boolean clear = FALSE; + *separator = '\0'; + language = getNamedLanguage (map); + if (language != LANG_IGNORE) + { + const char *const deflt = "default"; + char* p; + if (*list == '+') + ++list; + else + clear = TRUE; + for (p = list ; *p != ',' && *p != '\0' ; ++p) /*no-op*/ ; + if ((size_t) (p - list) == strlen (deflt) && + strncasecmp (list, deflt, p - list) == 0) + { + verbose (" Restoring default %s language map: ", getLanguageName (language)); + installLanguageMapDefault (language); + list = p; + } + else + { + if (clear) + { + verbose (" Setting %s language map:", getLanguageName (language)); + clearLanguageMap (language); + } + else + verbose (" Adding to %s language map:", getLanguageName (language)); + while (list != NULL && *list != '\0' && *list != ',') + list = addLanguageMap (language, list); + verbose ("\n"); + } + if (list != NULL && *list == ',') + ++list; + result = list; + } + } + return result; +} + +static void processLanguageMapOption ( + const char *const option, const char *const parameter) +{ + char *const maps = eStrdup (parameter); + char *map = maps; + + if (strcmp (parameter, "default") == 0) + { + verbose (" Restoring default language maps:\n"); + installLanguageMapDefaults (); + } + else while (map != NULL && *map != '\0') + { + char* const next = processLanguageMap (map); + if (next == NULL) + error (WARNING, "Unknown language specified in \"%s\" option", option); + map = next; + } + eFree (maps); +} + +static void processLanguagesOption ( + const char *const option, const char *const parameter) +{ + char *const langs = eStrdup (parameter); + enum { Add, Remove, Replace } mode = Replace; + boolean first = TRUE; + char *lang = langs; + const char* prefix = ""; + verbose (" Enabled languages: "); + while (lang != NULL) + { + char *const end = strchr (lang, ','); + if (lang [0] == '+') + { + ++lang; + mode = Add; + prefix = "+ "; + } + else if (lang [0] == '-') + { + ++lang; + mode = Remove; + prefix = "- "; + } + if (mode == Replace) + enableLanguages (FALSE); + if (end != NULL) + *end = '\0'; + if (lang [0] != '\0') + { + if (strcmp (lang, "all") == 0) + enableLanguages ((boolean) (mode != Remove)); + else + { + const langType language = getNamedLanguage (lang); + if (language == LANG_IGNORE) + error (WARNING, "Unknown language specified in \"%s\" option", option); + else + enableLanguage (language, (boolean) (mode != Remove)); + } + verbose ("%s%s%s", (first ? "" : ", "), prefix, lang); + prefix = ""; + first = FALSE; + if (mode == Replace) + mode = Add; + } + lang = (end != NULL ? end + 1 : NULL); + } + verbose ("\n"); + eFree (langs); +} + +static void processLicenseOption ( + const char *const option __unused__, + const char *const parameter __unused__) +{ + printProgramIdentification (); + puts (""); + puts (License1); + puts (License2); + exit (0); +} + +static void processListKindsOption ( + const char *const option, const char *const parameter) +{ + if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0) + printLanguageKinds (LANG_AUTO); + else + { + langType language = getNamedLanguage (parameter); + if (language == LANG_IGNORE) + error (FATAL, "Unknown language specified in \"%s\" option",option); + else + printLanguageKinds (language); + } + exit (0); +} + +static void processListMapsOption ( + const char *const __unused__ option, + const char *const __unused__ parameter) +{ + if (parameter [0] == '\0' || strcasecmp (parameter, "all") == 0) + printLanguageMaps (LANG_AUTO); + else + { + langType language = getNamedLanguage (parameter); + if (language == LANG_IGNORE) + error (FATAL, "Unknown language specified in \"%s\" option",option); + else + printLanguageMaps (language); + } + exit (0); +} + +static void processListLanguagesOption ( + const char *const option __unused__, + const char *const parameter __unused__) +{ + printLanguageList (); + exit (0); +} + +static void processOptionFile ( + const char *const option, const char *const parameter) +{ + if (parameter [0] == '\0') + error (WARNING, "no option file supplied for \"%s\"", option); + else if (! parseFileOptions (parameter)) + error (FATAL | PERROR, "cannot open option file \"%s\"", parameter); +} + +static void processSortOption ( + const char *const option, const char *const parameter) +{ + if (isFalse (parameter)) + Option.sorted = SO_UNSORTED; + else if (isTrue (parameter)) + Option.sorted = SO_SORTED; + else if (strcasecmp (parameter, "f") == 0 || + strcasecmp (parameter, "fold") == 0 || + strcasecmp (parameter, "foldcase") == 0) + Option.sorted = SO_FOLDSORTED; + else + error (FATAL, "Invalid value for \"%s\" option", option); +} + +static void installHeaderListDefaults (void) +{ + Option.headerExt = stringListNewFromArgv (HeaderExtensions); + if (Option.verbose) + { + printf (" Setting default header extensions: "); + stringListPrint (Option.headerExt); + putchar ('\n'); + } +} + +static void processHeaderListOption (const int option, const char *parameter) +{ + /* Check to make sure that the user did not enter "ctags -h *.c" + * by testing to see if the list is a filename that exists. + */ + if (doesFileExist (parameter)) + error (FATAL, "-%c: Invalid list", option); + if (strcmp (parameter, "default") == 0) + installHeaderListDefaults (); + else + { + boolean clear = TRUE; + + if (parameter [0] == '+') + { + ++parameter; + clear = FALSE; + } + if (Option.headerExt == NULL) + Option.headerExt = stringListNew (); + verbose (" Header Extensions:\n"); + addExtensionList (Option.headerExt, parameter, clear); + } +} + +/* + * Token ignore processing + */ + +/* Determines whether or not "name" should be ignored, per the ignore list. + */ +extern boolean isIgnoreToken ( + const char *const name, boolean *const pIgnoreParens, + const char **const replacement) +{ + boolean result = FALSE; + + if (Option.ignore != NULL) + { + const size_t nameLen = strlen (name); + unsigned int i; + + if (pIgnoreParens != NULL) + *pIgnoreParens = FALSE; + + for (i = 0 ; i < stringListCount (Option.ignore) ; ++i) + { + vString *token = stringListItem (Option.ignore, i); + if (strncmp (vStringValue (token), name, nameLen) == 0) + { + const size_t tokenLen = vStringLength (token); + + if (nameLen == tokenLen) + { + result = TRUE; + break; + } + else if (tokenLen == nameLen + 1 && + vStringChar (token, tokenLen - 1) == '+') + { + result = TRUE; + if (pIgnoreParens != NULL) + *pIgnoreParens = TRUE; + break; + } + else if (vStringChar (token, nameLen) == '=') + { + if (replacement != NULL) + *replacement = vStringValue (token) + nameLen + 1; + break; + } + } + } + } + return result; +} + +static void saveIgnoreToken (vString *const ignoreToken) +{ + if (Option.ignore == NULL) + Option.ignore = stringListNew (); + stringListAdd (Option.ignore, ignoreToken); + verbose (" ignore token: %s\n", vStringValue (ignoreToken)); +} + +static void readIgnoreList (const char *const list) +{ + char* newList = stringCopy (list); + const char *token = strtok (newList, IGNORE_SEPARATORS); + + while (token != NULL) + { + vString *const entry = vStringNewInit (token); + + saveIgnoreToken (entry); + token = strtok (NULL, IGNORE_SEPARATORS); + } + eFree (newList); +} + +static void addIgnoreListFromFile (const char *const fileName) +{ + stringList* tokens = stringListNewFromFile (fileName); + if (tokens == NULL) + error (FATAL | PERROR, "cannot open \"%s\"", fileName); + if (Option.ignore == NULL) + Option.ignore = tokens; + else + stringListCombine (Option.ignore, tokens); +} + +static void processIgnoreOption (const char *const list) +{ + if (strchr ("@./\\", list [0]) != NULL) + { + const char* fileName = (*list == '@') ? list + 1 : list; + addIgnoreListFromFile (fileName); + } +#if defined (MSDOS) || defined (WIN32) || defined (OS2) + else if (isalpha (list [0]) && list [1] == ':') + addIgnoreListFromFile (list); +#endif + else if (strcmp (list, "-") == 0) + { + freeList (&Option.ignore); + verbose (" clearing list\n"); + } + else + readIgnoreList (list); +} + +static void processVersionOption ( + const char *const option __unused__, + const char *const parameter __unused__) +{ + printProgramIdentification (); + exit (0); +} + +/* + * Option tables + */ + +static parametricOption ParametricOptions [] = { + { "etags-include", processEtagsInclude, FALSE }, + { "exclude", processExcludeOption, FALSE }, + { "excmd", processExcmdOption, FALSE }, + { "extra", processExtraTagsOption, FALSE }, + { "fields", processFieldsOption, FALSE }, + { "filter-terminator", processFilterTerminatorOption, TRUE }, + { "format", processFormatOption, TRUE }, + { "help", processHelpOption, TRUE }, + { "lang", processLanguageForceOption, FALSE }, + { "language", processLanguageForceOption, FALSE }, + { "language-force", processLanguageForceOption, FALSE }, + { "languages", processLanguagesOption, FALSE }, + { "langdef", processLanguageDefineOption, FALSE }, + { "langmap", processLanguageMapOption, FALSE }, + { "license", processLicenseOption, TRUE }, + { "list-kinds", processListKindsOption, TRUE }, + { "list-maps", processListMapsOption, TRUE }, + { "list-languages", processListLanguagesOption, TRUE }, + { "options", processOptionFile, FALSE }, + { "sort", processSortOption, TRUE }, + { "version", processVersionOption, TRUE }, +}; + +static booleanOption BooleanOptions [] = { + { "append", &Option.append, TRUE }, + { "file-scope", &Option.include.fileScope, FALSE }, + { "file-tags", &Option.include.fileNames, FALSE }, + { "filter", &Option.filter, TRUE }, + { "if0", &Option.if0, FALSE }, + { "kind-long", &Option.kindLong, TRUE }, + { "line-directives",&Option.lineDirectives, FALSE }, + { "links", &Option.followLinks, FALSE }, +#ifdef RECURSE_SUPPORTED + { "recurse", &Option.recurse, FALSE }, +#endif + { "tag-relative", &Option.tagRelative, TRUE }, + { "totals", &Option.printTotals, TRUE }, + { "verbose", &Option.verbose, FALSE }, +}; + +/* + * Generic option parsing + */ + +static void checkOptionOrder (const char* const option) +{ + if (NonOptionEncountered) + error (FATAL, "-%s option may not follow a file name", option); +} + +static boolean processParametricOption ( + const char *const option, const char *const parameter) +{ + const int count = sizeof (ParametricOptions) / sizeof (parametricOption); + boolean found = FALSE; + int i; + + for (i = 0 ; i < count && ! found ; ++i) + { + parametricOption* const entry = &ParametricOptions [i]; + if (strcmp (option, entry->name) == 0) + { + found = TRUE; + if (entry->initOnly) + checkOptionOrder (option); + (entry->handler) (option, parameter); + } + } + return found; +} + +static boolean getBooleanOption ( + const char *const option, const char *const parameter) +{ + boolean selection = TRUE; + + if (parameter [0] == '\0') + selection = TRUE; + else if (isFalse (parameter)) + selection = FALSE; + else if (isTrue (parameter)) + selection = TRUE; + else + error (FATAL, "Invalid value for \"%s\" option", option); + + return selection; +} + +static boolean processBooleanOption ( + const char *const option, const char *const parameter) +{ + const int count = sizeof (BooleanOptions) / sizeof (booleanOption); + boolean found = FALSE; + int i; + + for (i = 0 ; i < count && ! found ; ++i) + { + booleanOption* const entry = &BooleanOptions [i]; + if (strcmp (option, entry->name) == 0) + { + found = TRUE; + if (entry->initOnly) + checkOptionOrder (option); + *entry->pValue = getBooleanOption (option, parameter); + } + } + return found; +} + +static void processLongOption ( + const char *const option, const char *const parameter) +{ + Assert (parameter != NULL); + if (parameter == NULL && parameter [0] == '\0') + verbose (" Option: --%s\n", option); + else + verbose (" Option: --%s=%s\n", option, parameter); + + if (processBooleanOption (option, parameter)) + ; + else if (processParametricOption (option, parameter)) + ; + else if (processKindOption (option, parameter)) + ; + else if (processRegexOption (option, parameter)) + ; +#ifndef RECURSE_SUPPORTED + else if (strcmp (option, "recurse") == 0) + error (WARNING, "%s option not supported on this host", option); +#endif + else + error (FATAL, "Unknown option: --%s", option); +} + +static void processShortOption ( + const char *const option, const char *const parameter) +{ + if (parameter == NULL || parameter [0] == '\0') + verbose (" Option: -%s\n", option); + else + verbose (" Option: -%s %s\n", option, parameter); + + if (isCompoundOption (*option) && (parameter == NULL || parameter [0] == '\0')) + error (FATAL, "Missing parameter for \"%s\" option", option); + else switch (*option) + { + case '?': + processHelpOption ("?", NULL); + exit (0); + break; + case 'a': + checkOptionOrder (option); + Option.append = TRUE; + break; +#ifdef DEBUG + case 'b': + if (atol (parameter) < 0) + error (FATAL, "-%s: Invalid line number", option); + Option.breakLine = atol (parameter); + break; + case 'D': + Option.debugLevel = strtol (parameter, NULL, 0); + if (debug (DEBUG_STATUS)) + Option.verbose = TRUE; + break; +#endif + case 'B': + Option.backward = TRUE; + break; + case 'e': + checkOptionOrder (option); + setEtagsMode (); + break; + case 'f': + case 'o': + checkOptionOrder (option); + if (Option.tagFileName != NULL) + { + error (WARNING, + "-%s option specified more than once, last value used", + option); + freeString (&Option.tagFileName); + } + else if (parameter [0] == '-' && parameter [1] != '\0') + error (FATAL, "output file name may not begin with a '-'"); + Option.tagFileName = stringCopy (parameter); + break; + case 'F': + Option.backward = FALSE; + break; + case 'h': + processHeaderListOption (*option, parameter); + break; + case 'I': + processIgnoreOption (parameter); + break; + case 'L': + if (Option.fileList != NULL) + { + error (WARNING, + "-%s option specified more than once, last value used", + option); + freeString (&Option.fileList); + } + Option.fileList = stringCopy (parameter); + break; + case 'n': + Option.locate = EX_LINENUM; + break; + case 'N': + Option.locate = EX_PATTERN; + break; + case 'R': +#ifdef RECURSE_SUPPORTED + Option.recurse = TRUE; +#else + error (WARNING, "-%s option not supported on this host", option); +#endif + break; + case 'u': + checkOptionOrder (option); + Option.sorted = SO_UNSORTED; + break; + case 'V': + Option.verbose = TRUE; + break; + case 'w': + /* silently ignored */ + break; + case 'x': + checkOptionOrder (option); + Option.xref = TRUE; + break; + default: + error (FATAL, "Unknown option: -%s", option); + break; + } +} + +extern void parseOption (cookedArgs* const args) +{ + Assert (! cArgOff (args)); + if (args->isOption) + { + if (args->longOption) + processLongOption (args->item, args->parameter); + else + { + const char *parameter = args->parameter; + while (*parameter == ' ') + ++parameter; + processShortOption (args->item, parameter); + } + cArgForth (args); + } +} + +extern void parseOptions (cookedArgs* const args) +{ + NonOptionEncountered = FALSE; + while (! cArgOff (args) && cArgIsOption (args)) + parseOption (args); + if (! cArgOff (args) && ! cArgIsOption (args)) + NonOptionEncountered = TRUE; +} + +static const char *CheckFile; +static boolean checkSameFile (const char *const fileName) +{ + return isSameFile (CheckFile, fileName); +} + +static boolean parseFileOptions (const char* const fileName) +{ + boolean fileFound = FALSE; + const char* const format = "Considering option file %s: %s\n"; + CheckFile = fileName; + if (stringListHasTest (OptionFiles, checkSameFile)) + verbose (format, fileName, "already considered"); + else + { + FILE* const fp = fopen (fileName, "r"); + if (fp == NULL) + verbose (format, fileName, "not found"); + else + { + cookedArgs* const args = cArgNewFromLineFile (fp); + vString* file = vStringNewInit (fileName); + stringListAdd (OptionFiles, file); + verbose (format, fileName, "reading..."); + parseOptions (args); + if (NonOptionEncountered) + error (WARNING, "Ignoring non-option in %s\n", fileName); + cArgDelete (args); + fclose (fp); + fileFound = TRUE; + } + } + return fileFound; +} + +/* Actions to be taken before reading any other options */ +extern void previewFirstOption (cookedArgs* const args) +{ + while (cArgIsOption (args)) + { + if (strcmp (args->item, "V") == 0 || strcmp (args->item, "verbose") == 0) + parseOption (args); + else if (strcmp (args->item, "options") == 0 && + strcmp (args->parameter, "NONE") == 0) + { + fprintf (stderr, "No options will be read from files or environment\n"); + SkipConfiguration = TRUE; + cArgForth (args); + } + else + break; + } +} + +static void parseConfigurationFileOptions (void) +{ + const char* const home = getenv ("HOME"); + const char* conf; +#ifdef CUSTOM_CONFIGURATION_FILE + parseFileOptions (CUSTOM_CONFIGURATION_FILE); +#endif +#ifdef MSDOS_STYLE_PATH + parseFileOptions ("/ctags.cnf"); + conf = "ctags.cnf"; +#else + conf = ".ctags"; +#endif + parseFileOptions ("/etc/ctags.conf"); + parseFileOptions ("/usr/local/etc/ctags.conf"); + if (home != NULL) + { + vString* const homeFile = combinePathAndFile (home, conf); + parseFileOptions (vStringValue (homeFile)); + vStringDelete (homeFile); + } + parseFileOptions (conf); +} + +static void parseEnvironmentOptions (void) +{ + const char *envOptions = NULL; + const char* var = NULL; + + if (Option.etags) + { + var = ETAGS_ENVIRONMENT; + envOptions = getenv (var); + } + if (envOptions == NULL) + { + var = CTAGS_ENVIRONMENT; + envOptions = getenv (var); + } + if (envOptions != NULL && envOptions [0] != '\0') + { + cookedArgs* const args = cArgNewFromString (envOptions); + verbose ("Reading options from $CTAGS\n"); + parseOptions (args); + cArgDelete (args); + if (NonOptionEncountered) + error (WARNING, "Ignoring non-option in %s variable", var); + } +} + +extern void readOptionConfiguration (void) +{ + if (! SkipConfiguration) + { + parseConfigurationFileOptions (); + parseEnvironmentOptions (); + } +} + +/* +* Option initialization +*/ + +extern void initOptions (void) +{ + OptionFiles = stringListNew (); + verbose ("Setting option defaults\n"); + installHeaderListDefaults (); + verbose (" Installing default language mappings:\n"); + installLanguageMapDefaults (); + + /* always excluded by default */ + verbose (" Installing default exclude patterns:\n"); + processExcludeOption (NULL, "EIFGEN"); + processExcludeOption (NULL, "SCCS"); + processExcludeOption (NULL, "RCS"); + processExcludeOption (NULL, "CVS"); + +} + +extern void freeOptionResources (void) +{ + freeString (&Option.tagFileName); + freeString (&Option.fileList); + freeString (&Option.filterTerminator); + + freeList (&Excluded); + freeList (&Option.ignore); + freeList (&Option.headerExt); + freeList (&Option.etagsInclude); + freeList (&OptionFiles); +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/options.h b/sdk/ctags/options.h new file mode 100644 index 0000000000..f543e8cc90 --- /dev/null +++ b/sdk/ctags/options.h @@ -0,0 +1,154 @@ +/* +* $Id: options.h,v 1.12 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Defines external interface to option processing. +*/ +#ifndef _OPTIONS_H +#define _OPTIONS_H + +#if defined(OPTION_WRITE) || defined(VAXC) +# define CONST_OPTION +#else +# define CONST_OPTION const +#endif + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "args.h" +#include "parse.h" +#include "strlist.h" +#include "vstring.h" + +/* +* DATA DECLARATIONS +*/ + +typedef enum { OPTION_NONE, OPTION_SHORT, OPTION_LONG } optionType; + +typedef struct sCookedArgs { + /* private */ + Arguments* args; + char *shortOptions; + char simple[2]; + boolean isOption; + boolean longOption; + const char* parameter; + /* public */ + char* item; +} cookedArgs; + +typedef enum eLocate { + EX_MIX, /* line numbers for defines, patterns otherwise */ + EX_LINENUM, /* -n only line numbers in tag file */ + EX_PATTERN /* -N only patterns in tag file */ +} exCmd; + +typedef enum sortType { + SO_UNSORTED, + SO_SORTED, + SO_FOLDSORTED +} sortType; + +struct sInclude { + boolean fileNames; /* include tags for source file names */ + boolean qualifiedTags; /* include tags for qualified class members */ + boolean fileScope; /* include tags of file scope only */ +}; + +struct sExtFields { /* extension field content control */ + boolean access; + boolean fileScope; + boolean implementation; + boolean inheritance; + boolean kind; + boolean kindKey; + boolean kindLong; + boolean language; + boolean lineNumber; + boolean scope; + boolean signature; + boolean typeRef; +}; + +/* This stores the command line options. + */ +typedef struct sOptionValues { + struct sInclude include;/* --extra extra tag inclusion */ + struct sExtFields extensionFields;/* --fields extension field control */ + stringList* ignore; /* -I name of file containing tokens to ignore */ + boolean append; /* -a append to "tags" file */ + boolean backward; /* -B regexp patterns search backwards */ + boolean etags; /* -e output Emacs style tags file */ + exCmd locate; /* --excmd EX command used to locate tag */ + boolean recurse; /* -R recurse into directories */ + sortType sorted; /* -u,--sort sort tags */ + boolean verbose; /* -V verbose */ + boolean xref; /* -x generate xref output instead */ + char *fileList; /* -L name of file containing names of files */ + char *tagFileName; /* -o name of tags file */ + stringList* headerExt; /* -h header extensions */ + stringList* etagsInclude;/* --etags-include list of TAGS files to include*/ + unsigned int tagFileFormat;/* --format tag file format (level) */ + boolean if0; /* --if0 examine code within "#if 0" branch */ + boolean kindLong; /* --kind-long */ + langType language; /* --lang specified language override */ + boolean followLinks; /* --link follow symbolic links? */ + boolean filter; /* --filter behave as filter: files in, tags out */ + char* filterTerminator; /* --filter-terminator string to output */ + boolean tagRelative; /* --tag-relative file paths relative to tag file */ + boolean printTotals; /* --totals print cumulative statistics */ + boolean lineDirectives; /* --linedirectives process #line directives */ +#ifdef DEBUG + long debugLevel; /* -D debugging output */ + unsigned long breakLine;/* -b source line at which to call lineBreak() */ +#endif +} optionValues; + +/* +* GLOBAL VARIABLES +*/ +extern CONST_OPTION optionValues Option; + +/* +* FUNCTION PROTOTYPES +*/ +extern void verbose (const char *const format, ...) __printf__ (1, 2); +extern void freeList (stringList** const pString); +extern void setDefaultTagFileName (void); +extern void checkOptions (void); +extern boolean filesRequired (void); +extern void testEtagsInvocation (void); + +extern cookedArgs* cArgNewFromString (const char* string); +extern cookedArgs* cArgNewFromArgv (char* const* const argv); +extern cookedArgs* cArgNewFromFile (FILE* const fp); +extern cookedArgs* cArgNewFromLineFile (FILE* const fp); +extern void cArgDelete (cookedArgs* const current); +extern boolean cArgOff (cookedArgs* const current); +extern boolean cArgIsOption (cookedArgs* const current); +extern const char* cArgItem (cookedArgs* const current); +extern void cArgForth (cookedArgs* const current); + +extern boolean isExcludedFile (const char* const name); +extern boolean isIncludeFile (const char *const fileName); +extern boolean isIgnoreToken (const char *const name, boolean *const pIgnoreParens, const char **const replacement); +extern void parseOption (cookedArgs* const cargs); +extern void parseOptions (cookedArgs* const cargs); +extern void previewFirstOption (cookedArgs* const cargs); +extern void readOptionConfiguration (void); +extern void initOptions (void); +extern void freeOptionResources (void); + +#endif /* _OPTIONS_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/parse.c b/sdk/ctags/parse.c new file mode 100644 index 0000000000..a55de8afc5 --- /dev/null +++ b/sdk/ctags/parse.c @@ -0,0 +1,678 @@ +/* +* $Id: parse.c,v 1.16 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for managing source languages and +* dispatching files to the appropriate language parser. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#ifdef HAVE_FNMATCH_H +#include +#endif + +#include "debug.h" +#include "entry.h" +#include "main.h" +#define OPTION_WRITE +#include "options.h" +#include "parsers.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +static parserDefinitionFunc* BuiltInParsers[] = { PARSER_LIST }; +static parserDefinition** LanguageTable = NULL; +static unsigned int LanguageCount = 0; + +/* +* FUNCTION DEFINITIONS +*/ + +extern void makeSimpleTag ( + const vString* const name, kindOption* const kinds, const int kind) +{ + if (kinds [kind].enabled && name != NULL && vStringLength (name) > 0) + { + tagEntryInfo e; + initTagEntry (&e, vStringValue (name)); + + e.kindName = kinds [kind].name; + e.kind = kinds [kind].letter; + + makeTagEntry (&e); + } +} + +/* +* parserDescription mapping management +*/ + +extern parserDefinition* parserNew (const char* name) +{ + parserDefinition* result = xCalloc (1, parserDefinition); + result->name = eStrdup (name); + return result; +} + +extern const char *getLanguageName (const langType language) +{ + const char* result; + if (language == LANG_IGNORE) + result = "unknown"; + else + { + Assert (0 <= language && language < (int) LanguageCount); + result = LanguageTable [language]->name; + } + return result; +} + +extern langType getNamedLanguage (const char *const name) +{ + langType result = LANG_IGNORE; + unsigned int i; + Assert (name != NULL); + for (i = 0 ; i < LanguageCount && result == LANG_IGNORE ; ++i) + { + const parserDefinition* const lang = LanguageTable [i]; + if (lang->name != NULL) + if (strcasecmp (name, lang->name) == 0) + result = i; + } + return result; +} + +static langType getExtensionLanguage (const char *const extension) +{ + langType result = LANG_IGNORE; + unsigned int i; + for (i = 0 ; i < LanguageCount && result == LANG_IGNORE ; ++i) + { + stringList* const exts = LanguageTable [i]->currentExtensions; + if (exts != NULL && stringListExtensionMatched (exts, extension)) + result = i; + } + return result; +} + +static langType getPatternLanguage (const char *const fileName) +{ + langType result = LANG_IGNORE; + const char* base = baseFilename (fileName); + unsigned int i; + for (i = 0 ; i < LanguageCount && result == LANG_IGNORE ; ++i) + { + stringList* const ptrns = LanguageTable [i]->currentPatterns; + if (ptrns != NULL && stringListFileMatched (ptrns, base)) + result = i; + } + return result; +} + +#ifdef SYS_INTERPRETER + +/* The name of the language interpreter, either directly or as the argument + * to "env". + */ +static vString* determineInterpreter (const char* const cmd) +{ + vString* const interpreter = vStringNew (); + const char* p = cmd; + do + { + vStringClear (interpreter); + for ( ; isspace ((int) *p) ; ++p) + ; /* no-op */ + for ( ; *p != '\0' && ! isspace ((int) *p) ; ++p) + vStringPut (interpreter, (int) *p); + vStringTerminate (interpreter); + } while (strcmp (vStringValue (interpreter), "env") == 0); + return interpreter; +} + +static langType getInterpreterLanguage (const char *const fileName) +{ + langType result = LANG_IGNORE; + FILE* const fp = fopen (fileName, "r"); + if (fp != NULL) + { + vString* const vLine = vStringNew (); + const char* const line = readLine (vLine, fp); + if (line != NULL && line [0] == '#' && line [1] == '!') + { + const char* const lastSlash = strrchr (line, '/'); + const char *const cmd = lastSlash != NULL ? lastSlash+1 : line+2; + vString* const interpreter = determineInterpreter (cmd); + result = getExtensionLanguage (vStringValue (interpreter)); + vStringDelete (interpreter); + } + vStringDelete (vLine); + fclose (fp); + } + return result; +} + +#endif + +extern langType getFileLanguage (const char *const fileName) +{ + langType language = Option.language; + if (language == LANG_AUTO) + { + language = getExtensionLanguage (fileExtension (fileName)); + if (language == LANG_IGNORE) + language = getPatternLanguage (fileName); +#ifdef SYS_INTERPRETER + if (language == LANG_IGNORE) + { + fileStatus *status = eStat (fileName); + if (status->isExecutable) + language = getInterpreterLanguage (fileName); + } +#endif + } + return language; +} + +extern void printLanguageMap (const langType language) +{ + boolean first = TRUE; + unsigned int i; + stringList* map = LanguageTable [language]->currentPatterns; + Assert (0 <= language && language < (int) LanguageCount); + for (i = 0 ; map != NULL && i < stringListCount (map) ; ++i) + { + printf ("%s(%s)", (first ? "" : " "), + vStringValue (stringListItem (map, i))); + first = FALSE; + } + map = LanguageTable [language]->currentExtensions; + for (i = 0 ; map != NULL && i < stringListCount (map) ; ++i) + { + printf ("%s.%s", (first ? "" : " "), + vStringValue (stringListItem (map, i))); + first = FALSE; + } +} + +extern void installLanguageMapDefault (const langType language) +{ + parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + if (lang->currentPatterns != NULL) + stringListDelete (lang->currentPatterns); + if (lang->currentExtensions != NULL) + stringListDelete (lang->currentExtensions); + + if (lang->patterns == NULL) + lang->currentPatterns = stringListNew (); + else + { + lang->currentPatterns = + stringListNewFromArgv (lang->patterns); + } + if (lang->extensions == NULL) + lang->currentExtensions = stringListNew (); + else + { + lang->currentExtensions = + stringListNewFromArgv (lang->extensions); + } + if (Option.verbose) + printLanguageMap (language); + verbose ("\n"); +} + +extern void installLanguageMapDefaults (void) +{ + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + { + verbose (" %s: ", getLanguageName (i)); + installLanguageMapDefault (i); + } +} + +extern void clearLanguageMap (const langType language) +{ + Assert (0 <= language && language < (int) LanguageCount); + stringListClear (LanguageTable [language]->currentPatterns); + stringListClear (LanguageTable [language]->currentExtensions); +} + +extern void addLanguagePatternMap (const langType language, const char* ptrn) +{ + vString* const str = vStringNewInit (ptrn); + parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + if (lang->currentPatterns == NULL) + lang->currentPatterns = stringListNew (); + stringListAdd (lang->currentPatterns, str); +} + +extern boolean removeLanguageExtensionMap (const char *const extension) +{ + boolean result = FALSE; + unsigned int i; + for (i = 0 ; i < LanguageCount && ! result ; ++i) + { + stringList* const exts = LanguageTable [i]->currentExtensions; + if (exts != NULL && stringListRemoveExtension (exts, extension)) + { + verbose (" (removed from %s)", getLanguageName (i)); + result = TRUE; + } + } + return result; +} + +extern void addLanguageExtensionMap ( + const langType language, const char* extension) +{ + vString* const str = vStringNewInit (extension); + Assert (0 <= language && language < (int) LanguageCount); + removeLanguageExtensionMap (extension); + stringListAdd (LanguageTable [language]->currentExtensions, str); +} + +extern void enableLanguage (const langType language, const boolean state) +{ + Assert (0 <= language && language < (int) LanguageCount); + LanguageTable [language]->enabled = state; +} + +extern void enableLanguages (const boolean state) +{ + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + enableLanguage (i, state); +} + +static void initializeParsers (void) +{ + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + if (LanguageTable [i]->initialize != NULL) + (LanguageTable [i]->initialize) ((langType) i); +} + +extern void initializeParsing (void) +{ + unsigned int builtInCount; + unsigned int i; + + builtInCount = sizeof (BuiltInParsers) / sizeof (BuiltInParsers [0]); + LanguageTable = xMalloc (builtInCount, parserDefinition*); + + verbose ("Installing parsers: "); + for (i = 0 ; i < builtInCount ; ++i) + { + parserDefinition* const def = (*BuiltInParsers [i]) (); + if (def != NULL) + { + boolean accepted = FALSE; + if (def->name == NULL || def->name[0] == '\0') + error (FATAL, "parser definition must contain name\n"); + else if (def->regex) + { +#ifdef HAVE_REGEX + def->parser = findRegexTags; + accepted = TRUE; +#endif + } + else if ((def->parser == NULL) == (def->parser2 == NULL)) + error (FATAL, + "%s parser definition must define one and only one parsing routine\n", + def->name); + else + accepted = TRUE; + if (accepted) + { + verbose ("%s%s", i > 0 ? ", " : "", def->name); + def->id = LanguageCount++; + LanguageTable [def->id] = def; + } + } + } + verbose ("\n"); + enableLanguages (TRUE); + initializeParsers (); +} + +extern void freeParserResources (void) +{ + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + { + parserDefinition* const lang = LanguageTable [i]; + freeList (&lang->currentPatterns); + freeList (&lang->currentExtensions); + eFree (lang->name); + lang->name = NULL; + eFree (lang); + } + if (LanguageTable != NULL) + eFree (LanguageTable); + LanguageTable = NULL; + LanguageCount = 0; +} + +/* +* Option parsing +*/ + +extern void processLanguageDefineOption ( + const char *const option, const char *const parameter __unused__) +{ +#ifdef HAVE_REGEX + if (parameter [0] == '\0') + error (WARNING, "No language specified for \"%s\" option", option); + else if (getNamedLanguage (parameter) != LANG_IGNORE) + error (WARNING, "Language \"%s\" already defined", parameter); + else + { + unsigned int i = LanguageCount++; + parserDefinition* const def = parserNew (parameter); + def->parser = findRegexTags; + def->currentPatterns = stringListNew (); + def->currentExtensions = stringListNew (); + def->regex = TRUE; + def->enabled = TRUE; + def->id = i; + LanguageTable = xRealloc (LanguageTable, i + 1, parserDefinition*); + LanguageTable [i] = def; + } +#else + error (WARNING, "regex support not available; required for --%s option", + option); +#endif +} + +static kindOption *langKindOption (const langType language, const int flag) +{ + unsigned int i; + kindOption* result = NULL; + const parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + for (i=0 ; i < lang->kindCount && result == NULL ; ++i) + if (lang->kinds [i].letter == flag) + result = &lang->kinds [i]; + return result; +} + +static void disableLanguageKinds (const langType language) +{ + const parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + if (lang->regex) + disableRegexKinds (language); + else + { + unsigned int i; + for (i = 0 ; i < lang->kindCount ; ++i) + lang->kinds [i].enabled = FALSE; + } +} + +static boolean enableLanguageKind ( + const langType language, const int kind, const boolean mode) +{ + boolean result = FALSE; + if (LanguageTable [language]->regex) + result = enableRegexKind (language, kind, mode); + else + { + kindOption* const opt = langKindOption (language, kind); + if (opt != NULL) + { + opt->enabled = mode; + result = TRUE; + } + } + return result; +} + +static void processLangKindOption ( + const langType language, const char *const option, + const char *const parameter) +{ + const char *p = parameter; + boolean mode = TRUE; + int c; + + Assert (0 <= language && language < (int) LanguageCount); + if (*p != '+' && *p != '-') + disableLanguageKinds (language); + while ((c = *p++) != '\0') switch (c) + { + case '+': mode = TRUE; break; + case '-': mode = FALSE; break; + default: + if (! enableLanguageKind (language, c, mode)) + error (WARNING, "Unsupported parameter '%c' for --%s option", + c, option); + break; + } +} + +extern boolean processKindOption ( + const char *const option, const char *const parameter) +{ + boolean handled = FALSE; + const char* const dash = strchr (option, '-'); + if (dash != NULL && + (strcmp (dash + 1, "kinds") == 0 || strcmp (dash + 1, "types") == 0)) + { + langType language; + vString* langName = vStringNew (); + vStringNCopyS (langName, option, dash - option); + language = getNamedLanguage (vStringValue (langName)); + if (language == LANG_IGNORE) + error (WARNING, "Unknown language specified in \"%s\" option", option); + else + processLangKindOption (language, option, parameter); + vStringDelete (langName); + handled = TRUE; + } + return handled; +} + +static void printLanguageKind (const kindOption* const kind, boolean indent) +{ + const char *const indentation = indent ? " " : ""; + printf ("%s%c %s%s\n", indentation, kind->letter, + kind->description != NULL ? kind->description : + (kind->name != NULL ? kind->name : ""), + kind->enabled ? "" : " [off]"); +} + +static void printKinds (langType language, boolean indent) +{ + const parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + if (lang->kinds != NULL || lang->regex) + { + unsigned int i; + for (i = 0 ; i < lang->kindCount ; ++i) + printLanguageKind (lang->kinds + i, indent); + printRegexKinds (language, indent); + } +} + +extern void printLanguageKinds (const langType language) +{ + if (language == LANG_AUTO) + { + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + { + const parserDefinition* const lang = LanguageTable [i]; + printf ("%s%s\n", lang->name, lang->enabled ? "" : " [disabled]"); + printKinds (i, TRUE); + } + } + else + printKinds (language, FALSE); +} + +static void printMaps (const langType language) +{ + const parserDefinition* lang; + unsigned int i; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + printf ("%-8s", lang->name); + if (lang->currentExtensions != NULL) + for (i = 0 ; i < stringListCount (lang->currentExtensions) ; ++i) + printf (" *.%s", vStringValue ( + stringListItem (lang->currentExtensions, i))); + if (lang->currentPatterns != NULL) + for (i = 0 ; i < stringListCount (lang->currentPatterns) ; ++i) + printf (" %s", vStringValue ( + stringListItem (lang->currentPatterns, i))); + putchar ('\n'); +} + +extern void printLanguageMaps (const langType language) +{ + if (language == LANG_AUTO) + { + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + printMaps (i); + } + else + printMaps (language); +} + +static void printLanguage (const langType language) +{ + const parserDefinition* lang; + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + if (lang->kinds != NULL || lang->regex) + printf ("%s%s\n", lang->name, lang->enabled ? "" : " [disabled]"); +} + +extern void printLanguageList (void) +{ + unsigned int i; + for (i = 0 ; i < LanguageCount ; ++i) + printLanguage (i); +} + +/* +* File parsing +*/ + +static void makeFileTag (const char *const fileName) +{ + if (Option.include.fileNames) + { + tagEntryInfo tag; + initTagEntry (&tag, baseFilename (fileName)); + + tag.isFileEntry = TRUE; + tag.lineNumberEntry = TRUE; + tag.lineNumber = 1; + tag.kindName = "file"; + tag.kind = 'F'; + + makeTagEntry (&tag); + } +} + +static boolean createTagsForFile ( + const char *const fileName, const langType language, + const unsigned int passCount) +{ + boolean retried = FALSE; + Assert (0 <= language && language < (int) LanguageCount); + if (fileOpen (fileName, language)) + { + const parserDefinition* const lang = LanguageTable [language]; + if (Option.etags) + beginEtagsFile (); + + makeFileTag (fileName); + + if (lang->parser != NULL) + lang->parser (); + else if (lang->parser2 != NULL) + retried = lang->parser2 (passCount); + + if (Option.etags) + endEtagsFile (getSourceFileTagPath ()); + + fileClose (); + } + + return retried; +} + +static boolean createTagsWithFallback ( + const char *const fileName, const langType language) +{ + const unsigned long numTags = TagFile.numTags.added; + fpos_t tagFilePosition; + unsigned int passCount = 0; + boolean tagFileResized = FALSE; + + fgetpos (TagFile.fp, &tagFilePosition); + while (createTagsForFile (fileName, language, ++passCount)) + { + /* Restore prior state of tag file. + */ + fsetpos (TagFile.fp, &tagFilePosition); + TagFile.numTags.added = numTags; + tagFileResized = TRUE; + } + return tagFileResized; +} + +extern boolean parseFile (const char *const fileName) +{ + boolean tagFileResized = FALSE; + langType language = Option.language; + if (Option.language == LANG_AUTO) + language = getFileLanguage (fileName); + Assert (language != LANG_AUTO); + if (language == LANG_IGNORE) + verbose ("ignoring %s (unknown language)\n", fileName); + else if (! LanguageTable [language]->enabled) + verbose ("ignoring %s (language disabled)\n", fileName); + else + { + if (Option.filter) + openTagFile (); + + tagFileResized = createTagsWithFallback (fileName, language); + + if (Option.filter) + closeTagFile (tagFileResized); + addTotals (1, 0L, 0L); + + return tagFileResized; + } + return tagFileResized; +} + +/* vi:set tabstop=4 shiftwidth=4 nowrap: */ diff --git a/sdk/ctags/parse.h b/sdk/ctags/parse.h new file mode 100644 index 0000000000..d981d1b17f --- /dev/null +++ b/sdk/ctags/parse.h @@ -0,0 +1,129 @@ +/* +* $Id: parse.h,v 1.16 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Private definitions for parsing support. +*/ +#ifndef _PARSE_H +#define _PARSE_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ +#include "parsers.h" /* contains list of parsers */ +#include "strlist.h" + +/* +* MACROS +*/ +#define KIND_COUNT(kindTable) (sizeof(kindTable)/sizeof(kindOption)) + +#define LANG_AUTO (-1) +#define LANG_IGNORE (-2) + +/* +* DATA DECLARATIONS +*/ +typedef int langType; + +typedef void (*createRegexTag) (const vString* const name); +typedef void (*simpleParser) (void); +typedef boolean (*rescanParser) (const unsigned int passCount); +typedef void (*parserInitialize) (langType language); + +typedef struct sKindOption { + boolean enabled; /* are tags for kind enabled? */ + int letter; /* kind letter */ + const char* name; /* kind name */ + const char* description; /* displayed in --help output */ +} kindOption; + +typedef struct { + /* defined by parser */ + char* name; /* name of language */ + kindOption* kinds; /* tag kinds handled by parser */ + unsigned int kindCount; /* size of `kinds' list */ + const char *const *extensions; /* list of default extensions */ + const char *const *patterns; /* list of default file name patterns */ + parserInitialize initialize; /* initialization routine, if needed */ + simpleParser parser; /* simple parser (common case) */ + rescanParser parser2; /* rescanning parser (unusual case) */ + boolean regex; /* is this a regex parser? */ + + /* used internally */ + unsigned int id; /* id assigned to language */ + boolean enabled; /* currently enabled? */ + stringList* currentPatterns; /* current list of file name patterns */ + stringList* currentExtensions; /* current list of extensions */ +} parserDefinition; + +typedef parserDefinition* (parserDefinitionFunc) (void); + +typedef struct { + size_t start; /* character index in line where match starts */ + size_t length; /* length of match */ +} regexMatch; + +typedef void (*regexCallback) (const char *line, const regexMatch *matches, unsigned int count); + +/* +* FUNCTION PROTOTYPES +*/ + +/* Each parsers' definition function is called. The routine is expected to + * return a structure allocated using parserNew(). This structure must, + * at minimum, set the `parser' field. + */ +extern parserDefinitionFunc PARSER_LIST; + +/* Legacy interface */ +extern boolean includingDefineTags (void); + +/* Language processing and parsing */ +extern void makeSimpleTag (const vString* const name, kindOption* const kinds, const int kind); +extern parserDefinition* parserNew (const char* name); +extern const char *getLanguageName (const langType language); +extern langType getNamedLanguage (const char *const name); +extern langType getFileLanguage (const char *const fileName); +extern void installLanguageMapDefault (const langType language); +extern void installLanguageMapDefaults (void); +extern void clearLanguageMap (const langType language); +extern boolean removeLanguageExtensionMap (const char *const extension); +extern void addLanguageExtensionMap (const langType language, const char* extension); +extern void addLanguagePatternMap (const langType language, const char* ptrn); +extern void printLanguageMap (const langType language); +extern void printLanguageMaps (const langType language); +extern void enableLanguages (const boolean state); +extern void enableLanguage (const langType language, const boolean state); +extern void initializeParsing (void); +extern void freeParserResources (void); +extern void processLanguageDefineOption (const char *const option, const char *const parameter); +extern boolean processKindOption (const char *const option, const char *const parameter); +extern void printKindOptions (void); +extern void printLanguageKinds (const langType language); +extern void printLanguageList (void); +extern boolean parseFile (const char *const fileName); + +/* Regex interface */ +#ifdef HAVE_REGEX +extern void findRegexTags (void); +extern boolean matchRegex (const vString* const line, const langType language); +#endif +extern boolean processRegexOption (const char *const option, const char *const parameter); +extern void addLanguageRegex (const langType language, const char* const regex); +extern void addTagRegex (const langType language, const char* const regex, const char* const name, const char* const kinds, const char* const flags); +extern void addCallbackRegex (const langType language, const char *const regex, const char *const flags, const regexCallback callback); +extern void disableRegexKinds (const langType language); +extern boolean enableRegexKind (const langType language, const int kind, const boolean mode); +extern void printRegexKinds (const langType language, boolean indent); +extern void freeRegexResources (void); +extern void checkRegex (void); + +#endif /* _PARSE_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/parsers.h b/sdk/ctags/parsers.h new file mode 100644 index 0000000000..91e824b4a5 --- /dev/null +++ b/sdk/ctags/parsers.h @@ -0,0 +1,55 @@ +/* +* $Id: parsers.h,v 1.12 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to all language parsing modules. +* +* To add a new language parser, you need only modify this single source +* file to add the name of the parser definition function. +*/ +#ifndef _PARSERS_H +#define _PARSERS_H + +/* Add the name of any new parser definition function here */ +#define PARSER_LIST \ + AsmParser, \ + AspParser, \ + AwkParser, \ + BetaParser, \ + CParser, \ + CppParser, \ + CsharpParser, \ + CobolParser, \ + EiffelParser, \ + ErlangParser, \ + FortranParser, \ + HtmlParser, \ + JavaParser, \ + JavaScriptParser, \ + LispParser, \ + LuaParser, \ + MakefileParser, \ + PascalParser, \ + PerlParser, \ + PhpParser, \ + PythonParser, \ + RexxParser, \ + RubyParser, \ + SchemeParser, \ + ShParser, \ + SlangParser, \ + SmlParser, \ + SqlParser, \ + TclParser, \ + VeraParser, \ + VerilogParser, \ + VimParser, \ + YaccParser + +#endif /* _PARSERS_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/pascal.c b/sdk/ctags/pascal.c new file mode 100644 index 0000000000..a200fad01d --- /dev/null +++ b/sdk/ctags/pascal.c @@ -0,0 +1,266 @@ +/* +* $Id: pascal.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2001-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for the Pascal language, +* including some extensions for Object Pascal. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FUNCTION, K_PROCEDURE +} pascalKind; + +static kindOption PascalKinds [] = { + { TRUE, 'f', "function", "functions"}, + { TRUE, 'p', "procedure", "procedures"} +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static void createPascalTag ( + tagEntryInfo* const tag, const vString* const name, const int kind) +{ + if (PascalKinds [kind].enabled && name != NULL && vStringLength (name) > 0) + { + initTagEntry (tag, vStringValue (name)); + tag->kindName = PascalKinds [kind].name; + tag->kind = PascalKinds [kind].letter; + } + else + initTagEntry (tag, NULL); +} + +static void makePascalTag (const tagEntryInfo* const tag) +{ + if (tag->name != NULL) + makeTagEntry (tag); +} + +static const unsigned char* dbp; + +#define starttoken(c) (isalpha ((int) c) || (int) c == '_') +#define intoken(c) (isalnum ((int) c) || (int) c == '_' || (int) c == '.') +#define endtoken(c) (! intoken (c) && ! isdigit ((int) c)) + +static boolean tail (const char *cp) +{ + boolean result = FALSE; + register int len = 0; + + while (*cp != '\0' && tolower ((int) *cp) == tolower ((int) dbp [len])) + cp++, len++; + if (*cp == '\0' && !intoken (dbp [len])) + { + dbp += len; + result = TRUE; + } + return result; +} + +/* Algorithm adapted from from GNU etags. + * Locates tags for procedures & functions. Doesn't do any type- or + * var-definitions. It does look for the keyword "extern" or "forward" + * immediately following the procedure statement; if found, the tag is + * skipped. + */ +static void findPascalTags (void) +{ + vString *name = vStringNew (); + tagEntryInfo tag; + pascalKind kind = K_FUNCTION; + /* each of these flags is TRUE iff: */ + boolean incomment = FALSE; /* point is inside a comment */ + int comment_char = '\0'; /* type of current comment */ + boolean inquote = FALSE; /* point is inside '..' string */ + boolean get_tagname = FALSE;/* point is after PROCEDURE/FUNCTION + keyword, so next item = potential tag */ + boolean found_tag = FALSE; /* point is after a potential tag */ + boolean inparms = FALSE; /* point is within parameter-list */ + boolean verify_tag = FALSE; + /* point has passed the parm-list, so the next token will determine + * whether this is a FORWARD/EXTERN to be ignored, or whether it is a + * real tag + */ + + dbp = fileReadLine (); + while (dbp != NULL) + { + int c = *dbp++; + + if (c == '\0') /* if end of line */ + { + dbp = fileReadLine (); + if (dbp == NULL || *dbp == '\0') + continue; + if (!((found_tag && verify_tag) || get_tagname)) + c = *dbp++; + /* only if don't need *dbp pointing to the beginning of + * the name of the procedure or function + */ + } + if (incomment) + { + if (comment_char == '{' && c == '}') + incomment = FALSE; + else if (comment_char == '(' && c == '*' && *dbp == ')') + { + dbp++; + incomment = FALSE; + } + continue; + } + else if (inquote) + { + if (c == '\'') + inquote = FALSE; + continue; + } + else switch (c) + { + case '\'': + inquote = TRUE; /* found first quote */ + continue; + case '{': /* found open { comment */ + incomment = TRUE; + comment_char = c; + continue; + case '(': + if (*dbp == '*') /* found open (* comment */ + { + incomment = TRUE; + comment_char = c; + dbp++; + } + else if (found_tag) /* found '(' after tag, i.e., parm-list */ + inparms = TRUE; + continue; + case ')': /* end of parms list */ + if (inparms) + inparms = FALSE; + continue; + case ';': + if (found_tag && !inparms) /* end of proc or fn stmt */ + { + verify_tag = TRUE; + break; + } + continue; + } + if (found_tag && verify_tag && *dbp != ' ') + { + /* check if this is an "extern" declaration */ + if (*dbp == '\0') + continue; + if (tolower ((int) *dbp == 'e')) + { + if (tail ("extern")) /* superfluous, really! */ + { + found_tag = FALSE; + verify_tag = FALSE; + } + } + else if (tolower ((int) *dbp) == 'f') + { + if (tail ("forward")) /* check for forward reference */ + { + found_tag = FALSE; + verify_tag = FALSE; + } + } + if (found_tag && verify_tag) /* not external proc, so make tag */ + { + found_tag = FALSE; + verify_tag = FALSE; + makePascalTag (&tag); + continue; + } + } + if (get_tagname) /* grab name of proc or fn */ + { + const unsigned char *cp; + + if (*dbp == '\0') + continue; + + /* grab block name */ + while (isspace ((int) *dbp)) + ++dbp; + for (cp = dbp ; *cp != '\0' && !endtoken (*cp) ; cp++) + continue; + vStringNCopyS (name, (const char*) dbp, cp - dbp); + createPascalTag (&tag, name, kind); + dbp = cp; /* set dbp to e-o-token */ + get_tagname = FALSE; + found_tag = TRUE; + /* and proceed to check for "extern" */ + } + else if (!incomment && !inquote && !found_tag) + { + switch (tolower ((int) c)) + { + case 'c': + if (tail ("onstructor")) + { + get_tagname = TRUE; + kind = K_PROCEDURE; + } + break; + case 'd': + if (tail ("estructor")) + { + get_tagname = TRUE; + kind = K_PROCEDURE; + } + break; + case 'p': + if (tail ("rocedure")) + { + get_tagname = TRUE; + kind = K_PROCEDURE; + } + break; + case 'f': + if (tail ("unction")) + { + get_tagname = TRUE; + kind = K_FUNCTION; + } + break; + } + } /* while not eof */ + } +} + +extern parserDefinition* PascalParser (void) +{ + static const char *const extensions [] = { "p", "pas", NULL }; + parserDefinition* def = parserNew ("Pascal"); + def->extensions = extensions; + def->kinds = PascalKinds; + def->kindCount = KIND_COUNT (PascalKinds); + def->parser = findPascalTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/perl.c b/sdk/ctags/perl.c new file mode 100644 index 0000000000..b6f7280a40 --- /dev/null +++ b/sdk/ctags/perl.c @@ -0,0 +1,213 @@ +/* +* $Id: perl.c,v 1.14 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for PERL language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "options.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_NONE = -1, + K_CONSTANT, + K_LABEL, + K_SUBROUTINE +} perlKind; + +static kindOption PerlKinds [] = { + { TRUE, 'c', "constant", "constants" }, + { TRUE, 'l', "label", "labels" }, + { TRUE, 's', "subroutine", "subroutines" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static boolean isIdentifier1 (int c) +{ + return (boolean) (isalpha (c) || c == '_'); +} + +static boolean isIdentifier (int c) +{ + return (boolean) (isalnum (c) || c == '_'); +} + +static boolean isPodWord (const char *word) +{ + boolean result = FALSE; + if (isalpha (*word)) + { + const char *const pods [] = { + "head1", "head2", "head3", "head4", "over", "item", "back", + "pod", "begin", "end", "for" + }; + const size_t count = sizeof (pods) / sizeof (pods [0]); + const char *white = strpbrk (word, " \t"); + const size_t len = (white!=NULL) ? (size_t)(white-word) : strlen (word); + char *const id = (char*) eMalloc (len + 1); + size_t i; + strncpy (id, word, len); + id [len] = '\0'; + for (i = 0 ; i < count && ! result ; ++i) + { + if (strcmp (id, pods [i]) == 0) + result = TRUE; + } + eFree (id); + } + return result; +} + +/* Algorithm adapted from from GNU etags. + * Perl support by Bart Robinson + * Perl sub names: look for /^ [ \t\n]sub [ \t\n]+ [^ \t\n{ (]+/ + */ +static void findPerlTags (void) +{ + vString *name = vStringNew (); + vString *package = NULL; + boolean skipPodDoc = FALSE; + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + boolean spaceRequired = FALSE; + boolean qualified = FALSE; + const unsigned char *cp = line; + perlKind kind = K_NONE; + + if (skipPodDoc) + { + if (strncmp ((const char*) line, "=cut", (size_t) 4) == 0) + skipPodDoc = FALSE; + continue; + } + else if (line [0] == '=') + { + skipPodDoc = isPodWord ((const char*)line + 1); + continue; + } + else if (strcmp ((const char*) line, "__DATA__") == 0) + break; + else if (strcmp ((const char*) line, "__END__") == 0) + break; + else if (line [0] == '#') + continue; + + while (isspace (*cp)) + cp++; + + if (strncmp((const char*) cp, "sub", (size_t) 3) == 0) + { + cp += 3; + kind = K_SUBROUTINE; + spaceRequired = TRUE; + qualified = TRUE; + } + else if (strncmp((const char*) cp, "use", (size_t) 3) == 0) + { + cp += 3; + if (!isspace(*cp)) + continue; + while (*cp && isspace (*cp)) + ++cp; + if (strncmp((const char*) cp, "constant", (size_t) 8) != 0) + continue; + cp += 8; + kind = K_CONSTANT; + spaceRequired = TRUE; + qualified = TRUE; + } + else if (strncmp((const char*) cp, "package", (size_t) 7) == 0) + { + cp += 7; + if (package == NULL) + package = vStringNew (); + else + vStringClear (package); + while (isspace (*cp)) + cp++; + while ((int) *cp != ';' && !isspace ((int) *cp)) + { + vStringPut (package, (int) *cp); + cp++; + } + vStringCatS (package, "::"); + } + else + { + if (isIdentifier1 (*cp)) + { + const unsigned char *p = cp; + while (isIdentifier (*p)) + ++p; + if ((int) *p == ':') + kind = K_LABEL; + } + } + if (kind != K_NONE) + { + if (spaceRequired && !isspace (*cp)) + continue; + + while (isspace (*cp)) + cp++; + while (isIdentifier (*cp)) + { + vStringPut (name, (int) *cp); + cp++; + } + vStringTerminate (name); + if (vStringLength (name) > 0) + { + makeSimpleTag (name, PerlKinds, kind); + if (Option.include.qualifiedTags && qualified && + package != NULL && vStringLength (package) > 0) + { + vString *const qualifiedName = vStringNew (); + vStringCopy (qualifiedName, package); + vStringCat (qualifiedName, name); + makeSimpleTag (qualifiedName, PerlKinds, kind); + vStringDelete (qualifiedName); + } + } + vStringClear (name); + } + } + vStringDelete (name); + if (package != NULL) + vStringDelete (package); +} + +extern parserDefinition* PerlParser (void) +{ + static const char *const extensions [] = { "pl", "pm", "plx", "perl", NULL }; + parserDefinition* def = parserNew ("Perl"); + def->kinds = PerlKinds; + def->kindCount = KIND_COUNT (PerlKinds); + def->extensions = extensions; + def->parser = findPerlTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/php.c b/sdk/ctags/php.c new file mode 100644 index 0000000000..ffa55f12c2 --- /dev/null +++ b/sdk/ctags/php.c @@ -0,0 +1,171 @@ +/* +* $Id: php.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000, Jesus Castagnetto +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for the PHP web page +* scripting language. Only recognizes functions and classes, not methods or +* variables. +* +* Parsing PHP defines by Pavel Hlousek , Apr 2003. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_CLASS, K_DEFINE, K_FUNCTION, K_VARIABLE +} phpKind; + +static kindOption PhpKinds [] = { + { TRUE, 'c', "class", "classes" }, + { TRUE, 'd', "define", "constant definitions" }, + { TRUE, 'f', "function", "functions" }, + { TRUE, 'v', "variable", "variables" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static boolean isLetter(const int c) +{ + return (boolean)(isalpha(c) || (c >= 127 && c <= 255)); +} + +static boolean isVarChar1(const int c) +{ + return (boolean)(isLetter (c) || c == '_'); +} + +static boolean isVarChar(const int c) +{ + return (boolean)(isVarChar1 (c) || isdigit (c)); +} + +static void findPhpTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + + while (isspace (*cp)) + cp++; + + if (*(const char*)cp == '$' && isVarChar1 (*(const char*)(cp+1))) + { + cp += 1; + vStringClear (name); + while (isVarChar ((int) *cp)) + { + vStringPut (name, (int) *cp); + ++cp; + } + while (isspace ((int) *cp)) + ++cp; + if (*(const char*) cp == '=') + { + vStringTerminate (name); + makeSimpleTag (name, PhpKinds, K_VARIABLE); + vStringClear (name); + } + } + else if (strncmp ((const char*) cp, "function", (size_t) 8) == 0 && + isspace ((int) cp [8])) + { + cp += 8; + + while (isspace ((int) *cp)) + ++cp; + + if (*cp == '&') /* skip reference character */ + cp++; + + vStringClear (name); + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, PhpKinds, K_FUNCTION); + vStringClear (name); + } + else if (strncmp ((const char*) cp, "class", (size_t) 5) == 0 && + isspace ((int) cp [5])) + { + cp += 5; + + while (isspace ((int) *cp)) + ++cp; + vStringClear (name); + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, PhpKinds, K_CLASS); + vStringClear (name); + } + else if (strncmp ((const char*) cp, "define", (size_t) 6) == 0 && + ! isalnum ((int) cp [6])) + { + cp += 6; + + while (isspace ((int) *cp)) + ++cp; + if (*cp != '(') + continue; + ++cp; + + while (isspace ((int) *cp)) + ++cp; + if ((*cp == '\'') || (*cp == '"')) + ++cp; + else if (! ((*cp == '_') || isalnum ((int) *cp))) + continue; + + vStringClear (name); + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, PhpKinds, K_DEFINE); + vStringClear (name); + } + } + vStringDelete (name); +} + +extern parserDefinition* PhpParser (void) +{ + static const char *const extensions [] = { "php", "php3", "phtml", NULL }; + parserDefinition* def = parserNew ("PHP"); + def->kinds = PhpKinds; + def->kindCount = KIND_COUNT (PhpKinds); + def->extensions = extensions; + def->parser = findPhpTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/python.c b/sdk/ctags/python.c new file mode 100644 index 0000000000..3cf92447a1 --- /dev/null +++ b/sdk/ctags/python.c @@ -0,0 +1,223 @@ +/* +* $Id: python.c,v 1.9 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Python language +* files. +*/ +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "options.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_CLASS, K_FUNCTION, K_MEMBER +} pythonKind; + +static kindOption PythonKinds[] = { + {TRUE, 'c', "class", "classes"}, + {TRUE, 'f', "function", "functions"}, + {TRUE, 'm', "member", "class members"} +}; + +/* +* FUNCTION DEFINITIONS +*/ +/* tagEntryInfo and vString should be preinitialized/preallocated but not + * necessary. If successful you will find class name in vString + */ + +static boolean isIdentifierFirstCharacter (int c) +{ + return (boolean) (isalpha (c) || c == '_'); +} + +static boolean isIdentifierCharacter (int c) +{ + return (boolean) (isalnum (c) || c == '_'); +} + +static void makeFunctionTag (vString *const function, vString *const class) +{ + tagEntryInfo tag; + initTagEntry (&tag, vStringValue (function)); + if (vStringLength (class) > 0) + { + tag.kindName = "member"; + tag.kind = 'm'; + tag.extensionFields.scope [0] = "class"; + tag.extensionFields.scope [1] = vStringValue (class); + } + else + { + tag.kindName = "function"; + tag.kind = 'f'; + } + if (strncmp (vStringValue (function), "__", 2) == 0 && + strcmp (vStringValue (function), "__init__") != 0) + { + tag.extensionFields.access = "private"; + tag.isFileScope = TRUE; + } + else + { + tag.extensionFields.access = "public"; + } + makeTagEntry (&tag); + if (vStringLength (class) > 0 && Option.include.qualifiedTags) + { + vString *tagname = vStringNew (); + vStringCat (tagname, class); + vStringPut (tagname, '.'); + vStringCat (tagname, function); + tag.name = vStringValue (tagname); + makeTagEntry (&tag); + vStringDelete (tagname); + } +} + +static void makeClassTag (vString *const class, vString *const inheritance) +{ + tagEntryInfo tag; + initTagEntry (&tag, vStringValue (class)); + tag.kindName = "class"; + tag.kind = 'c'; + tag.extensionFields.inheritance = vStringValue (inheritance); + makeTagEntry (&tag); +} + +static const unsigned char *skipSpace (const unsigned char *cp) +{ + while (isspace ((int) *cp)) + ++cp; + return cp; +} + +static const unsigned char *parseIdentifier ( + const unsigned char *cp, vString *const identifier) +{ + vStringClear (identifier); + while (isIdentifierCharacter ((int) *cp)) + { + vStringPut (identifier, (int) *cp); + ++cp; + } + vStringTerminate (identifier); + return cp; +} + +static void parseClass (const unsigned char *cp, vString *const class) +{ + vString *const inheritance = vStringNew (); + vStringClear (inheritance); + cp = parseIdentifier (cp, class); + cp = skipSpace (cp); + if (*cp == '(') + { + ++cp; + while (*cp != ')' && *cp != '\0') + { + vStringPut (inheritance, *cp); + ++cp; + } + vStringTerminate (inheritance); + } + makeClassTag (class, inheritance); + vStringDelete (inheritance); +} + +static void parseFunction (const unsigned char *cp, vString *const class) +{ + vString *const identifier = vStringNew (); + cp = parseIdentifier (cp, identifier); + makeFunctionTag (identifier, class); + vStringDelete (identifier); +} + +static void findPythonTags (void) +{ + vString *const class = vStringNew (); + vString *const identifier = vStringNew (); + const unsigned char *line; + int class_indent = 0; + boolean longStringLiteral = FALSE; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + int indent; + + cp = skipSpace (cp); + indent = cp - line; + + if (*cp == '#' || *cp == '\0') /* skip comment or blank line */ + continue; + + if (longStringLiteral) + { + cp = (const unsigned char*) strstr ((const char*) cp, "\"\"\""); + if (cp == NULL) + continue; + else + { + longStringLiteral = FALSE; + cp += 3; + } + } + if (isIdentifierFirstCharacter ((int) *cp)) + { + if (indent <= class_indent) + vStringClear (class); + + cp = parseIdentifier (cp, identifier); + if (isspace ((int) *cp)) + { + cp = skipSpace (cp); + if (strcmp (vStringValue (identifier), "def") == 0) + parseFunction (cp, class); + else if (strcmp (vStringValue (identifier), "class") == 0) + { + parseClass (cp, class); + class_indent = indent; + } + } + } + if ((cp = (const unsigned char*) strstr ((const char*)cp, "\"\"\"")) != NULL) + { + cp += 3; + cp = (const unsigned char*) strstr ((const char*) cp, "\"\"\""); + if (cp == NULL) + longStringLiteral = TRUE; + } + } + vStringDelete (identifier); + vStringDelete (class); +} + +extern parserDefinition *PythonParser (void) +{ + static const char *const extensions[] = { "py", "python", NULL }; + parserDefinition *def = parserNew ("Python"); + def->kinds = PythonKinds; + def->kindCount = KIND_COUNT (PythonKinds); + def->extensions = extensions; + def->parser = findPythonTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/qdos.c b/sdk/ctags/qdos.c new file mode 100644 index 0000000000..358bb29799 --- /dev/null +++ b/sdk/ctags/qdos.c @@ -0,0 +1,106 @@ +/* +* $Id: qdos.c,v 1.2 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1999, Thierry Godefroy +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions to handle wildcard expansion and file name +* conversion under QDOS. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include "ctags.h" + +/* Translate the filenames from UNIX to QDOS conventions on open calls */ +int (*_Open) (const char *, int, ...) = qopen; + +long _stack = 24576; /* Plenty of stack space */ +long _memincr = 10240; /* Big increments to cut fragmentation */ +char _prog_name [] = "ctags"; +char _version [] = PROGRAM_VERSION; +char _copyright [32] = __DATE__; +char *_endmsg = "\nPress a key to exit."; +int custom_expand (char * param, char ***argvptr, int *argcptr); +int (*_cmdwildcard) () = custom_expand; + + +struct WINDOWDEF _condetails = { 208, 1, 0, 7, 512, 256, 0, 0}; +void (*_consetup) () = consetup_title; + +/* custom cmdexpand: also expands directory names */ + +#define FILEBUF_INIT 1024 /* Initial allocation size for buffer */ +#define FILEBUF_INCR 1024 /* Increment size for buffer */ + +int custom_expand (char * param, char ***argvptr, int *argcptr) +{ + int count,sl; + size_t bufsize; + char *filenamebuf; + char *ptr,*safeptr; + + /* + * Check to see if we should do wild card expansion. + * We only perform wildcard expansion if the parameter + * was not a string and if it contains one of the + * wild card characters. + * + * We also do not expand any option that starts with '-' + * as we then assume that it is a unix stylew option. + */ + if ((*param == '-') || (strpbrk (param,"*?") == NULL) ) { + return 0; + } + + if ((filenamebuf = malloc (bufsize = FILEBUF_INIT)) == NULL) { + return -1; + } +TRYAGAIN: + count = getfnl (param, filenamebuf, bufsize, QDR_ALL); + if (count == -1 && errno == ENOMEM) { + /* + * We have overflowed the buffer, so we try + * to get a bigger buffer and try again. + */ + bufsize += FILEBUF_INCR; + if ((filenamebuf = realloc (filenamebuf, bufsize)) == NULL) { + return -1; + } else { + goto TRYAGAIN; + } + } + /* + * If no files were found, then return unexpanded. + */ + if (count == 0) { + free (filenamebuf); + return 0; + } + /* + * Files were found, so add these to the list instead + * of the original parameter typed by the user. + */ + for ( ptr=filenamebuf ; count > 0 ; count -- ) { + *argvptr = (char **) realloc (*argvptr, (size_t) (((*argcptr) + 2) * sizeof (char *))); + safeptr= (char *) malloc ((size_t) (sl=strlen (ptr) + 1)); + if (safeptr == NULL || *argvptr == NULL) { + return -1; + } + (void) memcpy (safeptr,ptr, (size_t) sl); + (*argvptr) [*argcptr] = safeptr; + *argcptr += 1; + ptr += sl; + } + free (filenamebuf); + return *argcptr; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/read.c b/sdk/ctags/read.c new file mode 100644 index 0000000000..303dfbae86 --- /dev/null +++ b/sdk/ctags/read.c @@ -0,0 +1,581 @@ +/* +* $Id: read.c,v 1.7 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains low level source and tag file read functions (newline +* conversion for source files are performed at this level). +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include + +#define FILE_WRITE +#include "read.h" +#include "debug.h" +#include "entry.h" +#include "main.h" +#include "routines.h" +#include "options.h" + +/* +* DATA DEFINITIONS +*/ +inputFile File; /* globally read through macros */ +static fpos_t StartOfLine; /* holds deferred position of start of line */ + +/* +* FUNCTION DEFINITIONS +*/ + +extern void freeSourceFileResources (void) +{ + vStringDelete (File.name); + vStringDelete (File.path); + vStringDelete (File.source.name); + vStringDelete (File.line); +} + +/* + * Source file access functions + */ + +static void setInputFileName (const char *const fileName) +{ + const char *const head = fileName; + const char *const tail = baseFilename (head); + + if (File.name != NULL) + vStringDelete (File.name); + File.name = vStringNewInit (fileName); + + if (File.path != NULL) + vStringDelete (File.path); + if (tail == head) + File.path = NULL; + else + { + const size_t length = tail - head - 1; + File.path = vStringNew (); + vStringNCopyS (File.path, fileName, length); + } +} + +static void setSourceFileParameters (vString *const fileName) +{ + if (File.source.name != NULL) + vStringDelete (File.source.name); + File.source.name = fileName; + + if (File.source.tagPath != NULL) + eFree (File.source.tagPath); + if (! Option.tagRelative || isAbsolutePath (vStringValue (fileName))) + File.source.tagPath = eStrdup (vStringValue (fileName)); + else + File.source.tagPath = + relativeFilename (vStringValue (fileName), TagFile.directory); + + if (vStringLength (fileName) > TagFile.max.file) + TagFile.max.file = vStringLength (fileName); + + File.source.isHeader = isIncludeFile (vStringValue (fileName)); + File.source.language = getFileLanguage (vStringValue (fileName)); +} + +static boolean setSourceFileName (vString *const fileName) +{ + boolean result = FALSE; + if (getFileLanguage (vStringValue (fileName)) != LANG_IGNORE) + { + vString *pathName; + if (isAbsolutePath (vStringValue (fileName)) || File.path == NULL) + pathName = vStringNewCopy (fileName); + else + pathName = combinePathAndFile ( + vStringValue (File.path), vStringValue (fileName)); + setSourceFileParameters (pathName); + result = TRUE; + } + return result; +} + +/* + * Line directive parsing + */ + +static int skipWhite (void) +{ + int c; + do + c = getc (File.fp); + while (c == ' ' || c == '\t'); + return c; +} + +static unsigned long readLineNumber (void) +{ + unsigned long lNum = 0; + int c = skipWhite (); + while (c != EOF && isdigit (c)) + { + lNum = (lNum * 10) + (c - '0'); + c = getc (File.fp); + } + ungetc (c, File.fp); + if (c != ' ' && c != '\t') + lNum = 0; + + return lNum; +} + +/* While ANSI only permits lines of the form: + * # line n "filename" + * Earlier compilers generated lines of the form + * # n filename + * GNU C will output lines of the form: + * # n "filename" + * So we need to be fairly flexible in what we accept. + */ +static vString *readFileName (void) +{ + vString *const fileName = vStringNew (); + boolean quoteDelimited = FALSE; + int c = skipWhite (); + + if (c == '"') + { + c = getc (File.fp); /* skip double-quote */ + quoteDelimited = TRUE; + } + while (c != EOF && c != '\n' && + (quoteDelimited ? (c != '"') : (c != ' ' && c != '\t'))) + { + vStringPut (fileName, c); + c = getc (File.fp); + } + if (c == '\n') + ungetc (c, File.fp); + vStringPut (fileName, '\0'); + + return fileName; +} + +static boolean parseLineDirective (void) +{ + boolean result = FALSE; + int c = skipWhite (); + DebugStatement ( const char* lineStr = ""; ) + + if (isdigit (c)) + { + ungetc (c, File.fp); + result = TRUE; + } + else if (c == 'l' && getc (File.fp) == 'i' && + getc (File.fp) == 'n' && getc (File.fp) == 'e') + { + c = getc (File.fp); + if (c == ' ' || c == '\t') + { + DebugStatement ( lineStr = "line"; ) + result = TRUE; + } + } + if (result) + { + const unsigned long lNum = readLineNumber (); + if (lNum == 0) + result = FALSE; + else + { + vString *const fileName = readFileName (); + if (vStringLength (fileName) == 0) + { + File.source.lineNumber = lNum - 1; /* applies to NEXT line */ + DebugStatement ( debugPrintf (DEBUG_RAW, "#%s %ld", lineStr, lNum); ) + } + else if (setSourceFileName (fileName)) + { + File.source.lineNumber = lNum - 1; /* applies to NEXT line */ + DebugStatement ( debugPrintf (DEBUG_RAW, "#%s %ld \"%s\"", + lineStr, lNum, vStringValue (fileName)); ) + } + + if (Option.include.fileNames && vStringLength (fileName) > 0 && + lNum == 1) + { + tagEntryInfo tag; + initTagEntry (&tag, baseFilename (vStringValue (fileName))); + + tag.isFileEntry = TRUE; + tag.lineNumberEntry = TRUE; + tag.lineNumber = 1; + tag.kindName = "file"; + tag.kind = 'F'; + + makeTagEntry (&tag); + } + vStringDelete (fileName); + result = TRUE; + } + } + return result; +} + +/* + * Source file I/O operations + */ + +/* This function opens a source file, and resets the line counter. If it + * fails, it will display an error message and leave the File.fp set to NULL. + */ +extern boolean fileOpen (const char *const fileName, const langType language) +{ +#ifdef VMS + const char *const openMode = "r"; +#else + const char *const openMode = "rb"; +#endif + boolean opened = FALSE; + + /* If another file was already open, then close it. + */ + if (File.fp != NULL) + { + fclose (File.fp); /* close any open source file */ + File.fp = NULL; + } + + File.fp = fopen (fileName, openMode); + if (File.fp == NULL) + error (WARNING | PERROR, "cannot open \"%s\"", fileName); + else + { + opened = TRUE; + + setInputFileName (fileName); + fgetpos (File.fp, &StartOfLine); + fgetpos (File.fp, &File.filePosition); + File.currentLine = NULL; + File.language = language; + File.lineNumber = 0L; + File.eof = FALSE; + File.newLine = TRUE; + + if (File.line != NULL) + vStringClear (File.line); + + setSourceFileParameters (vStringNewInit (fileName)); + File.source.lineNumber = 0L; + + verbose ("OPENING %s as %s language %sfile\n", fileName, + getLanguageName (language), + File.source.isHeader ? "include " : ""); + } + return opened; +} + +extern void fileClose (void) +{ + if (File.fp != NULL) + { + /* The line count of the file is 1 too big, since it is one-based + * and is incremented upon each newline. + */ + if (Option.printTotals) + { + fileStatus *status = eStat (vStringValue (File.name)); + addTotals (0, File.lineNumber - 1L, status->size); + } + fclose (File.fp); + File.fp = NULL; + } +} + +extern boolean fileEOF (void) +{ + return File.eof; +} + +/* Action to take for each encountered source newline. + */ +static void fileNewline (void) +{ + File.filePosition = StartOfLine; + File.newLine = FALSE; + File.lineNumber++; + File.source.lineNumber++; + DebugStatement ( if (Option.breakLine == File.lineNumber) lineBreak (); ) + DebugStatement ( debugPrintf (DEBUG_RAW, "%6ld: ", File.lineNumber); ) +} + +/* This function reads a single character from the stream, performing newline + * canonicalization. + */ +static int iFileGetc (void) +{ + int c; +readnext: + c = getc (File.fp); + + /* If previous character was a newline, then we're starting a line. + */ + if (File.newLine && c != EOF) + { + fileNewline (); + if (c == '#' && Option.lineDirectives) + { + if (parseLineDirective ()) + goto readnext; + else + { + fsetpos (File.fp, &StartOfLine); + c = getc (File.fp); + } + } + } + + if (c == EOF) + File.eof = TRUE; + else if (c == NEWLINE) + { + File.newLine = TRUE; + fgetpos (File.fp, &StartOfLine); + } + else if (c == CRETURN) + { + /* Turn line breaks into a canonical form. The three commonly + * used forms if line breaks: LF (UNIX), CR (MacIntosh), and + * CR-LF (MS-DOS) are converted into a generic newline. + */ + const int next = getc (File.fp); /* is CR followed by LF? */ + + if (next != NEWLINE) + ungetc (next, File.fp); + + c = NEWLINE; /* convert CR into newline */ + File.newLine = TRUE; + fgetpos (File.fp, &StartOfLine); + } + DebugStatement ( debugPutc (DEBUG_RAW, c); ) + return c; +} + +extern void fileUngetc (int c) +{ + File.ungetch = c; +} + +static vString *iFileGetLine (void) +{ + vString *result = NULL; + int c; + if (File.line == NULL) + File.line = vStringNew (); + vStringClear (File.line); + do + { + c = iFileGetc (); + if (c != EOF) + vStringPut (File.line, c); + if (c == '\n' || (c == EOF && vStringLength (File.line) > 0)) + { + vStringTerminate (File.line); +#ifdef HAVE_REGEX + if (vStringLength (File.line) > 0) + matchRegex (File.line, File.source.language); +#endif + result = File.line; + break; + } + } while (c != EOF); + Assert (result != NULL || File.eof); + return result; +} + +/* Do not mix use of fileReadLine () and fileGetc () for the same file. + */ +extern int fileGetc (void) +{ + int c; + + /* If there is an ungotten character, then return it. Don't do any + * other processing on it, though, because we already did that the + * first time it was read through fileGetc (). + */ + if (File.ungetch != '\0') + { + c = File.ungetch; + File.ungetch = '\0'; + return c; /* return here to avoid re-calling debugPutc () */ + } + do + { + if (File.currentLine != NULL) + { + c = *File.currentLine++; + if (c == '\0') + File.currentLine = NULL; + } + else + { + vString* const line = iFileGetLine (); + if (line != NULL) + File.currentLine = (unsigned char*) vStringValue (line); + if (File.currentLine == NULL) + c = EOF; + else + c = '\0'; + } + } while (c == '\0'); + DebugStatement ( debugPutc (DEBUG_READ, c); ) + return c; +} + +/* An alternative interface to fileGetc (). Do not mix use of fileReadLine() + * and fileGetc() for the same file. The returned string does not contain + * the terminating newline. A NULL return value means that all lines in the + * file have been read and we are at the end of file. + */ +extern const unsigned char *fileReadLine (void) +{ + vString* const line = iFileGetLine (); + const unsigned char* result = NULL; + if (line != NULL) + { + result = (const unsigned char*) vStringValue (line); + vStringStripNewline (line); + DebugStatement ( debugPrintf (DEBUG_READ, "%s\n", result); ) + } + return result; +} + +/* + * Source file line reading with automatic buffer sizing + */ +extern char *readLine (vString *const vLine, FILE *const fp) +{ + char *result = NULL; + + vStringClear (vLine); + if (fp == NULL) /* to free memory allocated to buffer */ + error (FATAL, "NULL file pointer"); + else + { + boolean reReadLine; + + /* If reading the line places any character other than a null or a + * newline at the last character position in the buffer (one less + * than the buffer size), then we must resize the buffer and + * reattempt to read the line. + */ + do + { + char *const pLastChar = vStringValue (vLine) + vStringSize (vLine) -2; + fpos_t startOfLine; + + fgetpos (fp, &startOfLine); + reReadLine = FALSE; + *pLastChar = '\0'; + result = fgets (vStringValue (vLine), (int) vStringSize (vLine), fp); + if (result == NULL) + { + if (! feof (fp)) + error (FATAL | PERROR, "Failure on attempt to read file"); + } + else if (*pLastChar != '\0' && + *pLastChar != '\n' && *pLastChar != '\r') + { + /* buffer overflow */ + reReadLine = vStringAutoResize (vLine); + if (reReadLine) + fsetpos (fp, &startOfLine); + else + error (FATAL | PERROR, "input line too big; out of memory"); + } + else + { + char* eol; + vStringSetLength (vLine); + /* canonicalize new line */ + eol = vStringValue (vLine) + vStringLength (vLine) - 1; + if (*eol == '\r') + *eol = '\n'; + else if (*(eol - 1) == '\r' && *eol == '\n') + { + *(eol - 1) = '\n'; + *eol = '\0'; + --vLine->length; + } + } + } while (reReadLine); + } + return result; +} + +/* Places into the line buffer the contents of the line referenced by + * "location". + */ +extern char *readSourceLine ( + vString *const vLine, fpos_t location, long *const pSeekValue) +{ + fpos_t orignalPosition; + char *result; + + fgetpos (File.fp, &orignalPosition); + fsetpos (File.fp, &location); + if (pSeekValue != NULL) + *pSeekValue = ftell (File.fp); + result = readLine (vLine, File.fp); + if (result == NULL) + error (FATAL, "Unexpected end of file: %s", vStringValue (File.name)); + fsetpos (File.fp, &orignalPosition); + + return result; +} + +extern char *readSourceLines (vString* const vLine, fpos_t location, fpos_t endPos) +{ + fpos_t orignalPosition; + char *result; + long startpos, endpos, currpos; + vString* const tmpstr = vStringNew(); + + fgetpos (File.fp, &orignalPosition); + fsetpos (File.fp, &location); + + startpos = ftell(File.fp); + /* set the cursor at the end position */ + fsetpos (File.fp, &endPos); + endpos = ftell(File.fp); + + /* set pointer to start point */ + fsetpos (File.fp, &location); + + vStringClear(vLine); + + while( 1 ){ + result = readLine (tmpstr, File.fp); + if (result == NULL){ + error (FATAL, "Unexpected end of file: %s", vStringValue (File.name)); + } + vStringCat(vLine, tmpstr); + currpos = ftell(File.fp); + if(currpos > endpos){ + break; + } + } + + fsetpos (File.fp, &orignalPosition); + vStringDelete(tmpstr); + return vLine->buffer; +} +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/read.h b/sdk/ctags/read.h new file mode 100644 index 0000000000..27e5a35a28 --- /dev/null +++ b/sdk/ctags/read.h @@ -0,0 +1,115 @@ +/* +* $Id: read.h,v 1.5 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to read.c +*/ +#ifndef _READ_H +#define _READ_H + +#if defined(FILE_WRITE) || defined(VAXC) +# define CONST_FILE +#else +# define CONST_FILE const +#endif + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include + +#include "parse.h" +#include "vstring.h" + +/* +* MACROS +*/ +#define getInputLineNumber() File.lineNumber +#define getInputFileName() vStringValue (File.source.name) +#define getInputFilePosition() File.filePosition +#define getSourceFileName() vStringValue (File.source.name) +#define getSourceFileTagPath() File.source.tagPath +#define getSourceLanguage() File.source.language +#define getSourceLanguageName() getLanguageName (File.source.language) +#define getSourceLineNumber() File.source.lineNumber +#define isLanguage(lang) (boolean)((lang) == File.source.language) +#define isHeaderFile() File.source.isHeader + +/* +* DATA DECLARATIONS +*/ + +enum eCharacters { + /* white space characters */ + SPACE = ' ', + NEWLINE = '\n', + CRETURN = '\r', + FORMFEED = '\f', + TAB = '\t', + VTAB = '\v', + + /* some hard to read characters */ + DOUBLE_QUOTE = '"', + SINGLE_QUOTE = '\'', + BACKSLASH = '\\', + + STRING_SYMBOL = ('S' + 0x80), + CHAR_SYMBOL = ('C' + 0x80) +}; + +/* Maintains the state of the current source file. + */ +typedef struct sInputFile { + vString *name; /* name of input file */ + vString *path; /* path of input file (if any) */ + vString *line; /* last line read from file */ + const unsigned char* currentLine; /* current line being worked on */ + FILE *fp; /* stream used for reading the file */ + unsigned long lineNumber; /* line number in the input file */ + fpos_t filePosition; /* file position of current line */ + int ungetch; /* a single character that was ungotten */ + boolean eof; /* have we reached the end of file? */ + boolean newLine; /* will the next character begin a new line? */ + langType language; /* language of input file */ + + /* Contains data pertaining to the original source file in which the tag + * was defined. This may be different from the input file when #line + * directives are processed (i.e. the input file is preprocessor output). + */ + struct sSource { + vString *name; /* name to report for source file */ + char *tagPath; /* path of source file relative to tag file */ + unsigned long lineNumber;/* line number in the source file */ + boolean isHeader; /* is source file a header file? */ + langType language; /* language of source file */ + } source; +} inputFile; + +/* +* GLOBAL VARIABLES +*/ +extern CONST_FILE inputFile File; + +/* +* FUNCTION PROTOTYPES +*/ +extern void freeSourceFileResources (void); +extern boolean fileOpen (const char *const fileName, const langType language); +extern boolean fileEOF (void); +extern void fileClose (void); +extern int fileGetc (void); +extern void fileUngetc (int c); +extern const unsigned char *fileReadLine (void); +extern char *readLine (vString *const vLine, FILE *const fp); +extern char *readSourceLine (vString *const vLine, fpos_t location, long *const pSeekValue); + +#endif /* _READ_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/readtags.c b/sdk/ctags/readtags.c new file mode 100644 index 0000000000..6e24151d6f --- /dev/null +++ b/sdk/ctags/readtags.c @@ -0,0 +1,958 @@ +/* +* $Id: readtags.c,v 1.25 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released into the public domain. +* +* This module contains functions for reading tag files. +*/ + +/* +* INCLUDE FILES +*/ +#include +#include +#include +#include +#include +#include /* to declare off_t */ + +#include "readtags.h" + +/* +* MACROS +*/ +#define TAB '\t' + + +/* +* DATA DECLARATIONS +*/ +typedef struct { + size_t size; + char *buffer; +} vstring; + +/* Information about current tag file */ +struct sTagFile { + /* has the file been opened and this structure initialized? */ + short initialized; + /* format of tag file */ + short format; + /* how is the tag file sorted? */ + sortType sortMethod; + /* pointer to file structure */ + FILE* fp; + /* file position of first character of `line' */ + off_t pos; + /* size of tag file in seekable positions */ + off_t size; + /* last line read */ + vstring line; + /* name of tag in last line read */ + vstring name; + /* defines tag search state */ + struct { + /* file position of last match for tag */ + off_t pos; + /* name of tag last searched for */ + const char *name; + /* length of name for partial matches */ + size_t nameLength; + /* peforming partial match */ + short partial; + /* ignoring case */ + short ignorecase; + } search; + /* miscellaneous extension fields */ + struct { + /* number of entries in `list' */ + unsigned short max; + /* list of key value pairs */ + tagExtensionField *list; + } fields; + /* buffers to be freed at close */ + struct { + /* name of program author */ + char *author; + /* name of program */ + char *name; + /* URL of distribution */ + char *url; + /* program version */ + char *version; + } program; +}; + +/* +* DATA DEFINITIONS +*/ +const char *const EmptyString = ""; +const char *const PseudoTagPrefix = "!_"; + +/* +* FUNCTION DEFINITIONS +*/ + +/* + * Compare two strings, ignoring case. + * Return 0 for match, < 0 for smaller, > 0 for bigger + * Make sure case is folded to uppercase in comparison (like for 'sort -f') + * This makes a difference when one of the chars lies between upper and lower + * ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !) + */ +static int struppercmp (const char *s1, const char *s2) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int strnuppercmp (const char *s1, const char *s2, size_t n) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int growString (vstring *s) +{ + int result = 0; + size_t newLength; + char *newLine; + if (s->size == 0) + { + newLength = 128; + newLine = (char*) malloc (newLength); + *newLine = '\0'; + } + else + { + newLength = 2 * s->size; + newLine = (char*) realloc (s->buffer, newLength); + } + if (newLine == NULL) + perror ("string too large"); + else + { + s->buffer = newLine; + s->size = newLength; + result = 1; + } + return result; +} + +/* Copy name of tag out of tag line */ +static void copyName (tagFile *const file) +{ + size_t length; + const char *end = strchr (file->line.buffer, '\t'); + if (end == NULL) + { + end = strchr (file->line.buffer, '\n'); + if (end == NULL) + end = strchr (file->line.buffer, '\r'); + } + if (end != NULL) + length = end - file->line.buffer; + else + length = strlen (file->line.buffer); + while (length >= file->name.size) + growString (&file->name); + strncpy (file->name.buffer, file->line.buffer, length); + file->name.buffer [length] = '\0'; +} + +static int readTagLineRaw (tagFile *const file) +{ + int result = 1; + int reReadLine; + + /* If reading the line places any character other than a null or a + * newline at the last character position in the buffer (one less than + * the buffer size), then we must resize the buffer and reattempt to read + * the line. + */ + do + { + char *const pLastChar = file->line.buffer + file->line.size - 2; + char *line; + + file->pos = ftell (file->fp); + reReadLine = 0; + *pLastChar = '\0'; + line = fgets (file->line.buffer, (int) file->line.size, file->fp); + if (line == NULL) + { + /* read error */ + if (! feof (file->fp)) + perror ("readTagLine"); + result = 0; + } + else if (*pLastChar != '\0' && + *pLastChar != '\n' && *pLastChar != '\r') + { + /* buffer overflow */ + growString (&file->line); + fseek (file->fp, file->pos, SEEK_SET); + reReadLine = 1; + } + else + { + size_t i = strlen (file->line.buffer); + while (i > 0 && + (file->line.buffer [i - 1] == '\n' || file->line.buffer [i - 1] == '\r')) + { + file->line.buffer [i - 1] = '\0'; + --i; + } + } + } while (reReadLine && result); + if (result) + copyName (file); + return result; +} + +static int readTagLine (tagFile *const file) +{ + int result; + do + { + result = readTagLineRaw (file); + } while (result && *file->name.buffer == '\0'); + return result; +} + +static tagResult growFields (tagFile *const file) +{ + tagResult result = TagFailure; + unsigned short newCount = 2 * file->fields.max; + tagExtensionField *newFields = (tagExtensionField*) + realloc (file->fields.list, newCount * sizeof (tagExtensionField)); + if (newFields == NULL) + perror ("too many extension fields"); + else + { + file->fields.list = newFields; + file->fields.max = newCount; + result = TagSuccess; + } + return result; +} + +static void parseExtensionFields (tagFile *const file, tagEntry *const entry, + char *const string) +{ + char *p = string; + while (p != NULL && *p != '\0') + { + while (*p == TAB) + *p++ = '\0'; + if (*p != '\0') + { + char *colon; + char *field = p; + p = strchr (p, TAB); + if (p != NULL) + *p++ = '\0'; + colon = strchr (field, ':'); + if (colon == NULL) + entry->kind = field; + else + { + const char *key = field; + const char *value = colon + 1; + *colon = '\0'; + if (strcmp (key, "kind") == 0) + entry->kind = value; + else if (strcmp (key, "file") == 0) + entry->fileScope = 1; + else if (strcmp (key, "line") == 0) + entry->address.lineNumber = atol (value); + else + { + if (entry->fields.count == file->fields.max) + growFields (file); + file->fields.list [entry->fields.count].key = key; + file->fields.list [entry->fields.count].value = value; + ++entry->fields.count; + } + } + } + } +} + +static void parseTagLine (tagFile *file, tagEntry *const entry) +{ + int i; + char *p = file->line.buffer; + char *tab = strchr (p, TAB); + int fieldsPresent = 0; + + entry->fields.list = NULL; + entry->fields.count = 0; + entry->kind = NULL; + entry->fileScope = 0; + + entry->name = p; + if (tab != NULL) + { + *tab = '\0'; + p = tab + 1; + entry->file = p; + tab = strchr (p, TAB); + if (tab != NULL) + { + *tab = '\0'; + p = tab + 1; + if (*p == '/' || *p == '?') + { + /* parse pattern */ + int delimiter = *(unsigned char*) p; + entry->address.lineNumber = 0; + entry->address.pattern = p; + do + { + p = strchr (p + 1, delimiter); + } while (p != NULL && *(p - 1) == '\\'); + if (p == NULL) + { + /* invalid pattern */ + } + else + ++p; + } + else if (isdigit ((int) *(unsigned char*) p)) + { + /* parse line number */ + entry->address.pattern = p; + entry->address.lineNumber = atol (p); + while (isdigit ((int) *(unsigned char*) p)) + ++p; + } + else + { + /* invalid pattern */ + } + fieldsPresent = (strncmp (p, ";\"", 2) == 0); + *p = '\0'; + if (fieldsPresent) + parseExtensionFields (file, entry, p + 2); + } + } + if (entry->fields.count > 0) + entry->fields.list = file->fields.list; + for (i = entry->fields.count ; i < file->fields.max ; ++i) + { + file->fields.list [i].key = NULL; + file->fields.list [i].value = NULL; + } +} + +static char *duplicate (const char *str) +{ + char *result = NULL; + if (str != NULL) + { + result = (char*) malloc (strlen (str) + 1); + if (result == NULL) + perror (NULL); + else + strcpy (result, str); + } + return result; +} + +static void readPseudoTags (tagFile *const file, tagFileInfo *const info) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + if (info != NULL) + { + info->file.format = 1; + info->file.sort = TAG_UNSORTED; + info->program.author = NULL; + info->program.name = NULL; + info->program.url = NULL; + info->program.version = NULL; + } + while (1) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + else + { + tagEntry entry; + const char *key, *value; + parseTagLine (file, &entry); + key = entry.name + prefixLength; + value = entry.file; + if (strcmp (key, "TAG_FILE_SORTED") == 0) + file->sortMethod = (sortType) atoi (value); + else if (strcmp (key, "TAG_FILE_FORMAT") == 0) + file->format = atoi (value); + else if (strcmp (key, "TAG_PROGRAM_AUTHOR") == 0) + file->program.author = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_NAME") == 0) + file->program.name = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_URL") == 0) + file->program.url = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_VERSION") == 0) + file->program.version = duplicate (value); + if (info != NULL) + { + info->file.format = file->format; + info->file.sort = file->sortMethod; + info->program.author = file->program.author; + info->program.name = file->program.name; + info->program.url = file->program.url; + info->program.version = file->program.version; + } + } + } + fsetpos (file->fp, &startOfLine); +} + +static void gotoFirstLogicalTag (tagFile *const file) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + rewind (file->fp); + while (1) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + } + fsetpos (file->fp, &startOfLine); +} + +static tagFile *initialize (const char *const filePath, tagFileInfo *const info) +{ + tagFile *result = (tagFile*) malloc (sizeof (tagFile)); + if (result != NULL) + { + memset (result, 0, sizeof (tagFile)); + growString (&result->line); + growString (&result->name); + result->fields.max = 20; + result->fields.list = (tagExtensionField*) malloc ( + result->fields.max * sizeof (tagExtensionField)); + result->fp = fopen (filePath, "r"); + if (result->fp == NULL) + { + free (result); + result = NULL; + info->status.error_number = errno; + } + else + { + fseek (result->fp, 0, SEEK_END); + result->size = ftell (result->fp); + rewind (result->fp); + readPseudoTags (result, info); + info->status.opened = 1; + result->initialized = 1; + } + } + return result; +} + +static void terminate (tagFile *const file) +{ + fclose (file->fp); + + free (file->line.buffer); + free (file->name.buffer); + free (file->fields.list); + + if (file->program.author != NULL) + free (file->program.author); + if (file->program.name != NULL) + free (file->program.name); + if (file->program.url != NULL) + free (file->program.url); + if (file->program.version != NULL) + free (file->program.version); + + memset (file, 0, sizeof (tagFile)); + + free (file); +} + +static tagResult readNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file == NULL || ! file->initialized) + result = TagFailure; + else if (! readTagLine (file)) + result = TagFailure; + else + { + if (entry != NULL) + parseTagLine (file, entry); + result = TagSuccess; + } + return result; +} + +static const char *readFieldValue ( + const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + int i; + if (strcmp (key, "kind") == 0) + result = entry->kind; + else if (strcmp (key, "file") == 0) + result = EmptyString; + else for (i = 0 ; i < entry->fields.count && result == NULL ; ++i) + if (strcmp (entry->fields.list [i].key, key) == 0) + result = entry->fields.list [i].value; + return result; +} + +static int readTagLineSeek (tagFile *const file, const off_t pos) +{ + int result = 0; + if (fseek (file->fp, pos, SEEK_SET) == 0) + { + result = readTagLine (file); /* read probable partial line */ + if (pos > 0 && result) + result = readTagLine (file); /* read complete line */ + } + return result; +} + +static int nameComparison (tagFile *const file) +{ + int result; + if (file->search.ignorecase) + { + if (file->search.partial) + result = strnuppercmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = struppercmp (file->search.name, file->name.buffer); + } + else + { + if (file->search.partial) + result = strncmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = strcmp (file->search.name, file->name.buffer); + } + return result; +} + +static void findFirstNonMatchBefore (tagFile *const file) +{ +#define JUMP_BACK 512 + int more_lines; + int comp; + off_t start = file->pos; + off_t pos = start; + do + { + if (pos < (off_t) JUMP_BACK) + pos = 0; + else + pos = pos - JUMP_BACK; + more_lines = readTagLineSeek (file, pos); + comp = nameComparison (file); + } while (more_lines && comp == 0 && pos > 0 && pos < start); +} + +static tagResult findFirstMatchBefore (tagFile *const file) +{ + tagResult result = TagFailure; + int more_lines; + off_t start = file->pos; + findFirstNonMatchBefore (file); + do + { + more_lines = readTagLine (file); + if (nameComparison (file) == 0) + result = TagSuccess; + } while (more_lines && result != TagSuccess && file->pos < start); + return result; +} + +static tagResult findBinary (tagFile *const file) +{ + tagResult result = TagFailure; + off_t lower_limit = 0; + off_t upper_limit = file->size; + off_t last_pos = 0; + off_t pos = upper_limit / 2; + while (result != TagSuccess) + { + if (! readTagLineSeek (file, pos)) + { + /* in case we fell off end of file */ + result = findFirstMatchBefore (file); + break; + } + else if (pos == last_pos) + { + /* prevent infinite loop if we backed up to beginning of file */ + break; + } + else + { + const int comp = nameComparison (file); + last_pos = pos; + if (comp < 0) + { + upper_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (comp > 0) + { + lower_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (pos == 0) + result = TagSuccess; + else + result = findFirstMatchBefore (file); + } + } + return result; +} + +static tagResult findSequential (tagFile *const file) +{ + tagResult result = TagFailure; + if (file->initialized) + { + while (result == TagFailure && readTagLine (file)) + { + if (nameComparison (file) == 0) + result = TagSuccess; + } + } + return result; +} + +static tagResult find (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result = TagFailure; + file->search.name = name; + file->search.nameLength = strlen (name); + file->search.partial = (options & TAG_PARTIALMATCH) != 0; + file->search.ignorecase = (options & TAG_IGNORECASE) != 0; + fseek (file->fp, 0, SEEK_END); + file->size = ftell (file->fp); + rewind (file->fp); + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findBinary (file); + } + else + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findSequential (file); + } + + if (result != TagSuccess) + file->search.pos = file->size; + else + { + file->search.pos = file->pos; + if (entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +static tagResult findNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { + result = tagsNext (file, entry); + if (result == TagSuccess && nameComparison (file) != 0) + result = TagFailure; + } + else + { + result = findSequential (file); + if (result == TagSuccess && entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +/* +* EXTERNAL INTERFACE +*/ + +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info) +{ + return initialize (filePath, info); +} + +extern tagResult tagsSetSortType (tagFile *const file, const sortType type) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + file->sortMethod = type; + result = TagSuccess; + } + return result; +} + +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + gotoFirstLogicalTag (file); + result = readNext (file, entry); + } + return result; +} + +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = readNext (file, entry); + return result; +} + +extern const char *tagsField (const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + if (entry != NULL) + result = readFieldValue (entry, key); + return result; +} + +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = find (file, entry, name, options); + return result; +} + +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = findNext (file, entry); + return result; +} + +extern tagResult tagsClose (tagFile *const file) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + terminate (file); + result = TagSuccess; + } + return result; +} + +/* +* TEST FRAMEWORK +*/ + +#ifdef READTAGS_MAIN + +static const char *TagFileName = "tags"; +static const char *ProgramName; +static int extensionFields; +static int SortOverride; +static sortType SortMethod; + +static void printTag (const tagEntry *entry) +{ + int i; + int first = 1; + const char* separator = ";\""; + const char* const empty = ""; +/* "sep" returns a value only the first time it is evaluated */ +#define sep (first ? (first = 0, separator) : empty) + printf ("%s\t%s\t%s", + entry->name, entry->file, entry->address.pattern); + if (extensionFields) + { + if (entry->kind != NULL && entry->kind [0] != '\0') + printf ("%s\tkind:%s", sep, entry->kind); + if (entry->fileScope) + printf ("%s\tfile:", sep); +#if 0 + if (entry->address.lineNumber > 0) + printf ("%s\tline:%lu", sep, entry->address.lineNumber); +#endif + for (i = 0 ; i < entry->fields.count ; ++i) + printf ("%s\t%s:%s", sep, entry->fields.list [i].key, + entry->fields.list [i].value); + } + putchar ('\n'); +#undef sep +} + +static void findTag (const char *const name, const int options) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), name); + exit (1); + } + else + { + if (SortOverride) + tagsSetSortType (file, SortMethod); + if (tagsFind (file, &entry, name, options) == TagSuccess) + { + do + { + printTag (&entry); + } while (tagsFindNext (file, &entry) == TagSuccess); + } + tagsClose (file); + } +} + +static void listTags (void) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), TagFileName); + exit (1); + } + else + { + while (tagsNext (file, &entry) == TagSuccess) + printTag (&entry); + tagsClose (file); + } +} + +const char *const Usage = + "Find tag file entries matching specified names.\n\n" + "Usage: %s [-ilp] [-s[0|1]] [-t file] [name(s)]\n\n" + "Options:\n" + " -e Include extension fields in output.\n" + " -i Perform case-insensitive matching.\n" + " -l List all tags.\n" + " -p Perform partial matching.\n" + " -s[0|1|2] Override sort detection of tag file.\n" + " -t file Use specified tag file (default: \"tags\").\n" + "Note that options are acted upon as encountered, so order is significant.\n"; + +extern int main (int argc, char **argv) +{ + int options = 0; + int actionSupplied = 0; + int i; + ProgramName = argv [0]; + if (argc == 1) + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + for (i = 1 ; i < argc ; ++i) + { + const char *const arg = argv [i]; + if (arg [0] != '-') + { + findTag (arg, options); + actionSupplied = 1; + } + else + { + size_t j; + for (j = 1 ; arg [j] != '\0' ; ++j) + { + switch (arg [j]) + { + case 'e': extensionFields = 1; break; + case 'i': options |= TAG_IGNORECASE; break; + case 'p': options |= TAG_PARTIALMATCH; break; + case 'l': listTags (); actionSupplied = 1; break; + + case 't': + if (arg [j+1] != '\0') + { + TagFileName = arg + j + 1; + j += strlen (TagFileName); + } + else if (i + 1 < argc) + TagFileName = argv [++i]; + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + case 's': + SortOverride = 1; + ++j; + if (arg [j] == '\0') + SortMethod = TAG_SORTED; + else if (strchr ("012", arg[j]) != NULL) + SortMethod = (sortType) (arg[j] - '0'); + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + default: + fprintf (stderr, "%s: unknown option: %c\n", + ProgramName, arg[j]); + exit (1); + break; + } + } + } + } + if (! actionSupplied) + { + fprintf (stderr, + "%s: no action specified: specify tag name(s) or -l option\n", + ProgramName); + exit (1); + } + return 0; +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/readtags.h b/sdk/ctags/readtags.h new file mode 100644 index 0000000000..a45c39fdb7 --- /dev/null +++ b/sdk/ctags/readtags.h @@ -0,0 +1,252 @@ +/* +* $Id: readtags.h,v 1.13 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for the public domain. +* +* This file defines the public interface for looking up tag entries in tag +* files. +* +* The functions defined in this interface are intended to provide tag file +* support to a software tool. The tag lookups provided are sufficiently fast +* enough to permit opening a sorted tag file, searching for a matching tag, +* then closing the tag file each time a tag is looked up (search times are +* on the order of hundreths of a second, even for huge tag files). This is +* the recommended use of this library for most tool applications. Adhering +* to this approach permits a user to regenerate a tag file at will without +* the tool needing to detect and resynchronize with changes to the tag file. +* Even for an unsorted 24MB tag file, tag searches take about one second. +*/ +#ifndef READTAGS_H +#define READTAGS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* +* MACROS +*/ + +/* Options for tagsSetSortType() */ +typedef enum { + TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED +} sortType ; + +/* Options for tagsFind() */ +#define TAG_FULLMATCH 0x0 +#define TAG_PARTIALMATCH 0x1 + +#define TAG_OBSERVECASE 0x0 +#define TAG_IGNORECASE 0x2 + +/* +* DATA DECLARATIONS +*/ + +typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult; + +struct sTagFile; + +typedef struct sTagFile tagFile; + +/* This structure contains information about the tag file. */ +typedef struct { + + struct { + /* was the tag file successfully opened? */ + int opened; + + /* errno value when 'opened' is false */ + int error_number; + } status; + + /* information about the structure of the tag file */ + struct { + /* format of tag file (1 = original, 2 = extended) */ + short format; + + /* how is the tag file sorted? */ + sortType sort; + } file; + + + /* information about the program which created this tag file */ + struct { + /* name of author of generating program (may be null) */ + const char *author; + + /* name of program (may be null) */ + const char *name; + + /* URL of distribution (may be null) */ + const char *url; + + /* program version (may be null) */ + const char *version; + } program; + +} tagFileInfo; + +/* This structure contains information about an extension field for a tag. + * These exist at the end of the tag in the form "key:value"). + */ +typedef struct { + + /* the key of the extension field */ + const char *key; + + /* the value of the extension field (may be an empty string) */ + const char *value; + +} tagExtensionField; + +/* This structure contains information about a specific tag. */ +typedef struct { + + /* name of tag */ + const char *name; + + /* path of source file containing definition of tag */ + const char *file; + + /* address for locating tag in source file */ + struct { + /* pattern for locating source line + * (may be NULL if not present) */ + const char *pattern; + + /* line number in source file of tag definition + * (may be zero if not known) */ + unsigned long lineNumber; + } address; + + /* kind of tag (may by name, character, or NULL if not known) */ + const char *kind; + + /* is tag of file-limited scope? */ + short fileScope; + + /* miscellaneous extension fields */ + struct { + /* number of entries in `list' */ + unsigned short count; + + /* list of key value pairs */ + tagExtensionField *list; + } fields; + +} tagEntry; + + +/* +* FUNCTION PROTOTYPES +*/ + +/* +* This function must be called before calling other functions in this +* library. It is passed the path to the tag file to read and a (possibly +* null) pointer to a structure which, if not null, will be populated with +* information about the tag file. If successful, the function will return a +* handle which must be supplied to other calls to read information from the +* tag file, and info.status.opened will be set to true. If unsuccessful, +* info.status.opened will be set to false and info.status.error_number will +* be set to the errno value representing the system error preventing the tag +* file from being successfully opened. +*/ +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info); + +/* +* This function allows the client to override the normal automatic detection +* of how a tag file is sorted. Permissible values for `type' are +* TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED. Tag files in the new extended +* format contain a key indicating whether or not they are sorted. However, +* tag files in the original format do not contain such a key even when +* sorted, preventing this library from taking advantage of fast binary +* lookups. If the client knows that such an unmarked tag file is indeed +* sorted (or not), it can override the automatic detection. Note that +* incorrect lookup results will result if a tag file is marked as sorted when +* it actually is not. The function will return TagSuccess if called on an +* open tag file or TagFailure if not. +*/ +extern tagResult tagsSetSortType (tagFile *const file, const sortType type); + +/* +* Reads the first tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the first tag file entry. +* The function will return TagSuccess another tag entry is found, or +* TagFailure if not (i.e. it reached end of file). +*/ +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry); + +/* +* Step to the next tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the next tag file entry. The +* function will return TagSuccess another tag entry is found, or TagFailure +* if not (i.e. it reached end of file). It will always read the first tag in +* the file immediately after calling tagsOpen(). +*/ +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry); + +/* +* Retrieve the value associated with the extension field for a specified key. +* It is passed a pointer to a structure already populated with values by a +* previous call to tagsNext(), tagsFind(), or tagsFindNext(), and a string +* containing the key of the desired extension field. If no such field of the +* specified key exists, the function will return null. +*/ +extern const char *tagsField (const tagEntry *const entry, const char *const key); + +/* +* Find the first tag matching `name'. The structure pointed to by `entry' +* will be populated with information about the tag file entry. If a tag file +* is sorted using the C locale, a binary search algorithm is used to search +* the tag file, resulting in very fast tag lookups, even in huge tag files. +* Various options controlling the matches can be combined by bit-wise or-ing +* certain values together. The available values are: +* +* TAG_PARTIALMATCH +* Tags whose leading characters match `name' will qualify. +* +* TAG_FULLMATCH +* Only tags whose full lengths match `name' will qualify. +* +* TAG_IGNORECASE +* Matching will be performed in a case-insenstive manner. Note that +* this disables binary searches of the tag file. +* +* TAG_OBSERVECASE +* Matching will be performed in a case-senstive manner. Note that +* this enables binary searches of the tag file. +* +* The function will return TagSuccess if a tag matching the name is found, or +* TagFailure if not. +*/ +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, const char *const name, const int options); + +/* +* Find the next tag matching the name and options supplied to the most recent +* call to tagsFind() for the same tag file. The structure pointed to by +* `entry' will be populated with information about the tag file entry. The +* function will return TagSuccess if another tag matching the name is found, +* or TagFailure if not. +*/ +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry); + +/* +* Call tagsTerminate() at completion of reading the tag file, which will +* close the file and free any internal memory allocated. The function will +* return TagFailure is no file is currently open, TagSuccess otherwise. +*/ +extern tagResult tagsClose (tagFile *const file); + +#ifdef __cplusplus +}; +#endif + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/rexx.c b/sdk/ctags/rexx.c new file mode 100644 index 0000000000..27d35cfc06 --- /dev/null +++ b/sdk/ctags/rexx.c @@ -0,0 +1,39 @@ +/* +* $Id: rexx.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2001-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for the REXX language +* (http://www.rexxla.org, http://www2.hursley.ibm.com/rexx). +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* always include first */ +#include "parse.h" /* always include */ + +/* +* FUNCTION DEFINITIONS +*/ + +static void installRexxRegex (const langType language) +{ + addTagRegex (language, "^([A-Za-z0-9@#$\\.!?_]+)[ \t]*:", + "\\1", "s,subroutine,subroutines", NULL); +} + +extern parserDefinition* RexxParser (void) +{ + static const char *const extensions [] = { "cmd", "rexx", "rx", NULL }; + parserDefinition* const def = parserNew ("REXX"); + def->extensions = extensions; + def->initialize = installRexxRegex; + def->regex = TRUE; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/routines.c b/sdk/ctags/routines.c new file mode 100644 index 0000000000..4cbd466512 --- /dev/null +++ b/sdk/ctags/routines.c @@ -0,0 +1,881 @@ +/* +* $Id: routines.c,v 1.22 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2002-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains a lose assortment of shared functions. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#ifdef HAVE_STDLIB_H +# include /* to declare malloc (), realloc () */ +#endif +#include +#include +#include +#include +#include /* to declare tempnam(), and SEEK_SET (hopefully) */ + +#ifdef HAVE_FCNTL_H +# include /* to declar O_RDWR, O_CREAT, O_EXCL */ +#endif +#ifdef HAVE_UNISTD_H +# include /* to declare mkstemp () */ +#endif + +/* To declare "struct stat" and stat (). + */ +#if defined (HAVE_SYS_TYPES_H) +# include +#else +# if defined (HAVE_TYPES_H) +# include +# endif +#endif +#ifdef HAVE_SYS_STAT_H +# include +#else +# ifdef HAVE_STAT_H +# include +# endif +#endif + +#ifdef HAVE_DOS_H +# include /* to declare MAXPATH */ +#endif +#ifdef HAVE_DIRECT_H +# include /* to _getcwd */ +#endif +#ifdef HAVE_DIR_H +# include /* to declare findfirst() and findnext() */ +#endif +#ifdef HAVE_IO_H +# include /* to declare open() */ +#endif +#include "debug.h" +#include "routines.h" + +#ifdef TRAP_MEMORY_CALLS +# include "safe_malloc.h" +#endif + +/* +* MACROS +*/ +#ifndef TMPDIR +# define TMPDIR "/tmp" +#endif + +/* File type tests. + */ +#ifndef S_ISREG +# if defined (S_IFREG) && ! defined (AMIGA) +# define S_ISREG(mode) ((mode) & S_IFREG) +# else +# define S_ISREG(mode) TRUE /* assume regular file */ +# endif +#endif + +#ifndef S_ISLNK +# ifdef S_IFLNK +# define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) +# else +# define S_ISLNK(mode) FALSE /* assume no soft links */ +# endif +#endif + +#ifndef S_ISDIR +# ifdef S_IFDIR +# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +# else +# define S_ISDIR(mode) FALSE /* assume no soft links */ +# endif +#endif + +#ifndef S_IFMT +# define S_IFMT 0 +#endif + +#ifndef S_IXUSR +# define S_IXUSR 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif + +#ifndef S_IRUSR +# define S_IRUSR 0400 +#endif +#ifndef S_IWUSR +# define S_IWUSR 0200 +#endif + +#ifndef S_ISUID +# define S_ISUID 0 +#endif + +/* Hack for rediculous practice of Microsoft Visual C++. + */ +#if defined (WIN32) +# if defined (_MSC_VER) +# define stat _stat +# define getcwd _getcwd +# define currentdrive() (_getdrive() + 'A' - 1) +# define PATH_MAX _MAX_PATH +# elif defined (__BORLANDC__) +# define PATH_MAX MAXPATH +# define currentdrive() (getdisk() + 'A') +# elif defined (DJGPP) +# define currentdrive() (getdisk() + 'A') +# else +# define currentdrive() 'C' +# endif +#endif + +#ifndef PATH_MAX +# define PATH_MAX 256 +#endif + +/* + * Miscellaneous macros + */ +#define selected(var,feature) (((int)(var) & (int)(feature)) == (int)feature) + +/* +* DATA DEFINITIONS +*/ +#if defined (MSDOS_STYLE_PATH) +const char *const PathDelimiters = ":/\\"; +#elif defined (VMS) +const char *const PathDelimiters = ":]>"; +#endif + +char *CurrentDirectory; + +static const char *ExecutableProgram; +static const char *ExecutableName; + +/* +* FUNCTION PROTOTYPES +*/ +#ifdef NEED_PROTO_STAT +extern int stat (const char *, struct stat *); +#endif +#ifdef NEED_PROTO_LSTAT +extern int lstat (const char *, struct stat *); +#endif +#if defined (MSDOS) || defined (WIN32) || defined (VMS) || defined (__EMX__) || defined (AMIGA) +# define lstat(fn,buf) stat(fn,buf) +#endif + +/* +* FUNCTION DEFINITIONS +*/ + +extern void freeRoutineResources (void) +{ + if (CurrentDirectory != NULL) + eFree (CurrentDirectory); +} + +extern void setExecutableName (const char *const path) +{ + ExecutableProgram = path; + ExecutableName = baseFilename (path); +#ifdef VAXC +{ + /* remove filetype from executable name */ + char *p = strrchr (ExecutableName, '.'); + if (p != NULL) + *p = '\0'; +} +#endif +} + +extern const char *getExecutableName (void) +{ + return ExecutableName; +} + +extern void error ( + const errorSelection selection, const char *const format, ...) +{ + va_list ap; + + va_start (ap, format); + fprintf (errout, "%s: %s", getExecutableName (), + selected (selection, WARNING) ? "Warning: " : ""); + vfprintf (errout, format, ap); + if (selected (selection, PERROR)) +#ifdef HAVE_STRERROR + fprintf (errout, " : %s", strerror (errno)); +#else + perror (" "); +#endif + fputs ("\n", errout); + va_end (ap); + if (selected (selection, FATAL)) + exit (1); +} + +/* + * Memory allocation functions + */ + +extern void *eMalloc (const size_t size) +{ + void *buffer = malloc (size); + + if (buffer == NULL) + error (FATAL, "out of memory"); + + return buffer; +} + +extern void *eCalloc (const size_t count, const size_t size) +{ + void *buffer = calloc (count, size); + + if (buffer == NULL) + error (FATAL, "out of memory"); + + return buffer; +} + +extern void *eRealloc (void *const ptr, const size_t size) +{ + void *buffer; + if (ptr == NULL) + buffer = eMalloc (size); + else + { + buffer = realloc (ptr, size); + if (buffer == NULL) + error (FATAL, "out of memory"); + } + return buffer; +} + +extern void eFree (void *const ptr) +{ + Assert (ptr != NULL); + free (ptr); +} + +/* + * String manipulation functions + */ + +/* + * Compare two strings, ignoring case. + * Return 0 for match, < 0 for smaller, > 0 for bigger + * Make sure case is folded to uppercase in comparison (like for 'sort -f') + * This makes a difference when one of the chars lies between upper and lower + * ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !) + */ +extern int struppercmp (const char *s1, const char *s2) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +extern int strnuppercmp (const char *s1, const char *s2, size_t n) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +#ifndef HAVE_STRSTR +extern char* strstr (const char *str, const char *substr) +{ + const size_t length = strlen (substr); + const char *match = NULL; + const char *p; + + for (p = str ; *p != '\0' && match == NULL ; ++p) + if (strncmp (p, substr, length) == 0) + match = p; + return (char*) match; +} +#endif + +extern char* eStrdup (const char* str) +{ + char* result = xMalloc (strlen (str) + 1, char); + strcpy (result, str); + return result; +} + +extern void toLowerString (char* str) +{ + while (*str != '\0') + { + *str = tolower ((int) *str); + ++str; + } +} + +extern void toUpperString (char* str) +{ + while (*str != '\0') + { + *str = toupper ((int) *str); + ++str; + } +} + +/* Newly allocated string containing lower case conversion of a string. + */ +extern char* newLowerString (const char* str) +{ + char* const result = xMalloc (strlen (str) + 1, char); + int i = 0; + do + result [i] = tolower ((int) str [i]); + while (str [i++] != '\0'); + return result; +} + +/* Newly allocated string containing upper case conversion of a string. + */ +extern char* newUpperString (const char* str) +{ + char* const result = xMalloc (strlen (str) + 1, char); + int i = 0; + do + result [i] = toupper ((int) str [i]); + while (str [i++] != '\0'); + return result; +} + +/* + * File system functions + */ + +extern void setCurrentDirectory (void) +{ +#ifndef AMIGA + char* buf; +#endif + if (CurrentDirectory == NULL) + CurrentDirectory = xMalloc ((size_t) (PATH_MAX + 1), char); +#ifdef AMIGA + strcpy (CurrentDirectory, "."); +#else + buf = getcwd (CurrentDirectory, PATH_MAX); + if (buf == NULL) + perror (""); +#endif + if (CurrentDirectory [strlen (CurrentDirectory) - (size_t) 1] != + PATH_SEPARATOR) + { + sprintf (CurrentDirectory + strlen (CurrentDirectory), "%c", + OUTPUT_PATH_SEPARATOR); + } +} + +#ifdef AMIGA +static boolean isAmigaDirectory (const char *const name) +{ + boolean result = FALSE; + struct FileInfoBlock *const fib = xMalloc (1, struct FileInfoBlock); + if (fib != NULL) + { + const BPTR flock = Lock ((UBYTE *) name, (long) ACCESS_READ); + + if (flock != (BPTR) NULL) + { + if (Examine (flock, fib)) + result = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE); + UnLock (flock); + } + eFree (fib); + } + return result; +} +#endif + +/* For caching of stat() calls */ +extern fileStatus *eStat (const char *const fileName) +{ + struct stat status; + static fileStatus file; + if (file.name == NULL || strcmp (fileName, file.name) != 0) + { + if (file.name != NULL) + eFree (file.name); + file.name = eStrdup (fileName); + if (lstat (file.name, &status) != 0) + file.exists = FALSE; + else + { + file.isSymbolicLink = (boolean) S_ISLNK (status.st_mode); + if (file.isSymbolicLink && stat (file.name, &status) != 0) + file.exists = FALSE; + else + { + file.exists = TRUE; +#ifdef AMIGA + file.isDirectory = isAmigaDirectory (file.name); +#else + file.isDirectory = (boolean) S_ISDIR (status.st_mode); +#endif + file.isNormalFile = (boolean) (S_ISREG (status.st_mode)); + file.isExecutable = (boolean) ((status.st_mode & + (S_IXUSR | S_IXGRP | S_IXOTH)) != 0); + file.isSetuid = (boolean) ((status.st_mode & S_ISUID) != 0); + file.size = status.st_size; + } + } + } + return &file; +} + +extern boolean doesFileExist (const char *const fileName) +{ + fileStatus *status = eStat (fileName); + return status->exists; +} + +extern boolean isRecursiveLink (const char* const dirName) +{ + boolean result = FALSE; + fileStatus *status = eStat (dirName); + if (status->isSymbolicLink) + { + char* const path = absoluteFilename (dirName); + while (path [strlen (path) - 1] == PATH_SEPARATOR) + path [strlen (path) - 1] = '\0'; + while (! result && strlen (path) > (size_t) 1) + { + char *const separator = strrchr (path, PATH_SEPARATOR); + if (separator == NULL) + break; + else if (separator == path) /* backed up to root directory */ + *(separator + 1) = '\0'; + else + *separator = '\0'; + result = isSameFile (path, dirName); + } + eFree (path); + } + return result; +} + +#ifndef HAVE_FGETPOS + +extern int fgetpos (FILE *stream, fpos_t *pos) +{ + int result = 0; + + *pos = ftell (stream); + if (*pos == -1L) + result = -1; + + return result; +} + +extern int fsetpos (FILE *stream, fpos_t const *pos) +{ + return fseek (stream, *pos, SEEK_SET); +} + +#endif + +/* + * Pathname manipulation (O/S dependent!!!) + */ + +static boolean isPathSeparator (const int c) +{ + boolean result; +#if defined (MSDOS_STYLE_PATH) || defined (VMS) + result = (boolean) (strchr (PathDelimiters, c) != NULL); +#else + result = (boolean) (c == PATH_SEPARATOR); +#endif + return result; +} + +#if ! defined (HAVE_STAT_ST_INO) + +static void canonicalizePath (char *const path __unused__) +{ +#if defined (MSDOS_STYLE_PATH) + char *p; + for (p = path ; *p != '\0' ; ++p) + if (isPathSeparator (*p) && *p != ':') + *p = PATH_SEPARATOR; +#endif +} + +#endif + +extern boolean isSameFile (const char *const name1, const char *const name2) +{ + boolean result = FALSE; +#if defined (HAVE_STAT_ST_INO) + struct stat stat1, stat2; + + if (stat (name1, &stat1) == 0 && stat (name2, &stat2) == 0) + result = (boolean) (stat1.st_ino == stat2.st_ino); +#else + { + char *const n1 = absoluteFilename (name1); + char *const n2 = absoluteFilename (name2); + canonicalizePath (n1); + canonicalizePath (n2); +# if defined (CASE_INSENSITIVE_FILENAMES) + result = (boolean) (strcasecmp (n1, n2) == 0); +#else + result = (boolean) (strcmp (n1, n2) == 0); +#endif + free (n1); + free (n2); + } +#endif + return result; +} + +extern const char *baseFilename (const char *const filePath) +{ +#if defined (MSDOS_STYLE_PATH) || defined (VMS) + const char *tail = NULL; + unsigned int i; + + /* Find whichever of the path delimiters is last. + */ + for (i = 0 ; i < strlen (PathDelimiters) ; ++i) + { + const char *sep = strrchr (filePath, PathDelimiters [i]); + + if (sep > tail) + tail = sep; + } +#else + const char *tail = strrchr (filePath, PATH_SEPARATOR); +#endif + if (tail == NULL) + tail = filePath; + else + ++tail; /* step past last delimiter */ +#ifdef VAXC + { + /* remove version number from filename */ + char *p = strrchr ((char *) tail, ';'); + if (p != NULL) + *p = '\0'; + } +#endif + + return tail; +} + +extern const char *fileExtension (const char *const fileName) +{ + const char *extension; + const char *pDelimiter = NULL; + const char *const base = baseFilename (fileName); +#ifdef QDOS + pDelimiter = strrchr (base, '_'); +#endif + if (pDelimiter == NULL) + pDelimiter = strrchr (base, '.'); + + if (pDelimiter == NULL) + extension = ""; + else + extension = pDelimiter + 1; /* skip to first char of extension */ + + return extension; +} + +extern boolean isAbsolutePath (const char *const path) +{ + boolean result = FALSE; +#if defined (MSDOS_STYLE_PATH) + if (isPathSeparator (path [0])) + result = TRUE; + else if (isalpha (path [0]) && path [1] == ':') + { + if (isPathSeparator (path [2])) + result = TRUE; + else + /* We don't support non-absolute file names with a drive + * letter, like `d:NAME' (it's too much hassle). + */ + error (FATAL, + "%s: relative file names with drive letters not supported", + path); + } +#elif defined (VMS) + result = (boolean) (strchr (path, ':') != NULL); +#else + result = isPathSeparator (path [0]); +#endif + return result; +} + +extern vString *combinePathAndFile ( + const char *const path, const char *const file) +{ + vString *const filePath = vStringNew (); +#ifdef VMS + const char *const directoryId = strstr (file, ".DIR;1"); + + if (directoryId == NULL) + { + const char *const versionId = strchr (file, ';'); + + vStringCopyS (filePath, path); + if (versionId == NULL) + vStringCatS (filePath, file); + else + vStringNCatS (filePath, file, versionId - file); + vStringCopyToLower (filePath, filePath); + } + else + { + /* File really is a directory; append it to the path. + * Gotcha: doesn't work with logical names. + */ + vStringNCopyS (filePath, path, strlen (path) - 1); + vStringPut (filePath, '.'); + vStringNCatS (filePath, file, directoryId - file); + if (strchr (path, '[') != NULL) + vStringPut (filePath, ']'); + else + vStringPut (filePath, '>'); + vStringTerminate (filePath); + } +#else + const int lastChar = path [strlen (path) - 1]; + boolean terminated = isPathSeparator (lastChar); + + vStringCopyS (filePath, path); + if (! terminated) + { + vStringPut (filePath, OUTPUT_PATH_SEPARATOR); + vStringTerminate (filePath); + } + vStringCatS (filePath, file); +#endif + + return filePath; +} + +/* Return a newly-allocated string whose contents concatenate those of + * s1, s2, s3. + * Routine adapted from Gnu etags. + */ +static char* concat (const char *s1, const char *s2, const char *s3) +{ + int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + char *result = xMalloc (len1 + len2 + len3 + 1, char); + + strcpy (result, s1); + strcpy (result + len1, s2); + strcpy (result + len1 + len2, s3); + result [len1 + len2 + len3] = '\0'; + + return result; +} + +/* Return a newly allocated string containing the absolute file name of FILE + * given CWD (which should end with a slash). + * Routine adapted from Gnu etags. + */ +extern char* absoluteFilename (const char *file) +{ + char *slashp, *cp; + char *res = NULL; + if (isAbsolutePath (file)) + { +#ifdef MSDOS_STYLE_PATH + if (file [1] == ':') + res = eStrdup (file); + else + { + char drive [3]; + sprintf (drive, "%c:", currentdrive ()); + res = concat (drive, file, ""); + } +#else + res = eStrdup (file); +#endif + } + else + res = concat (CurrentDirectory, file, ""); + + /* Delete the "/dirname/.." and "/." substrings. */ + slashp = strchr (res, PATH_SEPARATOR); + while (slashp != NULL && slashp [0] != '\0') + { + if (slashp[1] == '.') + { + if (slashp [2] == '.' && + (slashp [3] == PATH_SEPARATOR || slashp [3] == '\0')) + { + cp = slashp; + do + cp--; + while (cp >= res && ! isAbsolutePath (cp)); + if (cp < res) + cp = slashp;/* the absolute name begins with "/.." */ +#ifdef MSDOS_STYLE_PATH + /* Under MSDOS and NT we get `d:/NAME' as absolute file name, + * so the luser could say `d:/../NAME'. We silently treat this + * as `d:/NAME'. + */ + else if (cp [0] != PATH_SEPARATOR) + cp = slashp; +#endif + strcpy (cp, slashp + 3); + slashp = cp; + continue; + } + else if (slashp [2] == PATH_SEPARATOR || slashp [2] == '\0') + { + strcpy (slashp, slashp + 2); + continue; + } + } + slashp = strchr (slashp + 1, PATH_SEPARATOR); + } + + if (res [0] == '\0') + return eStrdup ("/"); + else + { +#ifdef MSDOS_STYLE_PATH + /* Canonicalize drive letter case. */ + if (res [1] == ':' && islower (res [0])) + res [0] = toupper (res [0]); +#endif + + return res; + } +} + +/* Return a newly allocated string containing the absolute file name of dir + * where `file' resides given `CurrentDirectory'. + * Routine adapted from Gnu etags. + */ +extern char* absoluteDirname (char *file) +{ + char *slashp, *res; + char save; + slashp = strrchr (file, PATH_SEPARATOR); + if (slashp == NULL) + res = eStrdup (CurrentDirectory); + else + { + save = slashp [1]; + slashp [1] = '\0'; + res = absoluteFilename (file); + slashp [1] = save; + } + return res; +} + +/* Return a newly allocated string containing the file name of FILE relative + * to the absolute directory DIR (which should end with a slash). + * Routine adapted from Gnu etags. + */ +extern char* relativeFilename (const char *file, const char *dir) +{ + const char *fp, *dp; + char *absdir, *res; + int i; + + /* Find the common root of file and dir (with a trailing slash). */ + absdir = absoluteFilename (file); + fp = absdir; + dp = dir; + while (*fp++ == *dp++) + continue; + fp--; + dp--; /* back to the first differing char */ + do + { /* look at the equal chars until path sep */ + if (fp == absdir) + return absdir; /* first char differs, give up */ + fp--; + dp--; + } while (*fp != PATH_SEPARATOR); + + /* Build a sequence of "../" strings for the resulting relative file name. + */ + i = 0; + while ((dp = strchr (dp + 1, PATH_SEPARATOR)) != NULL) + i += 1; + res = xMalloc (3 * i + strlen (fp + 1) + 1, char); + res [0] = '\0'; + while (i-- > 0) + strcat (res, "../"); + + /* Add the file name relative to the common root of file and dir. */ + strcat (res, fp + 1); + free (absdir); + + return res; +} + +extern FILE *tempFile (const char *const mode, char **const pName) +{ + char *name; + FILE *fp; + int fd; +#if defined(HAVE_MKSTEMP) + const char *const pattern = "tags.XXXXXX"; + const char *tmpdir = NULL; + fileStatus *file = eStat (ExecutableProgram); + if (! file->isSetuid) + tmpdir = getenv ("TMPDIR"); + if (tmpdir == NULL) + tmpdir = TMPDIR; + name = xMalloc (strlen (tmpdir) + 1 + strlen (pattern) + 1, char); + sprintf (name, "%s%c%s", tmpdir, OUTPUT_PATH_SEPARATOR, pattern); + fd = mkstemp (name); +#elif defined(HAVE_TEMPNAM) + name = tempnam (TMPDIR, "tags"); + if (name == NULL) + error (FATAL | PERROR, "cannot allocate temporary file name"); + fd = open (name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); +#else + name = xMalloc (L_tmpnam, char); + if (tmpnam (name) != name) + error (FATAL | PERROR, "cannot assign temporary file name"); + fd = open (name, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); +#endif + if (fd == -1) + error (FATAL | PERROR, "cannot open temporary file"); + fp = fdopen (fd, mode); + if (fp == NULL) + error (FATAL | PERROR, "cannot open temporary file"); + DebugStatement ( + debugPrintf (DEBUG_STATUS, "opened temporary file %s\n", name); ) + Assert (*pName == NULL); + *pName = name; + return fp; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/routines.h b/sdk/ctags/routines.h new file mode 100644 index 0000000000..2c1d469545 --- /dev/null +++ b/sdk/ctags/routines.h @@ -0,0 +1,132 @@ +/* +* $Id: routines.h,v 1.11 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to routines.c +*/ +#ifndef _ROUTINES_H +#define _ROUTINES_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +/* +* MACROS +*/ +#define xMalloc(n,Type) (Type *)eMalloc((size_t)(n) * sizeof (Type)) +#define xCalloc(n,Type) (Type *)eCalloc((size_t)(n), sizeof (Type)) +#define xRealloc(p,n,Type) (Type *)eRealloc((p), (n) * sizeof (Type)) + +/* + * Portability macros + */ +#ifndef PATH_SEPARATOR +# if defined (MSDOS_STYLE_PATH) +# define PATH_SEPARATOR '\\' +# elif defined (QDOS) +# define PATH_SEPARATOR '_' +# else +# define PATH_SEPARATOR '/' +# endif +#endif + +#if defined (MSDOS_STYLE_PATH) && defined (UNIX_PATH_SEPARATOR) +# define OUTPUT_PATH_SEPARATOR '/' +#else +# define OUTPUT_PATH_SEPARATOR PATH_SEPARATOR +#endif + +/* +* DATA DECLARATIONS +*/ +#if defined (MSDOS_STYLE_PATH) || defined (VMS) +extern const char *const PathDelimiters; +#endif +extern char *CurrentDirectory; +typedef int errorSelection; +enum eErrorTypes { FATAL = 1, WARNING = 2, PERROR = 4 }; + +typedef struct { + /* Name of file for which status is valid */ + char* name; + + /* Does file exist? If not, members below do not contain valid data. */ + boolean exists; + + /* is file path a symbolic link to another file? */ + boolean isSymbolicLink; + + /* Is file (pointed to) a directory? */ + boolean isDirectory; + + /* Is file (pointed to) a normal file? */ + boolean isNormalFile; + + /* Is file (pointed to) executable? */ + boolean isExecutable; + + /* Is file (pointed to) setuid? */ + boolean isSetuid; + + /* Size of file (pointed to) */ + unsigned long size; +} fileStatus; + +/* +* FUNCTION PROTOTYPES +*/ +extern void freeRoutineResources (void); +extern void setExecutableName (const char *const path); +extern const char *getExecutableName (void); +extern void error (const errorSelection selection, const char *const format, ...) __printf__ (2, 3); + +/* Memory allocation functions */ +#ifdef NEED_PROTO_MALLOC +extern void *malloc (size_t); +extern void *realloc (void *ptr, size_t); +#endif +extern void *eMalloc (const size_t size); +extern void *eCalloc (const size_t count, const size_t size); +extern void *eRealloc (void *const ptr, const size_t size); +extern void eFree (void *const ptr); + +/* String manipulation functions */ +extern int struppercmp (const char *s1, const char *s2); +extern int strnuppercmp (const char *s1, const char *s2, size_t n); +#ifndef HAVE_STRSTR +extern char* strstr (const char *str, const char *substr); +#endif +extern char* eStrdup (const char* str); +extern void toLowerString (char* str); +extern void toUpperString (char* str); +extern char* newLowerString (const char* str); +extern char* newUpperString (const char* str); + +/* File system functions */ +extern void setCurrentDirectory (void); +extern fileStatus *eStat (const char *const fileName); +extern boolean doesFileExist (const char *const fileName); +extern boolean isRecursiveLink (const char* const dirName); +extern boolean isSameFile (const char *const name1, const char *const name2); +#if defined(NEED_PROTO_FGETPOS) +extern int fgetpos (FILE *stream, fpos_t *pos); +extern int fsetpos (FILE *stream, fpos_t *pos); +#endif +extern const char *baseFilename (const char *const filePath); +extern const char *fileExtension (const char *const fileName); +extern boolean isAbsolutePath (const char *const path); +extern vString *combinePathAndFile (const char *const path, const char *const file); +extern char* absoluteFilename (const char *file); +extern char* absoluteDirname (char *file); +extern char* relativeFilename (const char *file, const char *dir); +extern FILE *tempFile (const char *const mode, char **const pName); + +#endif /* _ROUTINES_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/ruby.c b/sdk/ctags/ruby.c new file mode 100644 index 0000000000..d79552de06 --- /dev/null +++ b/sdk/ctags/ruby.c @@ -0,0 +1,398 @@ +/* +* $Id: ruby.c,v 1.6 2006/05/30 04:37:12 darren Exp $ +* +* Copyright (c) 2000-2001, Thaddeus Covert +* Copyright (c) 2002 Matthias Veit +* Copyright (c) 2004 Elliott Hughes +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Ruby language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DECLARATIONS +*/ +typedef enum { + K_UNDEFINED = -1, K_CLASS, K_METHOD, K_MODULE, K_SINGLETON +} rubyKind; + +/* +* DATA DEFINITIONS +*/ +static kindOption RubyKinds [] = { + { TRUE, 'c', "class", "classes" }, + { TRUE, 'f', "method", "methods" }, + { TRUE, 'm', "module", "modules" }, + { TRUE, 'F', "singleton method", "singleton methods" } +}; + +static stringList* nesting = 0; + +/* +* FUNCTION DEFINITIONS +*/ + +/* +* Returns a string describing the scope in 'list'. +* We record the current scope as a list of entered scopes. +* Scopes corresponding to 'if' statements and the like are +* represented by empty strings. Scopes corresponding to +* modules and classes are represented by the name of the +* module or class. +*/ +static vString* stringListToScope (const stringList* list) +{ + unsigned int i; + unsigned int chunks_output = 0; + vString* result = vStringNew (); + const unsigned int max = stringListCount (list); + for (i = 0; i < max; ++i) + { + vString* chunk = stringListItem (list, i); + if (vStringLength (chunk) > 0) + { + vStringCatS (result, (chunks_output++ > 0) ? "." : ""); + vStringCatS (result, vStringValue (chunk)); + } + } + return result; +} + +/* +* Attempts to advance 's' past 'literal'. +* Returns TRUE if it did, FALSE (and leaves 's' where +* it was) otherwise. +*/ +static boolean canMatch (const unsigned char** s, const char* literal) +{ + const int literal_length = strlen (literal); + const unsigned char next_char = *(*s + literal_length); + if (strncmp ((const char*) *s, literal, literal_length) != 0) + { + return FALSE; + } + /* Additionally check that we're at the end of a token. */ + if ( ! (next_char == 0 || isspace (next_char) || next_char == '(')) + { + return FALSE; + } + *s += literal_length; + return TRUE; +} + +/* +* Attempts to advance 'cp' past a Ruby operator method name. Returns +* TRUE if successful (and copies the name into 'name'), FALSE otherwise. +*/ +static boolean parseRubyOperator (vString* name, const unsigned char** cp) +{ + static const char* RUBY_OPERATORS[] = { + "[]", "[]=", + "**", + "!", "~", "+@", "-@", + "*", "/", "%", + "+", "-", + ">>", "<<", + "&", + "^", "|", + "<=", "<", ">", ">=", + "<=>", "==", "===", "!=", "=~", "!~", + 0 + }; + int i; + for (i = 0; RUBY_OPERATORS[i] != 0; ++i) + { + if (canMatch (cp, RUBY_OPERATORS[i])) + { + vStringCatS (name, RUBY_OPERATORS[i]); + return TRUE; + } + } + return FALSE; +} + +/* +* Emits a tag for the given 'name' of kind 'kind' at the current nesting. +*/ +static void emitRubyTag (vString* name, rubyKind kind) +{ + tagEntryInfo tag; + vString* scope; + + vStringTerminate (name); + scope = stringListToScope (nesting); + + initTagEntry (&tag, vStringValue (name)); + if (vStringLength (scope) > 0) { + tag.extensionFields.scope [0] = "class"; + tag.extensionFields.scope [1] = vStringValue (scope); + } + tag.kindName = RubyKinds [kind].name; + tag.kind = RubyKinds [kind].letter; + makeTagEntry (&tag); + + stringListAdd (nesting, vStringNewCopy (name)); + + vStringClear (name); + vStringDelete (scope); +} + +/* Tests whether 'ch' is a character in 'list'. */ +static boolean charIsIn (char ch, const char* list) +{ + return (strchr (list, ch) != 0); +} + +/* Advances 'cp' over leading whitespace. */ +static void skipWhitespace (const unsigned char** cp) +{ + while (isspace (**cp)) + { + ++*cp; + } +} + +/* +* Copies the characters forming an identifier from *cp into +* name, leaving *cp pointing to the character after the identifier. +*/ +static rubyKind parseIdentifier ( + const unsigned char** cp, vString* name, rubyKind kind) +{ + /* Method names are slightly different to class and variable names. + * A method name may optionally end with a question mark, exclamation + * point or equals sign. These are all part of the name. + * A method name may also contain a period if it's a singleton method. + */ + const char* also_ok = (kind == K_METHOD) ? "_.?!=" : "_"; + + skipWhitespace (cp); + + /* Check for an anonymous (singleton) class such as "class << HTTP". */ + if (kind == K_CLASS && **cp == '<' && *(*cp + 1) == '<') + { + return K_UNDEFINED; + } + + /* Check for operators such as "def []=(key, val)". */ + if (kind == K_METHOD || kind == K_SINGLETON) + { + if (parseRubyOperator (name, cp)) + { + return kind; + } + } + + /* Copy the identifier into 'name'. */ + while (**cp != 0 && (isalnum (**cp) || charIsIn (**cp, also_ok))) + { + char last_char = **cp; + + vStringPut (name, last_char); + ++*cp; + + if (kind == K_METHOD) + { + /* Recognize singleton methods. */ + if (last_char == '.') + { + vStringTerminate (name); + vStringClear (name); + return parseIdentifier (cp, name, K_SINGLETON); + } + + /* Recognize characters which mark the end of a method name. */ + if (charIsIn (last_char, "?!=")) + { + break; + } + } + } + return kind; +} + +static void readAndEmitTag (const unsigned char** cp, rubyKind expected_kind) +{ + if (isspace (**cp)) + { + vString *name = vStringNew (); + rubyKind actual_kind = parseIdentifier (cp, name, expected_kind); + + if (actual_kind == K_UNDEFINED || vStringLength (name) == 0) + { + /* + * What kind of tags should we create for code like this? + * + * %w(self.clfloor clfloor).each do |name| + * module_eval <<-"end;" + * def #{name}(x, y=1) + * q, r = x.divmod(y) + * q = q.to_i + * return q, r + * end + * end; + * end + * + * Or this? + * + * class << HTTP + * + * For now, we don't create any. + */ + } + else + { + emitRubyTag (name, actual_kind); + } + vStringDelete (name); + } +} + +static void enterUnnamedScope (void) +{ + stringListAdd (nesting, vStringNewInit ("")); +} + +static void findRubyTags (void) +{ + const unsigned char *line; + boolean inMultiLineComment = FALSE; + + nesting = stringListNew (); + + /* FIXME: this whole scheme is wrong, because Ruby isn't line-based. + * You could perfectly well write: + * + * def + * method + * puts("hello") + * end + * + * if you wished, and this function would fail to recognize anything. + */ + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + + if (canMatch (&cp, "=begin")) + { + inMultiLineComment = TRUE; + continue; + } + if (canMatch (&cp, "=end")) + { + inMultiLineComment = FALSE; + continue; + } + + skipWhitespace (&cp); + + /* Avoid mistakenly starting a scope for modifiers such as + * + * return if + * + * FIXME: this is fooled by code such as + * + * result = if + * + * else + * + * end + * + * FIXME: we're also fooled if someone does something heinous such as + * + * puts("hello") \ + * unless + */ + if (canMatch (&cp, "case") || canMatch (&cp, "for") || + canMatch (&cp, "if") || canMatch (&cp, "unless") || + canMatch (&cp, "while")) + { + enterUnnamedScope (); + } + + /* + * "module M", "class C" and "def m" should only be at the beginning + * of a line. + */ + if (canMatch (&cp, "module")) + { + readAndEmitTag (&cp, K_MODULE); + } + else if (canMatch (&cp, "class")) + { + readAndEmitTag (&cp, K_CLASS); + } + else if (canMatch (&cp, "def")) + { + readAndEmitTag (&cp, K_METHOD); + } + + while (*cp != '\0') + { + /* FIXME: we don't cope with here documents, or string literals, + * or regular expression literals, or ... you get the idea. + * Hopefully, the restriction above that insists on seeing + * definitions at the starts of lines should keep us out of + * mischief. + */ + if (inMultiLineComment || isspace (*cp)) + { + ++cp; + } + else if (*cp == '#') + { + /* FIXME: this is wrong, but there *probably* won't be a + * definition after an interpolated string (where # doesn't + * mean 'comment'). + */ + break; + } + else if (canMatch (&cp, "begin") || canMatch (&cp, "do")) + { + enterUnnamedScope (); + } + else if (canMatch (&cp, "end") && stringListCount (nesting) > 0) + { + /* Leave the most recent scope. */ + vStringDelete (stringListLast (nesting)); + stringListRemoveLast (nesting); + } + else if (*cp != '\0') + { + do + ++cp; + while (isalnum (*cp) || *cp == '_'); + } + } + } + stringListDelete (nesting); +} + +extern parserDefinition* RubyParser (void) +{ + static const char *const extensions [] = { "rb", "ruby", NULL }; + parserDefinition* def = parserNew ("Ruby"); + def->kinds = RubyKinds; + def->kindCount = KIND_COUNT (RubyKinds); + def->extensions = extensions; + def->parser = findRubyTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/scheme.c b/sdk/ctags/scheme.c new file mode 100644 index 0000000000..b27da1bfb8 --- /dev/null +++ b/sdk/ctags/scheme.c @@ -0,0 +1,111 @@ +/* +* $Id: scheme.c,v 1.3 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2000-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for Scheme language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FUNCTION, K_SET +} schemeKind; + +static kindOption SchemeKinds [] = { + { TRUE, 'f', "function", "functions" }, + { TRUE, 's', "set", "sets" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +/* Algorithm adapted from from GNU etags. + * Scheme tag functions + * look for (def... xyzzy + * look for (def... (xyzzy + * look for (def ... ((... (xyzzy .... + * look for (set! xyzzy + */ +static void readIdentifier (vString *const name, const unsigned char *cp) +{ + const unsigned char *p; + vStringClear (name); + /* Go till you get to white space or a syntactic break */ + for (p = cp; *p != '\0' && *p != '(' && *p != ')' && !isspace (*p); p++) + vStringPut (name, (int) *p); + vStringTerminate (name); +} + +static void findSchemeTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = line; + + if (cp [0] == '(' && + (cp [1] == 'D' || cp [1] == 'd') && + (cp [2] == 'E' || cp [2] == 'e') && + (cp [3] == 'F' || cp [3] == 'f')) + { + while (!isspace (*cp)) + cp++; + /* Skip over open parens and white space */ + while (*cp != '\0' && (isspace (*cp) || *cp == '(')) + cp++; + readIdentifier (name, cp); + makeSimpleTag (name, SchemeKinds, K_FUNCTION); + } + if (cp [0] == '(' && + (cp [1] == 'S' || cp [1] == 's') && + (cp [2] == 'E' || cp [2] == 'e') && + (cp [3] == 'T' || cp [3] == 't') && + (cp [4] == '!' || cp [4] == '!') && + (isspace (cp [5]))) + { + while (*cp != '\0' && !isspace (*cp)) + cp++; + /* Skip over white space */ + while (isspace (*cp)) + cp++; + readIdentifier (name, cp); + makeSimpleTag (name, SchemeKinds, K_SET); + } + } + vStringDelete (name); +} + +extern parserDefinition* SchemeParser (void) +{ + static const char *const extensions [] = { + "SCM", "SM", "sch", "scheme", "scm", "sm", NULL + }; + parserDefinition* def = parserNew ("Scheme"); + def->kinds = SchemeKinds; + def->kindCount = KIND_COUNT (SchemeKinds); + def->extensions = extensions; + def->parser = findSchemeTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/sh.c b/sdk/ctags/sh.c new file mode 100644 index 0000000000..4c8b5e11f7 --- /dev/null +++ b/sdk/ctags/sh.c @@ -0,0 +1,115 @@ +/* +* $Id: sh.c,v 1.6 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2000-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for scripts for the +* Bourne shell (and its derivatives, the Korn and Z shells). +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_FUNCTION +} shKind; + +static kindOption ShKinds [] = { + { TRUE, 'f', "function", "functions"} +}; + +/* +* FUNCTION DEFINITIONS +*/ + +/* Reject any tag "main" from a file named "configure". These appear in + * here-documents in GNU autoconf scripts and will add a haystack to the + * needle. + */ +static boolean hackReject (const vString* const tagName) +{ + const char *const scriptName = baseFilename (vStringValue (File.name)); + boolean result = (boolean) ( + strcmp (scriptName, "configure") == 0 && + strcmp (vStringValue (tagName), "main") == 0); + return result; +} + +static void findShTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char* cp = line; + boolean functionFound = FALSE; + + if (line [0] == '#') + continue; + + while (isspace (*cp)) + cp++; + if (strncmp ((const char*) cp, "function", (size_t) 8) == 0 && + isspace ((int) cp [8])) + { + functionFound = TRUE; + cp += 8; + if (! isspace ((int) *cp)) + continue; + while (isspace ((int) *cp)) + ++cp; + } + if (! (isalnum ((int) *cp) || *cp == '_')) + continue; + while (isalnum ((int) *cp) || *cp == '_') + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + while (isspace ((int) *cp)) + ++cp; + if (*cp++ == '(') + { + while (isspace ((int) *cp)) + ++cp; + if (*cp == ')' && ! hackReject (name)) + functionFound = TRUE; + } + if (functionFound) + makeSimpleTag (name, ShKinds, K_FUNCTION); + vStringClear (name); + } + vStringDelete (name); +} + +extern parserDefinition* ShParser (void) +{ + static const char *const extensions [] = { + "sh", "SH", "bsh", "bash", "ksh", "zsh", NULL + }; + parserDefinition* def = parserNew ("Sh"); + def->kinds = ShKinds; + def->kindCount = KIND_COUNT (ShKinds); + def->extensions = extensions; + def->parser = findShTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/slang.c b/sdk/ctags/slang.c new file mode 100644 index 0000000000..a68f3d1bb7 --- /dev/null +++ b/sdk/ctags/slang.c @@ -0,0 +1,41 @@ +/* + * $Id: slang.c,v 1.5 2006/05/30 04:37:13 darren Exp $ + * + * Copyright (c) 2000-2001, Francesc Rocher + * + * Author: Francesc Rocher . + * + * This source code is released for free distribution under the terms of the + * GNU General Public License. + * + * This module contains functions for generating tags for S-Lang files. + */ + +/* + * INCLUDE FILES + */ +#include "general.h" /* must always come first */ +#include "parse.h" + +/* + * FUNCTION DEFINITIONS + */ +static void installSlangRegex (const langType language) +{ + addTagRegex (language, + "^.*define[ \t]+([A-Z_][A-Z0-9_]*)[^;]*$", + "\\1", "f,function,functions", "i"); + addTagRegex (language, + "^[ \t]*implements[ \t]+\\([ \t]*\"([^\"]*)\"[ \t]*\\)[ \t]*;", + "\\1", "n,namespace,namespaces", NULL); +} + +extern parserDefinition* SlangParser (void) +{ + static const char *const extensions [] = { "sl", NULL }; + parserDefinition* const def = parserNew ("SLang"); + def->extensions = extensions; + def->initialize = installSlangRegex; + def->regex = TRUE; + return def; +} diff --git a/sdk/ctags/sml.c b/sdk/ctags/sml.c new file mode 100644 index 0000000000..af69910af0 --- /dev/null +++ b/sdk/ctags/sml.c @@ -0,0 +1,211 @@ +/* +* $Id: sml.c,v 1.7 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2002, Venkatesh Prasad Ranganath and Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for SML language files. +*/ + +/* + * INCLUDE FILES + */ +#include "general.h" /* must always come first */ + +#include + +#include "entry.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* + * DATA DECLARATIONS + */ +typedef enum { + K_AND = -2, + K_NONE = -1, + K_EXCEPTION, + K_FUNCTION, + K_FUNCTOR, + K_SIGNATURE, + K_STRUCTURE, + K_TYPE, + K_VAL +} smlKind; + +/* + * DATA DEFINITIONS + */ +static kindOption SmlKinds[] = { + { TRUE, 'e', "exception", "exception declarations" }, + { TRUE, 'f', "function", "function definitions" }, + { TRUE, 'c', "functor", "functor definitions" }, + { TRUE, 's', "signature", "signature declarations" }, + { TRUE, 'r', "structure", "structure declarations" }, + { TRUE, 't', "type", "type definitions" }, + { TRUE, 'v', "value", "value bindings" } +}; + +static struct { + const char *keyword; + smlKind kind; +} SmlKeywordTypes [] = { + { "abstype", K_TYPE }, + { "and", K_AND }, + { "datatype", K_TYPE }, + { "exception", K_EXCEPTION }, + { "functor", K_FUNCTOR }, + { "fun", K_FUNCTION }, + { "signature", K_SIGNATURE }, + { "structure", K_STRUCTURE }, + { "type", K_TYPE }, + { "val", K_VAL } +}; + +static unsigned int CommentLevel = 0; + +/* + * FUNCTION DEFINITIONS + */ + +static void makeSmlTag (smlKind type, vString *name) +{ + tagEntryInfo tag; + initTagEntry (&tag, vStringValue (name)); + tag.kindName = SmlKinds [type].name; + tag.kind = SmlKinds [type].letter; + makeTagEntry (&tag); +} + +static const unsigned char *skipSpace (const unsigned char *cp) +{ + while (isspace ((int) *cp)) + ++cp; + return cp; +} + +static boolean isIdentifier (int c) +{ + boolean result = FALSE; + /* Consider '_' as an delimiter to aid user in tracking it's usage. */ + const char *const alternateIdentifiers = "!%&$#+-<>=/?@\\~'^|*_"; + if (isalnum (c)) + result = TRUE; + else if (c != '\0' && strchr (alternateIdentifiers, c) != NULL) + result = TRUE; + return result; +} + +static const unsigned char *parseIdentifier ( + const unsigned char *cp, vString *const identifier) +{ + boolean stringLit = FALSE; + vStringClear (identifier); + while (*cp != '\0' && (!isIdentifier ((int) *cp) || stringLit)) + { + int oneback = *cp; + cp++; + if (oneback == '(' && *cp == '*' && stringLit == FALSE) + { + CommentLevel++; + return ++cp; + } + if (*cp == '"' && oneback != '\\') + { + stringLit = TRUE; + continue; + } + if (stringLit && *cp == '"' && oneback != '\\') + stringLit = FALSE; + } + if (strcmp ((const char *) cp, "") == 0 || cp == NULL) + return cp; + + while (isIdentifier ((int) *cp)) + { + vStringPut (identifier, (int) *cp); + cp++; + } + vStringTerminate (identifier); + return cp; +} + +static smlKind findNextIdentifier (const unsigned char **cp) +{ + smlKind result = K_NONE; + vString *const identifier = vStringNew (); + unsigned int count = sizeof (SmlKeywordTypes) / sizeof (SmlKeywordTypes [0]); + unsigned int i; + *cp = parseIdentifier (*cp, identifier); + for (i = 0 ; i < count && result == K_NONE ; ++i) + { + const char *id = vStringValue (identifier); + if (strcmp (id, SmlKeywordTypes [i].keyword) == 0) + result = SmlKeywordTypes [i].kind; + } + return result; +} + +static void findSmlTags (void) +{ + vString *const identifier = vStringNew (); + const unsigned char *line; + smlKind lastTag = K_NONE; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp = skipSpace (line); + do + { + smlKind foundTag; + if (CommentLevel != 0) + { + cp = (const unsigned char *) strstr ((const char *) cp, "*)"); + if (cp == NULL) + continue; + else + { + --CommentLevel; + cp += 2; + } + } + foundTag = findNextIdentifier (&cp); + if (foundTag != K_NONE) + { + cp = skipSpace (cp); + cp = parseIdentifier (cp, identifier); + if (foundTag == K_AND) + makeSmlTag (lastTag, identifier); + else + { + makeSmlTag (foundTag, identifier); + lastTag = foundTag; + } + } + if (strstr ((const char *) cp, "(*") != NULL) + { + cp += 2; + cp = (const unsigned char *) strstr ((const char *) cp, "*)"); + if (cp == NULL) + ++CommentLevel; + } + } while (cp != NULL && strcmp ((const char *) cp, "") != 0); + } + vStringDelete (identifier); +} + +extern parserDefinition *SmlParser (void) +{ + static const char *const extensions[] = { "sml", "sig", NULL }; + parserDefinition *def = parserNew ("SML"); + def->kinds = SmlKinds; + def->kindCount = KIND_COUNT (SmlKinds); + def->extensions = extensions; + def->parser = findSmlTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/sort.c b/sdk/ctags/sort.c new file mode 100644 index 0000000000..a77b551e74 --- /dev/null +++ b/sdk/ctags/sort.c @@ -0,0 +1,234 @@ +/* +* $Id: sort.c,v 1.5 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1996-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions to sort the tag entries. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#if defined (HAVE_STDLIB_H) +# include /* to declare malloc () */ +#endif +#include +#include + +#include "debug.h" +#include "entry.h" +#include "options.h" +#include "read.h" +#include "routines.h" +#include "sort.h" + +#ifdef TRAP_MEMORY_CALLS +# include "safe_malloc.h" +#endif + +/* +* FUNCTION DEFINITIONS +*/ + +extern void catFile (const char *const name) +{ + FILE *const fp = fopen (name, "r"); + + if (fp != NULL) + { + int c; + while ((c = getc (fp)) != EOF) + putchar (c); + fflush (stdout); + fclose (fp); + } +} + +#ifdef EXTERNAL_SORT + +#ifdef NON_CONST_PUTENV_PROTOTYPE +# define PE_CONST +#else +# define PE_CONST const +#endif + +extern void externalSortTags (const boolean toStdout) +{ + const char *const sortNormalCommand = "sort -u -o"; + const char *const sortFoldedCommand = "sort -u -f -o"; + const char *sortCommand = + Option.sorted == SO_FOLDSORTED ? sortFoldedCommand : sortNormalCommand; + PE_CONST char *const sortOrder1 = "LC_COLLATE=C"; + PE_CONST char *const sortOrder2 = "LC_ALL=C"; + const size_t length = 4 + strlen (sortOrder1) + strlen (sortOrder2) + + strlen (sortCommand) + (2 * strlen (tagFileName ())); + char *const cmd = (char *) malloc (length + 1); + int ret = -1; + + if (cmd != NULL) + { + /* Ensure ASCII value sort order. + */ +#ifdef HAVE_SETENV + setenv ("LC_COLLATE", "C", 1); + setenv ("LC_ALL", "C", 1); + sprintf (cmd, "%s %s %s", sortCommand, tagFileName (), tagFileName ()); +#else +# ifdef HAVE_PUTENV + putenv (sortOrder1); + putenv (sortOrder2); + sprintf (cmd, "%s %s %s", sortCommand, tagFileName (), tagFileName ()); +# else + sprintf (cmd, "%s %s %s %s %s", sortOrder1, sortOrder2, sortCommand, + tagFileName (), tagFileName ()); +# endif +#endif + verbose ("system (\"%s\")\n", cmd); + ret = system (cmd); + free (cmd); + + } + if (ret != 0) + error (FATAL | PERROR, "cannot sort tag file"); + else if (toStdout) + catFile (tagFileName ()); +} + +#else + +/* + * These functions provide a basic internal sort. No great memory + * optimization is performed (e.g. recursive subdivided sorts), + * so have lots of memory if you have large tag files. + */ + +static void failedSort (FILE *const fp, const char* msg) +{ + const char* const cannotSort = "cannot sort tag file"; + if (fp != NULL) + fclose (fp); + if (msg == NULL) + error (FATAL | PERROR, cannotSort); + else + error (FATAL, "%s: %s", msg, cannotSort); +} + +static int compareTagsFolded(const void *const one, const void *const two) +{ + const char *const line1 = *(const char* const*) one; + const char *const line2 = *(const char* const*) two; + + return struppercmp (line1, line2); +} + +static int compareTags (const void *const one, const void *const two) +{ + const char *const line1 = *(const char* const*) one; + const char *const line2 = *(const char* const*) two; + + return strcmp (line1, line2); +} + +static void writeSortedTags ( + char **const table, const size_t numTags, const boolean toStdout) +{ + FILE *fp; + size_t i; + + /* Write the sorted lines back into the tag file. + */ + if (toStdout) + fp = stdout; + else + { + fp = fopen (tagFileName (), "w"); + if (fp == NULL) + failedSort (fp, NULL); + } + for (i = 0 ; i < numTags ; ++i) + { + /* Here we filter out identical tag *lines* (including search + * pattern) if this is not an xref file. + */ + if (i == 0 || Option.xref || strcmp (table [i], table [i-1]) != 0) + if (fputs (table [i], fp) == EOF) + failedSort (fp, NULL); + } + if (toStdout) + fflush (fp); + else + fclose (fp); +} + +extern void internalSortTags (const boolean toStdout) +{ + vString *vLine = vStringNew (); + FILE *fp = NULL; + const char *line; + size_t i; + int (*cmpFunc)(const void *, const void *); + + /* Allocate a table of line pointers to be sorted. + */ + size_t numTags = TagFile.numTags.added + TagFile.numTags.prev; + const size_t tableSize = numTags * sizeof (char *); + char **const table = (char **) malloc (tableSize); /* line pointers */ + DebugStatement ( size_t mallocSize = tableSize; ) /* cumulative total */ + + + cmpFunc = Option.sorted == SO_FOLDSORTED ? compareTagsFolded : compareTags; + if (table == NULL) + failedSort (fp, "out of memory"); + + /* Open the tag file and place its lines into allocated buffers. + */ + fp = fopen (tagFileName (), "r"); + if (fp == NULL) + failedSort (fp, NULL); + for (i = 0 ; i < numTags && ! feof (fp) ; ) + { + line = readLine (vLine, fp); + if (line == NULL) + { + if (! feof (fp)) + failedSort (fp, NULL); + break; + } + else if (*line == '\0' || strcmp (line, "\n") == 0) + ; /* ignore blank lines */ + else + { + const size_t stringSize = strlen (line) + 1; + + table [i] = (char *) malloc (stringSize); + if (table [i] == NULL) + failedSort (fp, "out of memory"); + DebugStatement ( mallocSize += stringSize; ) + strcpy (table [i], line); + ++i; + } + } + numTags = i; + fclose (fp); + vStringDelete (vLine); + + /* Sort the lines. + */ + qsort (table, numTags, sizeof (*table), cmpFunc); + + writeSortedTags (table, numTags, toStdout); + + PrintStatus (("sort memory: %ld bytes\n", (long) mallocSize)); + for (i = 0 ; i < numTags ; ++i) + free (table [i]); + free (table); +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/sort.h b/sdk/ctags/sort.h new file mode 100644 index 0000000000..158b061f88 --- /dev/null +++ b/sdk/ctags/sort.h @@ -0,0 +1,32 @@ +/* +* $Id: sort.h,v 1.3 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* External interface to sort.c +*/ +#ifndef _SORT_H +#define _SORT_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +/* +* FUNCTION PROTOTYPES +*/ +extern void catFile (const char *const name); + +#ifdef EXTERNAL_SORT +extern void externalSortTags (const boolean toStdout); +#else +extern void internalSortTags (const boolean toStdout); +#endif + +#endif /* _SORT_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/source.mak b/sdk/ctags/source.mak new file mode 100644 index 0000000000..b4dee7c356 --- /dev/null +++ b/sdk/ctags/source.mak @@ -0,0 +1,103 @@ +# $Id: source.mak,v 1.15 2003/04/01 05:02:13 darren Exp $ +# +# Shared macros + +HEADERS = \ + args.h ctags.h debug.h entry.h general.h get.h keyword.h \ + main.h options.h parse.h parsers.h read.h routines.h sort.h \ + strlist.h vstring.h + +SOURCES = \ + args.c \ + asm.c \ + asp.c \ + awk.c \ + beta.c \ + c.c \ + cobol.c \ + eiffel.c \ + entry.c \ + erlang.c \ + fortran.c \ + get.c \ + html.c \ + jscript.c \ + keyword.c \ + lisp.c \ + lregex.c \ + lua.c \ + main.c \ + make.c \ + options.c \ + parse.c \ + pascal.c \ + perl.c \ + php.c \ + python.c \ + read.c \ + rexx.c \ + routines.c \ + ruby.c \ + scheme.c \ + sh.c \ + slang.c \ + sml.c \ + sort.c \ + sql.c \ + strlist.c \ + tcl.c \ + verilog.c \ + vim.c \ + yacc.c \ + vstring.c + +ENVIRONMENT_HEADERS = \ + e_amiga.h e_djgpp.h e_mac.h e_msoft.h e_os2.h e_qdos.h e_riscos.h e_vms.h + +ENVIRONMENT_SOURCES = \ + argproc.c mac.c qdos.c + +OBJECTS = \ + args.$(OBJEXT) \ + asm.$(OBJEXT) \ + asp.$(OBJEXT) \ + awk.$(OBJEXT) \ + beta.$(OBJEXT) \ + c.$(OBJEXT) \ + cobol.$(OBJEXT) \ + eiffel.$(OBJEXT) \ + entry.$(OBJEXT) \ + erlang.$(OBJEXT) \ + fortran.$(OBJEXT) \ + get.$(OBJEXT) \ + html.$(OBJEXT) \ + jscript.$(OBJEXT) \ + keyword.$(OBJEXT) \ + lisp.$(OBJEXT) \ + lregex.$(OBJEXT) \ + lua.$(OBJEXT) \ + main.$(OBJEXT) \ + make.$(OBJEXT) \ + options.$(OBJEXT) \ + parse.$(OBJEXT) \ + pascal.$(OBJEXT) \ + perl.$(OBJEXT) \ + php.$(OBJEXT) \ + python.$(OBJEXT) \ + read.$(OBJEXT) \ + rexx.$(OBJEXT) \ + routines.$(OBJEXT) \ + ruby.$(OBJEXT) \ + scheme.$(OBJEXT) \ + sh.$(OBJEXT) \ + slang.$(OBJEXT) \ + sml.$(OBJEXT) \ + sort.$(OBJEXT) \ + sql.$(OBJEXT) \ + strlist.$(OBJEXT) \ + tcl.$(OBJEXT) \ + verilog.$(OBJEXT) \ + vim.$(OBJEXT) \ + yacc.$(OBJEXT) \ + vstring.$(OBJEXT) + diff --git a/sdk/ctags/sql.c b/sdk/ctags/sql.c new file mode 100644 index 0000000000..4f353c9896 --- /dev/null +++ b/sdk/ctags/sql.c @@ -0,0 +1,687 @@ +/* +* $Id: sql.c,v 1.12 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2002-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for PL/SQL language +* files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include /* to define isalpha () */ +#include + +#include "debug.h" +#include "entry.h" +#include "keyword.h" +#include "parse.h" +#include "read.h" +#include "routines.h" +#include "vstring.h" + +/* +* On-line PL/SQL Reference Guide: +* http://info-it.umsystem.edu/oradocs/doc/server/doc/PLS23/toc.htm +* +* Sample PL/SQL code is available from: +* http://www.orafaq.com/faqscrpt.htm#GENPLSQL +*/ + +/* +* MACROS +*/ +#define isType(token,t) (boolean) ((token)->type == (t)) +#define isKeyword(token,k) (boolean) ((token)->keyword == (k)) + +/* +* DATA DECLARATIONS +*/ + +typedef enum eException { ExceptionNone, ExceptionEOF } exception_t; + +/* Used to specify type of keyword. + */ +typedef enum eKeywordId { + KEYWORD_NONE = -1, + KEYWORD_is, + KEYWORD_begin, + KEYWORD_body, + KEYWORD_cursor, + KEYWORD_declare, + KEYWORD_end, + KEYWORD_function, + KEYWORD_if, + KEYWORD_loop, + KEYWORD_package, + KEYWORD_pragma, + KEYWORD_procedure, + KEYWORD_record, + KEYWORD_ref, + KEYWORD_rem, + KEYWORD_return, + KEYWORD_subtype, + KEYWORD_table, + KEYWORD_trigger, + KEYWORD_type +} keywordId; + +/* Used to determine whether keyword is valid for the token language and + * what its ID is. + */ +typedef struct sKeywordDesc { + const char *name; + keywordId id; +} keywordDesc; + +typedef enum eTokenType { + TOKEN_UNDEFINED, + TOKEN_BLOCK_LABEL_BEGIN, + TOKEN_BLOCK_LABEL_END, + TOKEN_CHARACTER, + TOKEN_CLOSE_PAREN, + TOKEN_SEMICOLON, + TOKEN_COMMA, + TOKEN_IDENTIFIER, + TOKEN_KEYWORD, + TOKEN_OPEN_PAREN, + TOKEN_OPERATOR, + TOKEN_OTHER, + TOKEN_STRING +} tokenType; + +typedef struct sTokenInfo { + tokenType type; + keywordId keyword; + vString* string; + unsigned long lineNumber; + fpos_t filePosition; +} tokenInfo; + +/* +* DATA DEFINITIONS +*/ + +static langType Lang_sql; + +static jmp_buf Exception; + +typedef enum { + SQLTAG_CURSOR, + SQLTAG_PROTOTYPE, + SQLTAG_FUNCTION, + SQLTAG_FIELD, + SQLTAG_LOCAL_VARIABLE, + SQLTAG_BLOCK_LABEL, + SQLTAG_PACKAGE, + SQLTAG_PROCEDURE, + SQLTAG_RECORD, + SQLTAG_SUBTYPE, + SQLTAG_TABLE, + SQLTAG_TRIGGER, + SQLTAG_VARIABLE, + SQLTAG_COUNT +} sqlKind; + +static kindOption SqlKinds [] = { + { TRUE, 'c', "cursor", "cursors" }, + { FALSE, 'd', "prototype", "prototypes" }, + { TRUE, 'f', "function", "functions" }, + { TRUE, 'F', "field", "record fields" }, + { FALSE, 'l', "local", "local variables" }, + { TRUE, 'L', "label", "block label" }, + { TRUE, 'P', "package", "packages" }, + { TRUE, 'p', "procedure", "procedures" }, + { TRUE, 'r', "record", "records" }, + { TRUE, 's', "subtype", "subtypes" }, + { TRUE, 't', "table", "tables" }, + { TRUE, 'T', "trigger", "triggers" }, + { TRUE, 'v', "variable", "variables" }, +}; + +static const keywordDesc SqlKeywordTable [] = { + /* keyword keyword ID */ + { "as", KEYWORD_is }, + { "begin", KEYWORD_begin }, + { "body", KEYWORD_body }, + { "cursor", KEYWORD_cursor }, + { "declare", KEYWORD_declare }, + { "end", KEYWORD_end }, + { "function", KEYWORD_function }, + { "if", KEYWORD_if }, + { "is", KEYWORD_is }, + { "loop", KEYWORD_loop }, + { "package", KEYWORD_package }, + { "pragma", KEYWORD_pragma }, + { "procedure", KEYWORD_procedure }, + { "record", KEYWORD_record }, + { "ref", KEYWORD_ref }, + { "rem", KEYWORD_rem }, + { "return", KEYWORD_return }, + { "subtype", KEYWORD_subtype }, + { "table", KEYWORD_table }, + { "trigger", KEYWORD_trigger }, + { "type", KEYWORD_type } +}; + +/* +* FUNCTION DECLARATIONS +*/ + +static void parseBlock (tokenInfo *const token, const boolean local); + +/* +* FUNCTION DEFINITIONS +*/ + +static boolean isIdentChar1 (const int c) +{ + return (boolean) isalpha (c); +} + +static boolean isIdentChar (const int c) +{ + return (boolean) + (isalpha (c) || isdigit (c) || c == '$' || c == '_' || c == '#'); +} + +static void buildSqlKeywordHash (void) +{ + const size_t count = sizeof (SqlKeywordTable) / + sizeof (SqlKeywordTable [0]); + size_t i; + for (i = 0 ; i < count ; ++i) + { + const keywordDesc* const p = &SqlKeywordTable [i]; + addKeyword (p->name, Lang_sql, (int) p->id); + } +} + +static tokenInfo *newToken (void) +{ + tokenInfo *const token = xMalloc (1, tokenInfo); + + token->type = TOKEN_UNDEFINED; + token->keyword = KEYWORD_NONE; + token->string = vStringNew (); + + return token; +} + +static void deleteToken (tokenInfo *const token) +{ + vStringDelete (token->string); + eFree (token); +} + +/* +* Tag generation functions +*/ + +static void makeSqlTag (tokenInfo *const token, const sqlKind kind) +{ + if (SqlKinds [kind].enabled) + { + const char *const name = vStringValue (token->string); + tagEntryInfo e; + initTagEntry (&e, name); + + e.lineNumber = token->lineNumber; + e.filePosition = token->filePosition; + e.kindName = SqlKinds [kind].name; + e.kind = SqlKinds [kind].letter; + + makeTagEntry (&e); + } +} + +/* +* Parsing functions +*/ + +static int skipToCharacter (const int c) +{ + int d; + do + { + d = fileGetc (); + } while (d != EOF && d != c); + return d; +} + +static void parseString (vString *const string, const int delimiter) +{ + boolean end = FALSE; + int c; + while (! end) + { + c = fileGetc (); + if (c == EOF) + end = TRUE; + else if (c == delimiter) + end = TRUE; + else + vStringPut (string, c); + } + vStringTerminate (string); +} + +/* Read a C identifier beginning with "firstChar" and places it into "name". + */ +static void parseIdentifier (vString *const string, const int firstChar) +{ + int c = firstChar; + Assert (isIdentChar1 (c)); + do + { + vStringPut (string, c); + c = fileGetc (); + } while (isIdentChar (c)); + vStringTerminate (string); + if (!isspace (c)) + fileUngetc (c); /* unget non-identifier character */ +} + +static keywordId analyzeToken (vString *const name) +{ + static vString *keyword = NULL; + if (keyword == NULL) + keyword = vStringNew (); + vStringCopyToLower (keyword, name); + return (keywordId) lookupKeyword (vStringValue (keyword), Lang_sql); +} + +static void readToken (tokenInfo *const token) +{ + int c; + + token->type = TOKEN_UNDEFINED; + token->keyword = KEYWORD_NONE; + vStringClear (token->string); + +getNextChar: + do + c = fileGetc (); + while (c == '\t' || c == ' ' || c == '\n'); + + switch (c) + { + case EOF: longjmp (Exception, (int)ExceptionEOF); break; + case '(': token->type = TOKEN_OPEN_PAREN; break; + case ')': token->type = TOKEN_CLOSE_PAREN; break; + case ';': token->type = TOKEN_SEMICOLON; break; + case ',': token->type = TOKEN_COMMA; break; + + case '\'': + case '"': + token->type = TOKEN_STRING; + parseString (token->string, c); + break; + + case '-': + c = fileGetc (); + if (c == '-') /* is this the start of a comment? */ + { + skipToCharacter ('\n'); + goto getNextChar; + } + else + { + if (!isspace (c)) + fileUngetc (c); + token->type = TOKEN_OPERATOR; + } + break; + + case '<': + case '>': + { + const int initial = c; + int d = fileGetc (); + if (d == initial) + { + if (initial == '<') + token->type = TOKEN_BLOCK_LABEL_BEGIN; + else + token->type = TOKEN_BLOCK_LABEL_END; + } + else + { + fileUngetc (d); + token->type = TOKEN_UNDEFINED; + } + break; + } + + case '/': + { + int d = fileGetc (); + if (d != '*') /* is this the start of a comment? */ + fileUngetc (d); + else + { + do + { + skipToCharacter ('*'); + c = fileGetc (); + if (c == '/') + break; + else + fileUngetc (c); + } while (c != '\0'); + goto getNextChar; + } + break; + } + + default: + if (! isIdentChar1 (c)) + token->type = TOKEN_UNDEFINED; + else + { + parseIdentifier (token->string, c); + token->lineNumber = getSourceLineNumber (); + token->filePosition = getInputFilePosition (); + token->keyword = analyzeToken (token->string); + if (isKeyword (token, KEYWORD_rem)) + { + vStringClear (token->string); + skipToCharacter ('\n'); + goto getNextChar; + } + else if (isKeyword (token, KEYWORD_NONE)) + token->type = TOKEN_IDENTIFIER; + else + token->type = TOKEN_KEYWORD; + } + break; + } +} + +/* +* Scanning functions +*/ + +static void findToken (tokenInfo *const token, const tokenType type) +{ + while (! isType (token, type)) + readToken (token); +} + +static void skipArgumentList (tokenInfo *const token) +{ + if (isType (token, TOKEN_OPEN_PAREN)) /* arguments? */ + { + findToken (token, TOKEN_CLOSE_PAREN); + readToken (token); + } +} + +static void parseSubProgram (tokenInfo *const token) +{ + tokenInfo *const name = newToken (); + const sqlKind kind = isKeyword (token, KEYWORD_function) ? + SQLTAG_FUNCTION : SQLTAG_PROCEDURE; + Assert (isKeyword (token, KEYWORD_function) || + isKeyword (token, KEYWORD_procedure)); + readToken (name); + readToken (token); + skipArgumentList (token); + if (isKeyword (token, KEYWORD_return)) + { + do + readToken (token); /* read return type */ + while (!(isKeyword (token, KEYWORD_is) || + isType (token, TOKEN_SEMICOLON))); + } + if (isKeyword (token, KEYWORD_is)) + { + if (isType (name, TOKEN_IDENTIFIER)) + makeSqlTag (name, kind); + readToken (token); + parseBlock (token, TRUE); + } + else if (isType (token, TOKEN_SEMICOLON)) + makeSqlTag (name, SQLTAG_PROTOTYPE); + deleteToken (name); +} + +static void parseRecord (tokenInfo *const token) +{ + Assert (isType (token, TOKEN_OPEN_PAREN)); + do + { + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeSqlTag (token, SQLTAG_FIELD); + while (!(isType (token, TOKEN_COMMA) || + isType (token, TOKEN_CLOSE_PAREN))) + readToken (token); + } while (! isType (token, TOKEN_CLOSE_PAREN)); +} + +static void parseType (tokenInfo *const token) +{ + tokenInfo *const name = newToken (); + readToken (name); + if (isType (name, TOKEN_IDENTIFIER)) + { + readToken (token); + if (isKeyword (token, KEYWORD_is)) + { + readToken (token); + switch (token->keyword) + { + case KEYWORD_record: + makeSqlTag (name, SQLTAG_RECORD); + parseRecord (token); + break; + + case KEYWORD_table: + makeSqlTag (name, SQLTAG_TABLE); + break; + + case KEYWORD_ref: + readToken (token); + if (isKeyword (token, KEYWORD_cursor)) + makeSqlTag (name, SQLTAG_CURSOR); + break; + + default: break; + } + } + } + deleteToken (name); +} + +static void parseSimple (tokenInfo *const token, const sqlKind kind) +{ + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + makeSqlTag (token, kind); +} + +static void parseDeclare (tokenInfo *const token, const boolean local) +{ + if (isKeyword (token, KEYWORD_declare)) + readToken (token); + while (! isKeyword (token, KEYWORD_begin) && ! isKeyword (token, KEYWORD_end)) + { + switch (token->keyword) + { + case KEYWORD_cursor: parseSimple (token, SQLTAG_CURSOR); break; + case KEYWORD_function: parseSubProgram (token); break; + case KEYWORD_procedure: parseSubProgram (token); break; + case KEYWORD_subtype: parseSimple (token, SQLTAG_SUBTYPE); break; + case KEYWORD_trigger: parseSimple (token, SQLTAG_TRIGGER); break; + case KEYWORD_type: parseType (token); break; + + default: + if (isType (token, TOKEN_IDENTIFIER)) + { + if (local) + makeSqlTag (token, SQLTAG_LOCAL_VARIABLE); + else + makeSqlTag (token, SQLTAG_VARIABLE); + } + break; + } + findToken (token, TOKEN_SEMICOLON); + readToken (token); + } +} + +static void parseLabel (tokenInfo *const token) +{ + Assert (isType (token, TOKEN_BLOCK_LABEL_BEGIN)); + readToken (token); + if (isType (token, TOKEN_IDENTIFIER)) + { + makeSqlTag (token, SQLTAG_BLOCK_LABEL); + readToken (token); /* read end of label */ + } +} + +static void parseStatements (tokenInfo *const token) +{ + do + { + if (isType (token, TOKEN_BLOCK_LABEL_BEGIN)) + parseLabel (token); + else + { + switch (token->keyword) + { + case KEYWORD_if: + case KEYWORD_loop: + readToken (token); + parseStatements (token); + break; + + case KEYWORD_declare: + case KEYWORD_begin: + parseBlock (token, TRUE); + break; + + default: + readToken (token); + break; + } + findToken (token, TOKEN_SEMICOLON); + } + readToken (token); + } while (! isKeyword (token, KEYWORD_end)); +} + +static void parseBlock (tokenInfo *const token, const boolean local) +{ + if (isType (token, TOKEN_BLOCK_LABEL_BEGIN)) + { + parseLabel (token); + readToken (token); + } + if (! isKeyword (token, KEYWORD_begin)) + parseDeclare (token, local); + if (isKeyword (token, KEYWORD_begin)) + { + readToken (token); + while (! isKeyword (token, KEYWORD_end)) + parseStatements (token); + findToken (token, TOKEN_SEMICOLON); + } +} + +static void parsePackage (tokenInfo *const token) +{ + tokenInfo *const name = newToken (); + readToken (name); + if (isKeyword (name, KEYWORD_body)) + readToken (name); + readToken (token); + if (isKeyword (token, KEYWORD_is)) + { + if (isType (name, TOKEN_IDENTIFIER)) + makeSqlTag (name, SQLTAG_PACKAGE); + readToken (token); + parseBlock (token, FALSE); + } + findToken (token, TOKEN_SEMICOLON); + deleteToken (name); +} + +static void parseTable (tokenInfo *const token) +{ + tokenInfo *const name = newToken (); + readToken (name); + readToken (token); + if (isType (token, TOKEN_OPEN_PAREN)) + { + if (isType (name, TOKEN_IDENTIFIER)) + { + makeSqlTag (name, SQLTAG_TABLE); + parseRecord (token); + } + } + findToken (token, TOKEN_SEMICOLON); + deleteToken (name); +} + +static void parseSqlFile (tokenInfo *const token) +{ + do + { + readToken (token); + if (isType (token, TOKEN_BLOCK_LABEL_BEGIN)) + parseLabel (token); + else switch (token->keyword) + { + case KEYWORD_begin: parseBlock (token, FALSE); break; + case KEYWORD_cursor: parseSimple (token, SQLTAG_CURSOR); break; + case KEYWORD_declare: parseBlock (token, FALSE); break; + case KEYWORD_function: parseSubProgram (token); break; + case KEYWORD_package: parsePackage (token); break; + case KEYWORD_procedure: parseSubProgram (token); break; + case KEYWORD_subtype: parseSimple (token, SQLTAG_SUBTYPE); break; + case KEYWORD_table: parseTable (token); break; + case KEYWORD_trigger: parseSimple (token, SQLTAG_TRIGGER); break; + case KEYWORD_type: parseType (token); break; + default: break; + } + } while (! isKeyword (token, KEYWORD_end)); +} + +static void initialize (const langType language) +{ + Assert (sizeof (SqlKinds) / sizeof (SqlKinds [0]) == SQLTAG_COUNT); + Lang_sql = language; + buildSqlKeywordHash (); +} + +static void findSqlTags (void) +{ + tokenInfo *const token = newToken (); + exception_t exception = (exception_t) (setjmp (Exception)); + while (exception == ExceptionNone) + parseSqlFile (token); + deleteToken (token); +} + +extern parserDefinition* SqlParser (void) +{ + static const char *const extensions [] = { "sql", NULL }; + parserDefinition* def = parserNew ("SQL"); + def->kinds = SqlKinds; + def->kindCount = KIND_COUNT (SqlKinds); + def->extensions = extensions; + def->parser = findSqlTags; + def->initialize = initialize; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/strlist.c b/sdk/ctags/strlist.c new file mode 100644 index 0000000000..ec5910b35b --- /dev/null +++ b/sdk/ctags/strlist.c @@ -0,0 +1,281 @@ +/* +* $Id: strlist.c,v 1.8 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1999-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions managing resizable string lists. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#ifdef HAVE_FNMATCH_H +# include +#endif + +#include "debug.h" +#include "read.h" +#include "routines.h" +#include "strlist.h" + +/* +* FUNCTION DEFINITIONS +*/ + +extern stringList *stringListNew (void) +{ + stringList* const result = xMalloc (1, stringList); + result->max = 0; + result->count = 0; + result->list = NULL; + return result; +} + +extern void stringListAdd (stringList *const current, vString *string) +{ + enum { incrementalIncrease = 10 }; + Assert (current != NULL); + if (current->list == NULL) + { + Assert (current->max == 0); + current->count = 0; + current->max = incrementalIncrease; + current->list = xMalloc (current->max, vString*); + } + else if (current->count == current->max) + { + current->max += incrementalIncrease; + current->list = xRealloc (current->list, current->max, vString*); + } + current->list [current->count++] = string; +} + +extern void stringListRemoveLast (stringList *const current) +{ + Assert (current != NULL); + Assert (current->count > 0); + --current->count; + current->list [current->count] = NULL; +} + +/* Combine list `from' into `current', deleting `from' */ +extern void stringListCombine ( + stringList *const current, stringList *const from) +{ + unsigned int i; + Assert (current != NULL); + Assert (from != NULL); + for (i = 0 ; i < from->count ; ++i) + { + stringListAdd (current, from->list [i]); + from->list [i] = NULL; + } + stringListDelete (from); +} + +extern stringList* stringListNewFromArgv (const char* const* const argv) +{ + stringList* const result = stringListNew (); + const char *const *p; + Assert (argv != NULL); + for (p = argv ; *p != NULL ; ++p) + stringListAdd (result, vStringNewInit (*p)); + return result; +} + +extern stringList* stringListNewFromFile (const char* const fileName) +{ + stringList* result = NULL; + FILE* const fp = fopen (fileName, "r"); + if (fp != NULL) + { + result = stringListNew (); + while (! feof (fp)) + { + vString* const str = vStringNew (); + readLine (str, fp); + vStringStripTrailing (str); + if (vStringLength (str) > 0) + stringListAdd (result, str); + else + vStringDelete (str); + } + } + return result; +} + +extern unsigned int stringListCount (const stringList *const current) +{ + Assert (current != NULL); + return current->count; +} + +extern vString* stringListItem ( + const stringList *const current, const unsigned int indx) +{ + Assert (current != NULL); + return current->list [indx]; +} + +extern vString* stringListLast (const stringList *const current) +{ + Assert (current != NULL); + Assert (current->count > 0); + return current->list [current->count - 1]; +} + +extern void stringListClear (stringList *const current) +{ + unsigned int i; + Assert (current != NULL); + for (i = 0 ; i < current->count ; ++i) + { + vStringDelete (current->list [i]); + current->list [i] = NULL; + } + current->count = 0; +} + +extern void stringListDelete (stringList *const current) +{ + if (current != NULL) + { + if (current->list != NULL) + { + stringListClear (current); + eFree (current->list); + current->list = NULL; + } + current->max = 0; + current->count = 0; + eFree (current); + } +} + +static boolean compareString ( + const char *const string, vString *const itm) +{ + return (boolean) (strcmp (string, vStringValue (itm)) == 0); +} + +static boolean compareStringInsensitive ( + const char *const string, vString *const itm) +{ + return (boolean) (strcasecmp (string, vStringValue (itm)) == 0); +} + +static int stringListIndex ( + const stringList *const current, + const char *const string, + boolean (*test)(const char *s, vString *const vs)) +{ + int result = -1; + unsigned int i; + Assert (current != NULL); + Assert (string != NULL); + Assert (test != NULL); + for (i = 0 ; result == -1 && i < current->count ; ++i) + if ((*test)(string, current->list [i])) + result = i; + return result; +} + +extern boolean stringListHas ( + const stringList *const current, const char *const string) +{ + boolean result = FALSE; + Assert (current != NULL); + result = stringListIndex (current, string, compareString) != -1; + return result; +} + +extern boolean stringListHasInsensitive ( + const stringList *const current, const char *const string) +{ + boolean result = FALSE; + Assert (current != NULL); + Assert (string != NULL); + result = stringListIndex (current, string, compareStringInsensitive) != -1; + return result; +} + +extern boolean stringListHasTest ( + const stringList *const current, boolean (*test)(const char *s)) +{ + boolean result = FALSE; + unsigned int i; + Assert (current != NULL); + for (i = 0 ; ! result && i < current->count ; ++i) + result = (*test)(vStringValue (current->list [i])); + return result; +} + +extern boolean stringListRemoveExtension ( + stringList* const current, const char* const extension) +{ + boolean result = FALSE; + int where; +#ifdef CASE_INSENSITIVE_FILENAMES + where = stringListIndex (current, extension, compareStringInsensitive); +#else + where = stringListIndex (current, extension, compareString); +#endif + if (where != -1) + { + memmove (current->list + where, current->list + where + 1, + (current->count - where) * sizeof (*current->list)); + current->list [current->count - 1] = NULL; + --current->count; + result = TRUE; + } + return result; +} + +extern boolean stringListExtensionMatched ( + const stringList* const current, const char* const extension) +{ +#ifdef CASE_INSENSITIVE_FILENAMES + return stringListHasInsensitive (current, extension); +#else + return stringListHas (current, extension); +#endif +} + +static boolean fileNameMatched ( + const vString* const vpattern, const char* const fileName) +{ + const char* const pattern = vStringValue (vpattern); +#if defined (HAVE_FNMATCH) + return (boolean) (fnmatch (pattern, fileName, 0) == 0); +#elif defined (CASE_INSENSITIVE_FILENAMES) + return (boolean) (strcasecmp (pattern, fileName) == 0); +#else + return (boolean) (strcmp (pattern, fileName) == 0); +#endif +} + +extern boolean stringListFileMatched ( + const stringList* const current, const char* const fileName) +{ + boolean result = FALSE; + unsigned int i; + for (i = 0 ; ! result && i < stringListCount (current) ; ++i) + result = fileNameMatched (stringListItem (current, i), fileName); + return result; +} + +extern void stringListPrint (const stringList *const current) +{ + unsigned int i; + Assert (current != NULL); + for (i = 0 ; i < current->count ; ++i) + printf ("%s%s", (i > 0) ? ", " : "", vStringValue (current->list [i])); +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/strlist.h b/sdk/ctags/strlist.h new file mode 100644 index 0000000000..0740ec0225 --- /dev/null +++ b/sdk/ctags/strlist.h @@ -0,0 +1,54 @@ +/* +* $Id: strlist.h,v 1.7 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1999-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Defines external interface to resizable string lists. +*/ +#ifndef _STRLIST_H +#define _STRLIST_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include "vstring.h" + +/* +* DATA DECLARATIONS +*/ +typedef struct sStringList { + unsigned int max; + unsigned int count; + vString **list; +} stringList; + +/* +* FUNCTION PROTOTYPES +*/ +extern stringList *stringListNew (void); +extern void stringListAdd (stringList *const current, vString *string); +extern void stringListRemoveLast (stringList *const current); +extern void stringListCombine (stringList *const current, stringList *const from); +extern stringList* stringListNewFromArgv (const char* const* const list); +extern stringList* stringListNewFromFile (const char* const fileName); +extern void stringListClear (stringList *const current); +extern unsigned int stringListCount (const stringList *const current); +extern vString* stringListItem (const stringList *const current, const unsigned int indx); +extern vString* stringListLast (const stringList *const current); +extern void stringListDelete (stringList *const current); +extern boolean stringListHasInsensitive (const stringList *const current, const char *const string); +extern boolean stringListHas (const stringList *const current, const char *const string); +extern boolean stringListHasTest (const stringList *const current, boolean (*test)(const char *s)); +extern boolean stringListRemoveExtension (stringList* const current, const char* const extension); +extern boolean stringListExtensionMatched (const stringList* const list, const char* const extension); +extern boolean stringListFileMatched (const stringList* const list, const char* const str); +extern void stringListPrint (const stringList *const current); + +#endif /* _STRLIST_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/tcl.c b/sdk/ctags/tcl.c new file mode 100644 index 0000000000..89e86a7867 --- /dev/null +++ b/sdk/ctags/tcl.c @@ -0,0 +1,116 @@ +/* +* $Id: tcl.c,v 1.8 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for TCL scripts. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_CLASS, K_METHOD, K_PROCEDURE +} tclKind; + +static kindOption TclKinds [] = { + { TRUE, 'c', "class", "classes" }, + { TRUE, 'm', "method", "methods" }, + { TRUE, 'p', "procedure", "procedures" } +}; + +/* +* FUNCTION DEFINITIONS +*/ + +static const unsigned char *makeTclTag ( + const unsigned char *cp, + vString *const name, + const tclKind kind) +{ + vStringClear (name); + while ((int) *cp != '\0' && ! isspace ((int) *cp)) + { + vStringPut (name, (int) *cp); + ++cp; + } + vStringTerminate (name); + makeSimpleTag (name, TclKinds, kind); + return cp; +} + +static boolean match (const unsigned char *line, const char *word) +{ + return (boolean) (strncmp ((const char*) line, word, strlen (word)) == 0); +} + +static void findTclTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + + while ((line = fileReadLine ()) != NULL) + { + const unsigned char *cp; + + while (isspace (line [0])) + ++line; + + if (line [0] == '\0' || line [0] == '#') + continue; + + /* read first word */ + for (cp = line ; *cp != '\0' && ! isspace ((int) *cp) ; ++cp) + ; + if (! isspace ((int) *cp)) + continue; + while (isspace ((int) *cp)) + ++cp; + /* Now `line' points at first word and `cp' points at next word */ + + if (match (line, "proc")) + cp = makeTclTag (cp, name, K_PROCEDURE); + else if (match (line, "class") || match (line, "itcl::class")) + cp = makeTclTag (cp, name, K_CLASS); + else if (match (line, "public") || + match (line, "protected") || + match (line, "private")) + { + if (match (cp, "method")) + { + cp += 6; + while (isspace ((int) *cp)) + ++cp; + cp = makeTclTag (cp, name, K_METHOD); + } + } + } + vStringDelete (name); +} + +extern parserDefinition* TclParser (void) +{ + static const char *const extensions [] = { "tcl", "tk", "wish", "itcl", NULL }; + parserDefinition* def = parserNew ("Tcl"); + def->kinds = TclKinds; + def->kindCount = KIND_COUNT (TclKinds); + def->extensions = extensions; + def->parser = findTclTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/verilog.c b/sdk/ctags/verilog.c new file mode 100644 index 0000000000..257dcba3ff --- /dev/null +++ b/sdk/ctags/verilog.c @@ -0,0 +1,335 @@ +/* +* $Id: verilog.c,v 1.4 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for the Verilog HDL +* (Hardware Description Language). +* +* Language definition documents: +* http://www.eg.bucknell.edu/~cs320/1995-fall/verilog-manual.html +* http://www.sutherland-hdl.com/on-line_ref_guide/vlog_ref_top.html +* http://home.europa.com/~celiac/VerilogBNF.html +* http://eesun.free.fr/DOC/VERILOG/verilog_manual1.html +*/ + +/* + * INCLUDE FILES + */ +#include "general.h" /* must always come first */ + +#include +#include + +#include "debug.h" +#include "keyword.h" +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* + * DATA DECLARATIONS + */ +typedef enum eException { ExceptionNone, ExceptionEOF } exception_t; + +typedef enum { + K_UNDEFINED = -1, + K_CONSTANT, + K_EVENT, + K_FUNCTION, + K_MODULE, + K_NET, + K_PORT, + K_REGISTER, + K_TASK +} verilogKind; + +typedef struct { + const char *keyword; + verilogKind kind; +} keywordAssoc; + +/* + * DATA DEFINITIONS + */ +static int Ungetc; +static int Lang_verilog; +static jmp_buf Exception; + +static kindOption VerilogKinds [] = { + { TRUE, 'c', "constant", "constants (define, parameter, specparam)" }, + { TRUE, 'e', "event", "events" }, + { TRUE, 'f', "function", "functions" }, + { TRUE, 'm', "module", "modules" }, + { TRUE, 'n', "net", "net data types" }, + { TRUE, 'p', "port", "ports" }, + { TRUE, 'r', "register", "register data types" }, + { TRUE, 't', "task", "tasks" } +}; + +static keywordAssoc VerilogKeywordTable [] = { + { "`define", K_CONSTANT }, + { "event", K_EVENT }, + { "function", K_FUNCTION }, + { "inout", K_PORT }, + { "input", K_PORT }, + { "integer", K_REGISTER }, + { "module", K_MODULE }, + { "output", K_PORT }, + { "parameter", K_CONSTANT }, + { "real", K_REGISTER }, + { "realtime", K_REGISTER }, + { "reg", K_REGISTER }, + { "specparam", K_CONSTANT }, + { "supply0", K_NET }, + { "supply1", K_NET }, + { "task", K_TASK }, + { "time", K_REGISTER }, + { "tri0", K_NET }, + { "tri1", K_NET }, + { "triand", K_NET }, + { "tri", K_NET }, + { "trior", K_NET }, + { "trireg", K_NET }, + { "wand", K_NET }, + { "wire", K_NET }, + { "wor", K_NET } +}; + +/* + * FUNCTION DEFINITIONS + */ + +static void initialize (const langType language) +{ + size_t i; + const size_t count = + sizeof (VerilogKeywordTable) / sizeof (VerilogKeywordTable [0]); + Lang_verilog = language; + for (i = 0 ; i < count ; ++i) + { + const keywordAssoc* const p = &VerilogKeywordTable [i]; + addKeyword (p->keyword, language, (int) p->kind); + } +} + +static void vUngetc (int c) +{ + Assert (Ungetc == '\0'); + Ungetc = c; +} + +static int vGetc (void) +{ + int c; + if (Ungetc == '\0') + c = fileGetc (); + else + { + c = Ungetc; + Ungetc = '\0'; + } + if (c == '/') + { + int c2 = fileGetc (); + if (c2 == EOF) + longjmp (Exception, (int) ExceptionEOF); + else if (c2 == '/') /* strip comment until end-of-line */ + { + do + c = fileGetc (); + while (c != '\n' && c != EOF); + } + else if (c2 == '*') /* strip block comment */ + { + do + { + do + c = fileGetc (); + while (c != '*' && c != EOF); + if (c != EOF) + c = fileGetc (); + } while (c != '/' && c != EOF); + if (c != EOF) + c = ' '; /* comment equivalent to white space */ + } + else + Ungetc = c2; + } + else if (c == '"') /* strip string contents */ + { + int c2; + do + c2 = fileGetc (); + while (c2 != '"' && c2 != EOF); + c = '@'; + } + if (c == EOF) + longjmp (Exception, (int) ExceptionEOF); + return c; +} + +static boolean isIdentifierCharacter (const int c) +{ + return (boolean)(isalnum (c) || c == '_' || c == '`'); +} + +static int skipWhite (int c) +{ + while (isspace (c)) + c = vGetc (); + return c; +} + +static int skipPastMatch (const char *const pair) +{ + const int begin = pair [0], end = pair [1]; + int matchLevel = 1; + int c; + do + { + c = vGetc (); + if (c == begin) + ++matchLevel; + else if (c == end) + --matchLevel; + } + while (matchLevel > 0); + return vGetc (); +} + +static boolean readIdentifier (vString *const name, int c) +{ + vStringClear (name); + if (isIdentifierCharacter (c)) + { + while (isIdentifierCharacter (c)) + { + vStringPut (name, c); + c = vGetc (); + } + vUngetc (c); + vStringTerminate (name); + } + return (boolean)(name->length > 0); +} + +static void tagNameList (const verilogKind kind, int c) +{ + vString *name = vStringNew (); + boolean repeat; + Assert (isIdentifierCharacter (c)); + do + { + repeat = FALSE; + if (isIdentifierCharacter (c)) + { + readIdentifier (name, c); + makeSimpleTag (name, VerilogKinds, kind); + } + else + break; + c = skipWhite (vGetc ()); + if (c == '[') + c = skipPastMatch ("[]"); + c = skipWhite (c); + if (c == '=') + { + if (c == '{') + skipPastMatch ("{}"); + else + { + do + c = vGetc (); + while (c != ',' && c != ';'); + } + } + if (c == ',') + { + c = skipWhite (vGetc ()); + repeat = TRUE; + } + else + repeat = FALSE; + } while (repeat); + vStringDelete (name); + vUngetc (c); +} + +static void findTag (vString *const name) +{ + const verilogKind kind = (verilogKind) + lookupKeyword (vStringValue (name), Lang_verilog); + if (kind != K_UNDEFINED) + { + int c = skipWhite (vGetc ()); + + /* Many keywords can have bit width. + * reg [3:0] net_name; + * inout [(`DBUSWIDTH-1):0] databus; + */ + if (c == '(') + c = skipPastMatch ("()"); + c = skipWhite (c); + if (c == '[') + c = skipPastMatch ("[]"); + c = skipWhite (c); + if (c == '#') + { + c = vGetc (); + if (c == '(') + c = skipPastMatch ("()"); + } + c = skipWhite (c); + if (isIdentifierCharacter (c)) + tagNameList (kind, c); + } +} + +static void findVerilogTags (void) +{ + vString *const name = vStringNew (); + volatile boolean newStatement = TRUE; + volatile int c = '\0'; + exception_t exception = (exception_t) setjmp (Exception); + + if (exception == ExceptionNone) while (c != EOF) + { + c = vGetc (); + switch (c) + { + case ';': + case '\n': + newStatement = TRUE; + break; + + case ' ': + case '\t': + break; + + default: + if (newStatement && readIdentifier (name, c)) + findTag (name); + newStatement = FALSE; + break; + } + } + vStringDelete (name); +} + +extern parserDefinition* VerilogParser (void) +{ + static const char *const extensions [] = { "v", NULL }; + parserDefinition* def = parserNew ("Verilog"); + def->kinds = VerilogKinds; + def->kindCount = KIND_COUNT (VerilogKinds); + def->extensions = extensions; + def->parser = findVerilogTags; + def->initialize = initialize; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/vim.c b/sdk/ctags/vim.c new file mode 100644 index 0000000000..d9bd3eb7ad --- /dev/null +++ b/sdk/ctags/vim.c @@ -0,0 +1,178 @@ +/* +* $Id: vim.c,v 1.12 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2000-2003, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Thanks are due to Jay Glanville for significant improvements. +* +* This module contains functions for generating tags for user-defined +* functions for the Vim editor. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include + +#include "parse.h" +#include "read.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +typedef enum { + K_AUGROUP, + K_FUNCTION, + K_VARIABLE +} vimKind; + +static kindOption VimKinds [] = { + { TRUE, 'a', "augroup", "autocommand groups" }, + { TRUE, 'f', "function", "function definitions" }, + { TRUE, 'v', "variable", "variable definitions" }, +}; + +/* +* FUNCTION DEFINITIONS +*/ + +/* This function takes a char pointer, tries to find a scope separator in the + * string, and if it does, returns a pointer to the character after the colon, + * and the character defining the scope. + * If a colon is not found, it returns the original pointer. + */ +static const unsigned char* skipPrefix (const unsigned char* name, int *scope) +{ + const unsigned char* result = name; + if (scope != NULL) + *scope = '\0'; + if (name[1] == ':') + { + if (scope != NULL) + *scope = *name; + result = name + 2; + } + else if (strncasecmp ((const char*) name, "", (size_t) 5) == 0) + { + if (scope != NULL) + *scope = *name; + result = name + 5; + } + return result; +} + +static void findVimTags (void) +{ + vString *name = vStringNew (); + const unsigned char *line; + boolean inFunction = FALSE; + int scope; + + while ((line = fileReadLine ()) != NULL) + { + while (isspace ((int) *line)) + ++line; + if ((int) *line == '"') + continue; /* skip comment */ + if (strncmp ((const char*) line, "fu", (size_t) 2) == 0) + { + const unsigned char *cp = line + 1; + inFunction = TRUE; + + if ((int) *++cp == 'n' && (int) *++cp == 'c' && + (int) *++cp == 't' && (int) *++cp == 'i' && + (int) *++cp == 'o' && (int) *++cp == 'n') + ++cp; + if ((int) *cp == '!') + ++cp; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + cp = skipPrefix (cp, &scope); + if (isupper ((int) *cp) || scope == 's' || scope == '<') + { + do + { + vStringPut (name, (int) *cp); + ++cp; + } while (isalnum ((int) *cp) || *cp == '_'); + vStringTerminate (name); + makeSimpleTag (name, VimKinds, K_FUNCTION); + vStringClear (name); + } + } + } + + if (strncmp ((const char*) line, "aug", (size_t) 3) == 0) + { + /* Found Autocommand Group (augroup) */ + const unsigned char *cp = line + 2; + if ((int) *++cp == 'r' && (int) *++cp == 'o' && + (int) *++cp == 'u' && (int) *++cp == 'p') + ++cp; + if (isspace ((int) *cp)) + { + while (isspace ((int) *cp)) + ++cp; + if (strncasecmp ((const char*) cp, "end", (size_t) 3) != 0) + { + do + { + vStringPut (name, (int) *cp); + ++cp; + } while (isalnum ((int) *cp) || *cp == '_'); + vStringTerminate (name); + makeSimpleTag (name, VimKinds, K_AUGROUP); + vStringClear (name); + } + } + } + + if (strncmp ((const char*) line, "endf", (size_t) 4) == 0) + inFunction = FALSE; + + if (!inFunction && + strncmp ((const char*) line, "let", (size_t) 3) == 0) + { + /* we've found a variable declared outside of a function!! */ + const unsigned char *cp = line + 3; + /* get the name */ + if (isspace ((int) *cp)) + { + /* deal with spaces, $, @ and & */ + while (!isalnum ((int) *cp)) + ++cp; + cp = skipPrefix (cp, &scope); + do + { + vStringPut (name, (int) *cp); + ++cp; + } while (isalnum ((int) *cp) || *cp == '_'); + vStringTerminate (name); + makeSimpleTag (name, VimKinds, K_VARIABLE); + vStringClear (name); + } + } + } + vStringDelete (name); +} + +extern parserDefinition* VimParser (void) +{ + static const char *const extensions [] = { "vim", NULL }; + parserDefinition* def = parserNew ("Vim"); + def->kinds = VimKinds; + def->kindCount = KIND_COUNT (VimKinds); + def->extensions = extensions; + def->parser = findVimTags; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/vstring.c b/sdk/ctags/vstring.c new file mode 100644 index 0000000000..f430a8dc16 --- /dev/null +++ b/sdk/ctags/vstring.c @@ -0,0 +1,232 @@ +/* +* $Id: vstring.c,v 1.9 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions supporting resizeable strings. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include /* to define INT_MAX */ +#include +#include + +#include "debug.h" +#include "routines.h" +#include "vstring.h" + +/* +* DATA DEFINITIONS +*/ +static const size_t vStringInitialSize = 32; + +/* +* FUNCTION DEFINITIONS +*/ + +static void vStringResize (vString *const string, const size_t newSize) +{ + char *const newBuffer = xRealloc (string->buffer, newSize, char); + + string->size = newSize; + string->buffer = newBuffer; +} + +/* +* External interface +*/ + +extern boolean vStringAutoResize (vString *const string) +{ + boolean ok = TRUE; + + if (string->size <= INT_MAX / 2) + { + const size_t newSize = string->size * 2; + + vStringResize (string, newSize); + } + return ok; +} + +extern void vStringClear (vString *const string) +{ + string->length = 0; + string->buffer [0] = '\0'; + DebugStatement ( clearString (string->buffer, string->size); ) +} + +extern void vStringDelete (vString *const string) +{ + if (string != NULL) + { + if (string->buffer != NULL) + eFree (string->buffer); + eFree (string); + } +} + +extern vString *vStringNew (void) +{ + vString *const string = xMalloc (1, vString); + + string->length = 0; + string->size = vStringInitialSize; + string->buffer = xMalloc (string->size, char); + + vStringClear (string); + + return string; +} + +#ifndef VSTRING_PUTC_MACRO +extern void vStringPut (vString *const string, const int c) +{ + if (string->length == string->size) /* check for buffer overflow */ + vStringAutoResize (string); + + string->buffer [string->length] = c; + if (c != '\0') + string->length++; +} +#endif + +extern void vStringCatS (vString *const string, const char *const s) +{ +#if 1 + const size_t len = strlen (s); + while (string->length + len >= string->size)/* check for buffer overflow */ + vStringAutoResize (string); + strcpy (string->buffer + string->length, s); + string->length += len; +#else + const char *p = s; + do + vStringPut (string, *p); + while (*p++ != '\0'); +#endif +} + +extern vString *vStringNewCopy (vString *const string) +{ + vString *vs = vStringNew (); + vStringCatS (vs, string->buffer); + return vs; +} + +extern vString *vStringNewInit (const char *const s) +{ + vString *vs = vStringNew (); + vStringCatS (vs, s); + return vs; +} + +extern void vStringNCatS ( + vString *const string, const char *const s, const size_t length) +{ + const char *p = s; + size_t remain = length; + + while (*p != '\0' && remain > 0) + { + vStringPut (string, *p); + --remain; + ++p; + } + vStringTerminate (string); +} + +/* Strip trailing newline from string. + */ +extern void vStringStripNewline (vString *const string) +{ + const size_t final = string->length - 1; + if (string->buffer [final] == '\n') + { + string->buffer [final] = '\0'; + string->length--; + } +} + +/* Strip leading white space from string. + */ +extern void vStringStripLeading (vString *const string) +{ + while (isspace ((int) string->buffer [0]) && string->length > 0) + { + size_t i; + for (i = 1 ; i < string->length ; ++i) + string->buffer [i - 1] = string->buffer [i]; + --string->length; + string->buffer [string->length] = '\0'; + } +} + +/* Strip trailing white space from string. + */ +extern void vStringStripTrailing (vString *const string) +{ + while (isspace ((int) string->buffer [string->length - 1]) && + string->length > 0) + { + string->length--; + string->buffer [string->length] = '\0'; + } +} + +/* Chop last character from string. + */ +extern void vStringChop (vString *const string) +{ + if (string->length > 0) + { + --string->length; + string->buffer [string->length] = '\0'; + } +} + +extern void vStringCopyS (vString *const string, const char *const s) +{ + vStringClear (string); + vStringCatS (string, s); +} + +extern void vStringNCopyS ( + vString *const string, const char *const s, const size_t length) +{ + vStringClear (string); + vStringNCatS (string, s, length); +} + +extern void vStringCopyToLower (vString *const dest, const vString *const src) +{ + const size_t length = src->length; + const char *s = src->buffer; + char *d; + size_t i; + + if (dest->size < src->size) + vStringResize (dest, src->size); + d = dest->buffer; + for (i = 0 ; i < length ; ++i) + { + int c = s [i]; + + d [i] = tolower (c); + } + d [i] = '\0'; +} + +extern void vStringSetLength (vString *const string) +{ + string->length = strlen (string->buffer); +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/vstring.h b/sdk/ctags/vstring.h new file mode 100644 index 0000000000..6421c41e31 --- /dev/null +++ b/sdk/ctags/vstring.h @@ -0,0 +1,84 @@ +/* +* $Id: vstring.h,v 1.7 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 1998-2002, Darren Hiebert +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* Provides the external interface for resizeable strings. +*/ +#ifndef _VSTRING_H +#define _VSTRING_H + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#if defined(HAVE_STDLIB_H) +# include /* to define size_t */ +#endif + +/* +* MACROS +*/ +#define vStringValue(vs) ((vs)->buffer) +#define vStringItem(vs,i) ((vs)->buffer[i]) +#define vStringLength(vs) ((vs)->length) +#define vStringSize(vs) ((vs)->size) +#define vStringCat(vs,s) vStringCatS((vs), vStringValue((s))) +#define vStringNCat(vs,s,l) vStringNCatS((vs), vStringValue((s)), (l)) +#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s))) +#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l)) +#define vStringChar(vs,i) ((vs)->buffer[i]) +#define vStringTerminate(vs) vStringPut(vs, '\0') +#define vStringLower(vs) toLowerString((vs)->buffer) +#define vStringUpper(vs) toUpperString((vs)->buffer) + +#ifndef DEBUG +# define VSTRING_PUTC_MACRO 1 +#endif +#ifdef VSTRING_PUTC_MACRO +#define vStringPut(s,c) \ + (void)(((s)->length == (s)->size ? vStringAutoResize (s) : 0), \ + ((s)->buffer [(s)->length++] = (c)), \ + ((c) == '\0' ? (s)->length-- : 0)) +#endif + +/* +* DATA DECLARATIONS +*/ + +typedef struct sVString { + size_t length; /* size of buffer used */ + size_t size; /* allocated size of buffer */ + char *buffer; /* location of buffer */ +} vString; + +/* +* FUNCTION PROTOTYPES +*/ +extern boolean vStringAutoResize (vString *const string); +extern void vStringClear (vString *const string); +extern vString *vStringNew (void); +extern void vStringDelete (vString *const string); +#ifndef VSTRING_PUTC_MACRO +extern void vStringPut (vString *const string, const int c); +#endif +extern void vStringStripNewline (vString *const string); +extern void vStringStripLeading (vString *const string); +extern void vStringChop (vString *const string); +extern void vStringStripTrailing (vString *const string); +extern void vStringCatS (vString *const string, const char *const s); +extern void vStringNCatS (vString *const string, const char *const s, const size_t length); +extern vString *vStringNewCopy (vString *const string); +extern vString *vStringNewInit (const char *const s); +extern void vStringCopyS (vString *const string, const char *const s); +extern void vStringNCopyS (vString *const string, const char *const s, const size_t length); +extern void vStringCopyToLower (vString *const dest, const vString *const src); +extern void vStringSetLength (vString *const string); + +#endif /* _VSTRING_H */ + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/ctags/yacc.c b/sdk/ctags/yacc.c new file mode 100644 index 0000000000..169d85ddde --- /dev/null +++ b/sdk/ctags/yacc.c @@ -0,0 +1,40 @@ +/* +* $Id: yacc.c,v 1.7 2006/05/30 04:37:13 darren Exp $ +* +* Copyright (c) 2001-2002, Nick Hibma +* +* This source code is released for free distribution under the terms of the +* GNU General Public License. +* +* This module contains functions for generating tags for YACC language files. +*/ + +/* +* INCLUDE FILES +*/ +#include "general.h" /* must always come first */ + +#include +#include "parse.h" + +/* +* FUNCTION DEFINITIONS +*/ + +static void installYaccRegex (const langType language) +{ + addTagRegex (language, + "^([A-Za-z][A-Za-z_0-9]+)[ \t]*:", "\\1", "l,label,labels", NULL); +} + +extern parserDefinition* YaccParser () +{ + static const char *const extensions [] = { "y", NULL }; + parserDefinition* const def = parserNew ("YACC"); + def->extensions = extensions; + def->initialize = installYaccRegex; + def->regex = TRUE; + return def; +} + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/sdk/src/which/which-2.16-4-src.zip b/sdk/src/which/which-2.16-4-src.zip new file mode 100644 index 0000000000000000000000000000000000000000..0a1b2fdc7cc8966fb45d02a8a475abeb415d5b60 GIT binary patch literal 209019 zcmce-V~}NSx2C(&wr$(CZ9A*dwr$%sD{b4hv(lNBwlhz?`}?|gbjOK(`ux~EBc3@{ z#GF5_d#p9?G2oe>F0Pzb>jX|3>L;^=3sK^h^9`jS4(9W1VWMZ}AlAwTq zpbP?ov)4625BiCFbR7#WLGH1|1qgu_h9Xsi3p+*$PKDm2BN^MfOhu;~8zKYLRN(*+ z!3EC3p?_DKAC#ct|HK^D`d=}z0nYzB=6?{={hQbTu=X!vmrettzr+@ZMuvurhW-Eo zLermMELvg#Lt#`D`({oA$xi4e%%0QHI3^EoJN?b^{~cn|e-rQB z|BDzE0Q~oB{fBrV-u)#77yt-H1OO-i7XL+d|3z$UzkUlO|EB#XmZa|1>=Po6T+4Yw81%7QI?{Wm z%E?n3%P1F6VLIgbQa$9EW!Oz!g?P%J9N^>+-gK(AP)%JS`^|I~Qs%`VPk(9R_B^#< zm_&!m_VrlLUj)x{sD%mm+HiF0IniHBug>17W=D!tG?^1Qh-`&I&RHs)0d6kN*cP=q@ z)27Mnr_ny*w26Axra@tmrX|F1Scq#MF<*98tNxiv;0}t`PPXS%D{4pESRJOmcR5E^ z3~RtI&2wWJRyX=s5M5@5h&uq;(l;>Je|UYbDr3eyTD?!+WHl}}M0u~S0pAX)XBXUr z&Op))tFSUMhwAK-Mvz?Tk`k1{4cV6IMtwYy1uImuF#n>}k1Fxfky%#aW}-{oN}{){ z;r0gB{0D#PMl~@sSIVsVF6^3c@O=SWsksQ26VHRfj=Q2@(H;QDnkhqkg~%U~*A!G) z`+dUhL69qOA#`9g$)syB*|Qqj6t2`kznCjMn_ZXY!$1uToOx;5NyPb^cZeK4{F{-| zpA`k(FwZ&Xgf(xlj}^N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|eFYh)z^}Tcd6Z8LD_G7{e&d>3{Dm*95{E6)$ zF3qRf{JcP(f42E|lX%wJ=GP_i+_ueMP2hV!8uQ#|6X$Om{0egayw9sgpMavt^J_sr z=VMwp&t%1*p2@0?`n@#nv4I#`axEI3H5)Pab!ke*U=d# zX0&x0^ZNHz`va!C*J#d(Zod1a-Ttl)yI%zI3vra#H74%k&w0mZ@Dm%O>@#pW4@Ts+_JrU3)6Z z>wGI;)#4zFgDnn6trKDSNRu0??)G0qZ9Crb-O-X#X}-w0s9e%L{Q*bbhMu4dGud%vi<> zl%5%Dgi=B%ft1>m>Xa&!@)Unc zAxa*K>Sv+2DA!_mW}9+^vXiojl1^DqSxT8nnLx?v=lq=L_stphzvJP5U*53kyd7^U zA3!G7KYzjbyJ>i2lupC{^AsNP|F?eieVkW{=kK`M5$}1=jw$y9K`lxfihj?1Kv_)L zM!87Q^W1v2S$ueD!y(sTf7E!iR{-Eeta6K2TXNBV_52pW{XW+j8h{A?Z literal 0 HcmV?d00001 diff --git a/sdk/wxflatnotebook/README b/sdk/wxflatnotebook/README new file mode 100644 index 0000000000..28340e4523 --- /dev/null +++ b/sdk/wxflatnotebook/README @@ -0,0 +1,168 @@ +wxFlatNotebook - This class represents a flat notebook control for the +wxWidgets C++ GUI frame work, which manages multiple windows with associated tabs using different styles + +============ +BUILD INFO: +============ + +To build using MSVC 7.1 - Simply open the soltuion file wxFlatNotebook.sln - and build + +To build using g++ compiler on Linux, + +# cd contrib/build/wxFlatNotebook +# make clean +# make type=[release | debug ] + +This will create both the library and the wxFlatNotebookTest executable + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +VERSIONS: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +=========================================== +Version 0.9 +=========================================== + +Release date: 05/01/2006 + + +=========================================== +Version 1.0 First stable version, please report any bugs to Eran Ifrah at: +=========================================== +eranif@bezeqint.net + +or the wxForum at the 'the Code Dump' Forum + +Enjoy, +Eran + +=========================================== +Version 1.1, Updated at 1/11/2006 9:40PM: +=========================================== + +This release contains minor bug fixes, plus introducing the following new features: + +- Darg and Drop of tabs is now enabled between different Notebooks +- User can now disable a tab - a disabled tab will block the following operations on it: + + No Right click menu + + The window itself is disabled (Not only the tab) + + User can not select this tab + + User can not drag this tab + + User can not use navigation keys (Ctrl+Tabs / Ctrl+Shift+Tab) to reach this tab + However, user can still close this tab using the 'X' button. + +Thanks to all contributors (espcially T-Rex) + +Eran + + +====================================================== +Version 1.2 Updated at: 1/25/2006 11:11PM +====================================================== + +Fixed following bugs / features were added: + ++ Tested on Linux (Fedora Core 4) - makefile is now provided ! ++ Fixed bug that causes focus lost when using tab+ctrl ++ Added a style to disable the drag and drop ++ Flickering of buttons was reduced significally ++ Buttons (Left, Right, X) now has nice effects when pressed, hover, clicked ++ Buttons area is now used better - when hiding buttons, more place is left for drawing tabs ++ Notebook style now uses wxWindowBase flag rather then keeping its own member, this allows applying regular style (e.g. wxSIMPLE_BORDER) to the notebook ++ wxFNB_TABS_BORDER_SIMPLE was added and now replacing the wxFNB_BORDER - this flag draw a gentle border around the page container ++ When no tabs in the notebook, the background colour is now set to wxSYS_COLOUR_APPWORKSPACE - this gives more MDI look and feel on Windows ++ Fixed tabs drawing glitches - more space between the images and the text and the tab borders ++ Code clean up - especially the OnPaint() function + +====================================================== +Version 1.3 Updated at: 3/1/2006 11:15PM +====================================================== + +Fixed following bugs / features were added: + +Features: +-------- + ++ Changed the buttons ( <>x buttons ) coloring to be more XP look ++ An option to remove the border around the tab area ++ Set/Get colors of the following: + - Active tab text + - Non-Active text + - Tab area colors + - Active tab color ++ New option introduced to add 'X' button on active tab ++ New event is now fired after page is being closed wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED - + this allow the application to preform some cleanup after closure of page ++ An option to disable a tab - a tab can now be disabled, which means it will not receive any event, user can not select + it nor navigate to it (using Ctrl+Tab/Tab) + + +Bugs: +---- ++ Fixed minor drawing issues ++ Fixed bug that when closing the a tab using the mouse middle button, the page was set to active and only then closed. ++ Fixed bug that the old selection value in the event when closing a page was incorrect + + + +====================================================== +Version 1.5 9/13/2006 7:40PM +====================================================== + +Features: + ++ New style added - VC8 style, with curved tabs + The new style has the following features + - Background of tab area can be painted in gradient + - Colourful tabs - a random gentle colour is generated for each new tab (very cool :)) + + Note: that the new tab DOES NOT support 'X' button on the tab + ++ Build for DLL debug/release was fixed (on windows) ++ Makefile for Linux is now more generic using wx-config tool ++ Several drawing issues were fixed ++ Tabs now has an extra line that separate them from the page + +======================================================== +Version 2.0 +======================================================== + + - Code refactoring: + + remove wxStyledNotebook class, the same functionality now exist under wxFlatNotebook + + All drawing was moved to renderers (wxFlatNotebook.cpp file is now cleaned from drawing) + + Now using smart_ptr & singleton template classes where ever possible + + - Added smart tabbing style with new and easy way to select tabs (request #1527285) + Once this style is enabled, pressing Ctrl+[Shift]+T will popup a dialog with all the open tabs, another Ctrl+[Shift]+T will run throw the + dialog list, until the Ctrl key is released. + + - Added new styles: + wxFNB_SMART_TABS - which enables the above feature + wxFNB_DROPDOWN_TABS_LIST - which replaces the '<>' (left, right arrows buttons) with a drop down list (popup menu) with all the open tabs + this feature is similar to VS8 tabs styles. + +- Fixed a bug in SetSelection - in case that the navigation buttons were hidden, and the selection was not visible, it did not ensure that it will be visible + +======================================================== +Version 2.1 +======================================================== + +This version is released shortly after 2.0 since v2.0 contained many code changes, I expected feedback from user +which came ... (as expected) + +So, the following changes fixes applies to v2.1: + +- 'x' button on tabs with VS8 style +- dropping page on foreign notebook that does not have image list, while the page does have caused a crash +- Drawing problems with VS71 & Fancy style when selecting the bottoms tabs +- DeletePage, RemovePage now accepts second argument to allow user to disable page closing events +- Page changing events are now fired from SetSelection, to fix a problem where only mouse left click allowed users to handle the page changes event (e.g. Ctrl + T did not fire page changes event ... ) +- If no right click menu is provided, an event wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU is fired (a bug that existed preveneted this event to be fired) +- wxFNB_ALLOW_FOREIGN_DND style added (check the demo) +- All xpm files are now located on a single resource file +- the smart tabbing dialog icon, was replaced from PNG to XPM. + + +Have fun ! +Eran diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/Makefile.win b/sdk/wxflatnotebook/build/wxFlatNotebook/Makefile.win new file mode 100644 index 0000000000..806de55ebe --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/Makefile.win @@ -0,0 +1,31 @@ +# Project: libwxFlatNotebook +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = Objects/wxFlatNotebook.obj $(RES) +LINKOBJ = Objects/wxFlatNotebook.obj $(RES) +LIBS = -L"E:/Program/Util/Programmer/Dev-CPP/lib" +INCS = -I"E:/Program/Util/Programmer/Dev-CPP/include" -I"../../include" +CXXINCS = -I"E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/backward" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/mingw32" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2" -I"E:/Program/Util/Programmer/Dev-CPP/include" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/msw" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/generic" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/animate" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/fl" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/gizmos" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/html" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/mmedia" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/net" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/ogl" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/plot" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/protocol" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/stc" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/svg" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/xml" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx" -I"../../include" +BIN = ../../lib/libwxFlatNotebook.a +CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3 +CFLAGS = $(INCS) -fexpensive-optimizations -O3 +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before ../../lib/libwxFlatNotebook.a all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(LINKOBJ) + ar r $(BIN) $(LINKOBJ) + ranlib $(BIN) + +Objects/wxFlatNotebook.obj: ../../src/wxFlatNotebook/wxFlatNotebook.cpp + $(CPP) -c ../../src/wxFlatNotebook/wxFlatNotebook.cpp -o Objects/wxFlatNotebook.obj $(CXXFLAGS) diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatLib.bat b/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatLib.bat new file mode 100644 index 0000000000..3d96d38d14 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatLib.bat @@ -0,0 +1 @@ +bakefile_gen -fmsvc,borland -b ../../contrib/build/wxFlatNotebook/*.bkl diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatTst.bat b/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatTst.bat new file mode 100644 index 0000000000..2efb9a3fa8 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/genFlatTst.bat @@ -0,0 +1 @@ +bakefile_gen -fmsvc,borland -b ../../contrib/samples/wxFlatNotebook/*.bkl diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.dev b/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.dev new file mode 100644 index 0000000000..24f855c1d8 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.dev @@ -0,0 +1,69 @@ +[Project] +FileName=libwxFlatNotebook.dev +Name=libwxFlatNotebook +UnitCount=2 +Type=2 +Ver=1 +ObjFiles= +Includes=../../include +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +IsCpp=1 +Icon= +ExeOutput=../../lib +ObjectOutput=Objects +OverrideOutput=1 +OverrideOutputName=libwxFlatNotebook.a +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000001001000000000 + +[Unit1] +FileName=..\..\include\wx\wxFlatNotebook\wxFlatNotebook.h +CompileCpp=1 +Folder=libwxFlatNotebook +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=..\..\src\wxFlatNotebook\wxFlatNotebook.cpp +CompileCpp=1 +Folder=libwxFlatNotebook +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.layout b/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.layout new file mode 100644 index 0000000000..9e40781405 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/libwxFlatNotebook.layout @@ -0,0 +1,12 @@ +[Editor_1] +CursorCol=26 +CursorRow=321 +TopLine=297 +LeftChar=1 +Open=0 +Top=0 +[Editors] +Order= +[Editor_0] +Open=0 +Top=0 diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/makefile b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile new file mode 100644 index 0000000000..12975cd5f6 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile @@ -0,0 +1,94 @@ +################################################################################################################### +# +# Project: wxFlatNotebook +# Date: 1/23/2006 12:06AM +# Author: Eran Ifrah +# +# gcc makefile for building wxFlatNotebook on Linux platform +# Usage: +# to run it in debug mode run +# make clean +# make type=debug +# +# for release build, simply run: +# make clean +# make +################################################################################################################### + + +ifeq ($(type),debug) + WXCFG=--debug=yes --unicode=no + DEBUG_FLAG=d + OBJ_DIR = ../../gcc_debug + UNICODE= + OPT=-O0 +endif + +ifeq ($(type),release) + WXCFG=--debug=no --unicode=no + DEBUG_FLAG= + OBJ_DIR = ../../gcc_release + UNICODE= + OPT=-O3 +endif + +ifeq ($(type),release_unicode) + WXCFG=--debug=no --unicode=yes + DEBUG_FLAG= + OBJ_DIR = ../../gcc_release_unicode + UNICODE=u + OPT=-O3 +endif + +ifeq ($(type),debug_unicode) + WXCFG=--debug=yes --unicode=yes + DEBUG_FLAG=d + OBJ_DIR = ../../gcc_debug_unicode + UNICODE=u + OPT=-O0 +endif + +CMP = g++ $(OPT) +CXXFLAGS = -I../../include $(shell wx-config --cxxflags $(WXCFG)) + +## Libraries required to link the sample program and their path +LIBS = -L../../lib -lwxflatnotebook$(UNICODE)$(DEBUG_FLAG) $(shell wx-config --libs $(WXCFG)) + +## sample program name +OUTPUT = wxFlatNotebookTest + +## library name +LIB_OUTPUT = ../../lib/libwxflatnotebook$(UNICODE)$(DEBUG_FLAG).a + +## +## wxflatnotebook lib and sample objects +## +lib_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard ../../src/wxFlatNotebook/*.cpp))))) +sample_objects := $(addprefix $(OBJ_DIR)/, $(addsuffix .o, $(basename $(notdir $(wildcard ../../samples/wxFlatNotebook/*.cpp))))) + +## Rules +wxFlatNotebookTest: pre_build wxFlatNotebook $(sample_objects) + $(CMP) -o $(OUTPUT) $(sample_objects) $(LIBS) + +wxFlatNotebook: $(lib_objects) + ar rcu $(LIB_OUTPUT) $(lib_objects) + ranlib $(LIB_OUTPUT) + +$(OBJ_DIR)/%.o: ../../src/wxFlatNotebook/%.cpp + $(CMP) $(CXXFLAGS) -c $< -o $(OBJ_DIR)/$(@F) + +$(OBJ_DIR)/%.o: ../../samples/wxFlatNotebook/%.cpp + $(CMP) $(CXXFLAGS) -c $< -o $(OBJ_DIR)/$(@F) + +pre_build: + test -d ../../gcc_debug || mkdir ../../gcc_debug + test -d ../../gcc_debug_unicode || mkdir ../../gcc_debug_unicode + test -d ../../gcc_release || mkdir ../../gcc_release + test -d ../../gcc_release_unicode || mkdir ../../gcc_release_unicode + test -d ../../lib || mkdir ../../lib +clean: + ${RM} ../../gcc_debug/*.o + ${RM} ../../gcc_release/*.o + ${RM} ../../gcc_release_unicode/*.o + ${RM} ../../gcc_debug_unicode/*.o + ${RM} ../../lib/libwxflatnotebookd.a ../../lib/libwxflatnotebook.a ../../lib/libwxflatnotebooku.a ../../lib/libwxflatnotebookud.a diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.bcc b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.bcc new file mode 100644 index 0000000000..aa3966378f --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.bcc @@ -0,0 +1,260 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.0 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +.autodepend + +!ifndef BCCDIR +!ifndef MAKEDIR +!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4 +!endif +BCCDIR = $(MAKEDIR)\.. +!endif + +!include ../../../build/msw/config.bcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +WX_RELEASE_NODOT = 26 +OBJS = \ + bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + ..\..\src\wxFlatNotebook\..\..\..\lib\bcc_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = \ + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXFLATNOTEBOOKDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ + $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I..\..\src\wxFlatNotebook\..\..\..\include \ + -I$(SETUPHDIR) -I..\..\src\wxFlatNotebook\..\..\include -DWXUSINGDLL \ + -DWXMAKINGDLL_WXFLATNOTEBOOK $(CPPFLAGS) $(CXXFLAGS) +WXFLATNOTEBOOKDLL_OBJECTS = \ + $(OBJS)\wxFlatNotebookdll_wxFlatNotebook.obj +WXFLATNOTEBOOKLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ + $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) -I..\..\src\wxFlatNotebook\..\..\..\include \ + -I$(SETUPHDIR) -I..\..\src\wxFlatNotebook\..\..\include $(CPPFLAGS) \ + $(CXXFLAGS) +WXFLATNOTEBOOKLIB_OBJECTS = \ + $(OBJS)\wxFlatNotebooklib_wxFlatNotebook.obj + +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(OFFICIAL_BUILD)" == "0" +VENDORTAG = _$(VENDOR) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +VENDORTAG = +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" +WXDEBUGFLAG = d +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(SHARED)" == "0" +LIBTYPE_SUFFIX = lib +!endif +!if "$(SHARED)" == "1" +LIBTYPE_SUFFIX = dll +!endif +!if "$(MONOLITHIC)" == "0" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" +EXTRALIBS_FOR_BASE = +!endif +!if "$(SHARED)" == "1" +__wxFlatNotebookdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).dll +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG_6 = +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG_6 = mt +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_9 = i +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_9 = +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_1 = -d__WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_1 = -dwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_1 = -dwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_1 = -dwxNO_THREADS +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_1 = -d_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_1 = -dwxUSE_UNICODE_MSLU=1 +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(MSLU)" == "1" +__UNICOWS_LIB_p = unicows.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(SHARED)" == "0" +__wxFlatNotebooklib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG = -Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG = -O2 +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG = +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG = -tWM +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS = -tWR +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS = +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p = -DwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p = -DwxNO_THREADS +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = -D_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(__wxFlatNotebookdll___depname) $(__wxFlatNotebooklib___depname) + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.csm del $(OBJS)\*.csm + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).tds del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).tds + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ilc del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ilc + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ild del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ild + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ilf del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ilf + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ils del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).ils + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib + +!if "$(SHARED)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG).dll: $(WXFLATNOTEBOOKDLL_OBJECTS) $(OBJS)\wxFlatNotebookdll_version.res + ilink32 -Tpd -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) @&&| + c0d32.obj $(WXFLATNOTEBOOKDLL_OBJECTS),$@,, $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) ole2w32.lib oleacc.lib odbc32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) import32.lib cw32$(__THREADSFLAG_6)$(__RUNTIME_LIBS_9).lib,, $(OBJS)\wxFlatNotebookdll_version.res +| + implib -f $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook $@ +!endif + +!if "$(SHARED)" == "0" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib: $(WXFLATNOTEBOOKLIB_OBJECTS) + if exist $@ del $@ + tlib /a /p4096 $@ @&&| + $(WXFLATNOTEBOOKLIB_OBJECTS) +| +!endif + +$(OBJS)\wxFlatNotebookdll_version.res: ../../src/wxFlatNotebook\..\..\..\src\msw\version.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i..\..\src\wxFlatNotebook\..\..\..\include -i$(SETUPHDIR) -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_bcc$(VENDORTAG) $** + +$(OBJS)\wxFlatNotebookdll_wxFlatNotebook.obj: ../../src/wxFlatNotebook\wxFlatNotebook.cpp + $(CXX) -q -c -P -o$@ $(WXFLATNOTEBOOKDLL_CXXFLAGS) $** + +$(OBJS)\wxFlatNotebooklib_wxFlatNotebook.obj: ../../src/wxFlatNotebook\wxFlatNotebook.cpp + $(CXX) -q -c -P -o$@ $(WXFLATNOTEBOOKLIB_CXXFLAGS) $** + diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.vc b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.vc new file mode 100644 index 0000000000..0e92388b93 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/makefile.vc @@ -0,0 +1,319 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.0 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +!include <../../../build/msw/config.vc> + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +WX_RELEASE_NODOT = 26 +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + ..\..\src\wxFlatNotebook\..\..\..\lib\vc_$(LIBTYPE_SUFFIX)$(CFG) +SETUPHDIR = \ + $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) +WXFLATNOTEBOOKDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_9)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO_1) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) /I..\..\src\wxFlatNotebook\..\..\..\include \ + /I$(SETUPHDIR) /W4 /I..\..\src\wxFlatNotebook\..\..\include /DWXUSINGDLL \ + /DWXMAKINGDLL_WXFLATNOTEBOOK $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \ + $(CXXFLAGS) -GX +WXFLATNOTEBOOKDLL_OBJECTS = \ + $(OBJS)\wxFlatNotebookdll_version.res \ + $(OBJS)\wxFlatNotebookdll_wxFlatNotebook.obj +WXFLATNOTEBOOKLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_21)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO_1) \ + /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) /I..\..\src\wxFlatNotebook\..\..\..\include \ + /I$(SETUPHDIR) /W4 /I..\..\src\wxFlatNotebook\..\..\include $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /DWXUSINGDLL $(CPPFLAGS) $(CXXFLAGS) -GX +WXFLATNOTEBOOKLIB_OBJECTS = \ + $(OBJS)\wxFlatNotebooklib_wxFlatNotebook.obj + +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(OFFICIAL_BUILD)" == "0" +VENDORTAG = _$(VENDOR) +!endif +!if "$(OFFICIAL_BUILD)" == "1" +VENDORTAG = +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" +WXDEBUGFLAG = d +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(SHARED)" == "0" +LIBTYPE_SUFFIX = lib +!endif +!if "$(SHARED)" == "1" +LIBTYPE_SUFFIX = dll +!endif +!if "$(MONOLITHIC)" == "0" +EXTRALIBS_FOR_BASE = +!endif +!if "$(MONOLITHIC)" == "1" +EXTRALIBS_FOR_BASE = +!endif +!if "$(SHARED)" == "1" +__wxFlatNotebookdll___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).dll +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_2 = /DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_2 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_2 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_2 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_3_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_3_p_1 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_3_p_1 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_3_p_1 = /d _DEBUG +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_9 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_9 = $(__THREADSFLAG) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__ +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_1 = /d wxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_1 = /d wxNO_THREADS +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_1 = /d _UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_1 = /d wxUSE_UNICODE_MSLU=1 +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(MSLU)" == "1" +__UNICOWS_LIB_p = unicows.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = \ + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +!if "$(SHARED)" == "0" +__wxFlatNotebooklib___depname = \ + $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_21 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_21 = $(__THREADSFLAG) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /Zi +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /Zi +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME = /D_DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME = d +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG = /Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG = /O2 +!endif +!if "$(USE_THREADS)" == "0" +__THREADSFLAG = L +!endif +!if "$(USE_THREADS)" == "1" +__THREADSFLAG = T +!endif +!if "$(USE_RTTI)" == "0" +__RTTIFLAG = +!endif +!if "$(USE_RTTI)" == "1" +__RTTIFLAG = /GR +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONSFLAG = +!endif +!if "$(USE_EXCEPTIONS)" == "1" +__EXCEPTIONSFLAG = /EHsc +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p = /DwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p = /DwxNO_THREADS +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = /D_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1 +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(__wxFlatNotebookdll___depname) $(__wxFlatNotebooklib___depname) + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.pch del $(OBJS)\*.pch + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).dll + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).ilk del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).ilk + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).pdb del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).pdb + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib + +!if "$(SHARED)" == "1" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG).dll: $(WXFLATNOTEBOOKDLL_OBJECTS) $(OBJS)\wxFlatNotebookdll_version.res + link /DLL /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_2) /LIBPATH:$(LIBDIRNAME) @<< + $(WXFLATNOTEBOOKDLL_OBJECTS) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib +<< +!endif + +!if "$(SHARED)" == "0" +$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook.lib: $(WXFLATNOTEBOOKLIB_OBJECTS) + if exist $@ del $@ + link /LIB /NOLOGO /OUT:$@ @<< + $(WXFLATNOTEBOOKLIB_OBJECTS) +<< +!endif + +$(OBJS)\wxFlatNotebookdll_version.res: ../../src/wxFlatNotebook\..\..\..\src\msw\version.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_3_p_1) $(__NO_VC_CRTDBG_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i ..\..\src\wxFlatNotebook\..\..\..\include /i $(SETUPHDIR) /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_wxFlatNotebook_vc$(VENDORTAG) $** + +$(OBJS)\wxFlatNotebookdll_wxFlatNotebook.obj: ../../src/wxFlatNotebook\wxFlatNotebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WXFLATNOTEBOOKDLL_CXXFLAGS) $** + +$(OBJS)\wxFlatNotebooklib_wxFlatNotebook.obj: ../../src/wxFlatNotebook\wxFlatNotebook.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WXFLATNOTEBOOKLIB_CXXFLAGS) $** + diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.bkl b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.bkl new file mode 100644 index 0000000000..614fffc5aa --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.bkl @@ -0,0 +1,33 @@ + + + + + + 1 + + + + wxFlatNotebook.cpp + + + + + wx/wxFlatNotebook/wxFlatNotebook.h + + + + + WXUSINGDLL + WXMAKINGDLL_WXFLATNOTEBOOK + $(WXFLATNOTEBOOK_SRC) + core + base + + + + $(WXFLATNOTEBOOK_SRC) + + + wxFlatNotebook=wxFlatNotebooklib+wxFlatNotebookdll + + diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.sln b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.sln new file mode 100644 index 0000000000..165a7171a7 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.sln @@ -0,0 +1,53 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxFlatNotebook", "wxFlatNotebook.vcproj", "{F9550C0D-30DA-45C5-A08F-C41B14495A08}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxFlatNotebookTest", "..\..\samples\wxFlatNotebook\wxFlatNotebookTest.vcproj", "{7EA88BCE-011A-439D-920E-D4C8D190E676}" + ProjectSection(ProjectDependencies) = postProject + {F9550C0D-30DA-45C5-A08F-C41B14495A08} = {F9550C0D-30DA-45C5-A08F-C41B14495A08} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug DLL|Win32 = Debug DLL|Win32 + Debug Unicode|Win32 = Debug Unicode|Win32 + Debug|Win32 = Debug|Win32 + DebugDevelopment|Win32 = DebugDevelopment|Win32 + Release DLL|Win32 = Release DLL|Win32 + Release Unicode|Win32 = Release Unicode|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug|Win32.ActiveCfg = Debug|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Debug|Win32.Build.0 = Debug|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.DebugDevelopment|Win32.ActiveCfg = DebugDevelopment|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.DebugDevelopment|Win32.Build.0 = DebugDevelopment|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release DLL|Win32.Build.0 = Release DLL|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release|Win32.ActiveCfg = Release|Win32 + {F9550C0D-30DA-45C5-A08F-C41B14495A08}.Release|Win32.Build.0 = Release|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug DLL|Win32.ActiveCfg = Debug DLL|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug DLL|Win32.Build.0 = Debug DLL|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug|Win32.ActiveCfg = Debug|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Debug|Win32.Build.0 = Debug|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.DebugDevelopment|Win32.ActiveCfg = DebugDevelopment|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.DebugDevelopment|Win32.Build.0 = DebugDevelopment|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release DLL|Win32.ActiveCfg = Release DLL|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release DLL|Win32.Build.0 = Release DLL|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release|Win32.ActiveCfg = Release|Win32 + {7EA88BCE-011A-439D-920E-D4C8D190E676}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.vcproj b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.vcproj new file mode 100644 index 0000000000..9c4951c612 --- /dev/null +++ b/sdk/wxflatnotebook/build/wxFlatNotebook/wxFlatNotebook.vcproj @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/wxflatnotebook/docs/wxFlatNotebook/Doxyfile b/sdk/wxflatnotebook/docs/wxFlatNotebook/Doxyfile new file mode 100644 index 0000000000..a406ad07b0 --- /dev/null +++ b/sdk/wxflatnotebook/docs/wxFlatNotebook/Doxyfile @@ -0,0 +1,258 @@ +# Doxyfile 1.4.5 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = wxFlatNotebook +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = ./ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = YES +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = YES +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = NO +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../../include/wx/wxFlatNotebook +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +USE_HTAGS = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = YES +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_customize_dlg.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_customize_dlg.h new file mode 100644 index 0000000000..2313574c2d --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_customize_dlg.h @@ -0,0 +1,50 @@ +#ifndef __fnb_customize_dlg__ +#define __fnb_customize_dlg__ + +#include +#include +#include "wx/dialog.h" +#include "wx/panel.h" + +class wxCheckBox; +class wxRadioBox; + +/////////////////////////////////////////////////////////////////////////////// +/// Class wxFNBCustomizeDialog +/////////////////////////////////////////////////////////////////////////////// +class wxFNBCustomizeDialog : public wxDialog +{ +protected: + wxStaticLine* m_staticline2; + wxButton* m_close; + long m_options; + + // Option's page members + wxRadioBox* m_styles; + wxRadioBox* m_tabVPosition; + wxRadioBox* m_navigationStyle; + wxCheckBox* m_tabBorder; + wxCheckBox* m_hideCloseButton; + wxCheckBox* m_mouseMiddleCloseTab; + wxCheckBox* m_xButtonOnTab; + wxCheckBox* m_dlbClickCloseTab; + wxCheckBox* m_smartTabbing; + wxCheckBox* m_allowDragAndDrop; + wxCheckBox* m_foreignDnD; + wxCheckBox* m_gradient; + wxCheckBox* m_colorfulTab; + +public: + wxFNBCustomizeDialog( wxWindow* parent, long options, int id = wxID_ANY, wxString title = wxT("Customize"), wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, int style = wxDEFAULT_DIALOG_STYLE ); + +protected: + void OnClose(wxCommandEvent &event); + void OnStyle(wxCommandEvent &event); + +private: + wxPanel *CreateOptionsPage(); + void ConnectEvents(); +}; + +#endif //__fnb_customize_dlg__ + diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_resources.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_resources.h new file mode 100644 index 0000000000..48260fedbf --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_resources.h @@ -0,0 +1,41 @@ +#ifndef FNB_RESOURCES_H +#define FNB_RESOURCES_H + +extern size_t tab_selection_png_size; +extern unsigned char tab_selection_png[]; + +// Control left arrow images +extern char *left_arrow_disabled_xpm[]; +extern char *left_arrow_hilite_xpm[]; +extern char *left_arrow_xpm[]; +extern char *left_arrow_pressed_xpm[]; + +// Control right arrow +extern char *right_arrow_hilite_xpm[]; +extern char *right_arrow_pressed_xpm[]; +extern char *right_arrow_xpm[]; +extern char *right_arrow_disabled_xpm[]; + +// Cotrol down arrow +extern char *down_arrow_hilite_xpm[]; +extern char *down_arrow_pressed_xpm[]; +extern char *down_arrow_xpm[]; + +// X button +extern char *x_button_hilite_xpm[]; +extern char *tab_x_button_pressed_xpm[]; +extern char *x_button_pressed_xpm[]; +extern char *x_button_xpm[]; + +// Popup dialog xpm +extern unsigned char signpost_alpha[]; +extern char *signpost_xpm[]; + +// Drag hint arrows +extern char *arrow_down_blue_xpm[]; +extern char *arrow_up_blue_xpm[]; +extern unsigned char arrow_down_blue_alpha[]; +extern unsigned char arrow_up_blue_alpha[]; + +#endif // FNB_RESOURCES_H + diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_singleton.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_singleton.h new file mode 100644 index 0000000000..d9c8849385 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_singleton.h @@ -0,0 +1,68 @@ +#ifndef FNB_SINGLETON_H +#define FNB_SINGLETON_H + +/** + * A template class that implements the wxFNBSingleton pattern. + * + * \date 08-23-2006 + * \author eran + */ +template +class wxFNBSingleton +{ + static T* ms_instance; +public: + /** + * Static method to access the only pointer of this instance. + * \return a pointer to the only instance of this + */ + static T* Get(); + + /** + * Release resources. + */ + static void Free(); + +protected: + /** + * Default constructor. + */ + wxFNBSingleton(); + + /** + * Destructor. + */ + virtual ~wxFNBSingleton(); +}; +template +T* wxFNBSingleton::ms_instance = 0; + +template +wxFNBSingleton::wxFNBSingleton() +{ +} + +template +wxFNBSingleton::~wxFNBSingleton() +{ +} + +template +T* wxFNBSingleton::Get() +{ + if(!ms_instance) + ms_instance = new T(); + return ms_instance; +} + +template +void wxFNBSingleton::Free() +{ + if( ms_instance ) + { + delete ms_instance; + ms_instance = 0; + } +} + +#endif // FNB_SINGLETON_H diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_smart_ptr.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_smart_ptr.h new file mode 100644 index 0000000000..a46f61f2a9 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/fnb_smart_ptr.h @@ -0,0 +1,215 @@ +#ifndef FNB_SMART_PTR_H +#define FNB_SMART_PTR_H + + +/** + * A smart pointer class that provides a reference counting and auto delete memory. + * + * This class is similar to std::auto_ptr, with 2 exceptions: + * - This class uses reference counting + * - We dont provide a release() function (because of the reference counting) + * It is recommended to use this class instead of using raw pointer wherever possible. + * + * \note smart pointer to NULL is valid. + * + * \ingroup CodeLite + * \version 1.0 + * first version + * \date 09-17-2006 + * \author Eran + */ +template +class wxFNBSmartPtr +{ + typedef T* type_ptr; + + /** + * The reference counting class + * + * \ingroup CodeLite + * \version 1.0 + * first version + * + * \date 09-17-2006 + * \author Eran + */ + class SmartPtrRef + { + type_ptr m_data; + int m_refCount; + + public: + /** + * Construct a reference counting class for row pointer data + * \param data pointer + */ + SmartPtrRef(type_ptr data) + : m_data( data ) + , m_refCount( 1 ) + { + } + + /** + * Destructor + */ + virtual ~SmartPtrRef() + { + delete m_data; + } + + /** + * \return Pointer to the row data + */ + type_ptr GetData() { return m_data; } + + /** + * Increase reference counting by 1 + */ + void IncRef() { m_refCount ++ ; } + + + /** + * Decrease reference counting by 1 + */ + void DecRef() { m_refCount -- ; } + /** + * Return the current reference counting + * \return current reference counting + */ + int GetRefCount() { return m_refCount; } + }; + + SmartPtrRef *m_ref; + +public: + /** + * Construct smart pointer from ptr + * \param ptr pointer + */ + wxFNBSmartPtr(type_ptr ptr) + { + // create a fresh copy + CreateFresh( ptr ); + } + + /** + * Default constructor + */ + wxFNBSmartPtr() + : m_ref(NULL) + { + } + + /** + * Copy constructor + * \param rhs right hand side + */ + wxFNBSmartPtr(const wxFNBSmartPtr& rhs) + : m_ref(NULL) + { + *this = rhs; + } + + /** + * Assignment operator + * \param rhs right hand side + * \return reference to this + */ + wxFNBSmartPtr& operator=(const wxFNBSmartPtr& rhs) + { + // increase the reference count + if( m_ref == rhs.m_ref ) + return *this; + + // Delete previous reference + DeleteRefCount(); + + if( !rhs.m_ref ) + return *this; + + m_ref = rhs.m_ref; + m_ref->IncRef(); + return *this; + } + + /** + * Destructor + */ + virtual ~wxFNBSmartPtr() + { + DeleteRefCount(); + } + + /** + * Replace the current pointer with ptr + * if the current ptr is not NULL, it will be freed (reference counting free) before assingning the new ptr + * \param ptr new pointer + */ + void Reset(type_ptr ptr) + { + DeleteRefCount(); + CreateFresh( ptr ); + } + + /** + * Return pointer the row data pointer + * \return pointer to the row data pointer + */ + type_ptr Get() + { + return m_ref->GetData(); + } + + /** + * Overload the '->' operator + * \return pointer to the row data pointer + */ + type_ptr operator->() const + { + return m_ref->GetData(); + } + + /** + * Dereference operator + * \return dereference the row data + */ + T& operator*() const + { + return *(m_ref->GetData()); + } + + /** + * Test for NULL operator + * \return true if the internal row data or the reference counting class are NULL false otherwise + */ + bool operator!() const + { + if( !m_ref ) + return true; + + return m_ref->GetData() == NULL; + } + +private: + void DeleteRefCount() + { + // decrease the ref count (or delete pointer if it is 1) + if( m_ref ) + { + if( m_ref->GetRefCount() == 1 ) + { + delete m_ref; + m_ref = NULL; + } + else + m_ref->DecRef(); + } + }; + + void CreateFresh(type_ptr ptr) + { + m_ref = new SmartPtrRef( ptr ); + } +}; + +#endif // FNB_SMART_PTR_H diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/popup_dlg.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/popup_dlg.h new file mode 100644 index 0000000000..517c0189f9 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/popup_dlg.h @@ -0,0 +1,58 @@ +#ifndef FNB_POPUPDLG_H +#define FNB_POPUPDLG_H + +#include +#include +#include + +class wxListBox; +class wxFlatNotebook; +class wxPanel; + +class wxTabNavigatorWindow : public wxDialog +{ +protected: + wxListBox *m_listBox; + long m_selectedItem; + std::map m_indexMap; + wxPanel *m_panel; + static wxBitmap m_bmp; + +protected: + void CloseDialog(); + +public: + /** + * Parameterized constructor + * \param parent dialog parent window + */ + wxTabNavigatorWindow(wxWindow* parent); + + /** + * Default constructor + */ + wxTabNavigatorWindow(); + + /** + * Destructor + */ + virtual ~wxTabNavigatorWindow(); + + /** + * Create the dialog, usually part of the two steps construction of a + * dialog + * \param parent dialog parent window + */ + void Create(wxWindow* parent); + + /// Event handling + void OnKeyUp(wxKeyEvent &event); + void OnNavigationKey(wxNavigationKeyEvent &event); + void OnItemSelected(wxCommandEvent &event); + void OnPanelPaint(wxPaintEvent &event); + void OnPanelEraseBg(wxEraseEvent &event); + void PopulateListControl(wxFlatNotebook *book); +}; + +#endif // FNB_POPUPDLG_H + diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/renderer.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/renderer.h new file mode 100644 index 0000000000..fd036f14c6 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/renderer.h @@ -0,0 +1,221 @@ +#ifndef RENDERE_H +#define RENDERE_H + +#include +#include +#include +#include +#include +#include +#include + +class wxFNBRenderer +{ +protected: + // A bitmap that holds the background of the + // x button which is drawn on a tab + wxBitmap m_tabXBgBmp, m_xBgBmp, m_leftBgBmp, m_rightBgBmp; + wxBitmap m_arrowDown, m_arrowUp; + +public: + wxFNBRenderer(); + virtual ~wxFNBRenderer(); + + /** + * Generic function that draws the tabs and updates values in the page container + * MAC requires that the event will be skipped, so we must pass it + * \param pageContainer window that contains the tabs drawing + * \param dc device context + */ + virtual void DrawTabs(wxWindow* pageContainer, wxDC &dc, wxEvent &event); + + /** + * Draw a small 'x' button on top of the tab + * \param pageContainer parent window on which to draw + * \param dc device context to use + * \param rect button rectangle + * \param tabIdx tab index + * \param btnStatus button status, can be one of + * - wxFNB_BTN_PRESSED + * - wxFNB_BTN_HOVER + * - wxFNB_BTN_NONE + * \param tabXBgBmp [output] background bitmap of the area of the button (just before it is painted) + */ + virtual void DrawTabX(wxWindow* pageContainer, wxDC& dc, const wxRect& rect, const int& tabIdx, const int btnStatus); + + /** + * Draw tab + * \param pageContainer parent window on which to draw + * \param dc device context to use + * \param posx tab x coordinate + * \param tabIdx tab index + * \param tabWidth tab width + * \param tabHeight tab height + * \param btnStatus btnStatus the little 'x' button (on top of the active tab) status, can be one of + * - wxFNB_BTN_PRESSED + * - wxFNB_BTN_HOVER + * - wxFNB_BTN_NONE + */ + virtual void DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus) = 0; + + /** + * Calculate tab width , based on its index (for image, x button on tab) + * \param pageContainer pageContainer parent window on which to draw + * \param tabIdx tab index + * \param tabHeight the tab height (used for tan() function calculations) + * \return tab bouding rectangle size + */ + virtual int CalcTabWidth (wxWindow* pageContainer, int tabIdx, int tabHeight); + + /** + * Calculate tab height + * \param pageContainer pageContainer parent window on which to draw + * \return tab bouding rectangle size + */ + virtual int CalcTabHeight(wxWindow* pageContainer); + + /** + * Get a bitmap from device context, with rect size + * \param dc device context + * \param rect bitmap rectangle + * \param bmp [output] bitmap + */ + virtual void GetBitmap(wxDC& dc, const wxRect &rect, wxBitmap &bmp); + + /** + * Draw a bottom line for the tabs area + * \param pageContainer the owner of this tabs + * \param dc device context to use + * \param selTabX1 the selection tab X1 coord + * \param selTabX2 the selection tab X2 coord + */ + void DrawTabsLine(wxWindow *pageContainer, wxDC& dc, wxCoord selTabX1 = -1, wxCoord selTabX2 = -1); + + /** + * Brighten a given colour with amount + * \param color starting colour + * \param percent percent, 0 - no change, 100 - white + * \return brighten colour + */ + static wxColor LightColour(const wxColour& color, int percent); + static wxColor DarkColour(const wxColour &color, int precent); + + /** + * Paint rectangle with gradient colouring + * \param dc device context + * \param rect rectangle + * \param startColor gradient colour 1 + * \param endColor gradient colour 2 + * \param vertical use vertical gradient or horizontal + */ + static void PaintStraightGradientBox(wxDC& dc, const wxRect& rect, const wxColour& startColor, const wxColour& endColor, bool vertical = true); + + // Navigation buttons position + int GetLeftButtonPos(wxWindow *pageContainer); + int GetRightButtonPos(wxWindow *pageContainer); + int GetXPos(wxWindow *pageContainer); + int GetButtonsAreaLength(wxWindow *pageContainer); + int GetDropArrowButtonPos(wxWindow *pageContainer); + + /// Draw right arrow button to the right area of the tabs + virtual void DrawRightArrow(wxWindow *pageContainer, wxDC &dc); + + /// Draw left arrow button to the right area of the tabs + virtual void DrawLeftArrow (wxWindow *pageContainer, wxDC &dc); + + /// Draw 'x' button to the right area of the tabs + virtual void DrawX (wxWindow *pageContainer, wxDC &dc); + + /** + * Draw tab drag hint, the default implementation is to do nothing ... + * u can override this function to provide a nice feedback to user + * \param pageContainer a pointer to the owner wxPageContainer + * \param tabIdx index of the tab that will be replaced with the dragged tab + */ + virtual void DrawDragHint(wxWindow *pageContainer, int tabIdx); + + /** + * Draw drop down arrow on the right corner + * \param pageContainer window tabs container + * \param dc device context + */ + void DrawDropDownArrow(wxWindow* pageContainer, wxDC& dc); + + /** + * Return an array of tabs info that can fit to screen starting from 'from' + * \param pageContainer + * \param [output] vTabInfo + * \param from + */ + virtual void NumberTabsCanFit(wxWindow *pageContainer, std::vector &vTabInfo, int from = -1); + +protected: + /** + * Generate random colour + * \return random colour + */ + wxColour RandomColor(); + + +}; + +typedef wxFNBSmartPtr wxFNBRendererPtr; + +class wxFNBRendererDefault : public wxFNBRenderer +{ +public: + wxFNBRendererDefault(){} + virtual ~wxFNBRendererDefault(){} + virtual void DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus); +}; + +class wxFNBRendererFirefox2 : public wxFNBRenderer +{ +public: + wxFNBRendererFirefox2(){} + virtual ~wxFNBRendererFirefox2(){} + virtual void DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus); +}; + +class wxFNBRendererVC8 : public wxFNBRenderer +{ + int m_factor; + bool m_first; + +public: + wxFNBRendererVC8() : m_factor(1), m_first(true) {} + virtual ~wxFNBRendererVC8(){} + virtual void DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus); + virtual void DrawTabs(wxWindow *pageContainer, wxDC &dc, wxEvent &event); + void NumberTabsCanFit(wxWindow *pageContainer, std::vector &vTabInfo, int from = -1); + +private: + void FillVC8GradientColor(wxWindow* pageContainer, wxDC &dc, const wxPoint tabPoints[], const bool bSelectedTab, const int tabIdx); + int GetEndX(const wxPoint tabPoints[], const int &y, long style); + int GetStartX(const wxPoint tabPoints[], const int &y, long style); + +}; + +//----------------------------------- +// Renderer manager class +//----------------------------------- + +class wxFNBRendererMgr +{ + friend class wxFNBSingleton; + std::map m_renderers; +public: + /** + * Return the renderer according to the style flag, the returned pointer should not be + * deleted by caller, it is owned by this class + * \param style window style flag + * \return wxFNBRenderer + */ + wxFNBRendererPtr GetRenderer(long style); + +private: + wxFNBRendererMgr(); + virtual ~wxFNBRendererMgr(); +}; +typedef wxFNBSingleton wxFNBRendererMgrST; +#endif // RENDERE_H diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFNBDropTarget.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFNBDropTarget.h new file mode 100644 index 0000000000..771b57bba9 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFNBDropTarget.h @@ -0,0 +1,161 @@ +#ifndef _WX_FNB_DROP_TARGET_H +#define _WX_FNB_DROP_TARGET_H + +#include +#include + +/** +\brief Contains the information about dragged page (page index and container). +*/ +class wxFNBDragInfo +{ + wxWindow * m_Container; + int m_PageIndex; +public: + /** + Constructor + \param container - pointer to wxPageContainer object which contains dragged page + \param pageindex - index of dragged page + */ + wxFNBDragInfo(wxWindow * container, int pageindex) : m_Container(container), m_PageIndex(pageindex){} + + /** + * \brief default constructor + */ + wxFNBDragInfo() : m_Container(0), m_PageIndex(0){} + + /** + Returns wxPageContainer object which contains dragged page + */ + wxWindow * GetContainer() {return m_Container;} + + /** + Returns the index of dragged page + */ + int GetPageIndex() {return m_PageIndex;} +}; + +class wxFNBDragInfoDataObject : public wxDataObjectSimple +{ +public: + wxFNBDragInfoDataObject(const wxDataFormat& format):wxDataObjectSimple(format) + {} + + wxFNBDragInfo DragInfo; + + wxFNBDragInfo *GetData() + { + return &DragInfo; + } + + // get the size of our data + virtual size_t GetDataSize() const + { return sizeof(wxFNBDragInfo); } + + // copy our data to the buffer + virtual bool GetDataHere(void *buf) const + { + memcpy(buf, &DragInfo, sizeof(wxFNBDragInfo)); + return true; + } + + // copy data from buffer to our data + virtual bool SetData(size_t WXUNUSED(len), const void *buf) + { + // don't check the len. Under Win98 the value of 'len' == 0 + memcpy(&DragInfo, buf, sizeof(wxFNBDragInfo)); + return true; + } +}; + +/** +\brief Used for processing drag-n-drop opeartions +*/ +template +class wxFNBDropTarget : public wxDropTarget +{ +private: + typedef wxDragResult (T::*pt2Func)(wxCoord, wxCoord, int, wxWindow *); + T* m_pParent; + pt2Func m_pt2CallbackFunc; + wxFNBDragInfoDataObject * m_DataObject; +public: + /** + \brief Constructor + \param pParent - Object that will handle drag-n-drop operation + \param pt2CallbackFunc - Pointer to callback method which should be called after dragging the notebook page + */ + wxFNBDropTarget(T* pParent, pt2Func pt2CallbackFunc) + : m_pParent(pParent) + , m_pt2CallbackFunc(pt2CallbackFunc) + , m_DataObject(NULL) + { + m_DataObject = new wxFNBDragInfoDataObject(wxDataFormat(wxT("wxFNB"))); + SetDataObject(m_DataObject); + } + /** + \brief Virtual Destructor + */ + virtual ~wxFNBDropTarget(void) {} + /** + \brief Used for processing drop operation + \param x - X-coordinate + \param y - Y-coordinate + \param def - Result of drag-n-drop operation + */ + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult WXUNUSED(def)) + { + GetData(); + wxFNBDragInfo * draginfo = (wxFNBDragInfo *)m_DataObject->GetData(); + if(!draginfo) + { + return wxDragNone; + } + return (m_pParent->*m_pt2CallbackFunc)(x, y, draginfo->GetPageIndex(), (T *)draginfo->GetContainer()); + } +}; + +/** + * \ingroup wxFlatNotebook + * This class represents a source for a drag and drop operation + * We override wxDropSource class to provide user with a feedback + * + * \version 1.0 + * first version + * + * \date 10-11-2006 + * + * \author Eran + */ +class wxFNBDropSource : public wxDropSource +{ + wxWindow* m_win; +public: + /** + * Parameterized constructor + * \param win + * \param iconCopy + * \param iconMove + * \param iconNone + */ + wxFNBDropSource(wxWindow* win = NULL) + : wxDropSource(win) + , m_win( win ) + { + } + + /** + * Destructor + */ + virtual ~wxFNBDropSource() + { + } + + /** + * give some custom UI feedback during the drag and drop operation in this function. It is called on each mouse move, so your implementation must not be too slow + * \param effect The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and wxDragNone + * \return + */ + virtual bool GiveFeedback(wxDragResult effect); +}; +#endif diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFlatNotebook.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFlatNotebook.h new file mode 100644 index 0000000000..4da5743f72 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/wxFlatNotebook.h @@ -0,0 +1,959 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wxFlatNotebook.cpp +// Purpose: generic implementation of flat style notebook class. +// Author: Eran Ifrah +// Modified by: Priyank Bolia +// Created: 30/12/2005 +// Modified: 01/01/2006 +// Copyright: Eran Ifrah (c) +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WXFLATNOTEBOOK_H +#define WXFLATNOTEBOOK_H + +#include +#include +#include + +#ifdef __WXMSW__ +#ifdef _DEBUG +//#include +#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__) +#else +#define DEBUG_NEW new +#endif +#endif // __WXMSW__ + +#ifdef WXMAKINGDLL_FNB +# define WXDLLIMPEXP_FNB WXEXPORT +#elif defined(WXUSINGDLL_FNB) +# define WXDLLIMPEXP_FNB WXIMPORT +#else /* not making nor using FNB as DLL */ +# define WXDLLIMPEXP_FNB +#endif // WXMAKINGDLL_FNB + +#include +#include +#include + +#include + +class wxPageContainer; + +#ifndef M_PI +#define M_PI 3.14159265358979 +#endif + +#ifndef wxFNB_HEIGHT_SPACER +#define wxFNB_HEIGHT_SPACER 12 +#endif + +// forward declerations +class wxFNBRenderer; +class wxFNBRendererDefault; +class wxFNBRendererFirefox2; +class wxFNBRendererVC8; +class wxTabNavigatorWindow; +class wxMenu; + +// Since some compiler complains about std::min, we define our own macro +#define FNB_MIN(a, b) ((a > b) ? b : a) + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxBitmap, wxFlatNotebookImageList, WXDLLIMPEXP_FNB); +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxWindow*, wxWindowPtrArray, WXDLLIMPEXP_FNB); + +/// wxFlatNotebook styles +#define wxFNB_DEFAULT_STYLE wxFNB_MOUSE_MIDDLE_CLOSES_TABS +#define wxFNB_FF2 0x00010000 // Firefox 2 tabs style +#define wxFNB_VC71 wxFNB_FF2 // support old styles +#define wxFNB_FANCY_TABS wxFNB_FF2 // support old styles +#define wxFNB_TABS_BORDER_SIMPLE 0x00000004 +#define wxFNB_NO_X_BUTTON 0x00000008 +#define wxFNB_NO_NAV_BUTTONS 0x00000010 +#define wxFNB_MOUSE_MIDDLE_CLOSES_TABS 0x00000020 +#define wxFNB_BOTTOM 0x00000040 +#define wxFNB_NODRAG 0x00000080 +#define wxFNB_VC8 0x00000100 +#define wxFNB_X_ON_TAB 0x00000200 +#define wxFNB_BACKGROUND_GRADIENT 0x00000400 +#define wxFNB_COLORFUL_TABS 0x00000800 +#define wxFNB_DCLICK_CLOSES_TABS 0x00001000 +#define wxFNB_SMART_TABS 0x00002000 +#define wxFNB_DROPDOWN_TABS_LIST 0x00004000 +#define wxFNB_ALLOW_FOREIGN_DND 0x00008000 +#define wxFNB_LEFT 0x00010000 // Left tabs +#define wxFNB_CUSTOM_DLG 0x00020000 // Popup customize dialog using right click + +/// General macros +#define VERTICAL_BORDER_PADDING 4 +#define BUTTON_SPACE 16 +#define VC8_SHAPE_LEN 16 +#define MASK_COLOR wxColor(0, 128, 128) + +enum wxCustomizeDlgOptions { + wxFNB_CUSTOM_TAB_LOOK = 0x00000001, ///< Allow customizing the tab appearance + wxFNB_CUSTOM_ORIENTATION = 0x00000002, ///< Allow customizing the tab orientation (upper | bottom) + wxFNB_CUSTOM_FOREIGN_DRAG = 0x00000004, ///< Allow accept foreign tabs + wxFNB_CUSTOM_LOCAL_DRAG = 0x00000008, ///< Allow local drag and drop + wxFNB_CUSTOM_CLOSE_BUTTON = 0x00000010, ///< Allow customizing close button + wxFNB_CUSTOM_ALL = wxFNB_CUSTOM_TAB_LOOK | + wxFNB_CUSTOM_ORIENTATION | + wxFNB_CUSTOM_FOREIGN_DRAG | + wxFNB_CUSTOM_LOCAL_DRAG | + wxFNB_CUSTOM_CLOSE_BUTTON +}; + +/** +* \brief Nice cross-platform flat notebook with X-button, navigation arrows and much more +*/ + +class WXDLLIMPEXP_FNB wxFlatNotebook : public wxPanel +{ +public: + + ///Default constructor + wxFlatNotebook() + { Init(); } + + /// Parametrized constructor + /** + \param parent - parent window + \param id - window ID + \param pos - window position + \param size - window size + \param style - window style + \param name - window class name + */ + wxFlatNotebook(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxT("Flat Notebook")); + + /** + * See wxFlatNotebook constructor + */ + bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxT("Flat Notebook")); + + /// Destructor + virtual ~wxFlatNotebook(void); + + /** + * Cleans up all the optimization structures held globally + * + */ + static void CleanUp (); + + /** + * Advance the current selection + *\param bForward - if set to true then selection should be advanced forward otherwise - backward + */ + void AdvanceSelection(bool bForward); + + /// Apends new notebook page + /** + \param windows - window to be appended + \param caption - tab caption + \param selected - determines if new page should be selected automatically + \param imgindex - page image index + */ + bool AddPage(wxWindow* windows, const wxString& caption, const bool selected = false, const int imgindex = -1); + + /// Inserts new notebook page + /** + \param index - page index + \param page - window to be appended + \param text - tab caption + \param select - determines if new page should be selected automatically + \param imgindex - page image index + */ + bool InsertPage(size_t index, wxWindow* page, const wxString& text, bool select = false, const int imgindex = -1); + /// Changes the selection from currently visible/selected page to the page given by index. + /** + \param page - index of page to be selected + */ + void SetSelection(size_t page); + /// Removes the window from the notebook, and destroys the window associated with that notebook page. + /** + * \param page - index of page to be deleted + * \param notify - by default wxFlatNotebook fires two events: + * - wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED + * - wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING + * to disable this functionality set notify to false + */ + void DeletePage(size_t page, bool notify = true); + + /// Deletes all notebook pages and destroys all windows associated with pages + bool DeleteAllPages(); + + /// Returns the total number of pages in the notebook. + int GetPageCount() const; + + /// Returns the window object associated with selected notebook page. + wxWindow * GetCurrentPage() const; + + /// Returns the window object associated with a notebook page. + /** + \param page - page index + */ + wxWindow * GetPage(size_t page) const; + /// Returns the page index of the window object. + /** + \param win - window object + */ + int GetPageIndex(wxWindow* win) const; + + /// Returns the currently visible/selected notebook page 0 based index. + int GetSelection() const; + + /** + * Return the previous selection, useful when implementing smart tabulation + * \return previous selection, or wxNOT_FOUND + */ + int GetPreviousSelection() const; + + const wxArrayInt &GetBrowseHistory() const; + + /// Returns tab header inclination angle of specified page + /** + \param page_index - page index + \param result - pointer to the variable that receives the result + */ + bool GetPageShapeAngle(int page_index, unsigned int * result); + /// Sets tab header inclination angle of specified page + /** + \param page_index - page index + \param angle - new value of tab header inclination angle + */ + void SetPageShapeAngle(int page_index, unsigned int angle); + /// Sets tab header inclination angle for all pages + /** + \param angle - new value of tab header inclination angle + */ + void SetAllPagesShapeAngle(unsigned int angle); + + /// Returns the best size for a page + wxSize GetPageBestSize(); + + /// Sets the caption/text of the notebook page + /** + \param page - page index + \param text - new value of tab caption + */ + bool SetPageText(size_t page, const wxString& text); + + /** + * Removes the window from the notebook, and destroys the window associated with that notebook page. + * \param page - index of page to be deleted + * \param notify - by default wxFlatNotebook fires two events: + * - wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED + * - wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING + * to disable this functionality set notify to false + */ + bool RemovePage(size_t page, bool notify = true); + + /// Sets the amount of space around each page's icon and label, in pixels. + /** + NB: The vertical padding cannot be changed in for wxFlatNotebook. + \param padding - new amount of space around each page's icon and label + */ + void SetPadding(const wxSize& padding); + /// Alters the notebook style + /** + \param style - new value of notebook style + */ + virtual void SetWindowStyleFlag(long style); + + /// Sets a right click menu to the notebook + /** + \param menu - right click menu object + */ + void SetRightClickMenu(wxMenu* menu); + /// Returns the page text + /** + \param page - page index + */ + wxString GetPageText(size_t page); + /// Sets an image index of specified page + /** + \param page - page index + \param imgindex - new image index + */ + void SetPageImageIndex(size_t page, int imgindex); + /// Returns an image index of specified page + /** + \param page - page index + */ + int GetPageImageIndex(size_t page); + /// Sets gradient colors (only applicable when using the wxFNB_FANCY_TABS) + /** + \param from - first gradient colour + \param to - second gradient colour + \param border - page border colour + */ + void SetGradientColors(const wxColour& from, const wxColour& to, const wxColour& border); + /// Sets first gradient colour + /** + \param from - new value of first gradient colour + */ + void SetGradientColorFrom(const wxColour& from); + + /// Sets second gradient colour + /** + \param to - new value of second gradient colour + */ + void SetGradientColorTo(const wxColour& to); + /// Sets the colour of page border + /** + \param border - new value of the colour of page border + */ + void SetGradientColorBorder(const wxColour& border); + /// Sets an image list associated with notebook pages + /** + \param imglist - image list object. + Image list assigned with this method will not be deleted by wxFlatNotebook's destructor, you must delete it yourself. + */ + void SetImageList(wxFlatNotebookImageList * imglist); + + /// Returns an image list object associated with wxFlatNotebook + wxFlatNotebookImageList * GetImageList(); + + /** + * \brief Drop event handler, to be passed as function pointer to CTextDropTarget class. + * \param x X coordinate where the drop take place + * \param y Y coordinate where the drop take place + * \param nTabPage page index + * \param wnd_oldContainer pointer to wxPageContainer object that contained dragged page + * \return Drag operation identifier + */ + wxDragResult OnDropTarget(wxCoord x, wxCoord y, int nTabPage, wxWindow * wnd_oldContainer); + + /// Enable / Disable page + /** + \param page - page to enable/diable + \param enabled - set to true to enable the tab, false otherwise + */ + void Enable(size_t page, bool enabled); + + /// Return Returns true if if the page is enabled + /** + \param page - page index + */ + bool GetEnabled(size_t page); + + /// Set the active tab text + /** + \param textColour - the active tab text colour + */ + void SetActiveTabTextColour(const wxColour& textColour); + + /// Gets first gradient colour + const wxColour& GetGradientColorFrom(); + + /// Gets second gradient colour + const wxColour& GetGradientColorTo(); + + /// Gets the tab border colour + const wxColour& SetGradientColorBorder(); + + /// Get the active tab text + const wxColour& GetActiveTabTextColour(); + + /// Get the non-active tab text color + const wxColour& GetNonActiveTabTextColour(); + + /// Set the non-active tab text color + void SetNonActiveTabTextColour(const wxColour& color); + + /// Return the tab area panel + wxPanel* GetTabArea() { return (wxPanel*)m_pages; } + + /// Get the tab area background colour + const wxColour& GetTabAreaColour(); + + /// Set the tab area background colour + void SetTabAreaColour(const wxColour& color); + + /// Get the active tab color + const wxColour& GetActiveTabColour(); + + /// Set the active tab color + void SetActiveTabColour(const wxColour& color); + + /** + * Return the padding used between the text and icons, text and borders, etc. + * \return padding in pixels + */ + int GetPadding() { return m_nPadding; } + + /** + * Set the customization options available for this notebook, can be one of the wxFNB_CUSTOM_* values + * this values is by default set to wxFNB_CUSTOM_ALL + */ + void SetCustomizeOptions(long options); + + /** + * Get the customization options available for this notebook + */ + long GetCustomizeOptions() const; + + // Setters / Getters + void SetForceSelection(bool force) { m_bForceSelection = force; } + bool GetForceSelection() { return m_bForceSelection; } + wxWindowPtrArray& GetWindows() { return m_windows; } + wxPageContainer *GetPages() { return m_pages; } + wxBoxSizer* GetMainSizer() { return m_mainSizer; } + +protected: + /// Initialization function, called internally + virtual void Init(); + wxPageContainer *m_pages; + +private: + /// Internal flag to force selection of page, + /// even if this page is disabled. + /// used incase such that the book itself need to update its selection. + /// e.g. after DeletePage() + bool m_bForceSelection; + + wxBoxSizer* m_mainSizer; + + /// vector of all the windows associated with the notebook pages. + wxWindowPtrArray m_windows; + wxFNBDropTarget *m_pDropTarget; + int m_nFrom; + int m_nPadding; + wxTabNavigatorWindow *m_popupWin; + bool m_sendPageChangeEvent; ///< Ugly but needed to allow SetSelection to send / dont send event + +// DECLARE_DYNAMIC_CLASS(wxFlatNotebook) + DECLARE_EVENT_TABLE() + void OnNavigationKey(wxNavigationKeyEvent& event); +}; + +/** +* \brief Contains parameters of notebook page +*/ +class WXDLLIMPEXP_FNB wxPageInfo +{ +private: + // Members + /// Page caption + wxString m_strCaption; + + /// Page position + wxPoint m_pos; + + /// Page size + wxSize m_size; + + /// Page region + wxRegion m_region; + + /// Angle for painting tab + unsigned int m_TabAngle; + + /// Page image index + int m_ImageIndex; + + /// Page enable/disabled flag + bool m_bEnabled; + + /// Tab 'x' button rectangle + wxRect m_xRect; + + /// Tab color + wxColor m_color; + +public: + + /// Default constructor + wxPageInfo(): m_strCaption(wxEmptyString), m_TabAngle(0), m_ImageIndex(-1), m_bEnabled(true){}; + /// Parametrized constructor + /** + \param caption - page caption + \param imgindex - image index + */ + wxPageInfo(const wxString& caption, int imgindex) : + m_strCaption(caption), m_pos(-1, -1), m_size(-1, -1), m_TabAngle(0), m_ImageIndex(imgindex), m_bEnabled(true){} + /// Destructor + ~wxPageInfo(){}; + + /// Sets page caption + /** + \param value - new page caption + */ + void SetCaption(wxString value) {m_strCaption = value;} + + ///Returns page caption + wxString GetCaption() {return m_strCaption;} + + /// Sets page position + /** + \param value - new page position + */ + void SetPosition(wxPoint value) {m_pos = value;} + + ///Returns page position + const wxPoint & GetPosition() {return m_pos;} + + /// Sets page size + /** + \param value - new page size + */ + void SetSize(wxSize value) {m_size = value;} + + ///Returns page size + const wxSize & GetSize() {return m_size;} + + /// Sets the tab header inclination angle + /** + \param value - new tab header inclination angle + */ + void SetTabAngle(unsigned int value) {m_TabAngle = FNB_MIN((unsigned int)(45), (unsigned int)(value));} + + /// Returns an inclination of tab header borders + unsigned int GetTabAngle() {return m_TabAngle;} + /// Sets page image index + /** + \param value - new image index + */ + void SetImageIndex(int value) {m_ImageIndex = value;} + + /// Returns an image index + int GetImageIndex() {return m_ImageIndex;} + + /// Return true if the page is enabled + bool GetEnabled() { return m_bEnabled; } + + /// Set the page enable/disable flag + /** + \param enabled - new page enable status + */ + void Enable(bool enabled) { m_bEnabled = enabled; } + + /// Set the page region + /** + \param n - number of points + \param points - array of points that construct the region + */ + void SetRegion(const size_t n, const wxPoint points[]) { m_region = wxRegion(n, points); } + + /// Get the page region + wxRegion& GetRegion() { return m_region ; } + + /// Set the 'x' button rectangle area + /** + \param xrect - the 'x' button rectangle + */ + void SetXRect(const wxRect& xrect) { m_xRect = xrect; } + + /// Get the 'x' button rectangle + wxRect& GetXRect() { return m_xRect; } + + /** + * + * \return The tab color + */ + wxColor GetColor() { return m_color; } + + /** + * + * \param color Tab face color + */ + void SetColor(wxColor& color) { m_color = color; } + +}; + +WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPageInfo, wxPageInfoArray, WXDLLIMPEXP_FNB); + +/// Button status +enum +{ + wxFNB_BTN_PRESSED, + wxFNB_BTN_HOVER, + wxFNB_BTN_NONE +}; + +/// Hit Test results +enum +{ + wxFNB_TAB, ///< On a tab + wxFNB_X, ///< On the X button + wxFNB_TAB_X, ///< On the 'X' button (tab's X button) + wxFNB_LEFT_ARROW, ///< On the rotate left arrow button + wxFNB_RIGHT_ARROW, ///< On the rotate right arrow button + wxFNB_DROP_DOWN_ARROW, ///< On the drop down arrow button + wxFNB_NOWHERE ///< Anywhere else +}; + +/** +* \brief Notebook page +*/ +class WXDLLIMPEXP_FNB wxPageContainer : public wxPanel +{ +protected: + + friend class wxFlatNotebook; + friend class wxFNBRenderer; + friend class wxFNBRendererDefault; + friend class wxFNBRendererVC71; + friend class wxFNBRendererVC8; + + wxFlatNotebookImageList * m_ImageList; + +public: + /// Parametrized constructor + /** + \param parent - parent window + \param id - window ID + \param pos - window position + \param size - window size + \param style - window style + */ + wxPageContainer(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); + /// Destructor + virtual ~wxPageContainer(void); + + /// Sets an image list associated with notebook pages + /** + \param imglist - image list object. + Image list assigned with this method will not be deleted by wxFlatNotebook's destructor, you must delete it yourself. + */ + virtual void SetImageList(wxFlatNotebookImageList * imglist) {m_ImageList = imglist;} + + /// Returns an image list object associated with wxFlatNotebook + virtual wxFlatNotebookImageList * GetImageList() {return m_ImageList;} + + /// Apends new notebook page + /** + \param caption - tab caption + \param selected - determines if new page should be selected automatically + \param imgindex - page image index + */ + virtual bool AddPage(const wxString& caption, const bool selected = false, const int imgindex = -1); + + /// Inserts new notebook page + /** + \param index - page index + \param page - window to be appended + \param text - tab caption + \param select - determines if new page should be selected automatically + \param imgindex - page image index + */ + virtual bool InsertPage(size_t index, wxWindow* page, const wxString& text, bool select = false, const int imgindex = -1); + + /// Changes the selection from currently visible/selected page to the page given by index. + /** + \param page - index of page to be selected + */ + virtual void SetSelection(size_t page); + + /// Returns the current selection page index + virtual int GetSelection() { return m_iActivePage; } + + /// Advances the selection + /** + \param bForward - if set to true then selection should be advanced forward otherwise - backward + */ + virtual void AdvanceSelection(bool bForward); + + /// Return the number of pages + virtual size_t GetPageCount() { return m_pagesInfoVec.size(); } + + /// Returns the page caption + /** + \param page - page index + */ + virtual wxString GetPageText(size_t page) { return m_pagesInfoVec[page].GetCaption(); } + + /// Set the caption of the page + /** + \param page - page index + \param text - new page caption + */ + virtual bool SetPageText(size_t page, const wxString& text) { m_pagesInfoVec[page].SetCaption(text); return true; } + + /// Sets an image index of specified page + /** + \param page - page index + \param imgindex - new image index + */ + virtual void SetPageImageIndex(size_t page, int imgindex); + /// Returns an image index of specified page + /** + \param page - page index + */ + virtual int GetPageImageIndex(size_t page); + + /// Enable / Disable page + /** + \param page - page to enable/diable + \param enabled - set to true to enable the tab, false otherwise + */ + virtual void Enable(size_t page, bool enabled); + + /// Return Returns true if if the page is enabled + /** + \param page - page index + */ + virtual bool GetEnabled(size_t page); + + /// Style helper methods + bool HasFlag(int flag); + + /** + * Return a vector containing the tabs informations (used by the redereres) + * \return tabs info vector + */ + wxPageInfoArray& GetPageInfoVector() { return m_pagesInfoVec; } + + /** + * Return the first graident colour ("from") + * \return gradient colour 1 + */ + const wxColour& GetGradientColourFrom() const { return m_colorFrom; } + + /** + * Return the second graident colour ("to") + * \return gradient colour 2 + */ + const wxColour& GetGradientColourTo() const { return m_colorTo; } + /** + * Return tab's border colour + * \return border colour + */ + const wxColour& GetBorderColour() const { return m_colorBorder; } + + /** + * Return non active tab's text colour + * \return non active tab's text colour + */ + const wxColour& GetNonoActiveTextColor() const { return m_nonActiveTextColor; } + + /** + * Return the active tab colour + * \return tab colour + */ + const wxColour& GetActiveTabColour() const { return m_activeTabColor; } + + /** + * Get the previous selected tab, wxNOT_FOUND if none + * \return index of previous selected tab + */ + int GetPreviousSelection() const;// { return m_iPreviousActivePage; } + + /** + * Draw a tab preview + */ + void DrawDragHint(); + + /** + * Set the customization options available for this notebook, can be one of the wxFNB_CUSTOM_* values + * this values is by default set to wxFNB_CUSTOM_ALL + */ + void SetCustomizeOptions(long options); + + /** + * Get the customization options available for this notebook + */ + long GetCustomizeOptions() const; + + DECLARE_EVENT_TABLE() + // Event handlers + virtual void OnPaint(wxPaintEvent& event); + virtual void OnSize(wxSizeEvent& WXUNUSED(event)); + virtual void OnMouseMove(wxMouseEvent& event); + virtual void OnLeftDown(wxMouseEvent& event); + virtual void OnLeftUp(wxMouseEvent& event); + virtual void OnRightDown(wxMouseEvent& event); + virtual void OnMiddleDown(wxMouseEvent& event); + virtual void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) { } + virtual void OnMouseLeave(wxMouseEvent& event); + virtual void OnMouseEnterWindow(wxMouseEvent& event); + virtual void OnLeftDClick(wxMouseEvent &event); + virtual void OnTabMenuSelection(wxCommandEvent &event); + virtual void OnShowCustomizeDialog(wxCommandEvent &event); + +protected: + + void RotateLeft(); + void RotateRight(); + + /** + * Popup a menu that contains all the tabs to be selected by user + */ + void PopupTabsMenu(); + + void ClearFlag(int flag); + + /// return true if tabIdx has image + bool TabHasImage(int tabIdx); + + /// Check whether the style is set to default + virtual bool IsDefaultTabs(); + + /// Return the color of the single line border + virtual wxColor GetSingleLineBorderColor(); + + /// Return true if page is visible + virtual bool IsTabVisible(size_t page); + + /// Return if pt is anywhere on a tab, button or anywhere else + virtual int HitTest(const wxPoint& pt, wxPageInfo& pageInfo, int &tabIdx); + + /// Display tool tip when mouse is hovering a tab + virtual void ShowTabTooltip(int tabIdx); + + /// A wrapper from calling the DoDeletePage() + virtual void DeletePage(size_t page); + + /// Remove all pages from the container (it also deletes them) + virtual void DeleteAllPages(); + + /// Perform the actual deletion of a tab from the container + /// The window is also deleted using this function + virtual void DoDeletePage(size_t page); + + /// Preform the actual page selection + virtual void DoSetSelection(size_t page); + + /// Return the index of the last visible index + virtual int GetLastVisibleTab(); + + /// Return the number of tabs that can be scrolled left + /// starting from the first visible tab (i.e. m_nFrom) + virtual int GetNumTabsCanScrollLeft(); + + /// Return the number of visible tabs + virtual int GetNumOfVisibleTabs(); + + /** + * \brief Drop event handler, to be passed as function pointer to CTextDropTarget class. + * \param x X coordinate where the drop take place + * \param y Y coordinate where the drop take place + * \param nTabPage page index + * \param wnd_oldContainer pointer to wxPageContainer object that contained dragged page + * \return Drag operation identifier + */ + virtual wxDragResult OnDropTarget(wxCoord x, wxCoord y, int nTabPage, wxWindow * wnd_oldContainer); + + /** + * \brief Moves the tab page from one location to another + * \param nMove The index of the tab page to be moved. + * \param nMoveTo The index for the tab page, where it has to be moved + */ + virtual void MoveTabPage(int nMove, int nMoveTo); + + /// Check whether page can fit to the current + /// screen or a scrolling is required + /** + \param page - page index + */ + virtual bool CanFitToScreen(size_t page); + + void PushPageHistory(int page); + + //remove page from the history by its value + //after the page removal, all items in the history + //are updated if needed + void PopPageHistory(int page); + +protected: + + wxPageInfoArray m_pagesInfoVec; + int m_iActivePage; + int m_nFrom; + + /// Drop target for enabling drag'n'drop of tabs + wxFNBDropTarget *m_pDropTarget; + +private: + /// Pointer to the parent window + wxWindow *m_pParent; + + /// The right click menu + wxMenu* m_pRightClickMenu; + + /// Gradient colors + wxColour m_colorFrom, m_colorTo, m_colorBorder, m_activeTextColor, m_nonActiveTextColor, m_tabAreaColor, m_activeTabColor; + + /// X,>,< buttons status, can be one of + /// - Pressed + /// - Hover + /// - None + int m_nXButtonStatus, m_nLeftButtonStatus, m_nRightButtonStatus, m_nTabXButtonStatus; + + /// holds the button id in case a left click is done on one of them + int m_nLeftClickZone; + + //int m_iPreviousActivePage; + wxArrayInt m_history; + int m_nArrowDownButtonStatus; + + /// Customize menu + wxMenu *m_customMenu; + long m_customizeOptions; +}; + +/** +* \brief Holds information about events associated with wxFlatNotebook objects +*/ +class WXDLLIMPEXP_FNB wxFlatNotebookEvent : public wxNotifyEvent +{ + //DECLARE_DYNAMIC_CLASS(wxFlatNotebookEvent) + size_t sel, oldsel; + +public: + /// Constructor + /** + \param commandType - event type + \param winid - window ID + \param nSel - current selection + \param nOldSel - old selection + */ + wxFlatNotebookEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, int nSel = -1, int nOldSel = -1) + : wxNotifyEvent(commandType, winid), sel(nSel), oldsel(nOldSel) + {} + /// Sets the value of current selection + /** + \param s - index of currently selected page + */ + void SetSelection(int s) { sel = s; } + /// Sets the value of previous selection + /** + \param s - index of previously selected page + */ + void SetOldSelection(int s) { oldsel = s; } + /// Returns the index of currently selected page + int GetSelection() { return (int)sel; } + /// Returns the index of previously selected page + int GetOldSelection() { return (int)oldsel; } +}; + +BEGIN_DECLARE_EVENT_TYPES() +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_FNB, wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED, 50000) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_FNB, wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGING, 50001) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_FNB, wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING, 50002) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_FNB, wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU, 50003) +DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_FNB, wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED, 50004) +END_DECLARE_EVENT_TYPES() + +typedef void (wxEvtHandler::*wxFlatNotebookEventFunction)(wxFlatNotebookEvent&); + +#define wxFlatNotebookEventHandler(func) \ + (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFlatNotebookEventFunction, &func) + +#define EVT_FLATNOTEBOOK_PAGE_CHANGED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED, winid, wxFlatNotebookEventHandler(fn)) + +#define EVT_FLATNOTEBOOK_PAGE_CHANGING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGING, winid, wxFlatNotebookEventHandler(fn)) + +#define EVT_FLATNOTEBOOK_PAGE_CLOSING(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING, winid, wxFlatNotebookEventHandler(fn)) + +#define EVT_FLATNOTEBOOK_CONTEXT_MENU(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU, winid, wxFlatNotebookEventHandler(fn)) + +#define EVT_FLATNOTEBOOK_PAGE_CLOSED(winid, fn) \ + wx__DECLARE_EVT1(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED, winid, wxFlatNotebookEventHandler(fn)) + +#endif // WXFLATNOTEBOOK_H diff --git a/sdk/wxflatnotebook/include/wx/wxFlatNotebook/xh_fnb.h b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/xh_fnb.h new file mode 100644 index 0000000000..09c3b78a44 --- /dev/null +++ b/sdk/wxflatnotebook/include/wx/wxFlatNotebook/xh_fnb.h @@ -0,0 +1,41 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_fnb.h +// Purpose: XRC resource for wxFlatNotebook +// Author: Armel Asselin +// Created: 2006/10/30 +// RCS-ID: $Id: $ +// Copyright: (c) 2006 Armel Asselin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FLATNOTBK_H_ +#define _WX_XH_FLATNOTBK_H_ + +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma interface "xh_notbk.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_NOTEBOOK + +#include "wx/wxFlatNotebook/wxFlatNotebook.h" + +class WXDLLIMPEXP_FNB wxFlatNotebook; + +class WXDLLIMPEXP_FNB wxFlatNotebookXmlHandler : public wxXmlResourceHandler +{ +DECLARE_DYNAMIC_CLASS(wxFlatNotebookXmlHandler) +public: + wxFlatNotebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxFlatNotebook *m_notebook; +}; + +#endif + +#endif // _WX_XH_NOTBK_H_ diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/App.cpp b/sdk/wxflatnotebook/samples/wxFlatNotebook/App.cpp new file mode 100644 index 0000000000..2f8e3dca56 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/App.cpp @@ -0,0 +1,57 @@ +#include "App.h" +#include +#include +#include "Frame.h" +#include + +IMPLEMENT_APP(App) + +Frame *pMainFrame = (Frame *) NULL; +wxPrintData *g_printData = (wxPrintData*) NULL; +wxPageSetupData *g_pageSetupData = (wxPageSetupData*) NULL; + +// Externs +extern void InitXmlResource(); + +App::App(void) +{ +} + +App::~App(void) +{ +} + +// Initialize our application +bool App::OnInit(void) +{ + // Init resources and add the PNG handler + wxSystemOptions::SetOption(wxT("msw.remap"), 0); + wxXmlResource::Get()->InitAllHandlers(); + wxImage::AddHandler( new wxPNGHandler ); + wxImage::AddHandler( new wxCURHandler ); + wxImage::AddHandler( new wxBMPHandler ); + wxImage::AddHandler( new wxXPMHandler ); + + InitXmlResource(); + + pMainFrame = new Frame(NULL, wxT("Frame")); + + // initialize print data and setup + g_printData = new wxPrintData; + g_pageSetupData = new wxPageSetupDialogData; + + // show the main frame + pMainFrame->Show(TRUE); + + // set the main frame to be the main window + SetTopWindow(pMainFrame); + return TRUE; +} + +int App::OnExit(void) +{ + // delete global print data and setup + if (g_printData) delete g_printData; + if (g_pageSetupData) delete g_pageSetupData; + return 0; +} diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/App.h b/sdk/wxflatnotebook/samples/wxFlatNotebook/App.h new file mode 100644 index 0000000000..160e8eedc4 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/App.h @@ -0,0 +1,13 @@ +#pragma once +#include + +class App : + public wxApp +{ +public: + App(void); + ~App(void); + virtual bool OnInit(void); + virtual int OnExit(void); +}; +DECLARE_APP(App) diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.cpp b/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.cpp new file mode 100644 index 0000000000..147c28ba91 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.cpp @@ -0,0 +1,789 @@ +#include "Frame.h" +#include +#include "wx/colordlg.h" +#include + +#define MENU_EDIT_DELETE_ALL 10000 +#define MENU_EDIT_ADD_PAGE 10001 +#define MENU_EDIT_DELETE_PAGE 10002 +#define MENU_EDIT_SET_SELECTION 10003 +#define MENU_EDIT_ADVANCE_SELECTION_FWD 10004 +#define MENU_EDIT_ADVANCE_SELECTION_BACK 10005 +#define MENU_SET_ALL_TABS_SHAPE_ANGLE 10006 +#define MENU_SHOW_IMAGES 10007 +#define MENU_USE_VC71_STYLE 10008 +#define MENU_USE_DEFULT_STYLE 10009 +#define MENU_USE_FANCY_STYLE 10010 +#define MENU_SELECT_GRADIENT_COLOR_FROM 10011 +#define MENU_SELECT_GRADIENT_COLOR_TO 10012 +#define MENU_SELECT_GRADIENT_COLOR_BORDER 10013 +#define MENU_SET_PAGE_IMAGE_INDEX 10014 +#define MENU_HIDE_X 10015 +#define MENU_HIDE_NAV_BUTTONS 10016 +#define MENU_USE_MOUSE_MIDDLE_BTN 10017 +#define MENU_DRAW_BORDER 10018 +#define MENU_USE_BOTTOM_TABS 10019 +#define MENU_ENABLE_TAB 10020 +#define MENU_DISABLE_TAB 10021 +#define MENU_ENABLE_DRAG_N_DROP 10022 +#define MENU_DCLICK_CLOSES_TAB 10023 +#define MENU_USE_VC8_STYLE 10024 + +#define MENU_SET_ACTIVE_TEXT_COLOR 10027 +#define MENU_DRAW_TAB_X 10028 +#define MENU_SET_ACTIVE_TAB_COLOR 10029 +#define MENU_SET_TAB_AREA_COLOR 10030 +#define MENU_SELECT_NONACTIVE_TEXT_COLOR 10031 +#define MENU_GRADIENT_BACKGROUND 10032 +#define MENU_COLORFULL_TABS 10033 +#define MENU_SMART_TABS 10034 +#define MENU_USE_DROP_ARROW_BUTTON 10035 +#define MENU_ALLOW_FOREIGN_DND 10036 +#define MENU_EDIT_INSERT_PAGE 10037 +#define MENU_EDIT_INSERT_BEFORE_PAGE 10038 +#define MENU_EDIT_SELECT_PAGE_TO_DELETE 10039 + +BEGIN_EVENT_TABLE(Frame, wxFrame) +EVT_MENU_RANGE(MENU_HIDE_X, MENU_USE_BOTTOM_TABS, Frame::OnStyle) +EVT_MENU(wxID_EXIT, Frame::OnQuit) +EVT_MENU(MENU_EDIT_DELETE_ALL, Frame::OnDeleteAll) +EVT_MENU(MENU_EDIT_ADD_PAGE, Frame::OnAddPage) +EVT_MENU(MENU_EDIT_DELETE_PAGE, Frame::OnDeletePage) +EVT_MENU(MENU_EDIT_SET_SELECTION, Frame::OnSetSelection) +EVT_MENU(MENU_EDIT_ADVANCE_SELECTION_FWD, Frame::OnAdvanceSelectionFwd) +EVT_MENU(MENU_EDIT_ADVANCE_SELECTION_BACK, Frame::OnAdvanceSelectionBack) +EVT_MENU(MENU_SET_ALL_TABS_SHAPE_ANGLE, Frame::OnSetAllPagesShapeAngle) +EVT_MENU(MENU_SHOW_IMAGES, Frame::OnShowImages) +EVT_MENU_RANGE(MENU_SELECT_GRADIENT_COLOR_FROM, MENU_SELECT_GRADIENT_COLOR_BORDER, Frame::OnSelectColor) +EVT_MENU(MENU_USE_VC71_STYLE, Frame::OnVC71Style) +EVT_MENU(MENU_USE_VC8_STYLE, Frame::OnVC8Style) +EVT_MENU(MENU_USE_DEFULT_STYLE, Frame::OnDefaultStyle) +EVT_MENU(MENU_USE_FANCY_STYLE, Frame::OnFancyStyle) +EVT_MENU(MENU_SET_PAGE_IMAGE_INDEX, Frame::OnSetPageImageIndex) +EVT_MENU(MENU_ENABLE_TAB, Frame::OnEnableTab) +EVT_MENU(MENU_DISABLE_TAB, Frame::OnDisableTab) +EVT_MENU(MENU_ENABLE_DRAG_N_DROP, Frame::OnEnableDrag) +EVT_MENU(MENU_SELECT_NONACTIVE_TEXT_COLOR, Frame::OnSelectColor) +EVT_MENU(MENU_SET_ACTIVE_TAB_COLOR, Frame::OnSelectColor) +EVT_MENU(MENU_SET_TAB_AREA_COLOR, Frame::OnSelectColor) +EVT_MENU(MENU_SET_ACTIVE_TEXT_COLOR, Frame::OnSelectColor) +EVT_MENU(MENU_DRAW_TAB_X, Frame::OnDrawTabX) +EVT_MENU(MENU_DCLICK_CLOSES_TAB, Frame::OnDClickCloseTab) +EVT_MENU(MENU_GRADIENT_BACKGROUND, Frame::OnGradientBack) +EVT_MENU(MENU_COLORFULL_TABS, Frame::OnColorfullTabs) +EVT_MENU(MENU_SMART_TABS, Frame::OnSmartTabs) +EVT_MENU(MENU_USE_DROP_ARROW_BUTTON, Frame::OnDropDownArrow) +EVT_MENU(MENU_ALLOW_FOREIGN_DND, Frame::OnAllowForeignDnd) + +EVT_UPDATE_UI(MENU_USE_DROP_ARROW_BUTTON, Frame::OnDropDownArrowUI) +EVT_UPDATE_UI(MENU_HIDE_NAV_BUTTONS, Frame::OnHideNavigationButtonsUI) +EVT_UPDATE_UI(MENU_ALLOW_FOREIGN_DND, Frame::OnAllowForeignDndUI) + +EVT_FLATNOTEBOOK_PAGE_CHANGING(-1, Frame::OnPageChanging) +EVT_FLATNOTEBOOK_PAGE_CHANGED(-1, Frame::OnPageChanged) +EVT_FLATNOTEBOOK_PAGE_CLOSING(-1, Frame::OnPageClosing) + +EVT_MENU(MENU_EDIT_INSERT_PAGE, Frame::OnInsertPage) +EVT_MENU(MENU_EDIT_INSERT_BEFORE_PAGE, Frame::OnInsertBeforeGivenPage) +EVT_MENU(MENU_EDIT_SELECT_PAGE_TO_DELETE, Frame::OnDeleteGivenPage) +END_EVENT_TABLE() + +Frame::Frame(wxWindow* WXUNUSED(parent), const wxChar *title) +: m_fileMenu(NULL) +, m_editMenu(NULL) +, m_visualMenu(NULL) +, m_menuBar(NULL) +#ifdef DEVELOPMENT +, m_logTargetOld(NULL) +#endif +, book(NULL) +, secondBook(NULL) +, m_bShowImages(false) +, m_bVCStyle(false) +, newPageCounter(0) +{ + m_ImageList.push_back(wxXmlResource::Get()->LoadBitmap(wxT("book_red"))); + m_ImageList.push_back(wxXmlResource::Get()->LoadBitmap(wxT("book_green"))); + m_ImageList.push_back(wxXmlResource::Get()->LoadBitmap(wxT("book_blue"))); + Create(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600), wxDEFAULT_FRAME_STYLE | wxMAXIMIZE |wxNO_FULL_REPAINT_ON_RESIZE); + Maximize(); +} + +Frame::~Frame(void) +{ +#ifdef DEVELOPMENT + delete wxLog::SetActiveTarget(m_logTargetOld); +#endif + wxFNBRendererMgrST::Free(); +} + +bool Frame::Create(wxFrame * parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ + wxFrame::Create(parent, id, caption, pos, size, style); + + // Init the menu bar + m_menuBar = new wxMenuBar( wxMB_DOCKABLE ); + m_fileMenu = new wxMenu(); + m_visualMenu = new wxMenu(); + + wxMenuItem *item = new wxMenuItem(m_fileMenu, wxID_EXIT, wxT("E&xit"), wxT("Exit demo"), wxITEM_NORMAL); + m_fileMenu->Append(item); + + m_editMenu = new wxMenu(); + item = new wxMenuItem(m_editMenu, MENU_EDIT_ADD_PAGE, wxT("New Page\tCtrl+N"), wxT("Add New Page"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_INSERT_PAGE, wxT("Insert Page\tCtrl+I"), wxT("Insert New Page"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_DELETE_PAGE, wxT("Delete Page\tCtrl+F4"), wxT("Delete Page"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_SELECT_PAGE_TO_DELETE, wxT("Select Page to Delete"), wxT("Delete Given Page"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_DELETE_ALL, wxT("Delete All Pages"), wxT("Delete All Pages"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_SET_SELECTION, wxT("Set Selection"), wxT("Set Selection"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_ADVANCE_SELECTION_FWD, wxT("Advance Selection Forward"), wxT("Advance Selection Forward"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_EDIT_ADVANCE_SELECTION_BACK, wxT("Advance Selection Backward"), wxT("Advance Selection Backward"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SET_ALL_TABS_SHAPE_ANGLE, wxT("Set an inclination of tab header borders"), wxT("Set the shape of tab header"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_SET_PAGE_IMAGE_INDEX, wxT("Set image index of selected page"), wxT("Set image index"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_SHOW_IMAGES, wxT("Show Images"), wxT("Show Images"), wxITEM_CHECK); + m_editMenu->Append(item); + + wxMenu *styleMenu = new wxMenu(); + item = new wxMenuItem(styleMenu, MENU_USE_DEFULT_STYLE, wxT("Use Default Style"), wxT("Use VC71 Style"), wxITEM_RADIO); + styleMenu->Append(item); + + item = new wxMenuItem(styleMenu, MENU_USE_VC71_STYLE, wxT("Use VC71 Style"), wxT("Use VC71 Style"), wxITEM_RADIO); + styleMenu->Append(item); + + item = new wxMenuItem(styleMenu, MENU_USE_VC8_STYLE, wxT("Use VC8 Style"), wxT("Use VC8 Style"), wxITEM_RADIO); + styleMenu->Append(item); + + item = new wxMenuItem(styleMenu, MENU_USE_FANCY_STYLE, wxT("Use Fancy Style"), wxT("Use Fancy Style"), wxITEM_RADIO); + styleMenu->Append(item); + + m_visualMenu->Append(-1, wxT("Tabs Style"), styleMenu); + + item = new wxMenuItem(m_visualMenu, MENU_SELECT_GRADIENT_COLOR_FROM, wxT("Select fancy tab style 'from' color"), wxT("Select fancy tab style 'from' color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SELECT_GRADIENT_COLOR_TO, wxT("Select fancy tab style 'to' color"), wxT("Select fancy tab style 'to' color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SELECT_GRADIENT_COLOR_BORDER, wxT("Select fancy tab style 'border' color"), wxT("Select fancy tab style 'border' color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + m_editMenu->AppendSeparator(); + item = new wxMenuItem(m_editMenu, MENU_HIDE_NAV_BUTTONS, wxT("Hide Navigation Buttons"), wxT("Hide Navigation Buttons"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check(true); + + item = new wxMenuItem(m_editMenu, MENU_HIDE_X, wxT("Hide X Button"), wxT("Hide X Button"), wxITEM_CHECK); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_SMART_TABS, wxT("Smart tabbing"), wxT("Smart tabbing"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check( false ); + + item = new wxMenuItem(m_editMenu, MENU_USE_DROP_ARROW_BUTTON, wxT("Use drop down button for tab navigation"), wxT("Use drop down arrow for quick tab navigation"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check( true ); + m_editMenu->AppendSeparator(); + + item = new wxMenuItem(m_editMenu, MENU_USE_MOUSE_MIDDLE_BTN, wxT("Use Mouse Middle Button as 'X' button"), wxT("Use Mouse Middle Button as 'X' button"), wxITEM_CHECK); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_DCLICK_CLOSES_TAB, wxT("Mouse double click closes tab"), wxT("Mouse double click closes tab"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check(false); + + m_editMenu->AppendSeparator(); + + item = new wxMenuItem(m_editMenu, MENU_USE_BOTTOM_TABS, wxT("Use Bottoms Tabs"), wxT("Use Bottoms Tabs"), wxITEM_CHECK); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_ENABLE_TAB, wxT("Enable Tab"), wxT("Enable Tab"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_DISABLE_TAB, wxT("Disable Tab"), wxT("Disable Tab"), wxITEM_NORMAL); + m_editMenu->Append(item); + + item = new wxMenuItem(m_editMenu, MENU_ENABLE_DRAG_N_DROP, wxT("Enable Drag And Drop of Tabs"), wxT("Enable Drag And Drop of Tabs"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check(false); + + item = new wxMenuItem(m_editMenu, MENU_ALLOW_FOREIGN_DND, wxT("Enable Drag And Drop of Tabs to foreign notebooks"), wxT("Enable Drag And Drop of Tabs to foreign notebooks"), wxITEM_CHECK); + m_editMenu->Append(item); + item->Check(false); + + item = new wxMenuItem(m_visualMenu, MENU_DRAW_BORDER, wxT("Draw Border around tab area"), wxT("Draw Border around tab area"), wxITEM_CHECK); + m_visualMenu->Append(item); + item->Check(true); + + item = new wxMenuItem(m_visualMenu, MENU_DRAW_TAB_X, wxT("Draw X button On Active Tab"), wxT("Draw X button On Active Tab"), wxITEM_CHECK); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SET_ACTIVE_TAB_COLOR, wxT("Select Active Tab Color"), wxT("Select Active Tab Color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SET_TAB_AREA_COLOR, wxT("Select Tab Area Color"), wxT("Select Tab Area Color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + + item = new wxMenuItem(m_visualMenu, MENU_SET_ACTIVE_TEXT_COLOR, wxT("Select active tab text color"), wxT("Select active tab text color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_SELECT_NONACTIVE_TEXT_COLOR, wxT("Select NON-active tab text color"), wxT("Select NON-active tab text color"), wxITEM_NORMAL); + m_visualMenu->Append(item); + + item = new wxMenuItem(m_visualMenu, MENU_GRADIENT_BACKGROUND, wxT("Use Gradient Coloring for tab area"), wxT("Use Gradient Coloring for tab area"), wxITEM_CHECK); + m_visualMenu->Append(item); + item->Check( false ); + + item = new wxMenuItem(m_visualMenu, MENU_COLORFULL_TABS, wxT("Colorful tabs"), wxT("Colorful tabs"), wxITEM_CHECK); + m_visualMenu->Append(item); + item->Check( false ); + + m_menuBar->Append(m_fileMenu, wxT("&File")); + m_menuBar->Append(m_editMenu, wxT("&Edit")); + m_menuBar->Append(m_visualMenu, wxT("&Tab Appearance")); + + SetMenuBar(m_menuBar); + + // Create a right click menu + wxMenu *rmenu = new wxMenu(); + item = new wxMenuItem(rmenu, MENU_EDIT_DELETE_PAGE, wxT("Close Tab\tCtrl+F4"), wxT("Close Tab"), wxITEM_NORMAL); + rmenu->Append(item); + + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(mainSizer); + + long bookStyle = 0; + m_bVCStyle ? bookStyle |= wxFNB_VC71 : bookStyle |= 0; + bookStyle |= wxFNB_TABS_BORDER_SIMPLE; + bookStyle |= wxFNB_NODRAG; + bookStyle |= wxFNB_DROPDOWN_TABS_LIST; + bookStyle |= wxFNB_NO_NAV_BUTTONS; + bookStyle |= wxFNB_CUSTOM_DLG; + + book = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(300, 400), bookStyle); + + // Allow the second notebook to accept foreign pages + // from other notebooks around + bookStyle &= ~(wxFNB_NODRAG); + bookStyle |= wxFNB_ALLOW_FOREIGN_DND; + secondBook = new wxFlatNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(300, 400), bookStyle); + + // Set right click menu to the notebook + book->SetRightClickMenu(rmenu); + + // Set the image list + book->SetImageList(&m_ImageList); + + // Add spacer between the books + wxPanel *spacer = new wxPanel(this, wxID_ANY); + spacer->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + mainSizer->Add(book, 6, wxEXPAND); + mainSizer->Add(spacer, 0, wxALL | wxEXPAND); + mainSizer->Add(secondBook, 2, wxEXPAND); + + // Add some pages to the second notebook + Freeze(); + wxTextCtrl *text = new wxTextCtrl(secondBook, wxID_ANY, wxT("Second Book Page 1"), wxDefaultPosition, wxDefaultSize, + wxTE_MULTILINE); + bool ret = secondBook->AddPage(text, wxT("Second Book Page 1")); + + text = new wxTextCtrl(secondBook, wxID_ANY, wxT("Second Book Page 2"), wxDefaultPosition, wxDefaultSize, + wxTE_MULTILINE); + ret = secondBook->AddPage(text, wxT("Second Book Page 2")); + + Thaw(); + +#ifdef DEVELOPMENT + text = new wxTextCtrl(this, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxSize(250, 250), + wxTE_MULTILINE | wxTE_READONLY); + + m_logTargetOld = wxLog::SetActiveTarget( new wxLogTextCtrl(text) ); + mainSizer->Add(text, 1, wxEXPAND); +#endif + + Centre(); + mainSizer->Layout(); + SendSizeEvent(); + return true; +} + +void Frame::OnStyle(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + switch(event.GetId()) + { + case MENU_HIDE_NAV_BUTTONS: + if(event.IsChecked()) + { + // Hide the navigation buttons + style |= wxFNB_NO_NAV_BUTTONS; + } + else + { + style &= ~(wxFNB_NO_NAV_BUTTONS); + style &= ~(wxFNB_DROPDOWN_TABS_LIST); + } + book->SetWindowStyleFlag(style); + break; + case MENU_HIDE_X: + if(event.IsChecked()) + { + // Hide the X button + style |= wxFNB_NO_X_BUTTON; + } + else + { + if(style & wxFNB_NO_X_BUTTON) + style ^= wxFNB_NO_X_BUTTON; + } + book->SetWindowStyleFlag(style); + break; + case MENU_DRAW_BORDER: + if(event.IsChecked()) + { + style |= wxFNB_TABS_BORDER_SIMPLE; + } + else + { + if(style & wxFNB_TABS_BORDER_SIMPLE) + style ^= wxFNB_TABS_BORDER_SIMPLE; + } + book->SetWindowStyleFlag(style); + break; + case MENU_USE_MOUSE_MIDDLE_BTN: + if(event.IsChecked()) + { + style |= wxFNB_MOUSE_MIDDLE_CLOSES_TABS; + } + else + { + if(style & wxFNB_MOUSE_MIDDLE_CLOSES_TABS) + style ^= wxFNB_MOUSE_MIDDLE_CLOSES_TABS; + } + book->SetWindowStyleFlag(style); + break; + case MENU_USE_BOTTOM_TABS: + if(event.IsChecked()) + { + style |= wxFNB_BOTTOM; + } + else + { + if(style & wxFNB_BOTTOM) + style ^= wxFNB_BOTTOM; + } + book->SetWindowStyleFlag(style); + book->Refresh(); + break; + } +} + +void Frame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + Close(true); +} + +void Frame::OnDeleteAll(wxCommandEvent& WXUNUSED(event)) +{ + book->DeleteAllPages(); +} + +void Frame::OnShowImages(wxCommandEvent& event) +{ + m_bShowImages = event.IsChecked(); +} + +void Frame::OnVC71Style(wxCommandEvent& WXUNUSED(event)) +{ + long style = book->GetWindowStyleFlag(); + + // remove old tabs style + long mirror = ~(wxFNB_VC71 | wxFNB_VC8 | wxFNB_FANCY_TABS); + style &= mirror; + + style |= wxFNB_VC71; + + book->SetWindowStyleFlag(style); +} + +void Frame::OnVC8Style(wxCommandEvent& WXUNUSED(event)) +{ + long style = book->GetWindowStyleFlag(); + + // remove old tabs style + long mirror = ~(wxFNB_VC71 | wxFNB_VC8 | wxFNB_FANCY_TABS); + style &= mirror; + + // set new style + style |= wxFNB_VC8; + + book->SetWindowStyleFlag(style); +} + +void Frame::OnDefaultStyle(wxCommandEvent& WXUNUSED(event)) +{ + long style = book->GetWindowStyleFlag(); + + // remove old tabs style + long mirror = ~(wxFNB_VC71 | wxFNB_VC8 | wxFNB_FANCY_TABS); + style &= mirror; + + book->SetWindowStyleFlag(style); +} + +void Frame::OnFancyStyle(wxCommandEvent& WXUNUSED(event)) +{ + long style = book->GetWindowStyleFlag(); + + // remove old tabs style + long mirror = ~(wxFNB_VC71 | wxFNB_VC8 | wxFNB_FANCY_TABS); + style &= mirror; + + style |= wxFNB_FANCY_TABS; + book->SetWindowStyleFlag(style); +} + +void Frame::OnSelectColor(wxCommandEvent& event) +{ + // Open a color dialog + wxColourData data; + wxColourDialog dlg(this, &data); + if(dlg.ShowModal() == wxID_OK) + { + switch(event.GetId()) + { + case MENU_SELECT_GRADIENT_COLOR_BORDER: + book->SetGradientColorBorder(dlg.GetColourData().GetColour()); + break; + case MENU_SELECT_GRADIENT_COLOR_FROM: + book->SetGradientColorFrom(dlg.GetColourData().GetColour()); + break; + case MENU_SELECT_GRADIENT_COLOR_TO: + book->SetGradientColorTo(dlg.GetColourData().GetColour()); + break; + case MENU_SET_ACTIVE_TEXT_COLOR: + book->SetActiveTabTextColour(dlg.GetColourData().GetColour()); + break; + case MENU_SELECT_NONACTIVE_TEXT_COLOR: + book->SetNonActiveTabTextColour(dlg.GetColourData().GetColour()); + break; + case MENU_SET_ACTIVE_TAB_COLOR: + book->SetActiveTabColour(dlg.GetColourData().GetColour()); + break; + case MENU_SET_TAB_AREA_COLOR: + book->SetTabAreaColour(dlg.GetColourData().GetColour()); + break; + } + book->Refresh(); + } +} + +void Frame::OnAddPage(wxCommandEvent& WXUNUSED(event)) +{ + wxString caption; + + caption.Printf(wxT("New Page Added #%ld"), newPageCounter); + Freeze(); + book->AddPage(CreatePage(), caption, true, m_bShowImages ? rand() % (int)book->GetImageList()->size() : -1); + Thaw(); +} + +wxWindow* Frame::CreatePage() +{ + wxString caption; + caption.Printf(wxT("New Page Added #%ld"), newPageCounter++); + + return new wxTextCtrl(book, wxID_ANY, caption, wxDefaultPosition, book->GetPageBestSize(), + wxTE_MULTILINE); + +} + +void Frame::OnInsertPage(wxCommandEvent& WXUNUSED(event)) +{ + size_t index = book->GetSelection(); + Freeze(); + bool ret = InsertNotebookPage((long)index); + wxUnusedVar(ret); + Thaw(); +} + +void Frame::OnInsertBeforeGivenPage(wxCommandEvent& WXUNUSED(event)) +{ + long tabIdx = GetTabIndexFromUser (wxT("Insert Page"), wxT("Enter Tab Number to insert the page before:")); + if (tabIdx != -1) + { + Freeze(); + bool ret = InsertNotebookPage(tabIdx); + wxUnusedVar(ret); + Thaw(); + } +} + + +void Frame::OnDeletePage(wxCommandEvent& WXUNUSED(event)) +{ + DeleteNotebookPage (book->GetSelection()); +} + +void Frame::OnDeleteGivenPage(wxCommandEvent& WXUNUSED(event)) +{ + long tabIdx = GetTabIndexFromUser (wxT("Delete Page"), wxT("Enter Tab Number to delete:")); + if (tabIdx != -1) + DeleteNotebookPage (tabIdx); +} + +void Frame::OnSetSelection(wxCommandEvent& WXUNUSED(event)) +{ + long tabIdx = GetTabIndexFromUser (wxT("Enable Tab"), wxT("Enter Tab Number to enable:")); + if (tabIdx != -1) + book->SetSelection((size_t)tabIdx); +} + +void Frame::OnEnableTab(wxCommandEvent& WXUNUSED(event)) +{ + long tabIdx = GetTabIndexFromUser (wxT("Set Selection"), wxT("Enter Tab Number to select:")); + if (tabIdx != -1) + book->Enable((size_t)tabIdx, true); +} + +void Frame::OnDisableTab(wxCommandEvent& WXUNUSED(event)) +{ + long tabIdx = GetTabIndexFromUser (wxT("Disable Tab"), wxT("Enter Tab Number to disable:")); + if (tabIdx != -1) + book->Enable((size_t)tabIdx, false); +} + +void Frame::OnEnableDrag(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + { + if(style & wxFNB_NODRAG) + style ^= wxFNB_NODRAG; + } + else + { + style |= wxFNB_NODRAG; + } + + book->SetWindowStyleFlag(style); +} +long Frame::GetTabIndexFromUser(const wxString &title, const wxString &prompt) const +{ + wxTextEntryDialog dlg((wxWindow*)this, prompt, title); + if(dlg.ShowModal() == wxID_OK) + { + wxString val = dlg.GetValue(); + long tabIdx; + val.ToLong(&tabIdx); + return tabIdx; + } + return -1; +} + +void Frame::DeleteNotebookPage (long tabIdx) +{ + book->DeletePage (tabIdx); +} + +bool Frame::InsertNotebookPage (long tabIdx) +{ + wxString caption; + caption.Printf(wxT("New Page Inserted #%ld"), newPageCounter); + return book->InsertPage(tabIdx, CreatePage(), caption, true, m_bShowImages ? rand() % (int)book->GetImageList()->size() : -1); +} + +void Frame::OnSetAllPagesShapeAngle(wxCommandEvent& WXUNUSED(event)) +{ + + wxTextEntryDialog dlg(this, wxT("Enter an inclination of header borders (0-15):"), wxT("Set Angle")); + if(dlg.ShowModal() == wxID_OK) + { + wxString val = dlg.GetValue(); + unsigned int angle = wxAtoi(val); + book->SetAllPagesShapeAngle(angle); + } +} + +void Frame::OnSetPageImageIndex(wxCommandEvent& WXUNUSED(event)) +{ + + wxTextEntryDialog dlg(this, + wxString::Format(wxT("Enter an image index (0-%i):"), book->GetImageList()->size()-1), + wxT("Set Angle")); + if(dlg.ShowModal() == wxID_OK) + { + wxString val = dlg.GetValue(); + unsigned int imgindex = wxAtoi(val); + book->SetPageImageIndex(book->GetSelection(), imgindex); + } +} + +void Frame::OnAdvanceSelectionFwd(wxCommandEvent& WXUNUSED(event)) +{ + book->AdvanceSelection(true); +} + +void Frame::OnAdvanceSelectionBack(wxCommandEvent& WXUNUSED(event)) +{ + book->AdvanceSelection(false); +} + +void Frame::OnPageChanging(wxFlatNotebookEvent& WXUNUSED(event)) +{ +} + +void Frame::OnPageChanged(wxFlatNotebookEvent& event) +{ +#ifdef DEVELOPMENT + wxString msg; + msg.Printf(wxT("Page has changed, new selection is now=%ld"), event.GetSelection()); + wxLogMessage(msg); +#else + wxUnusedVar( event ); +#endif +} + +void Frame::OnPageClosing(wxFlatNotebookEvent& event) +{ +#ifdef DEVELOPMENT + wxString msg; + msg.Printf(wxT("Page is closing: selection=%ld"), event.GetSelection()); + wxLogMessage(msg); +#else + wxUnusedVar( event ); +#endif +} + +void Frame::OnDrawTabX(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + { + style |= wxFNB_X_ON_TAB; + } + else + { + if(style & wxFNB_X_ON_TAB) + style ^= wxFNB_X_ON_TAB; + } + + book->SetWindowStyleFlag(style); +} + +void Frame::OnDClickCloseTab(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + { + style |= wxFNB_DCLICK_CLOSES_TABS; + } + else + { + style &= ~(wxFNB_DCLICK_CLOSES_TABS); + } + + book->SetWindowStyleFlag(style); +} + + +void Frame::OnGradientBack(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + style |= wxFNB_BACKGROUND_GRADIENT; + else + style &= ~(wxFNB_BACKGROUND_GRADIENT); + book->SetWindowStyleFlag( style ); + book->Refresh(); +} + +void Frame::OnColorfullTabs(wxCommandEvent& event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + style |= wxFNB_COLORFUL_TABS; + else + style &= ~(wxFNB_COLORFUL_TABS); + book->SetWindowStyleFlag( style ); + book->Refresh(); +} + +void Frame::OnSmartTabs(wxCommandEvent &event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + style |= wxFNB_SMART_TABS; + else + style &= ~(wxFNB_SMART_TABS); + book->SetWindowStyleFlag( style ); + book->Refresh(); +} + +void Frame::OnDropDownArrow(wxCommandEvent &event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + { + style |= wxFNB_DROPDOWN_TABS_LIST; + style |= wxFNB_NO_NAV_BUTTONS; + } + else + { + style &= ~(wxFNB_DROPDOWN_TABS_LIST); + style &= ~(wxFNB_NO_NAV_BUTTONS); + } + + book->SetWindowStyleFlag( style ); + book->Refresh(); +} + +void Frame::OnHideNavigationButtonsUI(wxUpdateUIEvent & event) +{ + long style = book->GetWindowStyleFlag(); + event.Check( style & wxFNB_NO_NAV_BUTTONS ? true : false ); +} + +void Frame::OnDropDownArrowUI(wxUpdateUIEvent & event) +{ + long style = book->GetWindowStyleFlag(); + event.Check( style & wxFNB_DROPDOWN_TABS_LIST ? true : false ); +} + +void Frame::OnAllowForeignDnd(wxCommandEvent &event) +{ + long style = book->GetWindowStyleFlag(); + if(event.IsChecked()) + style |= wxFNB_ALLOW_FOREIGN_DND; + else + style &= ~(wxFNB_ALLOW_FOREIGN_DND); + book->SetWindowStyleFlag( style ); + book->Refresh(); +} + +void Frame::OnAllowForeignDndUI(wxUpdateUIEvent & event ) +{ + long style = book->GetWindowStyleFlag(); + event.Enable( style & wxFNB_NODRAG ? false : true ); +} diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.h b/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.h new file mode 100644 index 0000000000..7a3a0e8266 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/Frame.h @@ -0,0 +1,81 @@ +#pragma once +#include +#include + +class Frame : + public wxFrame +{ +public: + // Construction of MainFrame + Frame(wxWindow* parent, const wxChar *title); + virtual ~Frame(void); + bool Create(wxFrame * parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ); + wxWindow* CreatePage(); + + // Menus + wxMenu* m_fileMenu; + wxMenu* m_editMenu; + wxMenu* m_visualMenu; + + wxMenuBar* m_menuBar; + wxFlatNotebookImageList m_ImageList; + +#ifdef DEVELOPMENT + wxLog *m_logTargetOld; +#endif + + // Event handlers + + // Menu + virtual void OnInsertPage(wxCommandEvent& WXUNUSED(event)); + virtual void OnInsertBeforeGivenPage(wxCommandEvent& WXUNUSED(event)); + virtual void OnQuit(wxCommandEvent& WXUNUSED(event)); + virtual void OnDeleteAll(wxCommandEvent& WXUNUSED(event)); + virtual void OnAddPage(wxCommandEvent& WXUNUSED(event)); + virtual void OnDeletePage(wxCommandEvent& WXUNUSED(event)); + virtual void OnDeleteGivenPage(wxCommandEvent& WXUNUSED(event)); + virtual void OnSetSelection(wxCommandEvent& WXUNUSED(event)); + virtual void OnAdvanceSelectionFwd(wxCommandEvent& WXUNUSED(event)); + virtual void OnAdvanceSelectionBack(wxCommandEvent& WXUNUSED(event)); + virtual void OnShowImages(wxCommandEvent& WXUNUSED(event)); + virtual void OnVC71Style(wxCommandEvent& WXUNUSED(event)); + virtual void OnVC8Style(wxCommandEvent& WXUNUSED(event)); + virtual void OnDefaultStyle(wxCommandEvent& WXUNUSED(event)); + virtual void OnFancyStyle(wxCommandEvent& WXUNUSED(event)); + virtual void OnSelectColor(wxCommandEvent& event); + virtual void OnSetPageImageIndex(wxCommandEvent& event); + virtual void OnStyle(wxCommandEvent& event); + virtual void OnDrawTabX(wxCommandEvent& event); + virtual void OnGradientBack(wxCommandEvent& event); + virtual void OnColorfullTabs(wxCommandEvent& event); + virtual void OnSmartTabs(wxCommandEvent& event); + virtual void OnDropDownArrow(wxCommandEvent& event); + virtual void OnDropDownArrowUI(wxUpdateUIEvent & event); + virtual void OnHideNavigationButtonsUI(wxUpdateUIEvent & event); + + virtual void OnEnableTab(wxCommandEvent& event); + virtual void OnDisableTab(wxCommandEvent& event); + virtual void OnEnableDrag(wxCommandEvent& event); + virtual void OnDClickCloseTab(wxCommandEvent& event); + virtual void OnAllowForeignDnd( wxCommandEvent & event ); + virtual void OnAllowForeignDndUI( wxUpdateUIEvent & event ); + + // Notebook + virtual void OnPageChanging(wxFlatNotebookEvent& event); + virtual void OnPageChanged(wxFlatNotebookEvent& event); + virtual void OnPageClosing(wxFlatNotebookEvent& event); + virtual void OnSetAllPagesShapeAngle(wxCommandEvent& WXUNUSED(event)); + +private: + long GetTabIndexFromUser(const wxString &title, const wxString &prompt) const; + + void DeleteNotebookPage (long tabIdx); + bool InsertNotebookPage (long tabIdx); + wxFlatNotebook *book; + wxFlatNotebook *secondBook; + bool m_bShowImages; + bool m_bVCStyle; + int newPageCounter; + + DECLARE_EVENT_TABLE() +}; diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/Makefile.win b/sdk/wxflatnotebook/samples/wxFlatNotebook/Makefile.win new file mode 100644 index 0000000000..02db7eb81c --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/Makefile.win @@ -0,0 +1,36 @@ +# Project: wxFlatNotebookTest +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = App.obj Frame.obj resources.obj $(RES) +LINKOBJ = App.obj Frame.obj resources.obj $(RES) +LIBS = -L"E:/Program/Util/Programmer/Dev-CPP/lib" -L"../../lib" -mwindows -lwxFlatNotebook -lwxmsw26 -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 +INCS = -I"E:/Program/Util/Programmer/Dev-CPP/include" -I"../../include" +CXXINCS = -I"E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/backward" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/mingw32" -I"E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2" -I"E:/Program/Util/Programmer/Dev-CPP/include" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/msw" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/generic" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/animate" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/fl" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/gizmos" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/html" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/mmedia" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/net" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/ogl" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/plot" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/protocol" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/stc" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/svg" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/xml" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc" -I"E:/Program/Util/Programmer/Dev-CPP/include/wx" -I"../../include" +BIN = wxFlatNotebookTest.exe +CXXFLAGS = $(CXXINCS)-fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3 +CFLAGS = $(INCS)-fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -fvtable-thunks -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3 +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before wxFlatNotebookTest.exe all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CPP) $(LINKOBJ) -o "wxFlatNotebookTest.exe" $(LIBS) + +App.obj: App.cpp App.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wx.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/wx/setup.h E:/Program/Util/Programmer/Dev-CPP/include/wx/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gccpriv.h E:/Program/Util/Programmer/Dev-CPP/include/_mingw.h E:/Program/Util/Programmer/Dev-CPP/include/w32api.h E:/Program/Util/Programmer/Dev-CPP/include/wx/features.h E:/Program/Util/Programmer/Dev-CPP/include/wx/version.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dlimpexp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/debug.h E:/Program/Util/Programmer/Dev-CPP/include/assert.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/limits.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/syslimits.h E:/Program/Util/Programmer/Dev-CPP/include/limits.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stdarg.h E:/Program/Util/Programmer/Dev-CPP/include/wchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stddef.h E:/Program/Util/Programmer/Dev-CPP/include/wctype.h E:/Program/Util/Programmer/Dev-CPP/include/sys/types.h E:/Program/Util/Programmer/Dev-CPP/include/stdint.h E:/Program/Util/Programmer/Dev-CPP/include/string.h E:/Program/Util/Programmer/Dev-CPP/include/ctype.h E:/Program/Util/Programmer/Dev-CPP/include/tchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/memory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/stdio.h E:/Program/Util/Programmer/Dev-CPP/include/stdlib.h E:/Program/Util/Programmer/Dev-CPP/include/wx/buffer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/strconv.h E:/Program/Util/Programmer/Dev-CPP/include/wx/fontenc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/arrstr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msgout.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hash.h E:/Program/Util/Programmer/Dev-CPP/include/wx/intl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/log.h E:/Program/Util/Programmer/Dev-CPP/include/time.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iosfwrap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/logg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/event.h E:/Program/Util/Programmer/Dev-CPP/include/wx/clntdata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hashmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiimage.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filefn.h E:/Program/Util/Programmer/Dev-CPP/include/sys/stat.h E:/Program/Util/Programmer/Dev-CPP/include/fcntl.h E:/Program/Util/Programmer/Dev-CPP/include/io.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/private.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/wrapwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/windows.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/winundef.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/mslu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/log.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/longlong.h E:/Program/Util/Programmer/Dev-CPP/include/wx/thread.h E:/Program/Util/Programmer/Dev-CPP/include/wx/app.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/validate.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hash.h E:/Program/Util/Programmer/Dev-CPP/include/wx/vidmode.h E:/Program/Util/Programmer/Dev-CPP/include/wx/build.h E:/Program/Util/Programmer/Dev-CPP/include/wx/init.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/app.h E:/Program/Util/Programmer/Dev-CPP/include/wx/event.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconloc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stream.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/panelg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconbndl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/pen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/pen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/math.h E:/Program/Util/Programmer/Dev-CPP/include/math.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcmemory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcmemory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcprint.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcprint.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cmndata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/encinfo.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcscreen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcscreen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/menu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/menuitem.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/menuitem.h E:/Program/Util/Programmer/Dev-CPP/include/wx/ownerdrw.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/menu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/arrstr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/timer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stopwatch.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/timer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/settings.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msgdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/msgdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/setup.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cmndata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/ctrlsub.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bmpbuttn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/bmpbuttn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/checkbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/checkbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/checklst.h E:/Program/Util/Programmer/Dev-CPP/include/wx/listbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/listbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/checklst.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/scrolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/scrolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stattext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/stattext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/radiobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/radiobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/radiobut.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/radiobut.h E:/Program/Util/Programmer/Dev-CPP/include/wx/textctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/textctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/slider.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/slider95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gauge.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gauge95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/scrolwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/scrolwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dirdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dirdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/toolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/tbarbase.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/tbar95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imaglist.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/imaglist.h E:/Program/Util/Programmer/Dev-CPP/include/wx/combobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/combobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/layout.h E:/Program/Util/Programmer/Dev-CPP/include/wx/sizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bookctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/mdi.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/mdi.h E:/Program/Util/Programmer/Dev-CPP/include/wx/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statusbr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbr95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choicdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/choicdgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/textdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/textdlgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/valtext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/numdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/numdlgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filedlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/filedlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/valtext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/image.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagpng.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imaggif.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagpcx.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagjpeg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagtiff.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagpnm.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagxpm.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imagiff.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xmlres.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filesys.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filename.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/artprov.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xml/xml.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h Frame.h ../../include/wx/wxFlatNotebook/wxFlatNotebook.h E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/vector E:/Program/Util/Programmer/Dev-CPP/include/wx/sysopt.h + $(CPP) -c App.cpp -o App.obj $(CXXFLAGS) + +Frame.obj: Frame.cpp Frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wx.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/wx/setup.h E:/Program/Util/Programmer/Dev-CPP/include/wx/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gccpriv.h E:/Program/Util/Programmer/Dev-CPP/include/_mingw.h E:/Program/Util/Programmer/Dev-CPP/include/w32api.h E:/Program/Util/Programmer/Dev-CPP/include/wx/features.h E:/Program/Util/Programmer/Dev-CPP/include/wx/version.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dlimpexp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/debug.h E:/Program/Util/Programmer/Dev-CPP/include/assert.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/limits.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/syslimits.h E:/Program/Util/Programmer/Dev-CPP/include/limits.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stdarg.h E:/Program/Util/Programmer/Dev-CPP/include/wchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stddef.h E:/Program/Util/Programmer/Dev-CPP/include/wctype.h E:/Program/Util/Programmer/Dev-CPP/include/sys/types.h E:/Program/Util/Programmer/Dev-CPP/include/stdint.h E:/Program/Util/Programmer/Dev-CPP/include/string.h E:/Program/Util/Programmer/Dev-CPP/include/ctype.h E:/Program/Util/Programmer/Dev-CPP/include/tchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/memory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/stdio.h E:/Program/Util/Programmer/Dev-CPP/include/stdlib.h E:/Program/Util/Programmer/Dev-CPP/include/wx/buffer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/strconv.h E:/Program/Util/Programmer/Dev-CPP/include/wx/fontenc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/arrstr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msgout.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hash.h E:/Program/Util/Programmer/Dev-CPP/include/wx/intl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/log.h E:/Program/Util/Programmer/Dev-CPP/include/time.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iosfwrap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/logg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/event.h E:/Program/Util/Programmer/Dev-CPP/include/wx/clntdata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hashmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiimage.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filefn.h E:/Program/Util/Programmer/Dev-CPP/include/sys/stat.h E:/Program/Util/Programmer/Dev-CPP/include/fcntl.h E:/Program/Util/Programmer/Dev-CPP/include/io.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/private.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/wrapwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/windows.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/winundef.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/mslu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/log.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/longlong.h E:/Program/Util/Programmer/Dev-CPP/include/wx/thread.h E:/Program/Util/Programmer/Dev-CPP/include/wx/app.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/validate.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hash.h E:/Program/Util/Programmer/Dev-CPP/include/wx/vidmode.h E:/Program/Util/Programmer/Dev-CPP/include/wx/build.h E:/Program/Util/Programmer/Dev-CPP/include/wx/init.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/app.h E:/Program/Util/Programmer/Dev-CPP/include/wx/event.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconloc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stream.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/panelg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconbndl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/pen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/pen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/math.h E:/Program/Util/Programmer/Dev-CPP/include/math.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcmemory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcmemory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcclient.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcprint.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcprint.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cmndata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/encinfo.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dcscreen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dcscreen.h E:/Program/Util/Programmer/Dev-CPP/include/wx/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/menu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/menuitem.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/menuitem.h E:/Program/Util/Programmer/Dev-CPP/include/wx/ownerdrw.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/menu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/arrstr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/timer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stopwatch.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/timer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/settings.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msgdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/msgdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/setup.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cmndata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/ctrlsub.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bmpbuttn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/bmpbuttn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/brush.h E:/Program/Util/Programmer/Dev-CPP/include/wx/checkbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/checkbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/checklst.h E:/Program/Util/Programmer/Dev-CPP/include/wx/listbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/listbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/checklst.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/scrolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/scrolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stattext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/stattext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/radiobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/radiobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/radiobut.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/radiobut.h E:/Program/Util/Programmer/Dev-CPP/include/wx/textctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/textctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/slider.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/slider95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gauge.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gauge95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/scrolwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/scrolwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dirdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dirdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/toolbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/tbarbase.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/tbar95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/imaglist.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/imaglist.h E:/Program/Util/Programmer/Dev-CPP/include/wx/combobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/combobox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choice.h E:/Program/Util/Programmer/Dev-CPP/include/wx/layout.h E:/Program/Util/Programmer/Dev-CPP/include/wx/sizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bookctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/mdi.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/mdi.h E:/Program/Util/Programmer/Dev-CPP/include/wx/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/statusbr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/statbr95.h E:/Program/Util/Programmer/Dev-CPP/include/wx/choicdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/choicdgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/textdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/textdlgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/valtext.h E:/Program/Util/Programmer/Dev-CPP/include/wx/numdlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/numdlgg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filedlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/filedlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/valtext.h ../../include/wx/wxFlatNotebook/wxFlatNotebook.h E:/Program/Util/Programmer/Dev-CPP/include/c++/3.4.2/vector E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xmlres.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filesys.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filename.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/artprov.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xml/xml.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h + $(CPP) -c Frame.cpp -o Frame.obj $(CXXFLAGS) + +resources.obj: resources.cpp E:/Program/Util/Programmer/Dev-CPP/include/wx/wxprec.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/wx/setup.h E:/Program/Util/Programmer/Dev-CPP/include/wx/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/chkconf.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gccpriv.h E:/Program/Util/Programmer/Dev-CPP/include/_mingw.h E:/Program/Util/Programmer/Dev-CPP/include/w32api.h E:/Program/Util/Programmer/Dev-CPP/include/wx/features.h E:/Program/Util/Programmer/Dev-CPP/include/wx/version.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dlimpexp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/debug.h E:/Program/Util/Programmer/Dev-CPP/include/assert.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/limits.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/syslimits.h E:/Program/Util/Programmer/Dev-CPP/include/limits.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stdarg.h E:/Program/Util/Programmer/Dev-CPP/include/wchar.h E:/Program/Util/Programmer/Dev-CPP/lib/gcc/mingw32/3.4.2/include/stddef.h E:/Program/Util/Programmer/Dev-CPP/include/wctype.h E:/Program/Util/Programmer/Dev-CPP/include/sys/types.h E:/Program/Util/Programmer/Dev-CPP/include/stdint.h E:/Program/Util/Programmer/Dev-CPP/include/string.h E:/Program/Util/Programmer/Dev-CPP/include/ctype.h E:/Program/Util/Programmer/Dev-CPP/include/tchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filesys.h E:/Program/Util/Programmer/Dev-CPP/include/wx/stream.h E:/Program/Util/Programmer/Dev-CPP/include/stdio.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/memory.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/stdlib.h E:/Program/Util/Programmer/Dev-CPP/include/wx/buffer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/strconv.h E:/Program/Util/Programmer/Dev-CPP/include/wx/fontenc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/arrstr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msgout.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filefn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/time.h E:/Program/Util/Programmer/Dev-CPP/include/sys/stat.h E:/Program/Util/Programmer/Dev-CPP/include/fcntl.h E:/Program/Util/Programmer/Dev-CPP/include/io.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/private.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/wrapwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/platform.h E:/Program/Util/Programmer/Dev-CPP/include/windows.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/winundef.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/mslu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/longlong.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iosfwrap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wxchar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/log.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/logg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdicmn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hashmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/colour.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/filename.h E:/Program/Util/Programmer/Dev-CPP/include/wx/fs_mem.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xmlres.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/datetime.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/gdiimage.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gdiobj.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconloc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/artprov.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bitmap.h E:/Program/Util/Programmer/Dev-CPP/include/wx/icon.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xml/xml.h E:/Program/Util/Programmer/Dev-CPP/include/wx/defs.h E:/Program/Util/Programmer/Dev-CPP/include/wx/string.h E:/Program/Util/Programmer/Dev-CPP/include/wx/object.h E:/Program/Util/Programmer/Dev-CPP/include/wx/list.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_all.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_menu.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_dlg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_bttn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_chckb.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_tglbtn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_gauge.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_html.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_spin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_sttxt.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_slidr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_radbt.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_radbx.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_combo.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_chckl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_choic.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_datectrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_sizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/sizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/event.h E:/Program/Util/Programmer/Dev-CPP/include/wx/clntdata.h E:/Program/Util/Programmer/Dev-CPP/include/wx/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/cursor.h E:/Program/Util/Programmer/Dev-CPP/include/wx/utils.h E:/Program/Util/Programmer/Dev-CPP/include/wx/thread.h E:/Program/Util/Programmer/Dev-CPP/include/wx/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/font.h E:/Program/Util/Programmer/Dev-CPP/include/wx/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/region.h E:/Program/Util/Programmer/Dev-CPP/include/wx/validate.h E:/Program/Util/Programmer/Dev-CPP/include/wx/palette.h E:/Program/Util/Programmer/Dev-CPP/include/wx/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/accel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/hash.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dynarray.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/button.h E:/Program/Util/Programmer/Dev-CPP/include/wx/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/iconbndl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/toplevel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/dialog.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/panelg.h E:/Program/Util/Programmer/Dev-CPP/include/wx/window.h E:/Program/Util/Programmer/Dev-CPP/include/wx/containr.h E:/Program/Util/Programmer/Dev-CPP/include/wx/bookctrl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/msw/notebook.h E:/Program/Util/Programmer/Dev-CPP/include/wx/control.h E:/Program/Util/Programmer/Dev-CPP/include/wx/gbsizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/sizer.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_stbmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_notbk.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_listbk.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_choicbk.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_text.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_listb.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_toolb.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_bmpbt.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_stbox.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_scrol.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_tree.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_cald.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_listc.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_stlin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_bmp.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_unkwn.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_gdctl.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_frame.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_scwin.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_split.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_wizrd.h E:/Program/Util/Programmer/Dev-CPP/include/wx/wizard.h E:/Program/Util/Programmer/Dev-CPP/include/wx/panel.h E:/Program/Util/Programmer/Dev-CPP/include/wx/generic/wizard.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_statbar.h E:/Program/Util/Programmer/Dev-CPP/include/wx/xrc/xh_mdi.h + $(CPP) -c resources.cpp -o resources.obj $(CXXFLAGS) diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/book_blue.png b/sdk/wxflatnotebook/samples/wxFlatNotebook/book_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..f20eb1ff95597226e6bf7543d46b9739d74cd34a GIT binary patch literal 833 zcmV-H1HSx;P)WdKuQAUPmLWnv&QFfcM8F*Z6dF*-FdAS*C2FfftZS~&m!00(qQO+^RP z2L}inFJ^eRO8@`>32;bRa{vGe@Bjb`@Bu=sG?)MY00d`2O+f$vv5yP*__>q!NJ<4H_>O8~k;EhKlz7l6U7U~O!cSk-E* z4fdvlF8Z$)H`OuH@*Ki4Wu~%`CYf76)&Me@pYORG3%>RQwB$VG*)SPsET$d~V&qeQ zoX&LC4i86=LBWOv5uDBfGCkvzFp@x9r6w>;ww2&oQW3XZN@(~I1{=;LgPnHI&@jRD z7pw-zDeQBt<9L;VlR+Cg8wL1$6{`Q)dk1k&tB2fnM9n;%2KtD}o@ zv>#;Qc8ieQZir41o)QVFuwOvc8C1Fc6T~1qHm7D*KjVEimil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ou`51x%^}!dZcp2-@A|Hghzi zyi_qwefdoYd(k5GR=4)ZOPfXaKIU9M?)>4oD){fpVc2)=&?;{(AB0-bUIU*r|vC(1s*Tw$0~< zPx|7QUoGU3^tK}1eFk!82u?wO)8Rm+-45O%z{BdcK@Ti9;}8w6soag?-F4imdl4VF zbNsa1*L4KV4SrNPU2roc1eQOddgeWZ@M|#~UH(MW4Ua&@Z36UR8cJUtw;S~0P%slg z_vjl`PLAuj$l~n1HGFxbAQe`j$~x9*{bIS5`fpb`2<*9H!$X>YG%RB7GkwxqQ>1%w zs-?14s0>J!Dz_D2EHhOTRWB94#gsCN%e^;%>gI552N=sp*li?SHW*>aJ5A)@rj+@g Z!XJu+2<}RQdhP%K002ovPDHLkV1gy)Zax42 literal 0 HcmV?d00001 diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/app.xpm b/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/app.xpm new file mode 100644 index 0000000000..ff2f95e413 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/app.xpm @@ -0,0 +1,279 @@ +/* XPM */ +static char *app_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 256 2", +/* colors */ +"`` c None", +"`. c #000000", +"`# c #f4f8fd", +"`a c #cedef4", +"`b c #82bfe9", +"`c c #1f4b86", +"`d c #a6c4eb", +"`e c #c2d6f1", +"`f c #d6e3f6", +"`g c #7cb7e6", +"`h c #6b9cdd", +"`i c #638fcb", +"`j c #afc9ec", +"`k c #a5c4eb", +"`l c #726d6d", +"`m c #75c8ec", +"`n c #75aee3", +"`o c #9fbfe9", +"`p c #8bb2e5", +"`q c #6a9cdd", +"`r c #ababab", +"`s c #939091", +"`t c #62ace2", +"`u c #679ede", +"`v c #91b6e6", +"`w c #77a4e0", +"`x c #3166ca", +"`y c #6e6e6e", +"`z c #4c87d6", +"`A c #588ed8", +"`B c #94b8e7", +"`C c #4a83d5", +"`D c #cecece", +"`E c #4482d4", +"`F c #4e89d7", +"`G c #5d93da", +"`H c #cccccc", +"`I c #c9c9c9", +"`J c #c6c6c6", +"`K c #2f73cd", +"`L c #3e7ed3", +"`M c #255aa0", +"`N c #c8c9c9", +"`O c #c6c6c5", +"`P c #c3c3c3", +"`Q c #c0bfbf", +"`R c #bdbdbc", +"`S c #7a7a7a", +"`T c #3e3e3e", +"`U c #a9a8a8", +"`V c #f2f2f2", +"`W c #c2c1c2", +"`X c #bdbcbc", +"`Y c #bab9b9", +"`Z c #615f60", +"`0 c #8d8b8a", +"`1 c #777372", +"`2 c #b9b8b8", +"`3 c #b6b5b5", +"`4 c #6a6767", +"`5 c #838280", +"`6 c #565554", +"`7 c #7f7d7c", +"`8 c #7c7979", +".` c #555454", +".. c #000000", +".# c #000000", +".a c #000000", +".b c #000000", +".c c #000000", +".d c #000000", +".e c #000000", +".f c #000000", +".g c #000000", +".h c #000000", +".i c #000000", +".j c #000000", +".k c #000000", +".l c #000000", +".m c #000000", +".n c #000000", +".o c #000000", +".p c #000000", +".q c #000000", +".r c #000000", +".s c #000000", +".t c #000000", +".u c #000000", +".v c #000000", +".w c #000000", +".x c #000000", +".y c #000000", +".z c #000000", +".A c #000000", +".B c #000000", +".C c #000000", +".D c #000000", +".E c #000000", +".F c #000000", +".G c #000000", +".H c #000000", +".I c #000000", +".J c #000000", +".K c #000000", +".L c #000000", +".M c #000000", +".N c #000000", +".O c #000000", +".P c #000000", +".Q c #000000", +".R c #000000", +".S c #000000", +".T c #000000", +".U c #000000", +".V c #000000", +".W c #000000", +".X c #000000", +".Y c #000000", +".Z c #000000", +".0 c #000000", +".1 c #000000", +".2 c #000000", +".3 c #000000", +".4 c #000000", +".5 c #000000", +".6 c #000000", +".7 c #000000", +".8 c #000000", +"#` c #000000", +"#. c #000000", +"## c #000000", +"#a c #000000", +"#b c #000000", +"#c c #000000", +"#d c #000000", +"#e c #000000", +"#f c #000000", +"#g c #000000", +"#h c #000000", +"#i c #000000", +"#j c #000000", +"#k c #000000", +"#l c #000000", +"#m c #000000", +"#n c #000000", +"#o c #000000", +"#p c #000000", +"#q c #000000", +"#r c #000000", +"#s c #000000", +"#t c #000000", +"#u c #000000", +"#v c #000000", +"#w c #000000", +"#x c #000000", +"#y c #000000", +"#z c #000000", +"#A c #000000", +"#B c #000000", +"#C c #000000", +"#D c #000000", +"#E c #000000", +"#F c #000000", +"#G c #000000", +"#H c #000000", +"#I c #000000", +"#J c #000000", +"#K c #000000", +"#L c #000000", +"#M c #000000", +"#N c #000000", +"#O c #000000", +"#P c #000000", +"#Q c #000000", +"#R c #000000", +"#S c #000000", +"#T c #000000", +"#U c #000000", +"#V c #000000", +"#W c #000000", +"#X c #000000", +"#Y c #000000", +"#Z c #000000", +"#0 c #000000", +"#1 c #000000", +"#2 c #000000", +"#3 c #000000", +"#4 c #000000", +"#5 c #000000", +"#6 c #000000", +"#7 c #000000", +"#8 c #000000", +"a` c #000000", +"a. c #000000", +"a# c #000000", +"aa c #000000", +"ab c #000000", +"ac c #000000", +"ad c #000000", +"ae c #000000", +"af c #000000", +"ag c #000000", +"ah c #000000", +"ai c #000000", +"aj c #000000", +"ak c #000000", +"al c #000000", +"am c #000000", +"an c #000000", +"ao c #000000", +"ap c #000000", +"aq c #000000", +"ar c #000000", +"as c #000000", +"at c #000000", +"au c #000000", +"av c #000000", +"aw c #000000", +"ax c #000000", +"ay c #000000", +"az c #000000", +"aA c #000000", +"aB c #000000", +"aC c #000000", +"aD c #000000", +"aE c #000000", +"aF c #000000", +"aG c #000000", +"aH c #000000", +"aI c #000000", +"aJ c #000000", +"aK c #000000", +"aL c #000000", +"aM c #000000", +"aN c #000000", +"aO c #000000", +"aP c #000000", +"aQ c #000000", +"aR c #000000", +"aS c #000000", +"aT c #000000", +"aU c #000000", +"aV c #000000", +"aW c #000000", +"aX c #000000", +"aY c #000000", +"aZ c #000000", +"a0 c #000000", +"a1 c #000000", +"a2 c #000000", +"a3 c #000000", +"a4 c #000000", +"a5 c #000000", +"a6 c #000000", +"a7 c #000000", +"a8 c #000000", +/* pixels */ +"`````.`.`.``````````````````````", +"```.`#`a`#`.`.``````````````````", +"```.`b`c`d`e`f`.`.``````````````", +"```.`g`h`i`c`d`j`k`.`.``````````", +"```.`l`m`n`h`i`c`o`p`q`.`.``````", +"```.`r`s`s`t`u`h`i`c`v`w`x`.````", +"```.`r`y`y`s`s`z`A`q`i`c`B`C`.``", +"```.`r`y`D`y`y`s`s`E`F`G`i`c`.``", +"```.`r`y`H`I`J`y`y`s`s`K`L`M`.``", +"```.`r`y`N`O`P`Q`R`y`S`s`T`.````", +"```.`U`y`V`W`Q`X`Y`V`Z`0`1`.````", +"```.`s`s`Z`V`V`2`3`V`S`4`.``````", +"`````.`.`s`s`Z`V`V`Z`5`Z`.``````", +"`````````.`.`s`s`Z`s`6`.````````", +"`````````````.`.`7`8.``.````````", +"`````````````````.`.`.``````````" +}; diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/help.xpm b/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/help.xpm new file mode 100644 index 0000000000..08e0cffc8b --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/help.xpm @@ -0,0 +1,279 @@ +/* XPM */ +static char *help_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 256 2", +/* colors */ +"`` c None", +"`. c #000000", +"`# c #8a47c6", +"`a c #c69aed", +"`b c #9349d8", +"`c c #9a54dc", +"`d c #8d40d5", +"`e c #8838d3", +"`f c #c9aad5", +"`g c #a25fe1", +"`h c #a766e1", +"`i c #ac76b8", +"`j c #e5d77c", +"`k c #ffff48", +"`l c #8a3cd0", +"`m c #1b0b2a", +"`n c #0f0d10", +"`o c #160625", +"`p c #e4c3f4", +"`q c #9953db", +"`r c #cba9b2", +"`s c #ece171", +"`t c #ae76c8", +"`u c #974fd9", +"`v c #c49ac1", +"`w c #893ad1", +"`x c #fbfbfb", +"`y c #989898", +"`z c #9454cb", +"`A c #a462e2", +"`B c #ba82e5", +"`C c #c090cc", +"`D c #ae70dd", +"`E c #a362de", +"`F c #c9a8a7", +"`G c #9146d3", +"`H c #12081c", +"`I c #747474", +"`J c #dfbbf3", +"`K c #a969e2", +"`L c #bd87eb", +"`M c #b67ce7", +"`N c #ac72d0", +"`O c #9a53db", +"`P c #090909", +"`Q c #9d61cf", +"`R c #a967e5", +"`S c #c694ef", +"`T c #c28ded", +"`U c #bb84ea", +"`V c #b882e0", +"`W c #ad6fe3", +"`X c #a666e1", +"`Y c #a05ade", +"`Z c #0a050e", +"`0 c #dcb6f2", +"`1 c #b478e8", +"`2 c #c897f0", +"`3 c #c593ef", +"`4 c #d3b3bc", +"`5 c #b984d8", +"`6 c #ab6ce3", +"`7 c #a563e0", +"`8 c #131313", +".` c #a66ed3", +".. c #af72e8", +".# c #c999ec", +".a c #c89ae1", +".b c #bf8aeb", +".c c #b77fe8", +".d c #7326bd", +".e c #dab3f3", +".f c #b981ea", +".g c #863bcc", +".h c #7423bf", +".i c #7323be", +".j c #1c1c1c", +".k c #af7bd7", +".l c #ae70e8", +".m c #984fd9", +".n c #7d27cd", +".o c #7824c5", +".p c #0f041a", +".q c #481975", +".r c #242423", +".s c #ab6fdb", +".t c #822fcf", +".u c #802bce", +".v c #220b36", +".w c #d4a9f2", +".x c #b279de", +".y c #8736d2", +".z c #000000", +".A c #000000", +".B c #000000", +".C c #000000", +".D c #000000", +".E c #000000", +".F c #000000", +".G c #000000", +".H c #000000", +".I c #000000", +".J c #000000", +".K c #000000", +".L c #000000", +".M c #000000", +".N c #000000", +".O c #000000", +".P c #000000", +".Q c #000000", +".R c #000000", +".S c #000000", +".T c #000000", +".U c #000000", +".V c #000000", +".W c #000000", +".X c #000000", +".Y c #000000", +".Z c #000000", +".0 c #000000", +".1 c #000000", +".2 c #000000", +".3 c #000000", +".4 c #000000", +".5 c #000000", +".6 c #000000", +".7 c #000000", +".8 c #000000", +"#` c #000000", +"#. c #000000", +"## c #000000", +"#a c #000000", +"#b c #000000", +"#c c #000000", +"#d c #000000", +"#e c #000000", +"#f c #000000", +"#g c #000000", +"#h c #000000", +"#i c #000000", +"#j c #000000", +"#k c #000000", +"#l c #000000", +"#m c #000000", +"#n c #000000", +"#o c #000000", +"#p c #000000", +"#q c #000000", +"#r c #000000", +"#s c #000000", +"#t c #000000", +"#u c #000000", +"#v c #000000", +"#w c #000000", +"#x c #000000", +"#y c #000000", +"#z c #000000", +"#A c #000000", +"#B c #000000", +"#C c #000000", +"#D c #000000", +"#E c #000000", +"#F c #000000", +"#G c #000000", +"#H c #000000", +"#I c #000000", +"#J c #000000", +"#K c #000000", +"#L c #000000", +"#M c #000000", +"#N c #000000", +"#O c #000000", +"#P c #000000", +"#Q c #000000", +"#R c #000000", +"#S c #000000", +"#T c #000000", +"#U c #000000", +"#V c #000000", +"#W c #000000", +"#X c #000000", +"#Y c #000000", +"#Z c #000000", +"#0 c #000000", +"#1 c #000000", +"#2 c #000000", +"#3 c #000000", +"#4 c #000000", +"#5 c #000000", +"#6 c #000000", +"#7 c #000000", +"#8 c #000000", +"a` c #000000", +"a. c #000000", +"a# c #000000", +"aa c #000000", +"ab c #000000", +"ac c #000000", +"ad c #000000", +"ae c #000000", +"af c #000000", +"ag c #000000", +"ah c #000000", +"ai c #000000", +"aj c #000000", +"ak c #000000", +"al c #000000", +"am c #000000", +"an c #000000", +"ao c #000000", +"ap c #000000", +"aq c #000000", +"ar c #000000", +"as c #000000", +"at c #000000", +"au c #000000", +"av c #000000", +"aw c #000000", +"ax c #000000", +"ay c #000000", +"az c #000000", +"aA c #000000", +"aB c #000000", +"aC c #000000", +"aD c #000000", +"aE c #000000", +"aF c #000000", +"aG c #000000", +"aH c #000000", +"aI c #000000", +"aJ c #000000", +"aK c #000000", +"aL c #000000", +"aM c #000000", +"aN c #000000", +"aO c #000000", +"aP c #000000", +"aQ c #000000", +"aR c #000000", +"aS c #000000", +"aT c #000000", +"aU c #000000", +"aV c #000000", +"aW c #000000", +"aX c #000000", +"aY c #000000", +"aZ c #000000", +"a0 c #000000", +"a1 c #000000", +"a2 c #000000", +"a3 c #000000", +"a4 c #000000", +"a5 c #000000", +"a6 c #000000", +"a7 c #000000", +"a8 c #000000", +/* pixels */ +"````````````````````````````````", +"`````.`.`.`.`.`.`.`.`.`.````````", +"```.`#`a`b`c`b`d`e`e`e`e`.``````", +"```.`f`#`g`h`i`j`k`k`j`l`m``````", +"`.`n`o`o`p`q`r`s`t`u`v`j`w`.````", +"`.`x`y`o`z`A`B`C`D`E`F`j`G`H````", +"`.`x`y`I`o`J`K`L`M`v`k`N`O`b`.``", +"```P`x`y`o`Q`R`S`T`U`V`W`X`Y`Z``", +"```.`x`y`I`o`0`1`2`3`4`k`5`6`7`.", +"`````8`x`y`o.`..`2`2.#.a.b.c.d`.", +"`````.`x`y`I`o.e.f`2`2`2.g.h.i`.", +"``````.j`x`y`o.k.l`2.m.n.o.p`.``", +"```````.`x`..q.r.s.t.u.v`.``````", +"`````````.`..w.x.y`.`.``````````", +"`````````````.`.`.``````````````", +"````````````````````````````````" +}; diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/icon.bmp b/sdk/wxflatnotebook/samples/wxFlatNotebook/icons/icon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0933592a68e348305791c51e90255f5787661d17 GIT binary patch literal 822 zcmZ?rHDhJ~12Z700mK4O%*Y@C7H5FULpTufKf`|t5!^I_=0H?_T6yJO<)%w!?f4x4 zl>PntH;^oq^iWn&xt+iIynfR;?FKV$C7>XtT{1Ej=>B3q@;g2hY0UIT>O&Ts_d6r$eSZN?P)?Y1f$v2ksWEyO*?h`HGV@ z*PmW?n<&E}1PM~0dI4U3pkg5Ua`?&Z;F+6No-Ta&=0w@LoBq>*RshvswCaQy4%c#Z z)yZS-T@T|IJxp7^qihXO4bUY(1Y}&W>C)nsMvgC_UZCQ)vyK5Bc_#$q)T<7?mn}Nr R2-$GB6+l5;0NHR-*#L{)oQ(hg literal 0 HcmV?d00001 diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/makefile.gcc b/sdk/wxflatnotebook/samples/wxFlatNotebook/makefile.gcc new file mode 100644 index 0000000000..2473b0c282 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/makefile.gcc @@ -0,0 +1,36 @@ +# Project: wxFlatNotebookTest +# Makefile created by Dev-C++ 4.9.9.2 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +RES = +OBJ = App.obj Frame.obj resources.obj $(RES) +LINKOBJ = App.obj Frame.obj resources.obj $(RES) + +LIBS = -L"$(WXSTABLE)/lib/gcc_lib" -L"../../lib" -mwindows -lwxmsw27d_adv -lwxmsw27d_html -lwxbase27d_xml -lwxmsw27d_xrc -lwxmsw27d_core -lwxbase27d -lwxFlatNotebook -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexd -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32 +INCS = -I"$(WXSTABLE)/include" -I"../../include" -I"$(WXSTABLE)/lib/gcc_lib/mswd" +BIN = wxFlatNotebookTest.exe +CXXFLAGS = $(INCS) -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3 +CFLAGS = $(INCS) -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -fvtable-thunks -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3 +RM = rm -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before wxFlatNotebookTest.exe all-after + + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CPP) $(LINKOBJ) -o "wxFlatNotebookTest.exe" $(LIBS) + +App.obj: App.cpp + $(CPP) -c App.cpp -o App.obj $(CXXFLAGS) + +Frame.obj: Frame.cpp + $(CPP) -c Frame.cpp -o Frame.obj $(CXXFLAGS) + +resources.obj: resources.cpp + $(CPP) -c resources.cpp -o resources.obj $(CXXFLAGS) diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/resources.cpp b/sdk/wxflatnotebook/samples/wxFlatNotebook/resources.cpp new file mode 100644 index 0000000000..085433601f --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/resources.cpp @@ -0,0 +1,236 @@ +// +// This file was automatically generated by wxrc, do not edit by hand. +// + +#include + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include +#include +#include +#include + +static size_t xml_res_size_0 = 235; +static unsigned char xml_res_file_0[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,2,0,0, +0,144,145,104,54,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77, +65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,132, +0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186, +81,60,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43,14,27,0,0,0, +84,73,68,65,84,56,79,149,210,81,10,0,32,8,3,80,187,185,71,243,104,9,3,145, +10,219,252,222,67,69,87,68,152,84,9,164,178,57,157,189,143,192,4,48,41, +11,50,234,238,44,64,154,5,149,166,64,79,83,0,103,193,60,44,232,134,93,186, +140,0,234,101,216,59,32,167,117,120,126,205,231,151,110,35,131,13,66,206, +229,81,84,48,48,72,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_1 = 224; +static unsigned char xml_res_file_1[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,2,0,0, +0,144,145,104,54,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77, +65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,132, +0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186, +81,60,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43,14,27,0,0,0, +73,73,68,65,84,56,79,173,210,203,13,0,48,8,2,80,187,185,163,49,90,61,183, +136,33,209,179,47,196,207,1,16,86,21,176,42,158,238,10,211,158,0,109,8, +200,76,97,56,16,166,5,157,81,128,154,189,132,110,238,141,45,217,119,240, +46,61,254,213,240,57,191,183,193,5,196,48,229,81,81,126,69,225,0,0,0,0, +73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_2 = 243; +static unsigned char xml_res_file_2[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,2,0,0, +0,144,145,104,54,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77, +65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,132, +0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186, +81,60,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,196,1,149,43,14,27,0,0,0, +92,73,68,65,84,56,79,99,60,112,224,0,3,73,0,168,129,36,192,64,146,106,144, +115,32,26,32,142,66,211,140,93,16,89,3,178,30,184,191,208,77,129,243,145, +85,224,82,141,112,18,154,61,88,29,3,85,131,213,221,152,254,65,56,4,89,3, +90,124,96,13,64,68,200,144,230,7,76,95,18,8,37,146,227,129,248,248,38,55, +105,208,208,6,0,185,105,185,17,221,215,65,47,0,0,0,0,73,69,78,68,174,66, +96,130}; + +static size_t xml_res_size_3 = 847; +static unsigned char xml_res_file_3[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,57,32,70,101,98,32,50,48,48,50,32,49,54,58,48, +49,58,53,49,32,43,48,49,48,48,145,219,90,57,0,0,0,7,116,73,77,69,7,212, +7,7,8,27,50,5,126,219,146,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240,1, +66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,168,73, +68,65,84,120,218,141,147,75,76,19,81,24,133,207,220,105,59,237,148,182, +83,144,10,210,82,32,69,136,17,40,162,21,12,186,96,163,9,46,140,9,174,124, +109,116,237,2,55,44,140,91,19,227,214,133,59,182,198,24,53,134,104,124, +68,77,16,141,69,49,60,12,69,130,5,66,233,3,75,95,211,153,233,204,120,7, +139,65,140,232,77,78,102,146,251,159,111,230,158,255,254,12,118,94,204, +150,119,253,95,5,204,117,170,1,47,90,52,25,33,134,199,33,126,151,187,171, +32,74,242,165,169,194,249,183,64,140,214,72,127,0,196,32,142,234,22,210, +79,92,194,65,98,229,187,52,27,47,112,21,54,64,211,0,11,7,148,68,140,60, +155,121,114,42,170,93,149,129,217,237,16,246,90,167,119,204,84,235,63,97, +233,60,208,196,170,154,181,84,23,128,82,27,128,218,126,12,106,176,15,38, +185,136,102,146,11,248,86,211,206,7,34,38,168,39,67,165,253,2,12,122,205, +131,156,203,81,81,82,24,176,82,22,217,80,63,72,213,110,16,91,5,76,170,2, +194,89,129,149,8,218,221,230,54,115,52,163,188,84,49,77,125,249,77,8,123, +209,34,245,86,183,248,90,179,95,163,176,214,214,192,20,91,0,27,251,6,110, +252,57,200,216,8,48,253,1,80,36,48,22,19,19,116,153,67,107,75,133,68,88, +199,28,245,22,140,96,217,110,69,79,236,227,228,115,54,175,135,201,174,21, +192,23,83,96,83,171,212,68,79,76,216,159,57,27,121,208,191,225,236,12,57, +204,150,122,166,18,234,60,37,44,208,77,145,156,205,224,221,116,36,121,159, +209,37,20,147,223,1,187,155,114,13,131,186,97,50,66,68,62,141,220,236,42, +166,70,227,152,168,233,224,85,66,246,83,115,35,149,197,100,80,30,39,112, +163,126,114,169,223,211,209,104,77,47,196,33,56,232,215,87,146,136,197, +232,129,43,235,48,239,239,129,114,161,23,214,80,15,188,254,122,241,233, +222,70,218,30,216,169,136,1,208,134,36,76,182,205,231,135,79,250,226,151, +95,45,228,145,244,182,34,221,125,6,114,103,8,78,65,128,211,225,64,165,221, +14,222,33,192,195,234,182,65,15,44,55,227,16,13,175,169,220,141,226,221, +117,220,170,123,17,31,184,115,252,180,219,215,117,4,205,13,126,84,57,93, +112,51,37,4,150,63,162,122,230,61,132,240,107,49,28,93,254,68,212,13,143, +64,197,109,2,244,97,26,74,95,30,183,27,244,226,80,48,19,65,247,232,27,84, +78,142,235,185,200,226,236,189,53,124,121,164,32,21,86,161,202,58,214,105, +253,98,185,149,250,111,87,57,8,236,185,98,195,67,154,128,52,44,98,238,51, +125,210,91,83,164,123,113,170,165,178,86,168,12,72,150,42,183,21,96,44, +51,85,19,85,47,21,191,197,148,50,138,203,189,55,128,234,230,112,109,7,24, +203,72,216,109,36,92,54,24,97,201,59,77,228,223,166,148,249,159,194,31, +138,132,8,238,74,131,122,238,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_4 = 840; +static unsigned char xml_res_file_4[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,57,32,70,101,98,32,50,48,48,50,32,49,54,58,48, +49,58,53,49,32,43,48,49,48,48,145,219,90,57,0,0,0,7,116,73,77,69,7,212, +7,7,8,27,49,156,119,138,40,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,161, +73,68,65,84,120,218,141,147,203,79,19,81,20,198,191,153,161,51,216,233, +147,6,109,120,148,62,64,209,8,9,202,83,137,168,139,154,144,152,24,226,10, +23,186,242,47,80,23,254,5,110,220,24,87,238,141,123,13,200,74,72,4,124, +4,2,146,0,154,74,41,34,80,251,128,210,105,167,157,105,167,227,25,50,24, +196,136,222,228,75,102,50,231,247,221,51,223,61,151,193,209,139,57,240, +172,255,171,128,193,48,88,180,161,21,57,116,179,86,116,157,240,216,206, +231,228,146,44,61,81,110,35,134,31,84,163,252,105,240,2,87,161,97,176,78, +116,118,186,89,75,135,135,23,28,46,27,15,69,86,193,169,54,148,196,34,38, +70,214,94,151,158,226,1,225,145,195,38,220,192,221,224,124,232,88,211,149, +112,208,231,215,82,22,161,137,107,69,125,229,12,122,188,97,92,168,15,35, +189,155,2,26,178,45,91,124,222,142,57,124,34,70,34,85,126,25,212,94,183, +62,244,55,56,132,116,154,65,65,205,226,154,255,6,60,206,90,136,130,13,133, +114,30,34,47,34,154,91,130,24,168,110,79,66,46,97,17,203,196,229,247,77, +184,124,187,122,121,176,183,57,52,25,249,14,175,215,138,181,248,58,98,114, +4,19,241,81,76,36,199,48,151,153,131,162,233,96,45,44,99,241,113,221,210, +174,146,196,42,190,18,43,27,193,114,138,87,75,179,110,125,184,173,165,150, +89,137,21,33,137,91,72,149,146,80,116,141,2,226,105,27,22,229,138,14,165, +92,6,107,213,217,114,99,185,79,93,215,163,20,105,140,12,10,44,133,248,118, +122,106,99,84,208,169,72,203,195,198,212,16,192,80,174,244,206,104,84,161, +96,167,178,139,104,34,131,213,133,44,78,231,59,172,228,124,150,224,0,137, +175,50,90,81,230,203,143,198,3,177,240,192,64,192,50,62,159,0,119,92,193, +102,114,7,59,9,202,79,170,67,103,229,18,46,122,250,209,119,170,23,77,13, +141,114,232,126,72,32,78,36,177,85,123,97,188,193,236,151,64,234,121,168, +217,113,103,235,253,54,130,252,73,220,114,245,163,187,166,11,110,191,11, +118,167,29,54,155,8,151,211,13,214,93,177,162,135,254,237,3,10,6,91,101, +158,70,81,91,198,227,87,99,209,161,161,181,155,142,190,246,94,132,124,65, +216,237,14,148,56,5,31,139,147,152,137,191,195,84,106,178,176,25,203,44, +152,3,232,38,9,251,6,58,166,105,72,90,240,76,21,139,247,150,212,69,140, +174,140,96,86,158,169,100,183,165,8,162,248,140,21,108,83,112,37,10,199, +152,131,111,230,81,234,191,143,114,8,62,156,195,75,106,78,194,18,97,155, +52,117,197,189,86,147,164,13,210,58,41,78,202,152,3,149,59,104,96,44,11, +169,153,212,79,170,54,1,3,76,27,197,230,217,23,73,218,254,229,58,108,0, +19,116,155,223,12,192,232,64,61,234,70,254,237,150,50,255,83,248,19,22, +160,12,232,75,70,201,207,0,0,0,0,73,69,78,68,174,66,96,130}; + +static size_t xml_res_size_5 = 833; +static unsigned char xml_res_file_5[] = { +137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0, +0,31,243,255,97,0,0,0,42,116,69,88,116,67,114,101,97,116,105,111,110,32, +84,105,109,101,0,83,97,32,57,32,70,101,98,32,50,48,48,50,32,49,54,58,48, +49,58,53,49,32,43,48,49,48,48,145,219,90,57,0,0,0,7,116,73,77,69,7,212, +7,7,8,27,47,102,120,183,75,0,0,0,9,112,72,89,115,0,0,10,240,0,0,10,240, +1,66,172,52,152,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,2,154, +73,68,65,84,120,218,141,147,75,76,19,81,20,134,255,153,78,41,51,157,105, +41,129,138,96,17,40,47,5,19,137,80,124,96,98,93,24,35,137,137,184,210,152, +232,78,23,238,52,46,92,232,214,141,107,19,119,46,220,104,116,65,2,62,34, +198,72,32,196,72,120,133,4,83,32,229,81,211,22,10,148,206,171,76,219,241, +12,182,6,49,162,55,249,51,119,114,207,247,159,51,103,206,101,176,247,98, +118,236,205,127,5,208,254,5,139,43,182,102,164,152,0,120,103,7,36,215,49, +104,155,42,250,239,95,71,114,52,70,49,233,63,13,110,47,157,5,99,92,128, +84,220,14,135,218,6,240,46,176,60,160,106,96,161,35,103,114,192,212,199, +55,232,187,117,143,248,208,110,19,155,239,210,157,241,10,201,12,166,124, +7,106,132,248,170,227,136,152,70,192,165,160,251,144,29,61,45,2,162,201, +52,98,240,54,128,247,75,88,120,59,65,76,138,148,43,24,176,75,27,26,99,47, +45,133,119,53,2,61,203,32,216,226,68,115,141,132,18,158,195,186,6,28,173, +22,1,142,170,168,63,117,13,109,15,110,18,83,73,226,126,85,0,239,249,51, +70,103,171,223,49,183,8,197,233,70,52,38,99,58,150,197,235,73,5,131,227, +73,76,124,75,0,186,66,45,36,119,201,23,128,193,173,96,109,108,150,88,213, +106,172,13,246,166,132,46,250,175,22,55,213,49,210,242,28,194,50,101,166, +178,145,38,153,91,64,214,0,50,153,159,239,185,28,11,190,246,4,180,228,60, +228,217,48,25,104,44,166,30,14,98,228,83,127,156,206,116,214,14,15,71,144, +65,193,134,5,17,156,206,2,50,61,227,148,48,146,64,91,165,38,48,76,182,149, +224,90,82,17,183,93,74,104,248,17,6,27,206,37,131,157,118,207,208,48,193, +244,23,172,6,200,41,236,115,173,227,120,149,130,147,65,27,58,27,5,248,124, +21,170,255,217,123,7,113,78,171,135,220,118,71,35,79,70,49,117,248,121, +198,223,116,67,155,31,67,192,171,163,139,114,180,31,100,225,118,139,144, +220,110,136,78,17,158,18,9,170,176,95,64,213,229,34,68,94,105,22,91,232, +166,142,239,159,31,163,175,188,167,187,162,215,213,209,220,130,186,134, +70,184,36,39,116,83,192,135,48,143,161,176,13,3,51,138,134,133,119,147, +148,210,26,64,15,201,81,48,48,17,125,25,66,217,233,167,42,83,118,119,58, +46,162,111,142,193,215,112,46,151,138,173,132,144,250,50,131,205,145,53, +40,179,6,76,195,154,131,69,146,98,113,191,143,178,167,163,26,229,23,123, +97,208,199,39,6,230,161,206,164,145,145,173,82,87,72,17,210,18,41,74,218, +200,15,148,188,211,192,90,118,82,61,169,139,84,156,7,44,48,97,5,231,255, +189,78,202,22,46,215,110,3,228,65,79,254,204,2,172,10,182,246,186,145,127, +187,165,204,255,4,254,0,120,176,254,227,251,120,175,215,0,0,0,0,73,69,78, +68,174,66,96,130}; + +static size_t xml_res_size_6 = 526; +static unsigned char xml_res_file_6[] = { +60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101, +110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101, +115,111,117,114,99,101,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +108,101,102,116,95,97,114,114,111,119,34,62,114,101,115,111,117,114,99, +101,115,46,99,112,112,36,108,101,102,116,46,112,110,103,60,47,111,98,106, +101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61, +34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,114,105,103, +104,116,95,97,114,114,111,119,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,114,105,103,104,116,46,112,110,103,60,47,111,98,106,101, +99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34, +119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,120,34,62,114, +101,115,111,117,114,99,101,115,46,99,112,112,36,120,46,112,110,103,60,47, +111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97, +115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34, +98,111,111,107,95,114,101,100,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,98,111,111,107,95,114,101,100,46,112,110,103,60,47,111, +98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115, +115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,98,111, +111,107,95,103,114,101,101,110,34,62,114,101,115,111,117,114,99,101,115, +46,99,112,112,36,98,111,111,107,95,103,114,101,101,110,46,112,110,103,60, +47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108, +97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61, +34,98,111,111,107,95,98,108,117,101,34,62,114,101,115,111,117,114,99,101, +115,46,99,112,112,36,98,111,111,107,95,98,108,117,101,46,112,110,103,60, +47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,114,99,101,62, +10}; + +void InitXmlResource() +{ + + // Check for memory FS. If not present, load the handler: + { + wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one")); + wxFileSystem fsys; + wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file")); + wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file")); + if (f) delete f; + else wxFileSystem::AddHandler(new wxMemoryFSHandler); + } + + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$left.png"), xml_res_file_0, xml_res_size_0); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$right.png"), xml_res_file_1, xml_res_size_1); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$x.png"), xml_res_file_2, xml_res_size_2); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$book_red.png"), xml_res_file_3, xml_res_size_3); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$book_green.png"), xml_res_file_4, xml_res_size_4); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$book_blue.png"), xml_res_file_5, xml_res_size_5); + wxMemoryFSHandler::AddFile(wxT("XRC_resource/resources.cpp$._resources.xrc"), xml_res_file_6, xml_res_size_6); + wxXmlResource::Get()->Load(wxT("memory:XRC_resource/resources.cpp$._resources.xrc")); +} diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.dev b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.dev new file mode 100644 index 0000000000..cd9eda1bc4 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.dev @@ -0,0 +1,99 @@ +[Project] +FileName=wxFlatNotebookTest.dev +Name=wxFlatNotebookTest +UnitCount=5 +Type=0 +Ver=1 +ObjFiles= +Includes=../../include +Libs=../../lib +PrivateResource= +ResourceIncludes=E:\Program\Util\Programmer\Dev-CPP\include +MakeIncludes= +Compiler=-fno-rtti_@@_-fno-exceptions_@@_-fno-pcc-struct-return_@@_-fstrict-aliasing_@@_-Wall_@@_-fvtable-thunks_@@_-D__WXMSW___@@_-D__GNUWIN32___@@_-D__WIN95___@@_ +CppCompiler=-fno-rtti_@@_-fno-exceptions_@@_-fno-pcc-struct-return_@@_-fstrict-aliasing_@@_-Wall_@@_-D__WXMSW___@@_-D__GNUWIN32___@@_-D__WIN95___@@_ +Linker=-lwxFlatNotebook_@@_-lwxmsw26_@@_-lwxtiff_@@_-lwxjpeg_@@_-lwxpng_@@_-lwxzlib_@@_-lwxregex_@@_-lwxexpat_@@_-lkernel32_@@_-luser32_@@_-lgdi32_@@_-lcomdlg32_@@_-lwinspool_@@_-lwinmm_@@_-lshell32_@@_-lcomctl32_@@_-lole32_@@_-loleaut32_@@_-luuid_@@_-lrpcrt4_@@_-ladvapi32_@@_-lwsock32_@@_-lodbc32_@@_-lopengl32_@@_ +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +OverrideOutput=0 +OverrideOutputName=wxFlatNotebookTest.exe +HostApplication= +Folders= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000001001000000000 + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 + +[Unit1] +FileName=App.h +CompileCpp=1 +Folder=wxFlatNotebookTest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=Frame.h +CompileCpp=1 +Folder=wxFlatNotebookTest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit3] +FileName=App.cpp +CompileCpp=1 +Folder=wxFlatNotebookTest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=Frame.cpp +CompileCpp=1 +Folder=wxFlatNotebookTest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=resources.cpp +CompileCpp=1 +Folder=wxFlatNotebookTest +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.layout b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.layout new file mode 100644 index 0000000000..20dc963966 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.layout @@ -0,0 +1,38 @@ +[Editor_2] +CursorCol=45 +CursorRow=37 +TopLine=15 +LeftChar=1 +Open=1 +Top=0 +[Editor_0] +CursorCol=1 +CursorRow=14 +TopLine=1 +LeftChar=1 +Open=1 +Top=0 +[Editor_1] +CursorCol=1 +CursorRow=35 +TopLine=1 +LeftChar=1 +Open=1 +Top=0 +[Editors] +Order=3,4,1,0,2 +Focused=3 +[Editor_3] +Open=1 +Top=1 +CursorCol=2 +CursorRow=27 +TopLine=1 +LeftChar=1 +[Editor_4] +Open=1 +Top=0 +CursorCol=1 +CursorRow=237 +TopLine=143 +LeftChar=1 diff --git a/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.vcproj b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.vcproj new file mode 100644 index 0000000000..7362e4a0c1 --- /dev/null +++ b/sdk/wxflatnotebook/samples/wxFlatNotebook/wxFlatNotebookTest.vcproj @@ -0,0 +1,765 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_customize_dlg.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_customize_dlg.cpp new file mode 100644 index 0000000000..c4c90cb025 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_customize_dlg.cpp @@ -0,0 +1,359 @@ +#include "wx/wxFlatNotebook/fnb_customize_dlg.h" +#include "wx/wxFlatNotebook/wxFlatNotebook.h" +#include "wx/sizer.h" +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +wxFNBCustomizeDialog::wxFNBCustomizeDialog( wxWindow* parent, long options, int id, wxString title, wxPoint pos, wxSize size, int style ) +: wxDialog( parent, id, title, pos, size, style ) +, m_options(options) +{ + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + SetSizer( mainSizer ); + + mainSizer->Add( CreateOptionsPage(), 1, wxEXPAND | wxALL, 5 ); + + m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( m_staticline2, 0, wxALL|wxEXPAND, 5 ); + + wxBoxSizer* btnSizer; + btnSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_close = new wxButton( this, wxID_ANY, wxT("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + btnSizer->Add( m_close, 0, wxALL, 5 ); + + mainSizer->Add( btnSizer, 0, wxALIGN_CENTER, 5 ); + + this->Layout(); + GetSizer()->Fit(this); + + ConnectEvents(); +} + +void wxFNBCustomizeDialog::ConnectEvents() +{ + m_close->Connect(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnClose), NULL, this); + + // Connect all checkbox & radiobox controls to the same handler + if( m_styles ){ + m_styles->Connect(wxID_ANY, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + } + + m_navigationStyle->Connect(wxID_ANY, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + if( m_tabVPosition ){ + m_tabVPosition->Connect(wxID_ANY, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + } + + m_tabBorder->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_hideCloseButton->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_mouseMiddleCloseTab->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_xButtonOnTab->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_dlbClickCloseTab->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_smartTabbing->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + + if( m_allowDragAndDrop ){ + m_allowDragAndDrop->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + } + + if( m_foreignDnD ){ + m_foreignDnD->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + } + + m_gradient->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); + m_colorfulTab->Connect(wxID_ANY, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(wxFNBCustomizeDialog::OnStyle), NULL, this); +} + +wxPanel *wxFNBCustomizeDialog::CreateOptionsPage() +{ + wxPageContainer *pc = static_cast(GetParent()); + + wxPanel *page = new wxPanel(this); + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + page->SetSizer( mainSizer ); + + wxString m_stylesChoices[] = { wxT("Default"), wxT("Visual Studio 8.0"), wxT("Firefox 2") }; + int m_stylesNChoices = sizeof( m_stylesChoices ) / sizeof( wxString ); + + // Set the selected tabs' style + int selection = 0; + bool enableGrad = false, enableColorTab = false; + + if (pc->HasFlag(wxFNB_FF2) ){ + selection = 2; + enableGrad = true; enableColorTab = false; + }else if( pc->HasFlag(wxFNB_VC8) ){ + selection = 1; + enableGrad = true; enableColorTab = true; + }else { + selection = 0; + enableGrad = true; enableColorTab = false; + } + + // can we customize the tab's style? + if( m_options & wxFNB_CUSTOM_TAB_LOOK ){ + m_styles = new wxRadioBox( page, wxID_ANY, wxT("Visual Style:"), wxDefaultPosition, wxDefaultSize, m_stylesNChoices, m_stylesChoices, 3, wxRA_SPECIFY_COLS ); + m_styles->SetSelection(selection); + mainSizer->Add( m_styles, 0, wxALL|wxEXPAND, 5 ); + }else{ + m_styles = NULL; + } + + // can we customize the tab's orientation? + if( m_options & wxFNB_CUSTOM_ORIENTATION ){ + wxString m_tabVPositionChoices[] = { wxT("Upper Tabs"), wxT("Bottom Tabs") }; + int m_tabVPositionNChoices = sizeof( m_tabVPositionChoices ) / sizeof( wxString ); + m_tabVPosition = new wxRadioBox( page, wxID_ANY, wxT("Tab Positioning:"), wxDefaultPosition, wxDefaultSize, m_tabVPositionNChoices, m_tabVPositionChoices, 2, wxRA_SPECIFY_COLS ); + m_tabVPosition->SetSelection(pc->HasFlag(wxFNB_BOTTOM) ? 1 : 0); + mainSizer->Add( m_tabVPosition, 0, wxALL|wxEXPAND, 5 ); + }else{ + m_tabVPosition = NULL; + } + + // there is no harm in showing this always + wxString navigationStyle [] = { wxT("Rotation Arrows"), wxT("Drop Down Tab List"), wxT("None") }; + int nChoices = sizeof( navigationStyle ) / sizeof( wxString ); + m_navigationStyle = new wxRadioBox( page, wxID_ANY, wxT("Navigation Style:"), wxDefaultPosition, wxDefaultSize, nChoices, navigationStyle, 3, wxRA_SPECIFY_COLS ); + + if(pc->HasFlag(wxFNB_DROPDOWN_TABS_LIST)){ + m_navigationStyle->SetSelection(1); + } else if(pc->HasFlag(wxFNB_NO_NAV_BUTTONS) && !pc->HasFlag(wxFNB_DROPDOWN_TABS_LIST)){ + m_navigationStyle->SetSelection(2); + } else { + m_navigationStyle->SetSelection(0); + } + + mainSizer->Add( m_navigationStyle, 0, wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( page, -1, wxT("General:") ), wxVERTICAL ); + + wxGridSizer* gSizer1; + gSizer1 = new wxGridSizer( 3, 2, 0, 0 ); + + m_tabBorder = new wxCheckBox( page, wxID_ANY, wxT("Draw Thin Border Around Tab Area"), wxDefaultPosition, wxDefaultSize, 0 ); + m_tabBorder->SetValue(pc->HasFlag(wxFNB_TABS_BORDER_SIMPLE)); + gSizer1->Add( m_tabBorder, 0, wxALL, 5 ); + + // do we allow customizing close button options? ( in all forms: dclick, middle click, on tab and right side) + m_hideCloseButton = new wxCheckBox( page, wxID_ANY, wxT("Hide Close Button"), wxDefaultPosition, wxDefaultSize, 0 ); + m_hideCloseButton->SetValue(pc->HasFlag(wxFNB_NO_X_BUTTON)); + m_hideCloseButton->Enable(m_options & wxFNB_CUSTOM_CLOSE_BUTTON ? true : false); + gSizer1->Add( m_hideCloseButton, 0, wxALL, 5 ); + + m_mouseMiddleCloseTab = new wxCheckBox( page, wxID_ANY, wxT("Mouse Middle Button Closes Tab"), wxDefaultPosition, wxDefaultSize, 0 ); + m_mouseMiddleCloseTab->SetValue(pc->HasFlag(wxFNB_MOUSE_MIDDLE_CLOSES_TABS)); + m_mouseMiddleCloseTab->Enable(m_options & wxFNB_CUSTOM_CLOSE_BUTTON ? true : false); + gSizer1->Add( m_mouseMiddleCloseTab, 0, wxALL, 5 ); + + m_xButtonOnTab = new wxCheckBox( page, wxID_ANY, wxT("Place Close Button On Active Tab"), wxDefaultPosition, wxDefaultSize, 0 ); + m_xButtonOnTab->SetValue(pc->HasFlag(wxFNB_X_ON_TAB)); + m_xButtonOnTab->Enable(m_options & wxFNB_CUSTOM_CLOSE_BUTTON ? true : false); + gSizer1->Add( m_xButtonOnTab, 0, wxALL, 5 ); + + m_dlbClickCloseTab = new wxCheckBox( page, wxID_ANY, wxT("Double Click Closes Tab"), wxDefaultPosition, wxDefaultSize, 0 ); + m_dlbClickCloseTab->SetValue(pc->HasFlag(wxFNB_DCLICK_CLOSES_TABS)); + m_dlbClickCloseTab->Enable(m_options & wxFNB_CUSTOM_CLOSE_BUTTON ? true : false); + gSizer1->Add( m_dlbClickCloseTab, 0, wxALL, 5 ); + + m_smartTabbing = new wxCheckBox( page, wxID_ANY, wxT("Enable Smart Tabbing"), wxDefaultPosition, wxDefaultSize, 0 ); + m_smartTabbing->SetValue(pc->HasFlag(wxFNB_SMART_TABS)); + gSizer1->Add( m_smartTabbing, 0, wxALL, 5 ); + + sbSizer2->Add( gSizer1, 0, wxEXPAND, 5 ); + + mainSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 ); + + if(m_options & wxFNB_CUSTOM_LOCAL_DRAG){ + wxStaticBoxSizer* sbSizer4; + sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( page, -1, wxT("Drag And Drop:") ), wxHORIZONTAL ); + m_allowDragAndDrop = new wxCheckBox( page, wxID_ANY, wxT("Enable Drag And Drop"), wxDefaultPosition, wxDefaultSize, 0 ); + m_allowDragAndDrop->SetValue(!pc->HasFlag(wxFNB_NODRAG)); + + sbSizer4->Add( m_allowDragAndDrop, 0, wxALL, 5 ); + + m_foreignDnD = new wxCheckBox( page, wxID_ANY, wxT("Allow Drag And Drop from other notebooks"), wxDefaultPosition, wxDefaultSize, 0 ); + m_foreignDnD->SetValue(pc->HasFlag(wxFNB_ALLOW_FOREIGN_DND)); + m_foreignDnD->Enable(m_allowDragAndDrop->IsChecked() && m_options & wxFNB_CUSTOM_FOREIGN_DRAG); + sbSizer4->Add( m_foreignDnD, 0, wxALL, 5 ); + mainSizer->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 ); + + }else{ + m_allowDragAndDrop = NULL; + m_foreignDnD = NULL; + } + + wxStaticBoxSizer* sbSizer5; + sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( page, -1, wxT("Effects:") ), wxHORIZONTAL ); + + m_gradient = new wxCheckBox( page, wxID_ANY, wxT("Use Gradient painting for tabs area"), wxDefaultPosition, wxDefaultSize, 0 ); + m_gradient->SetValue(pc->HasFlag(wxFNB_BACKGROUND_GRADIENT)); + sbSizer5->Add( m_gradient, 0, wxALL, 5 ); + + m_colorfulTab = new wxCheckBox( page, wxID_ANY, wxT("Set Random Colour for Tabs"), wxDefaultPosition, wxDefaultSize, 0 ); + m_colorfulTab->SetValue(pc->HasFlag(wxFNB_COLORFUL_TABS)); + sbSizer5->Add( m_colorfulTab, 0, wxALL, 5 ); + + mainSizer->Add( sbSizer5, 0, wxALL|wxEXPAND, 5 ); + m_colorfulTab->Enable(enableColorTab); + m_gradient->Enable(enableGrad); + page->Layout(); + return page; +} + +//--------------------------------------------------------- +// Event handlers +//--------------------------------------------------------- + +void wxFNBCustomizeDialog::OnClose(wxCommandEvent &event) +{ + wxUnusedVar(event); + EndModal(wxID_OK); +} + +void wxFNBCustomizeDialog::OnStyle(wxCommandEvent &event) +{ + wxObject *obj = event.GetEventObject(); + wxPageContainer *pc = static_cast(GetParent()); + + wxFlatNotebook *bookWin = static_cast( pc->GetParent() ); + long style = bookWin->GetWindowStyleFlag(); + + // Handle tab style + if( obj == m_styles ){ + style &= ~(wxFNB_VC8); + style &= ~(wxFNB_FF2); + + if(event.GetSelection() == 1){ // vc8 + // remove bottom flag if exist + style |= wxFNB_VC8; + m_gradient->Enable(true); + m_colorfulTab->Enable(true); + }else if(event.GetSelection() == 2){ // ff2 + style |= wxFNB_FF2; + m_gradient->Enable(true); + m_colorfulTab->Enable(false); + } else { + // by default this two options are not available + m_gradient->Enable(false); + m_colorfulTab->Enable(false); + } + } + + // Handle tab postioninig + if( obj == m_tabVPosition ){ + if(event.GetSelection() == 0){ // Top + // remove bottom flag if exist + style &= ~(wxFNB_BOTTOM); + } else { + style |= wxFNB_BOTTOM; + } + } + + // Handle navigation style + if( obj == m_navigationStyle ){ + if(event.GetSelection() == 0){ // Arrows + style &= ~wxFNB_DROPDOWN_TABS_LIST; + style &= ~wxFNB_NO_NAV_BUTTONS; + } else if(event.GetSelection() == 1){ // list + style |= wxFNB_NO_NAV_BUTTONS; + style |= wxFNB_DROPDOWN_TABS_LIST; + } else { + // none + style |= wxFNB_NO_NAV_BUTTONS; + style &= ~wxFNB_DROPDOWN_TABS_LIST; + } + } + + // Simple tab border around tab area + if(obj == m_tabBorder){ + if(event.IsChecked()){ + style |= wxFNB_TABS_BORDER_SIMPLE; + } else { + style &= ~(wxFNB_TABS_BORDER_SIMPLE); + } + } + + // Hide close button + if(obj == m_hideCloseButton){ + if(event.IsChecked()){ + style |= wxFNB_NO_X_BUTTON; + } else { + style &= ~(wxFNB_NO_X_BUTTON); + } + } + + if(obj == m_mouseMiddleCloseTab){ + if(event.IsChecked()){ + style |= wxFNB_MOUSE_MIDDLE_CLOSES_TABS; + } else { + style &= ~(wxFNB_MOUSE_MIDDLE_CLOSES_TABS); + } + } + + if(obj == m_xButtonOnTab){ + if(event.IsChecked()){ + style |= wxFNB_X_ON_TAB; + } else { + style &= ~(wxFNB_X_ON_TAB); + } + } + + if(obj == m_dlbClickCloseTab){ + if(event.IsChecked()){ + style |= wxFNB_DCLICK_CLOSES_TABS; + } else { + style &= ~(wxFNB_DCLICK_CLOSES_TABS); + } + } + + if(obj == m_smartTabbing){ + if(event.IsChecked()){ + style |= wxFNB_SMART_TABS; + } else { + style &= ~(wxFNB_SMART_TABS); + } + } + + if(obj == m_allowDragAndDrop){ + if(event.IsChecked()){ + m_foreignDnD->Enable(m_options & wxFNB_CUSTOM_FOREIGN_DRAG ? true : false); + style &= ~wxFNB_NODRAG; + } else { + m_foreignDnD->Enable(false); + style |= wxFNB_NODRAG; + } + } + + if(obj == m_foreignDnD){ + if(event.IsChecked()){ + style |= wxFNB_ALLOW_FOREIGN_DND; + } else { + style &= ~wxFNB_ALLOW_FOREIGN_DND; + } + } + + if(obj == m_gradient){ + if(event.IsChecked()){ + style |= wxFNB_BACKGROUND_GRADIENT; + } else { + style &= ~wxFNB_BACKGROUND_GRADIENT; + } + } + + if(obj == m_colorfulTab){ + if(event.IsChecked()){ + style |= wxFNB_COLORFUL_TABS; + } else { + style &= ~wxFNB_COLORFUL_TABS; + } + } + + bookWin->SetWindowStyleFlag(style); + bookWin->Refresh(); +} + + diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_resources.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_resources.cpp new file mode 100644 index 0000000000..610d2f2c81 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/fnb_resources.cpp @@ -0,0 +1,924 @@ +#include + +/////////////////////////////////////////////////////////////////////////////// +// +// XPM Images required by this control +// +/////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////// +// Images used by the control +//////////////////////////////////////////////////////////// + +/* XPM */ +char *signpost_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 104 2", +" c Black", +"M c #3FB524", +"3 c #4CBAFF", +"{ c #004C00", +"1 c #006BE9", +"P c #007200", +"! c #0065DD", +"- c #003FE5", +"Q c #0056BC", +"* c #0062E4", +"t c #0945A7", +"7 c #2BBF1F", +"W c #0050B8", +") c #D59700", +"L c #0E8508", +"A c #0047B0", +"u c #3D93E5", +"x c #0044AD", +": c #46C733", +"( c #B18800", +"X c #E3C247", +"O. c #D69B00", +"E c #0041B1", +"` c #824400", +"| c #C59200", +".. c #7B4000", +"*. c #763C00", +"G c #056ED4", +"f c #088806", +"[ c #005100", +"p c #006DDF", +"g c #007700", +"U c #6D6A00", +"< c #4A4357", +"Z c #0038B7", +"% c #E1B024", +"K c #16A40B", +" . c #986500", +"h c #007100", +"e c #002C9F", +"J c #018101", +"C c #4A3D58", +"; c #009400", +"v c #078BF0", +"$. c #AC6F00", +"F c #0055BC", +"s c #36B01A", +"D c #0052B8", +", c #138E00", +"= c #0058D3", +"5 c #47A9FF", +"~ c #006500", +"S c #004CB2", +"n c #047F02", +"T c #572E17", +"m c #37BA1A", +"X. c #D89D00", +"} c #E49C00", +"6 c #0084FF", +"+ c #D3990C", +"l c #0040A6", +"a c #008200", +"_ c #9C6700", +"d c #86EA4D", +"O c #DCC042", +"# c #C7C334", +"&. c #835000", +"B c #007900", +"k c #0037A9", +"#. c #7B3F00", +"y c #3879CB", +"%. c #A26F00", +"N c #007300", +". c #D0A000", +"& c #626651", +"j c #594855", +"' c #0031B3", +"q c #007000", +"2 c #31AAFF", +"Y c #A96700", +"] c #0034C6", +"R c #0028A7", +"@. c #9B6800", +"o c #EAD96A", +"V c #006700", +"4 c #4CACFB", +"9 c #9EFF63", +"^ c #006400", +"o. c #7A4000", +"b c #0080E5", +"z c #0045AC", +"> c #66DD42", +"I c #005E00", +"c c #125EBE", +"H c #0080F5", +"w c #584955", +"8 c #8BF35A", +"@ c #8E9300", +"/ c #005800", +"+. c #CA9700", +"i c #0071DE", +"0 c #2DA51D", +"$ c #FFDE65", +"r c #003098", +/* pixels */ +" ", +" ", +" . X o O + ", +" @ # $ % & * = - ", +" ; : > , < 1 2 3 4 5 6 ", +" 7 8 9 0 q w e r t y u i p ", +" a s d f g h j k l z x c v b ", +" n m M N B V C Z A S D F G H ", +" J K L P I U Y T R E W Q ! ", +" h ~ ^ / ( ) _ ` ' ] ", +" [ { } | ... ", +" X.| .o. ", +" O.+.@.#. ", +" $.%.&.*. ", +" ", +" " +}; +unsigned char signpost_alpha[]={ +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 7, 174, 240, 238, 148, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 43, 254, 255, 255, 253, 104, 48, 4, 0, 0, 0, 0, +0, 0, 0, 60, 221, 255, 255, 255, 254, 254, 254, 244, 193, 51, 0, 0, +0, 0, 126, 252, 255, 255, 255, 255, 255, 255, 254, 254, 254, 224, 20, 0, +0, 33, 252, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 183, 0, +0, 137, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 128, 0, +0, 211, 254, 254, 255, 255, 255, 255, 246, 147, 216, 254, 225, 81, 0, 0, +0, 20, 162, 246, 234, 248, 255, 255, 238, 0, 0, 29, 11, 0, 0, 0, +0, 0, 0, 11, 20, 231, 255, 255, 235, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 223, 255, 255, 233, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 214, 255, 255, 231, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 137, 240, 236, 131, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +/* XPM */ +char *left_arrow_disabled_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #555555", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"````````.```````", +"```````..```````", +"``````.`.```````", +"`````.``.```````", +"````.```.```````", +"`````.``.```````", +"``````.`.```````", +"```````..```````", +"````````.```````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *x_button_pressed_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #9e9ede", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.############.`", +"`.############.`", +"`.###aa####aa#.`", +"`.####aa##aa##.`", +"`.#####aaaa###.`", +"`.######aa####.`", +"`.#####aaaa###.`", +"`.####aa##aa##.`", +"`.###aa####aa#.`", +"`.############.`", +"`..............`", +"````````````````", +"````````````````" +}; + + +/* XPM */ +char *tab_x_button_pressed_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #008080", +"# c #008080", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.############.`", +"`.############.`", +"`.###aa####aa#.`", +"`.####aa##aa##.`", +"`.#####aaaa###.`", +"`.######aa####.`", +"`.#####aaaa###.`", +"`.####aa##aa##.`", +"`.###aa####aa#.`", +"`.############.`", +"`..............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *left_arrow_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #555555", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"````````.```````", +"```````..```````", +"``````...```````", +"`````....```````", +"````.....```````", +"`````....```````", +"``````...```````", +"```````..```````", +"````````.```````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *x_button_hilite_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #c9dafb", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.############.`", +"`.##aa####aa##.`", +"`.###aa##aa###.`", +"`.####aaaa####.`", +"`.#####aa#####.`", +"`.####aaaa####.`", +"`.###aa##aa###.`", +"`.##aa####aa##.`", +"`.############.`", +"`.############.`", +"`..............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *x_button_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #555555", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````..````..````", +"`````..``..`````", +"``````....``````", +"```````..```````", +"``````....``````", +"`````..``..`````", +"````..````..````", +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *left_arrow_pressed_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #9e9ede", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.############.`", +"`.#######a####.`", +"`.######aa####.`", +"`.#####aaa####.`", +"`.####aaaa####.`", +"`.###aaaaa####.`", +"`.####aaaa####.`", +"`.#####aaa####.`", +"`.######aa####.`", +"`.#######a####.`", +"`..............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *left_arrow_hilite_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #c9dafb", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.######a#####.`", +"`.#####aa#####.`", +"`.####aaa#####.`", +"`.###aaaa#####.`", +"`.##aaaaa#####.`", +"`.###aaaa#####.`", +"`.####aaa#####.`", +"`.#####aa#####.`", +"`.######a#####.`", +"`.############.`", +"`..............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *right_arrow_disabled_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #555555", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"```````.````````", +"```````..```````", +"```````.`.``````", +"```````.``.`````", +"```````.```.````", +"```````.``.`````", +"```````.`.``````", +"```````..```````", +"```````.````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *right_arrow_hilite_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #c9dafb", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.####a#######.`", +"`.####aa######.`", +"`.####aaa#####.`", +"`.####aaaa####.`", +"`.####aaaaa###.`", +"`.####aaaa####.`", +"`.####aaa#####.`", +"`.####aa######.`", +"`.####a#######.`", +"`.############.`", +"`..............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *right_arrow_pressed_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #9e9ede", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"`..............`", +"`.############.`", +"`.############.`", +"`.#####a######.`", +"`.#####aa#####.`", +"`.#####aaa####.`", +"`.#####aaaa###.`", +"`.#####aaaaa##.`", +"`.#####aaaa###.`", +"`.#####aaa####.`", +"`.#####aa#####.`", +"`.#####a######.`", +"`..............`", +"````````````````", +"````````````````" +}; + + +/* XPM */ +char *right_arrow_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #555555", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"```````.````````", +"```````..```````", +"```````...``````", +"```````....`````", +"```````.....````", +"```````....`````", +"```````...``````", +"```````..```````", +"```````.````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +// Arrow down bitmaps +/* XPM */ +char *down_arrow_hilite_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #c9dafb", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"``.............`", +"``.###########.`", +"``.###########.`", +"``.###########.`", +"``.#aaaaaaaaa#.`", +"``.##aaaaaaa##.`", +"``.###aaaaa###.`", +"``.####aaa####.`", +"``.#####a#####.`", +"``.###########.`", +"``.###########.`", +"``.###########.`", +"``.............`", +"````````````````", +"````````````````" +}; + +/* XPM */ +char *down_arrow_pressed_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #4766e0", +"# c #9e9ede", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"``.............`", +"``.###########.`", +"``.###########.`", +"``.###########.`", +"``.###########.`", +"``.###########.`", +"``.#aaaaaaaaa#.`", +"``.##aaaaaaa##.`", +"``.###aaaaa###.`", +"``.####aaa####.`", +"``.#####a#####.`", +"``.###########.`", +"``.............`", +"````````````````", +"````````````````" +}; + + +/* XPM */ +char *down_arrow_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 16 16 8 1", +/* colors */ +"` c #008080", +". c #000000", +"# c #000000", +"a c #000000", +"b c #000000", +"c c #000000", +"d c #000000", +"e c #000000", +/* pixels */ +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````.........```", +"`````.......````", +"``````.....`````", +"```````...``````", +"````````.```````", +"````````````````", +"````````````````", +"````````````````", +"````````````````", +"````````````````" +}; + +// Arrow down bitmaps +const int tab_x_size = 9; + +// arrow_down_blue.xpm 16x16 +unsigned char arrow_down_blue_alpha[]={ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 246, 250, 250, 248, 246, 245, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 2, 11, 11, 0, 255, 255, 255, 255, 255, 255, 0, 11, 11, 2, 0, + 0, 7, 190, 254, 254, 255, 255, 255, 255, 255, 255, 254, 254, 186, 5, 0, + 0, 0, 15, 209, 255, 255, 255, 255, 255, 255, 255, 255, 206, 13, 0, 0, + 0, 0, 0, 28, 226, 255, 255, 255, 255, 255, 255, 223, 25, 0, 0, 0, + 0, 0, 0, 0, 43, 238, 255, 255, 255, 255, 236, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 62, 247, 255, 255, 245, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 86, 253, 252, 82, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 112, 107, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +/* XPM */ +char *arrow_down_blue_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 99 2", +"a c #3E8FDC", +" c Black", +"+. c #0068E2", +"Y c #77B5F4", +"# c #206BC4", +" . c #0065E7", +"I c #0F68CE", +", c #1C7AD3", +": c #217ED9", +"` c #0F62C4", +"o. c #377FCB", +"U c #89C2FA", +"N c #0050B8", +"u c #84BBF1", +"d c #004DB4", +"( c #7DBAF7", +"& c #338BE0", +"c c #539DE8", +"E c #62A9EE", +"X. c #3A7DC4", +"[ c #2E84DF", +"! c #0053E1", +"M c #0D56B4", +"k c #1F6FCA", +"@ c #003BA2", +"D c #60A6EB", +"o c #0345AC", +"w c #1054AA", +"A c #8DC4F8", +"x c #8DC1F2", +"e c #000087", +".. c #006AEC", +"b c #4893DD", +"g c #00008E", +"V c #0067E5", +"* c #177BD5", +"O. c #0067EA", +"] c #0064E8", +"9 c #3C8EE0", +"% c #4B9AE4", +"' c #0061E1", +"< c #074DA7", +"~ c #0064EC", +"s c #1155AA", +"> c #217DD8", +"G c #559FE9", +"F c #5AA3EA", +"3 c #3086DD", +"X c #074AAF", +"^ c #1C73D5", +"W c #508CC5", +"P c #005BE7", +"| c #1C6DC6", +"5 c #2982D6", +"/ c #91C9FE", +"l c #3077CB", +"= c #034AA7", +"Q c #065ABF", +"Z c #8AC5FD", +"+ c #0347AC", +"- c #246CC4", +"p c #4594E4", +"J c #4084C2", +"L c #0043D9", +"K c #0454BA", +"q c #3488D9", +"@. c #0069E0", +"} c #79A7D3", +"H c #52A0EB", +"j c #005AC2", +"m c #115AB4", +"y c #2F78CE", +"f c #0057C0", +"1 c #2A71C9", +"2 c #70AFEC", +"8 c #7AB7EF", +"h c #005AD6", +"C c #0D66CA", +"6 c #0A50A9", +"v c #4E9AE6", +"_ c #6498C9", +"r c #0054DD", +"4 c #2E85DB", +"{ c #9BD0FF", +"O c #0546A9", +"T c #6CAFF0", +"R c #67ABF0", +". c #0042AA", +") c #76B7F7", +"i c #4796E4", +"; c #60A7E7", +"B c #003FAF", +"t c #0048D1", +"n c #246BBA", +"7 c #2E76CC", +"$ c #7EBCF0", +"z c #5696DD", +"S c #79B5F0", +"0 c #398EE0", +/* pixels */ +" ", +" ", +" . X o O + @ ", +" # $ % & * = ", +" - ; : > , < ", +" 1 2 3 4 5 6 ", +" 7 8 9 0 q w ", +" e r t y u i p a s d f g ", +" h j k l z x c v b n m M N B ", +" V C Z A S D F G H J K L ", +" P I U Y T R E W Q ! ", +" ~ ^ / ( ) _ ` ' ", +" ] [ { } | . ", +" ..X.o.O. ", +" +.@. ", +" " +}; +// arrow_up_blue.xpm 16x16 +unsigned char arrow_up_blue_alpha[]={ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 95, 110, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 72, 250, 252, 85, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 51, 242, 255, 255, 247, 62, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 35, 232, 255, 255, 255, 255, 238, 44, 0, 0, 0, 0, + 0, 0, 0, 21, 218, 255, 255, 255, 255, 255, 255, 226, 28, 0, 0, 0, + 0, 0, 11, 200, 255, 255, 255, 255, 255, 255, 255, 255, 210, 16, 0, 0, + 0, 4, 180, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 7, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 241, 244, 245, 243, 241, 239, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; +/* XPM */ +char *arrow_up_blue_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 93 2", +" c Black", +"n c #2262AB", +"@ c #006BED", +"! c #237ED9", +"# c #006BF2", +"G c #81BAF0", +"( c #4B9EE8", +"/ c #1B67C2", +": c #BFE1FF", +"{ c #0444A8", +"B c #005CD7", +"2 c #005CDF", +"N c #0050B8", +") c #1F81DC", +"D c #145AAC", +"I c #73B2EC", +"T c #2983D9", +"> c #7DBAF5", +"O c #4998EA", +"z c #3F8ADB", +"9 c #62A9EC", +"5 c #B6DAFD", +"h c #004DD2", +"s c #519DE5", +"t c #B4DAFE", +"L c #1057AD", +"C c #8FC1F3", +"4 c #0768CF", +"< c #79B7F5", +"a c #549EE7", +"* c #257DDA", +"J c #398DDF", +"R c #0E54A9", +", c #72B3F4", +"% c #C6E4FF", +"; c #1471D3", +"$ c #2881DE", +"i c #61A7EB", +"m c #115BB5", +"u c #66ABEF", +"Q c #2681D9", +"c c #559FE8", +"3 c #0061EC", +"- c #0061ED", +"K c #358ADC", +"k c #1C70CD", +"r c #0666CD", +"` c #1378D5", +"Y c #2E86DD", +"[ c #054AAF", +"W c #67A9E8", +"^ c #084EA6", +"q c #0B61C7", +"f c #065AC3", +" . c #003AA0", +"H c #3B8FE1", +"8 c #65A9ED", +"y c #94C7F8", +"v c #4F9CE6", +"6 c #7EBAF5", +". c #006FE6", +"_ c #197DDB", +"F c #2773CB", +"} c #0141A0", +"E c #1D68C5", +"o c #006FF1", +"& c #9CCFFF", +"j c #0060C2", +"| c #013EA0", +"0 c #61A9EF", +"= c #0066E9", +"7 c #6BAEEF", +"S c #4191E0", +"w c #0060DD", +"l c #2373CE", +"+ c #509DEC", +"U c #3088DD", +"M c #0F5DBC", +"p c #5AA2E9", +"A c #4495E4", +"' c #054CA7", +"~ c #1F7CD5", +"b c #4996E0", +"1 c #156ED0", +"d c #51A1EC", +"Z c #4796E4", +"e c #004EE0", +"V c #2975CC", +"g c #0048D5", +"P c #226EC8", +"x c #6DB0EE", +"X c #006BE1", +"] c #0143A8", +/* pixels */ +" ", +" . X ", +" o O + @ ", +" # $ % & * = ", +" - ; : > , < 1 2 ", +" 3 4 5 6 7 8 9 0 q w ", +" e r t y u i p a s d f g ", +" h j k l z x c v b n m M N B ", +" V C Z A S D ", +" F G H J K L ", +" P I U Y T R ", +" E W Q ! ~ ^ ", +" / ( ) _ ` ' ", +" ] [ { } | . ", +" ", +" " +}; + + +////////////////////////////////////////////////////////////////////////////////////////////////// +// +// End of XPM Images +// +////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/popup_dlg.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/popup_dlg.cpp new file mode 100644 index 0000000000..79141adb65 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/popup_dlg.cpp @@ -0,0 +1,226 @@ +#include +#include +#include +#include +#include +#include +//#include +#include + +wxBitmap wxTabNavigatorWindow::m_bmp; + +wxTabNavigatorWindow::wxTabNavigatorWindow(wxWindow* parent) +: m_listBox(NULL) +, m_selectedItem(-1) +, m_panel(NULL) +{ + Create(parent); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + GetSizer()->Layout(); + Centre(); +} + +wxTabNavigatorWindow::wxTabNavigatorWindow() +: wxDialog() +, m_listBox(NULL) +, m_selectedItem(-1) +, m_panel(NULL) +{ +} + +wxTabNavigatorWindow::~wxTabNavigatorWindow() +{ +} + +void wxTabNavigatorWindow::Create(wxWindow* parent) +{ + long style = 0; + if( !wxDialog::Create(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, style) ) + return; + + wxBoxSizer *sz = new wxBoxSizer( wxVERTICAL ); + SetSizer( sz ); + + long flags = wxLB_SINGLE | wxNO_BORDER ; + m_listBox = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(300, 200), 0, NULL, flags); + + static int panelHeight = 0; + if( panelHeight == 0 ) + { + wxMemoryDC mem_dc; + + // bitmap must be set before it can be used for anything + wxBitmap bmp(10, 10); + mem_dc.SelectObject(bmp); + + wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + font.SetWeight( wxBOLD ); + mem_dc.SetFont(font); + int w; + mem_dc.GetTextExtent(wxT("Tp"), &w, &panelHeight); + panelHeight += 4; // Place a spacer of 2 pixels + + // Out signpost bitmap is 24 pixels + if( panelHeight < 24 ) + panelHeight = 24; + } + + m_panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize(300, panelHeight)); + + sz->Add( m_panel ); + sz->Add( m_listBox, 1, wxEXPAND ); + + SetSizer( sz ); + + // Connect events to the list box + m_listBox->Connect(wxID_ANY, wxEVT_KEY_UP, wxKeyEventHandler(wxTabNavigatorWindow::OnKeyUp), NULL, this); + //Connect(wxEVT_CHAR_HOOK, wxCharEventHandler(wxTabNavigatorWindow::OnKeyUp), NULL, this); + m_listBox->Connect(wxID_ANY, wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(wxTabNavigatorWindow::OnNavigationKey), NULL, this); + m_listBox->Connect(wxID_ANY, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler(wxTabNavigatorWindow::OnItemSelected), NULL, this); + + // Connect paint event to the panel + m_panel->Connect(wxID_ANY, wxEVT_PAINT, wxPaintEventHandler(wxTabNavigatorWindow::OnPanelPaint), NULL, this); + m_panel->Connect(wxID_ANY, wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(wxTabNavigatorWindow::OnPanelEraseBg), NULL, this); + + SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE) ); + m_listBox->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + PopulateListControl( static_cast( parent ) ); + + // Create the bitmap, only once + if( !m_bmp.Ok() ) + { + wxImage img(signpost_xpm); + img.SetAlpha(signpost_alpha, true); + m_bmp = wxBitmap(img); + } + m_listBox->SetFocus(); +} + +void wxTabNavigatorWindow::OnKeyUp(wxKeyEvent &event) +{ + if(event.GetKeyCode() == WXK_CONTROL) + { + CloseDialog(); + } +} + +void wxTabNavigatorWindow::OnNavigationKey(wxNavigationKeyEvent &event) +{ + long selected = m_listBox->GetSelection(); + wxFlatNotebook* bk = static_cast(GetParent()); + long maxItems = bk->GetPageCount(); + long itemToSelect; + + if( event.GetDirection() ) + { + // Select next page + if (selected == maxItems - 1) + itemToSelect = 0; + else + itemToSelect = selected + 1; + } + else + { + // Previous page + if( selected == 0 ) + itemToSelect = maxItems - 1; + else + itemToSelect = selected - 1; + } + + m_listBox->SetSelection( itemToSelect ); +} + +void wxTabNavigatorWindow::PopulateListControl(wxFlatNotebook *book) +{ + int selection = book->GetSelection(); + //int count = book->GetPageCount(); + + std::map temp; + m_listBox->Append( book->GetPageText(static_cast(selection)) ); + m_indexMap[0] = selection; + temp[selection] = true; + + const wxArrayInt &arr = book->GetBrowseHistory(); + for(size_t i=0; iAppend( book->GetPageText(static_cast(arr.Item(i))) ); + m_indexMap[(int)m_listBox->GetCount()-1] = arr.Item(i); + temp[arr.Item(i)] = true; + } + } + + // Select the next entry after the current selection + m_listBox->SetSelection( 0 ); + wxNavigationKeyEvent dummy; + dummy.SetDirection(true); + OnNavigationKey(dummy); +} + +void wxTabNavigatorWindow::OnItemSelected(wxCommandEvent & event ) +{ + wxUnusedVar( event ); + CloseDialog(); +} + +void wxTabNavigatorWindow::CloseDialog() +{ + wxFlatNotebook* bk = static_cast(GetParent()); + m_selectedItem = m_listBox->GetSelection(); + std::map::iterator iter = m_indexMap.find(m_selectedItem); + bk->SetSelection( iter->second ); + EndModal( wxID_OK ); +} + +void wxTabNavigatorWindow::OnPanelPaint(wxPaintEvent &event) +{ + wxUnusedVar(event); + wxPaintDC dc(m_panel); + wxRect rect = m_panel->GetClientRect(); + + static bool first = true; + static wxBitmap bmp( rect.width, rect.height ); + + if( first ) + { + first = false; + wxMemoryDC mem_dc; + mem_dc.SelectObject( bmp ); + + wxColour endColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW) ); + wxColour startColour( wxFNBRenderer::LightColour(endColour, 50) ); + wxFNBRenderer::PaintStraightGradientBox(mem_dc, rect, startColour, endColour); + + // Draw the caption title and place the bitmap + wxPoint bmpPt; + wxPoint txtPt; + + // get the bitmap optimal position, and draw it + bmpPt.y = (rect.height - m_bmp.GetHeight()) / 2; + bmpPt.x = 3; + mem_dc.DrawBitmap( m_bmp, bmpPt, true ); + + // get the text position, and draw it + int fontHeight(0), w(0); + wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + font.SetWeight( wxBOLD ); + mem_dc.SetFont( font ); + mem_dc.GetTextExtent( wxT("Tp"), &w, &fontHeight ); + + txtPt.x = bmpPt.x + m_bmp.GetWidth() + 4; + txtPt.y = (rect.height - fontHeight)/2; + mem_dc.SetTextForeground( *wxWHITE ); + mem_dc.DrawText( wxT("Opened tabs:"), txtPt ); + mem_dc.SelectObject( wxNullBitmap ); + } + + dc.DrawBitmap( bmp, 0, 0 ); +} + +void wxTabNavigatorWindow::OnPanelEraseBg(wxEraseEvent &event) +{ + wxUnusedVar(event); + +} diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/renderer.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/renderer.cpp new file mode 100644 index 0000000000..7f01317315 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/renderer.cpp @@ -0,0 +1,1691 @@ +#include +#include // for the styles +#include +#include + +//----------------------------------------------------------------------------- +// Util functions +//----------------------------------------------------------------------------- + +static void DrawButton(wxDC& dc, + const wxRect& rect, + const bool &focus, + const bool &upperTabs) +{ + // Define the rounded rectangle base on the given rect + // we need an array of 9 points for it + wxColour topStartColor(wxT("WHITE")); + wxColour topEndColor(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + wxColour bottomStartColor(topEndColor); + wxColour bottomEndColor(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + + // Define the middle points + if( focus ){ + wxFNBRenderer::PaintStraightGradientBox(dc, rect, topStartColor, topEndColor); + } else { + wxPoint leftPt, rightPt; + leftPt = wxPoint(rect.x, rect.y + rect.height / 2); + rightPt = wxPoint(rect.x + rect.width - 2, rect.y + rect.height / 2); + + // Define the top region + wxRect top(rect.GetLeftTop(), rightPt); + wxRect bottom(leftPt, rect.GetBottomRight()); + + // Incase we use bottom tabs, switch the colors + if(upperTabs){ + wxFNBRenderer::PaintStraightGradientBox(dc, top, topStartColor, topEndColor); + wxFNBRenderer::PaintStraightGradientBox(dc, bottom, bottomStartColor, bottomEndColor); + }else{ + wxFNBRenderer::PaintStraightGradientBox(dc, top, topEndColor, topStartColor); + wxFNBRenderer::PaintStraightGradientBox(dc, bottom, bottomEndColor, bottomStartColor); + } + } + + dc.SetBrush( *wxTRANSPARENT_BRUSH ); +} + +wxFNBRenderer::wxFNBRenderer() +: m_tabXBgBmp(16, 16) +, m_xBgBmp(16, 14) +, m_leftBgBmp(16, 14) +, m_rightBgBmp(16, 14) +{ +} + +wxFNBRenderer::~wxFNBRenderer() +{ +} + +int wxFNBRenderer::GetLeftButtonPos(wxWindow* pageContainer) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + wxRect rect = pc->GetClientRect(); + int clientWidth = rect.width; + if(style & wxFNB_NO_X_BUTTON) + return clientWidth - 38; + else + return clientWidth - 54; +} + +int wxFNBRenderer::GetRightButtonPos(wxWindow* pageContainer) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + wxRect rect = pc->GetClientRect(); + int clientWidth = rect.width; + if(style & wxFNB_NO_X_BUTTON) + return clientWidth - 22; + else + return clientWidth - 38; +} + +int wxFNBRenderer::GetDropArrowButtonPos(wxWindow *pageContainer) +{ + return GetRightButtonPos(pageContainer); +} + +int wxFNBRenderer::GetXPos(wxWindow* pageContainer) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + wxRect rect = pc->GetClientRect(); + int clientWidth = rect.width; + if(style & wxFNB_NO_X_BUTTON) + return clientWidth; + else + return clientWidth - 22; +} + +int wxFNBRenderer::GetButtonsAreaLength(wxWindow* pageContainer) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + + // '' + if(style & wxFNB_NO_NAV_BUTTONS && style & wxFNB_NO_X_BUTTON && !(style & wxFNB_DROPDOWN_TABS_LIST)) + return 0; + + // 'x' + if((style & wxFNB_NO_NAV_BUTTONS) && !(style & wxFNB_NO_X_BUTTON) && !(style & wxFNB_DROPDOWN_TABS_LIST)) + return 22; + + // '<>' + if(!(style & wxFNB_NO_NAV_BUTTONS) && (style & wxFNB_NO_X_BUTTON) && !(style & wxFNB_DROPDOWN_TABS_LIST)) + return 53 - 16; + + // 'vx' + if((style & wxFNB_DROPDOWN_TABS_LIST) && !(style & wxFNB_NO_X_BUTTON)) + return 22 + 16; + + // 'v' + if((style & wxFNB_DROPDOWN_TABS_LIST) && (style & wxFNB_NO_X_BUTTON)) + return 22; + + // '<>x' + return 53; +} + +void wxFNBRenderer::DrawLeftArrow(wxWindow* pageContainer, wxDC& dc) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + if(style & wxFNB_NO_NAV_BUTTONS) + return; + + // Make sure that there are pages in the container + if(pc->GetPageInfoVector().empty()) + return; + + // Set the bitmap according to the button status + wxBitmap arrowBmp; + switch(pc->m_nLeftButtonStatus) + { + case wxFNB_BTN_HOVER: + arrowBmp = wxBitmap(left_arrow_hilite_xpm); + break; + case wxFNB_BTN_PRESSED: + arrowBmp = wxBitmap(left_arrow_pressed_xpm); + break; + case wxFNB_BTN_NONE: + default: + arrowBmp = wxBitmap(left_arrow_xpm); + break; + } + + if(pc->m_nFrom == 0) + { + // Handle disabled arrow + arrowBmp = wxBitmap(left_arrow_disabled_xpm); + } + + arrowBmp.SetMask(new wxMask(arrowBmp, MASK_COLOR)); + + // Erase old bitmap + int posx = GetLeftButtonPos( pc ); + dc.DrawBitmap(m_leftBgBmp, posx, 6); + + // Draw the new bitmap + dc.DrawBitmap(arrowBmp, posx, 6, true); +} + +void wxFNBRenderer::DrawRightArrow(wxWindow* pageContainer, wxDC& dc) +{ + wxPageContainer *pc = static_cast( pageContainer ); + long style = pc->GetParent()->GetWindowStyleFlag(); + if(style & wxFNB_NO_NAV_BUTTONS) + return; + + // Make sure that there are pages in the container + if(pc->GetPageInfoVector().empty()) + return; + + // Set the bitmap according to the button status + wxBitmap arrowBmp; + switch(pc->m_nRightButtonStatus) + { + case wxFNB_BTN_HOVER: + arrowBmp = wxBitmap(right_arrow_hilite_xpm); + break; + case wxFNB_BTN_PRESSED: + arrowBmp = wxBitmap(right_arrow_pressed_xpm); + break; + case wxFNB_BTN_NONE: + default: + arrowBmp = wxBitmap(right_arrow_xpm); + break; + } + + + // Check if the right most tab is visible, if it is + // don't rotate right anymore + if(pc->GetPageInfoVector()[pc->GetPageInfoVector().GetCount()-1].GetPosition() != wxPoint(-1, -1)) + { + arrowBmp = wxBitmap(right_arrow_disabled_xpm); + } + + arrowBmp.SetMask(new wxMask(arrowBmp, MASK_COLOR)); + + // erase old bitmap + int posx = GetRightButtonPos( pc ) ; + dc.DrawBitmap(m_rightBgBmp, posx, 6); + + // Draw the new bitmap + dc.DrawBitmap(arrowBmp, posx, 6, true); +} + +void wxFNBRenderer::DrawDropDownArrow(wxWindow* pageContainer, wxDC& dc) +{ + wxPageContainer *pc = static_cast( pageContainer ); + // Check if this style is enabled + long style = pc->GetParent()->GetWindowStyleFlag(); + if(! (style & wxFNB_DROPDOWN_TABS_LIST) ) + return; + + // Make sure that there are pages in the container + if(pc->GetPageInfoVector().empty()) + return; + + // Set the bitmap according to the button status + wxBitmap xbmp; + + switch(pc->m_nArrowDownButtonStatus) + { + case wxFNB_BTN_HOVER: + xbmp = wxBitmap(down_arrow_hilite_xpm); + break; + case wxFNB_BTN_PRESSED: + xbmp = wxBitmap(down_arrow_pressed_xpm); + break; + case wxFNB_BTN_NONE: + default: + xbmp = wxBitmap(down_arrow_xpm); + break; + } + + xbmp.SetMask(new wxMask(xbmp, MASK_COLOR)); + // erase old bitmap + int posx = GetDropArrowButtonPos( pc ); + dc.DrawBitmap(m_rightBgBmp, posx, 6); + + // Draw the new bitmap + dc.DrawBitmap(xbmp, posx, 6, true); +} + +void wxFNBRenderer::DrawX(wxWindow* pageContainer, wxDC& dc) +{ + wxPageContainer *pc = static_cast( pageContainer ); + // Check if this style is enabled + long style = pc->GetParent()->GetWindowStyleFlag(); + if(style & wxFNB_NO_X_BUTTON) + return; + + // Make sure that there are pages in the container + if(pc->GetPageInfoVector().empty()) + return; + + // Set the bitmap according to the button status + wxBitmap xbmp; + switch(pc->m_nXButtonStatus) + { + case wxFNB_BTN_HOVER: + xbmp = wxBitmap(x_button_hilite_xpm); + break; + case wxFNB_BTN_PRESSED: + xbmp = wxBitmap(x_button_pressed_xpm); + break; + case wxFNB_BTN_NONE: + default: + xbmp = wxBitmap(x_button_xpm); + break; + } + + xbmp.SetMask(new wxMask(xbmp, MASK_COLOR)); + // erase old bitmap + int posx = GetXPos( pc ); + dc.DrawBitmap(m_xBgBmp, posx, 6); + + // Draw the new bitmap + dc.DrawBitmap(xbmp, posx, 6, true); +} + +void wxFNBRenderer::PaintStraightGradientBox(wxDC& dc, const wxRect& rect, const wxColour& startColor, const wxColour& endColor, bool vertical) +{ + int rd, gd, bd, high = 0; + rd = endColor.Red() - startColor.Red(); + gd = endColor.Green() - startColor.Green(); + bd = endColor.Blue() - startColor.Blue(); + + /// Save the current pen and brush + wxPen savedPen = dc.GetPen(); + wxBrush savedBrush = dc.GetBrush(); + + if ( vertical ) + high = rect.GetHeight()-1; + else + high = rect.GetWidth()-1; + + if( high < 1 ) + return; + + for (int i = 0; i <= high; ++i) + { + int r = startColor.Red() + ((i*rd*100)/high)/100; + int g = startColor.Green() + ((i*gd*100)/high)/100; + int b = startColor.Blue() + ((i*bd*100)/high)/100; + + wxPen p(wxColor(r, g, b)); + dc.SetPen(p); + + if ( vertical ) + dc.DrawLine(rect.x, rect.y+i, rect.x+rect.width, rect.y+i); + else + dc.DrawLine(rect.x+i, rect.y, rect.x+i, rect.y+rect.height); + } + + /// Restore the pen and brush + dc.SetPen( savedPen ); + dc.SetBrush( savedBrush ); +} + +void wxFNBRenderer::DrawTabX(wxWindow* pageContainer, wxDC& dc, const wxRect& rect, const int& tabIdx, const int btnStatus) +{ + wxPageContainer *pc = static_cast( pageContainer ); + if(!pc->HasFlag(wxFNB_X_ON_TAB)) + return; + + /// We draw the 'x' on the active tab only + if(tabIdx != pc->GetSelection() || tabIdx < 0) + return; + + // Set the bitmap according to the button status + wxBitmap xBmp; + switch(btnStatus) + { + case wxFNB_BTN_HOVER: + xBmp = wxBitmap(x_button_xpm); + break; + case wxFNB_BTN_PRESSED: + xBmp = wxBitmap(tab_x_button_pressed_xpm); + break; + case wxFNB_BTN_NONE: + default: + xBmp = wxBitmap(x_button_xpm); + break; + } + + /// Set the masking + xBmp.SetMask(new wxMask(xBmp, MASK_COLOR)); + + // erase old button + dc.DrawBitmap(m_tabXBgBmp, rect.x, rect.y); + + // Draw the new bitmap + dc.DrawBitmap(xBmp, rect.x, rect.y, true); + + // Update the vectpr + wxRect rr(rect.x, rect.y, 14, 13); + pc->GetPageInfoVector()[tabIdx].SetXRect( rr ); +} + +void wxFNBRenderer::GetBitmap(wxDC &dc, const wxRect &rect, wxBitmap &bmp) +{ + wxMemoryDC mem_dc; + mem_dc.SelectObject(bmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); +} + +wxColor wxFNBRenderer::RandomColor() +{ + int r, g, b; + r = rand() % 256; // Random value betweem 0-255 + g = rand() % 256; // Random value betweem 0-255 + b = rand() % 256; // Random value betweem 0-255 + return wxColor(r, g, b); +} + +wxColor wxFNBRenderer::DarkColour(const wxColour& color, int percent) +{ + int rd, gd, bd, high = 0; + wxColor end_color = wxT("BLACK"); + rd = end_color.Red() - color.Red(); + gd = end_color.Green() - color.Green(); + bd = end_color.Blue() - color.Blue(); + high = 100; + + // We take the percent way of the color from color --> black + int i = percent; + int r = color.Red() + ((i*rd*100)/high)/100; + int g = color.Green() + ((i*gd*100)/high)/100; + int b = color.Blue() + ((i*bd*100)/high)/100; + return wxColor(r, g, b); +} + +wxColor wxFNBRenderer::LightColour(const wxColour& color, int percent) +{ + int rd, gd, bd, high = 0; + wxColor end_color = wxT("WHITE"); + rd = end_color.Red() - color.Red(); + gd = end_color.Green() - color.Green(); + bd = end_color.Blue() - color.Blue(); + high = 100; + + // We take the percent way of the color from color --> white + int i = percent; + int r = color.Red() + ((i*rd*100)/high)/100; + int g = color.Green() + ((i*gd*100)/high)/100; + int b = color.Blue() + ((i*bd*100)/high)/100; + return wxColor(r, g, b); +} + +void wxFNBRenderer::DrawTabsLine(wxWindow* pageContainer, wxDC& dc, wxCoord selTabX1, wxCoord selTabX2) +{ + wxPageContainer *pc = static_cast( pageContainer ); + wxRect clntRect = pc->GetClientRect(); + wxRect clientRect, clientRect2, clientRect3; + clientRect3 = wxRect(0, 0, clntRect.width, clntRect.height); + + if( pc->HasFlag(wxFNB_FF2) ){ + wxColour fillColor; + if( !pc->HasFlag(wxFNB_BOTTOM) ){ + fillColor = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + } else { + fillColor = wxColor(wxT("WHITE")); + } + + dc.SetPen( wxPen(fillColor) ); + if(pc->HasFlag(wxFNB_BOTTOM)){ + + wxCoord yoff = 0; + wxCoord xoff = clntRect.x; + + //draw rectangle with height 4 pixels at the top of the tab drawing area + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW))); + dc.SetBrush(wxBrush(fillColor)); + dc.DrawRectangle(0, yoff, clntRect.width, 4); + + //erase the line under the selected tab + dc.SetPen(wxPen(fillColor)); + dc.DrawLine(selTabX1 + 2, 3, selTabX2, 3); + + //erase the right & left side of the rectangle + dc.DrawLine(0, yoff+1, 0, 3); + dc.DrawLine(xoff + clntRect.width-1, yoff+1, xoff + clntRect.width-1, 3); + + } else { + wxCoord yoff = clntRect.y+clntRect.height; + wxCoord xoff = clntRect.x; + + //draw rectangle with height 4 pixels at the bottom of the tab drawing area + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW))); + dc.SetBrush(wxBrush(fillColor)); + dc.DrawRectangle(0, yoff-4, clntRect.width, 4); + + //erase the line under the selected tab + dc.SetPen(wxPen(fillColor)); + dc.DrawLine(selTabX1 + 2, yoff-4, selTabX2, yoff-4); + + //erase the right & left side of the rectangle + dc.DrawLine(0, yoff-2, 0, yoff-4); + dc.DrawLine(xoff + clntRect.width-1, yoff-2, xoff + clntRect.width-1, yoff-4); + } + } else { + if(pc->HasFlag(wxFNB_BOTTOM)) + { + clientRect = wxRect(0, 2, clntRect.width, clntRect.height - 2); + clientRect2 = wxRect(0, 1, clntRect.width, clntRect.height - 1); + } + else + { + clientRect = wxRect(0, 0, clntRect.width, clntRect.height - 2); + clientRect2 = wxRect(0, 0, clntRect.width, clntRect.height - 1); + } + + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.SetPen( wxPen(pc->GetSingleLineBorderColor()) ); + dc.DrawRectangle(clientRect2); + dc.DrawRectangle(clientRect3); + + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW))); + dc.DrawRectangle(clientRect); + + if( !pc->HasFlag(wxFNB_TABS_BORDER_SIMPLE) ) + { + dc.SetPen(pc->m_tabAreaColor); + dc.DrawLine(0, 0, 0, clientRect.height+1); + if(pc->HasFlag(wxFNB_BOTTOM)) + { + dc.DrawLine(0, clientRect.height+1, clientRect.width, clientRect.height+1); + } + else + dc.DrawLine(0, 0, clientRect.width, 0); + dc.DrawLine(clientRect.width - 1, 0, clientRect.width - 1, clientRect.height+1); + } + } +} + +int wxFNBRenderer::CalcTabWidth(wxWindow *pageContainer, int tabIdx, int tabHeight) +{ + wxPageContainer *pc = static_cast( pageContainer ); + int tabWidth, shapePoints(0), width, pom; + wxMemoryDC dc; + + // bitmap must be set before it can be used for anything + wxBitmap bmp(10, 10); + dc.SelectObject(bmp); + + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont(normalFont); + boldFont.SetWeight(wxFONTWEIGHT_BOLD); + + if( pc->IsDefaultTabs() ) + shapePoints = (int)(tabHeight*tan((double)pc->GetPageInfoVector()[tabIdx].GetTabAngle()/180.0*M_PI)); + + if(pc->GetSelection() == tabIdx) + dc.SetFont(boldFont); + else + dc.SetFont(normalFont); + dc.GetTextExtent(pc->GetPageText(tabIdx), &width, &pom); + + // Set a minimum size to a tab + if(width < 20) + width = 20; + + tabWidth = ((wxFlatNotebook *)pc->m_pParent)->GetPadding() * 2 + width; + + /// Style to add a small 'x' button on the top right + /// of the tab + if(pc->HasFlag(wxFNB_X_ON_TAB) && tabIdx == pc->GetSelection()) + { + int spacer = 9; + if( pc->HasFlag(wxFNB_VC8) ) + spacer = 4; + + tabWidth += ((wxFlatNotebook *)pc->m_pParent)->GetPadding() + spacer; + } + + if( pc->IsDefaultTabs() ) + // Default style + tabWidth += 2 * shapePoints; + + bool hasImage = (pc->m_ImageList != NULL && pc->GetPageInfoVector()[tabIdx].GetImageIndex() != -1); + + // For VC71 style, we only add the icon size (16 pixels) + if(hasImage) + { + if( ! pc->IsDefaultTabs() ) + tabWidth += (16 + ((wxFlatNotebook*)pc->m_pParent)->GetPadding()); + else + // Default style + tabWidth += (16 + ((wxFlatNotebook*)pc->m_pParent)->GetPadding()) + shapePoints / 2; + } + return tabWidth; +} + +void wxFNBRenderer::NumberTabsCanFit(wxWindow *pageContainer, std::vector &vTabInfo, int from) +{ + wxPageContainer *pc = static_cast( pageContainer ); + int tabHeight, clientWidth; + + wxRect rect = pc->GetClientRect(); + clientWidth = rect.width; + + /// Empty results + vTabInfo.clear(); + + tabHeight = CalcTabHeight( pageContainer ); + + // The drawing starts from posx + int posx = ((wxFlatNotebook *)pc->m_pParent)->GetPadding(); + + if( from < 0 ) + from = pc->m_nFrom; + + for(int i = from; i<(int)pc->GetPageInfoVector().GetCount(); i++) + { + int tabWidth = CalcTabWidth( pageContainer, i, tabHeight ); + if(posx + tabWidth + GetButtonsAreaLength( pc ) >= clientWidth) + break; + + /// Add a result to the returned vector + wxRect tabRect(posx, VERTICAL_BORDER_PADDING, tabWidth , tabHeight); + vTabInfo.push_back(tabRect); + + /// Advance posx + posx += tabWidth; + } +} + +void wxFNBRenderer::DrawDragHint(wxWindow *pageContainer, int tabIdx) +{ + wxUnusedVar( pageContainer ); + wxUnusedVar( tabIdx ); +} + +int wxFNBRenderer::CalcTabHeight(wxWindow *pageContainer) +{ + int tabHeight; + wxMemoryDC dc; + wxPageContainer *pc = static_cast( pageContainer ); + wxUnusedVar(pc); + + wxBitmap bmp(10, 10); + dc.SelectObject(bmp); + + // For GTK it seems that we must do this steps in order + // for the tabs will get the proper height on initialization + // on MSW, preforming these steps yields wierd results + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont = normalFont; + boldFont.SetWeight(wxFONTWEIGHT_BOLD); +#ifdef __WXGTK__ + dc.SetFont( boldFont ); +#endif + + static int height(-1); + static int width(-1); + + if( height == -1 && width == -1 ) + { + wxString stam = wxT("Tp"); // Temp data to get the text height; + dc.GetTextExtent(stam, &width, &height); + } + + tabHeight = height + wxFNB_HEIGHT_SPACER; // We use 8 pixels as padding +#ifdef __WXGTK__ + // On GTK the tabs are should be larger + //tabHeight += 6; +#endif + return tabHeight; +} + +void wxFNBRenderer::DrawTabs(wxWindow *pageContainer, wxDC &dc, wxEvent &event) +{ + wxPageContainer *pc = static_cast( pageContainer ); +#ifndef __WXMAC__ + // Works well on MSW & GTK, however this lines should be skipped on MAC + if(pc->GetPageInfoVector().empty() || pc->m_nFrom >= (int)pc->GetPageInfoVector().GetCount()) + { + pc->Hide(); + event.Skip(); + return; + } +#endif + + // Calculate the number of rows required for drawing the tabs + wxRect rect = pc->GetClientRect(); + int tabHeight = rect.GetHeight(); + + // Set the maximum client size +#ifdef __WXMAC__ + pc->SetSizeHints(wxSize(GetButtonsAreaLength( pc ), tabHeight)); +#endif + wxPen borderPen = wxPen( wxFNBRenderer::LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW), 40)); + + wxBrush backBrush; + backBrush = wxBrush(pc->m_tabAreaColor); + + wxBrush noselBrush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + wxBrush selBrush = wxBrush(pc->m_activeTabColor); + + wxSize size = pc->GetSize(); + + // Background + dc.SetTextBackground(pc->GetBackgroundColour()); + dc.SetTextForeground(pc->m_activeTextColor); + dc.SetBrush(backBrush); + + // If border style is set, set the pen to be border pen + if(pc->HasFlag(wxFNB_TABS_BORDER_SIMPLE)) + dc.SetPen(borderPen); + else + { + wxColor colr = pc->GetBackgroundColour(); + dc.SetPen( wxPen(colr) ); + } + + int lightFactor = pc->HasFlag(wxFNB_BACKGROUND_GRADIENT) ? 90 : 30; + if(pc->HasFlag(wxFNB_BACKGROUND_GRADIENT)){ + PaintStraightGradientBox(dc, pc->GetClientRect(), LightColour(pc->m_tabAreaColor, 10), LightColour(pc->m_tabAreaColor, lightFactor)); + }else{ + dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + dc.DrawRectangle(0, 0, size.x, size.y); + } + + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawRectangle(0, 0, size.x, size.y); + + // Take 3 bitmaps for the background for the buttons + { + wxMemoryDC mem_dc; + wxRect rect; + + //--------------------------------------- + // X button + //--------------------------------------- + rect = wxRect(GetXPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_xBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + + //--------------------------------------- + // Right button + //--------------------------------------- + rect = wxRect(GetRightButtonPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_rightBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + + //--------------------------------------- + // Left button + //--------------------------------------- + rect = wxRect(GetLeftButtonPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_leftBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + } + + // We always draw the bottom/upper line of the tabs + // regradless the style + dc.SetPen(borderPen); + + if( pc->HasFlag(wxFNB_FF2) == false ){ + DrawTabsLine(pc, dc); + } + + // Restore the pen + dc.SetPen(borderPen); + +#ifdef __WXMAC__ + // On MAC, Add these lines so the tab background gets painted + if(pc->GetPageInfoVector().empty() || pc->m_nFrom >= (int)pc->GetPageInfoVector().GetCount()) + { + pc->Hide(); + return; + } +#endif + + // Draw labels + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont = normalFont; + boldFont.SetWeight(wxFONTWEIGHT_BOLD); + dc.SetFont(boldFont); + + int posx = ((wxFlatNotebook *)pc->m_pParent)->GetPadding(); + int i = 0; + + // Update all the tabs from 0 to 'pc->m_nFrom' to be non visible + for(i=0; im_nFrom; i++) + { + pc->GetPageInfoVector()[i].SetPosition(wxPoint(-1, -1)); + pc->GetPageInfoVector()[i].GetRegion().Clear(); + } + + //---------------------------------------------------------- + // Go over and draw the visible tabs + //---------------------------------------------------------- + wxCoord x1(-1), x2(-1); + std::vector vTabsInfo; + NumberTabsCanFit(pc, vTabsInfo); + + for(i=pc->m_nFrom; im_nFrom+(int)vTabsInfo.size(); i++) + { + dc.SetPen(borderPen); + if( !pc->HasFlag(wxFNB_FF2) ){ + dc.SetBrush((i==pc->GetSelection()) ? selBrush : noselBrush); + } + + // Now set the font to the correct font + dc.SetFont((i==pc->GetSelection()) ? boldFont : normalFont); + + // Add the padding to the tab width + // Tab width: + // +-----------------------------------------------------------+ + // | PADDING | IMG | IMG_PADDING | TEXT | PADDING | x |PADDING | + // +-----------------------------------------------------------+ + int tabWidth = CalcTabWidth(pageContainer, i, tabHeight); + + // By default we clean the tab region + pc->GetPageInfoVector()[i].GetRegion().Clear(); + + // Clean the 'x' buttn on the tab. + // A 'Clean' rectanlge, is a rectangle with width or height + // with values lower than or equal to 0 + pc->GetPageInfoVector()[i].GetXRect().SetSize(wxSize(-1, -1)); + + // Draw the tab (border, text, image & 'x' on tab) + DrawTab(pc, dc, posx, i, tabWidth, tabHeight, pc->m_nTabXButtonStatus); + + if(pc->GetSelection() == i){ + x1 = posx; + x2 = posx + tabWidth + 2; + } + + // Restore the text forground + dc.SetTextForeground(pc->m_activeTextColor); + + // Update the tab position & size + int posy = pc->HasFlag(wxFNB_BOTTOM) ? 0 : VERTICAL_BORDER_PADDING; + + pc->GetPageInfoVector()[i].SetPosition(wxPoint(posx, posy)); + pc->GetPageInfoVector()[i].SetSize(wxSize(tabWidth, tabHeight)); + posx += tabWidth; + } + + // Update all tabs that can not fit into the screen as non-visible + for(; i<(int)pc->GetPageInfoVector().GetCount(); i++) + { + pc->GetPageInfoVector()[i].SetPosition(wxPoint(-1, -1)); + pc->GetPageInfoVector()[i].GetRegion().Clear(); + } + + // Draw the left/right/close buttons + // Left arrow + DrawLeftArrow(pc, dc); + DrawRightArrow(pc, dc); + DrawX(pc, dc); + DrawDropDownArrow(pc, dc); + + if( pc->HasFlag(wxFNB_FF2) ){ + DrawTabsLine(pc, dc, x1, x2); + } +} + +//------------------------------------------ +// Renderer manager +//------------------------------------------ +wxFNBRendererMgr::wxFNBRendererMgr() +{ + // register renderers + m_renderers[-1] = wxFNBRendererPtr(new wxFNBRendererDefault()); + m_renderers[wxFNB_VC8] = wxFNBRendererPtr(new wxFNBRendererVC8()); + m_renderers[wxFNB_FF2] = wxFNBRendererPtr(new wxFNBRendererFirefox2()); +} + +wxFNBRendererMgr::~wxFNBRendererMgr() +{ +} + +wxFNBRendererPtr wxFNBRendererMgr::GetRenderer(long style) +{ + // Do the ugly switch/case + if( style & wxFNB_VC8 ) + return m_renderers[wxFNB_VC8]; + + if( style & wxFNB_FF2 ) + return m_renderers[wxFNB_FF2]; + + // the default is to return the default renderer + return m_renderers[-1]; +} + +//------------------------------------------ +// Default renderer +//------------------------------------------ + +void wxFNBRendererDefault::DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus) +{ + // Default style + wxPen borderPen = wxPen(wxFNBRenderer::LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW), 40)); + wxPageContainer *pc = static_cast( pageContainer ); + + wxPoint tabPoints[7]; + tabPoints[0].x = posx; + tabPoints[0].y = pc->HasFlag(wxFNB_BOTTOM) ? 2 : tabHeight - 2; + + tabPoints[1].x = (int)(posx+(tabHeight-2)*tan((double)(pc->GetPageInfoVector())[tabIdx].GetTabAngle()/180.0*M_PI)); + tabPoints[1].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - (VERTICAL_BORDER_PADDING+2) : (VERTICAL_BORDER_PADDING+2); + + tabPoints[2].x = tabPoints[1].x+2; + tabPoints[2].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[3].x = (int)(posx+tabWidth-(tabHeight-2)*tan((double)(pc->GetPageInfoVector())[tabIdx].GetTabAngle()/180.0*M_PI))-2; + tabPoints[3].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[4].x = tabPoints[3].x+2; + tabPoints[4].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - (VERTICAL_BORDER_PADDING+2) : (VERTICAL_BORDER_PADDING+2); + + tabPoints[5].x = (int)(tabPoints[4].x+(tabHeight-2)*tan((double)(pc->GetPageInfoVector())[tabIdx].GetTabAngle()/180.0*M_PI)); + tabPoints[5].y = pc->HasFlag(wxFNB_BOTTOM) ? 2 : tabHeight - 2; + + tabPoints[6].x = tabPoints[0].x; + tabPoints[6].y = tabPoints[0].y; + + if(tabIdx == pc->GetSelection()) + { + // Draw the tab as rounded rectangle + dc.DrawPolygon(7, tabPoints); + } + else + { + if(tabIdx != pc->GetSelection() - 1) + { + // Draw a vertical line to the right of the text + int pt1x, pt1y, pt2x, pt2y; + pt1x = tabPoints[5].x; + pt1y = pc->HasFlag(wxFNB_BOTTOM) ? 4 : tabHeight - 6; + pt2x = tabPoints[5].x; + pt2y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - 4 : 4 ; + dc.DrawLine(pt1x, pt1y, pt2x, pt2y); + } + } + + if(tabIdx == pc->GetSelection()) + { + wxPen savePen = dc.GetPen(); + wxPen whitePen = wxPen(*wxWHITE); + whitePen.SetWidth(1); + dc.SetPen(whitePen); + + wxPoint secPt = wxPoint(tabPoints[5].x + 1, tabPoints[5].y); + dc.DrawLine(tabPoints[0], secPt); + + // Restore the pen + dc.SetPen(savePen); + } + + // ----------------------------------- + // Text and image drawing + // ----------------------------------- + + // Text drawing offset from the left border of the + // rectangle + int textOffset; + + // The width of the images are 16 pixels + int padding = static_cast( pc->GetParent() )->GetPadding(); + int shapePoints = (int)(tabHeight * tan((double)pc->GetPageInfoVector()[tabIdx].GetTabAngle()/180.0*M_PI)); + bool hasImage = pc->GetPageInfoVector()[tabIdx].GetImageIndex() != -1; + + int textWidth, textHeight; + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int imgYCoord, txtYCoord; + //int maxItemHeight; + //16 > textHeight ? maxItemHeight = 16 : maxItemHeight = textHeight; + imgYCoord = (tabHeight - 16)/2; + txtYCoord = (tabHeight - textHeight)/2; + if(!pc->HasFlag(wxFNB_BOTTOM)){ + imgYCoord += 2; + txtYCoord += 2; + } + + hasImage ? textOffset = padding * 2 + 16 + shapePoints / 2 : textOffset = padding + shapePoints / 2 ; + textOffset += 2; + + if(tabIdx != pc->GetSelection()) + { + // Set the text background to be like the vertical lines + dc.SetTextForeground( pc->GetNonoActiveTextColor() ); + } + + if(hasImage) + { + int imageXOffset = textOffset - 16 - padding; + dc.DrawBitmap((*pc->GetImageList())[pc->GetPageInfoVector()[tabIdx].GetImageIndex()], + posx + imageXOffset, imgYCoord, true); + } + + dc.DrawText(pc->GetPageText(tabIdx), posx + textOffset, txtYCoord); + + // draw 'x' on tab (if enabled) + if(pc->HasFlag(wxFNB_X_ON_TAB) && tabIdx == pc->GetSelection()) + { + int textWidth, textHeight; + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int tabCloseButtonXCoord = posx + textOffset + textWidth + 1; + + // take a bitmap from the position of the 'x' button (the x on tab button) + // this bitmap will be used later to delete old buttons + int tabCloseButtonYCoord = txtYCoord; + wxRect x_rect(tabCloseButtonXCoord, tabCloseButtonYCoord, 16, 16); + GetBitmap(dc, x_rect, m_tabXBgBmp); + + // Draw the tab + DrawTabX(pc, dc, x_rect, tabIdx, btnStatus); + } +} + +//------------------------------------------ +// Firefox2 renderer +//------------------------------------------ +void wxFNBRendererFirefox2::DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus) +{ + // Default style + wxPen borderPen = wxPen(wxFNBRenderer::LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW), 10)); + wxPageContainer *pc = static_cast( pageContainer ); + + wxPoint tabPoints[7]; + tabPoints[0].x = posx + 2; + tabPoints[0].y = pc->HasFlag(wxFNB_BOTTOM) ? 2 : tabHeight - 2; + + tabPoints[1].x = tabPoints[0].x; + tabPoints[1].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - (VERTICAL_BORDER_PADDING+2) : (VERTICAL_BORDER_PADDING+2); + + tabPoints[2].x = tabPoints[1].x+3; + tabPoints[2].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[3].x = posx +tabWidth-2; + tabPoints[3].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[4].x = tabPoints[3].x+3; + tabPoints[4].y = pc->HasFlag(wxFNB_BOTTOM) ? tabHeight - (VERTICAL_BORDER_PADDING+2) : (VERTICAL_BORDER_PADDING+2); + + tabPoints[5].x = tabPoints[4].x; + tabPoints[5].y = pc->HasFlag(wxFNB_BOTTOM) ? 2 : tabHeight - 2; + + tabPoints[6].x = tabPoints[0].x; + tabPoints[6].y = tabPoints[0].y; + + //------------------------------------ + // Paint the tab with gradient + //------------------------------------ + wxRect rr(tabPoints[2], tabPoints[5]); + rr.y += 1; + rr.x -= 1; + rr.height -= 1; + + DrawButton( dc, + rr, + pc->GetSelection() == tabIdx , + !pc->HasFlag(wxFNB_BOTTOM)); + + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.SetPen( borderPen ); + + // Draw the tab as rounded rectangle + dc.DrawPolygon(7, tabPoints); + + // ----------------------------------- + // Text and image drawing + // ----------------------------------- + + // Text drawing offset from the left border of the + // rectangle + int textOffset; + + // The width of the images are 16 pixels + int padding = static_cast( pc->GetParent() )->GetPadding(); + int shapePoints = (int)(tabHeight * tan((double)pc->GetPageInfoVector()[tabIdx].GetTabAngle()/180.0*M_PI)); + bool hasImage = pc->GetPageInfoVector()[tabIdx].GetImageIndex() != -1; + + int textWidth, textHeight; + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int imgYCoord, txtYCoord; + //int maxItemHeight; + //16 > textHeight ? maxItemHeight = 16 : maxItemHeight = textHeight; + imgYCoord = (tabHeight - 16)/2; + txtYCoord = (tabHeight - textHeight)/2; + if(!pc->HasFlag(wxFNB_BOTTOM)){ + imgYCoord += 2; + txtYCoord += 2; + } + + hasImage ? textOffset = padding * 2 + 16 + shapePoints / 2 : textOffset = padding + shapePoints / 2 ; + textOffset += 2; + + if(tabIdx != pc->GetSelection()) + { + // Set the text background to be like the vertical lines + dc.SetTextForeground( pc->GetNonoActiveTextColor() ); + } + + if(hasImage) + { + int imageXOffset = textOffset - 16 - padding; + dc.DrawBitmap((*pc->GetImageList())[pc->GetPageInfoVector()[tabIdx].GetImageIndex()], + posx + imageXOffset, imgYCoord, true); + } + + dc.DrawText(pc->GetPageText(tabIdx), posx + textOffset, txtYCoord); + + // draw 'x' on tab (if enabled) + if(pc->HasFlag(wxFNB_X_ON_TAB) && tabIdx == pc->GetSelection()) + { + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int tabCloseButtonXCoord = posx + textOffset + textWidth + 1; + + // take a bitmap from the position of the 'x' button (the x on tab button) + // this bitmap will be used later to delete old buttons + int tabCloseButtonYCoord = txtYCoord; + wxRect x_rect(tabCloseButtonXCoord, tabCloseButtonYCoord, 16, 16); + GetBitmap(dc, x_rect, m_tabXBgBmp); + + // Draw the tab + DrawTabX(pc, dc, x_rect, tabIdx, btnStatus); + } +} + + +//------------------------------------------------------------------ +// Visual studio 2005 (VS8) +//------------------------------------------------------------------ +void wxFNBRendererVC8::DrawTabs(wxWindow *pageContainer, wxDC &dc, wxEvent &event) +{ + wxPageContainer *pc = static_cast( pageContainer ); + +#ifndef __WXMAC__ + // Works well on MSW & GTK, however this lines should be skipped on MAC + if(pc->GetPageInfoVector().empty() || pc->m_nFrom >= (int)pc->GetPageInfoVector().GetCount()) + { + pc->Hide(); + event.Skip(); + return; + } +#endif + + // Get the text hight + int tabHeight = CalcTabHeight( pageContainer ); + + // Set the font for measuring the tab height + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont = normalFont; + boldFont.SetWeight(wxFONTWEIGHT_BOLD); + + // Calculate the number of rows required for drawing the tabs + wxRect rect = pc->GetClientRect(); + + // Set the maximum client size +#ifdef __WXMAC__ + pc->SetSizeHints(wxSize(GetButtonsAreaLength( pc ), tabHeight)); +#endif + wxPen borderPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW)); + + /// Create brushes + wxBrush backBrush; + backBrush = wxBrush(pc->m_tabAreaColor); + wxBrush noselBrush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + wxBrush selBrush = wxBrush(pc->m_activeTabColor); + wxSize size = pc->GetSize(); + + // Background + dc.SetTextBackground(pc->GetBackgroundColour()); + dc.SetTextForeground(pc->m_activeTextColor); + + // If border style is set, set the pen to be border pen + if( pc->HasFlag(wxFNB_TABS_BORDER_SIMPLE) ) + dc.SetPen(borderPen); + else + dc.SetPen(*wxTRANSPARENT_PEN); + + int lightFactor = pc->HasFlag(wxFNB_BACKGROUND_GRADIENT) ? 90 : 30; + if(pc->HasFlag(wxFNB_BACKGROUND_GRADIENT)){ + PaintStraightGradientBox(dc, pc->GetClientRect(), LightColour(pc->m_tabAreaColor, 10), LightColour(pc->m_tabAreaColor, lightFactor)); + }else{ + dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + dc.DrawRectangle(0, 0, size.x, size.y); + } + dc.SetBrush( *wxTRANSPARENT_BRUSH ); + dc.DrawRectangle(0, 0, size.x, size.y); + + // Take 3 bitmaps for the background for the buttons + { + wxMemoryDC mem_dc; + wxRect rect; + + //--------------------------------------- + // X button + //--------------------------------------- + rect = wxRect(GetXPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_xBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + + //--------------------------------------- + // Right button + //--------------------------------------- + rect = wxRect(GetRightButtonPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_rightBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + + //--------------------------------------- + // Left button + //--------------------------------------- + rect = wxRect(GetLeftButtonPos( pc ), 6, 16, 14); + mem_dc.SelectObject(m_leftBgBmp); + mem_dc.Blit(0, 0, rect.width, rect.height, &dc, rect.x, rect.y); + mem_dc.SelectObject(wxNullBitmap); + } + + // We always draw the bottom/upper line of the tabs + // regradless the style + dc.SetPen(borderPen); + DrawTabsLine(pc, dc); + + // Restore the pen + dc.SetPen(borderPen); + + // Draw labels + dc.SetFont(boldFont); + int posx; + int i = 0, cur = 0; + + // Update all the tabs from 0 to 'pc->m_nFrom' to be non visible + for(i=0; im_nFrom; i++) + { + pc->GetPageInfoVector()[i].SetPosition(wxPoint(-1, -1)); + pc->GetPageInfoVector()[i].GetRegion().Clear(); + } + + // Draw the visible tabs, in VC8 style, we draw them from right to left + std::vector vTabsInfo; + NumberTabsCanFit(pc, vTabsInfo); + int activeTabPosx(0); + int activeTabWidth(0); + int activeTabHeight(0); + + for(cur=(int)vTabsInfo.size() - 1; cur>=0; cur--) + { + /// 'i' points to the index of the currently drawn tab + /// in pc->GetPageInfoVector() vector + i = pc->m_nFrom + cur; + dc.SetPen(borderPen); + dc.SetBrush((i==pc->GetSelection()) ? selBrush : noselBrush); + + // Now set the font to the correct font + dc.SetFont((i==pc->GetSelection()) ? boldFont : normalFont); + + // Add the padding to the tab width + // Tab width: + // +-----------------------------------------------------------+ + // | PADDING | IMG | IMG_PADDING | TEXT | PADDING | x |PADDING | + // +-----------------------------------------------------------+ + + int tabWidth = CalcTabWidth( pageContainer, i, tabHeight ); + posx = vTabsInfo[cur].x; + + // By default we clean the tab region + // incase we use the VC8 style which requires + // the region, it will be filled by the function + // drawVc8Tab + pc->GetPageInfoVector()[i].GetRegion().Clear(); + + // Clean the 'x' buttn on the tab + // 'Clean' rectanlge is a rectangle with width or height + // with values lower than or equal to 0 + pc->GetPageInfoVector()[i].GetXRect().SetSize(wxSize(-1, -1)); + + // Draw the tab + // Incase we are drawing the active tab + // we need to redraw so it will appear on top + // of all other tabs + + // when using the vc8 style, we keep the position of the active tab so we will draw it again later + if( i == pc->GetSelection() && pc->HasFlag( wxFNB_VC8 ) ) + { + activeTabPosx = posx; + activeTabWidth = tabWidth; + activeTabHeight = tabHeight; + } + else + { + DrawTab(pc, dc, posx, i, tabWidth, tabHeight, pc->m_nTabXButtonStatus); + } + + // Restore the text forground + dc.SetTextForeground(pc->m_activeTextColor); + + // Update the tab position & size + pc->GetPageInfoVector()[i].SetPosition(wxPoint(posx, VERTICAL_BORDER_PADDING)); + pc->GetPageInfoVector()[i].SetSize(wxSize(tabWidth, tabHeight)); + } + + // Incase we are in VC8 style, redraw the active tab (incase it is visible) + if(pc->GetSelection() >= pc->m_nFrom && pc->GetSelection()< pc->m_nFrom + (int)vTabsInfo.size() ) + { + DrawTab(pc, dc, activeTabPosx, pc->GetSelection(), activeTabWidth, activeTabHeight, pc->m_nTabXButtonStatus); + } + + // Update all tabs that can not fit into the screen as non-visible + int xx; + for(xx = pc->m_nFrom + (int)vTabsInfo.size(); xx<(int)pc->GetPageInfoVector().size(); xx++) + { + pc->GetPageInfoVector()[xx].SetPosition(wxPoint(-1, -1)); + pc->GetPageInfoVector()[xx].GetRegion().Clear(); + } + + // Draw the left/right/close buttons + // Left arrow + DrawLeftArrow(pc, dc); + DrawRightArrow(pc, dc); + DrawX(pc, dc); + DrawDropDownArrow(pc, dc); +} + +void wxFNBRendererVC8::DrawTab(wxWindow* pageContainer, wxDC &dc, const int &posx, const int &tabIdx, const int &tabWidth, const int &tabHeight, const int btnStatus) +{ + // Fancy tabs - like with VC71 but with the following differences: + // - The Selected tab is colored with gradient color + wxPageContainer *pc = static_cast( pageContainer ); + wxPen borderPen = wxPen( pc->GetBorderColour() ); + wxPoint tabPoints[8]; + + // If we draw the first tab or the active tab, + // we draw a full tab, else we draw a truncated tab + // + // X(2) X(3) + // X(1) X(4) + // + // X(5) + // + // X(0),(7) X(6) + // + // + + tabPoints[0].x = pc->HasFlag( wxFNB_BOTTOM ) ? posx : posx + m_factor; + tabPoints[0].y = pc->HasFlag( wxFNB_BOTTOM ) ? 2 : tabHeight - 3; + + tabPoints[1].x = tabPoints[0].x + tabHeight - VERTICAL_BORDER_PADDING - 3 - m_factor; + tabPoints[1].y = pc->HasFlag( wxFNB_BOTTOM ) ? tabHeight - (VERTICAL_BORDER_PADDING+2) : (VERTICAL_BORDER_PADDING+2); + + tabPoints[2].x = tabPoints[1].x + 4; + tabPoints[2].y = pc->HasFlag( wxFNB_BOTTOM ) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[3].x = tabPoints[2].x + tabWidth - 2; + tabPoints[3].y = pc->HasFlag( wxFNB_BOTTOM ) ? tabHeight - VERTICAL_BORDER_PADDING : VERTICAL_BORDER_PADDING; + + tabPoints[4].x = tabPoints[3].x + 1; + tabPoints[4].y = pc->HasFlag( wxFNB_BOTTOM ) ? tabPoints[3].y - 1 : tabPoints[3].y + 1; + + tabPoints[5].x = tabPoints[4].x + 1; + tabPoints[5].y = pc->HasFlag( wxFNB_BOTTOM ) ? (tabPoints[4].y - 1 ): tabPoints[4].y + 1; + + tabPoints[6].x = tabPoints[2].x + tabWidth; + tabPoints[6].y = tabPoints[0].y; + + tabPoints[7].x = tabPoints[0].x; + tabPoints[7].y = tabPoints[0].y; + + pc->GetPageInfoVector()[tabIdx].SetRegion(8, tabPoints); + + // Draw the polygon + wxBrush br = dc.GetBrush(); + dc.SetBrush(wxBrush(tabIdx == pc->GetSelection() ? pc->GetActiveTabColour() : pc->GetGradientColourTo() )); + dc.SetPen(wxPen(tabIdx == pc->GetSelection() ? wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW) : pc->GetBorderColour())); + dc.DrawPolygon(8, tabPoints); + + // Restore the brush + dc.SetBrush(br); + + wxRect rect = pc->GetClientRect(); + + if(tabIdx != pc->GetSelection() && !pc->HasFlag( wxFNB_BOTTOM )) + { + // Top default tabs + dc.SetPen(wxPen( pc->GetBorderColour() )); + int lineY = rect.height; + wxPen curPen = dc.GetPen(); + curPen.SetWidth(1); + dc.SetPen(curPen); + dc.DrawLine(posx, lineY, posx+rect.width, lineY); + } + + // Incase we are drawing the selected tab, we draw the border of it as well + // but without the bottom (upper line incase of wxBOTTOM) + if(tabIdx == pc->GetSelection()) + { + wxPen borderPen = wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW)); + wxBrush brush(*wxTRANSPARENT_BRUSH); + dc.SetPen(borderPen); + dc.SetBrush(brush); + dc.DrawPolygon(8, tabPoints); + + // Delete the bottom line (or the upper one, incase we use wxBOTTOM) + dc.SetPen(wxPen(wxT("WHITE"))); + dc.DrawLine(tabPoints[0], tabPoints[6]); + } + + + FillVC8GradientColor(pc, dc, tabPoints, tabIdx == pc->GetSelection(), tabIdx); + + // Draw a thin line to the right of the non-selected tab + if(tabIdx != pc->GetSelection()) + { + dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE))); + dc.DrawLine(tabPoints[4].x-1, tabPoints[4].y, tabPoints[5].x-1, tabPoints[5].y); + dc.DrawLine(tabPoints[5].x-1, tabPoints[5].y, tabPoints[6].x-1, tabPoints[6].y); + } + + // Text drawing offset from the left border of the + // rectangle + int textOffset; + + // The width of the images are 16 pixels + int vc8ShapeLen = tabHeight - VERTICAL_BORDER_PADDING - 2; + if( pc->TabHasImage( tabIdx ) ) + textOffset = ((wxFlatNotebook *)pc->m_pParent)->GetPadding() * 2 + 16 + vc8ShapeLen; + else + textOffset = ((wxFlatNotebook *)pc->m_pParent)->GetPadding() + vc8ShapeLen; + + int textWidth, textHeight; + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int imgYCoord, txtYCoord; + //int maxItemHeight; + //16 > textHeight ? maxItemHeight = 16 : maxItemHeight = textHeight; + imgYCoord = (tabHeight - 16)/2; + txtYCoord = (tabHeight - textHeight)/2; + if(!pc->HasFlag(wxFNB_BOTTOM)){ + imgYCoord += 2; + txtYCoord += 2; + } + + if( pc->TabHasImage( tabIdx ) ) + { + int imageXOffset = textOffset - 16 - ((wxFlatNotebook *)pc->m_pParent)->GetPadding(); + dc.DrawBitmap((*pc->GetImageList())[pc->GetPageInfoVector()[tabIdx].GetImageIndex()], + posx + imageXOffset, imgYCoord, true); + } + + wxFont boldFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + + // if selected tab, draw text in bold + if( tabIdx == pc->GetSelection() ) + { + boldFont.SetWeight(wxFONTWEIGHT_BOLD); + } + + dc.SetFont( boldFont ); + dc.DrawText(pc->GetPageText(tabIdx), posx + textOffset, txtYCoord); + + // draw 'x' on tab (if enabled) + if(pc->HasFlag(wxFNB_X_ON_TAB) && tabIdx == pc->GetSelection()) + { + int textWidth, textHeight; + dc.GetTextExtent(pc->GetPageText(tabIdx), &textWidth, &textHeight); + int tabCloseButtonXCoord = posx + textOffset + textWidth + 1; + + // take a bitmap from the position of the 'x' button (the x on tab button) + // this bitmap will be used later to delete old buttons + int tabCloseButtonYCoord = txtYCoord; + wxRect x_rect(tabCloseButtonXCoord, tabCloseButtonYCoord, 16, 16); + GetBitmap(dc, x_rect, m_tabXBgBmp); + wxBitmap bmp( 16, 16 ); + + // Draw the tab + DrawTabX(pc, dc, x_rect, tabIdx, btnStatus); + } +} + +void wxFNBRendererVC8::FillVC8GradientColor(wxWindow* pageContainer, wxDC &dc, const wxPoint tabPoints[], const bool bSelectedTab, const int tabIdx) +{ + // calculate gradient coefficients + wxPageContainer *pc = static_cast( pageContainer ); + + if( m_first ) + { + m_first = false; + pc->m_colorTo = LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 0); + pc->m_colorFrom = LightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 60); + } + wxColour col2 = pc->HasFlag( wxFNB_BOTTOM ) ? pc->GetGradientColourTo() : pc->GetGradientColourFrom(); + wxColour col1 = pc->HasFlag( wxFNB_BOTTOM ) ? pc->GetGradientColourFrom() : pc->GetGradientColourTo(); + + // If colorful tabs style is set, override the tab color + if(pc->HasFlag(wxFNB_COLORFUL_TABS)) + { + if( !pc->GetPageInfoVector()[tabIdx].GetColor().Ok() ) + { + // First time, generate color, and keep it in the vector + wxColor tabColor(RandomColor()); + pc->GetPageInfoVector()[tabIdx].SetColor(tabColor); + } + + if( pc->HasFlag(wxFNB_BOTTOM) ) + { + col2 = LightColour( pc->GetPageInfoVector()[tabIdx].GetColor() , 50 ); + col1 = LightColour( pc->GetPageInfoVector()[tabIdx].GetColor() , 80 ); + } + else + { + col1 = LightColour( pc->GetPageInfoVector()[tabIdx].GetColor() , 50 ); + col2 = LightColour( pc->GetPageInfoVector()[tabIdx].GetColor() , 80 ); + } + } + + int size = abs(tabPoints[2].y - tabPoints[0].y) - 1; + + double rstep = double((col2.Red() - col1.Red())) / double(size), rf = 0, + gstep = double((col2.Green() - col1.Green())) / double(size), gf = 0, + bstep = double((col2.Blue() - col1.Blue())) / double(size), bf = 0; + + wxColour currCol; + int y = tabPoints[0].y; + + // If we are drawing the selected tab, we need also to draw a line + // from 0->tabPoints[0].x and tabPoints[6].x -> end, we achieve this + // by drawing the rectangle with transparent brush + // the line under the selected tab will be deleted by the drwaing loop + if( bSelectedTab ) + DrawTabsLine(pc, dc); + + while( true ) + { + if(pc->HasFlag( wxFNB_BOTTOM )) + { + if(y > tabPoints[0].y + size) + break; + } + else + { + if(y < tabPoints[0].y - size) + break; + } + + currCol.Set( + (unsigned char)(col1.Red() + rf), + (unsigned char)(col1.Green() + gf), + (unsigned char)(col1.Blue() + bf) + ); + + dc.SetPen(bSelectedTab ? wxPen(pc->m_activeTabColor) : wxPen(currCol)); + int startX = GetStartX(tabPoints, y, pc->GetParent()->GetWindowStyleFlag()) ; + int endX = GetEndX(tabPoints, y, pc->GetParent()->GetWindowStyleFlag()); + dc.DrawLine(startX, y, endX, y); + + // Draw the border using the 'edge' point + dc.SetPen(wxPen(bSelectedTab ? wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW) : pc->m_colorBorder)); + + dc.DrawPoint(startX, y); + dc.DrawPoint(endX, y); + + // Progress the color + rf += rstep; gf += gstep; bf += bstep; + + pc->HasFlag( wxFNB_BOTTOM ) ? y++ : y--; + } +} + +int wxFNBRendererVC8::GetStartX(const wxPoint tabPoints[], const int &y, long style) +{ + double x1 = 0, x2 = 0, y1 = 0, y2 = 0; + + // We check the 3 points to the left + bool bBottomStyle = style & wxFNB_BOTTOM ? true : false; + bool match = false; + + if(bBottomStyle) + { + for(int i=0; i<3; i++) + { + if(y >= tabPoints[i].y && y < tabPoints[i+1].y) + { + x1 = tabPoints[i].x; + x2 = tabPoints[i+1].x; + y1 = tabPoints[i].y; + y2 = tabPoints[i+1].y; + match = true; + break; + } + } + } + else + { + for(int i=0; i<3; i++) + { + if(y <= tabPoints[i].y && y > tabPoints[i+1].y) + { + x1 = tabPoints[i].x; + x2 = tabPoints[i+1].x; + y1 = tabPoints[i].y; + y2 = tabPoints[i+1].y; + match = true; + break; + } + } + } + + if(!match) + return tabPoints[2].x; + + // According to the equation y = ax + b => x = (y-b)/a + // We know the first 2 points + + double a; + if(x2 == x1) + return static_cast( x2 ); + else + a = (y2 - y1) / (x2 - x1); + + double b = y1 - ((y2 - y1) / (x2 - x1)) * x1; + + if(a == 0) + return static_cast( x1 ); + + double x = (y - b) / a; + return static_cast( x ); +} + +int wxFNBRendererVC8::GetEndX(const wxPoint tabPoints[], const int &y, long style) +{ + double x1 = 0, x2 = 0, y1 = 0, y2 = 0; + + // We check the 3 points to the left + bool bBottomStyle = style & wxFNB_BOTTOM ? true : false; + bool match = false; + + if(bBottomStyle) + { + for(int i=7; i>3; i--) + { + if(y >= tabPoints[i].y && y < tabPoints[i-1].y) + { + x1 = tabPoints[i].x; + x2 = tabPoints[i-1].x; + y1 = tabPoints[i].y; + y2 = tabPoints[i-1].y; + match = true; + break; + } + } + } + else + { + for(int i=7; i>3; i--) + { + if(y <= tabPoints[i].y && y > tabPoints[i-1].y) + { + x1 = tabPoints[i].x; + x2 = tabPoints[i-1].x; + y1 = tabPoints[i].y; + y2 = tabPoints[i-1].y; + match = true; + break; + } + } + } + + if(!match) + return tabPoints[3].x; + + // According to the equation y = ax + b => x = (y-b)/a + // We know the first 2 points + double a = (y2 - y1) / (x2 - x1); + + // Vertical line + if(x1 == x2) + return (int)x1; + + double b = y1 - ((y2 - y1) / (x2 - x1)) * x1; + + if(a == 0) + return (int)x1; + + double x = (y - b) / a; + return (int)x; +} + +void wxFNBRendererVC8::NumberTabsCanFit(wxWindow *pageContainer, std::vector &vTabInfo, int from) +{ + wxPageContainer *pc = static_cast( pageContainer ); + int tabHeight, clientWidth; + + wxRect rect = pc->GetClientRect(); + clientWidth = rect.width; + + /// Empty results + vTabInfo.clear(); + + tabHeight = CalcTabHeight( pageContainer ); + + // The drawing starts from posx + int posx = ((wxFlatNotebook *)pc->m_pParent)->GetPadding(); + + if( from < 0 ) + from = pc->m_nFrom; + + for(int i = from; i<(int)pc->GetPageInfoVector().GetCount(); i++) + { + int vc8glitch = tabHeight + wxFNB_HEIGHT_SPACER; + int tabWidth = CalcTabWidth( pageContainer, i, tabHeight ); + if(posx + tabWidth + vc8glitch + GetButtonsAreaLength( pc ) >= clientWidth) + break; + + /// Add a result to the returned vector + wxRect tabRect(posx, VERTICAL_BORDER_PADDING, tabWidth , tabHeight); + vTabInfo.push_back(tabRect); + + /// Advance posx + posx += tabWidth + wxFNB_HEIGHT_SPACER; + } +} diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/wxFlatNotebook.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/wxFlatNotebook.cpp new file mode 100644 index 0000000000..a045bce840 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/wxFlatNotebook.cpp @@ -0,0 +1,1788 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wxFlatNotebook.cpp +// Purpose: generic implementation of flat style notebook class. +// Author: Eran Ifrah +// Modified by: Priyank Bolia +// Created: 30/12/2005 +// Modified: 01/01/2006 +// Copyright: Eran Ifrah (c) +// Licence: wxWindows license +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include +#include + + +//------------------------------------------------------------------- +// Provide user with a nice feedback when tab is being dragged +//------------------------------------------------------------------- +bool wxFNBDropSource::GiveFeedback(wxDragResult effect) +{ + wxUnusedVar(effect); + static_cast( m_win )->DrawDragHint(); + return false; +} + +//IMPLEMENT_DYNAMIC_CLASS(wxFlatNotebookEvent, wxNotifyEvent) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGING) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU) +DEFINE_EVENT_TYPE(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED) + +//IMPLEMENT_DYNAMIC_CLASS(wxFlatNotebook, wxPanel) + +WX_DEFINE_OBJARRAY(wxFlatNotebookImageList); +WX_DEFINE_OBJARRAY(wxPageInfoArray) +WX_DEFINE_OBJARRAY(wxWindowPtrArray) + +BEGIN_EVENT_TABLE(wxFlatNotebook, wxPanel) +EVT_NAVIGATION_KEY(wxFlatNotebook::OnNavigationKey) +END_EVENT_TABLE() + +wxFlatNotebook::wxFlatNotebook(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) +{ + Init(); + Create(parent, id, pos, size, style, name); +} + +void wxFlatNotebook::CleanUp () +{ + wxFNBRendererMgrST::Free(); +} + +wxFlatNotebook::~wxFlatNotebook(void) +{ +} + +void wxFlatNotebook::Init() +{ + m_popupWin = NULL; + m_sendPageChangeEvent = true; + m_bForceSelection = false; + m_nPadding = 6; + m_nFrom = 0; + m_pages = NULL; + m_mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(m_mainSizer); +} + +bool wxFlatNotebook::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, + long style, const wxString& name) +{ + style |= wxTAB_TRAVERSAL; + wxPanel::Create(parent, id, pos, size, style, name); + + m_pages = new wxPageContainer(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style); + m_pages->m_colorBorder = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW)); + + m_mainSizer = new wxBoxSizer(wxVERTICAL); + SetSizer(m_mainSizer); + + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + + // Set default page height + wxMemoryDC memDc; + + wxBitmap bmp(10, 10); + memDc.SelectObject(bmp); + + int width, height; + + +#ifdef __WXGTK__ + // For GTK it seems that we must do this steps in order + // for the tabs will get the proper height on initialization + // on MSW, preforming these steps yields wierd results + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont = normalFont; + boldFont.SetWeight(wxFONTWEIGHT_BOLD); + memDc.SetFont( boldFont ); +#endif + + wxString stam = wxT("Tp"); // Temp data to get the text height; + memDc.GetTextExtent(stam, &width, &height); + + int tabHeight = height + wxFNB_HEIGHT_SPACER; // We use 8 pixels as padding +#ifdef __WXGTK__ + // On GTK the tabs are should be larger + //tabHeight += 6; +#endif + m_pages->SetSizeHints(wxSize(-1, tabHeight)); + + // Add the tab container to the sizer + m_mainSizer->Insert(0, m_pages, 0, wxEXPAND); + m_mainSizer->Layout(); + + m_pages->m_nFrom = m_nFrom; + m_pDropTarget = new wxFNBDropTarget(this, &wxFlatNotebook::OnDropTarget); + SetDropTarget(m_pDropTarget); + return true; +} + +void wxFlatNotebook::SetActiveTabTextColour(const wxColour& textColour) +{ + m_pages->m_activeTextColor = textColour; +} + +wxDragResult wxFlatNotebook::OnDropTarget(wxCoord x, wxCoord y, int nTabPage, wxWindow * wnd_oldContainer) +{ + return m_pages->OnDropTarget(x, y, nTabPage, wnd_oldContainer); +} + +int wxFlatNotebook::GetPreviousSelection() const +{ + return m_pages->GetPreviousSelection(); +} + +const wxArrayInt &wxFlatNotebook::GetBrowseHistory() const +{ + return m_pages->m_history; +} + +bool wxFlatNotebook::AddPage(wxWindow* window, const wxString& caption, const bool selected, const int imgindex) +{ + return InsertPage(m_windows.GetCount(), window, caption, selected, imgindex); +} + +void wxFlatNotebook::SetImageList(wxFlatNotebookImageList * imglist) +{ + m_pages->SetImageList(imglist); +} + +wxFlatNotebookImageList * wxFlatNotebook::GetImageList() +{ + return m_pages->GetImageList(); +} + +bool wxFlatNotebook::InsertPage(size_t index, wxWindow* page, const wxString& text, bool select, const int imgindex) +{ + // sanity check + if (!page) + return false; + + // reparent the window to us + page->Reparent(this); + + if( !m_pages->IsShown() ) + m_pages->Show(); + + index = FNB_MIN((unsigned int)index, (unsigned int)m_windows.GetCount()); + // Insert tab + bool bSelected = select || m_windows.empty(); + int curSel = m_pages->GetSelection(); + + if(index <= m_windows.GetCount()) + { + m_windows.Insert(page, index); + } + else + { + m_windows.Add(page); + } + + if( !m_pages->InsertPage(index, page, text, bSelected, imgindex) ) + return false; + + if((int)index <= curSel) curSel++; + + Freeze(); + + // Check if a new selection was made + if(bSelected){ + if(curSel >= 0) { + // Remove the window from the main sizer + m_mainSizer->Detach(m_windows[curSel]); + m_windows[curSel]->Hide(); + } + m_pages->SetSelection(index); + } + else + { + // Hide the page + page->Hide(); + } + + m_mainSizer->Layout(); + Thaw(); + + return true; +} + +void wxFlatNotebook::SetSelection(size_t page) +{ + if(page >= m_windows.GetCount()) + return; + + // Support for disabed tabs + if(!m_pages->GetEnabled(page) && m_windows.GetCount() > 1 && !m_bForceSelection) + return; + if( m_sendPageChangeEvent ){ + // Allow the user to veto the selection + int oldSelection = GetSelection(); + + wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGING, GetId()); + event.SetSelection( (int)page ); + event.SetOldSelection( oldSelection ); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); + + if( !event.IsAllowed() ){ + return; + } + } + + int curSel = m_pages->GetSelection(); + + // program allows the page change + Freeze(); + if(curSel >= 0){ + // Remove the window from the main sizer + m_mainSizer->Detach(m_windows[curSel]); + m_windows[curSel]->Hide(); + } + + if(m_windowStyle & wxFNB_BOTTOM){ + m_mainSizer->Insert(0, m_windows[page], 1, wxEXPAND); + }else{ + // We leave a space of 1 pixel around the window + m_mainSizer->Add(m_windows[page], 1, wxEXPAND); + } + + m_windows[page]->Show(); + m_mainSizer->Layout(); + Thaw(); + + if( page != (size_t)m_pages->m_iActivePage ){ + //keep the page history + m_pages->PushPageHistory(m_pages->m_iActivePage); + } + + m_pages->m_iActivePage = (int)page; + m_pages->DoSetSelection(page); + + if( m_sendPageChangeEvent ){ + + // Fire event 'Page Changed' + wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CHANGED, GetId()); + event.SetSelection( (int)page ); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent(event); + } +} + +void wxFlatNotebook::DeletePage(size_t page, bool notify) +{ + if(page >= m_windows.GetCount()) + return; + + // Fire a closing event + if( notify ){ + wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING, GetId()); + event.SetSelection((int)page); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); + + + // The event handler allows it? + if (!event.IsAllowed()) + return; + } + + Freeze(); + + // Delete the requested page + wxWindow *pageRemoved = m_windows[page]; + + // If the page is the current window, remove it from the sizer + // as well + if((int)page == m_pages->GetSelection()){ + m_mainSizer->Detach(pageRemoved); + } + + // Remove it from the array as well + m_windows.RemoveAt(page); + + // Now we can destroy it; in wxWidgets use Destroy instead of delete + pageRemoved->Destroy(); + + Thaw(); + + m_pages->DoDeletePage(page); + Refresh(); + + // Fire a closed event + if( notify ){ + wxFlatNotebookEvent closedEvent(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED, GetId()); + closedEvent.SetSelection((int)page); + closedEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(closedEvent); + } +} + +bool wxFlatNotebook::DeleteAllPages() +{ + if(m_windows.empty()) + return false; + + Freeze(); + int i = 0; + for(; i<(int)m_windows.GetCount(); i++){ + delete m_windows[i]; + } + + m_windows.Clear(); + Thaw(); + + // Clear the container of the tabs as well + m_pages->DeleteAllPages(); + return true; +} + +wxWindow* wxFlatNotebook::GetCurrentPage() const +{ + int sel = m_pages->GetSelection(); + if(sel < 0) + return NULL; + + return m_windows[sel]; +} + +wxWindow* wxFlatNotebook::GetPage(size_t page) const +{ + if(page >= m_windows.GetCount()) + return NULL; + + return m_windows[page]; +} + +int wxFlatNotebook::GetPageIndex(wxWindow* win) const +{ + for (size_t i = 0; i < m_windows.GetCount(); ++i) + { + if (m_windows[i] == win) + return (int)i; + } + return -1; +} + +int wxFlatNotebook::GetSelection() const +{ + return m_pages->GetSelection(); +} + +void wxFlatNotebook::AdvanceSelection(bool bForward) +{ + m_pages->AdvanceSelection(bForward); +} + +int wxFlatNotebook::GetPageCount() const +{ + return (int)m_pages->GetPageCount(); +} + +void wxFlatNotebook::OnNavigationKey(wxNavigationKeyEvent& event) +{ + if ( event.IsWindowChange() ) + { + if( HasFlag(wxFNB_SMART_TABS) ) + { + if( !m_popupWin && GetPageCount() > 0) + { + m_popupWin = new wxTabNavigatorWindow( this ); + m_popupWin->ShowModal(); + m_popupWin->Destroy(); + SetSelection((size_t)GetSelection()); + m_popupWin = NULL; + } + else if( m_popupWin ) + { + // a dialog is already opened + m_popupWin->OnNavigationKey( event ); + return; + } + } + else + { + // change pages + AdvanceSelection(event.GetDirection()); + } + } + else + { + // pass to the parent + if ( GetParent() ) + { + event.SetCurrentFocus(this); + GetParent()->ProcessEvent(event); + } + } +} + +bool wxFlatNotebook::GetPageShapeAngle(int page_index, unsigned int * result) +{ + if(page_index < 0 || page_index >= (int)m_pages->m_pagesInfoVec.GetCount()) return false; + *result = m_pages->m_pagesInfoVec[page_index].GetTabAngle(); + return true; +} + +void wxFlatNotebook::SetPageShapeAngle(int page_index, unsigned int angle) +{ + if(page_index < 0 || page_index >= (int)m_pages->m_pagesInfoVec.GetCount()) return; + if(angle > 15) return; + + m_pages->m_pagesInfoVec[page_index].SetTabAngle(angle); +} + +void wxFlatNotebook::SetAllPagesShapeAngle(unsigned int angle) +{ + if(angle > 15) return; + for(unsigned int i = 0; i < m_pages->m_pagesInfoVec.GetCount(); i++) + { + m_pages->m_pagesInfoVec[i].SetTabAngle(angle); + } + Refresh(); +} + +wxSize wxFlatNotebook::GetPageBestSize() +{ + return m_pages->GetClientSize(); +} + +bool wxFlatNotebook::SetPageText(size_t page, const wxString& text) +{ + bool bVal = m_pages->SetPageText(page, text); + m_pages->Refresh(); + return bVal; +} + +void wxFlatNotebook::SetPadding(const wxSize& padding) +{ + m_nPadding = padding.GetWidth(); +} + +void wxFlatNotebook::SetWindowStyleFlag(long style) +{ + wxPanel::SetWindowStyleFlag(style); + + if(m_pages) + { + // For changing the tab position (i.e. placing them top/bottom) + // refreshing the tab container is not enough + m_sendPageChangeEvent = false; + SetSelection(m_pages->m_iActivePage); + m_sendPageChangeEvent = true; + } +} + +bool wxFlatNotebook::RemovePage(size_t page, bool notify) +{ + if(page >= m_windows.GetCount()) + return false; + + // Fire a closing event + if( notify ) + { + wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSING, GetId()); + event.SetSelection((int)page); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); + + // The event handler allows it? + if (!event.IsAllowed()) + return false; + } + + Freeze(); + + // Remove the requested page + wxWindow *pageRemoved = m_windows[page]; + + // If the page is the current window, remove it from the sizer + // as well + if((int)page == m_pages->GetSelection()) + { + m_mainSizer->Detach(pageRemoved); + } + + // Remove it from the array as well + m_windows.RemoveAt(page); + Thaw(); + + m_pages->DoDeletePage(page); + + // Fire a closed event + if( notify ) + { + wxFlatNotebookEvent closedEvent(wxEVT_COMMAND_FLATNOTEBOOK_PAGE_CLOSED, GetId()); + closedEvent.SetSelection((int)page); + closedEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(closedEvent); + } + return true; +} + +void wxFlatNotebook::SetRightClickMenu(wxMenu* menu) +{ + m_pages->m_pRightClickMenu = menu; +} + +wxString wxFlatNotebook::GetPageText(size_t page) +{ + return m_pages->GetPageText(page); +} + +void wxFlatNotebook::SetGradientColors(const wxColour& from, const wxColour& to, const wxColour& border) +{ + m_pages->m_colorFrom = from; + m_pages->m_colorTo = to; + m_pages->m_colorBorder = border; +} + +void wxFlatNotebook::SetGradientColorFrom(const wxColour& from) +{ + m_pages->m_colorFrom = from; +} + +void wxFlatNotebook::SetGradientColorTo(const wxColour& to) +{ + m_pages->m_colorTo = to; +} + +void wxFlatNotebook::SetGradientColorBorder(const wxColour& border) +{ + m_pages->m_colorBorder = border; +} + +/// Gets first gradient colour +const wxColour& wxFlatNotebook::GetGradientColorFrom() +{ + return m_pages->m_colorFrom; +} + +/// Gets second gradient colour +const wxColour& wxFlatNotebook::GetGradientColorTo() +{ + return m_pages->m_colorTo; +} + +/// Gets the tab border colour +const wxColour& wxFlatNotebook::SetGradientColorBorder() +{ + return m_pages->m_colorBorder; +} + +/// Get the active tab text +const wxColour& wxFlatNotebook::GetActiveTabTextColour() +{ + return m_pages->m_activeTextColor; +} + +void wxFlatNotebook::SetPageImageIndex(size_t page, int imgindex) +{ + m_pages->SetPageImageIndex(page, imgindex); +} + +int wxFlatNotebook::GetPageImageIndex(size_t page) +{ + return m_pages->GetPageImageIndex(page); +} + +bool wxFlatNotebook::GetEnabled(size_t page) +{ + return m_pages->GetEnabled(page); +} + +void wxFlatNotebook::Enable(size_t page, bool enabled) +{ + if(page >= m_windows.GetCount()) + return; + + m_windows[page]->Enable(enabled); + m_pages->Enable(page, enabled); +} + +const wxColour& wxFlatNotebook::GetNonActiveTabTextColour() +{ + return m_pages->m_nonActiveTextColor; +} + +void wxFlatNotebook::SetNonActiveTabTextColour(const wxColour& color) +{ + m_pages->m_nonActiveTextColor = color; +} + +void wxFlatNotebook::SetTabAreaColour(const wxColour& color) +{ + m_pages->m_tabAreaColor = color; +} + +const wxColour& wxFlatNotebook::GetTabAreaColour() +{ + return m_pages->m_tabAreaColor; +} + +void wxFlatNotebook::SetActiveTabColour(const wxColour& color) +{ + m_pages->m_activeTabColor = color; +} + +const wxColour& wxFlatNotebook::GetActiveTabColour() +{ + return m_pages->m_activeTabColor; +} + +long wxFlatNotebook::GetCustomizeOptions() const { + return m_pages->GetCustomizeOptions(); +} + +void wxFlatNotebook::SetCustomizeOptions(long options) { + m_pages->SetCustomizeOptions(options); +} + +/////////////////////////////////////////////////////////////////////////////////////////// +// +// wxPageContainer +// +/////////////////////////////////////////////////////////////////////////////////////////// + +BEGIN_EVENT_TABLE(wxPageContainer, wxPanel) + EVT_PAINT(wxPageContainer::OnPaint) + EVT_SIZE(wxPageContainer::OnSize) + EVT_LEFT_DOWN(wxPageContainer::OnLeftDown) + EVT_LEFT_UP(wxPageContainer::OnLeftUp) + EVT_RIGHT_DOWN(wxPageContainer::OnRightDown) + EVT_MIDDLE_DOWN(wxPageContainer::OnMiddleDown) + EVT_MOTION(wxPageContainer::OnMouseMove) + EVT_ERASE_BACKGROUND(wxPageContainer::OnEraseBackground) + EVT_LEAVE_WINDOW(wxPageContainer::OnMouseLeave) + EVT_ENTER_WINDOW(wxPageContainer::OnMouseEnterWindow) + EVT_LEFT_DCLICK(wxPageContainer::OnLeftDClick) +END_EVENT_TABLE() + +wxPageContainer::wxPageContainer(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) +: m_ImageList(NULL) +, m_iActivePage(-1) +, m_pDropTarget(NULL) +, m_nLeftClickZone(wxFNB_NOWHERE) +, m_customizeOptions(wxFNB_CUSTOM_ALL) +{ + m_pRightClickMenu = NULL; + m_nXButtonStatus = wxFNB_BTN_NONE; + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + m_pParent = parent; + m_nRightButtonStatus = wxFNB_BTN_NONE; + m_nLeftButtonStatus = wxFNB_BTN_NONE; + m_nTabXButtonStatus = wxFNB_BTN_NONE; + m_customMenu = NULL; + + m_colorTo = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); + m_colorFrom = wxColor(*wxWHITE); + m_activeTabColor = wxColor(*wxWHITE); + m_activeTextColor = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); + m_nonActiveTextColor = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); + m_tabAreaColor = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + m_tabAreaColor = wxFNBRenderer::DarkColour(m_tabAreaColor, 12); + + // Set default page height, this is done according to the system font + wxMemoryDC memDc; + wxBitmap bmp(10, 10); + memDc.SelectObject(bmp); + + int width, height; + +#ifdef __WXGTK__ + wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); + wxFont boldFont = normalFont; + boldFont.SetWeight(wxBOLD); + memDc.SetFont( boldFont ); +#endif + + memDc.GetTextExtent(wxT("Tp"), &width, &height); + int tabHeight = height + wxFNB_HEIGHT_SPACER; // We use 10 pixels as padding + + wxWindow::Create(parent, id, pos, wxSize(size.x, tabHeight), style | wxNO_BORDER | wxNO_FULL_REPAINT_ON_RESIZE); + + m_pDropTarget = new wxFNBDropTarget(this, &wxPageContainer::OnDropTarget); + SetDropTarget(m_pDropTarget); +} + +wxPageContainer::~wxPageContainer(void) +{ + if(m_pRightClickMenu) + { + delete m_pRightClickMenu; + m_pRightClickMenu = NULL; + } + + if( m_customMenu ) + { + delete m_customMenu; + m_customMenu = NULL; + } +} + +void wxPageContainer::OnPaint(wxPaintEvent & event) +{ + wxBufferedPaintDC dc(this); + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() ); + + render->DrawTabs(this, dc, event); +} + +void wxPageContainer::PopPageHistory(int page) +{ + int tabIdx(wxNOT_FOUND); + int where = m_history.Index(page); + while(where != wxNOT_FOUND){ + tabIdx = m_history.Item(where); + m_history.Remove(page); + //remove all appearances of this page + where = m_history.Index(page); + } + + //update values + if(tabIdx != wxNOT_FOUND){ + for(size_t i=0; i tabIdx){ + tt--; + } + } + } +} + +void wxPageContainer::PushPageHistory(int page) +{ + if(page == wxNOT_FOUND) + return; + + int where = m_history.Index(page); + if(where != wxNOT_FOUND){ + m_history.Remove(page); + } + m_history.Insert(page, 0); +} + +bool wxPageContainer::AddPage(const wxString& caption, const bool selected, const int imgindex) +{ + if(selected) + { + PushPageHistory(m_iActivePage); + m_iActivePage = (int)m_pagesInfoVec.GetCount(); + } + + /// Create page info and add it to the vector + wxPageInfo pageInfo(caption, imgindex); + m_pagesInfoVec.Add(pageInfo); + Refresh(); + return true; +} + +bool wxPageContainer::InsertPage(size_t index, wxWindow* /*page*/, const wxString& text, bool select, const int imgindex) +{ + if(select) + { + PushPageHistory(m_iActivePage); + m_iActivePage = (int)index; + } + wxPageInfo pgInfo(text, imgindex); + m_pagesInfoVec.Insert(pgInfo, index); + Refresh(); + return true; +} + +void wxPageContainer::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + // When resizing the control, try to fit to screen as many tabs as we we can + long style = GetParent()->GetWindowStyleFlag(); + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer(style); + std::vector vTabInfo; + + int from = 0; + int page = GetSelection(); + for(; fromNumberTabsCanFit( this, vTabInfo, from ); + if(page - from >= static_cast( vTabInfo.size() )) + continue; + break; + } + m_nFrom = from; + Refresh(); // Call on paint +} + +void wxPageContainer::OnMiddleDown(wxMouseEvent& event) +{ + // Test if this style is enabled + long style = GetParent()->GetWindowStyleFlag(); + if(!(style & wxFNB_MOUSE_MIDDLE_CLOSES_TABS)) + return; + + wxPageInfo pgInfo; + int tabIdx; + int where = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch(where) + { + case wxFNB_TAB: + { + DeletePage((size_t)tabIdx); + break; + } + default: + break; + } + + event.Skip(); +} + +void wxPageContainer::OnShowCustomizeDialog(wxCommandEvent &event) +{ + wxUnusedVar(event); + wxFNBCustomizeDialog *dlg = new wxFNBCustomizeDialog(this, m_customizeOptions); + dlg->ShowModal(); + dlg->Destroy(); +} + +void wxPageContainer::OnRightDown(wxMouseEvent& event) +{ + wxPageInfo pgInfo; + int tabIdx; + int where = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch(where) + { + case wxFNB_NOWHERE: + { + // Incase user right clicked on 'anywhere' and style wxFNB_CUSTOM_DLG is set, + // popup the customize dialog + long style = GetParent()->GetWindowStyleFlag(); + if( style & wxFNB_CUSTOM_DLG ){ + if( !m_customMenu ){ + m_customMenu = new wxMenu(); + wxMenuItem *item = new wxMenuItem(m_customMenu, wxID_ANY, wxT("Properties...")); + m_customMenu->Append(item); + Connect( item->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxPageContainer::OnShowCustomizeDialog )); + } + PopupMenu(m_customMenu); + } + } + break; + + case wxFNB_TAB: + case wxFNB_TAB_X: + { + if(!m_pagesInfoVec[tabIdx].GetEnabled()) + break; + + // Set the current tab to be active + // if needed + if(tabIdx != GetSelection()) + { + SetSelection((size_t)tabIdx); + } + + // If the owner has defined a context menu for the tabs, + // popup the right click menu + if (m_pRightClickMenu) + PopupMenu(m_pRightClickMenu); + else + { + // send a message to popup a custom menu + wxFlatNotebookEvent event(wxEVT_COMMAND_FLATNOTEBOOK_CONTEXT_MENU, GetParent()->GetId()); + event.SetSelection((int)tabIdx); + event.SetOldSelection((int)m_iActivePage); + event.SetEventObject(GetParent()); + GetParent()->GetEventHandler()->ProcessEvent(event); + } + + } + break; + + default: + break; + } +} + +void wxPageContainer::OnLeftDown(wxMouseEvent& event) +{ + wxPageInfo pgInfo; + int tabIdx; + + // Reset buttons status + m_nXButtonStatus = wxFNB_BTN_NONE; + m_nLeftButtonStatus = wxFNB_BTN_NONE; + m_nRightButtonStatus = wxFNB_BTN_NONE; + m_nTabXButtonStatus = wxFNB_BTN_NONE; + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + + m_nLeftClickZone = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch(m_nLeftClickZone) + { + case wxFNB_DROP_DOWN_ARROW: + m_nArrowDownButtonStatus = wxFNB_BTN_PRESSED; + Refresh(); + break; + case wxFNB_LEFT_ARROW: + m_nLeftButtonStatus = wxFNB_BTN_PRESSED; + Refresh(); + break; + case wxFNB_RIGHT_ARROW: + m_nRightButtonStatus = wxFNB_BTN_PRESSED; + Refresh(); + break; + case wxFNB_X: + m_nXButtonStatus = wxFNB_BTN_PRESSED; + Refresh(); + break; + case wxFNB_TAB_X: + m_nTabXButtonStatus = wxFNB_BTN_PRESSED; + Refresh(); + break; + case wxFNB_TAB: + { + if(m_iActivePage != tabIdx) + { + // Incase the tab is disabled, we dont allow to choose it + if(!m_pagesInfoVec[tabIdx].GetEnabled()) + break; + + SetSelection(tabIdx); + } + break; + } + } +} + +void wxPageContainer::RotateLeft() +{ + if(m_nFrom == 0) + return; + + // Make sure that the button was pressed before + if(m_nLeftButtonStatus != wxFNB_BTN_PRESSED) + return; + + m_nLeftButtonStatus = wxFNB_BTN_HOVER; + + // We scroll left with bulks of 5 + int scrollLeft = GetNumTabsCanScrollLeft(); + + m_nFrom -= scrollLeft; + if(m_nFrom < 0) + m_nFrom = 0; + + Refresh(); + return; +} + +void wxPageContainer::RotateRight() +{ + if(m_nFrom >= (int)m_pagesInfoVec.GetCount() - 1) + return; + + // Make sure that the button was pressed before + if(m_nRightButtonStatus != wxFNB_BTN_PRESSED) + return; + + m_nRightButtonStatus = wxFNB_BTN_HOVER; + + // Check if the right most tab is visible, if it is + // don't rotate right anymore + if(m_pagesInfoVec[m_pagesInfoVec.GetCount()-1].GetPosition() != wxPoint(-1, -1)) + return; + + m_nFrom += 1; + Refresh(); +} + +void wxPageContainer::OnLeftUp(wxMouseEvent& event) +{ + wxPageInfo pgInfo; + int tabIdx; + + // forget the zone that was initially clicked + m_nLeftClickZone = wxFNB_NOWHERE; + + int where = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch(where) + { + case wxFNB_LEFT_ARROW: + { + RotateLeft(); + break; + } + case wxFNB_RIGHT_ARROW: + { + RotateRight(); + break; + } + case wxFNB_X: + { + // Make sure that the button was pressed before + if(m_nXButtonStatus != wxFNB_BTN_PRESSED) + break; + + m_nXButtonStatus = wxFNB_BTN_HOVER; + + DeletePage((size_t)m_iActivePage); + break; + } + case wxFNB_TAB_X: + { + // Make sure that the button was pressed before + if(m_nTabXButtonStatus != wxFNB_BTN_PRESSED) + break; + + m_nTabXButtonStatus = wxFNB_BTN_HOVER; + + DeletePage((size_t)m_iActivePage); + break; + } + case wxFNB_DROP_DOWN_ARROW: + { + // Make sure that the button was pressed before + if(m_nArrowDownButtonStatus != wxFNB_BTN_PRESSED) + break; + + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + + // Refresh the button status + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() ); + wxClientDC dc(this); + render->DrawDropDownArrow(this, dc); + + PopupTabsMenu(); + break; + } + } + event.Skip(); +} + +int wxPageContainer::HitTest(const wxPoint& pt, wxPageInfo& pageInfo, int &tabIdx) +{ + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() ); + + wxRect rect = GetClientRect(); + int btnLeftPos = render->GetLeftButtonPos(this); + int btnRightPos = render->GetRightButtonPos(this); + int btnXPos =render->GetXPos(this); + long style = GetParent()->GetWindowStyleFlag(); + + tabIdx = -1; + if(m_pagesInfoVec.IsEmpty()) + { + return wxFNB_NOWHERE; + } + + rect = wxRect(btnXPos, 8, 16, 16); + if(rect.Contains(pt)) + { + return (style & wxFNB_NO_X_BUTTON) ? wxFNB_NOWHERE : wxFNB_X; + } + + rect = wxRect(btnRightPos, 8, 16, 16); + if( style & wxFNB_DROPDOWN_TABS_LIST ) + { + rect = wxRect(render->GetDropArrowButtonPos( this ), 8, 16, 16); + if( rect.Contains(pt) ) + return wxFNB_DROP_DOWN_ARROW; + } + + if(rect.Contains(pt)) + { + return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_RIGHT_ARROW; + } + + + rect = wxRect(btnLeftPos, 8, 16, 16); + if(rect.Contains(pt)) + { + return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_LEFT_ARROW; + } + + // Test whether a left click was made on a tab + bool bFoundMatch = false; + for(size_t cur=m_nFrom; curSetSelection(page); + DoSetSelection(page); +} + +void wxPageContainer::DoSetSelection(size_t page) +{ + // Make sure that the selection is visible + if(page < m_pagesInfoVec.GetCount()) + { + //! fix for tabfocus + wxWindow* da_page = ((wxFlatNotebook *)m_pParent)->GetPage(page); + if ( da_page!=NULL ) + da_page->SetFocus(); + } + + if( !IsTabVisible(page) ) + { + // Try to remove one tab from start and try again + if( !CanFitToScreen(page) ) + { + if( m_nFrom > (int)page ) + m_nFrom = (int)page; + else + { + while( m_nFrom < (int)page ) + { + m_nFrom++; + if( CanFitToScreen(page) ) + break; + } + } + } + } + else + { + } + PushPageHistory((int)page); + Refresh(); +} + +void wxPageContainer::DeletePage(size_t page) +{ + wxFlatNotebook* book = (wxFlatNotebook*)GetParent(); + book->DeletePage(page); + book->Refresh(); +} + +bool wxPageContainer::IsTabVisible(size_t page) +{ + int iPage = (int)page; + int iLastVisiblePage = GetLastVisibleTab(); + + return iPage <= iLastVisiblePage && iPage >= m_nFrom; +} + +int wxPageContainer::GetPreviousSelection() const +{ + if(m_history.empty()){ + return wxNOT_FOUND; + } + //return the top of the heap + return m_history.Item(0); +} + +void wxPageContainer::DoDeletePage(size_t page) +{ + // Remove the page from the vector + wxFlatNotebook* book = (wxFlatNotebook*)GetParent(); + + PopPageHistory((int)page); + + // same thing with the active page + if (m_iActivePage > (int)page || (int)page >= m_pagesInfoVec.Count()){ + m_iActivePage -= 1; + }else if (m_iActivePage == (int)page){ + m_iActivePage = GetPreviousSelection(); + //PopPageHistory(m_iActivePage); + } + + m_pagesInfoVec.RemoveAt(page); + + if(m_iActivePage == wxNOT_FOUND && m_pagesInfoVec.Count() > 0){ + m_iActivePage = 0; + } + + // Refresh the tabs + book->SetForceSelection(true); + book->SetSelection(m_iActivePage); + book->SetForceSelection(false); + + if(m_pagesInfoVec.empty()) + { + // Erase the page container drawings + wxClientDC dc(this); + dc.Clear(); + } +} + +void wxPageContainer::DeleteAllPages() +{ + m_iActivePage = -1; + m_history.Clear(); + m_nFrom = 0; + m_pagesInfoVec.Clear(); + + // Erase the page container drawings + wxClientDC dc(this); + dc.Clear(); +} + +void wxPageContainer::OnMouseMove(wxMouseEvent& event) +{ + if (!m_pagesInfoVec.empty() && IsShown()) + { + const int xButtonStatus = m_nXButtonStatus; + const int xTabButtonStatus = m_nTabXButtonStatus; + const int rightButtonStatus = m_nRightButtonStatus; + const int leftButtonStatus = m_nLeftButtonStatus; + const int dropDownButtonStatus = m_nArrowDownButtonStatus; + + long style = GetParent()->GetWindowStyleFlag(); + + m_nXButtonStatus = wxFNB_BTN_NONE; + m_nRightButtonStatus = wxFNB_BTN_NONE; + m_nLeftButtonStatus = wxFNB_BTN_NONE; + m_nTabXButtonStatus = wxFNB_BTN_NONE; + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + + wxPageInfo pgInfo; + int tabIdx; + + int where = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch ( where ) + { + case wxFNB_X: + if (event.LeftIsDown()) + { + m_nXButtonStatus = (m_nLeftClickZone==wxFNB_X) ? wxFNB_BTN_PRESSED : wxFNB_BTN_NONE; + } + else + { + m_nXButtonStatus = wxFNB_BTN_HOVER; + } + break; + case wxFNB_DROP_DOWN_ARROW: + if (event.LeftIsDown()) + { + m_nArrowDownButtonStatus = (m_nLeftClickZone == wxFNB_DROP_DOWN_ARROW) ? wxFNB_BTN_PRESSED : wxFNB_BTN_NONE; + } + else + { + m_nArrowDownButtonStatus = wxFNB_BTN_HOVER; + } + break; + case wxFNB_TAB_X: + if (event.LeftIsDown()) + { + m_nTabXButtonStatus = (m_nLeftClickZone==wxFNB_TAB_X) ? wxFNB_BTN_PRESSED : wxFNB_BTN_NONE; + } + else + { + m_nTabXButtonStatus = wxFNB_BTN_HOVER; + } + break; + case wxFNB_RIGHT_ARROW: + if (event.LeftIsDown()) + { + m_nRightButtonStatus = (m_nLeftClickZone==wxFNB_RIGHT_ARROW) ? wxFNB_BTN_PRESSED : wxFNB_BTN_NONE; + } + else + { + m_nRightButtonStatus = wxFNB_BTN_HOVER; + } + break; + + case wxFNB_LEFT_ARROW: + if (event.LeftIsDown()) + { + m_nLeftButtonStatus = (m_nLeftClickZone==wxFNB_LEFT_ARROW) ? wxFNB_BTN_PRESSED : wxFNB_BTN_NONE; + } + else + { + m_nLeftButtonStatus = wxFNB_BTN_HOVER; + } + break; + + case wxFNB_TAB: + // Call virtual method for showing tooltip + ShowTabTooltip(tabIdx); + if(!GetEnabled((size_t)tabIdx)) + { + // Set the cursor to be 'No-entry' + ::wxSetCursor(wxCURSOR_NO_ENTRY); + } + + // Support for drag and drop + if(event.Dragging() && !(style & wxFNB_NODRAG)) + { + wxFNBDragInfo draginfo(this, tabIdx); + wxFNBDragInfoDataObject dataobject(wxDataFormat(wxT("wxFNB"))); + dataobject.SetData(sizeof(wxFNBDragInfo), &draginfo); + wxFNBDropSource dragSource(this); + dragSource.SetData(dataobject); + dragSource.DoDragDrop(wxDrag_DefaultMove); + } + break; + default: + m_nTabXButtonStatus = wxFNB_BTN_NONE; + break; + } + + const bool bRedrawX = m_nXButtonStatus != xButtonStatus; + const bool bRedrawDropArrow = m_nArrowDownButtonStatus != dropDownButtonStatus; + const bool bRedrawRight = m_nRightButtonStatus != rightButtonStatus; + const bool bRedrawLeft = m_nLeftButtonStatus != leftButtonStatus; + const bool bRedrawTabX = m_nTabXButtonStatus != xTabButtonStatus; + + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() ); + + if (bRedrawX || bRedrawRight || bRedrawLeft || bRedrawTabX || bRedrawDropArrow) + { + wxClientDC dc(this); + if (bRedrawX) + { + render->DrawX(this, dc); + } + if (bRedrawLeft) + { + render->DrawLeftArrow(this, dc); + } + if (bRedrawRight) + { + render->DrawRightArrow(this, dc); + } + if (bRedrawTabX) + { + render->DrawTabX(this, dc, pgInfo.GetXRect(), tabIdx, m_nTabXButtonStatus); + } + if (bRedrawDropArrow) + { + render->DrawDropDownArrow(this, dc); + } + } + } + event.Skip(); +} + +int wxPageContainer::GetLastVisibleTab() +{ + int i; + if( m_nFrom < 0) + return -1; + + for(i=m_nFrom; i<(int)m_pagesInfoVec.GetCount(); i++) + { + if(m_pagesInfoVec[i].GetPosition() == wxPoint(-1, -1)) + break; + } + return (i-1); +} + +int wxPageContainer::GetNumTabsCanScrollLeft() +{ + if( m_nFrom - 1 >= 0){ + return 1; + } else { + return 0; + } +} + +bool wxPageContainer::IsDefaultTabs() +{ + long style = GetParent()->GetWindowStyleFlag(); + bool res = (style & wxFNB_VC8) ? true : false; + return !res; +} + +void wxPageContainer::AdvanceSelection(bool bForward) +{ + int nSel = GetSelection(); + + if(nSel < 0) + return; + + int nMax = (int)GetPageCount() - 1; + if ( bForward ) + SetSelection(nSel == nMax ? 0 : nSel + 1); + else + SetSelection(nSel == 0 ? nMax : nSel - 1); +} + + +void wxPageContainer::OnMouseLeave(wxMouseEvent& event) +{ + m_nLeftButtonStatus = wxFNB_BTN_NONE; + m_nXButtonStatus = wxFNB_BTN_NONE; + m_nRightButtonStatus = wxFNB_BTN_NONE; + m_nTabXButtonStatus = wxFNB_BTN_NONE; + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + + long style = GetParent()->GetWindowStyleFlag(); + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer(style); + + wxClientDC dc(this); + render->DrawX(this, dc); + render->DrawLeftArrow(this, dc); + render->DrawRightArrow(this, dc); + if(GetSelection() != -1 && IsTabVisible((size_t)GetSelection())) + { + render->DrawTabX(this, dc, m_pagesInfoVec[GetSelection()].GetXRect(), GetSelection(), m_nTabXButtonStatus); + } + + event.Skip(); +} + +void wxPageContainer::OnMouseEnterWindow(wxMouseEvent& event) +{ + m_nLeftButtonStatus = wxFNB_BTN_NONE; + m_nXButtonStatus = wxFNB_BTN_NONE; + m_nRightButtonStatus = wxFNB_BTN_NONE; + m_nLeftClickZone = wxFNB_BTN_NONE; + m_nArrowDownButtonStatus = wxFNB_BTN_NONE; + + event.Skip(); +} + +void wxPageContainer::ShowTabTooltip(int tabIdx) +{ + wxWindow *pWindow = ((wxFlatNotebook *)m_pParent)->GetPage(tabIdx); + if( pWindow ) + { + wxToolTip *pToolTip = pWindow->GetToolTip(); + if(pToolTip && pToolTip->GetWindow() == pWindow) + SetToolTip(pToolTip->GetTip()); + } +} + +void wxPageContainer::SetPageImageIndex(size_t page, int imgindex) +{ + if(page < m_pagesInfoVec.GetCount()) + { + m_pagesInfoVec[page].SetImageIndex(imgindex); + Refresh(); + } +} + +int wxPageContainer::GetPageImageIndex(size_t page) +{ + if(page < m_pagesInfoVec.GetCount()) + { + return m_pagesInfoVec[page].GetImageIndex(); + } + return -1; +} + +wxDragResult wxPageContainer::OnDropTarget(wxCoord x, wxCoord y, int nTabPage, wxWindow * wnd_oldContainer) +{ + // Disable drag'n'drop for disabled tab + if(!((wxPageContainer *)wnd_oldContainer)->m_pagesInfoVec[nTabPage].GetEnabled()) + return wxDragCancel; + + wxPageContainer * oldContainer = (wxPageContainer *)wnd_oldContainer; + int nIndex = -1; + wxPageInfo pgInfo; + int where = HitTest(wxPoint(x, y), pgInfo, nIndex); + wxFlatNotebook * oldNotebook = (wxFlatNotebook *)oldContainer->GetParent(); + wxFlatNotebook * newNotebook = (wxFlatNotebook *)GetParent(); + + if(oldNotebook == newNotebook) + { + if(nTabPage >= 0) + { + switch(where) + { + case wxFNB_TAB: + MoveTabPage(nTabPage, nIndex); + break; + case wxFNB_NOWHERE: + { + } + break; + default: + break; + } + } + } + else if ( GetParent()->GetWindowStyleFlag() & wxFNB_ALLOW_FOREIGN_DND ) + { +#if defined(__WXMSW__) || defined(__WXGTK__) + if(nTabPage >= 0) + { + wxWindow * window = oldNotebook->GetPage(nTabPage); + if(window) + { + wxString caption = oldContainer->GetPageText(nTabPage); + + // Pass the image to the new container + // incase that the new container (this) does not have image list we dont pass the image + // to the new notebook + int newIndx( wxNOT_FOUND ); + + if( m_ImageList ) + { + int imageindex = oldContainer->GetPageImageIndex(nTabPage); + if( imageindex >= 0 ) + { + wxBitmap bmp( (*oldContainer->GetImageList())[imageindex] ); + m_ImageList->Add( bmp ); + newIndx = static_cast(m_ImageList->GetCount() - 1); + } + } + + oldNotebook->RemovePage( nTabPage ); + window->Reparent( newNotebook ); + newNotebook->InsertPage(nIndex, window, caption, true, newIndx); + } + } +#endif + } + return wxDragMove; +} + +void wxPageContainer::MoveTabPage(int nMove, int nMoveTo) +{ + if(nMove == nMoveTo) + return; + + else if(nMoveTo < (int)((wxFlatNotebook *)m_pParent)->GetWindows().GetCount()) + nMoveTo++; + + m_pParent->Freeze(); + // Remove the window from the main sizer + int nCurSel = ((wxFlatNotebook *)m_pParent)->GetPages()->GetSelection(); + ((wxFlatNotebook *)m_pParent)->GetMainSizer()->Detach(((wxFlatNotebook *)m_pParent)->GetWindows().Item(nCurSel)); + ((wxFlatNotebook *)m_pParent)->GetWindows().Item(nCurSel)->Hide(); + + wxWindow *pWindow = ((wxFlatNotebook *)m_pParent)->GetWindows().Item(nMove); + ((wxFlatNotebook *)m_pParent)->GetWindows().RemoveAt(nMove); + ((wxFlatNotebook *)m_pParent)->GetWindows().Insert(pWindow, nMoveTo-1); + + wxPageInfo pgInfo = m_pagesInfoVec[nMove]; + + m_pagesInfoVec.RemoveAt( nMove ); + m_pagesInfoVec.Insert(pgInfo, nMoveTo - 1); + + // Add the page according to the style + wxBoxSizer* pSizer = ((wxFlatNotebook *)m_pParent)->GetMainSizer(); + long style = GetParent()->GetWindowStyleFlag(); + + + if(style & wxFNB_BOTTOM) + { + pSizer->Insert(0, pWindow, 1, wxEXPAND); + } + else + { + // We leave a space of 1 pixel around the window + pSizer->Add(pWindow, 1, wxEXPAND); + } + pWindow->Show(); + + pSizer->Layout(); + m_iActivePage = nMoveTo-1; + m_history.Clear(); + DoSetSelection(m_iActivePage); + m_pParent->Thaw(); +} + +bool wxPageContainer::CanFitToScreen(size_t page) +{ + // Incase the from is greater than page, + // we need to reset the m_nFrom, so in order + // to force the caller to do so, we return false + if(m_nFrom > (int)page) + return false; + + long style = GetParent()->GetWindowStyleFlag(); + wxFNBRendererPtr render = wxFNBRendererMgrST::Get()->GetRenderer(style); + std::vector vTabInfo; + render->NumberTabsCanFit( this, vTabInfo ); + + if(static_cast(page) - m_nFrom >= static_cast( vTabInfo.size() )) + return false; + return true; +} + +int wxPageContainer::GetNumOfVisibleTabs() +{ + int i=m_nFrom; + int counter = 0; + for(; i<(int)m_pagesInfoVec.GetCount(); i++, ++counter) + { + if(m_pagesInfoVec[i].GetPosition() == wxPoint(-1, -1)) + break; + } + return counter; +} + +bool wxPageContainer::GetEnabled(size_t page) +{ + if(page >= m_pagesInfoVec.GetCount()) + return true; // Seems strange, but this is the default + return m_pagesInfoVec[page].GetEnabled(); +} + +void wxPageContainer::Enable(size_t page, bool enabled) +{ + if(page >= m_pagesInfoVec.GetCount()) + return ; + m_pagesInfoVec[page].Enable(enabled); + return; +} + +wxColor wxPageContainer::GetSingleLineBorderColor() +{ + if(HasFlag(wxFNB_FANCY_TABS)) + return m_colorFrom; + return *wxWHITE; +} + +bool wxPageContainer::HasFlag(int flag) +{ + long style = GetParent()->GetWindowStyleFlag(); + bool res = style & flag ? true : false; + return res; +} + +void wxPageContainer::ClearFlag(int flag) +{ + long style = GetParent()->GetWindowStyleFlag(); + style &= ~( flag ); + wxWindowBase::SetWindowStyleFlag(style); +} + +bool wxPageContainer::TabHasImage(int tabIdx) +{ + if(m_ImageList) + return m_pagesInfoVec[tabIdx].GetImageIndex() != -1; + return false; +} + +void wxPageContainer::OnLeftDClick(wxMouseEvent& event) +{ + wxPageInfo pgInfo; + int tabIdx; + int where = HitTest(event.GetPosition(), pgInfo, tabIdx); + switch(where) + { + case wxFNB_RIGHT_ARROW: + RotateRight(); + break; + case wxFNB_LEFT_ARROW: + RotateLeft(); + break; + case wxFNB_TAB: + if(HasFlag(wxFNB_DCLICK_CLOSES_TABS)) + { + DeletePage((size_t)tabIdx); + } + break; + case wxFNB_X: + { + OnLeftDown(event); + } + break; + default: + event.Skip(); + break; + } +} + +void wxPageContainer::PopupTabsMenu() +{ + wxMenu popupMenu; + + for(size_t i=0; i(i), pi.GetCaption(), pi.GetCaption(), wxITEM_NORMAL); + + // This code is commented, since there is an alignment problem with wx2.6.3 & Menus +// if( TabHasImage(static_cast(i)) ) +// item->SetBitmaps( (*m_ImageList)[pi.GetImageIndex()] ); + + popupMenu.Append( item ); + } + + // connect an event handler to our menu + popupMenu.Connect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxPageContainer::OnTabMenuSelection), NULL, this); + PopupMenu( &popupMenu ); +} + +void wxPageContainer::OnTabMenuSelection(wxCommandEvent &event) +{ + int selection = event.GetId(); + static_cast(m_pParent)->SetSelection( (size_t)selection ); +} + +// Draw small arrow at the place that the tab will be placed +void wxPageContainer::DrawDragHint() +{ + // get the index of tab that will be replaced with the dragged tab + wxPageInfo info; + int tabIdx; + wxPoint pt = ::wxGetMousePosition(); + wxPoint client_pt = ScreenToClient(pt); + HitTest(client_pt, info, tabIdx); + wxFNBRendererMgrST::Get()->GetRenderer( GetParent()->GetWindowStyleFlag() )->DrawDragHint(this, tabIdx); +} + +void wxPageContainer::SetCustomizeOptions(long options) +{ + m_customizeOptions = options; +} + +long wxPageContainer::GetCustomizeOptions() const +{ + return m_customizeOptions; +} diff --git a/sdk/wxflatnotebook/src/wxFlatNotebook/xh_fnb.cpp b/sdk/wxflatnotebook/src/wxFlatNotebook/xh_fnb.cpp new file mode 100644 index 0000000000..c9d606e335 --- /dev/null +++ b/sdk/wxflatnotebook/src/wxFlatNotebook/xh_fnb.cpp @@ -0,0 +1,132 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_fnb.cpp +// Purpose: XRC resource for wxFlatNotebook +// Author: Armel Asselin +// Created: 2006/10/30 +// RCS-ID: $Id: $ +// Copyright: (c) 2006 Armel Asselin (copied from Vaclav Slavik xh_notbk) +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) +#pragma implementation "xh_notbk.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_XRC + +#include "wx/wxFlatNotebook/xh_fnb.h" + +#include "wx/log.h" +#include "wx/notebook.h" +#include "wx/imaglist.h" +#include "wx/sizer.h" + +IMPLEMENT_DYNAMIC_CLASS(wxFlatNotebookXmlHandler, wxXmlResourceHandler) + +wxFlatNotebookXmlHandler::wxFlatNotebookXmlHandler() +: wxXmlResourceHandler(), m_isInside(false), m_notebook(NULL) +{ + XRC_ADD_STYLE(wxFNB_DEFAULT_STYLE); + XRC_ADD_STYLE(wxFNB_VC71); + XRC_ADD_STYLE(wxFNB_FANCY_TABS); + XRC_ADD_STYLE(wxFNB_TABS_BORDER_SIMPLE); + XRC_ADD_STYLE(wxFNB_NO_X_BUTTON); + XRC_ADD_STYLE(wxFNB_NO_NAV_BUTTONS); + XRC_ADD_STYLE(wxFNB_MOUSE_MIDDLE_CLOSES_TABS); + XRC_ADD_STYLE(wxFNB_BOTTOM); + XRC_ADD_STYLE(wxFNB_NODRAG); + XRC_ADD_STYLE(wxFNB_VC8); + XRC_ADD_STYLE(wxFNB_X_ON_TAB); + XRC_ADD_STYLE(wxFNB_BACKGROUND_GRADIENT); + XRC_ADD_STYLE(wxFNB_COLORFUL_TABS); + XRC_ADD_STYLE(wxFNB_DCLICK_CLOSES_TABS); + XRC_ADD_STYLE(wxFNB_SMART_TABS); + XRC_ADD_STYLE(wxFNB_DROPDOWN_TABS_LIST); + XRC_ADD_STYLE(wxFNB_ALLOW_FOREIGN_DND); + + AddWindowStyles(); +} + +wxObject *wxFlatNotebookXmlHandler::DoCreateResource() +{ + if (m_class == wxT("notebookpage")) + { + wxXmlNode *n = GetParamNode(wxT("object")); + + if ( !n ) + n = GetParamNode(wxT("object_ref")); + + if (n) + { + bool old_ins = m_isInside; + m_isInside = false; + wxObject *item = CreateResFromNode(n, m_notebook, NULL); + m_isInside = old_ins; + wxWindow *wnd = wxDynamicCast(item, wxWindow); + + if (wnd) + { + m_notebook->AddPage(wnd, GetText(wxT("label")), + GetBool(wxT("selected"))); + if ( HasParam(wxT("bitmap")) ) + { + wxBitmap bmp = GetBitmap(wxT("bitmap"), wxART_OTHER); + wxFlatNotebookImageList *imgList = m_notebook->GetImageList(); + if ( imgList == NULL ) + { + imgList = new wxFlatNotebookImageList ( ); + m_notebook->SetImageList( imgList ); + } + imgList->Add(bmp); + m_notebook->SetPageImageIndex(m_notebook->GetPageCount()-1, (int)imgList->Count()-1 ); + } + } + else + wxLogError(wxT("Error in resource.")); + return wnd; + } + else + { + wxLogError(wxT("Error in resource: no control within notebook's tag.")); + return NULL; + } + } + + else + { + XRC_MAKE_INSTANCE(nb, wxFlatNotebook) + + nb->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style")), + GetName()); + + SetupWindow(nb); + + wxFlatNotebook *old_par = m_notebook; + m_notebook = nb; + bool old_ins = m_isInside; + m_isInside = true; + CreateChildren(m_notebook, true/*only this handler*/); + m_isInside = old_ins; + m_notebook = old_par; + + return nb; + } +} + +bool wxFlatNotebookXmlHandler::CanHandle(wxXmlNode *node) +{ + return ((!m_isInside && IsOfClass(node, wxT("wxFlatNotebook"))) || + (m_isInside && IsOfClass(node, wxT("notebookpage")))); +} + +#endif // wxUSE_XRC && wxUSE_NOTEBOOK diff --git a/sdk/wxflatnotebook/wxflatnotebook.project b/sdk/wxflatnotebook/wxflatnotebook.project new file mode 100644 index 0000000000..74a1393ba6 --- /dev/null +++ b/sdk/wxflatnotebook/wxflatnotebook.project @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/wxscintilla/Readme b/sdk/wxscintilla/Readme new file mode 100644 index 0000000000..76ebcd4815 --- /dev/null +++ b/sdk/wxscintilla/Readme @@ -0,0 +1,13 @@ +Component: wxScintilla +Release: 1.69.2 +Documents: http://wxcode.sourceforge.net/components/wxscintilla/index.php +wxWidgets: 2.6.x +Maintainer: Otto Wyss (wyo) +Subdir: wxscintilla + +Description: +wxScintilla implements the Scintilla editing control (see +http://scintilla.sourceforge.net/) with the wxWidgets API. It's derived +from wxStyledTextCtrl and has the same functionality and a similar API. + +For further instructions see the BuildInfo.txt inside the "build" directory. \ No newline at end of file diff --git a/sdk/wxscintilla/build/BuildInfo.txt b/sdk/wxscintilla/build/BuildInfo.txt new file mode 100644 index 0000000000..4996454c54 --- /dev/null +++ b/sdk/wxscintilla/build/BuildInfo.txt @@ -0,0 +1,61 @@ +############################################################################## +## File: BuildInfo.txt +## Purpose: Installation info +## Maintainer: Otto Wyss +## Created: 2004-11-14 +## RCS-ID: $Id: BuildInfo.txt,v 1.3 2005/09/02 20:21:32 wyo Exp $ +## Copyright: (c) 2004 wxCode +## Licence: wxWindows +############################################################################## + +Requirements +============ +To build successfully you need at least wxWidgets 2.6.1 (stable). + + +Generel building rules +====================== +1. Build or get the wxWidgets libraries however this is done on your platform +(e.g. packages wxGTK2.4 from Debian/sarge). If the libraries are installed, +nothing additional has to be done. Otherwise you have to set the $WXSTABLE +environment variable to point to the base directory of wxWidgets (e.g. +"/usr/src/wxWidgets" then "WXSTABLE=/usr/src/wxWidgets"). + +2. Extract the sources into a working directory. + +3. Now follow the platform specific instructions. + +If you want to build any development target don't forget to set the environment +variable WXDEVEL (e.g. "C:\Devel\wxWidgetsDev" then +"WXDEVEL=C:\Devel\wxWidgetsDev"). + + +Linux (wxGTK, wxUniv/GTK) +------------------------- +Use "make" for the release version, "make debug" for the debug version. For +wxUniv need to make "make univdebug" and variable WXDEVEL has to be set. + +MacOS (wxMAC) +------------- +??? Try the Linux build rules. + +Windows (wxMSW, wxUniv/MSW) +--------------------------- +There is a VC++ project file which _requires_ the environment variables +WXSTABLE pointing to the base directory of wxWidgets (e.g. "C:\Devel\wxWidgets" +then "WXSTABLE=C:\Devel\wxWidgets". Build the "wxscintilla - Win32 Release" +target. + +Building on other ports +----------------------- +There is currently no support to build on other ports. If you are able to deduct +how to build on your platform it would be nice if you submit them to the project. + + +Generel installation rules +========================== + +There is currently no installation mostly because I don't know how in each case. +Simply do it as it is usual on your platform, e.g. on Linux it's probably moving +the library into /usr/lib. On Windows follow the rules of the application which +wants to link with. diff --git a/sdk/wxscintilla/build/Makefile b/sdk/wxscintilla/build/Makefile new file mode 100644 index 0000000000..6b8ab0bd0b --- /dev/null +++ b/sdk/wxscintilla/build/Makefile @@ -0,0 +1,170 @@ +############################################################################## +## File: Makefile +## Purpose: wxScintilla +## Maintainer: Otto Wyss +## Created: 2004-09-19 +## RCS-ID: $Id: Makefile,v 1.13 2006/03/14 19:10:49 wyo Exp $ +## Copyright: (c) 2004 wxCode +## Licence: wxWindows +############################################################################## + +# list of source files +SRC = PlatWX.cpp \ + ScintillaWX.cpp \ + wxscintilla.cpp \ + AutoComplete.cxx \ + CallTip.cxx \ + CellBuffer.cxx \ + CharClassify.cxx \ + ContractionState.cxx \ + Document.cxx \ + DocumentAccessor.cxx \ + Editor.cxx \ + Indicator.cxx \ + KeyMap.cxx \ + KeyWords.cxx \ + LexAda.cxx \ + LexAPDL.cxx \ + LexAsm.cxx \ + LexAsn1.cxx \ + LexAU3.cxx \ + LexAVE.cxx \ + LexBaan.cxx \ + LexBash.cxx \ + LexBasic.cxx \ + LexBullant.cxx \ + LexCaml.cxx \ + LexCLW.cxx \ + LexConf.cxx \ + LexCPP.cxx \ + LexCrontab.cxx \ + LexCsound.cxx \ + LexCSS.cxx \ + LexEiffel.cxx \ + LexErlang.cxx \ + LexEScript.cxx \ + LexFlagship.cxx \ + LexForth.cxx \ + LexFortran.cxx \ + LexGui4Cli.cxx \ + LexHaskell.cxx \ + LexHTML.cxx \ + LexInno.cxx \ + LexKix.cxx \ + LexLisp.cxx \ + LexLout.cxx \ + LexLua.cxx \ + LexMatlab.cxx \ + LexMetapost.cxx \ + LexMMIXAL.cxx \ + LexMPT.cxx \ + LexMSSQL.cxx \ + LexOpal.cxx \ + LexNsis.cxx \ + LexOthers.cxx \ + LexPascal.cxx \ + LexPB.cxx \ + LexPerl.cxx \ + LexPOV.cxx \ + LexPS.cxx \ + LexPython.cxx \ + LexRebol.cxx \ + LexRuby.cxx \ + LexScriptol.cxx \ + LexSmalltalk.cxx \ + LexSpecman.cxx \ + LexSQL.cxx \ + LexTADS3.cxx \ + LexTCL.cxx \ + LexTeX.cxx \ + LexVB.cxx \ + LexVerilog.cxx \ + LexVHDL.cxx \ + LexYAML.cxx \ + LineMarker.cxx \ + PropSet.cxx \ + RESearch.cxx \ + ScintillaBase.cxx \ + Style.cxx \ + StyleContext.cxx \ + UniConversion.cxx \ + ViewStyle.cxx \ + WindowAccessor.cxx \ + XPM.cxx + +# source directories +vpath %.cpp ../src +vpath %.cxx ../src/scintilla/src + +# additional header directories +INC = -I../include \ + -I../src/scintilla/include \ + -I../src/scintilla/src + +DEF = -D__WX__=1 -DSCI_LEXER -DLINK_LEXERS + +# objects +OBJ = $(patsubst %.cxx,%.o,$(SRC:.cpp=.o)) + +# library +LIB = libwxscintilla + + +############################################################################## +# implementation, change only if other settings or other targets are needed + +ifneq ($(WXDEVEL),) + WXDEVEL_Release = $(WXDEVEL)/Release/ + WXDEVEL_Debug = $(WXDEVEL)/Debug/ + WXDEVEL_Univ = $(WXDEVEL)/Univ/ +endif + +ifeq ($(MAKECMDGOALS),) + WXCONFIG=wx-config + GTKCONFIG=gtk-config +endif +ifeq ($(MAKECMDGOALS),release) + WXCONFIG=wx-config + GTKCONFIG=gtk-config +endif +ifeq ($(MAKECMDGOALS),debug) + WXCONFIG=wxgtkd-2.4-config + GTKCONFIG=gtk-config +endif +ifeq ($(MAKECMDGOALS),develdebug) + WXCONFIG=$(WXDEVEL_Debug)wx-config --inplace + GTKCONFIG=pkg-config gtk+-2.0 +endif +ifeq ($(MAKECMDGOALS),univdebug) + WXCONFIG=$(WXDEVEL_Univ)wx-config --inplace + GTKCONFIG=pkg-config gtk+-2.0 +endif + +%.o: %.cpp + g++ -fpic -c $(DEF) $(INC) `$(WXCONFIG) --cxxflags` -g -o $@ $< + +%.o: %.cxx + g++ -fpic -c $(DEF) $(INC) `$(WXCONFIG) --cxxflags` -g -o $@ $< + +all: $(LIB).so +$(LIB).so: $(OBJ) + g++ -fpic --share -o ../lib/$@ $^ `$(WXCONFIG) --libs` + +release: $(LIB).a +$(LIB).a: $(OBJ) + ar crs ../lib/$@ $^ + +debug: $(LIB).so.d +$(LIB).so.d: $(OBJ) + g++ -fpic --share -o ../lib/$@ $^ `$(WXCONFIG) --libs` + +develdebug: $(LIB).so.dd +$(LIB).so.dd: $(OBJ) + g++ -fpic --share -o ../lib/$@ $^ `$(WXCONFIG) --libs` + +univdebug: $(LIB).so.ud +$(LIB).so.ud: $(OBJ) + g++ -fpic --share -o ../lib/$@ $^ `$(WXCONFIG) --libs` + +clean: + rm -f *.o diff --git a/sdk/wxscintilla/build/wxscintilla.cbp b/sdk/wxscintilla/build/wxscintilla.cbp new file mode 100644 index 0000000000..055206f254 --- /dev/null +++ b/sdk/wxscintilla/build/wxscintilla.cbp @@ -0,0 +1,702 @@ + + + + + + \ No newline at end of file diff --git a/sdk/wxscintilla/build/wxscintilla.dsp b/sdk/wxscintilla/build/wxscintilla.dsp new file mode 100644 index 0000000000..1457fcb582 --- /dev/null +++ b/sdk/wxscintilla/build/wxscintilla.dsp @@ -0,0 +1,710 @@ +# Microsoft Developer Studio Project File - Name="wxscintilla" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=wxscintilla - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "wxscintilla.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "wxscintilla.mak" CFG="wxscintilla - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "wxscintilla - Win32 DebugUniv" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 ReleaseUniv" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 DebugDev" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 ReleaseDev" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 DebugUnicode" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 ReleaseUnicode" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "wxscintilla - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "wxscintilla - Win32 DebugUniv" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugUniv" +# PROP BASE Intermediate_Dir "DebugUniv" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUniv" +# PROP Intermediate_Dir "DebugUniv" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswunivd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /Gi /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswunivd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintillad_univ.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintillad_univ.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 ReleaseUniv" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUniv" +# PROP BASE Intermediate_Dir "ReleaseUniv" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUniv" +# PROP Intermediate_Dir "ReleaseUniv" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MD /W4 /GR /GX /O1 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswuniv" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD CPP /nologo /MD /W3 /Gi /GR /GX /O2 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswuniv" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintilla_univ.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintilla_univ.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 DebugDev" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDev" +# PROP BASE Intermediate_Dir "DebugDev" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDev" +# PROP Intermediate_Dir "DebugDev" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /Gi /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\mswd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintillad_dev.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintillad_dev.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 ReleaseDev" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDev" +# PROP BASE Intermediate_Dir "ReleaseDev" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDev" +# PROP Intermediate_Dir "ReleaseDev" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MD /W4 /GR /GX /O1 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\msw" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD CPP /nologo /MD /W3 /Gi /GR /GX /O2 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXDEVEL)\include" /I "$(WXDEVEL)\lib\vc_lib\msw" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintilla_dev.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintilla_dev.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 DebugUnicode" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugUnicode" +# PROP BASE Intermediate_Dir "DebugUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugUnicode" +# PROP Intermediate_Dir "DebugUnicode" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswud" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /Gi /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswud" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintillaud.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintillaud.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 ReleaseUnicode" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUnicode" +# PROP BASE Intermediate_Dir "ReleaseUnicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUnicode" +# PROP Intermediate_Dir "ReleaseUnicode" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MD /W4 /GR /GX /O1 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswu" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "_UNICODE" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD CPP /nologo /MD /W3 /Gi /GR /GX /O2 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswu" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "_UNICODE" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintillau.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintillau.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD CPP /nologo /MDd /W4 /Gm /Gi /GR /GX /Zi /Od /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\mswd" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /GZ /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintillad.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintillad.lib" + +!ELSEIF "$(CFG)" == "wxscintilla - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +LINK32=link.exe +# ADD BASE CPP /nologo /MD /W4 /GR /GX /O1 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\msw" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD CPP /nologo /MD /W3 /Gi /GR /GX /O2 /I "..\include" /I "..\src\scintilla\include" /I "..\src\scintilla\src" /I "$(WXSTABLE)\include" /I "$(WXSTABLE)\lib\vc_lib\msw" /D "WIN32" /D "_LIB" /D "__WXMSW__" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c +# ADD BASE RSC /l 0x405 +# ADD RSC /l 0x807 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\lib\wxscintilla.lib" +# ADD LIB32 /nologo /out:"..\lib\wxscintilla.lib" + +!ENDIF + +# Begin Target + +# Name "wxscintilla - Win32 DebugUniv" +# Name "wxscintilla - Win32 ReleaseUniv" +# Name "wxscintilla - Win32 DebugDev" +# Name "wxscintilla - Win32 ReleaseDev" +# Name "wxscintilla - Win32 DebugUnicode" +# Name "wxscintilla - Win32 ReleaseUnicode" +# Name "wxscintilla - Win32 Debug" +# Name "wxscintilla - Win32 Release" +# Begin Group "wxScintilla Src" + +# PROP Default_Filter "*.cpp" +# Begin Source File + +SOURCE=..\src\PlatWX.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\ScintillaWX.cpp +# End Source File +# Begin Source File + +SOURCE=..\src\wxscintilla.cpp +# End Source File +# End Group +# Begin Group "wxScintilla Headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\PlatWX.h +# End Source File +# Begin Source File + +SOURCE=..\src\ScintillaWX.h +# End Source File +# Begin Source File + +SOURCE=..\include\wx\wxscintilla.h +# End Source File +# End Group +# Begin Group "Scintilla" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\src\scintilla\include\Accessor.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\AutoComplete.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\AutoComplete.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CallTip.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CallTip.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CharClassify.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CharClassify.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CellBuffer.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\CellBuffer.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ContractionState.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ContractionState.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Document.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Document.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\DocumentAccessor.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\DocumentAccessor.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Editor.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Editor.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Indicator.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Indicator.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\KeyMap.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\KeyMap.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\KeyWords.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\KeyWords.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAda.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAPDL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAsm.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAsn1.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAU3.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexAVE.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexBaan.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexBash.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexBasic.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexBullant.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCaml.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCLW.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexConf.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCPP.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCrontab.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCsound.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexCSS.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexEiffel.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexErlang.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexFlagship.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexEScript.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexForth.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexFortran.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexGui4Cli.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexHaskell.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexHTML.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexInno.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexKix.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexLisp.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexLout.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexLua.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexMatlab.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexMetapost.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexMMIXAL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexMPT.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexMSSQL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexNsis.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexOpal.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexOthers.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPascal.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPB.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPerl.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPOV.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPS.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexPython.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexRebol.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexRuby.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexScriptol.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexSmalltalk.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexSpecman.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexSpice.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexSQL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexTads3.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexTCL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexTex.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexVB.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexVerilog.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexVHDL.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LexYAML.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LineMarker.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\LineMarker.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\Platform.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\PropSet.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\PropSet.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\RESearch.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\RESearch.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\SciLexer.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\Scintilla.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ScintillaBase.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ScintillaBase.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\ScintillaWidget.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\SString.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Style.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\Style.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\StyleContext.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\StyleContext.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\SVector.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\UniConversion.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\UniConversion.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ViewStyle.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\ViewStyle.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\WindowAccessor.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\include\WindowAccessor.h +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\XPM.cxx +# End Source File +# Begin Source File + +SOURCE=..\src\scintilla\src\XPM.h +# End Source File +# End Group +# End Target +# End Project diff --git a/sdk/wxscintilla/build/wxscintilla.dsw b/sdk/wxscintilla/build/wxscintilla.dsw new file mode 100644 index 0000000000..aef25a9aeb --- /dev/null +++ b/sdk/wxscintilla/build/wxscintilla.dsw @@ -0,0 +1,15 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### +Project: "wxScintilla"=.\wxscintilla.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### diff --git a/sdk/wxscintilla/build/wxscintilla.vcproj b/sdk/wxscintilla/build/wxscintilla.vcproj new file mode 100644 index 0000000000..6aa6ca2aba --- /dev/null +++ b/sdk/wxscintilla/build/wxscintilla.vcproj @@ -0,0 +1,5431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/wxscintilla/include/wx/wxscintilla.h b/sdk/wxscintilla/include/wx/wxscintilla.h new file mode 100644 index 0000000000..38a799f699 --- /dev/null +++ b/sdk/wxscintilla/include/wx/wxscintilla.h @@ -0,0 +1,3698 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: wxscintilla.h +// Purpose: A wxWidgets implementation of Scintilla. This class is the +// one meant to be used directly by wx applications. It does not +// derive directly from the Scintilla classes, and in fact there +// is no mention of Scintilla classes at all in this header. +// This class delegates all method calls and events to the +// Scintilla objects and so forth. This allows the use of +// Scintilla without polluting the namespace with all the +// classes and itentifiers from Scintilla. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id: wxscintilla.h,v 1.38 2006/09/22 19:42:14 wyo Exp $ +// Copyright: (c) 2004 wxCode +// Licence: wxWindows +///////////////////////////////////////////////////////////////////////////// + +#ifndef __WXSCINTILLA_H__ +#define __WXSCINTILLA_H__ + +#define wxSCINTILLA_VERSION _T("1.71.1") + +#include +#include + +#ifdef __APPLE__ +#include "Platform.h" +#endif + +#ifdef WXDLLIMPEXP_SCI +#undef WXDLLIMPEXP_SCI +#endif + +#ifdef WXMAKINGDLL_SCI + #define WXDLLIMPEXP_SCI WXEXPORT +#elif defined(WXUSINGDLL_SCI) + #define WXDLLIMPEXP_SCI WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_SCI +#endif + +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define SCI_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define SCI_USE_DND 1 +#endif +#endif + +//---------------------------------------------------------------------- + +// Should a wxPopupWindow be used for the call tips and autocomplete windows? +#ifndef wxSCI_USE_POPUP +#define wxSCI_USE_POPUP 1 +#endif + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit wxscintilla.h.in instead +// and regenerate + +#define wxSCI_INVALID_POSITION -1 + +// Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +// as many EM_ messages can be used although that use is deprecated. +#define wxSCI_START 2000 +#define wxSCI_OPTIONAL_START 3000 +#define wxSCI_LEXER_START 4000 +#define wxSCI_WS_INVISIBLE 0 +#define wxSCI_WS_VISIBLEALWAYS 1 +#define wxSCI_WS_VISIBLEAFTERINDENT 2 +#define wxSCI_EOL_CRLF 0 +#define wxSCI_EOL_CR 1 +#define wxSCI_EOL_LF 2 + +// The SC_CP_UTF8 value can be used to enter Unicode mode. +// This is the same value as CP_UTF8 in Windows +#define wxSCI_CP_UTF8 65001 + +// The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +#define wxSCI_CP_DBCS 1 + +#define wxSCI_MARKER_MAX 31 +#define wxSCI_MARK_CIRCLE 0 +#define wxSCI_MARK_ROUNDRECT 1 +#define wxSCI_MARK_ARROW 2 +#define wxSCI_MARK_SMALLRECT 3 +#define wxSCI_MARK_SHORTARROW 4 +#define wxSCI_MARK_EMPTY 5 +#define wxSCI_MARK_ARROWDOWN 6 +#define wxSCI_MARK_MINUS 7 +#define wxSCI_MARK_PLUS 8 + +// Shapes used for outlining column. +#define wxSCI_MARK_VLINE 9 +#define wxSCI_MARK_LCORNER 10 +#define wxSCI_MARK_TCORNER 11 +#define wxSCI_MARK_BOXPLUS 12 +#define wxSCI_MARK_BOXPLUSCONNECTED 13 +#define wxSCI_MARK_BOXMINUS 14 +#define wxSCI_MARK_BOXMINUSCONNECTED 15 +#define wxSCI_MARK_LCORNERCURVE 16 +#define wxSCI_MARK_TCORNERCURVE 17 +#define wxSCI_MARK_CIRCLEPLUS 18 +#define wxSCI_MARK_CIRCLEPLUSCONNECTED 19 +#define wxSCI_MARK_CIRCLEMINUS 20 +#define wxSCI_MARK_CIRCLEMINUSCONNECTED 21 + +// Invisible mark that only sets the line background color. +#define wxSCI_MARK_BACKGROUND 22 +#define wxSCI_MARK_DOTDOTDOT 23 +#define wxSCI_MARK_ARROWS 24 +#define wxSCI_MARK_PIXMAP 25 +#define wxSCI_MARK_FULLRECT 26 +#define wxSCI_MARK_CHARACTER 10000 + +// Markers used for outlining column. +#define wxSCI_MARKNUM_FOLDEREND 25 +#define wxSCI_MARKNUM_FOLDEROPENMID 26 +#define wxSCI_MARKNUM_FOLDERMIDTAIL 27 +#define wxSCI_MARKNUM_FOLDERTAIL 28 +#define wxSCI_MARKNUM_FOLDERSUB 29 +#define wxSCI_MARKNUM_FOLDER 30 +#define wxSCI_MARKNUM_FOLDEROPEN 31 +#define wxSCI_MASK_FOLDERS 0xFE000000 +#define wxSCI_MARGIN_SYMBOL 0 +#define wxSCI_MARGIN_NUMBER 1 +#define wxSCI_MARGIN_BACK 2 +#define wxSCI_MARGIN_FORE 3 + +// Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles. +// Styles 39 is for future use. +#define wxSCI_STYLE_DEFAULT 32 +#define wxSCI_STYLE_LINENUMBER 33 +#define wxSCI_STYLE_BRACELIGHT 34 +#define wxSCI_STYLE_BRACEBAD 35 +#define wxSCI_STYLE_CONTROLCHAR 36 +#define wxSCI_STYLE_INDENTGUIDE 37 +#define wxSCI_STYLE_CALLTIP 38 +#define wxSCI_STYLE_LASTPREDEFINED 39 +#define wxSCI_STYLE_MAX 127 + +// Character set identifiers are used in StyleSetCharacterSet. +// The values are the same as the Windows *_CHARSET values. +#define wxSCI_CHARSET_ANSI 0 +#define wxSCI_CHARSET_DEFAULT 1 +#define wxSCI_CHARSET_BALTIC 186 +#define wxSCI_CHARSET_CHINESEBIG5 136 +#define wxSCI_CHARSET_EASTEUROPE 238 +#define wxSCI_CHARSET_GB2312 134 +#define wxSCI_CHARSET_GREEK 161 +#define wxSCI_CHARSET_HANGUL 129 +#define wxSCI_CHARSET_MAC 77 +#define wxSCI_CHARSET_OEM 255 +#define wxSCI_CHARSET_RUSSIAN 204 +#define wxSCI_CHARSET_CYRILLIC 1251 +#define wxSCI_CHARSET_SHIFTJIS 128 +#define wxSCI_CHARSET_SYMBOL 2 +#define wxSCI_CHARSET_TURKISH 162 +#define wxSCI_CHARSET_JOHAB 130 +#define wxSCI_CHARSET_HEBREW 177 +#define wxSCI_CHARSET_ARABIC 178 +#define wxSCI_CHARSET_VIETNAMESE 163 +#define wxSCI_CHARSET_THAI 222 +#define wxSCI_CHARSET_8859_15 1000 +#define wxSCI_CASE_MIXED 0 +#define wxSCI_CASE_UPPER 1 +#define wxSCI_CASE_LOWER 2 +#define wxSCI_INDIC_MAX 7 +#define wxSCI_INDIC_PLAIN 0 +#define wxSCI_INDIC_SQUIGGLE 1 +#define wxSCI_INDIC_TT 2 +#define wxSCI_INDIC_DIAGONAL 3 +#define wxSCI_INDIC_STRIKE 4 +#define wxSCI_INDIC_HIDDEN 5 +#define wxSCI_INDIC_BOX 6 +#define wxSCI_INDIC_ROUNDBOX 7 +#define wxSCI_INDIC0_MASK 0x20 +#define wxSCI_INDIC1_MASK 0x40 +#define wxSCI_INDIC2_MASK 0x80 +#define wxSCI_INDICS_MASK 0xE0 + +// PrintColourMode - use same colours as screen. +#define wxSCI_PRINT_NORMAL 0 + +// PrintColourMode - invert the light value of each style for printing. +#define wxSCI_PRINT_INVERTLIGHT 1 + +// PrintColourMode - force black text on white background for printing. +#define wxSCI_PRINT_BLACKONWHITE 2 + +// PrintColourMode - text stays coloured, but all background is forced to be white for printing. +#define wxSCI_PRINT_COLOURONWHITE 3 + +// PrintColourMode - only the default-background is forced to be white for printing. +#define wxSCI_PRINT_COLOURONWHITEDEFAULTBG 4 +#define wxSCI_FIND_WHOLEWORD 2 +#define wxSCI_FIND_MATCHCASE 4 +#define wxSCI_FIND_WORDSTART 0x00100000 +#define wxSCI_FIND_REGEXP 0x00200000 +#define wxSCI_FIND_POSIX 0x00400000 +#define wxSCI_FOLDLEVELBASE 0x400 +#define wxSCI_FOLDLEVELWHITEFLAG 0x1000 +#define wxSCI_FOLDLEVELHEADERFLAG 0x2000 +#define wxSCI_FOLDLEVELBOXHEADERFLAG 0x4000 +#define wxSCI_FOLDLEVELBOXFOOTERFLAG 0x8000 +#define wxSCI_FOLDLEVELCONTRACTED 0x10000 +#define wxSCI_FOLDLEVELUNINDENT 0x20000 +#define wxSCI_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSCI_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define wxSCI_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define wxSCI_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define wxSCI_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define wxSCI_FOLDFLAG_LEVELNUMBERS 0x0040 +#define wxSCI_FOLDFLAG_BOX 0x0001 +#define wxSCI_TIME_FOREVER 10000000 +#define wxSCI_WRAP_NONE 0 +#define wxSCI_WRAP_WORD 1 +#define wxSCI_WRAP_CHAR 2 +#define wxSCI_WRAPVISUALFLAG_NONE 0x0000 +#define wxSCI_WRAPVISUALFLAG_END 0x0001 +#define wxSCI_WRAPVISUALFLAG_START 0x0002 +#define wxSCI_WRAPVISUALFLAGLOC_DEFAULT 0x0000 +#define wxSCI_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 +#define wxSCI_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 +#define wxSCI_CACHE_NONE 0 +#define wxSCI_CACHE_CARET 1 +#define wxSCI_CACHE_PAGE 2 +#define wxSCI_CACHE_DOCUMENT 3 +#define wxSCI_EDGE_NONE 0 +#define wxSCI_EDGE_LINE 1 +#define wxSCI_EDGE_BACKGROUND 2 +#define wxSCI_CURSORNORMAL -1 +#define wxSCI_CURSORWAIT 4 + +// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. +#define wxSCI_VISIBLE_SLOP 0x01 +#define wxSCI_VISIBLE_STRICT 0x04 + +// Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. +// If CARET_SLOP is set, we can define a slop value: caretSlop. +// This value defines an unwanted zone (UZ) where the caret is... unwanted. +// This zone is defined as a number of pixels near the vertical margins, +// and as a number of lines near the horizontal margins. +// By keeping the caret away from the edges, it is seen within its context, +// so it is likely that the identifier that the caret is on can be completely seen, +// and that the current line is seen with some of the lines following it which are +// often dependent on that line. +#define wxSCI_CARET_SLOP 0x01 + +// If CARET_STRICT is set, the policy is enforced... strictly. +// The caret is centred on the display if slop is not set, +// and cannot go in the UZ if slop is set. +#define wxSCI_CARET_STRICT 0x04 + +// If CARET_JUMPS is set, the display is moved more energetically +// so the caret can move in the same direction longer before the policy is applied again. +#define wxSCI_CARET_JUMPS 0x10 + +// If CARET_EVEN is not set, instead of having symmetrical UZs, +// the left and bottom UZs are extended up to right and top UZs respectively. +// This way, we favour the displaying of useful information: the begining of lines, +// where most code reside, and the lines after the caret, eg. the body of a function. +#define wxSCI_CARET_EVEN 0x08 + +// Selection modes +#define wxSCI_SEL_STREAM 0 +#define wxSCI_SEL_RECTANGLE 1 +#define wxSCI_SEL_LINES 2 + +// Maximum value of keywordSet parameter of SetKeyWords. +#define wxSCI_KEYWORDSET_MAX 8 + +// Notifications +// Type of modification and the action which caused the modification. +// These are defined as a bit mask to make it easy to specify which notifications are wanted. +// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +#define wxSCI_MOD_INSERTTEXT 0x1 +#define wxSCI_MOD_DELETETEXT 0x2 +#define wxSCI_MOD_CHANGESTYLE 0x4 +#define wxSCI_MOD_CHANGEFOLD 0x8 +#define wxSCI_PERFORMED_USER 0x10 +#define wxSCI_PERFORMED_UNDO 0x20 +#define wxSCI_PERFORMED_REDO 0x40 +#define wxSCI_MULTISTEPUNDOREDO 0x80 +#define wxSCI_LASTSTEPINUNDOREDO 0x100 +#define wxSCI_MOD_CHANGEMARKER 0x200 +#define wxSCI_MOD_BEFOREINSERT 0x400 +#define wxSCI_MOD_BEFOREDELETE 0x800 +#define wxSCI_MULTILINEUNDOREDO 0x1000 +#define wxSCI_MODEVENTMASKALL 0x1FFF + +// Symbolic key codes and modifier flags. +// ASCII and other printable characters below 256. +// Extended keys above 300. +#define wxSCI_KEY_DOWN 300 +#define wxSCI_KEY_UP 301 +#define wxSCI_KEY_LEFT 302 +#define wxSCI_KEY_RIGHT 303 +#define wxSCI_KEY_HOME 304 +#define wxSCI_KEY_END 305 +#define wxSCI_KEY_PRIOR 306 +#define wxSCI_KEY_NEXT 307 +#define wxSCI_KEY_DELETE 308 +#define wxSCI_KEY_INSERT 309 +#define wxSCI_KEY_ESCAPE 7 +#define wxSCI_KEY_BACK 8 +#define wxSCI_KEY_TAB 9 +#define wxSCI_KEY_RETURN 13 +#define wxSCI_KEY_ADD 310 +#define wxSCI_KEY_SUBTRACT 311 +#define wxSCI_KEY_DIVIDE 312 +#define wxSCI_SCMOD_NULL 0 +#define wxSCI_SCMOD_SHIFT 1 +#define wxSCI_SCMOD_CTRL 2 +#define wxSCI_SCMOD_ALT 4 + +// Caret line alpha background +#define wxSCI_ALPHA_TRANSPARENT 0 +#define wxSCI_ALPHA_OPAQUE 255 +#define wxSCI_ALPHA_NOALPHA 256 + +// For SciLexer.h +#define wxSCI_LEX_CONTAINER 0 +#define wxSCI_LEX_NULL 1 +#define wxSCI_LEX_PYTHON 2 +#define wxSCI_LEX_CPP 3 +#define wxSCI_LEX_HTML 4 +#define wxSCI_LEX_XML 5 +#define wxSCI_LEX_PERL 6 +#define wxSCI_LEX_SQL 7 +#define wxSCI_LEX_VB 8 +#define wxSCI_LEX_PROPERTIES 9 +#define wxSCI_LEX_ERRORLIST 10 +#define wxSCI_LEX_MAKEFILE 11 +#define wxSCI_LEX_BATCH 12 +#define wxSCI_LEX_XCODE 13 +#define wxSCI_LEX_LATEX 14 +#define wxSCI_LEX_LUA 15 +#define wxSCI_LEX_DIFF 16 +#define wxSCI_LEX_CONF 17 +#define wxSCI_LEX_PASCAL 18 +#define wxSCI_LEX_AVE 19 +#define wxSCI_LEX_ADA 20 +#define wxSCI_LEX_LISP 21 +#define wxSCI_LEX_RUBY 22 +#define wxSCI_LEX_EIFFEL 23 +#define wxSCI_LEX_EIFFELKW 24 +#define wxSCI_LEX_TCL 25 +#define wxSCI_LEX_NNCRONTAB 26 +#define wxSCI_LEX_BULLANT 27 +#define wxSCI_LEX_VBSCRIPT 28 +#define wxSCI_LEX_BAAN 31 +#define wxSCI_LEX_MATLAB 32 +#define wxSCI_LEX_SCRIPTOL 33 +#define wxSCI_LEX_ASM 34 +#define wxSCI_LEX_CPPNOCASE 35 +#define wxSCI_LEX_FORTRAN 36 +#define wxSCI_LEX_F77 37 +#define wxSCI_LEX_CSS 38 +#define wxSCI_LEX_POV 39 +#define wxSCI_LEX_LOUT 40 +#define wxSCI_LEX_ESCRIPT 41 +#define wxSCI_LEX_PS 42 +#define wxSCI_LEX_NSIS 43 +#define wxSCI_LEX_MMIXAL 44 +#define wxSCI_LEX_CLW 45 +#define wxSCI_LEX_CLWNOCASE 46 +#define wxSCI_LEX_LOT 47 +#define wxSCI_LEX_YAML 48 +#define wxSCI_LEX_TEX 49 +#define wxSCI_LEX_METAPOST 50 +#define wxSCI_LEX_POWERBASIC 51 +#define wxSCI_LEX_FORTH 52 +#define wxSCI_LEX_ERLANG 53 +#define wxSCI_LEX_OCTAVE 54 +#define wxSCI_LEX_MSSQL 55 +#define wxSCI_LEX_VERILOG 56 +#define wxSCI_LEX_KIX 57 +#define wxSCI_LEX_GUI4CLI 58 +#define wxSCI_LEX_SPECMAN 59 +#define wxSCI_LEX_AU3 60 +#define wxSCI_LEX_APDL 61 +#define wxSCI_LEX_BASH 62 +#define wxSCI_LEX_ASN1 63 +#define wxSCI_LEX_VHDL 64 +#define wxSCI_LEX_CAML 65 +#define wxSCI_LEX_BLITZBASIC 66 +#define wxSCI_LEX_PUREBASIC 67 +#define wxSCI_LEX_HASKELL 68 +#define wxSCI_LEX_PHPSCRIPT 69 +#define wxSCI_LEX_TADS3 70 +#define wxSCI_LEX_REBOL 71 +#define wxSCI_LEX_SMALLTALK 72 +#define wxSCI_LEX_FLAGSHIP 73 +#define wxSCI_LEX_CSOUND 74 +#define wxSCI_LEX_FREEBASIC 75 +#define wxSCI_LEX_INNOSETUP 76 +#define wxSCI_LEX_OPAL 77 +#define wxSCI_LEX_SPICE 78 + +// When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +// value assigned in sequence from SCLEX_AUTOMATIC+1. +#define wxSCI_LEX_AUTOMATIC 1000 + +// Lexical states for SCLEX_PYTHON +#define wxSCI_P_DEFAULT 0 +#define wxSCI_P_COMMENTLINE 1 +#define wxSCI_P_NUMBER 2 +#define wxSCI_P_STRING 3 +#define wxSCI_P_CHARACTER 4 +#define wxSCI_P_WORD 5 +#define wxSCI_P_TRIPLE 6 +#define wxSCI_P_TRIPLEDOUBLE 7 +#define wxSCI_P_CLASSNAME 8 +#define wxSCI_P_DEFNAME 9 +#define wxSCI_P_OPERATOR 10 +#define wxSCI_P_IDENTIFIER 11 +#define wxSCI_P_COMMENTBLOCK 12 +#define wxSCI_P_STRINGEOL 13 +#define wxSCI_P_WORD2 14 +#define wxSCI_P_DECORATOR 15 + +// Lexical states for SCLEX_CPP +#define wxSCI_C_DEFAULT 0 +#define wxSCI_C_COMMENT 1 +#define wxSCI_C_COMMENTLINE 2 +#define wxSCI_C_COMMENTDOC 3 +#define wxSCI_C_NUMBER 4 +#define wxSCI_C_WORD 5 +#define wxSCI_C_STRING 6 +#define wxSCI_C_CHARACTER 7 +#define wxSCI_C_UUID 8 +#define wxSCI_C_PREPROCESSOR 9 +#define wxSCI_C_OPERATOR 10 +#define wxSCI_C_IDENTIFIER 11 +#define wxSCI_C_STRINGEOL 12 +#define wxSCI_C_VERBATIM 13 +#define wxSCI_C_REGEX 14 +#define wxSCI_C_COMMENTLINEDOC 15 +#define wxSCI_C_WORD2 16 +#define wxSCI_C_COMMENTDOCKEYWORD 17 +#define wxSCI_C_COMMENTDOCKEYWORDERROR 18 +#define wxSCI_C_GLOBALCLASS 19 + +// Lexical states for SCLEX_TCL +#define wxSCI_TCL_DEFAULT 0 +#define wxSCI_TCL_COMMENT 1 +#define wxSCI_TCL_COMMENTLINE 2 +#define wxSCI_TCL_NUMBER 3 +#define wxSCI_TCL_WORD_IN_QUOTE 4 +#define wxSCI_TCL_IN_QUOTE 5 +#define wxSCI_TCL_OPERATOR 6 +#define wxSCI_TCL_IDENTIFIER 7 +#define wxSCI_TCL_SUBSTITUTION 8 +#define wxSCI_TCL_SUB_BRACE 9 +#define wxSCI_TCL_MODIFIER 10 +#define wxSCI_TCL_EXPAND 11 +#define wxSCI_TCL_WORD 12 +#define wxSCI_TCL_WORD2 13 +#define wxSCI_TCL_WORD3 14 +#define wxSCI_TCL_WORD4 15 +#define wxSCI_TCL_WORD5 16 +#define wxSCI_TCL_WORD6 17 +#define wxSCI_TCL_WORD7 18 +#define wxSCI_TCL_WORD8 19 +#define wxSCI_TCL_COMMENT_BOX 20 +#define wxSCI_TCL_BLOCK_COMMENT 21 + +// Lexical states for SCLEX_HTML, SCLEX_XML +#define wxSCI_H_DEFAULT 0 +#define wxSCI_H_TAG 1 +#define wxSCI_H_TAGUNKNOWN 2 +#define wxSCI_H_ATTRIBUTE 3 +#define wxSCI_H_ATTRIBUTEUNKNOWN 4 +#define wxSCI_H_NUMBER 5 +#define wxSCI_H_DOUBLESTRING 6 +#define wxSCI_H_SINGLESTRING 7 +#define wxSCI_H_OTHER 8 +#define wxSCI_H_COMMENT 9 +#define wxSCI_H_ENTITY 10 + +// XML and ASP +#define wxSCI_H_TAGEND 11 +#define wxSCI_H_XMLSTART 12 +#define wxSCI_H_XMLEND 13 +#define wxSCI_H_SCRIPT 14 +#define wxSCI_H_ASP 15 +#define wxSCI_H_ASPAT 16 +#define wxSCI_H_CDATA 17 +#define wxSCI_H_QUESTION 18 + +// More HTML +#define wxSCI_H_VALUE 19 + +// X-Code +#define wxSCI_H_XCCOMMENT 20 + +// SGML +#define wxSCI_H_SGML_DEFAULT 21 +#define wxSCI_H_SGML_COMMAND 22 +#define wxSCI_H_SGML_1ST_PARAM 23 +#define wxSCI_H_SGML_DOUBLESTRING 24 +#define wxSCI_H_SGML_SIMPLESTRING 25 +#define wxSCI_H_SGML_ERROR 26 +#define wxSCI_H_SGML_SPECIAL 27 +#define wxSCI_H_SGML_ENTITY 28 +#define wxSCI_H_SGML_COMMENT 29 +#define wxSCI_H_SGML_1ST_PARAM_COMMENT 30 +#define wxSCI_H_SGML_BLOCK_DEFAULT 31 + +// Embedded Javascript +#define wxSCI_HJ_START 40 +#define wxSCI_HJ_DEFAULT 41 +#define wxSCI_HJ_COMMENT 42 +#define wxSCI_HJ_COMMENTLINE 43 +#define wxSCI_HJ_COMMENTDOC 44 +#define wxSCI_HJ_NUMBER 45 +#define wxSCI_HJ_WORD 46 +#define wxSCI_HJ_KEYWORD 47 +#define wxSCI_HJ_DOUBLESTRING 48 +#define wxSCI_HJ_SINGLESTRING 49 +#define wxSCI_HJ_SYMBOLS 50 +#define wxSCI_HJ_STRINGEOL 51 +#define wxSCI_HJ_REGEX 52 + +// ASP Javascript +#define wxSCI_HJA_START 55 +#define wxSCI_HJA_DEFAULT 56 +#define wxSCI_HJA_COMMENT 57 +#define wxSCI_HJA_COMMENTLINE 58 +#define wxSCI_HJA_COMMENTDOC 59 +#define wxSCI_HJA_NUMBER 60 +#define wxSCI_HJA_WORD 61 +#define wxSCI_HJA_KEYWORD 62 +#define wxSCI_HJA_DOUBLESTRING 63 +#define wxSCI_HJA_SINGLESTRING 64 +#define wxSCI_HJA_SYMBOLS 65 +#define wxSCI_HJA_STRINGEOL 66 +#define wxSCI_HJA_REGEX 67 + +// Embedded VBScript +#define wxSCI_HB_START 70 +#define wxSCI_HB_DEFAULT 71 +#define wxSCI_HB_COMMENTLINE 72 +#define wxSCI_HB_NUMBER 73 +#define wxSCI_HB_WORD 74 +#define wxSCI_HB_STRING 75 +#define wxSCI_HB_IDENTIFIER 76 +#define wxSCI_HB_STRINGEOL 77 + +// ASP VBScript +#define wxSCI_HBA_START 80 +#define wxSCI_HBA_DEFAULT 81 +#define wxSCI_HBA_COMMENTLINE 82 +#define wxSCI_HBA_NUMBER 83 +#define wxSCI_HBA_WORD 84 +#define wxSCI_HBA_STRING 85 +#define wxSCI_HBA_IDENTIFIER 86 +#define wxSCI_HBA_STRINGEOL 87 + +// Embedded Python +#define wxSCI_HP_START 90 +#define wxSCI_HP_DEFAULT 91 +#define wxSCI_HP_COMMENTLINE 92 +#define wxSCI_HP_NUMBER 93 +#define wxSCI_HP_STRING 94 +#define wxSCI_HP_CHARACTER 95 +#define wxSCI_HP_WORD 96 +#define wxSCI_HP_TRIPLE 97 +#define wxSCI_HP_TRIPLEDOUBLE 98 +#define wxSCI_HP_CLASSNAME 99 +#define wxSCI_HP_DEFNAME 100 +#define wxSCI_HP_OPERATOR 101 +#define wxSCI_HP_IDENTIFIER 102 + +// PHP +#define wxSCI_HPHP_COMPLEX_VARIABLE 104 + +// ASP Python +#define wxSCI_HPA_START 105 +#define wxSCI_HPA_DEFAULT 106 +#define wxSCI_HPA_COMMENTLINE 107 +#define wxSCI_HPA_NUMBER 108 +#define wxSCI_HPA_STRING 109 +#define wxSCI_HPA_CHARACTER 110 +#define wxSCI_HPA_WORD 111 +#define wxSCI_HPA_TRIPLE 112 +#define wxSCI_HPA_TRIPLEDOUBLE 113 +#define wxSCI_HPA_CLASSNAME 114 +#define wxSCI_HPA_DEFNAME 115 +#define wxSCI_HPA_OPERATOR 116 +#define wxSCI_HPA_IDENTIFIER 117 + +// PHP +#define wxSCI_HPHP_DEFAULT 118 +#define wxSCI_HPHP_HSTRING 119 +#define wxSCI_HPHP_SIMPLESTRING 120 +#define wxSCI_HPHP_WORD 121 +#define wxSCI_HPHP_NUMBER 122 +#define wxSCI_HPHP_VARIABLE 123 +#define wxSCI_HPHP_COMMENT 124 +#define wxSCI_HPHP_COMMENTLINE 125 +#define wxSCI_HPHP_HSTRING_VARIABLE 126 +#define wxSCI_HPHP_OPERATOR 127 + +// Lexical states for SCLEX_PERL +#define wxSCI_PL_DEFAULT 0 +#define wxSCI_PL_ERROR 1 +#define wxSCI_PL_COMMENTLINE 2 +#define wxSCI_PL_POD 3 +#define wxSCI_PL_NUMBER 4 +#define wxSCI_PL_WORD 5 +#define wxSCI_PL_STRING 6 +#define wxSCI_PL_CHARACTER 7 +#define wxSCI_PL_PUNCTUATION 8 +#define wxSCI_PL_PREPROCESSOR 9 +#define wxSCI_PL_OPERATOR 10 +#define wxSCI_PL_IDENTIFIER 11 +#define wxSCI_PL_SCALAR 12 +#define wxSCI_PL_ARRAY 13 +#define wxSCI_PL_HASH 14 +#define wxSCI_PL_SYMBOLTABLE 15 +#define wxSCI_PL_VARIABLE_INDEXER 16 +#define wxSCI_PL_REGEX 17 +#define wxSCI_PL_REGSUBST 18 +#define wxSCI_PL_LONGQUOTE 19 +#define wxSCI_PL_BACKTICKS 20 +#define wxSCI_PL_DATASECTION 21 +#define wxSCI_PL_HERE_DELIM 22 +#define wxSCI_PL_HERE_Q 23 +#define wxSCI_PL_HERE_QQ 24 +#define wxSCI_PL_HERE_QX 25 +#define wxSCI_PL_STRING_Q 26 +#define wxSCI_PL_STRING_QQ 27 +#define wxSCI_PL_STRING_QX 28 +#define wxSCI_PL_STRING_QR 29 +#define wxSCI_PL_STRING_QW 30 +#define wxSCI_PL_POD_VERB 31 + +// Lexical states for SCLEX_RUBY +#define wxSCI_RB_DEFAULT 0 +#define wxSCI_RB_ERROR 1 +#define wxSCI_RB_COMMENTLINE 2 +#define wxSCI_RB_POD 3 +#define wxSCI_RB_NUMBER 4 +#define wxSCI_RB_WORD 5 +#define wxSCI_RB_STRING 6 +#define wxSCI_RB_CHARACTER 7 +#define wxSCI_RB_CLASSNAME 8 +#define wxSCI_RB_DEFNAME 9 +#define wxSCI_RB_OPERATOR 10 +#define wxSCI_RB_IDENTIFIER 11 +#define wxSCI_RB_REGEX 12 +#define wxSCI_RB_GLOBAL 13 +#define wxSCI_RB_SYMBOL 14 +#define wxSCI_RB_MODULE_NAME 15 +#define wxSCI_RB_INSTANCE_VAR 16 +#define wxSCI_RB_CLASS_VAR 17 +#define wxSCI_RB_BACKTICKS 18 +#define wxSCI_RB_DATASECTION 19 +#define wxSCI_RB_HERE_DELIM 20 +#define wxSCI_RB_HERE_Q 21 +#define wxSCI_RB_HERE_QQ 22 +#define wxSCI_RB_HERE_QX 23 +#define wxSCI_RB_STRING_Q 24 +#define wxSCI_RB_STRING_QQ 25 +#define wxSCI_RB_STRING_QX 26 +#define wxSCI_RB_STRING_QR 27 +#define wxSCI_RB_STRING_QW 28 +#define wxSCI_RB_WORD_DEMOTED 29 +#define wxSCI_RB_STDIN 30 +#define wxSCI_RB_STDOUT 31 +#define wxSCI_RB_STDERR 40 +#define wxSCI_RB_UPPER_BOUND 41 + +// Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC +#define wxSCI_B_DEFAULT 0 +#define wxSCI_B_COMMENT 1 +#define wxSCI_B_NUMBER 2 +#define wxSCI_B_KEYWORD 3 +#define wxSCI_B_STRING 4 +#define wxSCI_B_PREPROCESSOR 5 +#define wxSCI_B_OPERATOR 6 +#define wxSCI_B_IDENTIFIER 7 +#define wxSCI_B_DATE 8 +#define wxSCI_B_STRINGEOL 9 +#define wxSCI_B_KEYWORD2 10 +#define wxSCI_B_KEYWORD3 11 +#define wxSCI_B_KEYWORD4 12 +#define wxSCI_B_CONSTANT 13 +#define wxSCI_B_ASM 14 +#define wxSCI_B_LABEL 15 +#define wxSCI_B_ERROR 16 +#define wxSCI_B_HEXNUMBER 17 +#define wxSCI_B_BINNUMBER 18 + +// Lexical states for SCLEX_PROPERTIES +#define wxSCI_PROPS_DEFAULT 0 +#define wxSCI_PROPS_COMMENT 1 +#define wxSCI_PROPS_SECTION 2 +#define wxSCI_PROPS_ASSIGNMENT 3 +#define wxSCI_PROPS_DEFVAL 4 +#define wxSCI_PROPS_KEY 5 + +// Lexical states for SCLEX_LATEX +#define wxSCI_L_DEFAULT 0 +#define wxSCI_L_COMMAND 1 +#define wxSCI_L_TAG 2 +#define wxSCI_L_MATH 3 +#define wxSCI_L_COMMENT 4 + +// Lexical states for SCLEX_LUA +#define wxSCI_LUA_DEFAULT 0 +#define wxSCI_LUA_COMMENT 1 +#define wxSCI_LUA_COMMENTLINE 2 +#define wxSCI_LUA_COMMENTDOC 3 +#define wxSCI_LUA_NUMBER 4 +#define wxSCI_LUA_WORD 5 +#define wxSCI_LUA_STRING 6 +#define wxSCI_LUA_CHARACTER 7 +#define wxSCI_LUA_LITERALSTRING 8 +#define wxSCI_LUA_PREPROCESSOR 9 +#define wxSCI_LUA_OPERATOR 10 +#define wxSCI_LUA_IDENTIFIER 11 +#define wxSCI_LUA_STRINGEOL 12 +#define wxSCI_LUA_WORD2 13 +#define wxSCI_LUA_WORD3 14 +#define wxSCI_LUA_WORD4 15 +#define wxSCI_LUA_WORD5 16 +#define wxSCI_LUA_WORD6 17 +#define wxSCI_LUA_WORD7 18 +#define wxSCI_LUA_WORD8 19 + +// Lexical states for SCLEX_ERRORLIST +#define wxSCI_ERR_DEFAULT 0 +#define wxSCI_ERR_PYTHON 1 +#define wxSCI_ERR_GCC 2 +#define wxSCI_ERR_MS 3 +#define wxSCI_ERR_CMD 4 +#define wxSCI_ERR_BORLAND 5 +#define wxSCI_ERR_PERL 6 +#define wxSCI_ERR_NET 7 +#define wxSCI_ERR_LUA 8 +#define wxSCI_ERR_CTAG 9 +#define wxSCI_ERR_DIFF_CHANGED 10 +#define wxSCI_ERR_DIFF_ADDITION 11 +#define wxSCI_ERR_DIFF_DELETION 12 +#define wxSCI_ERR_DIFF_MESSAGE 13 +#define wxSCI_ERR_PHP 14 +#define wxSCI_ERR_ELF 15 +#define wxSCI_ERR_IFC 16 +#define wxSCI_ERR_IFORT 17 +#define wxSCI_ERR_ABSF 18 +#define wxSCI_ERR_TIDY 19 +#define wxSCI_ERR_JAVA_STACK 20 + +// Lexical states for SCLEX_BATCH +#define wxSCI_BAT_DEFAULT 0 +#define wxSCI_BAT_COMMENT 1 +#define wxSCI_BAT_WORD 2 +#define wxSCI_BAT_LABEL 3 +#define wxSCI_BAT_HIDE 4 +#define wxSCI_BAT_COMMAND 5 +#define wxSCI_BAT_IDENTIFIER 6 +#define wxSCI_BAT_OPERATOR 7 + +// Lexical states for SCLEX_MAKEFILE +#define wxSCI_MAKE_DEFAULT 0 +#define wxSCI_MAKE_COMMENT 1 +#define wxSCI_MAKE_PREPROCESSOR 2 +#define wxSCI_MAKE_IDENTIFIER 3 +#define wxSCI_MAKE_OPERATOR 4 +#define wxSCI_MAKE_TARGET 5 +#define wxSCI_MAKE_IDEOL 9 + +// Lexical states for SCLEX_DIFF +#define wxSCI_DIFF_DEFAULT 0 +#define wxSCI_DIFF_COMMENT 1 +#define wxSCI_DIFF_COMMAND 2 +#define wxSCI_DIFF_HEADER 3 +#define wxSCI_DIFF_POSITION 4 +#define wxSCI_DIFF_DELETED 5 +#define wxSCI_DIFF_ADDED 6 + +// Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +#define wxSCI_CONF_DEFAULT 0 +#define wxSCI_CONF_COMMENT 1 +#define wxSCI_CONF_NUMBER 2 +#define wxSCI_CONF_IDENTIFIER 3 +#define wxSCI_CONF_EXTENSION 4 +#define wxSCI_CONF_PARAMETER 5 +#define wxSCI_CONF_STRING 6 +#define wxSCI_CONF_OPERATOR 7 +#define wxSCI_CONF_IP 8 +#define wxSCI_CONF_DIRECTIVE 9 + +// Lexical states for SCLEX_AVE, Avenue +#define wxSCI_AVE_DEFAULT 0 +#define wxSCI_AVE_COMMENT 1 +#define wxSCI_AVE_NUMBER 2 +#define wxSCI_AVE_WORD 3 +#define wxSCI_AVE_STRING 6 +#define wxSCI_AVE_ENUM 7 +#define wxSCI_AVE_STRINGEOL 8 +#define wxSCI_AVE_IDENTIFIER 9 +#define wxSCI_AVE_OPERATOR 10 +#define wxSCI_AVE_WORD1 11 +#define wxSCI_AVE_WORD2 12 +#define wxSCI_AVE_WORD3 13 +#define wxSCI_AVE_WORD4 14 +#define wxSCI_AVE_WORD5 15 +#define wxSCI_AVE_WORD6 16 + +// Lexical states for SCLEX_ADA +#define wxSCI_ADA_DEFAULT 0 +#define wxSCI_ADA_WORD 1 +#define wxSCI_ADA_IDENTIFIER 2 +#define wxSCI_ADA_NUMBER 3 +#define wxSCI_ADA_DELIMITER 4 +#define wxSCI_ADA_CHARACTER 5 +#define wxSCI_ADA_CHARACTEREOL 6 +#define wxSCI_ADA_STRING 7 +#define wxSCI_ADA_STRINGEOL 8 +#define wxSCI_ADA_LABEL 9 +#define wxSCI_ADA_COMMENTLINE 10 +#define wxSCI_ADA_ILLEGAL 11 + +// Lexical states for SCLEX_BAAN +#define wxSCI_BAAN_DEFAULT 0 +#define wxSCI_BAAN_COMMENT 1 +#define wxSCI_BAAN_COMMENTDOC 2 +#define wxSCI_BAAN_NUMBER 3 +#define wxSCI_BAAN_WORD 4 +#define wxSCI_BAAN_STRING 5 +#define wxSCI_BAAN_PREPROCESSOR 6 +#define wxSCI_BAAN_OPERATOR 7 +#define wxSCI_BAAN_IDENTIFIER 8 +#define wxSCI_BAAN_STRINGEOL 9 +#define wxSCI_BAAN_WORD2 10 + +// Lexical states for SCLEX_LISP +#define wxSCI_LISP_DEFAULT 0 +#define wxSCI_LISP_COMMENT 1 +#define wxSCI_LISP_NUMBER 2 +#define wxSCI_LISP_KEYWORD 3 +#define wxSCI_LISP_KEYWORD_KW 4 +#define wxSCI_LISP_SYMBOL 5 +#define wxSCI_LISP_STRING 6 +#define wxSCI_LISP_STRINGEOL 8 +#define wxSCI_LISP_IDENTIFIER 9 +#define wxSCI_LISP_OPERATOR 10 +#define wxSCI_LISP_SPECIAL 11 +#define wxSCI_LISP_MULTI_COMMENT 12 + +// Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +#define wxSCI_EIFFEL_DEFAULT 0 +#define wxSCI_EIFFEL_COMMENTLINE 1 +#define wxSCI_EIFFEL_NUMBER 2 +#define wxSCI_EIFFEL_WORD 3 +#define wxSCI_EIFFEL_STRING 4 +#define wxSCI_EIFFEL_CHARACTER 5 +#define wxSCI_EIFFEL_OPERATOR 6 +#define wxSCI_EIFFEL_IDENTIFIER 7 +#define wxSCI_EIFFEL_STRINGEOL 8 + +// Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +#define wxSCI_NNCRONTAB_DEFAULT 0 +#define wxSCI_NNCRONTAB_COMMENT 1 +#define wxSCI_NNCRONTAB_TASK 2 +#define wxSCI_NNCRONTAB_SECTION 3 +#define wxSCI_NNCRONTAB_KEYWORD 4 +#define wxSCI_NNCRONTAB_MODIFIER 5 +#define wxSCI_NNCRONTAB_ASTERISK 6 +#define wxSCI_NNCRONTAB_NUMBER 7 +#define wxSCI_NNCRONTAB_STRING 8 +#define wxSCI_NNCRONTAB_ENVIRONMENT 9 +#define wxSCI_NNCRONTAB_IDENTIFIER 10 + +// Lexical states for SCLEX_FORTH (Forth Lexer) +#define wxSCI_FORTH_DEFAULT 0 +#define wxSCI_FORTH_COMMENT 1 +#define wxSCI_FORTH_COMMENT_ML 2 +#define wxSCI_FORTH_IDENTIFIER 3 +#define wxSCI_FORTH_CONTROL 4 +#define wxSCI_FORTH_KEYWORD 5 +#define wxSCI_FORTH_DEFWORD 6 +#define wxSCI_FORTH_PREWORD1 7 +#define wxSCI_FORTH_PREWORD2 8 +#define wxSCI_FORTH_NUMBER 9 +#define wxSCI_FORTH_STRING 10 +#define wxSCI_FORTH_LOCALE 11 + +// Lexical states for SCLEX_MATLAB +#define wxSCI_MATLAB_DEFAULT 0 +#define wxSCI_MATLAB_COMMENT 1 +#define wxSCI_MATLAB_COMMAND 2 +#define wxSCI_MATLAB_NUMBER 3 +#define wxSCI_MATLAB_KEYWORD 4 + +// single quoted string +#define wxSCI_MATLAB_STRING 5 +#define wxSCI_MATLAB_OPERATOR 6 +#define wxSCI_MATLAB_IDENTIFIER 7 +#define wxSCI_MATLAB_DOUBLEQUOTESTRING 8 + +// Lexical states for SCLEX_SCRIPTOL +#define wxSCI_SCRIPTOL_DEFAULT 0 +#define wxSCI_SCRIPTOL_WHITE 1 +#define wxSCI_SCRIPTOL_COMMENTLINE 2 +#define wxSCI_SCRIPTOL_PERSISTENT 3 +#define wxSCI_SCRIPTOL_CSTYLE 4 +#define wxSCI_SCRIPTOL_COMMENTBLOCK 5 +#define wxSCI_SCRIPTOL_NUMBER 6 +#define wxSCI_SCRIPTOL_STRING 7 +#define wxSCI_SCRIPTOL_CHARACTER 8 +#define wxSCI_SCRIPTOL_STRINGEOL 9 +#define wxSCI_SCRIPTOL_KEYWORD 10 +#define wxSCI_SCRIPTOL_OPERATOR 11 +#define wxSCI_SCRIPTOL_IDENTIFIER 12 +#define wxSCI_SCRIPTOL_TRIPLE 13 +#define wxSCI_SCRIPTOL_CLASSNAME 14 +#define wxSCI_SCRIPTOL_PREPROCESSOR 15 + +// Lexical states for SCLEX_ASM +#define wxSCI_ASM_DEFAULT 0 +#define wxSCI_ASM_COMMENT 1 +#define wxSCI_ASM_NUMBER 2 +#define wxSCI_ASM_STRING 3 +#define wxSCI_ASM_OPERATOR 4 +#define wxSCI_ASM_IDENTIFIER 5 +#define wxSCI_ASM_CPUINSTRUCTION 6 +#define wxSCI_ASM_MATHINSTRUCTION 7 +#define wxSCI_ASM_REGISTER 8 +#define wxSCI_ASM_DIRECTIVE 9 +#define wxSCI_ASM_DIRECTIVEOPERAND 10 +#define wxSCI_ASM_COMMENTBLOCK 11 +#define wxSCI_ASM_CHARACTER 12 +#define wxSCI_ASM_STRINGEOL 13 +#define wxSCI_ASM_EXTINSTRUCTION 14 + +// Lexical states for SCLEX_FORTRAN +#define wxSCI_F_DEFAULT 0 +#define wxSCI_F_COMMENT 1 +#define wxSCI_F_NUMBER 2 +#define wxSCI_F_STRING1 3 +#define wxSCI_F_STRING2 4 +#define wxSCI_F_STRINGEOL 5 +#define wxSCI_F_OPERATOR 6 +#define wxSCI_F_IDENTIFIER 7 +#define wxSCI_F_WORD 8 +#define wxSCI_F_WORD2 9 +#define wxSCI_F_WORD3 10 +#define wxSCI_F_PREPROCESSOR 11 +#define wxSCI_F_OPERATOR2 12 +#define wxSCI_F_LABEL 13 +#define wxSCI_F_CONTINUATION 14 + +// Lexical states for SCLEX_CSS +#define wxSCI_CSS_DEFAULT 0 +#define wxSCI_CSS_TAG 1 +#define wxSCI_CSS_CLASS 2 +#define wxSCI_CSS_PSEUDOCLASS 3 +#define wxSCI_CSS_UNKNOWN_PSEUDOCLASS 4 +#define wxSCI_CSS_OPERATOR 5 +#define wxSCI_CSS_IDENTIFIER 6 +#define wxSCI_CSS_UNKNOWN_IDENTIFIER 7 +#define wxSCI_CSS_VALUE 8 +#define wxSCI_CSS_COMMENT 9 +#define wxSCI_CSS_ID 10 +#define wxSCI_CSS_IMPORTANT 11 +#define wxSCI_CSS_DIRECTIVE 12 +#define wxSCI_CSS_DOUBLESTRING 13 +#define wxSCI_CSS_SINGLESTRING 14 +#define wxSCI_CSS_IDENTIFIER2 15 +#define wxSCI_CSS_ATTRIBUTE 16 + +// Lexical states for SCLEX_POV +#define wxSCI_POV_DEFAULT 0 +#define wxSCI_POV_COMMENT 1 +#define wxSCI_POV_COMMENTLINE 2 +#define wxSCI_POV_NUMBER 3 +#define wxSCI_POV_OPERATOR 4 +#define wxSCI_POV_IDENTIFIER 5 +#define wxSCI_POV_STRING 6 +#define wxSCI_POV_STRINGEOL 7 +#define wxSCI_POV_DIRECTIVE 8 +#define wxSCI_POV_BADDIRECTIVE 9 +#define wxSCI_POV_WORD2 10 +#define wxSCI_POV_WORD3 11 +#define wxSCI_POV_WORD4 12 +#define wxSCI_POV_WORD5 13 +#define wxSCI_POV_WORD6 14 +#define wxSCI_POV_WORD7 15 +#define wxSCI_POV_WORD8 16 + +// Lexical states for SCLEX_LOUT +#define wxSCI_LOUT_DEFAULT 0 +#define wxSCI_LOUT_COMMENT 1 +#define wxSCI_LOUT_NUMBER 2 +#define wxSCI_LOUT_WORD 3 +#define wxSCI_LOUT_WORD2 4 +#define wxSCI_LOUT_WORD3 5 +#define wxSCI_LOUT_WORD4 6 +#define wxSCI_LOUT_STRING 7 +#define wxSCI_LOUT_OPERATOR 8 +#define wxSCI_LOUT_IDENTIFIER 9 +#define wxSCI_LOUT_STRINGEOL 10 + +// Lexical states for SCLEX_ESCRIPT +#define wxSCI_ESCRIPT_DEFAULT 0 +#define wxSCI_ESCRIPT_COMMENT 1 +#define wxSCI_ESCRIPT_COMMENTLINE 2 +#define wxSCI_ESCRIPT_COMMENTDOC 3 +#define wxSCI_ESCRIPT_NUMBER 4 +#define wxSCI_ESCRIPT_WORD 5 +#define wxSCI_ESCRIPT_STRING 6 +#define wxSCI_ESCRIPT_OPERATOR 7 +#define wxSCI_ESCRIPT_IDENTIFIER 8 +#define wxSCI_ESCRIPT_BRACE 9 +#define wxSCI_ESCRIPT_WORD2 10 +#define wxSCI_ESCRIPT_WORD3 11 + +// Lexical states for SCLEX_PS +#define wxSCI_PS_DEFAULT 0 +#define wxSCI_PS_COMMENT 1 +#define wxSCI_PS_DSC_COMMENT 2 +#define wxSCI_PS_DSC_VALUE 3 +#define wxSCI_PS_NUMBER 4 +#define wxSCI_PS_NAME 5 +#define wxSCI_PS_KEYWORD 6 +#define wxSCI_PS_LITERAL 7 +#define wxSCI_PS_IMMEVAL 8 +#define wxSCI_PS_PAREN_ARRAY 9 +#define wxSCI_PS_PAREN_DICT 10 +#define wxSCI_PS_PAREN_PROC 11 +#define wxSCI_PS_TEXT 12 +#define wxSCI_PS_HEXSTRING 13 +#define wxSCI_PS_BASE85STRING 14 +#define wxSCI_PS_BADSTRINGCHAR 15 + +// Lexical states for SCLEX_NSIS +#define wxSCI_NSIS_DEFAULT 0 +#define wxSCI_NSIS_COMMENT 1 +#define wxSCI_NSIS_STRINGDQ 2 +#define wxSCI_NSIS_STRINGLQ 3 +#define wxSCI_NSIS_STRINGRQ 4 +#define wxSCI_NSIS_FUNCTION 5 +#define wxSCI_NSIS_VARIABLE 6 +#define wxSCI_NSIS_LABEL 7 +#define wxSCI_NSIS_USERDEFINED 8 +#define wxSCI_NSIS_SECTIONDEF 9 +#define wxSCI_NSIS_SUBSECTIONDEF 10 +#define wxSCI_NSIS_IFDEFINEDEF 11 +#define wxSCI_NSIS_MACRODEF 12 +#define wxSCI_NSIS_STRINGVAR 13 +#define wxSCI_NSIS_NUMBER 14 +#define wxSCI_NSIS_SECTIONGROUP 15 +#define wxSCI_NSIS_PAGEEX 16 +#define wxSCI_NSIS_FUNCTIONDEF 17 +#define wxSCI_NSIS_COMMENTBOX 18 + +// Lexical states for SCLEX_MMIXAL +#define wxSCI_MMIXAL_LEADWS 0 +#define wxSCI_MMIXAL_COMMENT 1 +#define wxSCI_MMIXAL_LABEL 2 +#define wxSCI_MMIXAL_OPCODE 3 +#define wxSCI_MMIXAL_OPCODE_PRE 4 +#define wxSCI_MMIXAL_OPCODE_VALID 5 +#define wxSCI_MMIXAL_OPCODE_UNKNOWN 6 +#define wxSCI_MMIXAL_OPCODE_POST 7 +#define wxSCI_MMIXAL_OPERANDS 8 +#define wxSCI_MMIXAL_NUMBER 9 +#define wxSCI_MMIXAL_REF 10 +#define wxSCI_MMIXAL_CHAR 11 +#define wxSCI_MMIXAL_STRING 12 +#define wxSCI_MMIXAL_REGISTER 13 +#define wxSCI_MMIXAL_HEX 14 +#define wxSCI_MMIXAL_OPERATOR 15 +#define wxSCI_MMIXAL_SYMBOL 16 +#define wxSCI_MMIXAL_INCLUDE 17 + +// Lexical states for SCLEX_CLW +#define wxSCI_CLW_DEFAULT 0 +#define wxSCI_CLW_LABEL 1 +#define wxSCI_CLW_COMMENT 2 +#define wxSCI_CLW_STRING 3 +#define wxSCI_CLW_USER_IDENTIFIER 4 +#define wxSCI_CLW_INTEGER_CONSTANT 5 +#define wxSCI_CLW_REAL_CONSTANT 6 +#define wxSCI_CLW_PICTURE_STRING 7 +#define wxSCI_CLW_KEYWORD 8 +#define wxSCI_CLW_COMPILER_DIRECTIVE 9 +#define wxSCI_CLW_RUNTIME_EXPRESSIONS 10 +#define wxSCI_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define wxSCI_CLW_STRUCTURE_DATA_TYPE 12 +#define wxSCI_CLW_ATTRIBUTE 13 +#define wxSCI_CLW_STANDARD_EQUATE 14 +#define wxSCI_CLW_ERROR 15 +#define wxSCI_CLW_DEPRECATED 16 + +// Lexical states for SCLEX_LOT +#define wxSCI_LOT_DEFAULT 0 +#define wxSCI_LOT_HEADER 1 +#define wxSCI_LOT_BREAK 2 +#define wxSCI_LOT_SET 3 +#define wxSCI_LOT_PASS 4 +#define wxSCI_LOT_FAIL 5 +#define wxSCI_LOT_ABORT 6 + +// Lexical states for SCLEX_YAML +#define wxSCI_YAML_DEFAULT 0 +#define wxSCI_YAML_COMMENT 1 +#define wxSCI_YAML_IDENTIFIER 2 +#define wxSCI_YAML_KEYWORD 3 +#define wxSCI_YAML_NUMBER 4 +#define wxSCI_YAML_REFERENCE 5 +#define wxSCI_YAML_DOCUMENT 6 +#define wxSCI_YAML_TEXT 7 +#define wxSCI_YAML_ERROR 8 + +// Lexical states for SCLEX_TEX +#define wxSCI_TEX_DEFAULT 0 +#define wxSCI_TEX_SPECIAL 1 +#define wxSCI_TEX_GROUP 2 +#define wxSCI_TEX_SYMBOL 3 +#define wxSCI_TEX_COMMAND 4 +#define wxSCI_TEX_TEXT 5 +#define wxSCI_METAPOST_DEFAULT 0 +#define wxSCI_METAPOST_SPECIAL 1 +#define wxSCI_METAPOST_GROUP 2 +#define wxSCI_METAPOST_SYMBOL 3 +#define wxSCI_METAPOST_COMMAND 4 +#define wxSCI_METAPOST_TEXT 5 +#define wxSCI_METAPOST_EXTRA 6 + +// Lexical states for SCLEX_ERLANG +#define wxSCI_ERLANG_DEFAULT 0 +#define wxSCI_ERLANG_COMMENT 1 +#define wxSCI_ERLANG_VARIABLE 2 +#define wxSCI_ERLANG_NUMBER 3 +#define wxSCI_ERLANG_KEYWORD 4 +#define wxSCI_ERLANG_STRING 5 +#define wxSCI_ERLANG_OPERATOR 6 +#define wxSCI_ERLANG_ATOM 7 +#define wxSCI_ERLANG_FUNCTION_NAME 8 +#define wxSCI_ERLANG_CHARACTER 9 +#define wxSCI_ERLANG_MACRO 10 +#define wxSCI_ERLANG_RECORD 11 +#define wxSCI_ERLANG_SEPARATOR 12 +#define wxSCI_ERLANG_NODE_NAME 13 +#define wxSCI_ERLANG_UNKNOWN 31 + +// Lexical states for SCLEX_OCTAVE are identical to MatLab +// Lexical states for SCLEX_MSSQL +#define wxSCI_MSSQL_DEFAULT 0 +#define wxSCI_MSSQL_COMMENT 1 +#define wxSCI_MSSQL_LINE_COMMENT 2 +#define wxSCI_MSSQL_NUMBER 3 +#define wxSCI_MSSQL_STRING 4 +#define wxSCI_MSSQL_OPERATOR 5 +#define wxSCI_MSSQL_IDENTIFIER 6 +#define wxSCI_MSSQL_VARIABLE 7 +#define wxSCI_MSSQL_COLUMN_NAME 8 +#define wxSCI_MSSQL_STATEMENT 9 +#define wxSCI_MSSQL_DATATYPE 10 +#define wxSCI_MSSQL_SYSTABLE 11 +#define wxSCI_MSSQL_GLOBAL_VARIABLE 12 +#define wxSCI_MSSQL_FUNCTION 13 +#define wxSCI_MSSQL_STORED_PROCEDURE 14 +#define wxSCI_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define wxSCI_MSSQL_COLUMN_NAME_2 16 + +// Lexical states for SCLEX_VERILOG +#define wxSCI_V_DEFAULT 0 +#define wxSCI_V_COMMENT 1 +#define wxSCI_V_COMMENTLINE 2 +#define wxSCI_V_COMMENTLINEBANG 3 +#define wxSCI_V_NUMBER 4 +#define wxSCI_V_WORD 5 +#define wxSCI_V_STRING 6 +#define wxSCI_V_WORD2 7 +#define wxSCI_V_WORD3 8 +#define wxSCI_V_PREPROCESSOR 9 +#define wxSCI_V_OPERATOR 10 +#define wxSCI_V_IDENTIFIER 11 +#define wxSCI_V_STRINGEOL 12 +#define wxSCI_V_USER 19 + +// Lexical states for SCLEX_KIX +#define wxSCI_KIX_DEFAULT 0 +#define wxSCI_KIX_COMMENT 1 +#define wxSCI_KIX_STRING1 2 +#define wxSCI_KIX_STRING2 3 +#define wxSCI_KIX_NUMBER 4 +#define wxSCI_KIX_VAR 5 +#define wxSCI_KIX_MACRO 6 +#define wxSCI_KIX_KEYWORD 7 +#define wxSCI_KIX_FUNCTIONS 8 +#define wxSCI_KIX_OPERATOR 9 +#define wxSCI_KIX_IDENTIFIER 31 + +// Lexical states for SCLEX_GUI4CLI +#define wxSCI_GC_DEFAULT 0 +#define wxSCI_GC_COMMENTLINE 1 +#define wxSCI_GC_COMMENTBLOCK 2 +#define wxSCI_GC_GLOBAL 3 +#define wxSCI_GC_EVENT 4 +#define wxSCI_GC_ATTRIBUTE 5 +#define wxSCI_GC_CONTROL 6 +#define wxSCI_GC_COMMAND 7 +#define wxSCI_GC_STRING 8 +#define wxSCI_GC_OPERATOR 9 + +// Lexical states for SCLEX_SPECMAN +#define wxSCI_SN_DEFAULT 0 +#define wxSCI_SN_CODE 1 +#define wxSCI_SN_COMMENTLINE 2 +#define wxSCI_SN_COMMENTLINEBANG 3 +#define wxSCI_SN_NUMBER 4 +#define wxSCI_SN_WORD 5 +#define wxSCI_SN_STRING 6 +#define wxSCI_SN_WORD2 7 +#define wxSCI_SN_WORD3 8 +#define wxSCI_SN_PREPROCESSOR 9 +#define wxSCI_SN_OPERATOR 10 +#define wxSCI_SN_IDENTIFIER 11 +#define wxSCI_SN_STRINGEOL 12 +#define wxSCI_SN_REGEXTAG 13 +#define wxSCI_SN_SIGNAL 14 +#define wxSCI_SN_USER 19 + +// Lexical states for SCLEX_AU3 +#define wxSCI_AU3_DEFAULT 0 +#define wxSCI_AU3_COMMENT 1 +#define wxSCI_AU3_COMMENTBLOCK 2 +#define wxSCI_AU3_NUMBER 3 +#define wxSCI_AU3_FUNCTION 4 +#define wxSCI_AU3_KEYWORD 5 +#define wxSCI_AU3_MACRO 6 +#define wxSCI_AU3_STRING 7 +#define wxSCI_AU3_OPERATOR 8 +#define wxSCI_AU3_VARIABLE 9 +#define wxSCI_AU3_SENT 10 +#define wxSCI_AU3_PREPROCESSOR 11 +#define wxSCI_AU3_SPECIAL 12 +#define wxSCI_AU3_EXPAND 13 +#define wxSCI_AU3_COMOBJ 14 +#define wxSCI_AU3_UDF 15 + +// Lexical states for SCLEX_APDL +#define wxSCI_APDL_DEFAULT 0 +#define wxSCI_APDL_COMMENT 1 +#define wxSCI_APDL_COMMENTBLOCK 2 +#define wxSCI_APDL_NUMBER 3 +#define wxSCI_APDL_STRING 4 +#define wxSCI_APDL_OPERATOR 5 +#define wxSCI_APDL_WORD 6 +#define wxSCI_APDL_PROCESSOR 7 +#define wxSCI_APDL_COMMAND 8 +#define wxSCI_APDL_SLASHCOMMAND 9 +#define wxSCI_APDL_STARCOMMAND 10 +#define wxSCI_APDL_ARGUMENT 11 +#define wxSCI_APDL_FUNCTION 12 + +// Lexical states for SCLEX_BASH +#define wxSCI_SH_DEFAULT 0 +#define wxSCI_SH_ERROR 1 +#define wxSCI_SH_COMMENTLINE 2 +#define wxSCI_SH_NUMBER 3 +#define wxSCI_SH_WORD 4 +#define wxSCI_SH_STRING 5 +#define wxSCI_SH_CHARACTER 6 +#define wxSCI_SH_OPERATOR 7 +#define wxSCI_SH_IDENTIFIER 8 +#define wxSCI_SH_SCALAR 9 +#define wxSCI_SH_PARAM 10 +#define wxSCI_SH_BACKTICKS 11 +#define wxSCI_SH_HERE_DELIM 12 +#define wxSCI_SH_HERE_Q 13 + +// Lexical states for SCLEX_ASN1 +#define wxSCI_ASN1_DEFAULT 0 +#define wxSCI_ASN1_COMMENT 1 +#define wxSCI_ASN1_IDENTIFIER 2 +#define wxSCI_ASN1_STRING 3 +#define wxSCI_ASN1_OID 4 +#define wxSCI_ASN1_SCALAR 5 +#define wxSCI_ASN1_KEYWORD 6 +#define wxSCI_ASN1_ATTRIBUTE 7 +#define wxSCI_ASN1_DESCRIPTOR 8 +#define wxSCI_ASN1_TYPE 9 +#define wxSCI_ASN1_OPERATOR 10 + +// Lexical states for SCLEX_VHDL +#define wxSCI_VHDL_DEFAULT 0 +#define wxSCI_VHDL_COMMENT 1 +#define wxSCI_VHDL_COMMENTLINEBANG 2 +#define wxSCI_VHDL_NUMBER 3 +#define wxSCI_VHDL_STRING 4 +#define wxSCI_VHDL_OPERATOR 5 +#define wxSCI_VHDL_IDENTIFIER 6 +#define wxSCI_VHDL_STRINGEOL 7 +#define wxSCI_VHDL_KEYWORD 8 +#define wxSCI_VHDL_STDOPERATOR 9 +#define wxSCI_VHDL_ATTRIBUTE 10 +#define wxSCI_VHDL_STDFUNCTION 11 +#define wxSCI_VHDL_STDPACKAGE 12 +#define wxSCI_VHDL_STDTYPE 13 +#define wxSCI_VHDL_USERWORD 14 + +// Lexical states for SCLEX_CAML +#define wxSCI_CAML_DEFAULT 0 +#define wxSCI_CAML_IDENTIFIER 1 +#define wxSCI_CAML_TAGNAME 2 +#define wxSCI_CAML_KEYWORD 3 +#define wxSCI_CAML_KEYWORD2 4 +#define wxSCI_CAML_KEYWORD3 5 +#define wxSCI_CAML_LINENUM 6 +#define wxSCI_CAML_OPERATOR 7 +#define wxSCI_CAML_NUMBER 8 +#define wxSCI_CAML_CHAR 9 +#define wxSCI_CAML_STRING 11 +#define wxSCI_CAML_COMMENT 12 +#define wxSCI_CAML_COMMENT1 13 +#define wxSCI_CAML_COMMENT2 14 +#define wxSCI_CAML_COMMENT3 15 + +// Lexical states for SCLEX_HA +#define wxSCI_HA_DEFAULT 0 +#define wxSCI_HA_IDENTIFIER 1 +#define wxSCI_HA_KEYWORD 2 +#define wxSCI_HA_NUMBER 3 +#define wxSCI_HA_STRING 4 +#define wxSCI_HA_CHARACTER 5 +#define wxSCI_HA_CLASS 6 +#define wxSCI_HA_MODULE 7 +#define wxSCI_HA_CAPITAL 8 +#define wxSCI_HA_DATA 9 +#define wxSCI_HA_IMPORT 10 +#define wxSCI_HA_OPERATOR 11 +#define wxSCI_HA_INSTANCE 12 +#define wxSCI_HA_COMMENTLINE 13 +#define wxSCI_HA_COMMENTBLOCK 14 +#define wxSCI_HA_COMMENTBLOCK2 15 +#define wxSCI_HA_COMMENTBLOCK3 16 + +// Lexical states for SCLEX_T3 +#define wxSCI_T3_DEFAULT 0 +#define wxSCI_T3_X_DEFAULT 1 +#define wxSCI_T3_PREPROCESSOR 2 +#define wxSCI_T3_BLOCK_COMMENT 3 +#define wxSCI_T3_LINE_COMMENT 4 +#define wxSCI_T3_OPERATOR 5 +#define wxSCI_T3_KEYWORD 6 +#define wxSCI_T3_NUMBER 7 +#define wxSCI_T3_IDENTIFIER 8 +#define wxSCI_T3_S_STRING 9 +#define wxSCI_T3_D_STRING 10 +#define wxSCI_T3_X_STRING 11 +#define wxSCI_T3_LIB_DIRECTIVE 12 +#define wxSCI_T3_MSG_PARAM 13 +#define wxSCI_T3_HTML_TAG 14 +#define wxSCI_T3_HTML_DEFAULT 15 +#define wxSCI_T3_HTML_STRING 16 +#define wxSCI_T3_USER1 17 +#define wxSCI_T3_USER2 18 +#define wxSCI_T3_USER3 19 + +// Lexical states for SCLEX_REBOL +#define wxSCI_REBOL_DEFAULT 0 +#define wxSCI_REBOL_COMMENTLINE 1 +#define wxSCI_REBOL_COMMENTBLOCK 2 +#define wxSCI_REBOL_PREFACE 3 +#define wxSCI_REBOL_OPERATOR 4 +#define wxSCI_REBOL_CHARACTER 5 +#define wxSCI_REBOL_QUOTEDSTRING 6 +#define wxSCI_REBOL_BRACEDSTRING 7 +#define wxSCI_REBOL_NUMBER 8 +#define wxSCI_REBOL_PAIR 9 +#define wxSCI_REBOL_TUPLE 10 +#define wxSCI_REBOL_BINARY 11 +#define wxSCI_REBOL_MONEY 12 +#define wxSCI_REBOL_ISSUE 13 +#define wxSCI_REBOL_TAG 14 +#define wxSCI_REBOL_FILE 15 +#define wxSCI_REBOL_EMAIL 16 +#define wxSCI_REBOL_URL 17 +#define wxSCI_REBOL_DATE 18 +#define wxSCI_REBOL_TIME 19 +#define wxSCI_REBOL_IDENTIFIER 20 +#define wxSCI_REBOL_WORD 21 +#define wxSCI_REBOL_WORD2 22 +#define wxSCI_REBOL_WORD3 23 +#define wxSCI_REBOL_WORD4 24 +#define wxSCI_REBOL_WORD5 25 +#define wxSCI_REBOL_WORD6 26 +#define wxSCI_REBOL_WORD7 27 +#define wxSCI_REBOL_WORD8 28 + +// Lexical states for SCLEX_SQL +#define wxSCI_SQL_DEFAULT 0 +#define wxSCI_SQL_COMMENT 1 +#define wxSCI_SQL_COMMENTLINE 2 +#define wxSCI_SQL_COMMENTDOC 3 +#define wxSCI_SQL_NUMBER 4 +#define wxSCI_SQL_WORD 5 +#define wxSCI_SQL_STRING 6 +#define wxSCI_SQL_CHARACTER 7 +#define wxSCI_SQL_SQLPLUS 8 +#define wxSCI_SQL_SQLPLUS_PROMPT 9 +#define wxSCI_SQL_OPERATOR 10 +#define wxSCI_SQL_IDENTIFIER 11 +#define wxSCI_SQL_SQLPLUS_COMMENT 13 +#define wxSCI_SQL_COMMENTLINEDOC 15 +#define wxSCI_SQL_WORD2 16 +#define wxSCI_SQL_COMMENTDOCKEYWORD 17 +#define wxSCI_SQL_COMMENTDOCKEYWORDERROR 18 +#define wxSCI_SQL_USER1 19 +#define wxSCI_SQL_USER2 20 +#define wxSCI_SQL_USER3 21 +#define wxSCI_SQL_USER4 22 +#define wxSCI_SQL_QUOTEDIDENTIFIER 23 + +// Lexical states for SCLEX_ST +#define wxSCI_ST_DEFAULT 0 +#define wxSCI_ST_STRING 1 +#define wxSCI_ST_NUMBER 2 +#define wxSCI_ST_COMMENT 3 +#define wxSCI_ST_SYMBOL 4 +#define wxSCI_ST_BINARY 5 +#define wxSCI_ST_BOOL 6 +#define wxSCI_ST_SELF 7 +#define wxSCI_ST_SUPER 8 +#define wxSCI_ST_NIL 9 +#define wxSCI_ST_GLOBAL 10 +#define wxSCI_ST_RETURN 11 +#define wxSCI_ST_SPECIAL 12 +#define wxSCI_ST_KWSEND 13 +#define wxSCI_ST_ASSIGN 14 +#define wxSCI_ST_CHARACTER 15 +#define wxSCI_ST_SPEC_SEL 16 + +// Lexical states for SCLEX_FS +#define wxSCI_FS_DEFAULT 0 +#define wxSCI_FS_COMMENT 1 +#define wxSCI_FS_COMMENTLINE 2 +#define wxSCI_FS_COMMENTDOC 3 +#define wxSCI_FS_COMMENTLINEDOC 4 +#define wxSCI_FS_COMMENTDOCKEYWORD 5 +#define wxSCI_FS_COMMENTDOCKEYWORDERROR 6 +#define wxSCI_FS_KEYWORD 7 +#define wxSCI_FS_KEYWORD2 8 +#define wxSCI_FS_KEYWORD3 9 +#define wxSCI_FS_KEYWORD4 10 +#define wxSCI_FS_NUMBER 11 +#define wxSCI_FS_STRING 12 +#define wxSCI_FS_PREPROCESSOR 13 +#define wxSCI_FS_OPERATOR 14 +#define wxSCI_FS_IDENTIFIER 15 +#define wxSCI_FS_DATE 16 +#define wxSCI_FS_STRINGEOL 17 +#define wxSCI_FS_CONSTANT 18 +#define wxSCI_FS_ASM 19 +#define wxSCI_FS_LABEL 20 +#define wxSCI_FS_ERROR 21 +#define wxSCI_FS_HEXNUMBER 22 +#define wxSCI_FS_BINNUMBER 23 + +// Lexical states for SCLEX_CSOUND +#define wxSCI_CSOUND_DEFAULT 0 +#define wxSCI_CSOUND_COMMENT 1 +#define wxSCI_CSOUND_NUMBER 2 +#define wxSCI_CSOUND_OPERATOR 3 +#define wxSCI_CSOUND_INSTR 4 +#define wxSCI_CSOUND_IDENTIFIER 5 +#define wxSCI_CSOUND_OPCODE 6 +#define wxSCI_CSOUND_HEADERSTMT 7 +#define wxSCI_CSOUND_USERKEYWORD 8 +#define wxSCI_CSOUND_COMMENTBLOCK 9 +#define wxSCI_CSOUND_PARAM 10 +#define wxSCI_CSOUND_ARATE_VAR 11 +#define wxSCI_CSOUND_KRATE_VAR 12 +#define wxSCI_CSOUND_IRATE_VAR 13 +#define wxSCI_CSOUND_GLOBAL_VAR 14 +#define wxSCI_CSOUND_STRINGEOL 15 + +// Lexical states for SCLEX_INNOSETUP +#define wxSCI_INNO_DEFAULT 0 +#define wxSCI_INNO_COMMENT 1 +#define wxSCI_INNO_KEYWORD 2 +#define wxSCI_INNO_PARAMETER 3 +#define wxSCI_INNO_SECTION 4 +#define wxSCI_INNO_PREPROC 5 +#define wxSCI_INNO_PREPROC_INLINE 6 +#define wxSCI_INNO_COMMENT_PASCAL 7 +#define wxSCI_INNO_KEYWORD_PASCAL 8 +#define wxSCI_INNO_KEYWORD_USER 9 +#define wxSCI_INNO_STRING_DOUBLE 10 +#define wxSCI_INNO_STRING_SINGLE 11 +#define wxSCI_INNO_IDENTIFIER 12 + +// Lexical states for SCLEX_OPAL +#define wxSCI_OPAL_SPACE 0 +#define wxSCI_OPAL_COMMENT_BLOCK 1 +#define wxSCI_OPAL_COMMENT_LINE 2 +#define wxSCI_OPAL_INTEGER 3 +#define wxSCI_OPAL_KEYWORD 4 +#define wxSCI_OPAL_SORT 5 +#define wxSCI_OPAL_STRING 6 +#define wxSCI_OPAL_PAR 7 +#define wxSCI_OPAL_BOOL_CONST 8 +#define wxSCI_OPAL_DEFAULT 32 + +// Lexical states for SCLEX_SPICE +#define wxSCI_SPICE_DEFAULT 0 +#define wxSCI_SPICE_IDENTIFIER 1 +#define wxSCI_SPICE_KEYWORD 2 +#define wxSCI_SPICE_KEYWORD2 3 +#define wxSCI_SPICE_KEYWORD3 4 +#define wxSCI_SPICE_NUMBER 5 +#define wxSCI_SPICE_DELIMITER 6 +#define wxSCI_SPICE_VALUE 7 +#define wxSCI_SPICE_COMMENTLINE 8 + + +//----------------------------------------- +// Commands that can be bound to keystrokes + + +// Redoes the next action on the undo history. +#define wxSCI_CMD_REDO 2011 + +// Select all the text in the document. +#define wxSCI_CMD_SELECTALL 2013 + +// Undo one action in the undo history. +#define wxSCI_CMD_UNDO 2176 + +// Cut the selection to the clipboard. +#define wxSCI_CMD_CUT 2177 + +// Copy the selection to the clipboard. +#define wxSCI_CMD_COPY 2178 + +// Paste the contents of the clipboard into the document replacing the selection. +#define wxSCI_CMD_PASTE 2179 + +// Clear the selection. +#define wxSCI_CMD_CLEAR 2180 + +// Move caret down one line. +#define wxSCI_CMD_LINEDOWN 2300 + +// Move caret down one line extending selection to new caret position. +#define wxSCI_CMD_LINEDOWNEXTEND 2301 + +// Move caret up one line. +#define wxSCI_CMD_LINEUP 2302 + +// Move caret up one line extending selection to new caret position. +#define wxSCI_CMD_LINEUPEXTEND 2303 + +// Move caret left one character. +#define wxSCI_CMD_CHARLEFT 2304 + +// Move caret left one character extending selection to new caret position. +#define wxSCI_CMD_CHARLEFTEXTEND 2305 + +// Move caret right one character. +#define wxSCI_CMD_CHARRIGHT 2306 + +// Move caret right one character extending selection to new caret position. +#define wxSCI_CMD_CHARRIGHTEXTEND 2307 + +// Move caret left one word. +#define wxSCI_CMD_WORDLEFT 2308 + +// Move caret left one word extending selection to new caret position. +#define wxSCI_CMD_WORDLEFTEXTEND 2309 + +// Move caret right one word. +#define wxSCI_CMD_WORDRIGHT 2310 + +// Move caret right one word extending selection to new caret position. +#define wxSCI_CMD_WORDRIGHTEXTEND 2311 + +// Move caret to first position on line. +#define wxSCI_CMD_HOME 2312 + +// Move caret to first position on line extending selection to new caret position. +#define wxSCI_CMD_HOMEEXTEND 2313 + +// Move caret to last position on line. +#define wxSCI_CMD_LINEEND 2314 + +// Move caret to last position on line extending selection to new caret position. +#define wxSCI_CMD_LINEENDEXTEND 2315 + +// Move caret to first position in document. +#define wxSCI_CMD_DOCUMENTSTART 2316 + +// Move caret to first position in document extending selection to new caret position. +#define wxSCI_CMD_DOCUMENTSTARTEXTEND 2317 + +// Move caret to last position in document. +#define wxSCI_CMD_DOCUMENTEND 2318 + +// Move caret to last position in document extending selection to new caret position. +#define wxSCI_CMD_DOCUMENTENDEXTEND 2319 + +// Move caret one page up. +#define wxSCI_CMD_PAGEUP 2320 + +// Move caret one page up extending selection to new caret position. +#define wxSCI_CMD_PAGEUPEXTEND 2321 + +// Move caret one page down. +#define wxSCI_CMD_PAGEDOWN 2322 + +// Move caret one page down extending selection to new caret position. +#define wxSCI_CMD_PAGEDOWNEXTEND 2323 + +// Switch from insert to overtype mode or the reverse. +#define wxSCI_CMD_EDITTOGGLEOVERTYPE 2324 + +// Cancel any modes such as call tip or auto-completion list display. +#define wxSCI_CMD_CANCEL 2325 + +// Delete the selection or if no selection, the character before the caret. +#define wxSCI_CMD_DELETEBACK 2326 + +// If selection is empty or all on one line replace the selection with a tab character. +// If more than one line selected, indent the lines. +#define wxSCI_CMD_TAB 2327 + +// Dedent the selected lines. +#define wxSCI_CMD_BACKTAB 2328 + +// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +#define wxSCI_CMD_NEWLINE 2329 + +// Insert a Form Feed character. +#define wxSCI_CMD_FORMFEED 2330 + +// Move caret to before first visible character on line. +// If already there move to first character on line. +#define wxSCI_CMD_VCHOME 2331 + +// Like VCHome but extending selection to new caret position. +#define wxSCI_CMD_VCHOMEEXTEND 2332 + +// Magnify the displayed text by increasing the sizes by 1 point. +#define wxSCI_CMD_ZOOMIN 2333 + +// Make the displayed text smaller by decreasing the sizes by 1 point. +#define wxSCI_CMD_ZOOMOUT 2334 + +// Delete the word to the left of the caret. +#define wxSCI_CMD_DELWORDLEFT 2335 + +// Delete the word to the right of the caret. +#define wxSCI_CMD_DELWORDRIGHT 2336 + +// Cut the line containing the caret. +#define wxSCI_CMD_LINECUT 2337 + +// Delete the line containing the caret. +#define wxSCI_CMD_LINEDELETE 2338 + +// Switch the current line with the previous. +#define wxSCI_CMD_LINETRANSPOSE 2339 + +// Duplicate the current line. +#define wxSCI_CMD_LINEDUPLICATE 2404 + +// Transform the selection to lower case. +#define wxSCI_CMD_LOWERCASE 2340 + +// Transform the selection to upper case. +#define wxSCI_CMD_UPPERCASE 2341 + +// Scroll the document down, keeping the caret visible. +#define wxSCI_CMD_LINESCROLLDOWN 2342 + +// Scroll the document up, keeping the caret visible. +#define wxSCI_CMD_LINESCROLLUP 2343 + +// Delete the selection or if no selection, the character before the caret. +// Will not delete the character before at the start of a line. +#define wxSCI_CMD_DELETEBACKNOTLINE 2344 + +// Move caret to first position on display line. +#define wxSCI_CMD_HOMEDISPLAY 2345 + +// Move caret to first position on display line extending selection to +// new caret position. +#define wxSCI_CMD_HOMEDISPLAYEXTEND 2346 + +// Move caret to last position on display line. +#define wxSCI_CMD_LINEENDDISPLAY 2347 + +// Move caret to last position on display line extending selection to new +// caret position. +#define wxSCI_CMD_LINEENDDISPLAYEXTEND 2348 + +// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +// except they behave differently when word-wrap is enabled: +// They go first to the start / end of the display line, like (Home|LineEnd)Display +// The difference is that, the cursor is already at the point, it goes on to the start +// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. +#define wxSCI_CMD_HOMEWRAP 2349 +#define wxSCI_CMD_HOMEWRAPEXTEND 2450 +#define wxSCI_CMD_LINEENDWRAP 2451 +#define wxSCI_CMD_LINEENDWRAPEXTEND 2452 +#define wxSCI_CMD_VCHOMEWRAP 2453 +#define wxSCI_CMD_VCHOMEWRAPEXTEND 2454 + +// Copy the line containing the caret. +#define wxSCI_CMD_LINECOPY 2455 + +// Move to the previous change in capitalisation. +#define wxSCI_CMD_WORDPARTLEFT 2390 + +// Move to the previous change in capitalisation extending selection +// to new caret position. +#define wxSCI_CMD_WORDPARTLEFTEXTEND 2391 + +// Move to the change next in capitalisation. +#define wxSCI_CMD_WORDPARTRIGHT 2392 + +// Move to the next change in capitalisation extending selection +// to new caret position. +#define wxSCI_CMD_WORDPARTRIGHTEXTEND 2393 + +// Delete back from the current position to the start of the line. +#define wxSCI_CMD_DELLINELEFT 2395 + +// Delete forwards from the current position to the end of the line. +#define wxSCI_CMD_DELLINERIGHT 2396 + +// Move caret between paragraphs (delimited by empty lines). +#define wxSCI_CMD_PARADOWN 2413 +#define wxSCI_CMD_PARADOWNEXTEND 2414 +#define wxSCI_CMD_PARAUP 2415 +#define wxSCI_CMD_PARAUPEXTEND 2416 + +// Move caret down one line, extending rectangular selection to new caret position. +#define wxSCI_CMD_LINEDOWNRECTEXTEND 2426 + +// Move caret up one line, extending rectangular selection to new caret position. +#define wxSCI_CMD_LINEUPRECTEXTEND 2427 + +// Move caret left one character, extending rectangular selection to new caret position. +#define wxSCI_CMD_CHARLEFTRECTEXTEND 2428 + +// Move caret right one character, extending rectangular selection to new caret position. +#define wxSCI_CMD_CHARRIGHTRECTEXTEND 2429 + +// Move caret to first position on line, extending rectangular selection to new caret position. +#define wxSCI_CMD_HOMERECTEXTEND 2430 + +// Move caret to before first visible character on line. +// If already there move to first character on line. +// In either case, extend rectangular selection to new caret position. +#define wxSCI_CMD_VCHOMERECTEXTEND 2431 + +// Move caret to last position on line, extending rectangular selection to new caret position. +#define wxSCI_CMD_LINEENDRECTEXTEND 2432 + +// Move caret one page up, extending rectangular selection to new caret position. +#define wxSCI_CMD_PAGEUPRECTEXTEND 2433 + +// Move caret one page down, extending rectangular selection to new caret position. +#define wxSCI_CMD_PAGEDOWNRECTEXTEND 2434 + +// Move caret to top of page, or one page up if already at top of page. +#define wxSCI_CMD_STUTTEREDPAGEUP 2435 + +// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. +#define wxSCI_CMD_STUTTEREDPAGEUPEXTEND 2436 + +// Move caret to bottom of page, or one page down if already at bottom of page. +#define wxSCI_CMD_STUTTEREDPAGEDOWN 2437 + +// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. +#define wxSCI_CMD_STUTTEREDPAGEDOWNEXTEND 2438 + +// Move caret left one word, position cursor at end of word. +#define wxSCI_CMD_WORDLEFTEND 2439 + +// Move caret left one word, position cursor at end of word, extending selection to new caret position. +#define wxSCI_CMD_WORDLEFTENDEXTEND 2440 + +// Move caret right one word, position cursor at end of word. +#define wxSCI_CMD_WORDRIGHTEND 2441 + +// Move caret right one word, position cursor at end of word, extending selection to new caret position. +#define wxSCI_CMD_WORDRIGHTENDEXTEND 2442 + + +// END of generated section +//---------------------------------------------------------------------- + +class ScintillaWX; // forward declare +class WordList; + +#ifdef SCI_NAMESPACE // begin [CHANGED] + #ifndef SCI_SCOPE + #define SCI_SCOPE( x ) Scintilla::x + #endif + namespace Scintilla{ +#else + #ifndef SCI_SCOPE + #define SCI_SCOPE( x ) x + #endif +#endif + +struct SCNotification; +#ifdef SCI_NAMESPACE +} +#endif // end [CHANGED] + +#ifndef SWIG +extern const wxChar* wxSCINameStr; +class WXDLLIMPEXP_SCI wxScintilla; +class WXDLLIMPEXP_SCI wxScintillaEvent; +#endif + +//---------------------------------------------------------------------- + +class WXDLLIMPEXP_SCI wxScintilla : public wxControl { +public: + +#ifdef SWIGPYTHON + %pythonAppend wxScintilla "self._setOORInfo(self)" + %pythonAppend wxScintilla() "" + + wxScintilla (wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSCINameStr); + %name(PreScintilla) wxScintilla(); + +#elif defined (SWIGRUBY) + wxScintilla (wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSCINameStr); + ~wxScintilla(); +#else + wxScintilla (wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSCINameStr); + wxScintilla() { m_swx = NULL; } + ~wxScintilla(); + +#endif + + bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxString& name = wxSCINameStr); + + +//---------------------------------------------------------------------- +// BEGIN generated section. The following code is automatically generated +// by gen_iface.py. Do not edit this file. Edit wxscintilla.h.in instead +// and regenerate + + + // Add text to the document. + void AddText (const wxString& text); + void AddText (const int length, const wxString& text); + + // Add array of cells to document. + void AddStyledText (const wxMemoryBuffer& data); + + // Insert string at a position. + void InsertText (int pos, const wxString& text); + + // Delete all text in the document. + void ClearAll(); + + // Set all style bytes to 0, remove all folding information. + void ClearDocumentStyle(); + + // The number of characters in the document. + int GetLength(); + + // Returns the character byte at the position. + int GetCharAt (int pos); + + // Returns the position of the caret. + int GetCurrentPos(); + + // Returns the position of the opposite end of the selection to the caret. + int GetAnchor(); + + // Returns the style byte at the position. + int GetStyleAt (int pos); + + // Redoes the next action on the undo history. + void Redo(); + + // Choose between collecting actions into the undo + // history and discarding them. + void SetUndoCollection (bool collectUndo); + + // Select all the text in the document. + void SelectAll(); + + // Remember the current position in the undo history as the position + // at which the document was saved. + void SetSavePoint(); + + // Retrieve a buffer of cells. + wxMemoryBuffer GetStyledText (int startPos, int endPos); + + // Are there any redoable actions in the undo history? + bool CanRedo(); + + // Retrieve the line number at which a particular marker is located. + int MarkerLineFromHandle (int handle); + + // Delete a marker. + void MarkerDeleteHandle (int handle); + + // Is undo history being collected? + bool GetUndoCollection(); + + // Are white space characters currently visible? + // Returns one of SCWS_* constants. + int GetViewWhiteSpace(); + + // Make white space characters invisible, always visible or visible outside indentation. + void SetViewWhiteSpace (int viewWS); + + // Find the position from a point within the window. + int PositionFromPoint (wxPoint pt); + + // Find the position from a point within the window but return + // INVALID_POSITION if not close to text. + int PositionFromPointClose (int x, int y); + + // Set caret to start of a line and ensure it is visible. + void GotoLine (int line); + + // Set caret to a position and ensure it is visible. + void GotoPos (int pos); + + // Set the selection anchor to a position. The anchor is the opposite + // end of the selection from the caret. + void SetAnchor (int posAnchor); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. +#ifdef SWIG + wxString GetCurLine (int* OUTPUT); +#else + wxString GetCurLine (int* linePos = NULL); +#endif + + // Retrieve the position of the last correctly styled character. + int GetEndStyled(); + + // Convert all line endings in the document to one mode. + void ConvertEOLs (int eolMode); + + // Retrieve the current end of line mode - one of CRLF, CR, or LF. + int GetEOLMode(); + + // Set the current end of line mode. + void SetEOLMode (int eolMode); + + // Set the current styling position to pos and the styling mask to mask. + // The styling mask can be used to protect some bits in each styling byte from modification. + void StartStyling (int pos, int mask); + + // Change style from current styling position for length characters to a style + // and move the current styling position to after this newly styled segment. + void SetStyling (int length, int style); + + // Is drawing done first into a buffer or direct to the screen? + bool GetBufferedDraw(); + + // If drawing is buffered then each line of text is drawn into a bitmap buffer + // before drawing it to the screen to avoid flicker. + void SetBufferedDraw (bool buffered); + + // Change the visible size of a tab to be a multiple of the width of a space character. + void SetTabWidth (int tabWidth); + + // Retrieve the visible size of a tab. + int GetTabWidth(); + + // Set the code page used to interpret the bytes of the document as characters. + void SetCodePage (int codePage); + + // Set the symbol used for a particular marker number, + void MarkerDefine (int markerNumber, int markerSymbol); + + // Set the foreground colour used for a particular marker number. + void MarkerSetForeground (int markerNumber, const wxColour& fore); + + // Set the background colour used for a particular marker number. + void MarkerSetBackground (int markerNumber, const wxColour& back); + + // Add a marker to a line, returning an ID which can be used to find or delete the marker. + int MarkerAdd (int line, int markerNumber); + + // Delete a marker from a line. + void MarkerDelete (int line, int markerNumber); + + // Delete a marker with a particular number from all lines. + void MarkerDeleteAll (int markerNumber); + + // Get a bit mask of all the markers set on a line. + int MarkerGet (int line); + + // Find the next line after lineStart that includes a marker in mask. + int MarkerNext (int lineStart, int markerMask); + + // Find the previous line before lineStart that includes a marker in mask. + int MarkerPrevious (int lineStart, int markerMask); + + // Define a marker from a bitmap + void MarkerDefineBitmap (int markerNumber, const wxBitmap& bmp); + + // Add a set of markers to a line. + void MarkerAddSet (int line, int markerSet); + + // Set the alpha used for a marker that is drawn in the text area, not the margin. + void MarkerSetAlpha (int markerNumber, int alpha); + + // Set a margin to be either numeric or symbolic. + void SetMarginType (int margin, int marginType); + + // Retrieve the type of a margin. + int GetMarginType (int margin); + + // Set the width of a margin to a width expressed in pixels. + void SetMarginWidth (int margin, int pixels); + + // Retrieve the width of a margin in pixels. + int GetMarginWidth (int margin); + + // Set a mask that determines which markers are displayed in a margin. + void SetMarginMask (int margin, int mask); + + // Retrieve the marker mask of a margin. + int GetMarginMask (int margin); + + // Make a margin sensitive or insensitive to mouse clicks. + void SetMarginSensitive (int margin, bool sensitive); + + // Retrieve the mouse click sensitivity of a margin. + bool GetMarginSensitive (int margin); + + // Clear all the styles and make equivalent to the global default style. + void StyleClearAll(); + + // Set the foreground colour of a style. + void StyleSetForeground (int style, const wxColour& fore); + + // Set the background colour of a style. + void StyleSetBackground (int style, const wxColour& back); + + // Set a style to be bold or not. + void StyleSetBold (int style, bool bold); + + // Set a style to be italic or not. + void StyleSetItalic (int style, bool italic); + + // Set the size of characters of a style. + void StyleSetSize (int style, int sizePoints); + + // Set the font of a style. + void StyleSetFaceName (int style, const wxString& fontName); + + // Set a style to have its end of line filled or not. + void StyleSetEOLFilled (int style, bool filled); + + // Reset the default style to its state at startup + void StyleResetDefault(); + + // Set a style to be underlined or not. + void StyleSetUnderline (int style, bool underline); + + // Set a style to be mixed case, or to force upper or lower case. + void StyleSetCase (int style, int caseMode); + + // Set a style to be a hotspot or not. + void StyleSetHotSpot (int style, bool hotspot); + + // Get the alpha of the selection. + int GetSelAlpha (); + + // Set the alpha of the selection. + void SetSelAlpha (int alpha); + + // Set the foreground colour of the selection and whether to use this setting. + void SetSelForeground (bool useSetting, const wxColour& fore); + + // Set the background colour of the selection and whether to use this setting. + void SetSelBackground (bool useSetting, const wxColour& back); + + // Set the foreground colour of the caret. + void SetCaretForeground (const wxColour& fore); + + // When key+modifier combination km is pressed perform msg. + void CmdKeyAssign (int key, int modifiers, int cmd); + + // When key+modifier combination km is pressed do nothing. + void CmdKeyClear (int key, int modifiers); + + // Drop all key mappings. + void CmdKeyClearAll(); + + // Set the styles for a segment of the document. + void SetStyleBytes (int length, char* styleBytes); + + // Set a style to be visible or not. + void StyleSetVisible (int style, bool visible); + + // Get the time in milliseconds that the caret is on and off. + int GetCaretPeriod(); + + // Get the time in milliseconds that the caret is on and off. 0 = steady on. + void SetCaretPeriod (int milliseconds); + + // Set the set of characters making up words for when moving or selecting by word. + // First sets deaults like SetCharsDefault. + void SetWordChars (const wxString& characters); + + // Start a sequence of actions that is undone and redone as a unit. + // May be nested. + void BeginUndoAction(); + + // End a sequence of actions that is undone and redone as a unit. + void EndUndoAction(); + + // Set an indicator to plain, squiggle or TT. + void IndicatorSetStyle (int indic, int style); + + // Retrieve the style of an indicator. + int IndicatorGetStyle (int indic); + + // Set the foreground colour of an indicator. + void IndicatorSetForeground (int indic, const wxColour& fore); + + // Retrieve the foreground colour of an indicator. + wxColour IndicatorGetForeground (int indic); + + // Set the foreground colour of all whitespace and whether to use this setting. + void SetWhitespaceForeground (bool useSetting, const wxColour& fore); + + // Set the background colour of all whitespace and whether to use this setting. + void SetWhitespaceBackground (bool useSetting, const wxColour& back); + + // Divide each styling byte into lexical class bits (default: 5) and indicator + // bits (default: 3). If a lexer requires more than 32 lexical states, then this + // is used to expand the possible states. + void SetStyleBits (int bits); + + // Retrieve number of bits in style bytes used to hold the lexical state. + int GetStyleBits(); + + // Used to hold extra styling information for each line. + void SetLineState (int line, int state); + + // Retrieve the extra styling information for a line. + int GetLineState (int line); + + // Retrieve the last line number that has line state. + int GetMaxLineState(); + + // Is the background of the line containing the caret in a different colour? + bool GetCaretLineVisible(); + + // Display the background of the line containing the caret in a different colour. + void SetCaretLineVisible (bool show); + + // Get the colour of the background of the line containing the caret. + wxColour GetCaretLineBackground(); + + // Set the colour of the background of the line containing the caret. + void SetCaretLineBackground (const wxColour& back); + + // Set a style to be changeable or not (read only). + // Experimental feature, currently buggy. + void StyleSetChangeable (int style, bool changeable); + + // Display a auto-completion list. + // The lenEntered parameter indicates how many characters before + // the caret should be used to provide context. + void AutoCompShow (int lenEntered, const wxString& itemList); + + // Remove the auto-completion list from the screen. + void AutoCompCancel(); + + // Is there an auto-completion list visible? + bool AutoCompActive(); + + // Retrieve the position of the caret when the auto-completion list was displayed. + int AutoCompPosStart(); + + // User has selected an item so remove the list and insert the selection. + void AutoCompComplete(); + + // Define a set of character that when typed cancel the auto-completion list. + void AutoCompStops (const wxString& characterSet); + + // Change the separator character in the string setting up an auto-completion list. + // Default is space but can be changed if items contain space. + void AutoCompSetSeparator (int separatorCharacter); + + // Retrieve the auto-completion list separator character. + int AutoCompGetSeparator(); + + // Select the item in the auto-completion list that starts with a string. + void AutoCompSelect (const wxString& text); + + // Should the auto-completion list be cancelled if the user backspaces to a + // position before where the box was created. + void AutoCompSetCancelAtStart (bool cancel); + + // Retrieve whether auto-completion cancelled by backspacing before start. + bool AutoCompGetCancelAtStart(); + + // Define a set of characters that when typed will cause the autocompletion to + // choose the selected item. + void AutoCompSetFillUps (const wxString& characterSet); + + // Should a single item auto-completion list automatically choose the item. + void AutoCompSetChooseSingle (bool chooseSingle); + + // Retrieve whether a single item auto-completion list automatically choose the item. + bool AutoCompGetChooseSingle(); + + // Set whether case is significant when performing auto-completion searches. + void AutoCompSetIgnoreCase (bool ignoreCase); + + // Retrieve state of ignore case flag. + bool AutoCompGetIgnoreCase(); + + // Display a list of strings and send notification when user chooses one. + void UserListShow (int listType, const wxString& itemList); + + // Set whether or not autocompletion is hidden automatically when nothing matches. + void AutoCompSetAutoHide (bool autoHide); + + // Retrieve whether or not autocompletion is hidden automatically when nothing matches. + bool AutoCompGetAutoHide(); + + // Set whether or not autocompletion deletes any word characters + // after the inserted text upon completion. + void AutoCompSetDropRestOfWord (bool dropRestOfWord); + + // Retrieve whether or not autocompletion deletes any word characters + // after the inserted text upon completion. + bool AutoCompGetDropRestOfWord(); + + // Register an image for use in autocompletion lists. + void RegisterImage (int type, const wxBitmap& bmp); + + // Clear all the registered images. + void ClearRegisteredImages(); + + // Retrieve the auto-completion list type-separator character. + int AutoCompGetTypeSeparator(); + + // Change the type-separator character in the string setting up an auto-completion list. + // Default is '?' but can be changed if items contain '?'. + void AutoCompSetTypeSeparator (int separatorCharacter); + + // Set the maximum width, in characters, of auto-completion and user lists. + // Set to 0 to autosize to fit longest item, which is the default. + void AutoCompSetMaxWidth (int characterCount); + + // Get the maximum width, in characters, of auto-completion and user lists. + int AutoCompGetMaxWidth(); + + // Set the maximum height, in rows, of auto-completion and user lists. + // The default is 5 rows. + void AutoCompSetMaxHeight (int rowCount); + + // Set the maximum height, in rows, of auto-completion and user lists. + int AutoCompGetMaxHeight(); + + // Set the number of spaces used for one level of indentation. + void SetIndent (int indentSize); + + // Retrieve indentation size. + int GetIndent(); + + // Indentation will only use space characters if useTabs is false, otherwise + // it will use a combination of tabs and spaces. + void SetUseTabs (bool useTabs); + + // Retrieve whether tabs will be used in indentation. + bool GetUseTabs(); + + // Change the indentation of a line to a number of columns. + void SetLineIndentation (int line, int indentSize); + + // Retrieve the number of columns that a line is indented. + int GetLineIndentation (int line); + + // Retrieve the position before the first non indentation character on a line. + int GetLineIndentPosition (int line); + + // Retrieve the column number of a position, taking tab width into account. + int GetColumn (int pos); + + // Returns the position of a column (max. end of line position if beyond) + // on a line taking the width of tabs into account. + int FindColumn (int line, int column); + + // Can the caret preferred x position only be changed by explicit movement commands? + bool GetCaretSticky (); + + // Stop the caret preferred x position changing when the user types. + void SetCaretSticky (bool useCaretStickyBehaviour); + + // Switch between sticky and non-sticky: meant to be bound to a key. + void ToggleCaretSticky (); + + // Enable/Disable convert-on-paste for line endings. + void SetPasteConvertEndings (bool convert); + + // Get convert-on-paste setting. + bool GetPasteConvertEndings (); + + // Duplicate the selection. If selection empty duplicate the line containing the caret. + void SelectionDuplicate (); + + // Get the background alpha of the caret line. + int GetCaretLineBackgroundAlpha (); + + // Set background alpha of the caret line. + void SetCaretLineBackgroundAlpha (int alpha); + + // Show or hide the horizontal scroll bar. + void SetUseHorizontalScrollBar (bool show); + + // Is the horizontal scroll bar visible? + bool GetUseHorizontalScrollBar(); + + // Show or hide indentation guides. + void SetIndentationGuides (bool show); + + // Are the indentation guides visible? + bool GetIndentationGuides(); + + // Set the highlighted indentation guide column. + // 0 = no highlighted guide. + void SetHighlightGuide (int column); + + // Get the highlighted indentation guide column. + int GetHighlightGuide(); + + // Get the position after the last visible characters on a line. + int GetLineEndPosition (int line); + + // Get the code page used to interpret the bytes of the document as characters. + int GetCodePage(); + + // Get the foreground colour of the caret. + wxColour GetCaretForeground(); + + // In read-only mode? + bool GetReadOnly(); + + // Sets the position of the caret. + void SetCurrentPos (int pos); + + // Sets the position that starts the selection - this becomes the anchor. + void SetSelectionStart (int pos); + + // Returns the position at the start of the selection. + virtual int GetSelectionStart(); + + // Sets the position that ends the selection - this becomes the currentPosition. + void SetSelectionEnd (int pos); + + // Returns the position at the end of the selection. + int GetSelectionEnd(); + + // Sets the print magnification added to the point size of each style for printing. + void SetPrintMagnification (int magnification); + + // Returns the print magnification. + int GetPrintMagnification(); + + // Modify colours when printing for clearer printed text. + void SetPrintColourMode (int mode); + + // Returns the print colour mode. + int GetPrintColourMode(); + + // Find some text in the document. + int FindText (int minPos, int maxPos, const wxString& text, int flags=0, int* lengthFound = NULL); + + // On Windows, will draw the document into a display context such as a printer. + int FormatRange (bool doDraw, int startPos, int endPos, wxDC* draw, wxDC* target, wxRect renderRect, wxRect pageRect); + + // Retrieve the display line at the top of the display. + int GetFirstVisibleLine(); + + // Retrieve the contents of a line. + wxString GetLine (int line); + + // Returns the number of lines in the document. There is always at least one. + int GetLineCount(); + + // Sets the size in pixels of the left margin. + void SetMarginLeft (int pixels); + + // Returns the size in pixels of the left margin. + int GetMarginLeft(); + + // Sets the size in pixels of the right margin. + void SetMarginRight (int pixels); + + // Returns the size in pixels of the right margin. + int GetMarginRight(); + + // Is the document different from when it was last saved? + bool GetModify(); + + // Select a range of text. + void SetSelection (int startPos, int endPos); + + // Retrieve the selected text. + wxString GetSelectedText(); + + // Retrieve a range of text. + wxString GetTextRange (int startPos, int endPos); + + // Draw the selection in normal style or with selection highlighted. + void HideSelection (bool hide); + + // Retrieve the line containing a position. + int LineFromPosition (int pos); + + // Retrieve the position at the start of a line. + int PositionFromLine (int line); + + // Scroll horizontally and vertically. + void LineScroll (int columns, int lines); + + // Ensure the caret is visible. + void EnsureCaretVisible(); + + // Replace the selected text with the argument text. + void ReplaceSelection (const wxString& text); + + // Set to read only or read write. + void SetReadOnly (bool readOnly); + + // Will a paste succeed? + bool CanPaste(); + + // Are there any undoable actions in the undo history? + bool CanUndo(); + + // Delete the undo history. + void EmptyUndoBuffer(); + + // Undo one action in the undo history. + void Undo(); + + // Cut the selection to the clipboard. + void Cut(); + + // Copy the selection to the clipboard. + void Copy(); + + // Paste the contents of the clipboard into the document replacing the selection. + void Paste(); + + // Clear the selection. + void Clear(); + + // Replace the contents of the document with the argument text. + void SetText (const wxString& text); + + // Retrieve all the text in the document. + wxString GetText(); + + // Retrieve the number of characters in the document. + int GetTextLength(); + + // Set to overtype (true) or insert mode. + void SetOvertype (bool overtype); + + // Returns true if overtype mode is active otherwise false is returned. + bool GetOvertype(); + + // Set the width of the insert mode caret. + void SetCaretWidth (int pixels); + + // Returns the width of the insert mode caret. + int GetCaretWidth(); + + // Sets the position that starts the target which is used for updating the + // document without affecting the scroll position. + void SetTargetStart (int pos); + + // Get the position that starts the target. + int GetTargetStart(); + + // Sets the position that ends the target which is used for updating the + // document without affecting the scroll position. + void SetTargetEnd (int pos); + + // Get the position that ends the target. + int GetTargetEnd(); + + // Replace the target text with the argument text. + // Text is counted so it can contain NULs. + // Returns the length of the replacement text. + int ReplaceTarget (const wxString& text); + + // Replace the target text with the argument text after \d processing. + // Text is counted so it can contain NULs. + // Looks for \d where d is between 1 and 9 and replaces these with the strings + // matched in the last search operation which were surrounded by \( and \). + // Returns the length of the replacement text including any change + // caused by processing the \d patterns. + int ReplaceTargetRE (const wxString& text); + + // Search for a counted string in the target and set the target to the found + // range. Text is counted so it can contain NULs. + // Returns length of range or -1 for failure in which case target is not moved. + int SearchInTarget (const wxString& text); + + // Set the search flags used by SearchInTarget. + void SetSearchFlags (int flags); + + // Get the search flags used by SearchInTarget. + int GetSearchFlags(); + + // Show a call tip containing a definition near position pos. + void CallTipShow (int pos, const wxString& definition); + + // Remove the call tip from the screen. + void CallTipCancel(); + + // Is there an active call tip? + bool CallTipActive(); + + // Retrieve the position where the caret was before displaying the call tip. + int CallTipPosAtStart(); + + // Highlight a segment of the definition. + void CallTipSetHighlight (int startPos, int endPos); + + // Set the background colour for the call tip. + void CallTipSetBackground (const wxColour& back); + + // Set the foreground colour for the call tip. + void CallTipSetForeground (const wxColour& fore); + + // Set the foreground colour for the highlighted part of the call tip. + void CallTipSetForegroundHighlight (const wxColour& fore); + + // Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + void CallTipUseStyle (int tabSize); + + // Find the display line of a document line taking hidden lines into account. + int VisibleFromDocLine (int line); + + // Find the document line of a display line taking hidden lines into account. + int DocLineFromVisible (int lineDisplay); + + // The number of display lines needed to wrap a document line + int WrapCount (int line); + + // Set the fold level of a line. + // This encodes an integer level along with flags indicating whether the + // line is a header and whether it is effectively white space. + void SetFoldLevel (int line, int level); + + // Retrieve the fold level of a line. + int GetFoldLevel (int line); + + // Find the last child line of a header line. + int GetLastChild (int line, int level); + + // Find the parent line of a child line. + int GetFoldParent (int line); + + // Make a range of lines visible. + void ShowLines (int lineStart, int lineEnd); + + // Make a range of lines invisible. + void HideLines (int lineStart, int lineEnd); + + // Is a line visible? + bool GetLineVisible (int line); + + // Show the children of a header line. + void SetFoldExpanded (int line, bool expanded); + + // Is a header line expanded? + bool GetFoldExpanded (int line); + + // Switch a header line between expanded and contracted. + void ToggleFold (int line); + + // Ensure a particular line is visible by expanding any header line hiding it. + void EnsureVisible (int line); + + // Set some style options for folding. + void SetFoldFlags (int flags); + + // Ensure a particular line is visible by expanding any header line hiding it. + // Use the currently set visibility policy to determine which range to display. + void EnsureVisibleEnforcePolicy (int line); + + // Sets whether a tab pressed when caret is within indentation indents. + void SetTabIndents (bool tabIndents); + + // Does a tab pressed when caret is within indentation indent? + bool GetTabIndents(); + + // Sets whether a backspace pressed when caret is within indentation unindents. + void SetBackSpaceUnIndents (bool bsUnIndents); + + // Does a backspace pressed when caret is within indentation unindent? + bool GetBackSpaceUnIndents(); + + // Sets the time the mouse must sit still to generate a mouse dwell event. + void SetMouseDwellTime (int periodMilliseconds); + + // Retrieve the time the mouse must sit still to generate a mouse dwell event. + int GetMouseDwellTime(); + + // Get position of start of word. + int WordStartPosition (int pos, bool onlyWordCharacters); + + // Get position of end of word. + int WordEndPosition (int pos, bool onlyWordCharacters); + + // Sets whether text is word wrapped. + void SetWrapMode (int mode); + + // Retrieve whether text is word wrapped. + int GetWrapMode(); + + // Set the display mode of visual flags for wrapped lines. + void SetWrapVisualFlags (int wrapVisualFlags); + + // Retrive the display mode of visual flags for wrapped lines. + int GetWrapVisualFlags(); + + // Set the location of visual flags for wrapped lines. + void SetWrapVisualFlagsLocation (int wrapVisualFlagsLocation); + + // Retrive the location of visual flags for wrapped lines. + int GetWrapVisualFlagsLocation(); + + // Set the start indent for wrapped lines. + void SetWrapStartIndent (int indent); + + // Retrive the start indent for wrapped lines. + int GetWrapStartIndent(); + + // Sets the degree of caching of layout information. + void SetLayoutCache (int mode); + + // Retrieve the degree of caching of layout information. + int GetLayoutCache(); + + // Sets the document width assumed for scrolling. + void SetScrollWidth (int pixels); + + // Retrieve the document width assumed for scrolling. + int GetScrollWidth(); + + // Measure the pixel width of some text in a particular style. + // NUL terminated text argument. + // Does not handle tab or control characters. + int TextWidth (int style, const wxString& text); + + // Sets the scroll range so that maximum scroll position has + // the last line at the bottom of the view (default). + // Setting this to false allows scrolling one page below the last line. + void SetEndAtLastLine (bool endAtLastLine); + + // Retrieve whether the maximum scroll position has the last + // line at the bottom of the view. + bool GetEndAtLastLine(); + + // Retrieve the height of a particular line of text in pixels. + int TextHeight (int line); + + // Show or hide the vertical scroll bar. + void SetUseVerticalScrollBar (bool show); + + // Is the vertical scroll bar visible? + bool GetUseVerticalScrollBar(); + + // Append a string to the end of the document without changing the selection. + void AppendText (const wxString& text); + void AppendText (int length, const wxString& text); + + // Is drawing done in two phases with backgrounds drawn before foregrounds? + bool GetTwoPhaseDraw(); + + // In twoPhaseDraw mode, drawing is performed in two phases, first the background + // and then the foreground. This avoids chopping off characters that overlap the next run. + void SetTwoPhaseDraw (bool twoPhase); + + // Make the target range start and end be the same as the selection range start and end. + void TargetFromSelection(); + + // Join the lines in the target. + void LinesJoin(); + + // Split the lines in the target into lines that are less wide than pixelWidth + // where possible. + void LinesSplit (int pixels); + + // Set the colours used as a chequerboard pattern in the fold margin + void SetFoldMarginColour (bool useSetting, const wxColour& back); + void SetFoldMarginHiColour (bool useSetting, const wxColour& fore); + + // Move caret down one line. + void LineDown(); + + // Move caret down one line extending selection to new caret position. + void LineDownExtend(); + + // Move caret up one line. + void LineUp(); + + // Move caret up one line extending selection to new caret position. + void LineUpExtend(); + + // Move caret left one character. + void CharLeft(); + + // Move caret left one character extending selection to new caret position. + void CharLeftExtend(); + + // Move caret right one character. + void CharRight(); + + // Move caret right one character extending selection to new caret position. + void CharRightExtend(); + + // Move caret left one word. + void WordLeft(); + + // Move caret left one word extending selection to new caret position. + void WordLeftExtend(); + + // Move caret right one word. + void WordRight(); + + // Move caret right one word extending selection to new caret position. + void WordRightExtend(); + + // Move caret to first position on line. + void Home(); + + // Move caret to first position on line extending selection to new caret position. + void HomeExtend(); + + // Move caret to last position on line. + void LineEnd(); + + // Move caret to last position on line extending selection to new caret position. + void LineEndExtend(); + + // Move caret to first position in document. + void DocumentStart(); + + // Move caret to first position in document extending selection to new caret position. + void DocumentStartExtend(); + + // Move caret to last position in document. + void DocumentEnd(); + + // Move caret to last position in document extending selection to new caret position. + void DocumentEndExtend(); + + // Move caret one page up. + void PageUp(); + + // Move caret one page up extending selection to new caret position. + void PageUpExtend(); + + // Move caret one page down. + void PageDown(); + + // Move caret one page down extending selection to new caret position. + void PageDownExtend(); + + // Switch from insert to overtype mode or the reverse. + void EditToggleOvertype(); + + // Cancel any modes such as call tip or auto-completion list display. + void Cancel(); + + // Delete the selection or if no selection, the character before the caret. + void DeleteBack(); + + // If selection is empty or all on one line replace the selection with a tab character. + // If more than one line selected, indent the lines. + void Tab(); + + // Dedent the selected lines. + void BackTab(); + + // Insert a new line, may use a CRLF, CR or LF depending on EOL mode. + void NewLine(); + + // Insert a Form Feed character. + void FormFeed(); + + // Move caret to before first visible character on line. + // If already there move to first character on line. + void VCHome(); + + // Like VCHome but extending selection to new caret position. + void VCHomeExtend(); + + // Magnify the displayed text by increasing the sizes by 1 point. + void ZoomIn(); + + // Make the displayed text smaller by decreasing the sizes by 1 point. + void ZoomOut(); + + // Delete the word to the left of the caret. + void DelWordLeft(); + + // Delete the word to the right of the caret. + void DelWordRight(); + + // Cut the line containing the caret. + void LineCut(); + + // Delete the line containing the caret. + void LineDelete(); + + // Switch the current line with the previous. + void LineTranspose(); + + // Duplicate the current line. + void LineDuplicate(); + + // Transform the selection to lower case. + void LowerCase(); + + // Transform the selection to upper case. + void UpperCase(); + + // Scroll the document down, keeping the caret visible. + void LineScrollDown(); + + // Scroll the document up, keeping the caret visible. + void LineScrollUp(); + + // Delete the selection or if no selection, the character before the caret. + // Will not delete the character before at the start of a line. + void DeleteBackNotLine(); + + // Move caret to first position on display line. + void HomeDisplay(); + + // Move caret to first position on display line extending selection to + // new caret position. + void HomeDisplayExtend(); + + // Move caret to last position on display line. + void LineEndDisplay(); + + // Move caret to last position on display line extending selection to new + // caret position. + void LineEndDisplayExtend(); + + // These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? + // except they behave differently when word-wrap is enabled: + // They go first to the start / end of the display line, like (Home|LineEnd)Display + // The difference is that, the cursor is already at the point, it goes on to the start + // or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. + void HomeWrap(); + void HomeWrapExtend(); + void LineEndWrap(); + void LineEndWrapExtend(); + void VCHomeWrap(); + void VCHomeWrapExtend(); + + // Copy the line containing the caret. + void LineCopy(); + + // Move the caret inside current view if it's not there already. + void MoveCaretInsideView(); + + // How many characters are on a line, not including end of line characters? + int LineLength (int line); + + // Highlight the characters at two positions. + void BraceHighlight (int pos1, int pos2); + + // Highlight the character at a position indicating there is no matching brace. + void BraceBadLight (int pos); + + // Find the position of a matching brace or INVALID_POSITION if no match. + int BraceMatch (int pos); + + // Are the end of line characters visible? + bool GetViewEOL(); + + // Make the end of line characters visible or invisible. + void SetViewEOL (bool visible); + + // Retrieve a pointer to the document object. + void* GetDocPointer(); + + // Change the document object used. + void SetDocPointer (void* docPointer); + + // Set which document modification events are sent to the container. + void SetModEventMask (int mask); + + // Retrieve the column number which text should be kept within. + int GetEdgeColumn(); + + // Set the column number of the edge. + // If text goes past the edge then it is highlighted. + void SetEdgeColumn (int column); + + // Retrieve the edge highlight mode. + int GetEdgeMode(); + + // The edge may be displayed by a line (EDGE_LINE) or by highlighting text that + // goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + void SetEdgeMode (int mode); + + // Retrieve the colour used in edge indication. + wxColour GetEdgeColour(); + + // Change the colour used in edge indication. + void SetEdgeColour (const wxColour& colour); + + // Sets the current caret position to be the search anchor. + void SearchAnchor(); + + // Find some text starting at the search anchor. + // Does not ensure the selection is visible. + int SearchNext (int flags, const wxString& text); + + // Find some text starting at the search anchor and moving backwards. + // Does not ensure the selection is visible. + int SearchPrev (int flags, const wxString& text); + + // Retrieves the number of lines completely visible. + int LinesOnScreen(); + + // Set whether a pop up menu is displayed automatically when the user presses + // the wrong mouse button. + void UsePopUp (bool allowPopUp); + + // Is the selection rectangular? The alternative is the more common stream selection. + bool SelectionIsRectangle(); + + // Set the zoom level. This number of points is added to the size of all fonts. + // It may be positive to magnify or negative to reduce. + void SetZoom (int zoom); + + // Retrieve the zoom level. + int GetZoom(); + + // Create a new document object. + // Starts with reference count of 1 and not selected into editor. + void* CreateDocument(); + + // Extend life of document. + void AddRefDocument (void* docPointer); + + // Release a reference to the document, deleting document if it fades to black. + void ReleaseDocument (void* docPointer); + + // Get which document modification events are sent to the container. + int GetModEventMask(); + + // Change internal focus flag. + void SetSCIFocus (bool focus); + + // Get internal focus flag. + bool GetSCIFocus(); + + // Change error status - 0 = OK. + void SetStatus (int status); + + // Get error status. + int GetStatus(); + + // Set whether the mouse is captured when its button is pressed. + void SetMouseDownCaptures (bool captures); + + // Get whether mouse gets captured. + bool GetMouseDownCaptures(); + + // Sets the cursor to one of the SC_CURSOR* values. + void SetCursorType (int cursorType); + + // Get cursor type. + int GetCursorType(); + + // Change the way control characters are displayed: + // If symbol is < 32, keep the drawn way, else, use the given character. + void SetControlCharSymbol (int symbol); + + // Get the way control characters are displayed. + int GetControlCharSymbol(); + + // Move to the previous change in capitalisation. + void WordPartLeft(); + + // Move to the previous change in capitalisation extending selection + // to new caret position. + void WordPartLeftExtend(); + + // Move to the change next in capitalisation. + void WordPartRight(); + + // Move to the next change in capitalisation extending selection + // to new caret position. + void WordPartRightExtend(); + + // Set the way the display area is determined when a particular line + // is to be moved to by Find, FindNext, GotoLine, etc. + void SetVisiblePolicy (int visiblePolicy, int visibleSlop); + + // Delete back from the current position to the start of the line. + void DelLineLeft(); + + // Delete forwards from the current position to the end of the line. + void DelLineRight(); + + // Get and Set the xOffset (ie, horizonal scroll position). + void SetXOffset (int newOffset); + int GetXOffset(); + + // Set the last x chosen value to be the caret x position. + void ChooseCaretX(); + + // Set the way the caret is kept visible when going sideway. + // The exclusion zone is given in pixels. + void SetXCaretPolicy (int caretPolicy, int caretSlop); + + // Set the way the line the caret is on is kept visible. + // The exclusion zone is given in lines. + void SetYCaretPolicy (int caretPolicy, int caretSlop); + + // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + void SetPrintWrapMode (int mode); + + // Is printing line wrapped? + int GetPrintWrapMode(); + + // Set a fore colour for active hotspots. + void SetHotspotActiveForeground (bool useSetting, const wxColour& fore); + + // Set a back colour for active hotspots. + void SetHotspotActiveBackground (bool useSetting, const wxColour& back); + + // Enable / Disable underlining active hotspots. + void SetHotspotActiveUnderline (bool underline); + + // Limit hotspots to single line so hotspots on two lines don't merge. + void SetHotspotSingleLine (bool singleLine); + + // Move caret between paragraphs (delimited by empty lines). + void ParaDown(); + void ParaDownExtend(); + void ParaUp(); + void ParaUpExtend(); + + // Given a valid document position, return the previous position taking code + // page into account. Returns 0 if passed 0. + int PositionBefore (int pos); + + // Given a valid document position, return the next position taking code + // page into account. Maximum value returned is the last position in the document. + int PositionAfter (int pos); + + // Copy a range of text to the clipboard. Positions are clipped into the document. + void CopyRange (int startPos, int endPos); + + // Copy argument text to the clipboard. + void CopyText (int length, const wxString& text); + + // Set the selection mode to stream (SC_SEL_STREAM=1) or rectangular (SC_SEL_RECTANGLE=2) or + // by lines (SC_SEL_LINES=3). + void SetSelectionMode (int mode); + + // Get the mode of the current selection. + int GetSelectionMode(); + + // Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). + int GetLineSelStartPosition (int line); + + // Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). + int GetLineSelEndPosition (int line); + + // Move caret down one line, extending rectangular selection to new caret position. + void LineDownRectExtend(); + + // Move caret up one line, extending rectangular selection to new caret position. + void LineUpRectExtend(); + + // Move caret left one character, extending rectangular selection to new caret position. + void CharLeftRectExtend(); + + // Move caret right one character, extending rectangular selection to new caret position. + void CharRightRectExtend(); + + // Move caret to first position on line, extending rectangular selection to new caret position. + void HomeRectExtend(); + + // Move caret to before first visible character on line. + // If already there move to first character on line. + // In either case, extend rectangular selection to new caret position. + void VCHomeRectExtend(); + + // Move caret to last position on line, extending rectangular selection to new caret position. + void LineEndRectExtend(); + + // Move caret one page up, extending rectangular selection to new caret position. + void PageUpRectExtend(); + + // Move caret one page down, extending rectangular selection to new caret position. + void PageDownRectExtend(); + + // Move caret to top of page, or one page up if already at top of page. + void StutteredPageUp(); + + // Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. + void StutteredPageUpExtend(); + + // Move caret to bottom of page, or one page down if already at bottom of page. + void StutteredPageDown(); + + // Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. + void StutteredPageDownExtend(); + + // Move caret left one word, position cursor at end of word. + void WordLeftEnd(); + + // Move caret left one word, position cursor at end of word, extending selection to new caret position. + void WordLeftEndExtend(); + + // Move caret right one word, position cursor at end of word. + void WordRightEnd(); + + // Move caret right one word, position cursor at end of word, extending selection to new caret position. + void WordRightEndExtend(); + + // Set the set of characters making up whitespace for when moving or selecting by word. + // Should be called after SetWordChars. + void SetWhitespaceChars (const wxString& characters); + + // Reset the set of characters for whitespace and word characters to the defaults. + void SetCharsDefault(); + + // Get currently selected item position in the auto-completion list + int AutoCompGetCurrent(); + + // Enlarge the document to a particular size of text bytes. + void Allocate (int bytes); + + // Start notifying the container of all key presses and commands. + void StartRecord(); + + // Stop notifying the container of all key presses and commands. + void StopRecord(); + + // Set the lexing language of the document. + void SetLexer (int lexer); + + // Retrieve the lexing language of the document. + int GetLexer(); + + // Colourise a segment of the document using the current lexing language. + void Colourise (int startPos, int endPos); + + // Set up a value that may be used by a lexer for some optional feature. + void SetProperty (const wxString& key, const wxString& value); + + // Retrieve a value that may be used by a lexer for some optional feature. + wxString GetProperty (const wxString& key); + wxString GetPropertyExpanded (const wxString& key); + int GetPropertyInt (const wxString& key); + + // Retrieve the number of bits the current lexer needs for styling. + int GetStyleBitsNeeded (); + + // Set up the key words used by the lexer. + void SetKeyWords (int keywordSet, const wxString& keyWords); + + // Set the lexing language of the document based on string name. + void SetLexerLanguage (const wxString& language); + +// END of generated section +//---------------------------------------------------------------------- +// Others... + + + // Returns the line number of the line with the caret. + int GetCurrentLine(); + + // Extract style settings from a spec-string which is composed of one or + // more of the following comma separated elements: + // + // bold turns on bold + // italic turns on italics + // fore:[name or #RRGGBB] sets the foreground colour + // back:[name or #RRGGBB] sets the background colour + // face:[facename] sets the font face name to use + // size:[num] sets the font size in points + // eol turns on eol filling + // underline turns on underlining + // + void StyleSetSpec (int styleNum, const wxString& spec); + + // Set style size, face, bold, italic, and underline attributes from + // a wxFont's attributes. + void StyleSetFont (int styleNum, const wxFont& font); + + // Set all font style attributes at once. + void StyleSetFontAttr (int styleNum, int size,const wxString& faceName, + bool bold, bool italic, bool underline, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + + // Set the character set of the font in a style. + void StyleSetCharacterSet (int style, int characterSet); + + // Set the font encoding to be used by a style. + void StyleSetFontEncoding (int style, wxFontEncoding encoding); + + // Perform one of the operations defined by the wxSCI_CMD_* constants. + void CmdKeyExecute (int cmd); + + // Set the left and right margin in the edit area, measured in pixels. + void SetMargins (int left, int right); + + // Retrieve the start and end positions of the current selection. +#ifdef SWIG + void GetSelection (int* OUTPUT, int* OUTPUT); +#else + void GetSelection (int* startPos, int* endPos); +#endif + + // Retrieve the point in the window where a position is displayed. + wxPoint PointFromPosition (int pos); + + // Scroll enough to make the given line visible + void ScrollToLine (int line); + + // Scroll enough to make the given column visible + void ScrollToColumn (int column); + + // Send a message to Scintilla + long SendMsg (int msg, long wp=0, long lp=0); + + + // Set the vertical scrollbar to use instead of the ont that's built-in. + void SetVScrollBar (wxScrollBar* bar); + + // Set the horizontal scrollbar to use instead of the ont that's built-in. + void SetHScrollBar (wxScrollBar* bar); + + // Can be used to prevent the EVT_CHAR handler from adding the char + bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } + void SetLastKeydownProcessed (bool val) { m_lastKeyDownConsumed = val; } + + // Write the contents of the editor to filename + bool SaveFile (const wxString& filename); + + // Load the contents of filename into the editor + bool LoadFile (const wxString& filename); + +#ifdef SCI_USE_DND + // Allow for simulating a DnD DragOver + wxDragResult DoDragOver (wxCoord x, wxCoord y, wxDragResult def); + + // Allow for simulating a DnD DropText + bool DoDropText (long x, long y, const wxString& data); + + // Allow for simulating a DnD DragEnter + wxDragResult DoDragEnter (wxCoord x, wxCoord y, wxDragResult def); + + // Allow for simulating a DnD DragEnter + void DoDragLeave (); + +#endif + + // Specify whether anti-aliased fonts should be used. Will have no effect + // on some platforms, but on some (wxMac for example) can greatly improve + // performance. + void SetUseAntiAliasing (bool useAA); + + // Returns the current UseAntiAliasing setting. + bool GetUseAntiAliasing(); + +#if wxCHECK_VERSION(2, 5, 0) + // The following methods are nearly equivallent to their similarly named + // cousins above. The difference is that these methods bypass wxString + // and always use a char* even if used in a unicode build of wxWidgets. + // In that case the character data will be utf-8 encoded since that is + // what is used internally by Scintilla in unicode builds. + + // Add text to the document at current position. + void AddTextRaw (const char* text); + + // Insert string at a position. + void InsertTextRaw (int pos, const char* text); + + // Retrieve the text of the line containing the caret. + // Returns the index of the caret on the line. +#ifdef SWIG + wxCharBuffer GetCurLineRaw (int* OUTPUT); +#else + wxCharBuffer GetCurLineRaw (int* linePos = NULL); +#endif + + // Retrieve the contents of a line. + wxCharBuffer GetLineRaw (int line); + + // Retrieve the selected text. + wxCharBuffer GetSelectedTextRaw(); + + // Retrieve a range of text. + wxCharBuffer GetTextRangeRaw (int startPos, int endPos); + + // Replace the contents of the document with the argument text. + void SetTextRaw (const char* text); + + // Retrieve all the text in the document. + wxCharBuffer GetTextRaw(); + + // Append a string to the end of the document without changing the selection. + void AppendTextRaw (const char* text); + +#ifdef SWIG + %pythoncode "_stc_utf8_methods.py" +#endif +#endif + + +//---------------------------------------------------------------------- + +#ifndef SWIG +protected: + // Event handlers + void OnPaint (wxPaintEvent& evt); + void OnScrollWin (wxScrollWinEvent& evt); + void OnScroll (wxScrollEvent& evt); + void OnSize (wxSizeEvent& evt); + void OnMouseLeftDown (wxMouseEvent& evt); + void OnMouseMove (wxMouseEvent& evt); + void OnMouseLeftUp (wxMouseEvent& evt); + void OnMouseRightUp (wxMouseEvent& evt); + void OnMouseMiddleUp (wxMouseEvent& evt); + void OnContextMenu (wxContextMenuEvent& evt); + void OnMouseWheel (wxMouseEvent& evt); + void OnChar (wxKeyEvent& evt); + void OnKeyDown (wxKeyEvent& evt); + void OnLoseFocus (wxFocusEvent& evt); + void OnGainFocus (wxFocusEvent& evt); + void OnSysColourChanged (wxSysColourChangedEvent& evt); + void OnEraseBackground (wxEraseEvent& evt); + void OnMenu (wxCommandEvent& evt); + void OnListBox (wxCommandEvent& evt); + void OnIdle (wxIdleEvent& evt); + + virtual wxSize DoGetBestSize() const; + + // Turn notifications from Scintilla into events + void NotifyChange(); + void NotifyParent (SCI_SCOPE(SCNotification*) scn); // [CHAGED] + + ScintillaWX* m_swx; + wxStopWatch m_stopWatch; + wxScrollBar* m_vScrollBar; + wxScrollBar* m_hScrollBar; + bool m_lastKeyDownConsumed; + + friend class ScintillaWX; + friend class Platform; + +private: + DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxScintilla) +#endif +}; + +//---------------------------------------------------------------------- + +class WXDLLIMPEXP_SCI wxScintillaEvent : public wxCommandEvent { +public: + wxScintillaEvent (wxEventType commandType=0, int id=0); +#ifndef SWIG + wxScintillaEvent (const wxScintillaEvent& event); +#endif + ~wxScintillaEvent() {} + + void SetPosition (int pos) { m_position = pos; } + void SetKey (int k) { m_key = k; } + void SetModifiers (int m) { m_modifiers = m; } + void SetModificationType (int t) { m_modificationType = t; } + void SetText (const wxString& t) { m_text = t; } + void SetLength (int len) { m_length = len; } + void SetLinesAdded (int num) { m_linesAdded = num; } + void SetLine (int val) { m_line = val; } + void SetFoldLevelNow (int val) { m_foldLevelNow = val; } + void SetFoldLevelPrev (int val) { m_foldLevelPrev = val; } + void SetMargin (int val) { m_margin = val; } + void SetMessage (int val) { m_message = val; } + void SetWParam (int val) { m_wParam = val; } + void SetLParam (int val) { m_lParam = val; } + void SetListType (int val) { m_listType = val; } + void SetX (int val) { m_x = val; } + void SetY (int val) { m_y = val; } + void SetDragText (const wxString& val) { m_dragText = val; } + void SetDragAllowMove (bool val) { m_dragAllowMove = val; } +#ifdef SCI_USE_DND + void SetDragResult (wxDragResult val) { m_dragResult = val; } +#endif + + int GetPosition() const { return m_position; } + int GetKey() const { return m_key; } + int GetModifiers() const { return m_modifiers; } + int GetModificationType() const { return m_modificationType; } + wxString GetText() const { return m_text; } + int GetLength() const { return m_length; } + int GetLinesAdded() const { return m_linesAdded; } + int GetLine() const { return m_line; } + int GetFoldLevelNow() const { return m_foldLevelNow; } + int GetFoldLevelPrev() const { return m_foldLevelPrev; } + int GetMargin() const { return m_margin; } + int GetMessage() const { return m_message; } + int GetWParam() const { return m_wParam; } + int GetLParam() const { return m_lParam; } + int GetListType() const { return m_listType; } + int GetX() const { return m_x; } + int GetY() const { return m_y; } + wxString GetDragText() { return m_dragText; } + bool GetDragAllowMove() { return m_dragAllowMove; } +#ifdef SCI_USE_DND + wxDragResult GetDragResult() { return m_dragResult; } +#endif + + bool GetShift() const; + bool GetControl() const; + bool GetAlt() const; + + virtual wxEvent* Clone() const { return new wxScintillaEvent (*this); } + +#ifndef SWIG +private: + DECLARE_DYNAMIC_CLASS(wxScintillaEvent) + + int m_position; + int m_key; + int m_modifiers; + + int m_modificationType; // wxEVT_SCI_MODIFIED + wxString m_text; + int m_length; + int m_linesAdded; + int m_line; + int m_foldLevelNow; + int m_foldLevelPrev; + + int m_margin; // wxEVT_SCI_MARGINCLICK + + int m_message; // wxEVT_SCI_MACRORECORD + int m_wParam; + int m_lParam; + + int m_listType; + int m_x; + int m_y; + + wxString m_dragText; // wxEVT_SCI_START_DRAG, wxEVT_SCI_DO_DROP + bool m_dragAllowMove; // wxEVT_SCI_START_DRAG + +#if wxUSE_DRAG_AND_DROP + wxDragResult m_dragResult; // wxEVT_SCI_DRAG_OVER,wxEVT_SCI_DO_DROP +#endif +#endif +}; + + + +#ifndef SWIG +BEGIN_DECLARE_EVENT_TYPES() +#if !wxCHECK_VERSION(2, 5, 0) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CHANGE, 1650) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_STYLENEEDED, 1651) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CHARADDED, 1652) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_SAVEPOINTREACHED, 1653) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_SAVEPOINTLEFT, 1654) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_ROMODIFYATTEMPT, 1655) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_KEY, 1656) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DOUBLECLICK, 1657) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_UPDATEUI, 1658) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MODIFIED, 1659) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MACRORECORD, 1660) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MARGINCLICK, 1661) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_NEEDSHOWN, 1662) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_POSCHANGED, 1663) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_PAINTED, 1664) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_USERLISTSELECTION, 1665) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_URIDROPPED, 1666) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DWELLSTART, 1667) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DWELLEND, 1668) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_START_DRAG, 1669) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DRAG_OVER, 1670) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DO_DROP, 1671) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_ZOOM, 1672) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_HOTSPOT_CLICK, 1673) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_HOTSPOT_DCLICK, 1674) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CALLTIP_CLICK, 1675) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_AUTOCOMP_SELECTION, 1676) +#else + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CHANGE, 1650) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_STYLENEEDED, 1651) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CHARADDED, 1652) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_SAVEPOINTREACHED, 1653) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_SAVEPOINTLEFT, 1654) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_ROMODIFYATTEMPT, 1655) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_KEY, 1656) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DOUBLECLICK, 1657) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_UPDATEUI, 1658) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MODIFIED, 1659) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MACRORECORD, 1660) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_MARGINCLICK, 1661) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_NEEDSHOWN, 1662) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_PAINTED, 1664) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_USERLISTSELECTION, 1665) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_URIDROPPED, 1666) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DWELLSTART, 1667) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DWELLEND, 1668) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_START_DRAG, 1669) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DRAG_OVER, 1670) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_DO_DROP, 1671) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_ZOOM, 1672) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_HOTSPOT_CLICK, 1673) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_HOTSPOT_DCLICK, 1674) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_CALLTIP_CLICK, 1675) + DECLARE_EXPORTED_EVENT_TYPE (WXDLLIMPEXP_SCI, wxEVT_SCI_AUTOCOMP_SELECTION, 1676) +#endif +END_DECLARE_EVENT_TYPES() +#else + enum { + wxEVT_SCI_CHANGE, + wxEVT_SCI_STYLENEEDED, + wxEVT_SCI_CHARADDED, + wxEVT_SCI_SAVEPOINTREACHED, + wxEVT_SCI_SAVEPOINTLEFT, + wxEVT_SCI_ROMODIFYATTEMPT, + wxEVT_SCI_KEY, + wxEVT_SCI_DOUBLECLICK, + wxEVT_SCI_UPDATEUI, + wxEVT_SCI_MODIFIED, + wxEVT_SCI_MACRORECORD, + wxEVT_SCI_MARGINCLICK, + wxEVT_SCI_NEEDSHOWN, + wxEVT_SCI_PAINTED, + wxEVT_SCI_USERLISTSELECTION, + wxEVT_SCI_URIDROPPED, + wxEVT_SCI_DWELLSTART, + wxEVT_SCI_DWELLEND, + wxEVT_SCI_START_DRAG, + wxEVT_SCI_DRAG_OVER, + wxEVT_SCI_DO_DROP, + wxEVT_SCI_ZOOM, + wxEVT_SCI_HOTSPOT_CLICK, + wxEVT_SCI_HOTSPOT_DCLICK, + wxEVT_SCI_CALLTIP_CLICK, + wxEVT_SCI_AUTOCOMP_SELECTION + }; +#endif + + + +#ifndef SWIG +typedef void (wxEvtHandler::*wxScintillaEventFunction)(wxScintillaEvent&); + +#if !wxCHECK_VERSION(2, 5, 0) +#define EVT_SCI_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#define EVT_SCI_AUTOCOMP_SELECTION(id, fn)) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_AUTOCOMP_SELECTION id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScintillaEventFunction) & fn, (wxObject *) NULL), +#else +#define EVT_SCI_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#define EVT_SCI_AUTOCOMP_SELECTION(id, fn)) DECLARE_EVENT_TABLE_ENTRY (wxEVT_SCI_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxScintillaEventFunction, & fn ), (wxObject *) NULL), +#endif + +#endif + +//---------------------------------------------------------------------- +// Utility functions used within wxScintilla + +#ifndef SWIG + +inline wxString sci2wx (const char* str) { +#if wxUSE_UNICODE + return wxString (str, wxConvUTF8); +#else + return wxString (str); +#endif +} + +#if wxUSE_UNICODE +wxString sci2wx (const char* str, size_t len); +#else +inline wxString sci2wx (const char* str, size_t len) { + return wxString (str, len); +} +#endif + + +#if wxUSE_UNICODE +inline const wxWX2MBbuf wx2sci (const wxString& str) { + return str.mb_str (wxConvUTF8); +} +#else +inline const wxWX2MBbuf wx2sci (const wxString& str) { + return str.mbc_str(); +} +#endif + +#endif + + +//---------------------------------------------------------------------- +#endif // __WXSCINTILLA_H__ diff --git a/sdk/wxscintilla/src/PlatWX.cpp b/sdk/wxscintilla/src/PlatWX.cpp new file mode 100644 index 0000000000..c6a8628dd4 --- /dev/null +++ b/sdk/wxscintilla/src/PlatWX.cpp @@ -0,0 +1,1540 @@ +// Scintilla source code edit control +// PlatWX.cxx - implementation of platform facilities on wxWidgets +// Copyright 1998-1999 by Neil Hodgson +// Robin Dunn +// The License.txt file describes the conditions under which this software may be distributed. + +#include + +#include +#include +#include +#include +#include +#include +#include +#ifdef wxHAVE_RAW_BITMAP +#include +#endif + +#include "Platform.h" +#include "PlatWX.h" +#include "wx/wxscintilla.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +namespace Scintilla +{ +#endif + +Point Point::FromLong(long lpoint) { + return Point(lpoint & 0xFFFF, lpoint >> 16); +} + +wxRect wxRectFromPRectangle(PRectangle prc) { + wxRect r(prc.left, prc.top, + prc.Width(), prc.Height()); + return r; +} + +PRectangle PRectangleFromwxRect(wxRect rc) { + return PRectangle(rc.GetLeft(), rc.GetTop(), + rc.GetRight()+1, rc.GetBottom()+1); +} + +wxColour wxColourFromCA(const ColourAllocated& ca) { + ColourDesired cd(ca.AsLong()); + return wxColour((unsigned char)cd.GetRed(), + (unsigned char)cd.GetGreen(), + (unsigned char)cd.GetBlue()); +} + +//---------------------------------------------------------------------- + +Palette::Palette() { + used = 0; + allowRealization = false; + size = 100; + entries = new ColourPair[size]; +} + +Palette::~Palette() { + Release(); + delete []entries; + entries = 0; +} + +void Palette::Release() { + used = 0; + delete []entries; + size = 100; + entries = new ColourPair[size]; +} + +// This method either adds a colour to the list of wanted colours (want==true) +// or retrieves the allocated colour back to the ColourPair. +// This is one method to make it easier to keep the code for wanting and retrieving in sync. +void Palette::WantFind(ColourPair &cp, bool want) { + if (want) { + for (int i=0; i < used; i++) { + if (entries[i].desired == cp.desired) + return; + } + + if (used >= size) { + int sizeNew = size * 2; + ColourPair *entriesNew = new ColourPair[sizeNew]; + for (int j=0; jSetNoAntiAliasing (!extraFontFlag); + id = font; +} + + +void Font::Release() { + if (id) + delete (wxFont*)id; + id = 0; +} + +//---------------------------------------------------------------------- +class SurfaceImpl : public Surface { +private: + wxDC* hdc; + bool hdcOwned; + wxBitmap* bitmap; + int x; + int y; + bool unicodeMode; + +public: + SurfaceImpl(); + ~SurfaceImpl(); + + virtual void Init(WindowID wid); + virtual void Init(SurfaceID sid, WindowID wid); + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid); + + virtual void Release(); + virtual bool Initialised(); + virtual void PenColour(ColourAllocated fore); + virtual int LogPixelsY(); + virtual int DeviceHeightFont(int points); + virtual void MoveTo(int x_, int y_); + virtual void LineTo(int x_, int y_); + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void FillRectangle(PRectangle rc, ColourAllocated back); + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern); + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int flags); + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource); + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions); + virtual int WidthText(Font &font_, const char *s, int len); + virtual int WidthChar(Font &font_, char ch); + virtual int Ascent(Font &font_); + virtual int Descent(Font &font_); + virtual int InternalLeading(Font &font_); + virtual int ExternalLeading(Font &font_); + virtual int Height(Font &font_); + virtual int AverageCharWidth(Font &font_); + + virtual int SetPalette(Palette *pal, bool inBackGround); + virtual void SetClip(PRectangle rc); + virtual void FlushCachedState(); + + virtual void SetUnicodeMode(bool unicodeMode_); + virtual void SetDBCSMode(int codePage); + + void BrushColour(ColourAllocated back); + void SetFont(Font &font_); +}; + +SurfaceImpl::SurfaceImpl() : + hdc(0), hdcOwned(0), bitmap(0), + x(0), y(0), unicodeMode(0) +{} + +SurfaceImpl::~SurfaceImpl() { + Release(); +} + +void SurfaceImpl::Init(WindowID wid) { +#if 0 + Release(); + hdc = new wxMemoryDC(); + hdcOwned = true; +#else + // On Mac and GTK the DC is not really valid until it has a bitmap + // selected into it. So instead of just creating the DC with no bitmap, + // go ahead and give it one. + InitPixMap(1,1,NULL,wid); +#endif +} + +void SurfaceImpl::Init(SurfaceID hdc_, WindowID) { + Release(); + hdc = (wxDC*)hdc_; +} + +void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID) { + Release(); + hdc = new wxMemoryDC(); + hdcOwned = true; + if (width < 1) width = 1; + if (height < 1) height = 1; + bitmap = new wxBitmap(width, height); + ((wxMemoryDC*)hdc)->SelectObject(*bitmap); +} + + +void SurfaceImpl::Release() { + if (bitmap) { + ((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap); + delete bitmap; + bitmap = 0; + } + if (hdcOwned) { + delete hdc; + hdc = 0; + hdcOwned = false; + } +} + + +bool SurfaceImpl::Initialised() { + return hdc != 0; +} + + +void SurfaceImpl::PenColour(ColourAllocated fore) { + hdc->SetPen(wxPen(wxColourFromCA(fore), 1, wxSOLID)); +} + +void SurfaceImpl::BrushColour(ColourAllocated back) { + hdc->SetBrush(wxBrush(wxColourFromCA(back), wxSOLID)); +} + +void SurfaceImpl::SetFont(Font &font_) { + if (font_.GetID()) { + hdc->SetFont(*((wxFont*)font_.GetID())); + } +} + +int SurfaceImpl::LogPixelsY() { + return hdc->GetPPI().y; +} + +int SurfaceImpl::DeviceHeightFont(int points) { + return points; +} + +void SurfaceImpl::MoveTo(int x_, int y_) { + x = x_; + y = y_; +} + +void SurfaceImpl::LineTo(int x_, int y_) { + hdc->DrawLine(x,y, x_,y_); + x = x_; + y = y_; +} + +void SurfaceImpl::Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back) { + PenColour(fore); + BrushColour(back); + hdc->DrawPolygon(npts, (wxPoint*)pts); +} + +void SurfaceImpl::RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back) { + PenColour(fore); + BrushColour(back); + hdc->DrawRectangle(wxRectFromPRectangle(rc)); +} + +void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back) { + BrushColour(back); + hdc->SetPen(*wxTRANSPARENT_PEN); + hdc->DrawRectangle(wxRectFromPRectangle(rc)); +} + +void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { + wxBrush br; + if (((SurfaceImpl&)surfacePattern).bitmap) + br = wxBrush(*((SurfaceImpl&)surfacePattern).bitmap); + else // Something is wrong so display in red + br = wxBrush(*wxRED, wxSOLID); + hdc->SetPen(*wxTRANSPARENT_PEN); + hdc->SetBrush(br); + hdc->DrawRectangle(wxRectFromPRectangle(rc)); +} + +void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) { + PenColour(fore); + BrushColour(back); + hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4); +} + +void SurfaceImpl::AlphaRectangle (PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int WXUNUSED(flags)) { + +#ifdef wxHAVE_RAW_BITMAP + wxUnusedVar(cornerSize); + int x, y; + wxRect r = wxRectFromPRectangle(rc); + wxBitmap bmp(r.width, r.height, 32); + wxAlphaPixelData pixData(bmp); + pixData.UseAlpha(); + wxAlphaPixelData::Iterator p(pixData); + + // Set the fill pixels + ColourDesired cdf(fill.AsLong()); + int red = cdf.GetRed(); + int green = cdf.GetGreen(); + int blue = cdf.GetBlue(); +#ifdef __WXMSW__ + int aFill = alphaFill; +#else + int aFill = 0xff; +#endif + for (y=0; yDrawBitmap(bmp, r.x, r.y, true); + +#else + wxUnusedVar(cornerSize); + wxUnusedVar(alphaFill); + wxUnusedVar(alphaOutline); + RectangleDraw(rc, outline, fill); +#endif + +} + +void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { + PenColour(fore); + BrushColour(back); + hdc->DrawEllipse(wxRectFromPRectangle(rc)); +} + +void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { + wxRect r = wxRectFromPRectangle(rc); + hdc->Blit(r.x, r.y, r.width, r.height, + ((SurfaceImpl&)surfaceSource).hdc, + from.x, from.y, wxCOPY); +} + +void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font, int ybase, + const char *s, int len, + ColourAllocated fore, ColourAllocated back) { + SetFont(font); + hdc->SetTextForeground(wxColourFromCA(fore)); + hdc->SetTextBackground(wxColourFromCA(back)); + FillRectangle(rc, back); + + // ybase is where the baseline should be, but wxWin uses the upper left + // corner, so I need to calculate the real position for the text... + hdc->DrawText(sci2wx(s, len), rc.left, ybase - font.ascent); +} + +void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font, int ybase, + const char *s, int len, + ColourAllocated fore, ColourAllocated back) { + SetFont(font); + hdc->SetTextForeground(wxColourFromCA(fore)); + hdc->SetTextBackground(wxColourFromCA(back)); + FillRectangle(rc, back); + hdc->SetClippingRegion(wxRectFromPRectangle(rc)); + + // see comments above + hdc->DrawText(sci2wx(s, len), rc.left, ybase - font.ascent); + hdc->DestroyClippingRegion(); +} + + +void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font, int ybase, + const char *s, int len, + ColourAllocated fore) { + + SetFont(font); + hdc->SetTextForeground(wxColourFromCA(fore)); + hdc->SetBackgroundMode(wxTRANSPARENT); + + // ybase is where the baseline should be, but wxWin uses the upper left + // corner, so I need to calculate the real position for the text... + hdc->DrawText(sci2wx(s, len), rc.left, ybase - font.ascent); + + hdc->SetBackgroundMode(wxSOLID); +} + + +void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positions) { + + wxString str = sci2wx(s, len); + SetFont(font); + +#if !wxCHECK_VERSION(2, 5, 0) +#ifndef __WXMAC__ + // Calculate the position of each character based on the widths of + // the previous characters + int* tpos = new int[len+1]; + int totalWidth = 0; + size_t i; + for (i=0; iGetTextExtent(str[i], &w, &h); + totalWidth += w; + tpos[i] = totalWidth; + } +#else + // Instead of a running total, remeasure from the begining of the + // text for each character's position. This is because with AA fonts + // on OS X widths can be fractions of pixels wide when more than one + // are drawn together, so the sum of all character widths is not necessarily + // (and probably not) the same as the whole string width. + int* tpos = new int[len+1]; + size_t i; + for (i=0; iGetTextExtent(str.Left(i+1), &w, &h); + tpos[i] = w; + } +#endif +#else + wxArrayInt tpos; + hdc->GetPartialTextExtents(str, tpos); +#endif + + +#if wxUSE_UNICODE + // Map the widths for UCS-2 characters back to the UTF-8 input string + // NOTE: I don't think this is right for when sizeof(wxChar) > 2, ie wxGTK2 + // so figure it out and fix it! + int j = 0; + size_t ui = 0; + while ((int)j < len) { + unsigned char uch = (unsigned char)s[j]; + positions[j++] = tpos[ui]; + if (uch >= 0x80) { + if (uch < (0x80 + 0x40 + 0x20)) { + positions[j++] = tpos[ui]; + } else { + positions[j++] = tpos[ui]; + positions[j++] = tpos[ui]; + } + } + ui++; + } +#else + + // If not unicode then just use the widths we have +#if !wxCHECK_VERSION(2, 5, 0) + memcpy(positions, tpos, len * sizeof(*tpos)); +#else +#if wxUSE_STL + std::copy(tpos.begin(), tpos.end(), positions); +#else + memcpy(positions, tpos.begin(), len * sizeof(int)); +#endif +#endif +#endif + +#if !wxCHECK_VERSION(2, 5, 0) + delete [] tpos; +#endif +} + + +int SurfaceImpl::WidthText(Font &font, const char *s, int len) { + SetFont(font); + int w; + int h; + + hdc->GetTextExtent(sci2wx(s, len), &w, &h); + return w; +} + + +int SurfaceImpl::WidthChar(Font &font, char ch) { + SetFont(font); + int w; + int h; + char s[2] = { ch, 0 }; + + hdc->GetTextExtent(sci2wx(s, 1), &w, &h); + return w; +} + +#define EXTENT_TEST wxT(" `~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +int SurfaceImpl::Ascent(Font &font) { + SetFont(font); + int w, h, d, e; + hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e); + font.ascent = h - d; + return font.ascent; +} + +int SurfaceImpl::Descent(Font &font) { + SetFont(font); + int w, h, d, e; + hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e); + return d; +} + +int SurfaceImpl::InternalLeading(Font &WXUNUSED(font)) { + return 0; +} + +int SurfaceImpl::ExternalLeading(Font &font) { + SetFont(font); + int w, h, d, e; + hdc->GetTextExtent(EXTENT_TEST, &w, &h, &d, &e); + return e; +} + +int SurfaceImpl::Height(Font &font) { + SetFont(font); + return hdc->GetCharHeight() + 1; +} + +int SurfaceImpl::AverageCharWidth(Font &font) { + SetFont(font); + return hdc->GetCharWidth(); +} + +int SurfaceImpl::SetPalette(Palette *WXUNUSED(pal), bool WXUNUSED(inBackGround)) { + return 0; +} + +void SurfaceImpl::SetClip(PRectangle rc) { + hdc->SetClippingRegion(wxRectFromPRectangle(rc)); +} + +void SurfaceImpl::FlushCachedState() { +} + +void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { + unicodeMode=unicodeMode_; +} + +void SurfaceImpl::SetDBCSMode(int WXUNUSED(codePage)) { + // dbcsMode = codePage == SC_CP_DBCS; +} + + +Surface *Surface::Allocate() { + return new SurfaceImpl; +} + + +//---------------------------------------------------------------------- + + +inline wxWindow* GETWIN(WindowID id) { return (wxWindow*)id; } + +Window::~Window() { +} + +void Window::Destroy() { + if (id) { + Show(false); + GETWIN(id)->Destroy(); + } + id = 0; +} + +bool Window::HasFocus() { + return wxWindow::FindFocus() == GETWIN(id); +} + +PRectangle Window::GetPosition() { + if (! id) return PRectangle(); + wxRect rc(GETWIN(id)->GetPosition(), GETWIN(id)->GetSize()); + return PRectangleFromwxRect(rc); +} + +void Window::SetPosition(PRectangle rc) { + wxRect r = wxRectFromPRectangle(rc); + GETWIN(id)->SetSize(r); +} + +void Window::SetPositionRelative(PRectangle rc, Window) { + SetPosition(rc); // ???? +} + +PRectangle Window::GetClientPosition() { + if (! id) return PRectangle(); + wxSize sz = GETWIN(id)->GetClientSize(); + return PRectangle(0, 0, sz.x, sz.y); +} + +void Window::Show(bool show) { + GETWIN(id)->Show(show); +} + +void Window::InvalidateAll() { + GETWIN(id)->Refresh(false); +} + +void Window::InvalidateRectangle(PRectangle rc) { + wxRect r = wxRectFromPRectangle(rc); + GETWIN(id)->Refresh(false, &r); +} + +void Window::SetFont(Font &font) { + GETWIN(id)->SetFont(*((wxFont*)font.GetID())); +} + +void Window::SetCursor(Cursor curs) { + int cursorId; + + switch (curs) { + case cursorText: + cursorId = wxCURSOR_IBEAM; + break; + case cursorArrow: + cursorId = wxCURSOR_ARROW; + break; + case cursorUp: + cursorId = wxCURSOR_ARROW; // ** no up arrow... wxCURSOR_UPARROW; + break; + case cursorWait: + cursorId = wxCURSOR_WAIT; + break; + case cursorHoriz: + cursorId = wxCURSOR_SIZEWE; + break; + case cursorVert: + cursorId = wxCURSOR_SIZENS; + break; + case cursorReverseArrow: + cursorId = wxCURSOR_RIGHT_ARROW; + break; + case cursorHand: + cursorId = wxCURSOR_HAND; + break; + default: + cursorId = wxCURSOR_ARROW; + break; + } +#ifdef __WXMOTIF__ + wxCursor wc = wxStockCursor(cursorId) ; +#else + wxCursor wc = wxCursor(cursorId) ; +#endif + if(curs != cursorLast) { + GETWIN(id)->SetCursor(wc); + cursorLast = curs; + } +} + + +void Window::SetTitle (const char *s) { + GETWIN(id)->SetLabel (sci2wx(s)); +} + +#ifdef SCI_NAMESPACE +} +#endif + +//---------------------------------------------------------------------- +// Helper classes for ListBox + + +// This is a simple subclass of wxListView that just resets focus to the +// parent when it gets it. +class wxSCIListBox : public wxListView { +public: + wxSCIListBox (wxWindow* parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + long style) : wxListView() { +#ifdef __WXMSW__ + Hide(); // don't flicker as we move it around... +#endif + Create(parent, id, pos, size, style); + } + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + + void OnKillFocus(wxFocusEvent& WXUNUSED(event)) { + // Do nothing. Prevents base class from resetting the colors... + } + +#ifdef __WXMAC__ + // For some reason I don't understand yet the focus doesn't really leave + // the listbox like it should, so if we get any events feed them back to + // the wxSintilla + void OnKeyDown(wxKeyEvent& event) { + GetGrandParent()->GetEventHandler()->ProcessEvent(event); + } + void OnChar(wxKeyEvent& event) { + GetGrandParent()->GetEventHandler()->ProcessEvent(event); + } + + // And we need to force the focus back when being destroyed + ~wxSCIListBox() { + GetGrandParent()->SetFocus(); + } +#endif + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSCIListBox, wxListView) + EVT_SET_FOCUS( wxSCIListBox::OnFocus) + EVT_KILL_FOCUS(wxSCIListBox::OnKillFocus) +#ifdef __WXMAC__ + EVT_KEY_DOWN( wxSCIListBox::OnKeyDown) + EVT_CHAR( wxSCIListBox::OnChar) +#endif +END_EVENT_TABLE() + + +#if wxUSE_POPUPWIN //----------------------------------- +#include + +// TODO: Refactor these two classes to have a common base (or a mix-in) to get +// rid of the code duplication. (Either that or convince somebody to +// implement wxPopupWindow for the Mac!!) +// +// In the meantime, be careful to duplicate any changes as needed... + +// A popup window to place the wxSCIListBox upon +class wxSCIListBoxWin : public wxPopupWindow +{ +private: + wxListView* lv; + CallBackAction doubleClickAction; + void* doubleClickActionData; +public: + wxSCIListBoxWin(wxWindow* parent, wxWindowID id, Point WXUNUSED(location)) : + wxPopupWindow(parent, wxBORDER_NONE) + { + SetBackgroundColour(*wxBLACK); // for our simple border + + lv = new wxSCIListBox(parent, id, wxDefaultPosition, wxDefaultSize, + wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxBORDER_NONE); + lv->SetCursor(wxCursor(wxCURSOR_ARROW)); + lv->InsertColumn(0, wxEmptyString); + lv->InsertColumn(1, wxEmptyString); + + // NOTE: We need to fool the wxListView into thinking that it has the + // focus so it will use the normal selection colour and will look + // "right" to the user. But since the wxPopupWindow or its children + // can't receive focus then we have to pull a fast one and temporarily + // parent the listctrl on the STC window and then call SetFocus and + // then reparent it back to the popup. + lv->SetFocus(); + lv->Reparent(this); +#ifdef __WXMSW__ + lv->Show(); +#endif + } + + + // Set position in client coords + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO) { +#if !wxCHECK_VERSION(2, 5, 0) + if (x != -1) { +#else + if (x != wxDefaultCoord) { +#endif + GetParent()->ClientToScreen(&x, NULL); + } +#if !wxCHECK_VERSION(2, 5, 0) + if (y != -1) { +#else + if (y != wxDefaultCoord) { +#endif + GetParent()->ClientToScreen(NULL, &y); + } + wxPopupWindow::DoSetSize(x, y, width, height, sizeFlags); + } + + // return position as if it were in client coords + virtual void DoGetPosition( int *x, int *y ) const { + int sx, sy; + wxPopupWindow::DoGetPosition(&sx, &sy); + GetParent()->ScreenToClient(&sx, &sy); + if (x) *x = sx; + if (y) *y = sy; + } + + + bool Destroy() { + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + return true; + } + + + int IconWidth() { + wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL); + if (il != NULL) { + int w, h; + il->GetSize(0, w, h); + return w; + } + return 0; + } + + + void SetDoubleClickAction(CallBackAction action, void *data) { + doubleClickAction = action; + doubleClickActionData = data; + } + + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + + void OnSize(wxSizeEvent& event) { + // resize the child + wxSize sz = GetSize(); + sz.x -= 2; + sz.y -= 2; + lv->SetSize(1, 1, sz.x, sz.y); + // reset the column widths + lv->SetColumnWidth(0, IconWidth()+4); + lv->SetColumnWidth(1, sz.x - 2 - lv->GetColumnWidth(0) - + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X)); + event.Skip(); + } + + void OnActivate(wxListEvent& WXUNUSED(event)) { + doubleClickAction(doubleClickActionData); + } + + wxListView* GetLB() { return lv; } + +private: + DECLARE_EVENT_TABLE() + +}; + +BEGIN_EVENT_TABLE(wxSCIListBoxWin, wxPopupWindow) + EVT_SET_FOCUS ( wxSCIListBoxWin::OnFocus) + EVT_SIZE ( wxSCIListBoxWin::OnSize) + EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSCIListBoxWin::OnActivate) +END_EVENT_TABLE() + +#else // wxUSE_POPUPWIN ----------------------------------- + +// A normal window to place the wxSCIListBox upon. +class wxSCIListBoxWin : public wxWindow { +private: + wxListView* lv; + CallBackAction doubleClickAction; + void* doubleClickActionData; +public: + wxSCIListBoxWin(wxWindow* parent, wxWindowID id, Point location) : + wxWindow(parent, id, wxPoint(location.x, location.y), wxSize(0,0), wxSIMPLE_BORDER) { + + lv = new wxSCIListBox(this, id, wxDefaultPosition, wxDefaultSize, + wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxNO_BORDER); + lv->SetCursor(wxCursor(wxCURSOR_ARROW)); + lv->InsertColumn(0, wxEmptyString); + lv->InsertColumn(1, wxEmptyString); + + // Eventhough we immediately reset the focus to the parent, this helps + // things to look right... + lv->SetFocus(); + + Hide(); + } + + + // On OSX and (possibly others) there can still be pending + // messages/events for the list control when Scintilla wants to + // close it, so do a pending delete of it instead of destroying + // immediately. + bool Destroy() { +#ifdef __WXMAC__ + // The bottom edge of this window is not getting properly + // refreshed upon deletion, so help it out... + wxWindow* p = GetParent(); + wxRect r(GetPosition(), GetSize()); + r.SetHeight(r.GetHeight()+1); + p->Refresh(false, &r); +#endif + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + return true; + } + + + int IconWidth() { + wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL); + if (il != NULL) { + int w, h; + il->GetSize(0, w, h); + return w; + } + return 0; + } + + + void SetDoubleClickAction(CallBackAction action, void *data) { + doubleClickAction = action; + doubleClickActionData = data; + } + + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + + void OnSize(wxSizeEvent& event) { + // resize the child + wxSize sz = GetClientSize(); + lv->SetSize(sz); + // reset the column widths + lv->SetColumnWidth(0, IconWidth()+4); + lv->SetColumnWidth(1, sz.x - 2 - lv->GetColumnWidth(0) - + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X)); + event.Skip(); + } + +#ifdef __WXMAC__ + virtual bool Show(bool show = true) { + bool rv = wxWindow::Show(show); + GetParent()->Refresh(false); + return rv; + } +#endif + + void OnActivate(wxListEvent& WXUNUSED(event)) { + doubleClickAction(doubleClickActionData); + } + + wxListView* GetLB() { return lv; } + +private: + DECLARE_EVENT_TABLE() +}; + + +BEGIN_EVENT_TABLE(wxSCIListBoxWin, wxWindow) + EVT_SET_FOCUS ( wxSCIListBoxWin::OnFocus) + EVT_SIZE ( wxSCIListBoxWin::OnSize) + EVT_LIST_ITEM_ACTIVATED(wxID_ANY, wxSCIListBoxWin::OnActivate) +END_EVENT_TABLE() + +#endif // wxUSE_POPUPWIN ----------------------------------- + +inline wxSCIListBoxWin* GETLBW(WindowID win) { + return ((wxSCIListBoxWin*)win); +} + +inline wxListView* GETLB(WindowID win) { + return GETLBW(win)->GetLB(); +} + +//---------------------------------------------------------------------- + +class ListBoxImpl : public ListBox { +private: + int lineHeight; + bool unicodeMode; + int desiredVisibleRows; + int aveCharWidth; + size_t maxStrWidth; + Point location; // Caret location at which the list is opened + wxImageList* imgList; + wxArrayInt* imgTypeMap; + +public: + ListBoxImpl(); + ~ListBoxImpl(); + + virtual void SetFont(Font &font); + virtual void Create(Window &parent, int ctrlID, Point location_, int lineHeight_, bool unicodeMode_); + virtual void SetAverageCharWidth(int width); + virtual void SetVisibleRows(int rows); + virtual int GetVisibleRows() const; + virtual PRectangle GetDesiredRect(); + virtual int CaretFromEdge(); + virtual void Clear(); + virtual void Append(char *s, int type = -1); + virtual void Append(const wxString& text, int type); + virtual int Length(); + virtual void Select(int n); + virtual int GetSelection(); + virtual int Find(const char *prefix); + virtual void GetValue(int n, char *value, int len); + virtual void RegisterImage(int type, const char *xpm_data); + virtual void ClearRegisteredImages(); + virtual void SetDoubleClickAction(CallBackAction, void *); + virtual void SetList(const char* list, char separator, char typesep); +}; + + +ListBoxImpl::ListBoxImpl() + : lineHeight(10), unicodeMode(false), + desiredVisibleRows(5), aveCharWidth(8), maxStrWidth(0), + imgList(NULL), imgTypeMap(NULL) +{ +} + +ListBoxImpl::~ListBoxImpl() { + if (imgList) { + delete imgList; + imgList = NULL; + } + if (imgTypeMap) { + delete imgTypeMap; + imgTypeMap = NULL; + } +} + + +void ListBoxImpl::SetFont(Font &font) { + GETLB(id)->SetFont(*((wxFont*)font.GetID())); +} + + +void ListBoxImpl::Create (Window &parent, int ctrlID, Point location_, + int lineHeight_, bool unicodeMode_) { + lineHeight = lineHeight_; + unicodeMode = unicodeMode_; + maxStrWidth = 0; + id = new wxSCIListBoxWin (GETWIN(parent.GetID()), ctrlID, location_); + if (imgList != NULL) GETLB(id)->SetImageList (imgList, wxIMAGE_LIST_SMALL); +} + + +void ListBoxImpl::SetAverageCharWidth(int width) { + aveCharWidth = width; +} + + +void ListBoxImpl::SetVisibleRows(int rows) { + desiredVisibleRows = rows; +} + + +int ListBoxImpl::GetVisibleRows() const { + return desiredVisibleRows; +} + + +PRectangle ListBoxImpl::GetDesiredRect() { + // wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of + // the max size in Append and calculate it here... + int maxw = maxStrWidth * aveCharWidth; + int maxh ; + + // give it a default if there are no lines, and/or add a bit more + if (maxw == 0) maxw = 100; + maxw += aveCharWidth * 3 + + GETLBW(id)->IconWidth() + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + if (maxw > 600) + maxw = 600; + + // estimate a desired height + int count = GETLB(id)->GetItemCount(); + if (count) { + wxRect rect; + GETLB(id)->GetItemRect(0, rect); + maxh = count * rect.GetHeight(); + if (maxh > 140) // TODO: Use desiredVisibleRows?? + maxh = 140; + + // Try to make the size an exact multiple of some number of lines + int lines = maxh / rect.GetHeight(); + maxh = (lines + 1) * rect.GetHeight() + 2; + } + else + maxh = 100; + + PRectangle rc; + rc.top = 0; + rc.left = 0; + rc.right = maxw; + rc.bottom = maxh; + return rc; +} + + +int ListBoxImpl::CaretFromEdge() { + return 4 + GETLBW(id)->IconWidth(); +} + + +void ListBoxImpl::Clear() { + GETLB(id)->DeleteAllItems(); +} + + +void ListBoxImpl::Append(char *s, int type) { + Append(sci2wx(s), type); +} +void ListBoxImpl::Append(const wxString& text, int type) { + long count = GETLB(id)->GetItemCount(); + long itemID = GETLB(id)->InsertItem(count, wxEmptyString); + GETLB(id)->SetItem(itemID, 1, text); + maxStrWidth = wxMax(maxStrWidth, text.length()); + if (type != -1) { + wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap")); + long idx = imgTypeMap->Item(type); + GETLB(id)->SetItemImage(itemID, idx, idx); + } +} + + +int ListBoxImpl::Length() { + return GETLB(id)->GetItemCount(); +} + + +void ListBoxImpl::Select(int n) { + bool select = true; + if (n == -1) { + n = 0; + select = false; + } + GETLB(id)->Focus(n); + GETLB(id)->Select(n, select); +} + + +int ListBoxImpl::GetSelection() { + return GETLB(id)->GetFirstSelected(); +} + + +int ListBoxImpl::Find(const char *WXUNUSED(prefix)) { + // No longer used + return wxNOT_FOUND; +} + + +void ListBoxImpl::GetValue(int n, char *value, int len) { + wxListItem item; + item.SetId(n); + item.SetColumn(1); + item.SetMask(wxLIST_MASK_TEXT); + GETLB(id)->GetItem(item); + strncpy(value, wx2sci(item.GetText()), len); + value[len-1] = '\0'; +} + + +void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { + wxMemoryInputStream stream(xpm_data, strlen(xpm_data)+1); + wxImage img(stream, wxBITMAP_TYPE_XPM); + wxBitmap bmp(img); + + if (! imgList) { + // assumes all images are the same size + imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), true); + imgTypeMap = new wxArrayInt; + } + + int idx = imgList->Add(bmp); + + // do we need to extend the mapping array? + wxArrayInt& itm = *imgTypeMap; + if ( itm.GetCount() < (size_t)type+1) + itm.Add(-1, type - itm.GetCount() + 1); + + // Add an item that maps type to the image index + itm[type] = idx; +} + +void ListBoxImpl::ClearRegisteredImages() { + if (imgList) { + delete imgList; + imgList = NULL; + } + if (imgTypeMap) { + delete imgTypeMap; + imgTypeMap = NULL; + } + if (id) GETLB(id)->SetImageList(NULL, wxIMAGE_LIST_SMALL); +} + + +void ListBoxImpl::SetDoubleClickAction(CallBackAction action, void *data) { + GETLBW(id)->SetDoubleClickAction(action, data); +} + +void ListBoxImpl::SetList(const char* list, char separator, char typesep) { + GETLB(id)->Freeze(); + Clear(); + wxStringTokenizer tkzr(sci2wx(list), (wxChar)separator); + while (tkzr.HasMoreTokens()) { + wxString token = tkzr.GetNextToken(); + long type = -1; + int pos = token.Find(typesep); + if (pos != -1) { + token.Mid(pos+1).ToLong(&type); + token.Truncate(pos); + } + Append (token, (int)type); + } + GETLB(id)->Thaw(); +} + + +ListBox::ListBox() { +} + +ListBox::~ListBox() { +} + +ListBox *ListBox::Allocate() { + return new ListBoxImpl(); +} + +#ifdef SCI_NAMESPACE +namespace Scintilla +{ +#endif + +//---------------------------------------------------------------------- + +Menu::Menu() : id(0) { +} + +void Menu::CreatePopUp() { + Destroy(); + id = new wxMenu(); +} + +void Menu::Destroy() { + if (id) + delete (wxMenu*)id; + id = 0; +} + +void Menu::Show(Point pt, Window &w) { + GETWIN(w.GetID())->PopupMenu((wxMenu*)id, pt.x - 4, pt.y); + Destroy(); +} + +//---------------------------------------------------------------------- + +DynamicLibrary *DynamicLibrary::Load(const char *WXUNUSED(modulePath)) { + wxFAIL_MSG(wxT("Dynamic lexer loading not implemented yet")); + return NULL; +} + +//---------------------------------------------------------------------- + +ColourDesired Platform::Chrome() { + wxColour c; + c = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + return ColourDesired(c.Red(), c.Green(), c.Blue()); +} + +ColourDesired Platform::ChromeHighlight() { + wxColour c; + c = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT); + return ColourDesired(c.Red(), c.Green(), c.Blue()); +} + +const char *Platform::DefaultFont() { + static char buf[128]; + strcpy(buf, wxNORMAL_FONT->GetFaceName().mbc_str()); + return buf; +} + +int Platform::DefaultFontSize() { + return wxNORMAL_FONT->GetPointSize(); +} + +unsigned int Platform::DoubleClickTime() { + return 500; // **** ::GetDoubleClickTime(); +} + +bool Platform::MouseButtonBounce() { + return false; +} +void Platform::DebugDisplay(const char *s) { + wxLogDebug(sci2wx(s)); +} + +bool Platform::IsKeyDown(int WXUNUSED(key)) { + return false; // I don't think we'll need this. +} + +long Platform::SendScintilla(WindowID w, + unsigned int msg, + unsigned long wParam, + long lParam) { + + wxScintilla* sci = (wxScintilla*)w; + return sci->SendMsg(msg, wParam, lParam); +} + +long Platform::SendScintillaPointer(WindowID w, + unsigned int msg, + unsigned long wParam, + void *lParam) { + + wxScintilla* sci = (wxScintilla*)w; + return sci->SendMsg(msg, wParam, (long)lParam); +} + + +// These are utility functions not really tied to a platform + +int Platform::Minimum(int a, int b) { + if (a < b) + return a; + else + return b; +} + +int Platform::Maximum(int a, int b) { + if (a > b) + return a; + else + return b; +} + +#define TRACE + +void Platform::DebugPrintf(const char *format, ...) { +#ifdef TRACE + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer,format,pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +#endif +} + + +static bool assertionPopUps = true; + +bool Platform::ShowAssertionPopUps(bool assertionPopUps_) { + bool ret = assertionPopUps; + assertionPopUps = assertionPopUps_; + return ret; +} + +void Platform::Assert(const char *c, const char *file, int line) { + char buffer[2000]; + sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line); + if (assertionPopUps) { + /*int idButton = */ + wxMessageBox(sci2wx(buffer), + wxT("Assertion failure"), + wxICON_HAND | wxOK); +// if (idButton == IDRETRY) { +// ::DebugBreak(); +// } else if (idButton == IDIGNORE) { +// // all OK +// } else { +// abort(); +// } + } else { + strcat(buffer, "\r\n"); + Platform::DebugDisplay(buffer); + abort(); + } +} + + +int Platform::Clamp(int val, int minVal, int maxVal) { + if (val > maxVal) + val = maxVal; + if (val < minVal) + val = minVal; + return val; +} + + +bool Platform::IsDBCSLeadByte(int WXUNUSED(codePage), char WXUNUSED(ch)) { + return false; +} + +int Platform::DBCSCharLength(int WXUNUSED(codePage), const char *WXUNUSED(s)) { + return 1; +} + +int Platform::DBCSCharMaxLength() { + return 1; +} +#ifdef __APPLE__ // [CHANGED] +#ifdef SCI_NAMESPACE +bool Platform::WaitMouseMoved(Scintilla::Point pt) { return false; /*::Point mpt; mpt.v = pt.x; mpt.h = pt.y; return ::WaitMouseMoved(mpt);*/} // [CHANGED] +#else +bool Platform::WaitMouseMoved(Point pt) { return false; /*::Point mpt; mpt.v = pt.x; mpt.h = pt.y; return ::WaitMouseMoved(mpt);*/} // [CHANGED]#endif +#endif // [CHAMGED] +#endif + +ElapsedTime::ElapsedTime() { + wxLongLong localTime = wxGetLocalTimeMillis(); + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); +} + +double ElapsedTime::Duration(bool reset) { + wxLongLong prevTime(bigBit, littleBit); + wxLongLong localTime = wxGetLocalTimeMillis(); + if(reset) { + littleBit = localTime.GetLo(); + bigBit = localTime.GetHi(); + } + wxLongLong duration = localTime - prevTime; + double result = duration.ToDouble(); + result /= 1000.0; + return result; +} +#ifdef SCI_NAMESPACE +} // end namespace Scintilla +#endif +//---------------------------------------------------------------------- + +#if wxUSE_UNICODE + +#include "UniConversion.h" + +// Convert using Scintilla's functions instead of wx's, Scintilla's are more +// forgiving and won't assert... + +wxString sci2wx(const char* str, size_t len) +{ + if (!len) + return wxEmptyString; + + size_t wclen = UCS2Length(str, len); + wxWCharBuffer buffer(wclen+1); + + size_t actualLen = UCS2FromUTF8(str, len, buffer.data(), wclen+1); + return wxString(buffer.data(), actualLen); +} + +const wxWX2MBbuf wx2stc(const wxString& str) +{ + const wchar_t* wcstr = str.c_str(); + size_t wclen = str.length(); + size_t len = UTF8Length(wcstr, wclen); + + wxCharBuffer buffer(len+1); + UTF8FromUCS2(wcstr, wclen, buffer.data(), len); + + // TODO check NULL termination!! + + return buffer; +} + +#endif diff --git a/sdk/wxscintilla/src/PlatWX.h b/sdk/wxscintilla/src/PlatWX.h new file mode 100644 index 0000000000..a7c9102ef3 --- /dev/null +++ b/sdk/wxscintilla/src/PlatWX.h @@ -0,0 +1,14 @@ +#ifndef PLATWX_H // [CHANGED] +#define PLATWX_H // [CHANGED] + +#ifdef SCI_NAMESPACE +namespace Scintilla +{ +#endif +wxRect wxRectFromPRectangle(PRectangle prc); +PRectangle PRectangleFromwxRect(wxRect rc); +wxColour wxColourFromCA(const ColourAllocated& ca); +#ifdef SCI_NAMESPACE +} +#endif +#endif // [CHANGED] diff --git a/sdk/wxscintilla/src/ScintillaWX.cpp b/sdk/wxscintilla/src/ScintillaWX.cpp new file mode 100644 index 0000000000..8b62c83f4f --- /dev/null +++ b/sdk/wxscintilla/src/ScintillaWX.cpp @@ -0,0 +1,1179 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: ScintillaWX.cxx +// Purpose: A wxWidgets implementation of Scintilla. A class derived +// from ScintillaBase that uses the "wx platform" defined in +// PlatformWX.cxx This class is one end of a bridge between +// the wx world and the Scintilla world. It needs a peer +// object of type wxScintilla to function. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id: ScintillaWX.cpp,v 1.26 2006/09/22 19:42:14 wyo Exp $ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#include "ScintillaWX.h" +//?#include "ExternalLexer.h" +#include "PlatWX.h" +#include "wx/wxscintilla.h" +#include +#ifdef __WXMSW__ +#include // GetHwndOf() +#endif + +#ifdef SCI_NAMESPACE // begin [CHANGED] +using namespace Scintilla; +#endif // end [CHANGED] + +//---------------------------------------------------------------------- +// Helper classes + +class wxSCITimer : public wxTimer { +public: + wxSCITimer(ScintillaWX* swx) { + this->swx = swx; + } + + void Notify() { + swx->DoTick(); + } + +private: + ScintillaWX* swx; +}; + + +#if wxUSE_DRAG_AND_DROP +class wxStartDragTimer : public wxTimer { +public: + wxStartDragTimer(ScintillaWX* swx) { + this->swx = swx; + } + + void Notify() { + swx->DoStartDrag(); + } + +private: + ScintillaWX* swx; +}; + +bool wxSCIDropTarget::OnDropText(wxCoord x, wxCoord y, const wxString& data) { + return swx->DoDropText(x, y, data); +} + +wxDragResult wxSCIDropTarget::OnEnter(wxCoord x, wxCoord y, wxDragResult def) { + return swx->DoDragEnter(x, y, def); +} + +wxDragResult wxSCIDropTarget::OnDragOver(wxCoord x, wxCoord y, wxDragResult def) { + return swx->DoDragOver(x, y, def); +} + +void wxSCIDropTarget::OnLeave() { + swx->DoDragLeave(); +} +#endif + + +#if wxUSE_POPUPWIN && wxSCI_USE_POPUP +#include +#define wxSCICallTipBase wxPopupWindow +#define param2 wxBORDER_NONE // popup's 2nd param is flags +#else +#define wxSCICallTipBase wxWindow +#define param2 -1 // wxWindow's 2nd param is ID +#endif + +#include + +class wxSCICallTip : public wxSCICallTipBase { +public: + wxSCICallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx) + : wxSCICallTipBase(parent, param2), + m_ct(ct), m_swx(swx), m_cx(-1), m_cy(-1) + { + } + + ~wxSCICallTip() { +#if wxUSE_POPUPWIN && wxSCI_USE_POPUP && defined(__WXGTK__) + wxRect rect = GetRect(); + rect.x = m_cx; + rect.y = m_cy; + GetParent()->Refresh(false, &rect); +#endif + } + + bool AcceptsFocus() const { return false; } + + void OnPaint(wxPaintEvent& WXUNUSED(evt)) { + wxBufferedPaintDC dc(this); + Surface* surfaceWindow = Surface::Allocate(); + surfaceWindow->Init(&dc, m_ct->wDraw.GetID()); + m_ct->PaintCT(surfaceWindow); + surfaceWindow->Release(); + delete surfaceWindow; + } + + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } + + void OnLeftDown(wxMouseEvent& event) { + wxPoint pt = event.GetPosition(); + Point p(pt.x, pt.y); + m_ct->MouseClick(p); + m_swx->CallTipClick(); + } + +#if wxUSE_POPUPWIN && wxSCI_USE_POPUP + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO) { + if (x != -1) { + m_cx = x; + GetParent()->ClientToScreen(&x, NULL); + } + if (y != -1) { + m_cy = y; + GetParent()->ClientToScreen(NULL, &y); + } + wxSCICallTipBase::DoSetSize(x, y, width, height, sizeFlags); + } +#endif + + wxPoint GetMyPosition() { + return wxPoint(m_cx, m_cy); + } + +private: + CallTip* m_ct; + ScintillaWX* m_swx; + int m_cx, m_cy; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(wxSCICallTip, wxSCICallTipBase) + EVT_PAINT(wxSCICallTip::OnPaint) + EVT_SET_FOCUS(wxSCICallTip::OnFocus) + EVT_LEFT_DOWN(wxSCICallTip::OnLeftDown) +END_EVENT_TABLE() + + +//---------------------------------------------------------------------- + +#if wxUSE_DATAOBJ +static wxTextFileType wxConvertEOLMode(int scintillaMode) +{ + wxTextFileType type; + + switch (scintillaMode) { + case wxSCI_EOL_CRLF: + type = wxTextFileType_Dos; + break; + + case wxSCI_EOL_CR: + type = wxTextFileType_Mac; + break; + + case wxSCI_EOL_LF: + type = wxTextFileType_Unix; + break; + + default: + type = wxTextBuffer::typeDefault; + break; + } + return type; +} +#endif // wxUSE_DATAOBJ + + +static int wxCountLines(const char* text, int scintillaMode) +{ + char eolchar; + + switch (scintillaMode) { + case wxSCI_EOL_CRLF: + case wxSCI_EOL_LF: + eolchar = '\n'; + break; + case wxSCI_EOL_CR: + eolchar = '\r'; + break; + default: + return 0; + } + + int count = 0; + int i = 0; + while (text[i] != 0) { + if (text[i] == eolchar) { + count++; + } + i++; + } + + return count; +} + +//---------------------------------------------------------------------- +// Constructor/Destructor + + +ScintillaWX::ScintillaWX(wxScintilla* win) { + capturedMouse = false; + focusEvent = false; + wMain = win; + sci = win; + wheelRotation = 0; + Initialise(); +#ifdef __WXMSW__ +#if wxCHECK_VERSION(2, 5, 0) + sysCaretBitmap = 0; + sysCaretWidth = 0; + sysCaretHeight = 0; +#endif +#endif +#if wxUSE_DRAG_AND_DROP + startDragTimer = new wxStartDragTimer(this); +#endif +} + + +ScintillaWX::~ScintillaWX() { +#if wxUSE_DRAG_AND_DROP + delete startDragTimer; +#endif + Finalise(); +} + +//---------------------------------------------------------------------- +// base class virtuals + + +void ScintillaWX::Initialise() { + //ScintillaBase::Initialise(); +#if wxUSE_DRAG_AND_DROP + dropTarget = new wxSCIDropTarget; + dropTarget->SetScintilla(this); + sci->SetDropTarget(dropTarget); + dragRectangle = false; +#endif +#ifdef __WXMAC__ + vs.extraFontFlag = false; // UseAntiAliasing +#else + vs.extraFontFlag = true; // UseAntiAliasing +#endif +} + + +void ScintillaWX::Finalise() { + ScintillaBase::Finalise(); + SetTicking(false); + SetIdle(false); + DestroySystemCaret(); +} + + +void ScintillaWX::StartDrag() { +#if wxUSE_DRAG_AND_DROP + // We defer the starting of the DnD, otherwise the LeftUp of a normal + // click could be lost and the STC will think it is doing a DnD when the + // user just wanted a normal click. + startDragTimer->Start (200, true); +#endif +} + +void ScintillaWX::DoStartDrag() { +#if wxUSE_DRAG_AND_DROP + wxString dragText = sci2wx (drag.s, drag.len); + + // Send an event to allow the drag text to be changed + wxScintillaEvent evt(wxEVT_SCI_START_DRAG, sci->GetId()); + evt.SetEventObject (sci); + evt.SetDragText (dragText); + evt.SetDragAllowMove (true); + evt.SetPosition (wxMin(sci->GetSelectionStart(), sci->GetSelectionEnd())); + sci->GetEventHandler()->ProcessEvent (evt); + + dragText = evt.GetDragText(); + dragRectangle = drag.rectangular; + if (dragText.Length()) { + wxDropSource source(sci); + wxTextDataObject data(dragText); + wxDragResult result; + + source.SetData(data); + dropWentOutside = true; + result = source.DoDragDrop(evt.GetDragAllowMove()); + if (result == wxDragMove && dropWentOutside) ClearSelection(); + inDragDrop = ddNone; // [CHANGED] + SetDragPosition (invalidPosition); + } +#endif +} + + +bool ScintillaWX::SetIdle(bool on) { + if (idler.state != on) { + // connect or disconnect the EVT_IDLE handler + if (on) + sci->Connect(wxID_ANY, wxEVT_IDLE, + (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxScintilla::OnIdle); + else + sci->Disconnect(wxID_ANY, wxEVT_IDLE, + (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) &wxScintilla::OnIdle); + idler.state = on; + } + return idler.state; +} + + +void ScintillaWX::SetTicking(bool on) { + wxSCITimer* stiTimer; + if (timer.ticking != on) { + timer.ticking = on; + if (timer.ticking) { + stiTimer = new wxSCITimer(this); + stiTimer->Start(timer.tickSize); + timer.tickerID = stiTimer; + } else { + stiTimer = (wxSCITimer*)timer.tickerID; + stiTimer->Stop(); + delete stiTimer; + timer.tickerID = 0; + } + } + timer.ticksToWait = caret.period; +} + + +void ScintillaWX::SetMouseCapture(bool on) { + if (mouseDownCaptures) { + if (on && !capturedMouse) + sci->CaptureMouse(); + else if (!on && capturedMouse && sci->HasCapture()) + sci->ReleaseMouse(); + capturedMouse = on; + } +} + + +bool ScintillaWX::HaveMouseCapture() { + return capturedMouse; +} + + +void ScintillaWX::ScrollText(int linesToMove) { + int dy = vs.lineHeight * (linesToMove); + sci->ScrollWindow(0, dy); + sci->Update(); +} + +void ScintillaWX::SetVerticalScrollPos() { + if (sci->m_vScrollBar == NULL) { // Use built-in scrollbar + sci->SetScrollPos(wxVERTICAL, topLine); + } + else { // otherwise use the one that's been given to us + sci->m_vScrollBar->SetThumbPosition(topLine); + } +} + +void ScintillaWX::SetHorizontalScrollPos() { + if (sci->m_hScrollBar == NULL) { // Use built-in scrollbar + sci->SetScrollPos(wxHORIZONTAL, xOffset); + } + else { // otherwise use the one that's been given to us + sci->m_hScrollBar->SetThumbPosition(xOffset); + } +} + + +const int H_SCROLL_STEP = 20; + +bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { + bool modified = false; + + int vertEnd = nMax; + if (!verticalScrollBarVisible) + vertEnd = 0; + + // Check the vertical scrollbar + if (sci->m_vScrollBar == NULL) { // Use built-in scrollbar + int sbMax = sci->GetScrollRange(wxVERTICAL); + int sbThumb = sci->GetScrollThumb(wxVERTICAL); + int sbPos = sci->GetScrollPos(wxVERTICAL); + if (sbMax != vertEnd || sbThumb != nPage) { + sci->SetScrollbar(wxVERTICAL, sbPos, nPage, vertEnd+1); + modified = true; + } + } + else { // otherwise use the one that's been given to us + int sbMax = sci->m_vScrollBar->GetRange(); + int sbPage = sci->m_vScrollBar->GetPageSize(); + int sbPos = sci->m_vScrollBar->GetThumbPosition(); + if (sbMax != vertEnd || sbPage != nPage) { + sci->m_vScrollBar->SetScrollbar(sbPos, nPage, vertEnd+1, nPage); + modified = true; + } + } + + + // Check the horizontal scrollbar + PRectangle rcText = GetTextRectangle(); + int horizEnd = scrollWidth; + if (horizEnd < 0) + horizEnd = 0; + if (!horizontalScrollBarVisible || (wrapState != eWrapNone)) + horizEnd = 0; + int pageWidth = rcText.Width(); + + if (sci->m_hScrollBar == NULL) { // Use built-in scrollbar + int sbMax = sci->GetScrollRange(wxHORIZONTAL); + int sbThumb = sci->GetScrollThumb(wxHORIZONTAL); + int sbPos = sci->GetScrollPos(wxHORIZONTAL); + if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) { + sci->SetScrollbar(wxHORIZONTAL, sbPos, pageWidth, horizEnd); + modified = true; + if (scrollWidth < pageWidth) { + HorizontalScrollTo(0); + } + } + } + else { // otherwise use the one that's been given to us + int sbMax = sci->m_hScrollBar->GetRange(); + int sbThumb = sci->m_hScrollBar->GetPageSize(); + int sbPos = sci->m_hScrollBar->GetThumbPosition(); + if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) { + sci->m_hScrollBar->SetScrollbar(sbPos, pageWidth, horizEnd, pageWidth); + modified = true; + if (scrollWidth < pageWidth) { + HorizontalScrollTo(0); + } + } + } + + return modified; +} + + +void ScintillaWX::NotifyChange() { + sci->NotifyChange(); +} + + +void ScintillaWX::NotifyParent(SCNotification scn) { + sci->NotifyParent(&scn); +} + + +// This method is overloaded from ScintillaBase in order to prevent the +// AutoComplete window from being destroyed when it gets the focus. There is +// a side effect that the AutoComp will also not be destroyed when switching +// to another window, but I think that is okay. +void ScintillaWX::CancelModes() { + if (! focusEvent) + AutoCompleteCancel(); + ct.CallTipCancel(); + Editor::CancelModes(); +} + + +void ScintillaWX::Copy() { + if (currentPos != anchor) { + SelectionText st; + CopySelectionRange(&st); + CopyToClipboard(st); + } +} + + +void ScintillaWX::Paste() { + pdoc->BeginUndoAction(); + ClearSelection(); + +#if wxUSE_DATAOBJ + wxTextDataObject data; + bool gotData = false; + + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(false); + gotData = wxTheClipboard->GetData(data); + wxTheClipboard->Close(); + } + if (gotData) { + wxString text = wxTextBuffer::Translate(data.GetText(), + wxConvertEOLMode(pdoc->eolMode)); + wxWX2MBbuf buf = (wxWX2MBbuf) wx2sci (text); + +#if wxUSE_UNICODE + // free up the old character buffer in case the text is real big + data.SetText(wxEmptyString); + text = wxEmptyString; +#endif + int len = strlen(buf); + pdoc->InsertString(currentPos, buf, len); + SetEmptySelection(currentPos + len); + } +#endif // wxUSE_DATAOBJ + + pdoc->EndUndoAction(); + NotifyChange(); + Redraw(); +} + + +void ScintillaWX::CopyToClipboard (const SelectionText& st) { +#if wxUSE_CLIPBOARD +#if 0 + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection (false); + wxString text = wxTextBuffer::Translate (sci2wx(st.s, st.len-1)); + + // composite object will hold "plain text" for pasting in other programs and a custom + // object for local use that remembers what kind of selection was made (stream or + // rectangular). + wxDataObjectComposite* obj = new wxDataObjectComposite(); + wxCustomDataObject* rectData = new wxCustomDataObject (wxDF_PRIVATE); + + char* buffer = new char[st.len+1]; + buffer[0] = (st.rectangular)? (char)1 : (char)0; + memcpy (buffer+1, st.s, st.len); + rectData->SetData (st.len+1, buffer); + delete buffer; + + obj->Add (rectData, true); + obj->Add (new wxTextDataObject (text)); + wxTheClipboard->SetData (obj); + wxTheClipboard->Close(); + } +#else + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(false); + wxString text = wxTextBuffer::Translate(sci2wx(st.s, st.len-1)); + wxTheClipboard->SetData(new wxTextDataObject(text)); + wxTheClipboard->Close(); + } +#endif +#else + wxUnusedVar(st); +#endif // wxUSE_CLIPBOARD +} + + +bool ScintillaWX::CanPaste() { +#if wxUSE_CLIPBOARD + bool canPaste = false; + bool didOpen; + + if (Editor::CanPaste()) { + didOpen = !wxTheClipboard->IsOpened(); + if ( didOpen ) + wxTheClipboard->Open(); + + if (wxTheClipboard->IsOpened()) { + wxTheClipboard->UsePrimarySelection(false); + canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); + if (didOpen) + wxTheClipboard->Close(); + } + } + return canPaste; +#else + return false; +#endif // wxUSE_CLIPBOARD +} + +void ScintillaWX::CreateCallTipWindow(PRectangle) { + if (! ct.wCallTip.Created() ) { + ct.wCallTip = new wxSCICallTip(sci, &ct, this); + ct.wDraw = ct.wCallTip; + } +} + + +void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { + if (!label[0]) + ((wxMenu*)popup.GetID())->AppendSeparator(); + else + ((wxMenu*)popup.GetID())->Append(cmd, wxGetTranslation(sci2wx(label))); + + if (!enabled) + ((wxMenu*)popup.GetID())->Enable(cmd, enabled); +} + + +// This is called by the Editor base class whenever something is selected +void ScintillaWX::ClaimSelection() { +#if 0 + // Until wxGTK is able to support using both the primary selection and the + // clipboard at the same time I think it causes more problems than it is + // worth to implement this method. Selecting text should not clear the + // clipboard. --Robin +#ifdef __WXGTK__ + // Put the selected text in the PRIMARY selection + if (currentPos != anchor) { + SelectionText st; + CopySelectionRange(&st); + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(true); + wxString text = sci2wx(st.s, st.len); + wxTheClipboard->SetData(new wxTextDataObject(text)); + wxTheClipboard->UsePrimarySelection(false); + wxTheClipboard->Close(); + } + } +#endif +#endif +} + + +void ScintillaWX::UpdateSystemCaret() { +#ifdef __WXMSW__ + if (hasFocus) { + if (HasCaretSizeChanged()) { + DestroySystemCaret(); + CreateSystemCaret(); + } + Point pos = LocationFromPosition(currentPos); +#if wxCHECK_VERSION(2, 5, 0) + ::SetCaretPos(pos.x, pos.y); +#endif + } +#endif +} + + +bool ScintillaWX::HasCaretSizeChanged() { +#ifdef __WXMSW__ +#if !wxCHECK_VERSION(2, 5, 0) + return false; +#else + if (( (0 != vs.caretWidth) && (sysCaretWidth != vs.caretWidth) ) + || (0 != vs.lineHeight) && (sysCaretHeight != vs.lineHeight)) { + return true; + } +#endif +#endif + return false; +} + +bool ScintillaWX::CreateSystemCaret() { +#ifdef __WXMSW__ +#if !wxCHECK_VERSION(2, 5, 0) + return false; +#else + sysCaretWidth = vs.caretWidth; + if (0 == sysCaretWidth) { + sysCaretWidth = 1; + } + sysCaretHeight = vs.lineHeight; + int bitmapSize = (((sysCaretWidth + 15) & ~15) >> 3) * sysCaretHeight; + char *bits = new char[bitmapSize]; + memset(bits, 0, bitmapSize); + sysCaretBitmap = ::CreateBitmap(sysCaretWidth, sysCaretHeight, 1, + 1, reinterpret_cast(bits)); + delete [] bits; + BOOL retval = ::CreateCaret(GetHwndOf(sci), sysCaretBitmap, + sysCaretWidth, sysCaretHeight); + ::ShowCaret(GetHwndOf(sci)); + return retval != 0; +#endif +#else + return false; +#endif +} + +bool ScintillaWX::DestroySystemCaret() { +#ifdef __WXMSW__ +#if !wxCHECK_VERSION(2, 5, 0) + return false; +#else + ::HideCaret(GetHwndOf(sci)); + BOOL retval = ::DestroyCaret(); + if (sysCaretBitmap) { + ::DeleteObject(sysCaretBitmap); + sysCaretBitmap = 0; + } + return retval != 0; +#endif +#else + return false; +#endif +} + + +//---------------------------------------------------------------------- + +long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/, long /*lParam*/) { + return 0; +} + +long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { + switch (iMessage) { + case SCI_CALLTIPSHOW: { + // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx + // because of the little tweak that needs done below for wxGTK. + // When updating new versions double check that this is still + // needed, and that any new code there is copied here too. + Point pt = LocationFromPosition(wParam); + char* defn = reinterpret_cast(lParam); + AutoCompleteCancel(); + pt.y += vs.lineHeight; + PRectangle rc = ct.CallTipStart(currentPos, pt, + defn, + vs.styles[STYLE_DEFAULT].fontName, + vs.styles[STYLE_DEFAULT].sizeZoomed, + CodePage(), + vs.styles[STYLE_DEFAULT].characterSet, + wMain); + // If the call-tip window would be out of the client + // space, adjust so it displays above the text. + PRectangle rcClient = GetClientRectangle(); + if (rc.bottom > rcClient.bottom) { +#ifdef __WXGTK__ + int offset = int(vs.lineHeight * 1.25) + rc.Height(); +#else + int offset = vs.lineHeight + rc.Height(); +#endif + rc.top -= offset; + rc.bottom -= offset; + } + // Now display the window. + CreateCallTipWindow(rc); + ct.wCallTip.SetPositionRelative(rc, wMain); + ct.wCallTip.Show(); + break; + } +/*? TODO +#ifdef SCI_LEXER + case SCI_LOADLEXERLIBRARY: + LexerManager::GetInstance()->Load((const char*)lParam); + break; +#endif ?*/ + default: + return ScintillaBase::WndProc(iMessage, wParam, lParam); + } + return 0; +} + + + +//---------------------------------------------------------------------- +// Event delegates + +void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { + + paintState = painting; + Surface* surfaceWindow = Surface::Allocate(); + surfaceWindow->Init(dc, wMain.GetID()); + rcPaint = PRectangleFromwxRect(rect); + PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + + ClipChildren(*dc, rcPaint); + Paint(surfaceWindow, rcPaint); + + delete surfaceWindow; + if (paintState == paintAbandoned) { + // Painting area was insufficient to cover new styling or brace + // highlight positions + FullPaint(); + } + paintState = notPainting; +} + + +void ScintillaWX::DoHScroll(int type, int pos) { + int xPos = xOffset; + PRectangle rcText = GetTextRectangle(); + int pageWidth = rcText.Width() * 2 / 3; + if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP) + xPos -= H_SCROLL_STEP; + else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN) + xPos += H_SCROLL_STEP; + else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP) + xPos -= pageWidth; + else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN) { + xPos += pageWidth; + if (xPos > scrollWidth - rcText.Width()) { + xPos = scrollWidth - rcText.Width(); + } + } + else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP) + xPos = 0; + else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM) + xPos = scrollWidth; + else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK) + xPos = pos; + + HorizontalScrollTo(xPos); +} + +void ScintillaWX::DoVScroll(int type, int pos) { + int topLineNew = topLine; + if (type == wxEVT_SCROLLWIN_LINEUP || type == wxEVT_SCROLL_LINEUP) + topLineNew -= 1; + else if (type == wxEVT_SCROLLWIN_LINEDOWN || type == wxEVT_SCROLL_LINEDOWN) + topLineNew += 1; + else if (type == wxEVT_SCROLLWIN_PAGEUP || type == wxEVT_SCROLL_PAGEUP) + topLineNew -= LinesToScroll(); + else if (type == wxEVT_SCROLLWIN_PAGEDOWN || type == wxEVT_SCROLL_PAGEDOWN) + topLineNew += LinesToScroll(); + else if (type == wxEVT_SCROLLWIN_TOP || type == wxEVT_SCROLL_TOP) + topLineNew = 0; + else if (type == wxEVT_SCROLLWIN_BOTTOM || type == wxEVT_SCROLL_BOTTOM) + topLineNew = MaxScrollPos(); + else if (type == wxEVT_SCROLLWIN_THUMBTRACK || type == wxEVT_SCROLL_THUMBTRACK) + topLineNew = pos; + + ScrollTo(topLineNew); +} + +void ScintillaWX::DoMouseWheel(int rotation, int delta, + int linesPerAction, int ctrlDown, + bool isPageScroll ) { + int topLineNew = topLine; + int lines; + + if (ctrlDown) { // Zoom the fonts if Ctrl key down + if (rotation < 0) { + KeyCommand(SCI_ZOOMIN); + } + else { + KeyCommand(SCI_ZOOMOUT); + } + } + else { // otherwise just scroll the window + if ( !delta ) + delta = 120; + wheelRotation += rotation; + lines = wheelRotation / delta; + wheelRotation -= lines * delta; + if (lines != 0) { + if (isPageScroll) + lines = lines * LinesOnScreen(); // lines is either +1 or -1 + else + lines *= linesPerAction; + topLineNew -= lines; + ScrollTo(topLineNew); + } + } +} + + +void ScintillaWX::DoSize(int WXUNUSED(width), int WXUNUSED(height)) { + ChangeSize(); +} + +void ScintillaWX::DoLoseFocus(){ + focusEvent = true; + SetFocusState(false); + focusEvent = false; + DestroySystemCaret(); +} + +void ScintillaWX::DoGainFocus(){ + focusEvent = true; + SetFocusState(true); + focusEvent = false; + DestroySystemCaret(); + CreateSystemCaret(); +} + +void ScintillaWX::DoSysColourChange() { + InvalidateStyleData(); +} + +void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { + ButtonDown(pt, curTime, shift, ctrl, alt); +} + +void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) { + ButtonUp(pt, curTime, ctrl); +#if wxUSE_DRAG_AND_DROP + if (startDragTimer->IsRunning()) { + startDragTimer->Stop(); + SetDragPosition(invalidPosition); + SetEmptySelection(PositionFromLocation(pt)); + ShowCaretAtCurrentPosition(); + } +#endif +} + +void ScintillaWX::DoLeftButtonMove(Point pt) { + ButtonMove(pt); +} + +#ifdef __WXGTK__ +void ScintillaWX::DoMiddleButtonUp(Point pt) { + // Set the current position to the mouse click point and + // then paste in the PRIMARY selection, if any. wxGTK only. + int newPos = PositionFromLocation(pt); + MovePositionTo(newPos, noSel, true); + + pdoc->BeginUndoAction(); + wxTextDataObject data; + bool gotData = false; + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(true); + gotData = wxTheClipboard->GetData(data); + wxTheClipboard->UsePrimarySelection(false); + wxTheClipboard->Close(); + } + if (gotData) { + wxString text = wxTextBuffer::Translate (data.GetText(), + wxConvertEOLMode(pdoc->eolMode)); + data.SetText(wxEmptyString); // free the data object content + wxWX2MBbuf buf = (wxWX2MBbuf)wx2sci(text); + int len = strlen(buf); + pdoc->InsertString(currentPos, buf, len); + SetEmptySelection(currentPos + len); + } + pdoc->EndUndoAction(); + NotifyChange(); + Redraw(); + + ShowCaretAtCurrentPosition(); + EnsureCaretVisible(); +} +#else +void ScintillaWX::DoMiddleButtonUp(Point WXUNUSED(pt)) { +} +#endif + + +void ScintillaWX::DoAddChar(int key) { +#if wxUSE_UNICODE + wxChar wszChars[2]; + wszChars[0] = (wxChar)key; + wszChars[1] = 0; + wxWX2MBbuf buf = (wxWX2MBbuf)wx2sci(wszChars); + AddCharUTF((char*)buf.data(), strlen(buf)); +#else + AddChar((char)key); +#endif +} + + +int ScintillaWX::DoKeyDown(const wxKeyEvent& evt, bool* consumed) +{ + int key = evt.GetKeyCode(); + bool shift = evt.ShiftDown(), + ctrl = evt.ControlDown(), + alt = evt.AltDown(); + + if (ctrl && key >= 1 && key <= 26 && key != WXK_BACK) + key += 'A' - 1; + + switch (key) { + case WXK_DOWN: // fall through + case WXK_NUMPAD_DOWN: key = SCK_DOWN; break; + case WXK_UP: // fall through + case WXK_NUMPAD_UP: key = SCK_UP; break; + case WXK_LEFT: // fall through + case WXK_NUMPAD_LEFT: key = SCK_LEFT; break; + case WXK_RIGHT: // fall through + case WXK_NUMPAD_RIGHT: key = SCK_RIGHT; break; + case WXK_HOME: // fall through + case WXK_NUMPAD_HOME: key = SCK_HOME; break; + case WXK_END: // fall through + case WXK_NUMPAD_END: key = SCK_END; break; +#if !wxCHECK_VERSION(2, 7, 0) + case WXK_PRIOR: // fall through + case WXK_NUMPAD_PRIOR: // fall through +#endif + case WXK_PAGEUP: // fall through + case WXK_NUMPAD_PAGEUP: key = SCK_PRIOR; break; +#if !wxCHECK_VERSION(2, 7, 0) + case WXK_NEXT: // fall through + case WXK_NUMPAD_NEXT: // fall through +#endif + case WXK_PAGEDOWN: // fall through + case WXK_NUMPAD_PAGEDOWN: key = SCK_NEXT; break; + case WXK_DELETE: key = SCK_DELETE; break; + case WXK_INSERT: key = SCK_INSERT; break; + case WXK_ESCAPE: key = SCK_ESCAPE; break; + case WXK_BACK: key = SCK_BACK; break; + case WXK_TAB: key = SCK_TAB; break; + case WXK_RETURN: // fall through + case WXK_NUMPAD_ENTER: key = SCK_RETURN; break; + case WXK_ADD: // fall through + case WXK_NUMPAD_ADD: key = SCK_ADD; break; + case WXK_SUBTRACT: // fall through + case WXK_NUMPAD_SUBTRACT: key = SCK_SUBTRACT; break; + case WXK_DIVIDE: // fall through + case WXK_NUMPAD_DIVIDE: key = SCK_DIVIDE; break; + case WXK_CONTROL: key = 0; break; + case WXK_ALT: key = 0; break; + case WXK_SHIFT: key = 0; break; + case WXK_MENU: key = 0; break; + } + +#ifdef __WXMAC__ + if ( evt.MetaDown() ) { + // check for a few common Mac Meta-key combos and remap them to Ctrl + // for Scintilla + switch ( key ) { + case 'Z': // Undo + case 'X': // Cut + case 'C': // Copy + case 'V': // Paste + case 'A': // Select All + ctrl = true; + break; + } + } +#endif + + int rv = KeyDown(key, shift, ctrl, alt, consumed); + + if (key) + return rv; + else + return 1; +} + + +void ScintillaWX::DoCommand(int ID) { + Command(ID); +} + + +void ScintillaWX::DoContextMenu(Point pt) { + if (displayPopupMenu) + ContextMenu(pt); +} + +void ScintillaWX::DoOnListBox() { + AutoCompleteCompleted(); +} + + +void ScintillaWX::DoOnIdle(wxIdleEvent& evt) { + + if ( Idle() ) + evt.RequestMore(); + else + SetIdle(false); +} + +//---------------------------------------------------------------------- + +#if wxUSE_DRAG_AND_DROP +bool ScintillaWX::DoDropText(long x, long y, const wxString& data) { + SetDragPosition(invalidPosition); + + wxString text = wxTextBuffer::Translate (data, wxConvertEOLMode(pdoc->eolMode)); + + // Send an event to allow the drag details to be changed + wxScintillaEvent evt(wxEVT_SCI_DO_DROP, sci->GetId()); + evt.SetEventObject(sci); + evt.SetDragResult(dragResult); + evt.SetX(x); + evt.SetY(y); + evt.SetPosition(PositionFromLocation(Point(x,y))); + evt.SetDragText(text); + sci->GetEventHandler()->ProcessEvent(evt); + + dragResult = evt.GetDragResult(); + if (dragResult == wxDragMove || dragResult == wxDragCopy) { + DropAt(evt.GetPosition(), + wx2sci(evt.GetDragText()), + dragResult == wxDragMove, + dragRectangle); + return true; + } + return false; +} + + +wxDragResult ScintillaWX::DoDragEnter(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def) { + dragResult = def; + return dragResult; +} + + +wxDragResult ScintillaWX::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { + SetDragPosition(PositionFromLocation(Point(x, y))); + + // Send an event to allow the drag result to be changed + wxScintillaEvent evt(wxEVT_SCI_DRAG_OVER, sci->GetId()); + evt.SetEventObject(sci); + evt.SetDragResult(def); + evt.SetX(x); + evt.SetY(y); + evt.SetPosition(PositionFromLocation(Point(x,y))); + sci->GetEventHandler()->ProcessEvent(evt); + + dragResult = evt.GetDragResult(); + return dragResult; +} + + +void ScintillaWX::DoDragLeave() { + SetDragPosition(invalidPosition); +} +#endif +//---------------------------------------------------------------------- + +// Force the whole window to be repainted +void ScintillaWX::FullPaint() { +#ifndef __WXMAC__ + sci->Refresh(false); +#endif + sci->Update(); +} + + +void ScintillaWX::DoScrollToLine(int line) { + ScrollTo(line); +} + + +void ScintillaWX::DoScrollToColumn(int column) { + HorizontalScrollTo(column * vs.spaceWidth); +} + +#ifdef __WXGTK__ +void ScintillaWX::ClipChildren(wxDC& dc, PRectangle rect) { +// wxGTK > 2.5 doesn't appear to need this explicit clipping code any longer +#if !wxCHECK_VERSION(2, 5, 0) + wxRegion rgn(wxRectFromPRectangle(rect)); + if (ac.Active()) { + wxRect childRect = ((wxWindow*)ac.lb->GetID())->GetRect(); + rgn.Subtract(childRect); + } + if (ct.inCallTipMode) { + wxSCICallTip* tip = (wxSCICallTip*)ct.wCallTip.GetID(); + wxRect childRect = tip->GetRect(); +#if wxUSE_POPUPWIN && wxSCI_USE_POPUP + childRect.SetPosition(tip->GetMyPosition()); +#endif + rgn.Subtract(childRect); + } + + dc.SetClippingRegion(rgn); +#endif +} +#else +void ScintillaWX::ClipChildren(wxDC& WXUNUSED(dc), PRectangle WXUNUSED(rect)) { +} +#endif + + +void ScintillaWX::SetUseAntiAliasing(bool useAA) { + vs.extraFontFlag = useAA; + InvalidateStyleRedraw(); +} + +bool ScintillaWX::GetUseAntiAliasing() { + return vs.extraFontFlag; +} + +//---------------------------------------------------------------------- +//---------------------------------------------------------------------- diff --git a/sdk/wxscintilla/src/ScintillaWX.h b/sdk/wxscintilla/src/ScintillaWX.h new file mode 100644 index 0000000000..7b62815836 --- /dev/null +++ b/sdk/wxscintilla/src/ScintillaWX.h @@ -0,0 +1,211 @@ +//////////////////////////////////////////////////////////////////////////// +// Name: ScintillaWX.h +// Purpose: A wxWidgets implementation of Scintilla. A class derived +// from ScintillaBase that uses the "wx platform" defined in +// PlatWX.cpp. This class is one end of a bridge between +// the wx world and the Scintilla world. It needs a peer +// object of type wxScintilla to function. +// +// Author: Robin Dunn +// +// Created: 13-Jan-2000 +// RCS-ID: $Id: ScintillaWX.h,v 1.9 2006/06/06 19:16:25 wyo Exp $ +// Copyright: (c) 2000 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef __ScintillaWX_h__ +#define __ScintillaWX_h__ +// [CHANGED] BEGIN +#include +#include +#include +#include +#include "Platform.h" +#include "Scintilla.h" +#include "ScintillaWidget.h" +#ifdef SCI_LEXER +#include "SciLexer.h" +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#endif +#include "ContractionState.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "CellBuffer.h" +#include "CallTip.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "AutoComplete.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "Document.h" +#include "PositionCache.h" +#include "Editor.h" +#include "SString.h" +#include "ScintillaBase.h" +#include +#include +#include +#include +// [CHANGED] END + +#ifdef WXMAKINGDLL_SCI + #define WXDLLIMPEXP_SCI WXEXPORT +#elif defined(WXUSINGDLL_SCI) + #define WXDLLIMPEXP_SCI WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_SCI +#endif + +class WXDLLIMPEXP_SCI wxScintilla; // forward +class ScintillaWX; + +#ifndef SCI_SCOPE // begin [CHANGED] + #ifdef SCI_NAMESPACE + #define SCI_SCOPE( x ) Scintilla::x + #else + #define SCI_SCOPE( x ) x + #endif +#endif // end [CHANGED] +//---------------------------------------------------------------------- +// Helper classes + +#if wxUSE_DRAG_AND_DROP +class wxSCIDropTarget : public wxTextDropTarget { +public: + void SetScintilla(ScintillaWX* swx) { + this->swx = swx; + } + + bool OnDropText(wxCoord x, wxCoord y, const wxString& data); + wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def); + wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); + void OnLeave(); + +private: + ScintillaWX* swx; +}; +#endif + +//---------------------------------------------------------------------- + +class ScintillaWX : public SCI_SCOPE( ScintillaBase ) { +public: + + ScintillaWX(wxScintilla* win); + ~ScintillaWX(); + + // base class virtuals + virtual void Initialise(); + virtual void Finalise(); + virtual void StartDrag(); + virtual bool SetIdle(bool on); + virtual void SetTicking(bool on); + virtual void SetMouseCapture(bool on); + virtual bool HaveMouseCapture(); + virtual void ScrollText(int linesToMove); + virtual void SetVerticalScrollPos(); + virtual void SetHorizontalScrollPos(); + virtual bool ModifyScrollBars(int nMax, int nPage); + virtual void Copy(); + virtual void Paste(); + virtual void CopyToClipboard(const SCI_SCOPE(SelectionText) &selectedText); + + virtual void CreateCallTipWindow( SCI_SCOPE(PRectangle) rc); + virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); + virtual void ClaimSelection(); + + virtual long DefWndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); + virtual long WndProc(unsigned int iMessage, + unsigned long wParam, + long lParam); + + virtual void NotifyChange(); + virtual void NotifyParent( SCI_SCOPE(SCNotification) scn); + + virtual void CancelModes(); + + virtual void UpdateSystemCaret(); + + // Event delegates + void DoPaint(wxDC* dc, wxRect rect); + void DoHScroll(int type, int pos); + void DoVScroll(int type, int pos); + void DoSize(int width, int height); + void DoLoseFocus(); + void DoGainFocus(); + void DoSysColourChange(); + void DoLeftButtonDown( SCI_SCOPE(Point) pt, unsigned int curTime, bool shift, bool ctrl, bool alt); // [CHANGED] + void DoLeftButtonUp(SCI_SCOPE(Point) pt, unsigned int curTime, bool ctrl); // [CHANGED] + void DoLeftButtonMove(SCI_SCOPE(Point) pt); // [CHANGED] + void DoMiddleButtonUp(SCI_SCOPE(Point) pt); // [CHANGED] + void DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown, bool isPageScroll); + void DoAddChar(int key); + int DoKeyDown(const wxKeyEvent& event, bool* consumed); + void DoTick() { Tick(); } + void DoOnIdle(wxIdleEvent& evt); + void DoStartDrag(); + +#if wxUSE_DRAG_AND_DROP + bool DoDropText(long x, long y, const wxString& data); + wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def); + wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + void DoDragLeave(); +#endif + + void DoCommand(int ID); + void DoContextMenu(SCI_SCOPE(Point) pt); // [CHANGED] + void DoOnListBox(); + + + // helpers + void FullPaint(); + bool CanPaste(); + bool GetHideSelection() { return hideSelection; } + void DoScrollToLine(int line); + void DoScrollToColumn(int column); + void ClipChildren(wxDC& dc, SCI_SCOPE(PRectangle) rect); + void SetUseAntiAliasing(bool useAA); + bool GetUseAntiAliasing(); + +private: + bool capturedMouse; + bool focusEvent; + wxScintilla* sci; + +#if wxUSE_DRAG_AND_DROP + wxSCIDropTarget* dropTarget; + wxDragResult dragResult; + bool dragRectangle; + wxTimer* startDragTimer; +#endif + + int wheelRotation; + + // For use in creating a system caret + bool HasCaretSizeChanged(); + bool CreateSystemCaret(); + bool DestroySystemCaret(); +#ifdef __WXMSW__ +#if wxCHECK_VERSION(2, 5, 0) + HBITMAP sysCaretBitmap; + int sysCaretWidth; + int sysCaretHeight; +#endif +#endif + + friend class wxSCICallTip; +}; + +//---------------------------------------------------------------------- +#endif diff --git a/sdk/wxscintilla/src/gtkstring.h b/sdk/wxscintilla/src/gtkstring.h new file mode 100644 index 0000000000..38e44823c3 --- /dev/null +++ b/sdk/wxscintilla/src/gtkstring.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/string.h +// Purpose: MyGtkString class declaration +// Author: Vadim Zeitlin +// Created: 2006-10-19 +// RCS-ID: $Id$ +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// +#ifdef __WXGTK__ +#ifndef _GTK_PRIVATE_STRING_H_ +#define _GTK_PRIVATE_STRING_H_ + +// ---------------------------------------------------------------------------- +// Convenience class for g_freeing a gchar* on scope exit automatically +// ---------------------------------------------------------------------------- +#ifdef __WXGTK20__ +#include +#endif +class MyGtkString +{ +public: + explicit MyGtkString(gchar *s) : m_str(s) { } + ~MyGtkString() { g_free(m_str); } + + const gchar *c_str() const { return m_str; } + + operator gchar *() const { return m_str; } + +private: + gchar *m_str; + + DECLARE_NO_COPY_CLASS(MyGtkString) +}; + +#endif // _WX_GTK_PRIVATE_STRING_H_ + + +#endif //__WXGTK__ diff --git a/sdk/wxscintilla/src/scintilla/License.txt b/sdk/wxscintilla/src/scintilla/License.txt new file mode 100644 index 0000000000..cbe25b2fc2 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/License.txt @@ -0,0 +1,20 @@ +License for Scintilla and SciTE + +Copyright 1998-2003 by Neil Hodgson + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/sdk/wxscintilla/src/scintilla/README.txt b/sdk/wxscintilla/src/scintilla/README.txt new file mode 100644 index 0000000000..498a29c38a --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/README.txt @@ -0,0 +1,5 @@ +This directory contains copies of the scintilla/src and +scintilla/include directories from the Scintilla source +distribution. + +The current version of the Scintilla code is 1.62 diff --git a/sdk/wxscintilla/src/scintilla/include/Accessor.h b/sdk/wxscintilla/src/scintilla/include/Accessor.h new file mode 100644 index 0000000000..bfe4d4dcda --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/Accessor.h @@ -0,0 +1,79 @@ +// Scintilla source code edit control +/** @file Accessor.h + ** Rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8}; + +class Accessor; + +typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len); + +/** + * Interface to data in a Scintilla. + */ +class Accessor { +protected: + enum {extremePosition=0x7FFFFFFF}; + /** @a bufferSize is a trade off between time taken to copy the characters + * and retrieval overhead. + * @a slopSize positions the buffer before the desired position + * in case there is some backtracking. */ + enum {bufferSize=4000, slopSize=bufferSize/8}; + char buf[bufferSize+1]; + int startPos; + int endPos; + int codePage; + + virtual bool InternalIsLeadByte(char ch)=0; + virtual void Fill(int position)=0; + +public: + Accessor() : startPos(extremePosition), endPos(0), codePage(0) {} + virtual ~Accessor() {} + char operator[](int position) { + if (position < startPos || position >= endPos) { + Fill(position); + } + return buf[position - startPos]; + } + /** Safe version of operator[], returning a defined value for invalid position. */ + char SafeGetCharAt(int position, char chDefault=' ') { + if (position < startPos || position >= endPos) { + Fill(position); + if (position < startPos || position >= endPos) { + // Position is outside range of document + return chDefault; + } + } + return buf[position - startPos]; + } + bool IsLeadByte(char ch) { + return codePage && InternalIsLeadByte(ch); + } + void SetCodePage(int codePage_) { codePage = codePage_; } + + virtual bool Match(int pos, const char *s)=0; + virtual char StyleAt(int position)=0; + virtual int GetLine(int position)=0; + virtual int LineStart(int line)=0; + virtual int LevelAt(int line)=0; + virtual int Length()=0; + virtual void Flush()=0; + virtual int GetLineState(int line)=0; + virtual int SetLineState(int line, int state)=0; + virtual int GetPropertyInt(const char *key, int defaultValue=0)=0; + virtual char *GetProperties()=0; + + // Style setting + virtual void StartAt(unsigned int start, char chMask=31)=0; + virtual void SetFlags(char chFlags_, char chWhile_)=0; + virtual unsigned int GetStartSegment()=0; + virtual void StartSegment(unsigned int pos)=0; + virtual void ColourTo(unsigned int pos, int chAttr)=0; + virtual void SetLevel(int line, int level)=0; + virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0; + virtual void IndicatorFill(int start, int end, int indicator, int value)=0; +}; diff --git a/sdk/wxscintilla/src/scintilla/include/Face.py b/sdk/wxscintilla/src/scintilla/include/Face.py new file mode 100644 index 0000000000..59ada3dce3 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/Face.py @@ -0,0 +1,107 @@ +# Module for reading and parsing Scintilla.iface file +import string + +def sanitiseLine(line): + if line[-1:] == '\n': line = line[:-1] + if string.find(line, "##") != -1: + line = line[:string.find(line, "##")] + line = string.strip(line) + return line + +def decodeFunction(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + params, rest = string.split(params, ")") + param1, param2 = string.split(params, ",")[0:2] + return retType, name, value, param1, param2 + +def decodeEvent(featureVal): + retType, rest = string.split(featureVal, " ", 1) + nameIdent, params = string.split(rest, "(") + name, value = string.split(nameIdent, "=") + return retType, name, value + +def decodeParam(p): + param = string.strip(p) + type = "" + name = "" + value = "" + if " " in param: + type, nv = string.split(param, " ") + if "=" in nv: + name, value = string.split(nv, "=") + else: + name = nv + return type, name, value + +class Face: + + def __init__(self): + self.order = [] + self.features = {} + self.values = {} + self.events = {} + + def ReadFromFile(self, name): + currentCategory = "" + currentComment = [] + currentCommentFinished = 0 + file = open(name) + for line in file.readlines(): + line = sanitiseLine(line) + if line: + if line[0] == "#": + if line[1] == " ": + if currentCommentFinished: + currentComment = [] + currentCommentFinished = 0 + currentComment.append(line[2:]) + else: + currentCommentFinished = 1 + featureType, featureVal = string.split(line, " ", 1) + if featureType in ["fun", "get", "set"]: + retType, name, value, param1, param2 = decodeFunction(featureVal) + p1 = decodeParam(param1) + p2 = decodeParam(param2) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Param1Type": p1[0], "Param1Name": p1[1], "Param1Value": p1[2], + "Param2Type": p2[0], "Param2Name": p2[1], "Param2Value": p2[2], + "Category": currentCategory, "Comment": currentComment + } + if self.values.has_key(value): + raise "Duplicate value " + value + " " + name + self.values[value] = 1 + self.order.append(name) + elif featureType == "evt": + retType, name, value = decodeEvent(featureVal) + self.features[name] = { + "FeatureType": featureType, + "ReturnType": retType, + "Value": value, + "Category": currentCategory, "Comment": currentComment + } + if self.events.has_key(value): + raise "Duplicate event " + value + " " + name + self.events[value] = 1 + self.order.append(name) + elif featureType == "cat": + currentCategory = featureVal + elif featureType == "val": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + elif featureType == "enu" or featureType == "lex": + name, value = string.split(featureVal, "=", 1) + self.features[name] = { + "FeatureType": featureType, + "Category": currentCategory, + "Value": value } + self.order.append(name) + diff --git a/sdk/wxscintilla/src/scintilla/include/HFacer.py b/sdk/wxscintilla/src/scintilla/include/HFacer.py new file mode 100644 index 0000000000..eacffe5630 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/HFacer.py @@ -0,0 +1,76 @@ +# HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface +# definition file. +# The header files are copied to a temporary file apart from the section between a //++Autogenerated +# comment and a //--Autogenerated comment which is generated by the printHFile and printLexHFile +# functions. After the temporary file is created, it is copied back to the original file name. + +import string +import sys +import os +import Face + +def Contains(s,sub): + return string.find(s, sub) != -1 + +def printLexHFile(f,out): + for name in f.order: + v = f.features[name] + if v["FeatureType"] in ["val"]: + if Contains(name, "SCE_") or Contains(name, "SCLEX_"): + out.write("#define " + name + " " + v["Value"] + "\n") + +def printHFile(f,out): + for name in f.order: + v = f.features[name] + if v["Category"] != "Deprecated": + if v["FeatureType"] in ["fun", "get", "set"]: + featureDefineName = "SCI_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["evt"]: + featureDefineName = "SCN_" + string.upper(name) + out.write("#define " + featureDefineName + " " + v["Value"] + "\n") + elif v["FeatureType"] in ["val"]: + if not (Contains(name, "SCE_") or Contains(name, "SCLEX_")): + out.write("#define " + name + " " + v["Value"] + "\n") + +def CopyWithInsertion(input, output, genfn, definition): + copying = 1 + for line in input.readlines(): + if copying: + output.write(line) + if Contains(line, "//++Autogenerated"): + copying = 0 + genfn(definition, output) + if Contains(line, "//--Autogenerated"): + copying = 1 + output.write(line) + +def contents(filename): + f = file(filename) + t = f.read() + f.close() + return t + +def Regenerate(filename, genfn, definition): + inText = contents(filename) + tempname = "HFacer.tmp" + out = open(tempname,"w") + hfile = open(filename) + CopyWithInsertion(hfile, out, genfn, definition) + out.close() + hfile.close() + outText = contents(tempname) + if inText == outText: + os.unlink(tempname) + else: + os.unlink(filename) + os.rename(tempname, filename) + +f = Face.Face() +try: + f.ReadFromFile("Scintilla.iface") + Regenerate("Scintilla.h", printHFile, f) + Regenerate("SciLexer.h", printLexHFile, f) + print "Maximum ID is", max([x for x in f.values if int(x) < 3000]) +except: + raise diff --git a/sdk/wxscintilla/src/scintilla/include/KeyWords.h b/sdk/wxscintilla/src/scintilla/include/KeyWords.h new file mode 100644 index 0000000000..b9f88ac0b5 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/KeyWords.h @@ -0,0 +1,90 @@ +// Scintilla source code edit control +/** @file KeyWords.h + ** Colourise for particular languages. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler); + +/** + * A LexerModule is responsible for lexing and folding a particular language. + * The class maintains a list of LexerModules which can be searched to find a + * module appropriate to a particular language. + */ +class LexerModule { +protected: + const LexerModule *next; + int language; + LexerFunction fnLexer; + LexerFunction fnFolder; + const char * const * wordListDescriptions; + int styleBits; + + static const LexerModule *base; + static int nextLanguage; + +public: + const char *languageName; + LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_=0, + LexerFunction fnFolder_=0, + const char * const wordListDescriptions_[] = NULL, + int styleBits_=5); + virtual ~LexerModule() { + } + int GetLanguage() const { return language; } + + // -1 is returned if no WordList information is available + int GetNumWordLists() const; + const char *GetWordListDescription(int index) const; + + int GetStyleBitsNeeded() const; + + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + static const LexerModule *Find(int language); + static const LexerModule *Find(const char *languageName); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +/** + * Check if a character is a space. + * This is ASCII specific but is safe with chars >= 0x80. + */ +inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +inline bool iswordchar(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +inline bool iswordstart(char ch) { + return isascii(ch) && (isalnum(ch) || ch == '_'); +} + +inline bool isoperator(char ch) { + if (isascii(ch) && isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || ch == '/' || + ch == '?' || ch == '!' || ch == '.' || ch == '~') + return true; + return false; +} diff --git a/sdk/wxscintilla/src/scintilla/include/Platform.h b/sdk/wxscintilla/src/scintilla/include/Platform.h new file mode 100644 index 0000000000..bd9ee61d26 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/Platform.h @@ -0,0 +1,554 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_MACOSX 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_FOX 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#ifdef _MSC_VER +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#elif defined(MACOSX) +#undef PLAT_MACOSX +#define PLAT_MACOSX 1 + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. + */ +class Point { +public: + int x; + int y; + + explicit Point(int x_=0, int y_=0) : x(x_), y(y_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + static Point FromLong(long lpoint); +}; + +/** + * A geometric rectangle class. + * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + int left; + int top; + int right; + int bottom; + + PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + bool operator==(PRectangle &rc) { + return (rc.left == left) && (rc.right == right) && + (rc.top == top) && (rc.bottom == bottom); + } + bool Contains(Point pt) { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + bool Contains(PRectangle rc) { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + bool Intersects(PRectangle other) { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + int Width() { return right - left; } + int Height() { return bottom - top; } +}; + +/** + * In some circumstances, including Win32 in paletted mode and GTK+, each colour + * must be allocated before use. The desired colours are held in the ColourDesired class, + * and after allocation the allocation entry is stored in the ColourAllocated class. In other + * circumstances, such as Win32 in true colour mode, the allocation process just copies + * the RGB values from the desired to the allocated class. + * As each desired colour requires allocation before it can be used, the ColourPair class + * holds both a ColourDesired and a ColourAllocated + * The Palette class is responsible for managing the palette of colours which contains a + * list of ColourPair objects and performs the allocation. + */ + +/** + * Holds a desired RGB colour. + */ +class ColourDesired { + long co; +public: + ColourDesired(long lcol=0) { + co = lcol; + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { + Set(red, green, blue); + } + + bool operator==(const ColourDesired &other) const { + return co == other.co; + } + + void Set(long lcol) { + co = lcol; + } + + void Set(unsigned int red, unsigned int green, unsigned int blue) { + co = red | (green << 8) | (blue << 16); + } + + static inline unsigned int ValueOfHex(const char ch) { + if (ch >= '0' && ch <= '9') + return ch - '0'; + else if (ch >= 'A' && ch <= 'F') + return ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + else + return 0; + } + + void Set(const char *val) { + if (*val == '#') { + val++; + } + unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); + unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); + unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); + Set(r, g, b); + } + + long AsLong() const { + return co; + } + + unsigned int GetRed() { + return co & 0xff; + } + + unsigned int GetGreen() { + return (co >> 8) & 0xff; + } + + unsigned int GetBlue() { + return (co >> 16) & 0xff; + } +}; + +/** + * Holds an allocated RGB colour which may be an approximation to the desired colour. + */ +class ColourAllocated { + long coAllocated; + +public: + + ColourAllocated(long lcol=0) { + coAllocated = lcol; + } + + void Set(long lcol) { + coAllocated = lcol; + } + + long AsLong() const { + return coAllocated; + } +}; + +/** + * Colour pairs hold a desired colour and an allocated colour. + */ +struct ColourPair { + ColourDesired desired; + ColourAllocated allocated; + + ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { + desired = desired_; + allocated.Set(desired.AsLong()); + } + void Copy() { + allocated.Set(desired.AsLong()); + } +}; + +class Window; // Forward declaration for Palette + +/** + * Colour palette management. + */ +class Palette { + int used; + int size; + ColourPair *entries; +#if PLAT_GTK + void *allocatedPalette; // GdkColor * + int allocatedLen; +#endif + // Private so Palette objects can not be copied + Palette(const Palette &) {} + Palette &operator=(const Palette &) { return *this; } +public: +#if PLAT_WIN + void *hpal; +#endif + bool allowRealization; + + Palette(); + ~Palette(); + + void Release(); + + /** + * This method either adds a colour to the list of wanted colours (want==true) + * or retrieves the allocated colour back to the ColourPair. + * This is one method to make it easier to keep the code for wanting and retrieving in sync. + */ + void WantFind(ColourPair &cp, bool want); + + void Allocate(Window &w); +}; + +/** + * Font management. + */ +class Font { +protected: + FontID id; +#if PLAT_WX + int ascent; +#endif + // Private so Font objects can not be copied + Font(const Font &) {} + Font &operator=(const Font &) { id=0; return *this; } +public: + Font(); + virtual ~Font(); + + virtual void Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool extraFontFlag=false); + virtual void Release(); + + FontID GetID() { return id; } + // Alias another font - caller guarantees not to Release + void SetID(FontID id_) { id = id_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +class Surface { +private: + // Private so Surface objects can not be copied + Surface(const Surface &) {} + Surface &operator=(const Surface &) { return *this; } +public: + Surface() {}; + virtual ~Surface() {}; + static Surface *Allocate(); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourAllocated fore)=0; + virtual int LogPixelsY()=0; + virtual int DeviceHeightFont(int points)=0; + virtual void MoveTo(int x_, int y_)=0; + virtual void LineTo(int x_, int y_)=0; + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, + ColourAllocated outline, int alphaOutline, int flags)=0; + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; + virtual int WidthText(Font &font_, const char *s, int len)=0; + virtual int WidthChar(Font &font_, char ch)=0; + virtual int Ascent(Font &font_)=0; + virtual int Descent(Font &font_)=0; + virtual int InternalLeading(Font &font_)=0; + virtual int ExternalLeading(Font &font_)=0; + virtual int Height(Font &font_)=0; + virtual int AverageCharWidth(Font &font_)=0; + + virtual int SetPalette(Palette *pal, bool inBackGround)=0; + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; +}; + +/** + * A simple callback action passing one piece of untyped user data. + */ +typedef void (*CallBackAction)(void*); + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID id; +#ifdef PLAT_MACOSX + void *windowRef; + void *control; +#endif +public: + Window() : id(0), cursorLast(cursorInvalid) { +#ifdef PLAT_MACOSX + windowRef = 0; + control = 0; +#endif + } + Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) { +#ifdef PLAT_MACOSX + windowRef = 0; + control = 0; +#endif + } + virtual ~Window(); + Window &operator=(WindowID id_) { + id = id_; + return *this; + } + WindowID GetID() const { return id; } + bool Created() const { return id != 0; } + void Destroy(); + bool HasFocus(); + PRectangle GetPosition(); + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, Window relativeTo); + PRectangle GetClientPosition(); + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + void SetTitle(const char *s); +#ifdef PLAT_MACOSX + void SetWindow(void *ref) { windowRef = ref; }; + void SetControl(void *_control) { control = _control; }; +#endif +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +class ListBox : public Window { +public: + ListBox(); + virtual ~ListBox(); + static ListBox *Allocate(); + + virtual void SetFont(Font &font)=0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void ClearRegisteredImages()=0; + virtual void SetDoubleClickAction(CallBackAction, void *)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID id; +public: + Menu(); + MenuID GetID() { return id; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +class ElapsedTime { + long bigBit; + long littleBit; +public: + ElapsedTime(); + double Duration(bool reset=false); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { + // Private so Platform objects can not be copied + Platform(const Platform &) {} + Platform &operator=(const Platform &) { return *this; } +public: + // Should be private because no new Platforms are ever created + // but gcc warns about this + Platform() {} + ~Platform() {} + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static bool MouseButtonBounce(); +#ifdef __APPLE__ + static bool WaitMouseMoved(Point pt); +#endif + static void DebugDisplay(const char *s); + static bool IsKeyDown(int key); + static long SendScintilla( + WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); + static long SendScintillaPointer( + WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); + static bool IsDBCSLeadByte(int codePage, char ch); + static int DBCSCharLength(int codePage, const char *s); + static int DBCSCharMaxLength(); + + // These are utility functions not really tied to a platform + static int Minimum(int a, int b); + static int Maximum(int a, int b); + // Next three assume 16 bit shorts and 32 bit longs + static long LongFromTwoShorts(short a,short b) { + return (a) | ((b) << 16); + } + static short HighShortFromLong(long x) { + return static_cast(x >> 16); + } + static short LowShortFromLong(long x) { + return static_cast(x & 0xffff); + } + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line); + static int Clamp(int val, int minVal, int maxVal); +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#ifdef SCI_NAMESPACE +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) +#endif +#endif + +#ifdef SCI_NAMESPACE +} +#endif + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4244 4309 4514 4710) +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/PropSet.h b/sdk/wxscintilla/src/scintilla/include/PropSet.h new file mode 100644 index 0000000000..3def518666 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/PropSet.h @@ -0,0 +1,121 @@ +// Scintilla source code edit control +/** @file PropSet.h + ** A Java style properties file module. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PROPSET_H +#define PROPSET_H +#include "SString.h" + +bool EqualCaseInsensitive(const char *a, const char *b); + +bool isprefix(const char *target, const char *prefix); + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +struct Property { + unsigned int hash; + char *key; + char *val; + Property *next; + Property() : hash(0), key(0), val(0), next(0) {} +}; + +/** + */ +class PropSet { +protected: + enum { hashRoots=31 }; + Property *props[hashRoots]; + Property *enumnext; + int enumhash; + static bool caseSensitiveFilenames; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + static bool IncludesVar(const char *value, const char *key); + +public: + PropSet *superPS; + PropSet(); + ~PropSet(); + void Set(const char *key, const char *val, int lenKey=-1, int lenVal=-1); + void Set(const char *keyVal); + void Unset(const char *key, int lenKey=-1); + void SetMultiple(const char *s); + SString Get(const char *key); + SString GetExpanded(const char *key); + SString Expand(const char *withVars, int maxExpands=100); + int GetInt(const char *key, int defaultValue=0); + SString GetWild(const char *keybase, const char *filename); + SString GetNewExpand(const char *keybase, const char *filename=""); + void Clear(); + char *ToString(); // Caller must delete[] the return value + bool GetFirst(char **key, char **val); + bool GetNext(char **key, char **val); + static void SetCaseSensitiveFilenames(bool caseSensitiveFilenames_) { + caseSensitiveFilenames = caseSensitiveFilenames_; + } + +private: + // copy-value semantics not implemented + PropSet(const PropSet ©); + void operator=(const PropSet &assign); +}; + +/** + */ +class WordList { +public: + // Each word contains at least one character - a empty word acts as sentinel at the end. + char **words; + char **wordsNoCase; + char *list; + int len; + bool onlyLineEnds; ///< Delimited by any white space or only line ends + bool sorted; + bool sortedNoCase; + int starts[256]; + WordList(bool onlyLineEnds_ = false) : + words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), + sorted(false), sortedNoCase(false) {} + ~WordList() { Clear(); } + operator bool() { return len ? true : false; } + char *operator[](int ind) { return words[ind]; } + void Clear(); + void Set(const char *s); + char *Allocate(int size); + void SetFromAllocated(); + bool InList(const char *s); + bool InListAbbreviated(const char *s, const char marker); + const char *GetNearestWord(const char *wordStart, int searchLen, + bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); + char *GetNearestWords(const char *wordStart, int searchLen, + bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); +}; + +inline bool IsAlphabetic(unsigned int ch) { + return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')); +} + +#ifdef SCI_NAMESPACE +} +#endif + +#ifdef _MSC_VER +// Visual C++ doesn't like the private copy idiom for disabling +// the default copy constructor and operator=, but it's fine. +#pragma warning(disable: 4511 4512) +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/SString.h b/sdk/wxscintilla/src/scintilla/include/SString.h new file mode 100644 index 0000000000..e376f59c10 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/SString.h @@ -0,0 +1,289 @@ +// SciTE - Scintilla based Text Editor +/** @file SString.h + ** A simple string class. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SSTRING_H +#define SSTRING_H + + +// These functions are implemented because each platform calls them something different. +int CompareCaseInsensitive(const char *a, const char *b); +int CompareNCaseInsensitive(const char *a, const char *b, size_t len); +bool EqualCaseInsensitive(const char *a, const char *b); + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +// Define another string class. +// While it would be 'better' to use std::string, that doubles the executable size. +// An SString may contain embedded nul characters. + +/** + * Base class from which the two other classes (SBuffer & SString) + * are derived. + */ +class SContainer { +public: + /** Type of string lengths (sizes) and positions (indexes). */ + typedef size_t lenpos_t; + /** Out of bounds value indicating that the string argument should be measured. */ + enum { measure_length=0xffffffffU}; + +protected: + char *s; ///< The C string + lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string + + SContainer() : s(0), sSize(0) {} + ~SContainer() { + delete []s; // Suppose it was allocated using StringAllocate + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + if (s) { + return sSize; + } else { + return 0; + } + } +public: + /** + * Allocate uninitialized memory big enough to fit a string of the given length. + * @return the pointer to the new string + */ + static char *StringAllocate(lenpos_t len); + /** + * Duplicate a buffer/C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ + static char *StringAllocate( + const char *s, ///< The string to duplicate + lenpos_t len=measure_length); ///< The length of memory to allocate. Optional. +}; + + +/** + * @brief A string buffer class. + * + * Main use is to ask an API the length of a string it can provide, + * then to allocate a buffer of the given size, and to provide this buffer + * to the API to put the string. + * This class is intended to be shortlived, to be transformed as SString + * as soon as it holds the string, so it has little members. + * Note: we assume the buffer is filled by the API. If the length can be shorter, + * we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment. + */ +class SBuffer : protected SContainer { +public: + SBuffer(lenpos_t len) { + s = StringAllocate(len); + if (s) { + *s = '\0'; + sSize = len; + } else { + sSize = 0; + } + } +private: + /// Copy constructor + // Here only to be on the safe size, user should avoid returning SBuffer values. + SBuffer(const SBuffer &source) : SContainer() { + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + /// Default assignment operator + // Same here, shouldn't be used + SBuffer &operator=(const SBuffer &source) { + if (this != &source) { + delete []s; + s = StringAllocate(source.s, source.sSize); + sSize = (s) ? source.sSize : 0; + } + return *this; + } +public: + /** Provide direct read/write access to buffer. */ + char *ptr() { + return s; + } + /** Ownership of the buffer have been taken, so release it. */ + void reset() { + s = 0; + sSize = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } +}; + + +/** + * @brief A simple string class. + * + * Hold the length of the string for quick operations, + * can have a buffer bigger than the string to avoid too many memory allocations and copies. + * May have embedded zeroes as a result of @a substitute, but relies too heavily on C string + * functions to allow reliable manipulations of these strings, other than simple appends, etc. + */ +class SString : protected SContainer { + lenpos_t sLen; ///< The size of the string in s + lenpos_t sizeGrowth; ///< Minimum growth size when appending strings + enum { sizeGrowthDefault = 64 }; + + bool grow(lenpos_t lenNew); + SString &assign(const char *sOther, lenpos_t sSize_=measure_length); + +public: + SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {} + SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(source.s, source.sLen); + sSize = sLen = (s) ? source.sLen : 0; + } + SString(const char *s_) : sizeGrowth(sizeGrowthDefault) { + s = StringAllocate(s_); + sSize = sLen = (s) ? strlen(s) : 0; + } + SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) { + s = buf.ptr(); + sSize = sLen = buf.size(); + // Consumes the given buffer! + buf.reset(); + } + SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) { + // note: expects the "last" argument to point one beyond the range end (a la STL iterators) + s = StringAllocate(s_ + first, last - first); + sSize = sLen = (s) ? last - first : 0; + } + SString(int i); + SString(double d, int precision); + ~SString() { + sLen = 0; + } + void clear() { + if (s) { + *s = '\0'; + } + sLen = 0; + } + /** Size of buffer. */ + lenpos_t size() const { + return SContainer::size(); + } + /** Size of string in buffer. */ + lenpos_t length() const { + return sLen; + } + /** Read access to a character of the string. */ + char operator[](lenpos_t i) const { + return (s && i < sSize) ? s[i] : '\0'; + } + SString &operator=(const char *source) { + return assign(source); + } + SString &operator=(const SString &source) { + if (this != &source) { + assign(source.s, source.sLen); + } + return *this; + } + bool operator==(const SString &sOther) const; + bool operator!=(const SString &sOther) const { + return !operator==(sOther); + } + bool operator==(const char *sOther) const; + bool operator!=(const char *sOther) const { + return !operator==(sOther); + } + bool contains(char ch) const { + return (s && *s) ? strchr(s, ch) != 0 : false; + } + void setsizegrowth(lenpos_t sizeGrowth_) { + sizeGrowth = sizeGrowth_; + } + const char *c_str() const { + return s ? s : ""; + } + /** Give ownership of buffer to caller which must use delete[] to free buffer. */ + char *detach() { + char *sRet = s; + s = 0; + sSize = 0; + sLen = 0; + return sRet; + } + SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const; + SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length); + SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0'); + SString &operator+=(const char *sOther) { + return append(sOther, static_cast(measure_length)); + } + SString &operator+=(const SString &sOther) { + return append(sOther.s, sOther.sLen); + } + SString &operator+=(char ch) { + return append(&ch, 1); + } + SString &appendwithseparator(const char *sOther, char sep) { + return append(sOther, strlen(sOther), sep); + } + SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length); + + /** + * Remove @a len characters from the @a pos position, included. + * Characters at pos + len and beyond replace characters at pos. + * If @a len is 0, or greater than the length of the string + * starting at @a pos, the string is just truncated at @a pos. + */ + void remove(lenpos_t pos, lenpos_t len); + + SString &change(lenpos_t pos, char ch) { + if (pos < sLen) { // character changed must be in string bounds + *(s + pos) = ch; + } + return *this; + } + /** Read an integral numeric value from the string. */ + int value() const { + return s ? atoi(s) : 0; + } + bool startswith(const char *prefix); + bool endswith(const char *suffix); + int search(const char *sFind, lenpos_t start=0) const; + bool contains(const char *sFind) const { + return search(sFind) >= 0; + } + int substitute(char chFind, char chReplace); + int substitute(const char *sFind, const char *sReplace); + int remove(const char *sFind) { + return substitute(sFind, ""); + } +}; + + +/** + * Duplicate a C string. + * Allocate memory of the given size, or big enough to fit the string if length isn't given; + * then copy the given string in the allocated memory. + * @return the pointer to the new string + */ +inline char *StringDup( + const char *s, ///< The string to duplicate + SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional. +{ + return SContainer::StringAllocate(s, len); +} + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/SciLexer.h b/sdk/wxscintilla/src/scintilla/include/SciLexer.h new file mode 100644 index 0000000000..1d24480910 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/SciLexer.h @@ -0,0 +1,1165 @@ +// Scintilla source code edit control +/** @file SciLexer.h + ** Interface to the added lexer functions in the SciLexer version of the edit control. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCILEXER_H +#define SCILEXER_H + +// SciLexer features - not in standard Scintilla + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define SCLEX_CONTAINER 0 +#define SCLEX_NULL 1 +#define SCLEX_PYTHON 2 +#define SCLEX_CPP 3 +#define SCLEX_HTML 4 +#define SCLEX_XML 5 +#define SCLEX_PERL 6 +#define SCLEX_SQL 7 +#define SCLEX_VB 8 +#define SCLEX_PROPERTIES 9 +#define SCLEX_ERRORLIST 10 +#define SCLEX_MAKEFILE 11 +#define SCLEX_BATCH 12 +#define SCLEX_XCODE 13 +#define SCLEX_LATEX 14 +#define SCLEX_LUA 15 +#define SCLEX_DIFF 16 +#define SCLEX_CONF 17 +#define SCLEX_PASCAL 18 +#define SCLEX_AVE 19 +#define SCLEX_ADA 20 +#define SCLEX_LISP 21 +#define SCLEX_RUBY 22 +#define SCLEX_EIFFEL 23 +#define SCLEX_EIFFELKW 24 +#define SCLEX_TCL 25 +#define SCLEX_NNCRONTAB 26 +#define SCLEX_BULLANT 27 +#define SCLEX_VBSCRIPT 28 +#define SCLEX_BAAN 31 +#define SCLEX_MATLAB 32 +#define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 +#define SCLEX_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 +#define SCLEX_CLW 45 +#define SCLEX_CLWNOCASE 46 +#define SCLEX_LOT 47 +#define SCLEX_YAML 48 +#define SCLEX_TEX 49 +#define SCLEX_METAPOST 50 +#define SCLEX_POWERBASIC 51 +#define SCLEX_FORTH 52 +#define SCLEX_ERLANG 53 +#define SCLEX_OCTAVE 54 +#define SCLEX_MSSQL 55 +#define SCLEX_VERILOG 56 +#define SCLEX_KIX 57 +#define SCLEX_GUI4CLI 58 +#define SCLEX_SPECMAN 59 +#define SCLEX_AU3 60 +#define SCLEX_APDL 61 +#define SCLEX_BASH 62 +#define SCLEX_ASN1 63 +#define SCLEX_VHDL 64 +#define SCLEX_CAML 65 +#define SCLEX_BLITZBASIC 66 +#define SCLEX_PUREBASIC 67 +#define SCLEX_HASKELL 68 +#define SCLEX_PHPSCRIPT 69 +#define SCLEX_TADS3 70 +#define SCLEX_REBOL 71 +#define SCLEX_SMALLTALK 72 +#define SCLEX_FLAGSHIP 73 +#define SCLEX_CSOUND 74 +#define SCLEX_FREEBASIC 75 +#define SCLEX_INNOSETUP 76 +#define SCLEX_OPAL 77 +#define SCLEX_SPICE 78 +#define SCLEX_D 79 +#define SCLEX_CMAKE 80 +#define SCLEX_GAP 81 +#define SCLEX_PLM 82 +#define SCLEX_PROGRESS 83 +#define SCLEX_AUTOMATIC 1000 +#define SCE_P_DEFAULT 0 +#define SCE_P_COMMENTLINE 1 +#define SCE_P_NUMBER 2 +#define SCE_P_STRING 3 +#define SCE_P_CHARACTER 4 +#define SCE_P_WORD 5 +#define SCE_P_TRIPLE 6 +#define SCE_P_TRIPLEDOUBLE 7 +#define SCE_P_CLASSNAME 8 +#define SCE_P_DEFNAME 9 +#define SCE_P_OPERATOR 10 +#define SCE_P_IDENTIFIER 11 +#define SCE_P_COMMENTBLOCK 12 +#define SCE_P_STRINGEOL 13 +#define SCE_P_WORD2 14 +#define SCE_P_DECORATOR 15 +#define SCE_C_DEFAULT 0 +#define SCE_C_COMMENT 1 +#define SCE_C_COMMENTLINE 2 +#define SCE_C_COMMENTDOC 3 +#define SCE_C_NUMBER 4 +#define SCE_C_WORD 5 +#define SCE_C_STRING 6 +#define SCE_C_CHARACTER 7 +#define SCE_C_UUID 8 +#define SCE_C_PREPROCESSOR 9 +#define SCE_C_OPERATOR 10 +#define SCE_C_IDENTIFIER 11 +#define SCE_C_STRINGEOL 12 +#define SCE_C_VERBATIM 13 +#define SCE_C_REGEX 14 +#define SCE_C_COMMENTLINEDOC 15 +#define SCE_C_WORD2 16 +#define SCE_C_COMMENTDOCKEYWORD 17 +#define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 +#define SCE_D_DEFAULT 0 +#define SCE_D_COMMENT 1 +#define SCE_D_COMMENTLINE 2 +#define SCE_D_COMMENTDOC 3 +#define SCE_D_COMMENTNESTED 4 +#define SCE_D_NUMBER 5 +#define SCE_D_WORD 6 +#define SCE_D_WORD2 7 +#define SCE_D_WORD3 8 +#define SCE_D_TYPEDEF 9 +#define SCE_D_STRING 10 +#define SCE_D_STRINGEOL 11 +#define SCE_D_CHARACTER 12 +#define SCE_D_OPERATOR 13 +#define SCE_D_IDENTIFIER 14 +#define SCE_D_COMMENTLINEDOC 15 +#define SCE_D_COMMENTDOCKEYWORD 16 +#define SCE_D_COMMENTDOCKEYWORDERROR 17 +#define SCE_TCL_DEFAULT 0 +#define SCE_TCL_COMMENT 1 +#define SCE_TCL_COMMENTLINE 2 +#define SCE_TCL_NUMBER 3 +#define SCE_TCL_WORD_IN_QUOTE 4 +#define SCE_TCL_IN_QUOTE 5 +#define SCE_TCL_OPERATOR 6 +#define SCE_TCL_IDENTIFIER 7 +#define SCE_TCL_SUBSTITUTION 8 +#define SCE_TCL_SUB_BRACE 9 +#define SCE_TCL_MODIFIER 10 +#define SCE_TCL_EXPAND 11 +#define SCE_TCL_WORD 12 +#define SCE_TCL_WORD2 13 +#define SCE_TCL_WORD3 14 +#define SCE_TCL_WORD4 15 +#define SCE_TCL_WORD5 16 +#define SCE_TCL_WORD6 17 +#define SCE_TCL_WORD7 18 +#define SCE_TCL_WORD8 19 +#define SCE_TCL_COMMENT_BOX 20 +#define SCE_TCL_BLOCK_COMMENT 21 +#define SCE_H_DEFAULT 0 +#define SCE_H_TAG 1 +#define SCE_H_TAGUNKNOWN 2 +#define SCE_H_ATTRIBUTE 3 +#define SCE_H_ATTRIBUTEUNKNOWN 4 +#define SCE_H_NUMBER 5 +#define SCE_H_DOUBLESTRING 6 +#define SCE_H_SINGLESTRING 7 +#define SCE_H_OTHER 8 +#define SCE_H_COMMENT 9 +#define SCE_H_ENTITY 10 +#define SCE_H_TAGEND 11 +#define SCE_H_XMLSTART 12 +#define SCE_H_XMLEND 13 +#define SCE_H_SCRIPT 14 +#define SCE_H_ASP 15 +#define SCE_H_ASPAT 16 +#define SCE_H_CDATA 17 +#define SCE_H_QUESTION 18 +#define SCE_H_VALUE 19 +#define SCE_H_XCCOMMENT 20 +#define SCE_H_SGML_DEFAULT 21 +#define SCE_H_SGML_COMMAND 22 +#define SCE_H_SGML_1ST_PARAM 23 +#define SCE_H_SGML_DOUBLESTRING 24 +#define SCE_H_SGML_SIMPLESTRING 25 +#define SCE_H_SGML_ERROR 26 +#define SCE_H_SGML_SPECIAL 27 +#define SCE_H_SGML_ENTITY 28 +#define SCE_H_SGML_COMMENT 29 +#define SCE_H_SGML_1ST_PARAM_COMMENT 30 +#define SCE_H_SGML_BLOCK_DEFAULT 31 +#define SCE_HJ_START 40 +#define SCE_HJ_DEFAULT 41 +#define SCE_HJ_COMMENT 42 +#define SCE_HJ_COMMENTLINE 43 +#define SCE_HJ_COMMENTDOC 44 +#define SCE_HJ_NUMBER 45 +#define SCE_HJ_WORD 46 +#define SCE_HJ_KEYWORD 47 +#define SCE_HJ_DOUBLESTRING 48 +#define SCE_HJ_SINGLESTRING 49 +#define SCE_HJ_SYMBOLS 50 +#define SCE_HJ_STRINGEOL 51 +#define SCE_HJ_REGEX 52 +#define SCE_HJA_START 55 +#define SCE_HJA_DEFAULT 56 +#define SCE_HJA_COMMENT 57 +#define SCE_HJA_COMMENTLINE 58 +#define SCE_HJA_COMMENTDOC 59 +#define SCE_HJA_NUMBER 60 +#define SCE_HJA_WORD 61 +#define SCE_HJA_KEYWORD 62 +#define SCE_HJA_DOUBLESTRING 63 +#define SCE_HJA_SINGLESTRING 64 +#define SCE_HJA_SYMBOLS 65 +#define SCE_HJA_STRINGEOL 66 +#define SCE_HJA_REGEX 67 +#define SCE_HB_START 70 +#define SCE_HB_DEFAULT 71 +#define SCE_HB_COMMENTLINE 72 +#define SCE_HB_NUMBER 73 +#define SCE_HB_WORD 74 +#define SCE_HB_STRING 75 +#define SCE_HB_IDENTIFIER 76 +#define SCE_HB_STRINGEOL 77 +#define SCE_HBA_START 80 +#define SCE_HBA_DEFAULT 81 +#define SCE_HBA_COMMENTLINE 82 +#define SCE_HBA_NUMBER 83 +#define SCE_HBA_WORD 84 +#define SCE_HBA_STRING 85 +#define SCE_HBA_IDENTIFIER 86 +#define SCE_HBA_STRINGEOL 87 +#define SCE_HP_START 90 +#define SCE_HP_DEFAULT 91 +#define SCE_HP_COMMENTLINE 92 +#define SCE_HP_NUMBER 93 +#define SCE_HP_STRING 94 +#define SCE_HP_CHARACTER 95 +#define SCE_HP_WORD 96 +#define SCE_HP_TRIPLE 97 +#define SCE_HP_TRIPLEDOUBLE 98 +#define SCE_HP_CLASSNAME 99 +#define SCE_HP_DEFNAME 100 +#define SCE_HP_OPERATOR 101 +#define SCE_HP_IDENTIFIER 102 +#define SCE_HPHP_COMPLEX_VARIABLE 104 +#define SCE_HPA_START 105 +#define SCE_HPA_DEFAULT 106 +#define SCE_HPA_COMMENTLINE 107 +#define SCE_HPA_NUMBER 108 +#define SCE_HPA_STRING 109 +#define SCE_HPA_CHARACTER 110 +#define SCE_HPA_WORD 111 +#define SCE_HPA_TRIPLE 112 +#define SCE_HPA_TRIPLEDOUBLE 113 +#define SCE_HPA_CLASSNAME 114 +#define SCE_HPA_DEFNAME 115 +#define SCE_HPA_OPERATOR 116 +#define SCE_HPA_IDENTIFIER 117 +#define SCE_HPHP_DEFAULT 118 +#define SCE_HPHP_HSTRING 119 +#define SCE_HPHP_SIMPLESTRING 120 +#define SCE_HPHP_WORD 121 +#define SCE_HPHP_NUMBER 122 +#define SCE_HPHP_VARIABLE 123 +#define SCE_HPHP_COMMENT 124 +#define SCE_HPHP_COMMENTLINE 125 +#define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 +#define SCE_PL_DEFAULT 0 +#define SCE_PL_ERROR 1 +#define SCE_PL_COMMENTLINE 2 +#define SCE_PL_POD 3 +#define SCE_PL_NUMBER 4 +#define SCE_PL_WORD 5 +#define SCE_PL_STRING 6 +#define SCE_PL_CHARACTER 7 +#define SCE_PL_PUNCTUATION 8 +#define SCE_PL_PREPROCESSOR 9 +#define SCE_PL_OPERATOR 10 +#define SCE_PL_IDENTIFIER 11 +#define SCE_PL_SCALAR 12 +#define SCE_PL_ARRAY 13 +#define SCE_PL_HASH 14 +#define SCE_PL_SYMBOLTABLE 15 +#define SCE_PL_VARIABLE_INDEXER 16 +#define SCE_PL_REGEX 17 +#define SCE_PL_REGSUBST 18 +#define SCE_PL_LONGQUOTE 19 +#define SCE_PL_BACKTICKS 20 +#define SCE_PL_DATASECTION 21 +#define SCE_PL_HERE_DELIM 22 +#define SCE_PL_HERE_Q 23 +#define SCE_PL_HERE_QQ 24 +#define SCE_PL_HERE_QX 25 +#define SCE_PL_STRING_Q 26 +#define SCE_PL_STRING_QQ 27 +#define SCE_PL_STRING_QX 28 +#define SCE_PL_STRING_QR 29 +#define SCE_PL_STRING_QW 30 +#define SCE_PL_POD_VERB 31 +#define SCE_RB_DEFAULT 0 +#define SCE_RB_ERROR 1 +#define SCE_RB_COMMENTLINE 2 +#define SCE_RB_POD 3 +#define SCE_RB_NUMBER 4 +#define SCE_RB_WORD 5 +#define SCE_RB_STRING 6 +#define SCE_RB_CHARACTER 7 +#define SCE_RB_CLASSNAME 8 +#define SCE_RB_DEFNAME 9 +#define SCE_RB_OPERATOR 10 +#define SCE_RB_IDENTIFIER 11 +#define SCE_RB_REGEX 12 +#define SCE_RB_GLOBAL 13 +#define SCE_RB_SYMBOL 14 +#define SCE_RB_MODULE_NAME 15 +#define SCE_RB_INSTANCE_VAR 16 +#define SCE_RB_CLASS_VAR 17 +#define SCE_RB_BACKTICKS 18 +#define SCE_RB_DATASECTION 19 +#define SCE_RB_HERE_DELIM 20 +#define SCE_RB_HERE_Q 21 +#define SCE_RB_HERE_QQ 22 +#define SCE_RB_HERE_QX 23 +#define SCE_RB_STRING_Q 24 +#define SCE_RB_STRING_QQ 25 +#define SCE_RB_STRING_QX 26 +#define SCE_RB_STRING_QR 27 +#define SCE_RB_STRING_QW 28 +#define SCE_RB_WORD_DEMOTED 29 +#define SCE_RB_STDIN 30 +#define SCE_RB_STDOUT 31 +#define SCE_RB_STDERR 40 +#define SCE_RB_UPPER_BOUND 41 +#define SCE_B_DEFAULT 0 +#define SCE_B_COMMENT 1 +#define SCE_B_NUMBER 2 +#define SCE_B_KEYWORD 3 +#define SCE_B_STRING 4 +#define SCE_B_PREPROCESSOR 5 +#define SCE_B_OPERATOR 6 +#define SCE_B_IDENTIFIER 7 +#define SCE_B_DATE 8 +#define SCE_B_STRINGEOL 9 +#define SCE_B_KEYWORD2 10 +#define SCE_B_KEYWORD3 11 +#define SCE_B_KEYWORD4 12 +#define SCE_B_CONSTANT 13 +#define SCE_B_ASM 14 +#define SCE_B_LABEL 15 +#define SCE_B_ERROR 16 +#define SCE_B_HEXNUMBER 17 +#define SCE_B_BINNUMBER 18 +#define SCE_PROPS_DEFAULT 0 +#define SCE_PROPS_COMMENT 1 +#define SCE_PROPS_SECTION 2 +#define SCE_PROPS_ASSIGNMENT 3 +#define SCE_PROPS_DEFVAL 4 +#define SCE_PROPS_KEY 5 +#define SCE_L_DEFAULT 0 +#define SCE_L_COMMAND 1 +#define SCE_L_TAG 2 +#define SCE_L_MATH 3 +#define SCE_L_COMMENT 4 +#define SCE_LUA_DEFAULT 0 +#define SCE_LUA_COMMENT 1 +#define SCE_LUA_COMMENTLINE 2 +#define SCE_LUA_COMMENTDOC 3 +#define SCE_LUA_NUMBER 4 +#define SCE_LUA_WORD 5 +#define SCE_LUA_STRING 6 +#define SCE_LUA_CHARACTER 7 +#define SCE_LUA_LITERALSTRING 8 +#define SCE_LUA_PREPROCESSOR 9 +#define SCE_LUA_OPERATOR 10 +#define SCE_LUA_IDENTIFIER 11 +#define SCE_LUA_STRINGEOL 12 +#define SCE_LUA_WORD2 13 +#define SCE_LUA_WORD3 14 +#define SCE_LUA_WORD4 15 +#define SCE_LUA_WORD5 16 +#define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19 +#define SCE_ERR_DEFAULT 0 +#define SCE_ERR_PYTHON 1 +#define SCE_ERR_GCC 2 +#define SCE_ERR_MS 3 +#define SCE_ERR_CMD 4 +#define SCE_ERR_BORLAND 5 +#define SCE_ERR_PERL 6 +#define SCE_ERR_NET 7 +#define SCE_ERR_LUA 8 +#define SCE_ERR_CTAG 9 +#define SCE_ERR_DIFF_CHANGED 10 +#define SCE_ERR_DIFF_ADDITION 11 +#define SCE_ERR_DIFF_DELETION 12 +#define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 +#define SCE_ERR_IFORT 17 +#define SCE_ERR_ABSF 18 +#define SCE_ERR_TIDY 19 +#define SCE_ERR_JAVA_STACK 20 +#define SCE_BAT_DEFAULT 0 +#define SCE_BAT_COMMENT 1 +#define SCE_BAT_WORD 2 +#define SCE_BAT_LABEL 3 +#define SCE_BAT_HIDE 4 +#define SCE_BAT_COMMAND 5 +#define SCE_BAT_IDENTIFIER 6 +#define SCE_BAT_OPERATOR 7 +#define SCE_MAKE_DEFAULT 0 +#define SCE_MAKE_COMMENT 1 +#define SCE_MAKE_PREPROCESSOR 2 +#define SCE_MAKE_IDENTIFIER 3 +#define SCE_MAKE_OPERATOR 4 +#define SCE_MAKE_TARGET 5 +#define SCE_MAKE_IDEOL 9 +#define SCE_DIFF_DEFAULT 0 +#define SCE_DIFF_COMMENT 1 +#define SCE_DIFF_COMMAND 2 +#define SCE_DIFF_HEADER 3 +#define SCE_DIFF_POSITION 4 +#define SCE_DIFF_DELETED 5 +#define SCE_DIFF_ADDED 6 +#define SCE_CONF_DEFAULT 0 +#define SCE_CONF_COMMENT 1 +#define SCE_CONF_NUMBER 2 +#define SCE_CONF_IDENTIFIER 3 +#define SCE_CONF_EXTENSION 4 +#define SCE_CONF_PARAMETER 5 +#define SCE_CONF_STRING 6 +#define SCE_CONF_OPERATOR 7 +#define SCE_CONF_IP 8 +#define SCE_CONF_DIRECTIVE 9 +#define SCE_AVE_DEFAULT 0 +#define SCE_AVE_COMMENT 1 +#define SCE_AVE_NUMBER 2 +#define SCE_AVE_WORD 3 +#define SCE_AVE_STRING 6 +#define SCE_AVE_ENUM 7 +#define SCE_AVE_STRINGEOL 8 +#define SCE_AVE_IDENTIFIER 9 +#define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 +#define SCE_ADA_DEFAULT 0 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 +#define SCE_ADA_CHARACTER 5 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 +#define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11 +#define SCE_BAAN_DEFAULT 0 +#define SCE_BAAN_COMMENT 1 +#define SCE_BAAN_COMMENTDOC 2 +#define SCE_BAAN_NUMBER 3 +#define SCE_BAAN_WORD 4 +#define SCE_BAAN_STRING 5 +#define SCE_BAAN_PREPROCESSOR 6 +#define SCE_BAAN_OPERATOR 7 +#define SCE_BAAN_IDENTIFIER 8 +#define SCE_BAAN_STRINGEOL 9 +#define SCE_BAAN_WORD2 10 +#define SCE_LISP_DEFAULT 0 +#define SCE_LISP_COMMENT 1 +#define SCE_LISP_NUMBER 2 +#define SCE_LISP_KEYWORD 3 +#define SCE_LISP_KEYWORD_KW 4 +#define SCE_LISP_SYMBOL 5 +#define SCE_LISP_STRING 6 +#define SCE_LISP_STRINGEOL 8 +#define SCE_LISP_IDENTIFIER 9 +#define SCE_LISP_OPERATOR 10 +#define SCE_LISP_SPECIAL 11 +#define SCE_LISP_MULTI_COMMENT 12 +#define SCE_EIFFEL_DEFAULT 0 +#define SCE_EIFFEL_COMMENTLINE 1 +#define SCE_EIFFEL_NUMBER 2 +#define SCE_EIFFEL_WORD 3 +#define SCE_EIFFEL_STRING 4 +#define SCE_EIFFEL_CHARACTER 5 +#define SCE_EIFFEL_OPERATOR 6 +#define SCE_EIFFEL_IDENTIFIER 7 +#define SCE_EIFFEL_STRINGEOL 8 +#define SCE_NNCRONTAB_DEFAULT 0 +#define SCE_NNCRONTAB_COMMENT 1 +#define SCE_NNCRONTAB_TASK 2 +#define SCE_NNCRONTAB_SECTION 3 +#define SCE_NNCRONTAB_KEYWORD 4 +#define SCE_NNCRONTAB_MODIFIER 5 +#define SCE_NNCRONTAB_ASTERISK 6 +#define SCE_NNCRONTAB_NUMBER 7 +#define SCE_NNCRONTAB_STRING 8 +#define SCE_NNCRONTAB_ENVIRONMENT 9 +#define SCE_NNCRONTAB_IDENTIFIER 10 +#define SCE_FORTH_DEFAULT 0 +#define SCE_FORTH_COMMENT 1 +#define SCE_FORTH_COMMENT_ML 2 +#define SCE_FORTH_IDENTIFIER 3 +#define SCE_FORTH_CONTROL 4 +#define SCE_FORTH_KEYWORD 5 +#define SCE_FORTH_DEFWORD 6 +#define SCE_FORTH_PREWORD1 7 +#define SCE_FORTH_PREWORD2 8 +#define SCE_FORTH_NUMBER 9 +#define SCE_FORTH_STRING 10 +#define SCE_FORTH_LOCALE 11 +#define SCE_MATLAB_DEFAULT 0 +#define SCE_MATLAB_COMMENT 1 +#define SCE_MATLAB_COMMAND 2 +#define SCE_MATLAB_NUMBER 3 +#define SCE_MATLAB_KEYWORD 4 +#define SCE_MATLAB_STRING 5 +#define SCE_MATLAB_OPERATOR 6 +#define SCE_MATLAB_IDENTIFIER 7 +#define SCE_MATLAB_DOUBLEQUOTESTRING 8 +#define SCE_SCRIPTOL_DEFAULT 0 +#define SCE_SCRIPTOL_WHITE 1 +#define SCE_SCRIPTOL_COMMENTLINE 2 +#define SCE_SCRIPTOL_PERSISTENT 3 +#define SCE_SCRIPTOL_CSTYLE 4 +#define SCE_SCRIPTOL_COMMENTBLOCK 5 +#define SCE_SCRIPTOL_NUMBER 6 +#define SCE_SCRIPTOL_STRING 7 +#define SCE_SCRIPTOL_CHARACTER 8 +#define SCE_SCRIPTOL_STRINGEOL 9 +#define SCE_SCRIPTOL_KEYWORD 10 +#define SCE_SCRIPTOL_OPERATOR 11 +#define SCE_SCRIPTOL_IDENTIFIER 12 +#define SCE_SCRIPTOL_TRIPLE 13 +#define SCE_SCRIPTOL_CLASSNAME 14 +#define SCE_SCRIPTOL_PREPROCESSOR 15 +#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_ASM_COMMENTBLOCK 11 +#define SCE_ASM_CHARACTER 12 +#define SCE_ASM_STRINGEOL 13 +#define SCE_ASM_EXTINSTRUCTION 14 +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_CSS_IDENTIFIER2 15 +#define SCE_CSS_ATTRIBUTE 16 +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD3 11 +#define SCE_POV_WORD4 12 +#define SCE_POV_WORD5 13 +#define SCE_POV_WORD6 14 +#define SCE_POV_WORD7 15 +#define SCE_POV_WORD8 16 +#define SCE_LOUT_DEFAULT 0 +#define SCE_LOUT_COMMENT 1 +#define SCE_LOUT_NUMBER 2 +#define SCE_LOUT_WORD 3 +#define SCE_LOUT_WORD2 4 +#define SCE_LOUT_WORD3 5 +#define SCE_LOUT_WORD4 6 +#define SCE_LOUT_STRING 7 +#define SCE_LOUT_OPERATOR 8 +#define SCE_LOUT_IDENTIFIER 9 +#define SCE_LOUT_STRINGEOL 10 +#define SCE_ESCRIPT_DEFAULT 0 +#define SCE_ESCRIPT_COMMENT 1 +#define SCE_ESCRIPT_COMMENTLINE 2 +#define SCE_ESCRIPT_COMMENTDOC 3 +#define SCE_ESCRIPT_NUMBER 4 +#define SCE_ESCRIPT_WORD 5 +#define SCE_ESCRIPT_STRING 6 +#define SCE_ESCRIPT_OPERATOR 7 +#define SCE_ESCRIPT_IDENTIFIER 8 +#define SCE_ESCRIPT_BRACE 9 +#define SCE_ESCRIPT_WORD2 10 +#define SCE_ESCRIPT_WORD3 11 +#define SCE_PS_DEFAULT 0 +#define SCE_PS_COMMENT 1 +#define SCE_PS_DSC_COMMENT 2 +#define SCE_PS_DSC_VALUE 3 +#define SCE_PS_NUMBER 4 +#define SCE_PS_NAME 5 +#define SCE_PS_KEYWORD 6 +#define SCE_PS_LITERAL 7 +#define SCE_PS_IMMEVAL 8 +#define SCE_PS_PAREN_ARRAY 9 +#define SCE_PS_PAREN_DICT 10 +#define SCE_PS_PAREN_PROC 11 +#define SCE_PS_TEXT 12 +#define SCE_PS_HEXSTRING 13 +#define SCE_PS_BASE85STRING 14 +#define SCE_PS_BADSTRINGCHAR 15 +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +#define SCE_NSIS_NUMBER 14 +#define SCE_NSIS_SECTIONGROUP 15 +#define SCE_NSIS_PAGEEX 16 +#define SCE_NSIS_FUNCTIONDEF 17 +#define SCE_NSIS_COMMENTBOX 18 +#define SCE_MMIXAL_LEADWS 0 +#define SCE_MMIXAL_COMMENT 1 +#define SCE_MMIXAL_LABEL 2 +#define SCE_MMIXAL_OPCODE 3 +#define SCE_MMIXAL_OPCODE_PRE 4 +#define SCE_MMIXAL_OPCODE_VALID 5 +#define SCE_MMIXAL_OPCODE_UNKNOWN 6 +#define SCE_MMIXAL_OPCODE_POST 7 +#define SCE_MMIXAL_OPERANDS 8 +#define SCE_MMIXAL_NUMBER 9 +#define SCE_MMIXAL_REF 10 +#define SCE_MMIXAL_CHAR 11 +#define SCE_MMIXAL_STRING 12 +#define SCE_MMIXAL_REGISTER 13 +#define SCE_MMIXAL_HEX 14 +#define SCE_MMIXAL_OPERATOR 15 +#define SCE_MMIXAL_SYMBOL 16 +#define SCE_MMIXAL_INCLUDE 17 +#define SCE_CLW_DEFAULT 0 +#define SCE_CLW_LABEL 1 +#define SCE_CLW_COMMENT 2 +#define SCE_CLW_STRING 3 +#define SCE_CLW_USER_IDENTIFIER 4 +#define SCE_CLW_INTEGER_CONSTANT 5 +#define SCE_CLW_REAL_CONSTANT 6 +#define SCE_CLW_PICTURE_STRING 7 +#define SCE_CLW_KEYWORD 8 +#define SCE_CLW_COMPILER_DIRECTIVE 9 +#define SCE_CLW_RUNTIME_EXPRESSIONS 10 +#define SCE_CLW_BUILTIN_PROCEDURES_FUNCTION 11 +#define SCE_CLW_STRUCTURE_DATA_TYPE 12 +#define SCE_CLW_ATTRIBUTE 13 +#define SCE_CLW_STANDARD_EQUATE 14 +#define SCE_CLW_ERROR 15 +#define SCE_CLW_DEPRECATED 16 +#define SCE_LOT_DEFAULT 0 +#define SCE_LOT_HEADER 1 +#define SCE_LOT_BREAK 2 +#define SCE_LOT_SET 3 +#define SCE_LOT_PASS 4 +#define SCE_LOT_FAIL 5 +#define SCE_LOT_ABORT 6 +#define SCE_YAML_DEFAULT 0 +#define SCE_YAML_COMMENT 1 +#define SCE_YAML_IDENTIFIER 2 +#define SCE_YAML_KEYWORD 3 +#define SCE_YAML_NUMBER 4 +#define SCE_YAML_REFERENCE 5 +#define SCE_YAML_DOCUMENT 6 +#define SCE_YAML_TEXT 7 +#define SCE_YAML_ERROR 8 +#define SCE_TEX_DEFAULT 0 +#define SCE_TEX_SPECIAL 1 +#define SCE_TEX_GROUP 2 +#define SCE_TEX_SYMBOL 3 +#define SCE_TEX_COMMAND 4 +#define SCE_TEX_TEXT 5 +#define SCE_METAPOST_DEFAULT 0 +#define SCE_METAPOST_SPECIAL 1 +#define SCE_METAPOST_GROUP 2 +#define SCE_METAPOST_SYMBOL 3 +#define SCE_METAPOST_COMMAND 4 +#define SCE_METAPOST_TEXT 5 +#define SCE_METAPOST_EXTRA 6 +#define SCE_ERLANG_DEFAULT 0 +#define SCE_ERLANG_COMMENT 1 +#define SCE_ERLANG_VARIABLE 2 +#define SCE_ERLANG_NUMBER 3 +#define SCE_ERLANG_KEYWORD 4 +#define SCE_ERLANG_STRING 5 +#define SCE_ERLANG_OPERATOR 6 +#define SCE_ERLANG_ATOM 7 +#define SCE_ERLANG_FUNCTION_NAME 8 +#define SCE_ERLANG_CHARACTER 9 +#define SCE_ERLANG_MACRO 10 +#define SCE_ERLANG_RECORD 11 +#define SCE_ERLANG_SEPARATOR 12 +#define SCE_ERLANG_NODE_NAME 13 +#define SCE_ERLANG_UNKNOWN 31 +#define SCE_MSSQL_DEFAULT 0 +#define SCE_MSSQL_COMMENT 1 +#define SCE_MSSQL_LINE_COMMENT 2 +#define SCE_MSSQL_NUMBER 3 +#define SCE_MSSQL_STRING 4 +#define SCE_MSSQL_OPERATOR 5 +#define SCE_MSSQL_IDENTIFIER 6 +#define SCE_MSSQL_VARIABLE 7 +#define SCE_MSSQL_COLUMN_NAME 8 +#define SCE_MSSQL_STATEMENT 9 +#define SCE_MSSQL_DATATYPE 10 +#define SCE_MSSQL_SYSTABLE 11 +#define SCE_MSSQL_GLOBAL_VARIABLE 12 +#define SCE_MSSQL_FUNCTION 13 +#define SCE_MSSQL_STORED_PROCEDURE 14 +#define SCE_MSSQL_DEFAULT_PREF_DATATYPE 15 +#define SCE_MSSQL_COLUMN_NAME_2 16 +#define SCE_V_DEFAULT 0 +#define SCE_V_COMMENT 1 +#define SCE_V_COMMENTLINE 2 +#define SCE_V_COMMENTLINEBANG 3 +#define SCE_V_NUMBER 4 +#define SCE_V_WORD 5 +#define SCE_V_STRING 6 +#define SCE_V_WORD2 7 +#define SCE_V_WORD3 8 +#define SCE_V_PREPROCESSOR 9 +#define SCE_V_OPERATOR 10 +#define SCE_V_IDENTIFIER 11 +#define SCE_V_STRINGEOL 12 +#define SCE_V_USER 19 +#define SCE_KIX_DEFAULT 0 +#define SCE_KIX_COMMENT 1 +#define SCE_KIX_STRING1 2 +#define SCE_KIX_STRING2 3 +#define SCE_KIX_NUMBER 4 +#define SCE_KIX_VAR 5 +#define SCE_KIX_MACRO 6 +#define SCE_KIX_KEYWORD 7 +#define SCE_KIX_FUNCTIONS 8 +#define SCE_KIX_OPERATOR 9 +#define SCE_KIX_IDENTIFIER 31 +#define SCE_GC_DEFAULT 0 +#define SCE_GC_COMMENTLINE 1 +#define SCE_GC_COMMENTBLOCK 2 +#define SCE_GC_GLOBAL 3 +#define SCE_GC_EVENT 4 +#define SCE_GC_ATTRIBUTE 5 +#define SCE_GC_CONTROL 6 +#define SCE_GC_COMMAND 7 +#define SCE_GC_STRING 8 +#define SCE_GC_OPERATOR 9 +#define SCE_SN_DEFAULT 0 +#define SCE_SN_CODE 1 +#define SCE_SN_COMMENTLINE 2 +#define SCE_SN_COMMENTLINEBANG 3 +#define SCE_SN_NUMBER 4 +#define SCE_SN_WORD 5 +#define SCE_SN_STRING 6 +#define SCE_SN_WORD2 7 +#define SCE_SN_WORD3 8 +#define SCE_SN_PREPROCESSOR 9 +#define SCE_SN_OPERATOR 10 +#define SCE_SN_IDENTIFIER 11 +#define SCE_SN_STRINGEOL 12 +#define SCE_SN_REGEXTAG 13 +#define SCE_SN_SIGNAL 14 +#define SCE_SN_USER 19 +#define SCE_AU3_DEFAULT 0 +#define SCE_AU3_COMMENT 1 +#define SCE_AU3_COMMENTBLOCK 2 +#define SCE_AU3_NUMBER 3 +#define SCE_AU3_FUNCTION 4 +#define SCE_AU3_KEYWORD 5 +#define SCE_AU3_MACRO 6 +#define SCE_AU3_STRING 7 +#define SCE_AU3_OPERATOR 8 +#define SCE_AU3_VARIABLE 9 +#define SCE_AU3_SENT 10 +#define SCE_AU3_PREPROCESSOR 11 +#define SCE_AU3_SPECIAL 12 +#define SCE_AU3_EXPAND 13 +#define SCE_AU3_COMOBJ 14 +#define SCE_AU3_UDF 15 +#define SCE_APDL_DEFAULT 0 +#define SCE_APDL_COMMENT 1 +#define SCE_APDL_COMMENTBLOCK 2 +#define SCE_APDL_NUMBER 3 +#define SCE_APDL_STRING 4 +#define SCE_APDL_OPERATOR 5 +#define SCE_APDL_WORD 6 +#define SCE_APDL_PROCESSOR 7 +#define SCE_APDL_COMMAND 8 +#define SCE_APDL_SLASHCOMMAND 9 +#define SCE_APDL_STARCOMMAND 10 +#define SCE_APDL_ARGUMENT 11 +#define SCE_APDL_FUNCTION 12 +#define SCE_SH_DEFAULT 0 +#define SCE_SH_ERROR 1 +#define SCE_SH_COMMENTLINE 2 +#define SCE_SH_NUMBER 3 +#define SCE_SH_WORD 4 +#define SCE_SH_STRING 5 +#define SCE_SH_CHARACTER 6 +#define SCE_SH_OPERATOR 7 +#define SCE_SH_IDENTIFIER 8 +#define SCE_SH_SCALAR 9 +#define SCE_SH_PARAM 10 +#define SCE_SH_BACKTICKS 11 +#define SCE_SH_HERE_DELIM 12 +#define SCE_SH_HERE_Q 13 +#define SCE_ASN1_DEFAULT 0 +#define SCE_ASN1_COMMENT 1 +#define SCE_ASN1_IDENTIFIER 2 +#define SCE_ASN1_STRING 3 +#define SCE_ASN1_OID 4 +#define SCE_ASN1_SCALAR 5 +#define SCE_ASN1_KEYWORD 6 +#define SCE_ASN1_ATTRIBUTE 7 +#define SCE_ASN1_DESCRIPTOR 8 +#define SCE_ASN1_TYPE 9 +#define SCE_ASN1_OPERATOR 10 +#define SCE_VHDL_DEFAULT 0 +#define SCE_VHDL_COMMENT 1 +#define SCE_VHDL_COMMENTLINEBANG 2 +#define SCE_VHDL_NUMBER 3 +#define SCE_VHDL_STRING 4 +#define SCE_VHDL_OPERATOR 5 +#define SCE_VHDL_IDENTIFIER 6 +#define SCE_VHDL_STRINGEOL 7 +#define SCE_VHDL_KEYWORD 8 +#define SCE_VHDL_STDOPERATOR 9 +#define SCE_VHDL_ATTRIBUTE 10 +#define SCE_VHDL_STDFUNCTION 11 +#define SCE_VHDL_STDPACKAGE 12 +#define SCE_VHDL_STDTYPE 13 +#define SCE_VHDL_USERWORD 14 +#define SCE_CAML_DEFAULT 0 +#define SCE_CAML_IDENTIFIER 1 +#define SCE_CAML_TAGNAME 2 +#define SCE_CAML_KEYWORD 3 +#define SCE_CAML_KEYWORD2 4 +#define SCE_CAML_KEYWORD3 5 +#define SCE_CAML_LINENUM 6 +#define SCE_CAML_OPERATOR 7 +#define SCE_CAML_NUMBER 8 +#define SCE_CAML_CHAR 9 +#define SCE_CAML_STRING 11 +#define SCE_CAML_COMMENT 12 +#define SCE_CAML_COMMENT1 13 +#define SCE_CAML_COMMENT2 14 +#define SCE_CAML_COMMENT3 15 +#define SCE_HA_DEFAULT 0 +#define SCE_HA_IDENTIFIER 1 +#define SCE_HA_KEYWORD 2 +#define SCE_HA_NUMBER 3 +#define SCE_HA_STRING 4 +#define SCE_HA_CHARACTER 5 +#define SCE_HA_CLASS 6 +#define SCE_HA_MODULE 7 +#define SCE_HA_CAPITAL 8 +#define SCE_HA_DATA 9 +#define SCE_HA_IMPORT 10 +#define SCE_HA_OPERATOR 11 +#define SCE_HA_INSTANCE 12 +#define SCE_HA_COMMENTLINE 13 +#define SCE_HA_COMMENTBLOCK 14 +#define SCE_HA_COMMENTBLOCK2 15 +#define SCE_HA_COMMENTBLOCK3 16 +#define SCE_T3_DEFAULT 0 +#define SCE_T3_X_DEFAULT 1 +#define SCE_T3_PREPROCESSOR 2 +#define SCE_T3_BLOCK_COMMENT 3 +#define SCE_T3_LINE_COMMENT 4 +#define SCE_T3_OPERATOR 5 +#define SCE_T3_KEYWORD 6 +#define SCE_T3_NUMBER 7 +#define SCE_T3_IDENTIFIER 8 +#define SCE_T3_S_STRING 9 +#define SCE_T3_D_STRING 10 +#define SCE_T3_X_STRING 11 +#define SCE_T3_LIB_DIRECTIVE 12 +#define SCE_T3_MSG_PARAM 13 +#define SCE_T3_HTML_TAG 14 +#define SCE_T3_HTML_DEFAULT 15 +#define SCE_T3_HTML_STRING 16 +#define SCE_T3_USER1 17 +#define SCE_T3_USER2 18 +#define SCE_T3_USER3 19 +#define SCE_T3_BRACE 20 +#define SCE_REBOL_DEFAULT 0 +#define SCE_REBOL_COMMENTLINE 1 +#define SCE_REBOL_COMMENTBLOCK 2 +#define SCE_REBOL_PREFACE 3 +#define SCE_REBOL_OPERATOR 4 +#define SCE_REBOL_CHARACTER 5 +#define SCE_REBOL_QUOTEDSTRING 6 +#define SCE_REBOL_BRACEDSTRING 7 +#define SCE_REBOL_NUMBER 8 +#define SCE_REBOL_PAIR 9 +#define SCE_REBOL_TUPLE 10 +#define SCE_REBOL_BINARY 11 +#define SCE_REBOL_MONEY 12 +#define SCE_REBOL_ISSUE 13 +#define SCE_REBOL_TAG 14 +#define SCE_REBOL_FILE 15 +#define SCE_REBOL_EMAIL 16 +#define SCE_REBOL_URL 17 +#define SCE_REBOL_DATE 18 +#define SCE_REBOL_TIME 19 +#define SCE_REBOL_IDENTIFIER 20 +#define SCE_REBOL_WORD 21 +#define SCE_REBOL_WORD2 22 +#define SCE_REBOL_WORD3 23 +#define SCE_REBOL_WORD4 24 +#define SCE_REBOL_WORD5 25 +#define SCE_REBOL_WORD6 26 +#define SCE_REBOL_WORD7 27 +#define SCE_REBOL_WORD8 28 +#define SCE_SQL_DEFAULT 0 +#define SCE_SQL_COMMENT 1 +#define SCE_SQL_COMMENTLINE 2 +#define SCE_SQL_COMMENTDOC 3 +#define SCE_SQL_NUMBER 4 +#define SCE_SQL_WORD 5 +#define SCE_SQL_STRING 6 +#define SCE_SQL_CHARACTER 7 +#define SCE_SQL_SQLPLUS 8 +#define SCE_SQL_SQLPLUS_PROMPT 9 +#define SCE_SQL_OPERATOR 10 +#define SCE_SQL_IDENTIFIER 11 +#define SCE_SQL_SQLPLUS_COMMENT 13 +#define SCE_SQL_COMMENTLINEDOC 15 +#define SCE_SQL_WORD2 16 +#define SCE_SQL_COMMENTDOCKEYWORD 17 +#define SCE_SQL_COMMENTDOCKEYWORDERROR 18 +#define SCE_SQL_USER1 19 +#define SCE_SQL_USER2 20 +#define SCE_SQL_USER3 21 +#define SCE_SQL_USER4 22 +#define SCE_SQL_QUOTEDIDENTIFIER 23 +#define SCE_ST_DEFAULT 0 +#define SCE_ST_STRING 1 +#define SCE_ST_NUMBER 2 +#define SCE_ST_COMMENT 3 +#define SCE_ST_SYMBOL 4 +#define SCE_ST_BINARY 5 +#define SCE_ST_BOOL 6 +#define SCE_ST_SELF 7 +#define SCE_ST_SUPER 8 +#define SCE_ST_NIL 9 +#define SCE_ST_GLOBAL 10 +#define SCE_ST_RETURN 11 +#define SCE_ST_SPECIAL 12 +#define SCE_ST_KWSEND 13 +#define SCE_ST_ASSIGN 14 +#define SCE_ST_CHARACTER 15 +#define SCE_ST_SPEC_SEL 16 +#define SCE_FS_DEFAULT 0 +#define SCE_FS_COMMENT 1 +#define SCE_FS_COMMENTLINE 2 +#define SCE_FS_COMMENTDOC 3 +#define SCE_FS_COMMENTLINEDOC 4 +#define SCE_FS_COMMENTDOCKEYWORD 5 +#define SCE_FS_COMMENTDOCKEYWORDERROR 6 +#define SCE_FS_KEYWORD 7 +#define SCE_FS_KEYWORD2 8 +#define SCE_FS_KEYWORD3 9 +#define SCE_FS_KEYWORD4 10 +#define SCE_FS_NUMBER 11 +#define SCE_FS_STRING 12 +#define SCE_FS_PREPROCESSOR 13 +#define SCE_FS_OPERATOR 14 +#define SCE_FS_IDENTIFIER 15 +#define SCE_FS_DATE 16 +#define SCE_FS_STRINGEOL 17 +#define SCE_FS_CONSTANT 18 +#define SCE_FS_ASM 19 +#define SCE_FS_LABEL 20 +#define SCE_FS_ERROR 21 +#define SCE_FS_HEXNUMBER 22 +#define SCE_FS_BINNUMBER 23 +#define SCE_CSOUND_DEFAULT 0 +#define SCE_CSOUND_COMMENT 1 +#define SCE_CSOUND_NUMBER 2 +#define SCE_CSOUND_OPERATOR 3 +#define SCE_CSOUND_INSTR 4 +#define SCE_CSOUND_IDENTIFIER 5 +#define SCE_CSOUND_OPCODE 6 +#define SCE_CSOUND_HEADERSTMT 7 +#define SCE_CSOUND_USERKEYWORD 8 +#define SCE_CSOUND_COMMENTBLOCK 9 +#define SCE_CSOUND_PARAM 10 +#define SCE_CSOUND_ARATE_VAR 11 +#define SCE_CSOUND_KRATE_VAR 12 +#define SCE_CSOUND_IRATE_VAR 13 +#define SCE_CSOUND_GLOBAL_VAR 14 +#define SCE_CSOUND_STRINGEOL 15 +#define SCE_INNO_DEFAULT 0 +#define SCE_INNO_COMMENT 1 +#define SCE_INNO_KEYWORD 2 +#define SCE_INNO_PARAMETER 3 +#define SCE_INNO_SECTION 4 +#define SCE_INNO_PREPROC 5 +#define SCE_INNO_PREPROC_INLINE 6 +#define SCE_INNO_COMMENT_PASCAL 7 +#define SCE_INNO_KEYWORD_PASCAL 8 +#define SCE_INNO_KEYWORD_USER 9 +#define SCE_INNO_STRING_DOUBLE 10 +#define SCE_INNO_STRING_SINGLE 11 +#define SCE_INNO_IDENTIFIER 12 +#define SCE_OPAL_SPACE 0 +#define SCE_OPAL_COMMENT_BLOCK 1 +#define SCE_OPAL_COMMENT_LINE 2 +#define SCE_OPAL_INTEGER 3 +#define SCE_OPAL_KEYWORD 4 +#define SCE_OPAL_SORT 5 +#define SCE_OPAL_STRING 6 +#define SCE_OPAL_PAR 7 +#define SCE_OPAL_BOOL_CONST 8 +#define SCE_OPAL_DEFAULT 32 +#define SCE_SPICE_DEFAULT 0 +#define SCE_SPICE_IDENTIFIER 1 +#define SCE_SPICE_KEYWORD 2 +#define SCE_SPICE_KEYWORD2 3 +#define SCE_SPICE_KEYWORD3 4 +#define SCE_SPICE_NUMBER 5 +#define SCE_SPICE_DELIMITER 6 +#define SCE_SPICE_VALUE 7 +#define SCE_SPICE_COMMENTLINE 8 +#define SCE_CMAKE_DEFAULT 0 +#define SCE_CMAKE_COMMENT 1 +#define SCE_CMAKE_STRINGDQ 2 +#define SCE_CMAKE_STRINGLQ 3 +#define SCE_CMAKE_STRINGRQ 4 +#define SCE_CMAKE_COMMANDS 5 +#define SCE_CMAKE_PARAMETERS 6 +#define SCE_CMAKE_VARIABLE 7 +#define SCE_CMAKE_USERDEFINED 8 +#define SCE_CMAKE_WHILEDEF 9 +#define SCE_CMAKE_FOREACHDEF 10 +#define SCE_CMAKE_IFDEFINEDEF 11 +#define SCE_CMAKE_MACRODEF 12 +#define SCE_CMAKE_STRINGVAR 13 +#define SCE_CMAKE_NUMBER 14 +#define SCE_GAP_DEFAULT 0 +#define SCE_GAP_IDENTIFIER 1 +#define SCE_GAP_KEYWORD 2 +#define SCE_GAP_KEYWORD2 3 +#define SCE_GAP_KEYWORD3 4 +#define SCE_GAP_KEYWORD4 5 +#define SCE_GAP_STRING 6 +#define SCE_GAP_CHAR 7 +#define SCE_GAP_OPERATOR 8 +#define SCE_GAP_COMMENT 9 +#define SCE_GAP_NUMBER 10 +#define SCE_GAP_STRINGEOL 11 +#define SCE_PLM_DEFAULT 0 +#define SCE_PLM_COMMENT 1 +#define SCE_PLM_STRING 2 +#define SCE_PLM_NUMBER 3 +#define SCE_PLM_IDENTIFIER 4 +#define SCE_PLM_OPERATOR 5 +#define SCE_PLM_CONTROL 6 +#define SCE_PLM_KEYWORD 7 +#define SCE_4GL_DEFAULT 0 +#define SCE_4GL_NUMBER 1 +#define SCE_4GL_WORD 2 +#define SCE_4GL_STRING 3 +#define SCE_4GL_CHARACTER 4 +#define SCE_4GL_PREPROCESSOR 5 +#define SCE_4GL_OPERATOR 6 +#define SCE_4GL_IDENTIFIER 7 +#define SCE_4GL_BLOCK 8 +#define SCE_4GL_END 9 +#define SCE_4GL_COMMENT1 10 +#define SCE_4GL_COMMENT2 11 +#define SCE_4GL_COMMENT3 12 +#define SCE_4GL_COMMENT4 13 +#define SCE_4GL_COMMENT5 14 +#define SCE_4GL_COMMENT6 15 +#define SCE_4GL_DEFAULT_ 16 +#define SCE_4GL_NUMBER_ 17 +#define SCE_4GL_WORD_ 18 +#define SCE_4GL_STRING_ 19 +#define SCE_4GL_CHARACTER_ 20 +#define SCE_4GL_PREPROCESSOR_ 21 +#define SCE_4GL_OPERATOR_ 22 +#define SCE_4GL_IDENTIFIER_ 23 +#define SCE_4GL_BLOCK_ 24 +#define SCE_4GL_END_ 25 +#define SCE_4GL_COMMENT1_ 26 +#define SCE_4GL_COMMENT2_ 27 +#define SCE_4GL_COMMENT3_ 28 +#define SCE_4GL_COMMENT4_ 29 +#define SCE_4GL_COMMENT5_ 30 +#define SCE_4GL_COMMENT6_ 31 +#define SCLEX_ASP 29 +#define SCLEX_PHP 30 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/Scintilla.h b/sdk/wxscintilla/src/scintilla/include/Scintilla.h new file mode 100644 index 0000000000..82ae681bbf --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/Scintilla.h @@ -0,0 +1,834 @@ +// Scintilla source code edit control +/** @file Scintilla.h + ** Interface to the edit control. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Most of this file is automatically generated from the Scintilla.iface interface definition +// file which contains any comments about the definitions. HFacer.py does the generation. + +#ifndef SCINTILLA_H +#define SCINTILLA_H + +#if LCCWIN +typedef BOOL bool; +#endif + +#if PLAT_WIN +// Return false on failure: +bool Scintilla_RegisterClasses(void *hInstance); +bool Scintilla_ReleaseResources(); +#endif +int Scintilla_LinkLexers(); + +// Here should be placed typedefs for uptr_t, an unsigned integer type large enough to +// hold a pointer and sptr_t, a signed integer large enough to hold a pointer. +// May need to be changed for 64 bit platforms. +#if _MSC_VER >= 1300 +#include +#endif +#ifdef MAXULONG_PTR +typedef ULONG_PTR uptr_t; +typedef LONG_PTR sptr_t; +#else +typedef unsigned long uptr_t; +typedef long sptr_t; +#endif + +typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); + +//++Autogenerated -- start of section automatically generated from Scintilla.iface +#define INVALID_POSITION -1 +#define SCI_START 2000 +#define SCI_OPTIONAL_START 3000 +#define SCI_LEXER_START 4000 +#define SCI_ADDTEXT 2001 +#define SCI_ADDSTYLEDTEXT 2002 +#define SCI_INSERTTEXT 2003 +#define SCI_CLEARALL 2004 +#define SCI_CLEARDOCUMENTSTYLE 2005 +#define SCI_GETLENGTH 2006 +#define SCI_GETCHARAT 2007 +#define SCI_GETCURRENTPOS 2008 +#define SCI_GETANCHOR 2009 +#define SCI_GETSTYLEAT 2010 +#define SCI_REDO 2011 +#define SCI_SETUNDOCOLLECTION 2012 +#define SCI_SELECTALL 2013 +#define SCI_SETSAVEPOINT 2014 +#define SCI_GETSTYLEDTEXT 2015 +#define SCI_CANREDO 2016 +#define SCI_MARKERLINEFROMHANDLE 2017 +#define SCI_MARKERDELETEHANDLE 2018 +#define SCI_GETUNDOCOLLECTION 2019 +#define SCWS_INVISIBLE 0 +#define SCWS_VISIBLEALWAYS 1 +#define SCWS_VISIBLEAFTERINDENT 2 +#define SCI_GETVIEWWS 2020 +#define SCI_SETVIEWWS 2021 +#define SCI_POSITIONFROMPOINT 2022 +#define SCI_POSITIONFROMPOINTCLOSE 2023 +#define SCI_GOTOLINE 2024 +#define SCI_GOTOPOS 2025 +#define SCI_SETANCHOR 2026 +#define SCI_GETCURLINE 2027 +#define SCI_GETENDSTYLED 2028 +#define SC_EOL_CRLF 0 +#define SC_EOL_CR 1 +#define SC_EOL_LF 2 +#define SCI_CONVERTEOLS 2029 +#define SCI_GETEOLMODE 2030 +#define SCI_SETEOLMODE 2031 +#define SCI_STARTSTYLING 2032 +#define SCI_SETSTYLING 2033 +#define SCI_GETBUFFEREDDRAW 2034 +#define SCI_SETBUFFEREDDRAW 2035 +#define SCI_SETTABWIDTH 2036 +#define SCI_GETTABWIDTH 2121 +#define SC_CP_UTF8 65001 +#define SC_CP_DBCS 1 +#define SCI_SETCODEPAGE 2037 +#define SCI_SETUSEPALETTE 2039 +#define MARKER_MAX 31 +#define SC_MARK_CIRCLE 0 +#define SC_MARK_ROUNDRECT 1 +#define SC_MARK_ARROW 2 +#define SC_MARK_SMALLRECT 3 +#define SC_MARK_SHORTARROW 4 +#define SC_MARK_EMPTY 5 +#define SC_MARK_ARROWDOWN 6 +#define SC_MARK_MINUS 7 +#define SC_MARK_PLUS 8 +#define SC_MARK_VLINE 9 +#define SC_MARK_LCORNER 10 +#define SC_MARK_TCORNER 11 +#define SC_MARK_BOXPLUS 12 +#define SC_MARK_BOXPLUSCONNECTED 13 +#define SC_MARK_BOXMINUS 14 +#define SC_MARK_BOXMINUSCONNECTED 15 +#define SC_MARK_LCORNERCURVE 16 +#define SC_MARK_TCORNERCURVE 17 +#define SC_MARK_CIRCLEPLUS 18 +#define SC_MARK_CIRCLEPLUSCONNECTED 19 +#define SC_MARK_CIRCLEMINUS 20 +#define SC_MARK_CIRCLEMINUSCONNECTED 21 +#define SC_MARK_BACKGROUND 22 +#define SC_MARK_DOTDOTDOT 23 +#define SC_MARK_ARROWS 24 +#define SC_MARK_PIXMAP 25 +#define SC_MARK_FULLRECT 26 +#define SC_MARK_CHARACTER 10000 +#define SC_MARKNUM_FOLDEREND 25 +#define SC_MARKNUM_FOLDEROPENMID 26 +#define SC_MARKNUM_FOLDERMIDTAIL 27 +#define SC_MARKNUM_FOLDERTAIL 28 +#define SC_MARKNUM_FOLDERSUB 29 +#define SC_MARKNUM_FOLDER 30 +#define SC_MARKNUM_FOLDEROPEN 31 +#define SC_MASK_FOLDERS 0xFE000000 +#define SCI_MARKERDEFINE 2040 +#define SCI_MARKERSETFORE 2041 +#define SCI_MARKERSETBACK 2042 +#define SCI_MARKERADD 2043 +#define SCI_MARKERDELETE 2044 +#define SCI_MARKERDELETEALL 2045 +#define SCI_MARKERGET 2046 +#define SCI_MARKERNEXT 2047 +#define SCI_MARKERPREVIOUS 2048 +#define SCI_MARKERDEFINEPIXMAP 2049 +#define SCI_MARKERADDSET 2466 +#define SCI_MARKERSETALPHA 2476 +#define SC_MARGIN_SYMBOL 0 +#define SC_MARGIN_NUMBER 1 +#define SC_MARGIN_BACK 2 +#define SC_MARGIN_FORE 3 +#define SCI_SETMARGINTYPEN 2240 +#define SCI_GETMARGINTYPEN 2241 +#define SCI_SETMARGINWIDTHN 2242 +#define SCI_GETMARGINWIDTHN 2243 +#define SCI_SETMARGINMASKN 2244 +#define SCI_GETMARGINMASKN 2245 +#define SCI_SETMARGINSENSITIVEN 2246 +#define SCI_GETMARGINSENSITIVEN 2247 +#define STYLE_DEFAULT 32 +#define STYLE_LINENUMBER 33 +#define STYLE_BRACELIGHT 34 +#define STYLE_BRACEBAD 35 +#define STYLE_CONTROLCHAR 36 +#define STYLE_INDENTGUIDE 37 +#define STYLE_CALLTIP 38 +#define STYLE_LASTPREDEFINED 39 +#define STYLE_MAX 127 +#define SC_CHARSET_ANSI 0 +#define SC_CHARSET_DEFAULT 1 +#define SC_CHARSET_BALTIC 186 +#define SC_CHARSET_CHINESEBIG5 136 +#define SC_CHARSET_EASTEUROPE 238 +#define SC_CHARSET_GB2312 134 +#define SC_CHARSET_GREEK 161 +#define SC_CHARSET_HANGUL 129 +#define SC_CHARSET_MAC 77 +#define SC_CHARSET_OEM 255 +#define SC_CHARSET_RUSSIAN 204 +#define SC_CHARSET_CYRILLIC 1251 +#define SC_CHARSET_SHIFTJIS 128 +#define SC_CHARSET_SYMBOL 2 +#define SC_CHARSET_TURKISH 162 +#define SC_CHARSET_JOHAB 130 +#define SC_CHARSET_HEBREW 177 +#define SC_CHARSET_ARABIC 178 +#define SC_CHARSET_VIETNAMESE 163 +#define SC_CHARSET_THAI 222 +#define SC_CHARSET_8859_15 1000 +#define SCI_STYLECLEARALL 2050 +#define SCI_STYLESETFORE 2051 +#define SCI_STYLESETBACK 2052 +#define SCI_STYLESETBOLD 2053 +#define SCI_STYLESETITALIC 2054 +#define SCI_STYLESETSIZE 2055 +#define SCI_STYLESETFONT 2056 +#define SCI_STYLESETEOLFILLED 2057 +#define SCI_STYLERESETDEFAULT 2058 +#define SCI_STYLESETUNDERLINE 2059 +#define SC_CASE_MIXED 0 +#define SC_CASE_UPPER 1 +#define SC_CASE_LOWER 2 +#define SCI_STYLEGETFORE 2481 +#define SCI_STYLEGETBACK 2482 +#define SCI_STYLEGETBOLD 2483 +#define SCI_STYLEGETITALIC 2484 +#define SCI_STYLEGETSIZE 2485 +#define SCI_STYLEGETFONT 2486 +#define SCI_STYLEGETEOLFILLED 2487 +#define SCI_STYLEGETUNDERLINE 2488 +#define SCI_STYLEGETCASE 2489 +#define SCI_STYLEGETCHARACTERSET 2490 +#define SCI_STYLEGETVISIBLE 2491 +#define SCI_STYLEGETCHANGEABLE 2492 +#define SCI_STYLEGETHOTSPOT 2493 +#define SCI_STYLESETCASE 2060 +#define SCI_STYLESETCHARACTERSET 2066 +#define SCI_STYLESETHOTSPOT 2409 +#define SCI_SETSELFORE 2067 +#define SCI_SETSELBACK 2068 +#define SCI_GETSELALPHA 2477 +#define SCI_SETSELALPHA 2478 +#define SCI_GETSELEOLFILLED 2479 +#define SCI_SETSELEOLFILLED 2480 +#define SCI_SETCARETFORE 2069 +#define SCI_ASSIGNCMDKEY 2070 +#define SCI_CLEARCMDKEY 2071 +#define SCI_CLEARALLCMDKEYS 2072 +#define SCI_SETSTYLINGEX 2073 +#define SCI_STYLESETVISIBLE 2074 +#define SCI_GETCARETPERIOD 2075 +#define SCI_SETCARETPERIOD 2076 +#define SCI_SETWORDCHARS 2077 +#define SCI_BEGINUNDOACTION 2078 +#define SCI_ENDUNDOACTION 2079 +#define INDIC_PLAIN 0 +#define INDIC_SQUIGGLE 1 +#define INDIC_TT 2 +#define INDIC_DIAGONAL 3 +#define INDIC_STRIKE 4 +#define INDIC_HIDDEN 5 +#define INDIC_BOX 6 +#define INDIC_ROUNDBOX 7 +#define INDIC_MAX 31 +#define INDIC_CONTAINER 8 +#define INDIC0_MASK 0x20 +#define INDIC1_MASK 0x40 +#define INDIC2_MASK 0x80 +#define INDICS_MASK 0xE0 +#define SCI_INDICSETSTYLE 2080 +#define SCI_INDICGETSTYLE 2081 +#define SCI_INDICSETFORE 2082 +#define SCI_INDICGETFORE 2083 +#define SCI_INDICSETUNDER 2510 +#define SCI_INDICGETUNDER 2511 +#define SCI_SETWHITESPACEFORE 2084 +#define SCI_SETWHITESPACEBACK 2085 +#define SCI_SETSTYLEBITS 2090 +#define SCI_GETSTYLEBITS 2091 +#define SCI_SETLINESTATE 2092 +#define SCI_GETLINESTATE 2093 +#define SCI_GETMAXLINESTATE 2094 +#define SCI_GETCARETLINEVISIBLE 2095 +#define SCI_SETCARETLINEVISIBLE 2096 +#define SCI_GETCARETLINEBACK 2097 +#define SCI_SETCARETLINEBACK 2098 +#define SCI_STYLESETCHANGEABLE 2099 +#define SCI_AUTOCSHOW 2100 +#define SCI_AUTOCCANCEL 2101 +#define SCI_AUTOCACTIVE 2102 +#define SCI_AUTOCPOSSTART 2103 +#define SCI_AUTOCCOMPLETE 2104 +#define SCI_AUTOCSTOPS 2105 +#define SCI_AUTOCSETSEPARATOR 2106 +#define SCI_AUTOCGETSEPARATOR 2107 +#define SCI_AUTOCSELECT 2108 +#define SCI_AUTOCSETCANCELATSTART 2110 +#define SCI_AUTOCGETCANCELATSTART 2111 +#define SCI_AUTOCSETFILLUPS 2112 +#define SCI_AUTOCSETCHOOSESINGLE 2113 +#define SCI_AUTOCGETCHOOSESINGLE 2114 +#define SCI_AUTOCSETIGNORECASE 2115 +#define SCI_AUTOCGETIGNORECASE 2116 +#define SCI_USERLISTSHOW 2117 +#define SCI_AUTOCSETAUTOHIDE 2118 +#define SCI_AUTOCGETAUTOHIDE 2119 +#define SCI_AUTOCSETDROPRESTOFWORD 2270 +#define SCI_AUTOCGETDROPRESTOFWORD 2271 +#define SCI_REGISTERIMAGE 2405 +#define SCI_CLEARREGISTEREDIMAGES 2408 +#define SCI_AUTOCGETTYPESEPARATOR 2285 +#define SCI_AUTOCSETTYPESEPARATOR 2286 +#define SCI_AUTOCSETMAXWIDTH 2208 +#define SCI_AUTOCGETMAXWIDTH 2209 +#define SCI_AUTOCSETMAXHEIGHT 2210 +#define SCI_AUTOCGETMAXHEIGHT 2211 +#define SCI_SETINDENT 2122 +#define SCI_GETINDENT 2123 +#define SCI_SETUSETABS 2124 +#define SCI_GETUSETABS 2125 +#define SCI_SETLINEINDENTATION 2126 +#define SCI_GETLINEINDENTATION 2127 +#define SCI_GETLINEINDENTPOSITION 2128 +#define SCI_GETCOLUMN 2129 +#define SCI_SETHSCROLLBAR 2130 +#define SCI_GETHSCROLLBAR 2131 +#define SCI_SETINDENTATIONGUIDES 2132 +#define SCI_GETINDENTATIONGUIDES 2133 +#define SCI_SETHIGHLIGHTGUIDE 2134 +#define SCI_GETHIGHLIGHTGUIDE 2135 +#define SCI_GETLINEENDPOSITION 2136 +#define SCI_GETCODEPAGE 2137 +#define SCI_GETCARETFORE 2138 +#define SCI_GETUSEPALETTE 2139 +#define SCI_GETREADONLY 2140 +#define SCI_SETCURRENTPOS 2141 +#define SCI_SETSELECTIONSTART 2142 +#define SCI_GETSELECTIONSTART 2143 +#define SCI_SETSELECTIONEND 2144 +#define SCI_GETSELECTIONEND 2145 +#define SCI_SETPRINTMAGNIFICATION 2146 +#define SCI_GETPRINTMAGNIFICATION 2147 +#define SC_PRINT_NORMAL 0 +#define SC_PRINT_INVERTLIGHT 1 +#define SC_PRINT_BLACKONWHITE 2 +#define SC_PRINT_COLOURONWHITE 3 +#define SC_PRINT_COLOURONWHITEDEFAULTBG 4 +#define SCI_SETPRINTCOLOURMODE 2148 +#define SCI_GETPRINTCOLOURMODE 2149 +#define SCFIND_WHOLEWORD 2 +#define SCFIND_MATCHCASE 4 +#define SCFIND_WORDSTART 0x00100000 +#define SCFIND_REGEXP 0x00200000 +#define SCFIND_POSIX 0x00400000 +#define SCI_FINDTEXT 2150 +#define SCI_FORMATRANGE 2151 +#define SCI_GETFIRSTVISIBLELINE 2152 +#define SCI_GETLINE 2153 +#define SCI_GETLINECOUNT 2154 +#define SCI_SETMARGINLEFT 2155 +#define SCI_GETMARGINLEFT 2156 +#define SCI_SETMARGINRIGHT 2157 +#define SCI_GETMARGINRIGHT 2158 +#define SCI_GETMODIFY 2159 +#define SCI_SETSEL 2160 +#define SCI_GETSELTEXT 2161 +#define SCI_GETTEXTRANGE 2162 +#define SCI_HIDESELECTION 2163 +#define SCI_POINTXFROMPOSITION 2164 +#define SCI_POINTYFROMPOSITION 2165 +#define SCI_LINEFROMPOSITION 2166 +#define SCI_POSITIONFROMLINE 2167 +#define SCI_LINESCROLL 2168 +#define SCI_SCROLLCARET 2169 +#define SCI_REPLACESEL 2170 +#define SCI_SETREADONLY 2171 +#define SCI_NULL 2172 +#define SCI_CANPASTE 2173 +#define SCI_CANUNDO 2174 +#define SCI_EMPTYUNDOBUFFER 2175 +#define SCI_UNDO 2176 +#define SCI_CUT 2177 +#define SCI_COPY 2178 +#define SCI_PASTE 2179 +#define SCI_CLEAR 2180 +#define SCI_SETTEXT 2181 +#define SCI_GETTEXT 2182 +#define SCI_GETTEXTLENGTH 2183 +#define SCI_GETDIRECTFUNCTION 2184 +#define SCI_GETDIRECTPOINTER 2185 +#define SCI_SETOVERTYPE 2186 +#define SCI_GETOVERTYPE 2187 +#define SCI_SETCARETWIDTH 2188 +#define SCI_GETCARETWIDTH 2189 +#define SCI_SETTARGETSTART 2190 +#define SCI_GETTARGETSTART 2191 +#define SCI_SETTARGETEND 2192 +#define SCI_GETTARGETEND 2193 +#define SCI_REPLACETARGET 2194 +#define SCI_REPLACETARGETRE 2195 +#define SCI_SEARCHINTARGET 2197 +#define SCI_SETSEARCHFLAGS 2198 +#define SCI_GETSEARCHFLAGS 2199 +#define SCI_CALLTIPSHOW 2200 +#define SCI_CALLTIPCANCEL 2201 +#define SCI_CALLTIPACTIVE 2202 +#define SCI_CALLTIPPOSSTART 2203 +#define SCI_CALLTIPSETHLT 2204 +#define SCI_CALLTIPSETBACK 2205 +#define SCI_CALLTIPSETFORE 2206 +#define SCI_CALLTIPSETFOREHLT 2207 +#define SCI_CALLTIPUSESTYLE 2212 +#define SCI_VISIBLEFROMDOCLINE 2220 +#define SCI_DOCLINEFROMVISIBLE 2221 +#define SCI_WRAPCOUNT 2235 +#define SC_FOLDLEVELBASE 0x400 +#define SC_FOLDLEVELWHITEFLAG 0x1000 +#define SC_FOLDLEVELHEADERFLAG 0x2000 +#define SC_FOLDLEVELBOXHEADERFLAG 0x4000 +#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000 +#define SC_FOLDLEVELCONTRACTED 0x10000 +#define SC_FOLDLEVELUNINDENT 0x20000 +#define SC_FOLDLEVELNUMBERMASK 0x0FFF +#define SCI_SETFOLDLEVEL 2222 +#define SCI_GETFOLDLEVEL 2223 +#define SCI_GETLASTCHILD 2224 +#define SCI_GETFOLDPARENT 2225 +#define SCI_SHOWLINES 2226 +#define SCI_HIDELINES 2227 +#define SCI_GETLINEVISIBLE 2228 +#define SCI_SETFOLDEXPANDED 2229 +#define SCI_GETFOLDEXPANDED 2230 +#define SCI_TOGGLEFOLD 2231 +#define SCI_ENSUREVISIBLE 2232 +#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define SC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define SC_FOLDFLAG_BOX 0x0001 +#define SCI_SETFOLDFLAGS 2233 +#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 +#define SCI_SETTABINDENTS 2260 +#define SCI_GETTABINDENTS 2261 +#define SCI_SETBACKSPACEUNINDENTS 2262 +#define SCI_GETBACKSPACEUNINDENTS 2263 +#define SC_TIME_FOREVER 10000000 +#define SCI_SETMOUSEDWELLTIME 2264 +#define SCI_GETMOUSEDWELLTIME 2265 +#define SCI_WORDSTARTPOSITION 2266 +#define SCI_WORDENDPOSITION 2267 +#define SC_WRAP_NONE 0 +#define SC_WRAP_WORD 1 +#define SC_WRAP_CHAR 2 +#define SCI_SETWRAPMODE 2268 +#define SCI_GETWRAPMODE 2269 +#define SC_WRAPVISUALFLAG_NONE 0x0000 +#define SC_WRAPVISUALFLAG_END 0x0001 +#define SC_WRAPVISUALFLAG_START 0x0002 +#define SCI_SETWRAPVISUALFLAGS 2460 +#define SCI_GETWRAPVISUALFLAGS 2461 +#define SC_WRAPVISUALFLAGLOC_DEFAULT 0x0000 +#define SC_WRAPVISUALFLAGLOC_END_BY_TEXT 0x0001 +#define SC_WRAPVISUALFLAGLOC_START_BY_TEXT 0x0002 +#define SCI_SETWRAPVISUALFLAGSLOCATION 2462 +#define SCI_GETWRAPVISUALFLAGSLOCATION 2463 +#define SCI_SETWRAPSTARTINDENT 2464 +#define SCI_GETWRAPSTARTINDENT 2465 +#define SC_CACHE_NONE 0 +#define SC_CACHE_CARET 1 +#define SC_CACHE_PAGE 2 +#define SC_CACHE_DOCUMENT 3 +#define SCI_SETLAYOUTCACHE 2272 +#define SCI_GETLAYOUTCACHE 2273 +#define SCI_SETSCROLLWIDTH 2274 +#define SCI_GETSCROLLWIDTH 2275 +#define SCI_TEXTWIDTH 2276 +#define SCI_SETENDATLASTLINE 2277 +#define SCI_GETENDATLASTLINE 2278 +#define SCI_TEXTHEIGHT 2279 +#define SCI_SETVSCROLLBAR 2280 +#define SCI_GETVSCROLLBAR 2281 +#define SCI_APPENDTEXT 2282 +#define SCI_GETTWOPHASEDRAW 2283 +#define SCI_SETTWOPHASEDRAW 2284 +#define SCI_TARGETFROMSELECTION 2287 +#define SCI_LINESJOIN 2288 +#define SCI_LINESSPLIT 2289 +#define SCI_SETFOLDMARGINCOLOUR 2290 +#define SCI_SETFOLDMARGINHICOLOUR 2291 +#define SCI_LINEDOWN 2300 +#define SCI_LINEDOWNEXTEND 2301 +#define SCI_LINEUP 2302 +#define SCI_LINEUPEXTEND 2303 +#define SCI_CHARLEFT 2304 +#define SCI_CHARLEFTEXTEND 2305 +#define SCI_CHARRIGHT 2306 +#define SCI_CHARRIGHTEXTEND 2307 +#define SCI_WORDLEFT 2308 +#define SCI_WORDLEFTEXTEND 2309 +#define SCI_WORDRIGHT 2310 +#define SCI_WORDRIGHTEXTEND 2311 +#define SCI_HOME 2312 +#define SCI_HOMEEXTEND 2313 +#define SCI_LINEEND 2314 +#define SCI_LINEENDEXTEND 2315 +#define SCI_DOCUMENTSTART 2316 +#define SCI_DOCUMENTSTARTEXTEND 2317 +#define SCI_DOCUMENTEND 2318 +#define SCI_DOCUMENTENDEXTEND 2319 +#define SCI_PAGEUP 2320 +#define SCI_PAGEUPEXTEND 2321 +#define SCI_PAGEDOWN 2322 +#define SCI_PAGEDOWNEXTEND 2323 +#define SCI_EDITTOGGLEOVERTYPE 2324 +#define SCI_CANCEL 2325 +#define SCI_DELETEBACK 2326 +#define SCI_TAB 2327 +#define SCI_BACKTAB 2328 +#define SCI_NEWLINE 2329 +#define SCI_FORMFEED 2330 +#define SCI_VCHOME 2331 +#define SCI_VCHOMEEXTEND 2332 +#define SCI_ZOOMIN 2333 +#define SCI_ZOOMOUT 2334 +#define SCI_DELWORDLEFT 2335 +#define SCI_DELWORDRIGHT 2336 +#define SCI_LINECUT 2337 +#define SCI_LINEDELETE 2338 +#define SCI_LINETRANSPOSE 2339 +#define SCI_LINEDUPLICATE 2404 +#define SCI_LOWERCASE 2340 +#define SCI_UPPERCASE 2341 +#define SCI_LINESCROLLDOWN 2342 +#define SCI_LINESCROLLUP 2343 +#define SCI_DELETEBACKNOTLINE 2344 +#define SCI_HOMEDISPLAY 2345 +#define SCI_HOMEDISPLAYEXTEND 2346 +#define SCI_LINEENDDISPLAY 2347 +#define SCI_LINEENDDISPLAYEXTEND 2348 +#define SCI_HOMEWRAP 2349 +#define SCI_HOMEWRAPEXTEND 2450 +#define SCI_LINEENDWRAP 2451 +#define SCI_LINEENDWRAPEXTEND 2452 +#define SCI_VCHOMEWRAP 2453 +#define SCI_VCHOMEWRAPEXTEND 2454 +#define SCI_LINECOPY 2455 +#define SCI_MOVECARETINSIDEVIEW 2401 +#define SCI_LINELENGTH 2350 +#define SCI_BRACEHIGHLIGHT 2351 +#define SCI_BRACEBADLIGHT 2352 +#define SCI_BRACEMATCH 2353 +#define SCI_GETVIEWEOL 2355 +#define SCI_SETVIEWEOL 2356 +#define SCI_GETDOCPOINTER 2357 +#define SCI_SETDOCPOINTER 2358 +#define SCI_SETMODEVENTMASK 2359 +#define EDGE_NONE 0 +#define EDGE_LINE 1 +#define EDGE_BACKGROUND 2 +#define SCI_GETEDGECOLUMN 2360 +#define SCI_SETEDGECOLUMN 2361 +#define SCI_GETEDGEMODE 2362 +#define SCI_SETEDGEMODE 2363 +#define SCI_GETEDGECOLOUR 2364 +#define SCI_SETEDGECOLOUR 2365 +#define SCI_SEARCHANCHOR 2366 +#define SCI_SEARCHNEXT 2367 +#define SCI_SEARCHPREV 2368 +#define SCI_LINESONSCREEN 2370 +#define SCI_USEPOPUP 2371 +#define SCI_SELECTIONISRECTANGLE 2372 +#define SCI_SETZOOM 2373 +#define SCI_GETZOOM 2374 +#define SCI_CREATEDOCUMENT 2375 +#define SCI_ADDREFDOCUMENT 2376 +#define SCI_RELEASEDOCUMENT 2377 +#define SCI_GETMODEVENTMASK 2378 +#define SCI_SETFOCUS 2380 +#define SCI_GETFOCUS 2381 +#define SCI_SETSTATUS 2382 +#define SCI_GETSTATUS 2383 +#define SCI_SETMOUSEDOWNCAPTURES 2384 +#define SCI_GETMOUSEDOWNCAPTURES 2385 +#define SC_CURSORNORMAL -1 +#define SC_CURSORWAIT 4 +#define SCI_SETCURSOR 2386 +#define SCI_GETCURSOR 2387 +#define SCI_SETCONTROLCHARSYMBOL 2388 +#define SCI_GETCONTROLCHARSYMBOL 2389 +#define SCI_WORDPARTLEFT 2390 +#define SCI_WORDPARTLEFTEXTEND 2391 +#define SCI_WORDPARTRIGHT 2392 +#define SCI_WORDPARTRIGHTEXTEND 2393 +#define VISIBLE_SLOP 0x01 +#define VISIBLE_STRICT 0x04 +#define SCI_SETVISIBLEPOLICY 2394 +#define SCI_DELLINELEFT 2395 +#define SCI_DELLINERIGHT 2396 +#define SCI_SETXOFFSET 2397 +#define SCI_GETXOFFSET 2398 +#define SCI_CHOOSECARETX 2399 +#define SCI_GRABFOCUS 2400 +#define CARET_SLOP 0x01 +#define CARET_STRICT 0x04 +#define CARET_JUMPS 0x10 +#define CARET_EVEN 0x08 +#define SCI_SETXCARETPOLICY 2402 +#define SCI_SETYCARETPOLICY 2403 +#define SCI_SETPRINTWRAPMODE 2406 +#define SCI_GETPRINTWRAPMODE 2407 +#define SCI_SETHOTSPOTACTIVEFORE 2410 +#define SCI_GETHOTSPOTACTIVEFORE 2494 +#define SCI_SETHOTSPOTACTIVEBACK 2411 +#define SCI_GETHOTSPOTACTIVEBACK 2495 +#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 +#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496 +#define SCI_SETHOTSPOTSINGLELINE 2421 +#define SCI_GETHOTSPOTSINGLELINE 2497 +#define SCI_PARADOWN 2413 +#define SCI_PARADOWNEXTEND 2414 +#define SCI_PARAUP 2415 +#define SCI_PARAUPEXTEND 2416 +#define SCI_POSITIONBEFORE 2417 +#define SCI_POSITIONAFTER 2418 +#define SCI_COPYRANGE 2419 +#define SCI_COPYTEXT 2420 +#define SC_SEL_STREAM 0 +#define SC_SEL_RECTANGLE 1 +#define SC_SEL_LINES 2 +#define SCI_SETSELECTIONMODE 2422 +#define SCI_GETSELECTIONMODE 2423 +#define SCI_GETLINESELSTARTPOSITION 2424 +#define SCI_GETLINESELENDPOSITION 2425 +#define SCI_LINEDOWNRECTEXTEND 2426 +#define SCI_LINEUPRECTEXTEND 2427 +#define SCI_CHARLEFTRECTEXTEND 2428 +#define SCI_CHARRIGHTRECTEXTEND 2429 +#define SCI_HOMERECTEXTEND 2430 +#define SCI_VCHOMERECTEXTEND 2431 +#define SCI_LINEENDRECTEXTEND 2432 +#define SCI_PAGEUPRECTEXTEND 2433 +#define SCI_PAGEDOWNRECTEXTEND 2434 +#define SCI_STUTTEREDPAGEUP 2435 +#define SCI_STUTTEREDPAGEUPEXTEND 2436 +#define SCI_STUTTEREDPAGEDOWN 2437 +#define SCI_STUTTEREDPAGEDOWNEXTEND 2438 +#define SCI_WORDLEFTEND 2439 +#define SCI_WORDLEFTENDEXTEND 2440 +#define SCI_WORDRIGHTEND 2441 +#define SCI_WORDRIGHTENDEXTEND 2442 +#define SCI_SETWHITESPACECHARS 2443 +#define SCI_SETCHARSDEFAULT 2444 +#define SCI_AUTOCGETCURRENT 2445 +#define SCI_ALLOCATE 2446 +#define SCI_TARGETASUTF8 2447 +#define SCI_SETLENGTHFORENCODE 2448 +#define SCI_ENCODEDFROMUTF8 2449 +#define SCI_FINDCOLUMN 2456 +#define SCI_GETCARETSTICKY 2457 +#define SCI_SETCARETSTICKY 2458 +#define SCI_TOGGLECARETSTICKY 2459 +#define SCI_SETPASTECONVERTENDINGS 2467 +#define SCI_GETPASTECONVERTENDINGS 2468 +#define SCI_SELECTIONDUPLICATE 2469 +#define SC_ALPHA_TRANSPARENT 0 +#define SC_ALPHA_OPAQUE 255 +#define SC_ALPHA_NOALPHA 256 +#define SCI_SETCARETLINEBACKALPHA 2470 +#define SCI_GETCARETLINEBACKALPHA 2471 +#define CARETSTYLE_INVISIBLE 0 +#define CARETSTYLE_LINE 1 +#define CARETSTYLE_BLOCK 2 +#define SCI_SETCARETSTYLE 2512 +#define SCI_GETCARETSTYLE 2513 +#define SCI_SETINDICATORCURRENT 2500 +#define SCI_GETINDICATORCURRENT 2501 +#define SCI_SETINDICATORVALUE 2502 +#define SCI_GETINDICATORVALUE 2503 +#define SCI_INDICATORFILLRANGE 2504 +#define SCI_INDICATORCLEARRANGE 2505 +#define SCI_INDICATORALLONFOR 2506 +#define SCI_INDICATORVALUEAT 2507 +#define SCI_INDICATORSTART 2508 +#define SCI_INDICATOREND 2509 +#define SCI_SETPOSITIONCACHE 2514 +#define SCI_GETPOSITIONCACHE 2515 +#define SCI_STARTRECORD 3001 +#define SCI_STOPRECORD 3002 +#define SCI_SETLEXER 4001 +#define SCI_GETLEXER 4002 +#define SCI_COLOURISE 4003 +#define SCI_SETPROPERTY 4004 +#define KEYWORDSET_MAX 8 +#define SCI_SETKEYWORDS 4005 +#define SCI_SETLEXERLANGUAGE 4006 +#define SCI_LOADLEXERLIBRARY 4007 +#define SCI_GETPROPERTY 4008 +#define SCI_GETPROPERTYEXPANDED 4009 +#define SCI_GETPROPERTYINT 4010 +#define SCI_GETSTYLEBITSNEEDED 4011 +#define SC_MOD_INSERTTEXT 0x1 +#define SC_MOD_DELETETEXT 0x2 +#define SC_MOD_CHANGESTYLE 0x4 +#define SC_MOD_CHANGEFOLD 0x8 +#define SC_PERFORMED_USER 0x10 +#define SC_PERFORMED_UNDO 0x20 +#define SC_PERFORMED_REDO 0x40 +#define SC_MULTISTEPUNDOREDO 0x80 +#define SC_LASTSTEPINUNDOREDO 0x100 +#define SC_MOD_CHANGEMARKER 0x200 +#define SC_MOD_BEFOREINSERT 0x400 +#define SC_MOD_BEFOREDELETE 0x800 +#define SC_MULTILINEUNDOREDO 0x1000 +#define SC_STARTACTION 0x2000 +#define SC_MOD_CHANGEINDICATOR 0x4000 +#define SC_MODEVENTMASKALL 0x6FFF +#define SCEN_CHANGE 768 +#define SCEN_SETFOCUS 512 +#define SCEN_KILLFOCUS 256 +#define SCK_DOWN 300 +#define SCK_UP 301 +#define SCK_LEFT 302 +#define SCK_RIGHT 303 +#define SCK_HOME 304 +#define SCK_END 305 +#define SCK_PRIOR 306 +#define SCK_NEXT 307 +#define SCK_DELETE 308 +#define SCK_INSERT 309 +#define SCK_ESCAPE 7 +#define SCK_BACK 8 +#define SCK_TAB 9 +#define SCK_RETURN 13 +#define SCK_ADD 310 +#define SCK_SUBTRACT 311 +#define SCK_DIVIDE 312 +#define SCK_WIN 313 +#define SCK_RWIN 314 +#define SCK_MENU 315 +#define SCMOD_NORM 0 +#define SCMOD_SHIFT 1 +#define SCMOD_CTRL 2 +#define SCMOD_ALT 4 +#define SCN_STYLENEEDED 2000 +#define SCN_CHARADDED 2001 +#define SCN_SAVEPOINTREACHED 2002 +#define SCN_SAVEPOINTLEFT 2003 +#define SCN_MODIFYATTEMPTRO 2004 +#define SCN_KEY 2005 +#define SCN_DOUBLECLICK 2006 +#define SCN_UPDATEUI 2007 +#define SCN_MODIFIED 2008 +#define SCN_MACRORECORD 2009 +#define SCN_MARGINCLICK 2010 +#define SCN_NEEDSHOWN 2011 +#define SCN_PAINTED 2013 +#define SCN_USERLISTSELECTION 2014 +#define SCN_URIDROPPED 2015 +#define SCN_DWELLSTART 2016 +#define SCN_DWELLEND 2017 +#define SCN_ZOOM 2018 +#define SCN_HOTSPOTCLICK 2019 +#define SCN_HOTSPOTDOUBLECLICK 2020 +#define SCN_CALLTIPCLICK 2021 +#define SCN_AUTOCSELECTION 2022 +#define SCN_INDICATORCLICK 2023 +#define SCN_INDICATORRELEASE 2024 +//--Autogenerated -- end of section automatically generated from Scintilla.iface + +// These structures are defined to be exactly the same shape as the Win32 +// CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs. +// So older code that treats Scintilla as a RichEdit will work. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +struct CharacterRange { + long cpMin; + long cpMax; +}; + +struct TextRange { + struct CharacterRange chrg; + char *lpstrText; +}; + +struct TextToFind { + struct CharacterRange chrg; + char *lpstrText; + struct CharacterRange chrgText; +}; + +#ifdef PLATFORM_H + +// This structure is used in printing and requires some of the graphics types +// from Platform.h. Not needed by most client code. + +struct RangeToFormat { + SurfaceID hdc; + SurfaceID hdcTarget; + PRectangle rc; + PRectangle rcPage; + CharacterRange chrg; +}; + +#endif + +struct NotifyHeader { + // Compatible with Windows NMHDR. + // hwndFrom is really an environment specific window handle or pointer + // but most clients of Scintilla.h do not have this type visible. + void *hwndFrom; + uptr_t idFrom; + unsigned int code; +}; + +struct SCNotification { + struct NotifyHeader nmhdr; + int position; // SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND + int ch; // SCN_CHARADDED, SCN_KEY + int modifiers; // SCN_KEY + int modificationType; // SCN_MODIFIED + const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION + int length; // SCN_MODIFIED + int linesAdded; // SCN_MODIFIED + int message; // SCN_MACRORECORD + uptr_t wParam; // SCN_MACRORECORD + sptr_t lParam; // SCN_MACRORECORD + int line; // SCN_MODIFIED + int foldLevelNow; // SCN_MODIFIED + int foldLevelPrev; // SCN_MODIFIED + int margin; // SCN_MARGINCLICK + int listType; // SCN_USERLISTSELECTION + int x; // SCN_DWELLSTART, SCN_DWELLEND + int y; // SCN_DWELLSTART, SCN_DWELLEND +}; + +#ifdef SCI_NAMESPACE +} +#endif + +// Deprecation section listing all API features that are deprecated and will +// will be removed completely in a future version. +// To enable these features define INCLUDE_DEPRECATED_FEATURES + +#ifdef INCLUDE_DEPRECATED_FEATURES + +#define SCI_SETCARETPOLICY 2369 +#define CARET_CENTER 0x02 +#define CARET_XEVEN 0x08 +#define CARET_XJUMPS 0x10 + +#define SCN_POSCHANGED 2012 +#define SCN_CHECKBRACE 2007 + +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/Scintilla.iface b/sdk/wxscintilla/src/scintilla/include/Scintilla.iface new file mode 100644 index 0000000000..0a429bef59 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/Scintilla.iface @@ -0,0 +1,3234 @@ +## First line may be used for shbang + +## This file defines the interface to Scintilla + +## Copyright 2000-2003 by Neil Hodgson +## The License.txt file describes the conditions under which this software may be distributed. + +## A line starting with ## is a pure comment and should be stripped by readers. +## A line starting with #! is for future shbang use +## A line starting with # followed by a space is a documentation comment and refers +## to the next feature definition. + +## Each feature is defined by a line starting with fun, get, set, val or evt. +## cat -> start a category +## fun -> a function +## get -> a property get function +## set -> a property set function +## val -> definition of a constant +## evt -> an event +## enu -> associate an enumeration with a set of vals with a prefix +## lex -> associate a lexer with the lexical classes it produces +## +## All other feature names should be ignored. They may be defined in the future. +## A property may have a set function, a get function or both. Each will have +## "Get" or "Set" in their names and the corresponding name will have the obvious switch. +## A property may be subscripted, in which case the first parameter is the subscript. +## fun, get, and set features have a strict syntax: +## [=,) +## where stands for white space. +## param may be empty (null value) or is [=] +## Additional white space is allowed between elements. +## The syntax for evt is [=[,]*]) +## Feature names that contain an underscore are defined by Windows, so in these +## cases, using the Windows definition is preferred where available. +## The feature numbers are stable so features will not be renumbered. +## Features may be removed but they will go through a period of deprecation +## before removal which is signalled by moving them into the Deprecated category. +## +## enu has the syntax enu=[]* where all the val +## features in this file starting with a given are considered part of the +## enumeration. +## +## lex has the syntax lex=[]* +## where name is a reasonably capitalised (Python, XML) identifier or UI name, +## lexerVal is the val used to specify the lexer, and the list of prefixes is similar +## to enu. The name may not be the same as that used within the lexer so the lexerVal +## should be used to tie these entities together. + +## Types: +## void +## int +## bool -> integer, 1=true, 0=false +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. +## string -> pointer to const character +## stringresult -> pointer to character, NULL-> return size of result +## cells -> pointer to array of cells, each cell containing a style byte and character byte +## textrange -> range of a min and a max position with an output string +## findtext -> searchrange, text -> foundposition +## keymod -> integer containing key in low half and modifiers in high half +## formatrange +## Types no longer used: +## findtextex -> searchrange +## charrange -> range of a min and a max position +## charrangeresult -> like charrange, but output param +## countedstring +## point -> x,y +## pointresult -> like point, but output param +## rectangle -> left,top,right,bottom +## Client code should ignore definitions containing types it does not understand, except +## for possibly #defining the constants + +## Line numbers and positions start at 0. +## String arguments may contain NUL ('\0') characters where the calls provide a length +## argument and retrieve NUL characters. All retrieved strings except for those retrieved +## by GetLine also have a NUL appended but client code should calculate the size that +## will be returned rather than relying upon the NUL whenever possible. Allow for the +## extra NUL character when allocating buffers. The size to allocate for a stringresult +## can be determined by calling with a NULL (0) pointer. + +cat Basics + +################################################ +## For Scintilla.h +val INVALID_POSITION=-1 +# Define start of Scintilla messages to be greater than all Windows edit (EM_*) messages +# as many EM_ messages can be used although that use is deprecated. +val SCI_START=2000 +val SCI_OPTIONAL_START=3000 +val SCI_LEXER_START=4000 + +# Add text to the document at current position. +fun void AddText=2001(int length, string text) + +# Add array of cells to document. +fun void AddStyledText=2002(int length, cells c) + +# Insert string at a position. +fun void InsertText=2003(position pos, string text) + +# Delete all text in the document. +fun void ClearAll=2004(,) + +# Set all style bytes to 0, remove all folding information. +fun void ClearDocumentStyle=2005(,) + +# Returns the number of characters in the document. +get int GetLength=2006(,) + +# Returns the character byte at the position. +get int GetCharAt=2007(position pos,) + +# Returns the position of the caret. +get position GetCurrentPos=2008(,) + +# Returns the position of the opposite end of the selection to the caret. +get position GetAnchor=2009(,) + +# Returns the style byte at the position. +get int GetStyleAt=2010(position pos,) + +# Redoes the next action on the undo history. +fun void Redo=2011(,) + +# Choose between collecting actions into the undo +# history and discarding them. +set void SetUndoCollection=2012(bool collectUndo,) + +# Select all the text in the document. +fun void SelectAll=2013(,) + +# Remember the current position in the undo history as the position +# at which the document was saved. +fun void SetSavePoint=2014(,) + +# Retrieve a buffer of cells. +# Returns the number of bytes in the buffer not including terminating NULs. +fun int GetStyledText=2015(, textrange tr) + +# Are there any redoable actions in the undo history? +fun bool CanRedo=2016(,) + +# Retrieve the line number at which a particular marker is located. +fun int MarkerLineFromHandle=2017(int handle,) + +# Delete a marker. +fun void MarkerDeleteHandle=2018(int handle,) + +# Is undo history being collected? +get bool GetUndoCollection=2019(,) + +enu WhiteSpace=SCWS_ +val SCWS_INVISIBLE=0 +val SCWS_VISIBLEALWAYS=1 +val SCWS_VISIBLEAFTERINDENT=2 + +# Are white space characters currently visible? +# Returns one of SCWS_* constants. +get int GetViewWS=2020(,) + +# Make white space characters invisible, always visible or visible outside indentation. +set void SetViewWS=2021(int viewWS,) + +# Find the position from a point within the window. +fun position PositionFromPoint=2022(int x, int y) + +# Find the position from a point within the window but return +# INVALID_POSITION if not close to text. +fun position PositionFromPointClose=2023(int x, int y) + +# Set caret to start of a line and ensure it is visible. +fun void GotoLine=2024(int line,) + +# Set caret to a position and ensure it is visible. +fun void GotoPos=2025(position pos,) + +# Set the selection anchor to a position. The anchor is the opposite +# end of the selection from the caret. +set void SetAnchor=2026(position posAnchor,) + +# Retrieve the text of the line containing the caret. +# Returns the index of the caret on the line. +fun int GetCurLine=2027(int length, stringresult text) + +# Retrieve the position of the last correctly styled character. +get position GetEndStyled=2028(,) + +enu EndOfLine=SC_EOL_ +val SC_EOL_CRLF=0 +val SC_EOL_CR=1 +val SC_EOL_LF=2 + +# Convert all line endings in the document to one mode. +fun void ConvertEOLs=2029(int eolMode,) + +# Retrieve the current end of line mode - one of CRLF, CR, or LF. +get int GetEOLMode=2030(,) + +# Set the current end of line mode. +set void SetEOLMode=2031(int eolMode,) + +# Set the current styling position to pos and the styling mask to mask. +# The styling mask can be used to protect some bits in each styling byte from modification. +fun void StartStyling=2032(position pos, int mask) + +# Change style from current styling position for length characters to a style +# and move the current styling position to after this newly styled segment. +fun void SetStyling=2033(int length, int style) + +# Is drawing done first into a buffer or direct to the screen? +get bool GetBufferedDraw=2034(,) + +# If drawing is buffered then each line of text is drawn into a bitmap buffer +# before drawing it to the screen to avoid flicker. +set void SetBufferedDraw=2035(bool buffered,) + +# Change the visible size of a tab to be a multiple of the width of a space character. +set void SetTabWidth=2036(int tabWidth,) + +# Retrieve the visible size of a tab. +get int GetTabWidth=2121(,) + +# The SC_CP_UTF8 value can be used to enter Unicode mode. +# This is the same value as CP_UTF8 in Windows +val SC_CP_UTF8=65001 + +# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +val SC_CP_DBCS=1 + +# Set the code page used to interpret the bytes of the document as characters. +# The SC_CP_UTF8 value can be used to enter Unicode mode. +set void SetCodePage=2037(int codePage,) + +# In palette mode, Scintilla uses the environment's palette calls to display +# more colours. This may lead to ugly displays. +set void SetUsePalette=2039(bool usePalette,) + +enu MarkerSymbol=SC_MARK_ +val MARKER_MAX=31 +val SC_MARK_CIRCLE=0 +val SC_MARK_ROUNDRECT=1 +val SC_MARK_ARROW=2 +val SC_MARK_SMALLRECT=3 +val SC_MARK_SHORTARROW=4 +val SC_MARK_EMPTY=5 +val SC_MARK_ARROWDOWN=6 +val SC_MARK_MINUS=7 +val SC_MARK_PLUS=8 + +# Shapes used for outlining column. +val SC_MARK_VLINE=9 +val SC_MARK_LCORNER=10 +val SC_MARK_TCORNER=11 +val SC_MARK_BOXPLUS=12 +val SC_MARK_BOXPLUSCONNECTED=13 +val SC_MARK_BOXMINUS=14 +val SC_MARK_BOXMINUSCONNECTED=15 +val SC_MARK_LCORNERCURVE=16 +val SC_MARK_TCORNERCURVE=17 +val SC_MARK_CIRCLEPLUS=18 +val SC_MARK_CIRCLEPLUSCONNECTED=19 +val SC_MARK_CIRCLEMINUS=20 +val SC_MARK_CIRCLEMINUSCONNECTED=21 + +# Invisible mark that only sets the line background color. +val SC_MARK_BACKGROUND=22 +val SC_MARK_DOTDOTDOT=23 +val SC_MARK_ARROWS=24 +val SC_MARK_PIXMAP=25 +val SC_MARK_FULLRECT=26 + +val SC_MARK_CHARACTER=10000 + +enu MarkerOutline=SC_MARKNUM_ +# Markers used for outlining column. +val SC_MARKNUM_FOLDEREND=25 +val SC_MARKNUM_FOLDEROPENMID=26 +val SC_MARKNUM_FOLDERMIDTAIL=27 +val SC_MARKNUM_FOLDERTAIL=28 +val SC_MARKNUM_FOLDERSUB=29 +val SC_MARKNUM_FOLDER=30 +val SC_MARKNUM_FOLDEROPEN=31 + +val SC_MASK_FOLDERS=0xFE000000 + +# Set the symbol used for a particular marker number. +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) + +# Set the foreground colour used for a particular marker number. +fun void MarkerSetFore=2041(int markerNumber, colour fore) + +# Set the background colour used for a particular marker number. +fun void MarkerSetBack=2042(int markerNumber, colour back) + +# Add a marker to a line, returning an ID which can be used to find or delete the marker. +fun int MarkerAdd=2043(int line, int markerNumber) + +# Delete a marker from a line. +fun void MarkerDelete=2044(int line, int markerNumber) + +# Delete all markers with a particular number from all lines. +fun void MarkerDeleteAll=2045(int markerNumber,) + +# Get a bit mask of all the markers set on a line. +fun int MarkerGet=2046(int line,) + +# Find the next line after lineStart that includes a marker in mask. +fun int MarkerNext=2047(int lineStart, int markerMask) + +# Find the previous line before lineStart that includes a marker in mask. +fun int MarkerPrevious=2048(int lineStart, int markerMask) + +# Define a marker from a pixmap. +fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) + +# Add a set of markers to a line. +fun void MarkerAddSet=2466(int line, int set) + +# Set the alpha used for a marker that is drawn in the text area, not the margin. +fun void MarkerSetAlpha=2476(int markerNumber, int alpha) + +enu MarginType=SC_MARGIN_ +val SC_MARGIN_SYMBOL=0 +val SC_MARGIN_NUMBER=1 +val SC_MARGIN_BACK=2 +val SC_MARGIN_FORE=3 + +# Set a margin to be either numeric or symbolic. +set void SetMarginTypeN=2240(int margin, int marginType) + +# Retrieve the type of a margin. +get int GetMarginTypeN=2241(int margin,) + +# Set the width of a margin to a width expressed in pixels. +set void SetMarginWidthN=2242(int margin, int pixelWidth) + +# Retrieve the width of a margin in pixels. +get int GetMarginWidthN=2243(int margin,) + +# Set a mask that determines which markers are displayed in a margin. +set void SetMarginMaskN=2244(int margin, int mask) + +# Retrieve the marker mask of a margin. +get int GetMarginMaskN=2245(int margin,) + +# Make a margin sensitive or insensitive to mouse clicks. +set void SetMarginSensitiveN=2246(int margin, bool sensitive) + +# Retrieve the mouse click sensitivity of a margin. +get bool GetMarginSensitiveN=2247(int margin,) + +# Styles in range 32..38 are predefined for parts of the UI and are not used as normal styles. +# Style 39 is for future use. +enu StylesCommon=STYLE_ +val STYLE_DEFAULT=32 +val STYLE_LINENUMBER=33 +val STYLE_BRACELIGHT=34 +val STYLE_BRACEBAD=35 +val STYLE_CONTROLCHAR=36 +val STYLE_INDENTGUIDE=37 +val STYLE_CALLTIP=38 +val STYLE_LASTPREDEFINED=39 +val STYLE_MAX=127 + +# Character set identifiers are used in StyleSetCharacterSet. +# The values are the same as the Windows *_CHARSET values. +enu CharacterSet=SC_CHARSET_ +val SC_CHARSET_ANSI=0 +val SC_CHARSET_DEFAULT=1 +val SC_CHARSET_BALTIC=186 +val SC_CHARSET_CHINESEBIG5=136 +val SC_CHARSET_EASTEUROPE=238 +val SC_CHARSET_GB2312=134 +val SC_CHARSET_GREEK=161 +val SC_CHARSET_HANGUL=129 +val SC_CHARSET_MAC=77 +val SC_CHARSET_OEM=255 +val SC_CHARSET_RUSSIAN=204 +val SC_CHARSET_CYRILLIC=1251 +val SC_CHARSET_SHIFTJIS=128 +val SC_CHARSET_SYMBOL=2 +val SC_CHARSET_TURKISH=162 +val SC_CHARSET_JOHAB=130 +val SC_CHARSET_HEBREW=177 +val SC_CHARSET_ARABIC=178 +val SC_CHARSET_VIETNAMESE=163 +val SC_CHARSET_THAI=222 +val SC_CHARSET_8859_15=1000 + +# Clear all the styles and make equivalent to the global default style. +set void StyleClearAll=2050(,) + +# Set the foreground colour of a style. +set void StyleSetFore=2051(int style, colour fore) + +# Set the background colour of a style. +set void StyleSetBack=2052(int style, colour back) + +# Set a style to be bold or not. +set void StyleSetBold=2053(int style, bool bold) + +# Set a style to be italic or not. +set void StyleSetItalic=2054(int style, bool italic) + +# Set the size of characters of a style. +set void StyleSetSize=2055(int style, int sizePoints) + +# Set the font of a style. +set void StyleSetFont=2056(int style, string fontName) + +# Set a style to have its end of line filled or not. +set void StyleSetEOLFilled=2057(int style, bool filled) + +# Reset the default style to its state at startup +fun void StyleResetDefault=2058(,) + +# Set a style to be underlined or not. +set void StyleSetUnderline=2059(int style, bool underline) + +enu CaseVisible=SC_CASE_ +val SC_CASE_MIXED=0 +val SC_CASE_UPPER=1 +val SC_CASE_LOWER=2 + +# Get the foreground colour of a style. +get colour StyleGetFore=2481(int style,) + +# Get the background colour of a style. +get colour StyleGetBack=2482(int style,) + +# Get is a style bold or not. +get bool StyleGetBold=2483(int style,) + +# Get is a style italic or not. +get bool StyleGetItalic=2484(int style,) + +# Get the size of characters of a style. +get int StyleGetSize=2485(int style,) + +# Get the font of a style. +# Returns the length of the fontName +fun int StyleGetFont=2486(int style, stringresult fontName) + +# Get is a style to have its end of line filled or not. +get bool StyleGetEOLFilled=2487(int style,) + +# Get is a style underlined or not. +get bool StyleGetUnderline=2488(int style,) + +# Get is a style mixed case, or to force upper or lower case. +get int StyleGetCase=2489(int style,) + +# Get the character get of the font in a style. +get int StyleGetCharacterSet=2490(int style,) + +# Get is a style visible or not. +get bool StyleGetVisible=2491(int style,) + +# Get is a style changeable or not (read only). +# Experimental feature, currently buggy. +get bool StyleGetChangeable=2492(int style,) + +# Get is a style a hotspot or not. +get bool StyleGetHotSpot=2493(int style,) + +# Set a style to be mixed case, or to force upper or lower case. +set void StyleSetCase=2060(int style, int caseForce) + +# Set the character set of the font in a style. +set void StyleSetCharacterSet=2066(int style, int characterSet) + +# Set a style to be a hotspot or not. +set void StyleSetHotSpot=2409(int style, bool hotspot) + +# Set the foreground colour of the selection and whether to use this setting. +fun void SetSelFore=2067(bool useSetting, colour fore) + +# Set the background colour of the selection and whether to use this setting. +fun void SetSelBack=2068(bool useSetting, colour back) + +# Get the alpha of the selection. +get int GetSelAlpha=2477(,) + +# Set the alpha of the selection. +set void SetSelAlpha=2478(int alpha,) + +# Is the selection end of line filled? +get bool GetSelEOLFilled=2479(,) + +# Set the selection to have its end of line filled or not. +set void SetSelEOLFilled=2480(bool filled,) + +# Set the foreground colour of the caret. +set void SetCaretFore=2069(colour fore,) + +# When key+modifier combination km is pressed perform msg. +fun void AssignCmdKey=2070(keymod km, int msg) + +# When key+modifier combination km is pressed do nothing. +fun void ClearCmdKey=2071(keymod km,) + +# Drop all key mappings. +fun void ClearAllCmdKeys=2072(,) + +# Set the styles for a segment of the document. +fun void SetStylingEx=2073(int length, string styles) + +# Set a style to be visible or not. +set void StyleSetVisible=2074(int style, bool visible) + +# Get the time in milliseconds that the caret is on and off. +get int GetCaretPeriod=2075(,) + +# Get the time in milliseconds that the caret is on and off. 0 = steady on. +set void SetCaretPeriod=2076(int periodMilliseconds,) + +# Set the set of characters making up words for when moving or selecting by word. +# First sets deaults like SetCharsDefault. +set void SetWordChars=2077(, string characters) + +# Start a sequence of actions that is undone and redone as a unit. +# May be nested. +fun void BeginUndoAction=2078(,) + +# End a sequence of actions that is undone and redone as a unit. +fun void EndUndoAction=2079(,) + +# Indicator style enumeration and some constants +enu IndicatorStyle=INDIC_ +val INDIC_PLAIN=0 +val INDIC_SQUIGGLE=1 +val INDIC_TT=2 +val INDIC_DIAGONAL=3 +val INDIC_STRIKE=4 +val INDIC_HIDDEN=5 +val INDIC_BOX=6 +val INDIC_ROUNDBOX=7 +val INDIC_MAX=31 +val INDIC_CONTAINER=8 +val INDIC0_MASK=0x20 +val INDIC1_MASK=0x40 +val INDIC2_MASK=0x80 +val INDICS_MASK=0xE0 + +# Set an indicator to plain, squiggle or TT. +set void IndicSetStyle=2080(int indic, int style) + +# Retrieve the style of an indicator. +get int IndicGetStyle=2081(int indic,) + +# Set the foreground colour of an indicator. +set void IndicSetFore=2082(int indic, colour fore) + +# Retrieve the foreground colour of an indicator. +get colour IndicGetFore=2083(int indic,) + +# Set an indicator to draw under text or over(default). +set void IndicSetUnder=2510(int indic, bool under) + +# Retrieve whether indicator drawn under or over text. +get bool IndicGetUnder=2511(int indic,) + +# Set the foreground colour of all whitespace and whether to use this setting. +fun void SetWhitespaceFore=2084(bool useSetting, colour fore) + +# Set the background colour of all whitespace and whether to use this setting. +fun void SetWhitespaceBack=2085(bool useSetting, colour back) + +# Divide each styling byte into lexical class bits (default: 5) and indicator +# bits (default: 3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Used to hold extra styling information for each line. +set void SetLineState=2092(int line, int state) + +# Retrieve the extra styling information for a line. +get int GetLineState=2093(int line,) + +# Retrieve the last line number that has line state. +get int GetMaxLineState=2094(,) + +# Is the background of the line containing the caret in a different colour? +get bool GetCaretLineVisible=2095(,) + +# Display the background of the line containing the caret in a different colour. +set void SetCaretLineVisible=2096(bool show,) + +# Get the colour of the background of the line containing the caret. +get colour GetCaretLineBack=2097(,) + +# Set the colour of the background of the line containing the caret. +set void SetCaretLineBack=2098(colour back,) + +# Set a style to be changeable or not (read only). +# Experimental feature, currently buggy. +set void StyleSetChangeable=2099(int style, bool changeable) + +# Display a auto-completion list. +# The lenEntered parameter indicates how many characters before +# the caret should be used to provide context. +fun void AutoCShow=2100(int lenEntered, string itemList) + +# Remove the auto-completion list from the screen. +fun void AutoCCancel=2101(,) + +# Is there an auto-completion list visible? +fun bool AutoCActive=2102(,) + +# Retrieve the position of the caret when the auto-completion list was displayed. +fun position AutoCPosStart=2103(,) + +# User has selected an item so remove the list and insert the selection. +fun void AutoCComplete=2104(,) + +# Define a set of character that when typed cancel the auto-completion list. +fun void AutoCStops=2105(, string characterSet) + +# Change the separator character in the string setting up an auto-completion list. +# Default is space but can be changed if items contain space. +set void AutoCSetSeparator=2106(int separatorCharacter,) + +# Retrieve the auto-completion list separator character. +get int AutoCGetSeparator=2107(,) + +# Select the item in the auto-completion list that starts with a string. +fun void AutoCSelect=2108(, string text) + +# Should the auto-completion list be cancelled if the user backspaces to a +# position before where the box was created. +set void AutoCSetCancelAtStart=2110(bool cancel,) + +# Retrieve whether auto-completion cancelled by backspacing before start. +get bool AutoCGetCancelAtStart=2111(,) + +# Define a set of characters that when typed will cause the autocompletion to +# choose the selected item. +set void AutoCSetFillUps=2112(, string characterSet) + +# Should a single item auto-completion list automatically choose the item. +set void AutoCSetChooseSingle=2113(bool chooseSingle,) + +# Retrieve whether a single item auto-completion list automatically choose the item. +get bool AutoCGetChooseSingle=2114(,) + +# Set whether case is significant when performing auto-completion searches. +set void AutoCSetIgnoreCase=2115(bool ignoreCase,) + +# Retrieve state of ignore case flag. +get bool AutoCGetIgnoreCase=2116(,) + +# Display a list of strings and send notification when user chooses one. +fun void UserListShow=2117(int listType, string itemList) + +# Set whether or not autocompletion is hidden automatically when nothing matches. +set void AutoCSetAutoHide=2118(bool autoHide,) + +# Retrieve whether or not autocompletion is hidden automatically when nothing matches. +get bool AutoCGetAutoHide=2119(,) + +# Set whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) + +# Retrieve whether or not autocompletion deletes any word characters +# after the inserted text upon completion. +get bool AutoCGetDropRestOfWord=2271(,) + +# Register an XPM image for use in autocompletion lists. +fun void RegisterImage=2405(int type, string xpmData) + +# Clear all the registered XPM images. +fun void ClearRegisteredImages=2408(,) + +# Retrieve the auto-completion list type-separator character. +get int AutoCGetTypeSeparator=2285(,) + +# Change the type-separator character in the string setting up an auto-completion list. +# Default is '?' but can be changed if items contain '?'. +set void AutoCSetTypeSeparator=2286(int separatorCharacter,) + +# Set the maximum width, in characters, of auto-completion and user lists. +# Set to 0 to autosize to fit longest item, which is the default. +set void AutoCSetMaxWidth=2208(int characterCount,) + +# Get the maximum width, in characters, of auto-completion and user lists. +get int AutoCGetMaxWidth=2209(,) + +# Set the maximum height, in rows, of auto-completion and user lists. +# The default is 5 rows. +set void AutoCSetMaxHeight=2210(int rowCount,) + +# Set the maximum height, in rows, of auto-completion and user lists. +get int AutoCGetMaxHeight=2211(,) + +# Set the number of spaces used for one level of indentation. +set void SetIndent=2122(int indentSize,) + +# Retrieve indentation size. +get int GetIndent=2123(,) + +# Indentation will only use space characters if useTabs is false, otherwise +# it will use a combination of tabs and spaces. +set void SetUseTabs=2124(bool useTabs,) + +# Retrieve whether tabs will be used in indentation. +get bool GetUseTabs=2125(,) + +# Change the indentation of a line to a number of columns. +set void SetLineIndentation=2126(int line, int indentSize) + +# Retrieve the number of columns that a line is indented. +get int GetLineIndentation=2127(int line,) + +# Retrieve the position before the first non indentation character on a line. +get position GetLineIndentPosition=2128(int line,) + +# Retrieve the column number of a position, taking tab width into account. +get int GetColumn=2129(position pos,) + +# Show or hide the horizontal scroll bar. +set void SetHScrollBar=2130(bool show,) + +# Is the horizontal scroll bar visible? +get bool GetHScrollBar=2131(,) + +# Show or hide indentation guides. +set void SetIndentationGuides=2132(bool show,) + +# Are the indentation guides visible? +get bool GetIndentationGuides=2133(,) + +# Set the highlighted indentation guide column. +# 0 = no highlighted guide. +set void SetHighlightGuide=2134(int column,) + +# Get the highlighted indentation guide column. +get int GetHighlightGuide=2135(,) + +# Get the position after the last visible characters on a line. +get int GetLineEndPosition=2136(int line,) + +# Get the code page used to interpret the bytes of the document as characters. +get int GetCodePage=2137(,) + +# Get the foreground colour of the caret. +get colour GetCaretFore=2138(,) + +# In palette mode? +get bool GetUsePalette=2139(,) + +# In read-only mode? +get bool GetReadOnly=2140(,) + +# Sets the position of the caret. +set void SetCurrentPos=2141(position pos,) + +# Sets the position that starts the selection - this becomes the anchor. +set void SetSelectionStart=2142(position pos,) + +# Returns the position at the start of the selection. +get position GetSelectionStart=2143(,) + +# Sets the position that ends the selection - this becomes the currentPosition. +set void SetSelectionEnd=2144(position pos,) + +# Returns the position at the end of the selection. +get position GetSelectionEnd=2145(,) + +# Sets the print magnification added to the point size of each style for printing. +set void SetPrintMagnification=2146(int magnification,) + +# Returns the print magnification. +get int GetPrintMagnification=2147(,) + +enu PrintOption=SC_PRINT_ +# PrintColourMode - use same colours as screen. +val SC_PRINT_NORMAL=0 +# PrintColourMode - invert the light value of each style for printing. +val SC_PRINT_INVERTLIGHT=1 +# PrintColourMode - force black text on white background for printing. +val SC_PRINT_BLACKONWHITE=2 +# PrintColourMode - text stays coloured, but all background is forced to be white for printing. +val SC_PRINT_COLOURONWHITE=3 +# PrintColourMode - only the default-background is forced to be white for printing. +val SC_PRINT_COLOURONWHITEDEFAULTBG=4 + +# Modify colours when printing for clearer printed text. +set void SetPrintColourMode=2148(int mode,) + +# Returns the print colour mode. +get int GetPrintColourMode=2149(,) + +enu FindOption=SCFIND_ +val SCFIND_WHOLEWORD=2 +val SCFIND_MATCHCASE=4 +val SCFIND_WORDSTART=0x00100000 +val SCFIND_REGEXP=0x00200000 +val SCFIND_POSIX=0x00400000 + +# Find some text in the document. +fun position FindText=2150(int flags, findtext ft) + +# On Windows, will draw the document into a display context such as a printer. +fun position FormatRange=2151(bool draw, formatrange fr) + +# Retrieve the display line at the top of the display. +get int GetFirstVisibleLine=2152(,) + +# Retrieve the contents of a line. +# Returns the length of the line. +fun int GetLine=2153(int line, stringresult text) + +# Returns the number of lines in the document. There is always at least one. +get int GetLineCount=2154(,) + +# Sets the size in pixels of the left margin. +set void SetMarginLeft=2155(, int pixelWidth) + +# Returns the size in pixels of the left margin. +get int GetMarginLeft=2156(,) + +# Sets the size in pixels of the right margin. +set void SetMarginRight=2157(, int pixelWidth) + +# Returns the size in pixels of the right margin. +get int GetMarginRight=2158(,) + +# Is the document different from when it was last saved? +get bool GetModify=2159(,) + +# Select a range of text. +fun void SetSel=2160(position start, position end) + +# Retrieve the selected text. +# Return the length of the text. +fun int GetSelText=2161(, stringresult text) + +# Retrieve a range of text. +# Return the length of the text. +fun int GetTextRange=2162(, textrange tr) + +# Draw the selection in normal style or with selection highlighted. +fun void HideSelection=2163(bool normal,) + +# Retrieve the x value of the point in the window where a position is displayed. +fun int PointXFromPosition=2164(, position pos) + +# Retrieve the y value of the point in the window where a position is displayed. +fun int PointYFromPosition=2165(, position pos) + +# Retrieve the line containing a position. +fun int LineFromPosition=2166(position pos,) + +# Retrieve the position at the start of a line. +fun position PositionFromLine=2167(int line,) + +# Scroll horizontally and vertically. +fun void LineScroll=2168(int columns, int lines) + +# Ensure the caret is visible. +fun void ScrollCaret=2169(,) + +# Replace the selected text with the argument text. +fun void ReplaceSel=2170(, string text) + +# Set to read only or read write. +set void SetReadOnly=2171(bool readOnly,) + +# Null operation. +fun void Null=2172(,) + +# Will a paste succeed? +fun bool CanPaste=2173(,) + +# Are there any undoable actions in the undo history? +fun bool CanUndo=2174(,) + +# Delete the undo history. +fun void EmptyUndoBuffer=2175(,) + +# Undo one action in the undo history. +fun void Undo=2176(,) + +# Cut the selection to the clipboard. +fun void Cut=2177(,) + +# Copy the selection to the clipboard. +fun void Copy=2178(,) + +# Paste the contents of the clipboard into the document replacing the selection. +fun void Paste=2179(,) + +# Clear the selection. +fun void Clear=2180(,) + +# Replace the contents of the document with the argument text. +fun void SetText=2181(, string text) + +# Retrieve all the text in the document. +# Returns number of characters retrieved. +fun int GetText=2182(int length, stringresult text) + +# Retrieve the number of characters in the document. +get int GetTextLength=2183(,) + +# Retrieve a pointer to a function that processes messages for this Scintilla. +get int GetDirectFunction=2184(,) + +# Retrieve a pointer value to use as the first argument when calling +# the function returned by GetDirectFunction. +get int GetDirectPointer=2185(,) + +# Set to overtype (true) or insert mode. +set void SetOvertype=2186(bool overtype,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) + +# Set the width of the insert mode caret. +set void SetCaretWidth=2188(int pixelWidth,) + +# Returns the width of the insert mode caret. +get int GetCaretWidth=2189(,) + +# Sets the position that starts the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetStart=2190(position pos,) + +# Get the position that starts the target. +get position GetTargetStart=2191(,) + +# Sets the position that ends the target which is used for updating the +# document without affecting the scroll position. +set void SetTargetEnd=2192(position pos,) + +# Get the position that ends the target. +get position GetTargetEnd=2193(,) + +# Replace the target text with the argument text. +# Text is counted so it can contain NULs. +# Returns the length of the replacement text. +fun int ReplaceTarget=2194(int length, string text) + +# Replace the target text with the argument text after \d processing. +# Text is counted so it can contain NULs. +# Looks for \d where d is between 1 and 9 and replaces these with the strings +# matched in the last search operation which were surrounded by \( and \). +# Returns the length of the replacement text including any change +# caused by processing the \d patterns. +fun int ReplaceTargetRE=2195(int length, string text) + +# Search for a counted string in the target and set the target to the found +# range. Text is counted so it can contain NULs. +# Returns length of range or -1 for failure in which case target is not moved. +fun int SearchInTarget=2197(int length, string text) + +# Set the search flags used by SearchInTarget. +set void SetSearchFlags=2198(int flags,) + +# Get the search flags used by SearchInTarget. +get int GetSearchFlags=2199(,) + +# Show a call tip containing a definition near position pos. +fun void CallTipShow=2200(position pos, string definition) + +# Remove the call tip from the screen. +fun void CallTipCancel=2201(,) + +# Is there an active call tip? +fun bool CallTipActive=2202(,) + +# Retrieve the position where the caret was before displaying the call tip. +fun position CallTipPosStart=2203(,) + +# Highlight a segment of the definition. +fun void CallTipSetHlt=2204(int start, int end) + +# Set the background colour for the call tip. +set void CallTipSetBack=2205(colour back,) + +# Set the foreground colour for the call tip. +set void CallTipSetFore=2206(colour fore,) + +# Set the foreground colour for the highlighted part of the call tip. +set void CallTipSetForeHlt=2207(colour fore,) + +# Enable use of STYLE_CALLTIP and set call tip tab size in pixels. +set void CallTipUseStyle=2212(int tabSize,) + +# Find the display line of a document line taking hidden lines into account. +fun int VisibleFromDocLine=2220(int line,) + +# Find the document line of a display line taking hidden lines into account. +fun int DocLineFromVisible=2221(int lineDisplay,) + +# The number of display lines needed to wrap a document line +fun int WrapCount=2235(int line,) + +enu FoldLevel=SC_FOLDLEVEL +val SC_FOLDLEVELBASE=0x400 +val SC_FOLDLEVELWHITEFLAG=0x1000 +val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELBOXHEADERFLAG=0x4000 +val SC_FOLDLEVELBOXFOOTERFLAG=0x8000 +val SC_FOLDLEVELCONTRACTED=0x10000 +val SC_FOLDLEVELUNINDENT=0x20000 +val SC_FOLDLEVELNUMBERMASK=0x0FFF + +# Set the fold level of a line. +# This encodes an integer level along with flags indicating whether the +# line is a header and whether it is effectively white space. +set void SetFoldLevel=2222(int line, int level) + +# Retrieve the fold level of a line. +get int GetFoldLevel=2223(int line,) + +# Find the last child line of a header line. +get int GetLastChild=2224(int line, int level) + +# Find the parent line of a child line. +get int GetFoldParent=2225(int line,) + +# Make a range of lines visible. +fun void ShowLines=2226(int lineStart, int lineEnd) + +# Make a range of lines invisible. +fun void HideLines=2227(int lineStart, int lineEnd) + +# Is a line visible? +get bool GetLineVisible=2228(int line,) + +# Show the children of a header line. +set void SetFoldExpanded=2229(int line, bool expanded) + +# Is a header line expanded? +get bool GetFoldExpanded=2230(int line,) + +# Switch a header line between expanded and contracted. +fun void ToggleFold=2231(int line,) + +# Ensure a particular line is visible by expanding any header line hiding it. +fun void EnsureVisible=2232(int line,) + +enu FoldFlag=SC_FOLDFLAG_ +val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 +val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 +val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 +val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 +val SC_FOLDFLAG_LEVELNUMBERS=0x0040 +val SC_FOLDFLAG_BOX=0x0001 + +# Set some style options for folding. +fun void SetFoldFlags=2233(int flags,) + +# Ensure a particular line is visible by expanding any header line hiding it. +# Use the currently set visibility policy to determine which range to display. +fun void EnsureVisibleEnforcePolicy=2234(int line,) + +# Sets whether a tab pressed when caret is within indentation indents. +set void SetTabIndents=2260(bool tabIndents,) + +# Does a tab pressed when caret is within indentation indent? +get bool GetTabIndents=2261(,) + +# Sets whether a backspace pressed when caret is within indentation unindents. +set void SetBackSpaceUnIndents=2262(bool bsUnIndents,) + +# Does a backspace pressed when caret is within indentation unindent? +get bool GetBackSpaceUnIndents=2263(,) + +val SC_TIME_FOREVER=10000000 + +# Sets the time the mouse must sit still to generate a mouse dwell event. +set void SetMouseDwellTime=2264(int periodMilliseconds,) + +# Retrieve the time the mouse must sit still to generate a mouse dwell event. +get int GetMouseDwellTime=2265(,) + +# Get position of start of word. +fun int WordStartPosition=2266(position pos, bool onlyWordCharacters) + +# Get position of end of word. +fun int WordEndPosition=2267(position pos, bool onlyWordCharacters) + +enu Wrap=SC_WRAP_ +val SC_WRAP_NONE=0 +val SC_WRAP_WORD=1 +val SC_WRAP_CHAR=2 + +# Sets whether text is word wrapped. +set void SetWrapMode=2268(int mode,) + +# Retrieve whether text is word wrapped. +get int GetWrapMode=2269(,) + +enu WrapVisualFlag=SC_WRAPVISUALFLAG_ +val SC_WRAPVISUALFLAG_NONE=0x0000 +val SC_WRAPVISUALFLAG_END=0x0001 +val SC_WRAPVISUALFLAG_START=0x0002 + +# Set the display mode of visual flags for wrapped lines. +set void SetWrapVisualFlags=2460(int wrapVisualFlags,) + +# Retrive the display mode of visual flags for wrapped lines. +get int GetWrapVisualFlags=2461(,) + +enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_ +val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000 +val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001 +val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002 + +# Set the location of visual flags for wrapped lines. +set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,) + +# Retrive the location of visual flags for wrapped lines. +get int GetWrapVisualFlagsLocation=2463(,) + +# Set the start indent for wrapped lines. +set void SetWrapStartIndent=2464(int indent,) + +# Retrive the start indent for wrapped lines. +get int GetWrapStartIndent=2465(,) + +enu LineCache=SC_CACHE_ +val SC_CACHE_NONE=0 +val SC_CACHE_CARET=1 +val SC_CACHE_PAGE=2 +val SC_CACHE_DOCUMENT=3 + +# Sets the degree of caching of layout information. +set void SetLayoutCache=2272(int mode,) + +# Retrieve the degree of caching of layout information. +get int GetLayoutCache=2273(,) + +# Sets the document width assumed for scrolling. +set void SetScrollWidth=2274(int pixelWidth,) + +# Retrieve the document width assumed for scrolling. +get int GetScrollWidth=2275(,) + +# Measure the pixel width of some text in a particular style. +# NUL terminated text argument. +# Does not handle tab or control characters. +fun int TextWidth=2276(int style, string text) + +# Sets the scroll range so that maximum scroll position has +# the last line at the bottom of the view (default). +# Setting this to false allows scrolling one page below the last line. +set void SetEndAtLastLine=2277(bool endAtLastLine,) + +# Retrieve whether the maximum scroll position has the last +# line at the bottom of the view. +get bool GetEndAtLastLine=2278(,) + +# Retrieve the height of a particular line of text in pixels. +fun int TextHeight=2279(int line,) + +# Show or hide the vertical scroll bar. +set void SetVScrollBar=2280(bool show,) + +# Is the vertical scroll bar visible? +get bool GetVScrollBar=2281(,) + +# Append a string to the end of the document without changing the selection. +fun void AppendText=2282(int length, string text) + +# Is drawing done in two phases with backgrounds drawn before faoregrounds? +get bool GetTwoPhaseDraw=2283(,) + +# In twoPhaseDraw mode, drawing is performed in two phases, first the background +# and then the foreground. This avoids chopping off characters that overlap the next run. +set void SetTwoPhaseDraw=2284(bool twoPhase,) + +# Make the target range start and end be the same as the selection range start and end. +fun void TargetFromSelection=2287(,) + +# Join the lines in the target. +fun void LinesJoin=2288(,) + +# Split the lines in the target into lines that are less wide than pixelWidth +# where possible. +fun void LinesSplit=2289(int pixelWidth,) + +# Set the colours used as a chequerboard pattern in the fold margin +fun void SetFoldMarginColour=2290(bool useSetting, colour back) +fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore) + +## New messages go here + +## Start of key messages +# Move caret down one line. +fun void LineDown=2300(,) + +# Move caret down one line extending selection to new caret position. +fun void LineDownExtend=2301(,) + +# Move caret up one line. +fun void LineUp=2302(,) + +# Move caret up one line extending selection to new caret position. +fun void LineUpExtend=2303(,) + +# Move caret left one character. +fun void CharLeft=2304(,) + +# Move caret left one character extending selection to new caret position. +fun void CharLeftExtend=2305(,) + +# Move caret right one character. +fun void CharRight=2306(,) + +# Move caret right one character extending selection to new caret position. +fun void CharRightExtend=2307(,) + +# Move caret left one word. +fun void WordLeft=2308(,) + +# Move caret left one word extending selection to new caret position. +fun void WordLeftExtend=2309(,) + +# Move caret right one word. +fun void WordRight=2310(,) + +# Move caret right one word extending selection to new caret position. +fun void WordRightExtend=2311(,) + +# Move caret to first position on line. +fun void Home=2312(,) + +# Move caret to first position on line extending selection to new caret position. +fun void HomeExtend=2313(,) + +# Move caret to last position on line. +fun void LineEnd=2314(,) + +# Move caret to last position on line extending selection to new caret position. +fun void LineEndExtend=2315(,) + +# Move caret to first position in document. +fun void DocumentStart=2316(,) + +# Move caret to first position in document extending selection to new caret position. +fun void DocumentStartExtend=2317(,) + +# Move caret to last position in document. +fun void DocumentEnd=2318(,) + +# Move caret to last position in document extending selection to new caret position. +fun void DocumentEndExtend=2319(,) + +# Move caret one page up. +fun void PageUp=2320(,) + +# Move caret one page up extending selection to new caret position. +fun void PageUpExtend=2321(,) + +# Move caret one page down. +fun void PageDown=2322(,) + +# Move caret one page down extending selection to new caret position. +fun void PageDownExtend=2323(,) + +# Switch from insert to overtype mode or the reverse. +fun void EditToggleOvertype=2324(,) + +# Cancel any modes such as call tip or auto-completion list display. +fun void Cancel=2325(,) + +# Delete the selection or if no selection, the character before the caret. +fun void DeleteBack=2326(,) + +# If selection is empty or all on one line replace the selection with a tab character. +# If more than one line selected, indent the lines. +fun void Tab=2327(,) + +# Dedent the selected lines. +fun void BackTab=2328(,) + +# Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +fun void NewLine=2329(,) + +# Insert a Form Feed character. +fun void FormFeed=2330(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +fun void VCHome=2331(,) + +# Like VCHome but extending selection to new caret position. +fun void VCHomeExtend=2332(,) + +# Magnify the displayed text by increasing the sizes by 1 point. +fun void ZoomIn=2333(,) + +# Make the displayed text smaller by decreasing the sizes by 1 point. +fun void ZoomOut=2334(,) + +# Delete the word to the left of the caret. +fun void DelWordLeft=2335(,) + +# Delete the word to the right of the caret. +fun void DelWordRight=2336(,) + +# Cut the line containing the caret. +fun void LineCut=2337(,) + +# Delete the line containing the caret. +fun void LineDelete=2338(,) + +# Switch the current line with the previous. +fun void LineTranspose=2339(,) + +# Duplicate the current line. +fun void LineDuplicate=2404(,) + +# Transform the selection to lower case. +fun void LowerCase=2340(,) + +# Transform the selection to upper case. +fun void UpperCase=2341(,) + +# Scroll the document down, keeping the caret visible. +fun void LineScrollDown=2342(,) + +# Scroll the document up, keeping the caret visible. +fun void LineScrollUp=2343(,) + +# Delete the selection or if no selection, the character before the caret. +# Will not delete the character before at the start of a line. +fun void DeleteBackNotLine=2344(,) + +# Move caret to first position on display line. +fun void HomeDisplay=2345(,) + +# Move caret to first position on display line extending selection to +# new caret position. +fun void HomeDisplayExtend=2346(,) + +# Move caret to last position on display line. +fun void LineEndDisplay=2347(,) + +# Move caret to last position on display line extending selection to new +# caret position. +fun void LineEndDisplayExtend=2348(,) + +# These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +# except they behave differently when word-wrap is enabled: +# They go first to the start / end of the display line, like (Home|LineEnd)Display +# The difference is that, the cursor is already at the point, it goes on to the start +# or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?. + +fun void HomeWrap=2349(,) +fun void HomeWrapExtend=2450(,) +fun void LineEndWrap=2451(,) +fun void LineEndWrapExtend=2452(,) +fun void VCHomeWrap=2453(,) +fun void VCHomeWrapExtend=2454(,) + +# Copy the line containing the caret. +fun void LineCopy=2455(,) + +# Move the caret inside current view if it's not there already. +fun void MoveCaretInsideView=2401(,) + +# How many characters are on a line, including end of line characters? +fun int LineLength=2350(int line,) + +# Highlight the characters at two positions. +fun void BraceHighlight=2351(position pos1, position pos2) + +# Highlight the character at a position indicating there is no matching brace. +fun void BraceBadLight=2352(position pos,) + +# Find the position of a matching brace or INVALID_POSITION if no match. +fun position BraceMatch=2353(position pos,) + +# Are the end of line characters visible? +get bool GetViewEOL=2355(,) + +# Make the end of line characters visible or invisible. +set void SetViewEOL=2356(bool visible,) + +# Retrieve a pointer to the document object. +get int GetDocPointer=2357(,) + +# Change the document object used. +set void SetDocPointer=2358(, int pointer) + +# Set which document modification events are sent to the container. +set void SetModEventMask=2359(int mask,) + +enu EdgeVisualStyle=EDGE_ +val EDGE_NONE=0 +val EDGE_LINE=1 +val EDGE_BACKGROUND=2 + +# Retrieve the column number which text should be kept within. +get int GetEdgeColumn=2360(,) + +# Set the column number of the edge. +# If text goes past the edge then it is highlighted. +set void SetEdgeColumn=2361(int column,) + +# Retrieve the edge highlight mode. +get int GetEdgeMode=2362(,) + +# The edge may be displayed by a line (EDGE_LINE) or by highlighting text that +# goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). +set void SetEdgeMode=2363(int mode,) + +# Retrieve the colour used in edge indication. +get colour GetEdgeColour=2364(,) + +# Change the colour used in edge indication. +set void SetEdgeColour=2365(colour edgeColour,) + +# Sets the current caret position to be the search anchor. +fun void SearchAnchor=2366(,) + +# Find some text starting at the search anchor. +# Does not ensure the selection is visible. +fun int SearchNext=2367(int flags, string text) + +# Find some text starting at the search anchor and moving backwards. +# Does not ensure the selection is visible. +fun int SearchPrev=2368(int flags, string text) + +# Retrieves the number of lines completely visible. +get int LinesOnScreen=2370(,) + +# Set whether a pop up menu is displayed automatically when the user presses +# the wrong mouse button. +fun void UsePopUp=2371(bool allowPopUp,) + +# Is the selection rectangular? The alternative is the more common stream selection. +get bool SelectionIsRectangle=2372(,) + +# Set the zoom level. This number of points is added to the size of all fonts. +# It may be positive to magnify or negative to reduce. +set void SetZoom=2373(int zoom,) +# Retrieve the zoom level. +get int GetZoom=2374(,) + +# Create a new document object. +# Starts with reference count of 1 and not selected into editor. +fun int CreateDocument=2375(,) +# Extend life of document. +fun void AddRefDocument=2376(, int doc) +# Release a reference to the document, deleting document if it fades to black. +fun void ReleaseDocument=2377(, int doc) + +# Get which document modification events are sent to the container. +get int GetModEventMask=2378(,) + +# Change internal focus flag. +set void SetFocus=2380(bool focus,) +# Get internal focus flag. +get bool GetFocus=2381(,) + +# Change error status - 0 = OK. +set void SetStatus=2382(int statusCode,) +# Get error status. +get int GetStatus=2383(,) + +# Set whether the mouse is captured when its button is pressed. +set void SetMouseDownCaptures=2384(bool captures,) +# Get whether mouse gets captured. +get bool GetMouseDownCaptures=2385(,) + +enu CursorShape=SC_CURSOR +val SC_CURSORNORMAL=-1 +val SC_CURSORWAIT=4 +# Sets the cursor to one of the SC_CURSOR* values. +set void SetCursor=2386(int cursorType,) +# Get cursor type. +get int GetCursor=2387(,) + +# Change the way control characters are displayed: +# If symbol is < 32, keep the drawn way, else, use the given character. +set void SetControlCharSymbol=2388(int symbol,) +# Get the way control characters are displayed. +get int GetControlCharSymbol=2389(,) + +# Move to the previous change in capitalisation. +fun void WordPartLeft=2390(,) +# Move to the previous change in capitalisation extending selection +# to new caret position. +fun void WordPartLeftExtend=2391(,) +# Move to the change next in capitalisation. +fun void WordPartRight=2392(,) +# Move to the next change in capitalisation extending selection +# to new caret position. +fun void WordPartRightExtend=2393(,) + +# Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. +val VISIBLE_SLOP=0x01 +val VISIBLE_STRICT=0x04 +# Set the way the display area is determined when a particular line +# is to be moved to by Find, FindNext, GotoLine, etc. +fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop) + +# Delete back from the current position to the start of the line. +fun void DelLineLeft=2395(,) + +# Delete forwards from the current position to the end of the line. +fun void DelLineRight=2396(,) + +# Get and Set the xOffset (ie, horizonal scroll position). +set void SetXOffset=2397(int newOffset,) +get int GetXOffset=2398(,) + +# Set the last x chosen value to be the caret x position. +fun void ChooseCaretX=2399(,) + +# Set the focus to this Scintilla widget. +fun void GrabFocus=2400(,) + +enu CaretPolicy = CARET_ +# Caret policy, used by SetXCaretPolicy and SetYCaretPolicy. +# If CARET_SLOP is set, we can define a slop value: caretSlop. +# This value defines an unwanted zone (UZ) where the caret is... unwanted. +# This zone is defined as a number of pixels near the vertical margins, +# and as a number of lines near the horizontal margins. +# By keeping the caret away from the edges, it is seen within its context, +# so it is likely that the identifier that the caret is on can be completely seen, +# and that the current line is seen with some of the lines following it which are +# often dependent on that line. +val CARET_SLOP=0x01 +# If CARET_STRICT is set, the policy is enforced... strictly. +# The caret is centred on the display if slop is not set, +# and cannot go in the UZ if slop is set. +val CARET_STRICT=0x04 +# If CARET_JUMPS is set, the display is moved more energetically +# so the caret can move in the same direction longer before the policy is applied again. +val CARET_JUMPS=0x10 +# If CARET_EVEN is not set, instead of having symmetrical UZs, +# the left and bottom UZs are extended up to right and top UZs respectively. +# This way, we favour the displaying of useful information: the begining of lines, +# where most code reside, and the lines after the caret, eg. the body of a function. +val CARET_EVEN=0x08 + +# Set the way the caret is kept visible when going sideway. +# The exclusion zone is given in pixels. +fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) + +# Set the way the line the caret is on is kept visible. +# The exclusion zone is given in lines. +fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) + +# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +set void SetPrintWrapMode=2406(int mode,) + +# Is printing line wrapped? +get int GetPrintWrapMode=2407(,) + +# Set a fore colour for active hotspots. +set void SetHotspotActiveFore=2410(bool useSetting, colour fore) + +# Get the fore colour for active hotspots. +get colour GetHotspotActiveFore=2494(,) + +# Set a back colour for active hotspots. +set void SetHotspotActiveBack=2411(bool useSetting, colour back) + +# Get the back colour for active hotspots. +get colour GetHotspotActiveBack=2495(,) + +# Enable / Disable underlining active hotspots. +set void SetHotspotActiveUnderline=2412(bool underline,) + +# Get whether underlining for active hotspots. +get bool GetHotspotActiveUnderline=2496(,) + +# Limit hotspots to single line so hotspots on two lines don't merge. +set void SetHotspotSingleLine=2421(bool singleLine,) + +# Get the HotspotSingleLine property +get bool GetHotspotSingleLine=2497(,) + +# Move caret between paragraphs (delimited by empty lines). +fun void ParaDown=2413(,) +fun void ParaDownExtend=2414(,) +fun void ParaUp=2415(,) +fun void ParaUpExtend=2416(,) + +# Given a valid document position, return the previous position taking code +# page into account. Returns 0 if passed 0. +fun position PositionBefore=2417(position pos,) + +# Given a valid document position, return the next position taking code +# page into account. Maximum value returned is the last position in the document. +fun position PositionAfter=2418(position pos,) + +# Copy a range of text to the clipboard. Positions are clipped into the document. +fun void CopyRange=2419(position start, position end) + +# Copy argument text to the clipboard. +fun void CopyText=2420(int length, string text) + +enu SelectionMode=SC_SEL_ +val SC_SEL_STREAM=0 +val SC_SEL_RECTANGLE=1 +val SC_SEL_LINES=2 + +# Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE) or +# by lines (SC_SEL_LINES). +set void SetSelectionMode=2422(int mode,) + +# Get the mode of the current selection. +get int GetSelectionMode=2423(,) + +# Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelStartPosition=2424(int line,) + +# Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). +fun position GetLineSelEndPosition=2425(int line,) + +## RectExtended rectangular selection moves +# Move caret down one line, extending rectangular selection to new caret position. +fun void LineDownRectExtend=2426(,) + +# Move caret up one line, extending rectangular selection to new caret position. +fun void LineUpRectExtend=2427(,) + +# Move caret left one character, extending rectangular selection to new caret position. +fun void CharLeftRectExtend=2428(,) + +# Move caret right one character, extending rectangular selection to new caret position. +fun void CharRightRectExtend=2429(,) + +# Move caret to first position on line, extending rectangular selection to new caret position. +fun void HomeRectExtend=2430(,) + +# Move caret to before first visible character on line. +# If already there move to first character on line. +# In either case, extend rectangular selection to new caret position. +fun void VCHomeRectExtend=2431(,) + +# Move caret to last position on line, extending rectangular selection to new caret position. +fun void LineEndRectExtend=2432(,) + +# Move caret one page up, extending rectangular selection to new caret position. +fun void PageUpRectExtend=2433(,) + +# Move caret one page down, extending rectangular selection to new caret position. +fun void PageDownRectExtend=2434(,) + + +# Move caret to top of page, or one page up if already at top of page. +fun void StutteredPageUp=2435(,) + +# Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. +fun void StutteredPageUpExtend=2436(,) + +# Move caret to bottom of page, or one page down if already at bottom of page. +fun void StutteredPageDown=2437(,) + +# Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. +fun void StutteredPageDownExtend=2438(,) + + +# Move caret left one word, position cursor at end of word. +fun void WordLeftEnd=2439(,) + +# Move caret left one word, position cursor at end of word, extending selection to new caret position. +fun void WordLeftEndExtend=2440(,) + +# Move caret right one word, position cursor at end of word. +fun void WordRightEnd=2441(,) + +# Move caret right one word, position cursor at end of word, extending selection to new caret position. +fun void WordRightEndExtend=2442(,) + +# Set the set of characters making up whitespace for when moving or selecting by word. +# Should be called after SetWordChars. +set void SetWhitespaceChars=2443(, string characters) + +# Reset the set of characters for whitespace and word characters to the defaults. +fun void SetCharsDefault=2444(,) + +# Get currently selected item position in the auto-completion list +fun int AutoCGetCurrent=2445(,) + +# Enlarge the document to a particular size of text bytes. +fun void Allocate=2446(int bytes,) + +# Returns the target converted to UTF8. +# Return the length in bytes. +fun int TargetAsUTF8=2447(, stringresult s) + +# Set the length of the utf8 argument for calling EncodedFromUTF8. +# Set to -1 and the string will be measured to the first nul. +fun void SetLengthForEncode=2448(int bytes,) + +# Translates a UTF8 string into the document encoding. +# Return the length of the result in bytes. +# On error return 0. +fun int EncodedFromUTF8=2449(string utf8, stringresult encoded) + +# Find the position of a column on a line taking into account tabs and +# multi-byte characters. If beyond end of line, return line end position. +fun int FindColumn=2456(int line, int column) + +# Can the caret preferred x position only be changed by explicit movement commands? +get bool GetCaretSticky=2457(,) + +# Stop the caret preferred x position changing when the user types. +set void SetCaretSticky=2458(bool useCaretStickyBehaviour,) + +# Switch between sticky and non-sticky: meant to be bound to a key. +fun void ToggleCaretSticky=2459(,) + +# Enable/Disable convert-on-paste for line endings +set void SetPasteConvertEndings=2467(bool convert,) + +# Get convert-on-paste setting +get bool GetPasteConvertEndings=2468(,) + +# Duplicate the selection. If selection empty duplicate the line containing the caret. +fun void SelectionDuplicate=2469(,) + +val SC_ALPHA_TRANSPARENT=0 +val SC_ALPHA_OPAQUE=255 +val SC_ALPHA_NOALPHA=256 + +# Set background alpha of the caret line. +set void SetCaretLineBackAlpha=2470(int alpha,) + +# Get the background alpha of the caret line. +get int GetCaretLineBackAlpha=2471(,) + +enu CaretStyle=CARETSTYLE_ +val CARETSTYLE_INVISIBLE=0 +val CARETSTYLE_LINE=1 +val CARETSTYLE_BLOCK=2 + +# Set the style of the caret to be drawn. +set void SetCaretStyle=2512(int caretStyle,) + +# Returns the current style of the caret. +get int GetCaretStyle=2513(,) + +# Set the indicator used for IndicatorFillRange and IndicatorClearRange +set void SetIndicatorCurrent=2500(int indicator,) + +# Get the current indicator +get int GetIndicatorCurrent=2501(,) + +# Set the value used for IndicatorFillRange +set void SetIndicatorValue=2502(int value,) + +# Get the current indicator vaue +get int GetIndicatorValue=2503(,) + +# Turn a indicator on over a range. +fun void IndicatorFillRange=2504(int position, int fillLength) + +# Turn a indicator off over a range. +fun void IndicatorClearRange=2505(int position, int clearLength) + +# Are any indicators present at position? +fun int IndicatorAllOnFor=2506(int position,) + +# What value does a particular indicator have at at a position? +fun int IndicatorValueAt=2507(int indicator, int position) + +# Where does a particular indicator start? +fun int IndicatorStart=2508(int indicator, int position) + +# Where does a particular indicator end? +fun int IndicatorEnd=2509(int indicator, int position) + +# Set number of entries in position cache +set void SetPositionCache=2514(int size,) + +# How many entries are allocated to the position cache? +get int GetPositionCache=2515(,) + +# Start notifying the container of all key presses and commands. +fun void StartRecord=3001(,) + +# Stop notifying the container of all key presses and commands. +fun void StopRecord=3002(,) + +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + +# Retrieve the lexing language of the document. +get int GetLexer=4002(,) + +# Colourise a segment of the document using the current lexing language. +fun void Colourise=4003(position start, position end) + +# Set up a value that may be used by a lexer for some optional feature. +set void SetProperty=4004(string key, string value) + +# Maximum value of keywordSet parameter of SetKeyWords. +val KEYWORDSET_MAX=8 + +# Set up the key words used by the lexer. +set void SetKeyWords=4005(int keywordSet, string keyWords) + +# Set the lexing language of the document based on string name. +set void SetLexerLanguage=4006(, string language) + +# Load a lexer library (dll / so). +fun void LoadLexerLibrary=4007(, string path) + +# Retrieve a "property" value previously set with SetProperty. +fun int GetProperty=4008(string key, stringresult buf) + +# Retrieve a "property" value previously set with SetProperty, +# with "$()" variable replacement on returned buffer. +fun int GetPropertyExpanded=4009(string key, stringresult buf) + +# Retrieve a "property" value previously set with SetProperty, +# interpreted as an int AFTER any "$()" variable replacement. +get int GetPropertyInt=4010(string key,) + +# Retrieve the number of bits the current lexer needs for styling. +get int GetStyleBitsNeeded=4011(,) + +# Notifications +# Type of modification and the action which caused the modification. +# These are defined as a bit mask to make it easy to specify which notifications are wanted. +# One bit is set from each of SC_MOD_* and SC_PERFORMED_*. +enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST +val SC_MOD_INSERTTEXT=0x1 +val SC_MOD_DELETETEXT=0x2 +val SC_MOD_CHANGESTYLE=0x4 +val SC_MOD_CHANGEFOLD=0x8 +val SC_PERFORMED_USER=0x10 +val SC_PERFORMED_UNDO=0x20 +val SC_PERFORMED_REDO=0x40 +val SC_MULTISTEPUNDOREDO=0x80 +val SC_LASTSTEPINUNDOREDO=0x100 +val SC_MOD_CHANGEMARKER=0x200 +val SC_MOD_BEFOREINSERT=0x400 +val SC_MOD_BEFOREDELETE=0x800 +val SC_MULTILINEUNDOREDO=0x1000 +val SC_STARTACTION=0x2000 +val SC_MOD_CHANGEINDICATOR=0x4000 +val SC_MODEVENTMASKALL=0x6FFF + +# For compatibility, these go through the COMMAND notification rather than NOTIFY +# and should have had exactly the same values as the EN_* constants. +# Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_* +# As clients depend on these constants, this will not be changed. +val SCEN_CHANGE=768 +val SCEN_SETFOCUS=512 +val SCEN_KILLFOCUS=256 + +# Symbolic key codes and modifier flags. +# ASCII and other printable characters below 256. +# Extended keys above 300. + +enu Keys=SCK_ +val SCK_DOWN=300 +val SCK_UP=301 +val SCK_LEFT=302 +val SCK_RIGHT=303 +val SCK_HOME=304 +val SCK_END=305 +val SCK_PRIOR=306 +val SCK_NEXT=307 +val SCK_DELETE=308 +val SCK_INSERT=309 +val SCK_ESCAPE=7 +val SCK_BACK=8 +val SCK_TAB=9 +val SCK_RETURN=13 +val SCK_ADD=310 +val SCK_SUBTRACT=311 +val SCK_DIVIDE=312 +val SCK_WIN=313 +val SCK_RWIN=314 +val SCK_MENU=315 + +enu KeyMod=SCMOD_ +val SCMOD_NORM=0 +val SCMOD_SHIFT=1 +val SCMOD_CTRL=2 +val SCMOD_ALT=4 + +################################################ +# For SciLexer.h +enu Lexer=SCLEX_ +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +val SCLEX_CONF=17 +val SCLEX_PASCAL=18 +val SCLEX_AVE=19 +val SCLEX_ADA=20 +val SCLEX_LISP=21 +val SCLEX_RUBY=22 +val SCLEX_EIFFEL=23 +val SCLEX_EIFFELKW=24 +val SCLEX_TCL=25 +val SCLEX_NNCRONTAB=26 +val SCLEX_BULLANT=27 +val SCLEX_VBSCRIPT=28 +val SCLEX_BAAN=31 +val SCLEX_MATLAB=32 +val SCLEX_SCRIPTOL=33 +val SCLEX_ASM=34 +val SCLEX_CPPNOCASE=35 +val SCLEX_FORTRAN=36 +val SCLEX_F77=37 +val SCLEX_CSS=38 +val SCLEX_POV=39 +val SCLEX_LOUT=40 +val SCLEX_ESCRIPT=41 +val SCLEX_PS=42 +val SCLEX_NSIS=43 +val SCLEX_MMIXAL=44 +val SCLEX_CLW=45 +val SCLEX_CLWNOCASE=46 +val SCLEX_LOT=47 +val SCLEX_YAML=48 +val SCLEX_TEX=49 +val SCLEX_METAPOST=50 +val SCLEX_POWERBASIC=51 +val SCLEX_FORTH=52 +val SCLEX_ERLANG=53 +val SCLEX_OCTAVE=54 +val SCLEX_MSSQL=55 +val SCLEX_VERILOG=56 +val SCLEX_KIX=57 +val SCLEX_GUI4CLI=58 +val SCLEX_SPECMAN=59 +val SCLEX_AU3=60 +val SCLEX_APDL=61 +val SCLEX_BASH=62 +val SCLEX_ASN1=63 +val SCLEX_VHDL=64 +val SCLEX_CAML=65 +val SCLEX_BLITZBASIC=66 +val SCLEX_PUREBASIC=67 +val SCLEX_HASKELL=68 +val SCLEX_PHPSCRIPT=69 +val SCLEX_TADS3=70 +val SCLEX_REBOL=71 +val SCLEX_SMALLTALK=72 +val SCLEX_FLAGSHIP=73 +val SCLEX_CSOUND=74 +val SCLEX_FREEBASIC=75 +val SCLEX_INNOSETUP=76 +val SCLEX_OPAL=77 +val SCLEX_SPICE=78 +val SCLEX_D=79 +val SCLEX_CMAKE=80 +val SCLEX_GAP=81 +val SCLEX_PLM=82 +val SCLEX_PROGRESS=83 + +# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +# value assigned in sequence from SCLEX_AUTOMATIC+1. +val SCLEX_AUTOMATIC=1000 +# Lexical states for SCLEX_PYTHON +lex Python=SCLEX_PYTHON SCE_P_ +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +val SCE_P_WORD2=14 +val SCE_P_DECORATOR=15 +# Lexical states for SCLEX_CPP +lex Cpp=SCLEX_CPP SCE_C_ +lex Pascal=SCLEX_PASCAL SCE_C_ +lex BullAnt=SCLEX_BULLANT SCE_C_ +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +val SCE_C_REGEX=14 +val SCE_C_COMMENTLINEDOC=15 +val SCE_C_WORD2=16 +val SCE_C_COMMENTDOCKEYWORD=17 +val SCE_C_COMMENTDOCKEYWORDERROR=18 +val SCE_C_GLOBALCLASS=19 +# Lexical states for SCLEX_D +lex D=SCLEX_D SCE_D_ +val SCE_D_DEFAULT=0 +val SCE_D_COMMENT=1 +val SCE_D_COMMENTLINE=2 +val SCE_D_COMMENTDOC=3 +val SCE_D_COMMENTNESTED=4 +val SCE_D_NUMBER=5 +val SCE_D_WORD=6 +val SCE_D_WORD2=7 +val SCE_D_WORD3=8 +val SCE_D_TYPEDEF=9 +val SCE_D_STRING=10 +val SCE_D_STRINGEOL=11 +val SCE_D_CHARACTER=12 +val SCE_D_OPERATOR=13 +val SCE_D_IDENTIFIER=14 +val SCE_D_COMMENTLINEDOC=15 +val SCE_D_COMMENTDOCKEYWORD=16 +val SCE_D_COMMENTDOCKEYWORDERROR=17 +# Lexical states for SCLEX_TCL +lex TCL=SCLEX_TCL SCE_TCL_ +val SCE_TCL_DEFAULT=0 +val SCE_TCL_COMMENT=1 +val SCE_TCL_COMMENTLINE=2 +val SCE_TCL_NUMBER=3 +val SCE_TCL_WORD_IN_QUOTE=4 +val SCE_TCL_IN_QUOTE=5 +val SCE_TCL_OPERATOR=6 +val SCE_TCL_IDENTIFIER=7 +val SCE_TCL_SUBSTITUTION=8 +val SCE_TCL_SUB_BRACE=9 +val SCE_TCL_MODIFIER=10 +val SCE_TCL_EXPAND=11 +val SCE_TCL_WORD=12 +val SCE_TCL_WORD2=13 +val SCE_TCL_WORD3=14 +val SCE_TCL_WORD4=15 +val SCE_TCL_WORD5=16 +val SCE_TCL_WORD6=17 +val SCE_TCL_WORD7=18 +val SCE_TCL_WORD8=19 +val SCE_TCL_COMMENT_BOX=20 +val SCE_TCL_BLOCK_COMMENT=21 +# Lexical states for SCLEX_HTML, SCLEX_XML +lex HTML=SCLEX_HTML SCE_H +lex XML=SCLEX_XML SCE_H +lex ASP=SCLEX_ASP SCE_H +lex PHP=SCLEX_PHP SCE_H +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# X-Code +val SCE_H_XCCOMMENT=20 +# SGML +val SCE_H_SGML_DEFAULT=21 +val SCE_H_SGML_COMMAND=22 +val SCE_H_SGML_1ST_PARAM=23 +val SCE_H_SGML_DOUBLESTRING=24 +val SCE_H_SGML_SIMPLESTRING=25 +val SCE_H_SGML_ERROR=26 +val SCE_H_SGML_SPECIAL=27 +val SCE_H_SGML_ENTITY=28 +val SCE_H_SGML_COMMENT=29 +val SCE_H_SGML_1ST_PARAM_COMMENT=30 +val SCE_H_SGML_BLOCK_DEFAULT=31 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +val SCE_HJ_REGEX=52 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +val SCE_HJA_REGEX=67 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# PHP +val SCE_HPHP_COMPLEX_VARIABLE=104 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_HSTRING_VARIABLE=126 +val SCE_HPHP_OPERATOR=127 +# Lexical states for SCLEX_PERL +lex Perl=SCLEX_PERL SCE_PL_ +val SCE_PL_DEFAULT=0 +val SCE_PL_ERROR=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_VARIABLE_INDEXER=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +val SCE_PL_HERE_DELIM=22 +val SCE_PL_HERE_Q=23 +val SCE_PL_HERE_QQ=24 +val SCE_PL_HERE_QX=25 +val SCE_PL_STRING_Q=26 +val SCE_PL_STRING_QQ=27 +val SCE_PL_STRING_QX=28 +val SCE_PL_STRING_QR=29 +val SCE_PL_STRING_QW=30 +val SCE_PL_POD_VERB=31 +# Lexical states for SCLEX_RUBY +lex Ruby=SCLEX_RUBY SCE_RB_ +val SCE_RB_DEFAULT=0 +val SCE_RB_ERROR=1 +val SCE_RB_COMMENTLINE=2 +val SCE_RB_POD=3 +val SCE_RB_NUMBER=4 +val SCE_RB_WORD=5 +val SCE_RB_STRING=6 +val SCE_RB_CHARACTER=7 +val SCE_RB_CLASSNAME=8 +val SCE_RB_DEFNAME=9 +val SCE_RB_OPERATOR=10 +val SCE_RB_IDENTIFIER=11 +val SCE_RB_REGEX=12 +val SCE_RB_GLOBAL=13 +val SCE_RB_SYMBOL=14 +val SCE_RB_MODULE_NAME=15 +val SCE_RB_INSTANCE_VAR=16 +val SCE_RB_CLASS_VAR=17 +val SCE_RB_BACKTICKS=18 +val SCE_RB_DATASECTION=19 +val SCE_RB_HERE_DELIM=20 +val SCE_RB_HERE_Q=21 +val SCE_RB_HERE_QQ=22 +val SCE_RB_HERE_QX=23 +val SCE_RB_STRING_Q=24 +val SCE_RB_STRING_QQ=25 +val SCE_RB_STRING_QX=26 +val SCE_RB_STRING_QR=27 +val SCE_RB_STRING_QW=28 +val SCE_RB_WORD_DEMOTED=29 +val SCE_RB_STDIN=30 +val SCE_RB_STDOUT=31 +val SCE_RB_STDERR=40 +val SCE_RB_UPPER_BOUND=41 +# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC +lex VB=SCLEX_VB SCE_B_ +lex VBScript=SCLEX_VBSCRIPT SCE_B_ +lex PowerBasic=SCLEX_POWERBASIC SCE_B_ +val SCE_B_DEFAULT=0 +val SCE_B_COMMENT=1 +val SCE_B_NUMBER=2 +val SCE_B_KEYWORD=3 +val SCE_B_STRING=4 +val SCE_B_PREPROCESSOR=5 +val SCE_B_OPERATOR=6 +val SCE_B_IDENTIFIER=7 +val SCE_B_DATE=8 +val SCE_B_STRINGEOL=9 +val SCE_B_KEYWORD2=10 +val SCE_B_KEYWORD3=11 +val SCE_B_KEYWORD4=12 +val SCE_B_CONSTANT=13 +val SCE_B_ASM=14 +val SCE_B_LABEL=15 +val SCE_B_ERROR=16 +val SCE_B_HEXNUMBER=17 +val SCE_B_BINNUMBER=18 +# Lexical states for SCLEX_PROPERTIES +lex Properties=SCLEX_PROPERTIES SCE_PROPS_ +val SCE_PROPS_DEFAULT=0 +val SCE_PROPS_COMMENT=1 +val SCE_PROPS_SECTION=2 +val SCE_PROPS_ASSIGNMENT=3 +val SCE_PROPS_DEFVAL=4 +val SCE_PROPS_KEY=5 +# Lexical states for SCLEX_LATEX +lex LaTeX=SCLEX_LATEX SCE_L_ +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +# Lexical states for SCLEX_LUA +lex Lua=SCLEX_LUA SCE_LUA_ +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_LUA_WORD2=13 +val SCE_LUA_WORD3=14 +val SCE_LUA_WORD4=15 +val SCE_LUA_WORD5=16 +val SCE_LUA_WORD6=17 +val SCE_LUA_WORD7=18 +val SCE_LUA_WORD8=19 +# Lexical states for SCLEX_ERRORLIST +lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 +val SCE_ERR_NET=7 +val SCE_ERR_LUA=8 +val SCE_ERR_CTAG=9 +val SCE_ERR_DIFF_CHANGED=10 +val SCE_ERR_DIFF_ADDITION=11 +val SCE_ERR_DIFF_DELETION=12 +val SCE_ERR_DIFF_MESSAGE=13 +val SCE_ERR_PHP=14 +val SCE_ERR_ELF=15 +val SCE_ERR_IFC=16 +val SCE_ERR_IFORT=17 +val SCE_ERR_ABSF=18 +val SCE_ERR_TIDY=19 +val SCE_ERR_JAVA_STACK=20 +# Lexical states for SCLEX_BATCH +lex Batch=SCLEX_BATCH SCE_BAT_ +val SCE_BAT_DEFAULT=0 +val SCE_BAT_COMMENT=1 +val SCE_BAT_WORD=2 +val SCE_BAT_LABEL=3 +val SCE_BAT_HIDE=4 +val SCE_BAT_COMMAND=5 +val SCE_BAT_IDENTIFIER=6 +val SCE_BAT_OPERATOR=7 +# Lexical states for SCLEX_MAKEFILE +lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ +val SCE_MAKE_DEFAULT=0 +val SCE_MAKE_COMMENT=1 +val SCE_MAKE_PREPROCESSOR=2 +val SCE_MAKE_IDENTIFIER=3 +val SCE_MAKE_OPERATOR=4 +val SCE_MAKE_TARGET=5 +val SCE_MAKE_IDEOL=9 +# Lexical states for SCLEX_DIFF +lex Diff=SCLEX_DIFF SCE_DIFF_ +val SCE_DIFF_DEFAULT=0 +val SCE_DIFF_COMMENT=1 +val SCE_DIFF_COMMAND=2 +val SCE_DIFF_HEADER=3 +val SCE_DIFF_POSITION=4 +val SCE_DIFF_DELETED=5 +val SCE_DIFF_ADDED=6 +# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +lex Conf=SCLEX_CONF SCE_CONF_ +val SCE_CONF_DEFAULT=0 +val SCE_CONF_COMMENT=1 +val SCE_CONF_NUMBER=2 +val SCE_CONF_IDENTIFIER=3 +val SCE_CONF_EXTENSION=4 +val SCE_CONF_PARAMETER=5 +val SCE_CONF_STRING=6 +val SCE_CONF_OPERATOR=7 +val SCE_CONF_IP=8 +val SCE_CONF_DIRECTIVE=9 +# Lexical states for SCLEX_AVE, Avenue +lex Avenue=SCLEX_AVE SCE_AVE_ +val SCE_AVE_DEFAULT=0 +val SCE_AVE_COMMENT=1 +val SCE_AVE_NUMBER=2 +val SCE_AVE_WORD=3 +val SCE_AVE_STRING=6 +val SCE_AVE_ENUM=7 +val SCE_AVE_STRINGEOL=8 +val SCE_AVE_IDENTIFIER=9 +val SCE_AVE_OPERATOR=10 +val SCE_AVE_WORD1=11 +val SCE_AVE_WORD2=12 +val SCE_AVE_WORD3=13 +val SCE_AVE_WORD4=14 +val SCE_AVE_WORD5=15 +val SCE_AVE_WORD6=16 +# Lexical states for SCLEX_ADA +lex Ada=SCLEX_ADA SCE_ADA_ +val SCE_ADA_DEFAULT=0 +val SCE_ADA_WORD=1 +val SCE_ADA_IDENTIFIER=2 +val SCE_ADA_NUMBER=3 +val SCE_ADA_DELIMITER=4 +val SCE_ADA_CHARACTER=5 +val SCE_ADA_CHARACTEREOL=6 +val SCE_ADA_STRING=7 +val SCE_ADA_STRINGEOL=8 +val SCE_ADA_LABEL=9 +val SCE_ADA_COMMENTLINE=10 +val SCE_ADA_ILLEGAL=11 +# Lexical states for SCLEX_BAAN +lex Baan=SCLEX_BAAN SCE_BAAN_ +val SCE_BAAN_DEFAULT=0 +val SCE_BAAN_COMMENT=1 +val SCE_BAAN_COMMENTDOC=2 +val SCE_BAAN_NUMBER=3 +val SCE_BAAN_WORD=4 +val SCE_BAAN_STRING=5 +val SCE_BAAN_PREPROCESSOR=6 +val SCE_BAAN_OPERATOR=7 +val SCE_BAAN_IDENTIFIER=8 +val SCE_BAAN_STRINGEOL=9 +val SCE_BAAN_WORD2=10 +# Lexical states for SCLEX_LISP +lex Lisp=SCLEX_LISP SCE_LISP_ +val SCE_LISP_DEFAULT=0 +val SCE_LISP_COMMENT=1 +val SCE_LISP_NUMBER=2 +val SCE_LISP_KEYWORD=3 +val SCE_LISP_KEYWORD_KW=4 +val SCE_LISP_SYMBOL=5 +val SCE_LISP_STRING=6 +val SCE_LISP_STRINGEOL=8 +val SCE_LISP_IDENTIFIER=9 +val SCE_LISP_OPERATOR=10 +val SCE_LISP_SPECIAL=11 +val SCE_LISP_MULTI_COMMENT=12 +# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ +lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ +val SCE_EIFFEL_DEFAULT=0 +val SCE_EIFFEL_COMMENTLINE=1 +val SCE_EIFFEL_NUMBER=2 +val SCE_EIFFEL_WORD=3 +val SCE_EIFFEL_STRING=4 +val SCE_EIFFEL_CHARACTER=5 +val SCE_EIFFEL_OPERATOR=6 +val SCE_EIFFEL_IDENTIFIER=7 +val SCE_EIFFEL_STRINGEOL=8 +# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ +val SCE_NNCRONTAB_DEFAULT=0 +val SCE_NNCRONTAB_COMMENT=1 +val SCE_NNCRONTAB_TASK=2 +val SCE_NNCRONTAB_SECTION=3 +val SCE_NNCRONTAB_KEYWORD=4 +val SCE_NNCRONTAB_MODIFIER=5 +val SCE_NNCRONTAB_ASTERISK=6 +val SCE_NNCRONTAB_NUMBER=7 +val SCE_NNCRONTAB_STRING=8 +val SCE_NNCRONTAB_ENVIRONMENT=9 +val SCE_NNCRONTAB_IDENTIFIER=10 +# Lexical states for SCLEX_FORTH (Forth Lexer) +lex Forth=SCLEX_FORTH SCE_FORTH_ +val SCE_FORTH_DEFAULT=0 +val SCE_FORTH_COMMENT=1 +val SCE_FORTH_COMMENT_ML=2 +val SCE_FORTH_IDENTIFIER=3 +val SCE_FORTH_CONTROL=4 +val SCE_FORTH_KEYWORD=5 +val SCE_FORTH_DEFWORD=6 +val SCE_FORTH_PREWORD1=7 +val SCE_FORTH_PREWORD2=8 +val SCE_FORTH_NUMBER=9 +val SCE_FORTH_STRING=10 +val SCE_FORTH_LOCALE=11 +# Lexical states for SCLEX_MATLAB +lex MatLab=SCLEX_MATLAB SCE_MATLAB_ +val SCE_MATLAB_DEFAULT=0 +val SCE_MATLAB_COMMENT=1 +val SCE_MATLAB_COMMAND=2 +val SCE_MATLAB_NUMBER=3 +val SCE_MATLAB_KEYWORD=4 +# single quoted string +val SCE_MATLAB_STRING=5 +val SCE_MATLAB_OPERATOR=6 +val SCE_MATLAB_IDENTIFIER=7 +val SCE_MATLAB_DOUBLEQUOTESTRING=8 +# Lexical states for SCLEX_SCRIPTOL +lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ +val SCE_SCRIPTOL_DEFAULT=0 +val SCE_SCRIPTOL_WHITE=1 +val SCE_SCRIPTOL_COMMENTLINE=2 +val SCE_SCRIPTOL_PERSISTENT=3 +val SCE_SCRIPTOL_CSTYLE=4 +val SCE_SCRIPTOL_COMMENTBLOCK=5 +val SCE_SCRIPTOL_NUMBER=6 +val SCE_SCRIPTOL_STRING=7 +val SCE_SCRIPTOL_CHARACTER=8 +val SCE_SCRIPTOL_STRINGEOL=9 +val SCE_SCRIPTOL_KEYWORD=10 +val SCE_SCRIPTOL_OPERATOR=11 +val SCE_SCRIPTOL_IDENTIFIER=12 +val SCE_SCRIPTOL_TRIPLE=13 +val SCE_SCRIPTOL_CLASSNAME=14 +val SCE_SCRIPTOL_PREPROCESSOR=15 +# Lexical states for SCLEX_ASM +lex Asm=SCLEX_ASM SCE_ASM_ +val SCE_ASM_DEFAULT=0 +val SCE_ASM_COMMENT=1 +val SCE_ASM_NUMBER=2 +val SCE_ASM_STRING=3 +val SCE_ASM_OPERATOR=4 +val SCE_ASM_IDENTIFIER=5 +val SCE_ASM_CPUINSTRUCTION=6 +val SCE_ASM_MATHINSTRUCTION=7 +val SCE_ASM_REGISTER=8 +val SCE_ASM_DIRECTIVE=9 +val SCE_ASM_DIRECTIVEOPERAND=10 +val SCE_ASM_COMMENTBLOCK=11 +val SCE_ASM_CHARACTER=12 +val SCE_ASM_STRINGEOL=13 +val SCE_ASM_EXTINSTRUCTION=14 +# Lexical states for SCLEX_FORTRAN +lex Fortran=SCLEX_FORTRAN SCE_F_ +lex F77=SCLEX_F77 SCE_F_ +val SCE_F_DEFAULT=0 +val SCE_F_COMMENT=1 +val SCE_F_NUMBER=2 +val SCE_F_STRING1=3 +val SCE_F_STRING2=4 +val SCE_F_STRINGEOL=5 +val SCE_F_OPERATOR=6 +val SCE_F_IDENTIFIER=7 +val SCE_F_WORD=8 +val SCE_F_WORD2=9 +val SCE_F_WORD3=10 +val SCE_F_PREPROCESSOR=11 +val SCE_F_OPERATOR2=12 +val SCE_F_LABEL=13 +val SCE_F_CONTINUATION=14 +# Lexical states for SCLEX_CSS +lex CSS=SCLEX_CSS SCE_CSS_ +val SCE_CSS_DEFAULT=0 +val SCE_CSS_TAG=1 +val SCE_CSS_CLASS=2 +val SCE_CSS_PSEUDOCLASS=3 +val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 +val SCE_CSS_OPERATOR=5 +val SCE_CSS_IDENTIFIER=6 +val SCE_CSS_UNKNOWN_IDENTIFIER=7 +val SCE_CSS_VALUE=8 +val SCE_CSS_COMMENT=9 +val SCE_CSS_ID=10 +val SCE_CSS_IMPORTANT=11 +val SCE_CSS_DIRECTIVE=12 +val SCE_CSS_DOUBLESTRING=13 +val SCE_CSS_SINGLESTRING=14 +val SCE_CSS_IDENTIFIER2=15 +val SCE_CSS_ATTRIBUTE=16 +# Lexical states for SCLEX_POV +lex POV=SCLEX_POV SCE_POV_ +val SCE_POV_DEFAULT=0 +val SCE_POV_COMMENT=1 +val SCE_POV_COMMENTLINE=2 +val SCE_POV_NUMBER=3 +val SCE_POV_OPERATOR=4 +val SCE_POV_IDENTIFIER=5 +val SCE_POV_STRING=6 +val SCE_POV_STRINGEOL=7 +val SCE_POV_DIRECTIVE=8 +val SCE_POV_BADDIRECTIVE=9 +val SCE_POV_WORD2=10 +val SCE_POV_WORD3=11 +val SCE_POV_WORD4=12 +val SCE_POV_WORD5=13 +val SCE_POV_WORD6=14 +val SCE_POV_WORD7=15 +val SCE_POV_WORD8=16 +# Lexical states for SCLEX_LOUT +lex LOUT=SCLEX_LOUT SCE_LOUT_ +val SCE_LOUT_DEFAULT=0 +val SCE_LOUT_COMMENT=1 +val SCE_LOUT_NUMBER=2 +val SCE_LOUT_WORD=3 +val SCE_LOUT_WORD2=4 +val SCE_LOUT_WORD3=5 +val SCE_LOUT_WORD4=6 +val SCE_LOUT_STRING=7 +val SCE_LOUT_OPERATOR=8 +val SCE_LOUT_IDENTIFIER=9 +val SCE_LOUT_STRINGEOL=10 +# Lexical states for SCLEX_ESCRIPT +lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ +val SCE_ESCRIPT_DEFAULT=0 +val SCE_ESCRIPT_COMMENT=1 +val SCE_ESCRIPT_COMMENTLINE=2 +val SCE_ESCRIPT_COMMENTDOC=3 +val SCE_ESCRIPT_NUMBER=4 +val SCE_ESCRIPT_WORD=5 +val SCE_ESCRIPT_STRING=6 +val SCE_ESCRIPT_OPERATOR=7 +val SCE_ESCRIPT_IDENTIFIER=8 +val SCE_ESCRIPT_BRACE=9 +val SCE_ESCRIPT_WORD2=10 +val SCE_ESCRIPT_WORD3=11 +# Lexical states for SCLEX_PS +lex PS=SCLEX_PS SCE_PS_ +val SCE_PS_DEFAULT=0 +val SCE_PS_COMMENT=1 +val SCE_PS_DSC_COMMENT=2 +val SCE_PS_DSC_VALUE=3 +val SCE_PS_NUMBER=4 +val SCE_PS_NAME=5 +val SCE_PS_KEYWORD=6 +val SCE_PS_LITERAL=7 +val SCE_PS_IMMEVAL=8 +val SCE_PS_PAREN_ARRAY=9 +val SCE_PS_PAREN_DICT=10 +val SCE_PS_PAREN_PROC=11 +val SCE_PS_TEXT=12 +val SCE_PS_HEXSTRING=13 +val SCE_PS_BASE85STRING=14 +val SCE_PS_BADSTRINGCHAR=15 +# Lexical states for SCLEX_NSIS +lex NSIS=SCLEX_NSIS SCE_NSIS_ +val SCE_NSIS_DEFAULT=0 +val SCE_NSIS_COMMENT=1 +val SCE_NSIS_STRINGDQ=2 +val SCE_NSIS_STRINGLQ=3 +val SCE_NSIS_STRINGRQ=4 +val SCE_NSIS_FUNCTION=5 +val SCE_NSIS_VARIABLE=6 +val SCE_NSIS_LABEL=7 +val SCE_NSIS_USERDEFINED=8 +val SCE_NSIS_SECTIONDEF=9 +val SCE_NSIS_SUBSECTIONDEF=10 +val SCE_NSIS_IFDEFINEDEF=11 +val SCE_NSIS_MACRODEF=12 +val SCE_NSIS_STRINGVAR=13 +val SCE_NSIS_NUMBER=14 +val SCE_NSIS_SECTIONGROUP=15 +val SCE_NSIS_PAGEEX=16 +val SCE_NSIS_FUNCTIONDEF=17 +val SCE_NSIS_COMMENTBOX=18 +# Lexical states for SCLEX_MMIXAL +lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ +val SCE_MMIXAL_LEADWS=0 +val SCE_MMIXAL_COMMENT=1 +val SCE_MMIXAL_LABEL=2 +val SCE_MMIXAL_OPCODE=3 +val SCE_MMIXAL_OPCODE_PRE=4 +val SCE_MMIXAL_OPCODE_VALID=5 +val SCE_MMIXAL_OPCODE_UNKNOWN=6 +val SCE_MMIXAL_OPCODE_POST=7 +val SCE_MMIXAL_OPERANDS=8 +val SCE_MMIXAL_NUMBER=9 +val SCE_MMIXAL_REF=10 +val SCE_MMIXAL_CHAR=11 +val SCE_MMIXAL_STRING=12 +val SCE_MMIXAL_REGISTER=13 +val SCE_MMIXAL_HEX=14 +val SCE_MMIXAL_OPERATOR=15 +val SCE_MMIXAL_SYMBOL=16 +val SCE_MMIXAL_INCLUDE=17 +# Lexical states for SCLEX_CLW +lex Clarion=SCLEX_CLW SCE_CLW_ +val SCE_CLW_DEFAULT=0 +val SCE_CLW_LABEL=1 +val SCE_CLW_COMMENT=2 +val SCE_CLW_STRING=3 +val SCE_CLW_USER_IDENTIFIER=4 +val SCE_CLW_INTEGER_CONSTANT=5 +val SCE_CLW_REAL_CONSTANT=6 +val SCE_CLW_PICTURE_STRING=7 +val SCE_CLW_KEYWORD=8 +val SCE_CLW_COMPILER_DIRECTIVE=9 +val SCE_CLW_RUNTIME_EXPRESSIONS=10 +val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 +val SCE_CLW_STRUCTURE_DATA_TYPE=12 +val SCE_CLW_ATTRIBUTE=13 +val SCE_CLW_STANDARD_EQUATE=14 +val SCE_CLW_ERROR=15 +val SCE_CLW_DEPRECATED=16 +# Lexical states for SCLEX_LOT +lex LOT=SCLEX_LOT SCE_LOT_ +val SCE_LOT_DEFAULT=0 +val SCE_LOT_HEADER=1 +val SCE_LOT_BREAK=2 +val SCE_LOT_SET=3 +val SCE_LOT_PASS=4 +val SCE_LOT_FAIL=5 +val SCE_LOT_ABORT=6 +# Lexical states for SCLEX_YAML +lex YAML=SCLEX_YAML SCE_YAML_ +val SCE_YAML_DEFAULT=0 +val SCE_YAML_COMMENT=1 +val SCE_YAML_IDENTIFIER=2 +val SCE_YAML_KEYWORD=3 +val SCE_YAML_NUMBER=4 +val SCE_YAML_REFERENCE=5 +val SCE_YAML_DOCUMENT=6 +val SCE_YAML_TEXT=7 +val SCE_YAML_ERROR=8 +# Lexical states for SCLEX_TEX +lex TeX=SCLEX_TEX SCE_TEX_ +val SCE_TEX_DEFAULT=0 +val SCE_TEX_SPECIAL=1 +val SCE_TEX_GROUP=2 +val SCE_TEX_SYMBOL=3 +val SCE_TEX_COMMAND=4 +val SCE_TEX_TEXT=5 +lex Metapost=SCLEX_METAPOST SCE_METAPOST_ +val SCE_METAPOST_DEFAULT=0 +val SCE_METAPOST_SPECIAL=1 +val SCE_METAPOST_GROUP=2 +val SCE_METAPOST_SYMBOL=3 +val SCE_METAPOST_COMMAND=4 +val SCE_METAPOST_TEXT=5 +val SCE_METAPOST_EXTRA=6 +# Lexical states for SCLEX_ERLANG +lex Erlang=SCLEX_ERLANG SCE_ERLANG_ +val SCE_ERLANG_DEFAULT=0 +val SCE_ERLANG_COMMENT=1 +val SCE_ERLANG_VARIABLE=2 +val SCE_ERLANG_NUMBER=3 +val SCE_ERLANG_KEYWORD=4 +val SCE_ERLANG_STRING=5 +val SCE_ERLANG_OPERATOR=6 +val SCE_ERLANG_ATOM=7 +val SCE_ERLANG_FUNCTION_NAME=8 +val SCE_ERLANG_CHARACTER=9 +val SCE_ERLANG_MACRO=10 +val SCE_ERLANG_RECORD=11 +val SCE_ERLANG_SEPARATOR=12 +val SCE_ERLANG_NODE_NAME=13 +val SCE_ERLANG_UNKNOWN=31 +# Lexical states for SCLEX_OCTAVE are identical to MatLab +lex Octave=SCLEX_OCTAVE SCE_MATLAB_ +# Lexical states for SCLEX_MSSQL +lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ +val SCE_MSSQL_DEFAULT=0 +val SCE_MSSQL_COMMENT=1 +val SCE_MSSQL_LINE_COMMENT=2 +val SCE_MSSQL_NUMBER=3 +val SCE_MSSQL_STRING=4 +val SCE_MSSQL_OPERATOR=5 +val SCE_MSSQL_IDENTIFIER=6 +val SCE_MSSQL_VARIABLE=7 +val SCE_MSSQL_COLUMN_NAME=8 +val SCE_MSSQL_STATEMENT=9 +val SCE_MSSQL_DATATYPE=10 +val SCE_MSSQL_SYSTABLE=11 +val SCE_MSSQL_GLOBAL_VARIABLE=12 +val SCE_MSSQL_FUNCTION=13 +val SCE_MSSQL_STORED_PROCEDURE=14 +val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 +val SCE_MSSQL_COLUMN_NAME_2=16 +# Lexical states for SCLEX_VERILOG +lex Verilog=SCLEX_VERILOG SCE_V_ +val SCE_V_DEFAULT=0 +val SCE_V_COMMENT=1 +val SCE_V_COMMENTLINE=2 +val SCE_V_COMMENTLINEBANG=3 +val SCE_V_NUMBER=4 +val SCE_V_WORD=5 +val SCE_V_STRING=6 +val SCE_V_WORD2=7 +val SCE_V_WORD3=8 +val SCE_V_PREPROCESSOR=9 +val SCE_V_OPERATOR=10 +val SCE_V_IDENTIFIER=11 +val SCE_V_STRINGEOL=12 +val SCE_V_USER=19 +# Lexical states for SCLEX_KIX +lex Kix=SCLEX_KIX SCE_KIX_ +val SCE_KIX_DEFAULT=0 +val SCE_KIX_COMMENT=1 +val SCE_KIX_STRING1=2 +val SCE_KIX_STRING2=3 +val SCE_KIX_NUMBER=4 +val SCE_KIX_VAR=5 +val SCE_KIX_MACRO=6 +val SCE_KIX_KEYWORD=7 +val SCE_KIX_FUNCTIONS=8 +val SCE_KIX_OPERATOR=9 +val SCE_KIX_IDENTIFIER=31 +# Lexical states for SCLEX_GUI4CLI +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +# Lexical states for SCLEX_SPECMAN +lex Specman=SCLEX_SPECMAN SCE_SN_ +val SCE_SN_DEFAULT=0 +val SCE_SN_CODE=1 +val SCE_SN_COMMENTLINE=2 +val SCE_SN_COMMENTLINEBANG=3 +val SCE_SN_NUMBER=4 +val SCE_SN_WORD=5 +val SCE_SN_STRING=6 +val SCE_SN_WORD2=7 +val SCE_SN_WORD3=8 +val SCE_SN_PREPROCESSOR=9 +val SCE_SN_OPERATOR=10 +val SCE_SN_IDENTIFIER=11 +val SCE_SN_STRINGEOL=12 +val SCE_SN_REGEXTAG=13 +val SCE_SN_SIGNAL=14 +val SCE_SN_USER=19 +# Lexical states for SCLEX_AU3 +lex Au3=SCLEX_AU3 SCE_AU3_ +val SCE_AU3_DEFAULT=0 +val SCE_AU3_COMMENT=1 +val SCE_AU3_COMMENTBLOCK=2 +val SCE_AU3_NUMBER=3 +val SCE_AU3_FUNCTION=4 +val SCE_AU3_KEYWORD=5 +val SCE_AU3_MACRO=6 +val SCE_AU3_STRING=7 +val SCE_AU3_OPERATOR=8 +val SCE_AU3_VARIABLE=9 +val SCE_AU3_SENT=10 +val SCE_AU3_PREPROCESSOR=11 +val SCE_AU3_SPECIAL=12 +val SCE_AU3_EXPAND=13 +val SCE_AU3_COMOBJ=14 +val SCE_AU3_UDF=15 +# Lexical states for SCLEX_APDL +lex APDL=SCLEX_APDL SCE_APDL_ +val SCE_APDL_DEFAULT=0 +val SCE_APDL_COMMENT=1 +val SCE_APDL_COMMENTBLOCK=2 +val SCE_APDL_NUMBER=3 +val SCE_APDL_STRING=4 +val SCE_APDL_OPERATOR=5 +val SCE_APDL_WORD=6 +val SCE_APDL_PROCESSOR=7 +val SCE_APDL_COMMAND=8 +val SCE_APDL_SLASHCOMMAND=9 +val SCE_APDL_STARCOMMAND=10 +val SCE_APDL_ARGUMENT=11 +val SCE_APDL_FUNCTION=12 +# Lexical states for SCLEX_BASH +lex Bash=SCLEX_BASH SCE_SH_ +val SCE_SH_DEFAULT=0 +val SCE_SH_ERROR=1 +val SCE_SH_COMMENTLINE=2 +val SCE_SH_NUMBER=3 +val SCE_SH_WORD=4 +val SCE_SH_STRING=5 +val SCE_SH_CHARACTER=6 +val SCE_SH_OPERATOR=7 +val SCE_SH_IDENTIFIER=8 +val SCE_SH_SCALAR=9 +val SCE_SH_PARAM=10 +val SCE_SH_BACKTICKS=11 +val SCE_SH_HERE_DELIM=12 +val SCE_SH_HERE_Q=13 +# Lexical states for SCLEX_ASN1 +lex Asn1=SCLEX_ASN1 SCE_ASN1_ +val SCE_ASN1_DEFAULT=0 +val SCE_ASN1_COMMENT=1 +val SCE_ASN1_IDENTIFIER=2 +val SCE_ASN1_STRING=3 +val SCE_ASN1_OID=4 +val SCE_ASN1_SCALAR=5 +val SCE_ASN1_KEYWORD=6 +val SCE_ASN1_ATTRIBUTE=7 +val SCE_ASN1_DESCRIPTOR=8 +val SCE_ASN1_TYPE=9 +val SCE_ASN1_OPERATOR=10 +# Lexical states for SCLEX_VHDL +lex VHDL=SCLEX_VHDL SCE_VHDL_ +val SCE_VHDL_DEFAULT=0 +val SCE_VHDL_COMMENT=1 +val SCE_VHDL_COMMENTLINEBANG=2 +val SCE_VHDL_NUMBER=3 +val SCE_VHDL_STRING=4 +val SCE_VHDL_OPERATOR=5 +val SCE_VHDL_IDENTIFIER=6 +val SCE_VHDL_STRINGEOL=7 +val SCE_VHDL_KEYWORD=8 +val SCE_VHDL_STDOPERATOR=9 +val SCE_VHDL_ATTRIBUTE=10 +val SCE_VHDL_STDFUNCTION=11 +val SCE_VHDL_STDPACKAGE=12 +val SCE_VHDL_STDTYPE=13 +val SCE_VHDL_USERWORD=14 +# Lexical states for SCLEX_CAML +lex Caml=SCLEX_CAML SCE_CAML_ +val SCE_CAML_DEFAULT=0 +val SCE_CAML_IDENTIFIER=1 +val SCE_CAML_TAGNAME=2 +val SCE_CAML_KEYWORD=3 +val SCE_CAML_KEYWORD2=4 +val SCE_CAML_KEYWORD3=5 +val SCE_CAML_LINENUM=6 +val SCE_CAML_OPERATOR=7 +val SCE_CAML_NUMBER=8 +val SCE_CAML_CHAR=9 +val SCE_CAML_STRING=11 +val SCE_CAML_COMMENT=12 +val SCE_CAML_COMMENT1=13 +val SCE_CAML_COMMENT2=14 +val SCE_CAML_COMMENT3=15 +# Lexical states for SCLEX_HASKELL +lex Haskell=SCLEX_HASKELL SCE_HA_ +val SCE_HA_DEFAULT=0 +val SCE_HA_IDENTIFIER=1 +val SCE_HA_KEYWORD=2 +val SCE_HA_NUMBER=3 +val SCE_HA_STRING=4 +val SCE_HA_CHARACTER=5 +val SCE_HA_CLASS=6 +val SCE_HA_MODULE=7 +val SCE_HA_CAPITAL=8 +val SCE_HA_DATA=9 +val SCE_HA_IMPORT=10 +val SCE_HA_OPERATOR=11 +val SCE_HA_INSTANCE=12 +val SCE_HA_COMMENTLINE=13 +val SCE_HA_COMMENTBLOCK=14 +val SCE_HA_COMMENTBLOCK2=15 +val SCE_HA_COMMENTBLOCK3=16 +# Lexical states of SCLEX_TADS3 +lex TADS3=SCLEX_TADS3 SCE_T3_ +val SCE_T3_DEFAULT=0 +val SCE_T3_X_DEFAULT=1 +val SCE_T3_PREPROCESSOR=2 +val SCE_T3_BLOCK_COMMENT=3 +val SCE_T3_LINE_COMMENT=4 +val SCE_T3_OPERATOR=5 +val SCE_T3_KEYWORD=6 +val SCE_T3_NUMBER=7 +val SCE_T3_IDENTIFIER=8 +val SCE_T3_S_STRING=9 +val SCE_T3_D_STRING=10 +val SCE_T3_X_STRING=11 +val SCE_T3_LIB_DIRECTIVE=12 +val SCE_T3_MSG_PARAM=13 +val SCE_T3_HTML_TAG=14 +val SCE_T3_HTML_DEFAULT=15 +val SCE_T3_HTML_STRING=16 +val SCE_T3_USER1=17 +val SCE_T3_USER2=18 +val SCE_T3_USER3=19 +val SCE_T3_BRACE=20 +# Lexical states for SCLEX_REBOL +lex Rebol=SCLEX_REBOL SCE_REBOL_ +val SCE_REBOL_DEFAULT=0 +val SCE_REBOL_COMMENTLINE=1 +val SCE_REBOL_COMMENTBLOCK=2 +val SCE_REBOL_PREFACE=3 +val SCE_REBOL_OPERATOR=4 +val SCE_REBOL_CHARACTER=5 +val SCE_REBOL_QUOTEDSTRING=6 +val SCE_REBOL_BRACEDSTRING=7 +val SCE_REBOL_NUMBER=8 +val SCE_REBOL_PAIR=9 +val SCE_REBOL_TUPLE=10 +val SCE_REBOL_BINARY=11 +val SCE_REBOL_MONEY=12 +val SCE_REBOL_ISSUE=13 +val SCE_REBOL_TAG=14 +val SCE_REBOL_FILE=15 +val SCE_REBOL_EMAIL=16 +val SCE_REBOL_URL=17 +val SCE_REBOL_DATE=18 +val SCE_REBOL_TIME=19 +val SCE_REBOL_IDENTIFIER=20 +val SCE_REBOL_WORD=21 +val SCE_REBOL_WORD2=22 +val SCE_REBOL_WORD3=23 +val SCE_REBOL_WORD4=24 +val SCE_REBOL_WORD5=25 +val SCE_REBOL_WORD6=26 +val SCE_REBOL_WORD7=27 +val SCE_REBOL_WORD8=28 +# Lexical states for SCLEX_SQL +lex SQL=SCLEX_SQL SCE_SQL_ +val SCE_SQL_DEFAULT=0 +val SCE_SQL_COMMENT=1 +val SCE_SQL_COMMENTLINE=2 +val SCE_SQL_COMMENTDOC=3 +val SCE_SQL_NUMBER=4 +val SCE_SQL_WORD=5 +val SCE_SQL_STRING=6 +val SCE_SQL_CHARACTER=7 +val SCE_SQL_SQLPLUS=8 +val SCE_SQL_SQLPLUS_PROMPT=9 +val SCE_SQL_OPERATOR=10 +val SCE_SQL_IDENTIFIER=11 +val SCE_SQL_SQLPLUS_COMMENT=13 +val SCE_SQL_COMMENTLINEDOC=15 +val SCE_SQL_WORD2=16 +val SCE_SQL_COMMENTDOCKEYWORD=17 +val SCE_SQL_COMMENTDOCKEYWORDERROR=18 +val SCE_SQL_USER1=19 +val SCE_SQL_USER2=20 +val SCE_SQL_USER3=21 +val SCE_SQL_USER4=22 +val SCE_SQL_QUOTEDIDENTIFIER=23 +# Lexical states for SCLEX_SMALLTALK +lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ +val SCE_ST_DEFAULT=0 +val SCE_ST_STRING=1 +val SCE_ST_NUMBER=2 +val SCE_ST_COMMENT=3 +val SCE_ST_SYMBOL=4 +val SCE_ST_BINARY=5 +val SCE_ST_BOOL=6 +val SCE_ST_SELF=7 +val SCE_ST_SUPER=8 +val SCE_ST_NIL=9 +val SCE_ST_GLOBAL=10 +val SCE_ST_RETURN=11 +val SCE_ST_SPECIAL=12 +val SCE_ST_KWSEND=13 +val SCE_ST_ASSIGN=14 +val SCE_ST_CHARACTER=15 +val SCE_ST_SPEC_SEL=16 +# Lexical states for SCLEX_FLAGSHIP (clipper) +lex FlagShip=SCLEX_FLAGSHIP SCE_B_ +val SCE_FS_DEFAULT=0 +val SCE_FS_COMMENT=1 +val SCE_FS_COMMENTLINE=2 +val SCE_FS_COMMENTDOC=3 +val SCE_FS_COMMENTLINEDOC=4 +val SCE_FS_COMMENTDOCKEYWORD=5 +val SCE_FS_COMMENTDOCKEYWORDERROR=6 +val SCE_FS_KEYWORD=7 +val SCE_FS_KEYWORD2=8 +val SCE_FS_KEYWORD3=9 +val SCE_FS_KEYWORD4=10 +val SCE_FS_NUMBER=11 +val SCE_FS_STRING=12 +val SCE_FS_PREPROCESSOR=13 +val SCE_FS_OPERATOR=14 +val SCE_FS_IDENTIFIER=15 +val SCE_FS_DATE=16 +val SCE_FS_STRINGEOL=17 +val SCE_FS_CONSTANT=18 +val SCE_FS_ASM=19 +val SCE_FS_LABEL=20 +val SCE_FS_ERROR=21 +val SCE_FS_HEXNUMBER=22 +val SCE_FS_BINNUMBER=23 +# Lexical states for SCLEX_CSOUND +lex Csound=SCLEX_CSOUND SCE_CSOUND_ +val SCE_CSOUND_DEFAULT=0 +val SCE_CSOUND_COMMENT=1 +val SCE_CSOUND_NUMBER=2 +val SCE_CSOUND_OPERATOR=3 +val SCE_CSOUND_INSTR=4 +val SCE_CSOUND_IDENTIFIER=5 +val SCE_CSOUND_OPCODE=6 +val SCE_CSOUND_HEADERSTMT=7 +val SCE_CSOUND_USERKEYWORD=8 +val SCE_CSOUND_COMMENTBLOCK=9 +val SCE_CSOUND_PARAM=10 +val SCE_CSOUND_ARATE_VAR=11 +val SCE_CSOUND_KRATE_VAR=12 +val SCE_CSOUND_IRATE_VAR=13 +val SCE_CSOUND_GLOBAL_VAR=14 +val SCE_CSOUND_STRINGEOL=15 +# Lexical states for SCLEX_INNOSETUP +lex Inno=SCLEX_INNOSETUP SCE_INNO_ +val SCE_INNO_DEFAULT=0 +val SCE_INNO_COMMENT=1 +val SCE_INNO_KEYWORD=2 +val SCE_INNO_PARAMETER=3 +val SCE_INNO_SECTION=4 +val SCE_INNO_PREPROC=5 +val SCE_INNO_PREPROC_INLINE=6 +val SCE_INNO_COMMENT_PASCAL=7 +val SCE_INNO_KEYWORD_PASCAL=8 +val SCE_INNO_KEYWORD_USER=9 +val SCE_INNO_STRING_DOUBLE=10 +val SCE_INNO_STRING_SINGLE=11 +val SCE_INNO_IDENTIFIER=12 +# Lexical states for SCLEX_OPAL +lex Opal=SCLEX_OPAL SCE_OPAL_ +val SCE_OPAL_SPACE=0 +val SCE_OPAL_COMMENT_BLOCK=1 +val SCE_OPAL_COMMENT_LINE=2 +val SCE_OPAL_INTEGER=3 +val SCE_OPAL_KEYWORD=4 +val SCE_OPAL_SORT=5 +val SCE_OPAL_STRING=6 +val SCE_OPAL_PAR=7 +val SCE_OPAL_BOOL_CONST=8 +val SCE_OPAL_DEFAULT=32 +# Lexical states for SCLEX_SPICE +lex Spice=SCLEX_SPICE SCE_SPICE_ +val SCE_SPICE_DEFAULT=0 +val SCE_SPICE_IDENTIFIER=1 +val SCE_SPICE_KEYWORD=2 +val SCE_SPICE_KEYWORD2=3 +val SCE_SPICE_KEYWORD3=4 +val SCE_SPICE_NUMBER=5 +val SCE_SPICE_DELIMITER=6 +val SCE_SPICE_VALUE=7 +val SCE_SPICE_COMMENTLINE=8 +# Lexical states for SCLEX_CMAKE +lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ +val SCE_CMAKE_DEFAULT=0 +val SCE_CMAKE_COMMENT=1 +val SCE_CMAKE_STRINGDQ=2 +val SCE_CMAKE_STRINGLQ=3 +val SCE_CMAKE_STRINGRQ=4 +val SCE_CMAKE_COMMANDS=5 +val SCE_CMAKE_PARAMETERS=6 +val SCE_CMAKE_VARIABLE=7 +val SCE_CMAKE_USERDEFINED=8 +val SCE_CMAKE_WHILEDEF=9 +val SCE_CMAKE_FOREACHDEF=10 +val SCE_CMAKE_IFDEFINEDEF=11 +val SCE_CMAKE_MACRODEF=12 +val SCE_CMAKE_STRINGVAR=13 +val SCE_CMAKE_NUMBER=14 +# Lexical states for SCLEX_GAP +lex Gap=SCLEX_GAP SCE_GAP_ +val SCE_GAP_DEFAULT=0 +val SCE_GAP_IDENTIFIER=1 +val SCE_GAP_KEYWORD=2 +val SCE_GAP_KEYWORD2=3 +val SCE_GAP_KEYWORD3=4 +val SCE_GAP_KEYWORD4=5 +val SCE_GAP_STRING=6 +val SCE_GAP_CHAR=7 +val SCE_GAP_OPERATOR=8 +val SCE_GAP_COMMENT=9 +val SCE_GAP_NUMBER=10 +val SCE_GAP_STRINGEOL=11 +# Lexical state for SCLEX_PLM +lex PLM=SCLEX_PLM SCE_PLM_ +val SCE_PLM_DEFAULT=0 +val SCE_PLM_COMMENT=1 +val SCE_PLM_STRING=2 +val SCE_PLM_NUMBER=3 +val SCE_PLM_IDENTIFIER=4 +val SCE_PLM_OPERATOR=5 +val SCE_PLM_CONTROL=6 +val SCE_PLM_KEYWORD=7 +lex Progress=SCLEX_PROGRESS SCE_4GL_ +val SCE_4GL_DEFAULT=0 +val SCE_4GL_NUMBER=1 +val SCE_4GL_WORD=2 +val SCE_4GL_STRING=3 +val SCE_4GL_CHARACTER=4 +val SCE_4GL_PREPROCESSOR=5 +val SCE_4GL_OPERATOR=6 +val SCE_4GL_IDENTIFIER=7 +val SCE_4GL_BLOCK=8 +val SCE_4GL_END=9 +val SCE_4GL_COMMENT1=10 +val SCE_4GL_COMMENT2=11 +val SCE_4GL_COMMENT3=12 +val SCE_4GL_COMMENT4=13 +val SCE_4GL_COMMENT5=14 +val SCE_4GL_COMMENT6=15 +val SCE_4GL_DEFAULT_=16 +val SCE_4GL_NUMBER_=17 +val SCE_4GL_WORD_=18 +val SCE_4GL_STRING_=19 +val SCE_4GL_CHARACTER_=20 +val SCE_4GL_PREPROCESSOR_=21 +val SCE_4GL_OPERATOR_=22 +val SCE_4GL_IDENTIFIER_=23 +val SCE_4GL_BLOCK_=24 +val SCE_4GL_END_=25 +val SCE_4GL_COMMENT1_=26 +val SCE_4GL_COMMENT2_=27 +val SCE_4GL_COMMENT3_=28 +val SCE_4GL_COMMENT4_=29 +val SCE_4GL_COMMENT5_=30 +val SCE_4GL_COMMENT6_=31 + +# Events + +evt void StyleNeeded=2000(int position) +evt void CharAdded=2001(int ch) +evt void SavePointReached=2002(void) +evt void SavePointLeft=2003(void) +evt void ModifyAttemptRO=2004(void) +# GTK+ Specific to work around focus and accelerator problems: +evt void Key=2005(int ch, int modifiers) +evt void DoubleClick=2006(void) +evt void UpdateUI=2007(void) +evt void Modified=2008(int position, int modificationType, string text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev) +evt void MacroRecord=2009(int message, int wParam, int lParam) +evt void MarginClick=2010(int modifiers, int position, int margin) +evt void NeedShown=2011(int position, int length) +evt void Painted=2013(void) +evt void UserListSelection=2014(int listType, string text) +evt void URIDropped=2015(string text) +evt void DwellStart=2016(int position) +evt void DwellEnd=2017(int position) +evt void Zoom=2018(void) +evt void HotSpotClick=2019(int modifiers, int position) +evt void HotSpotDoubleClick=2020(int modifiers, int position) +evt void CallTipClick=2021(int position) +evt void AutoCSelection=2022(string text) +evt void IndicatorClick=2023(int modifiers, int position) +evt void IndicatorRelease=2024(int modifiers, int position) + +cat Deprecated + +# CARET_POLICY changed in 1.47 +fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop) +val CARET_CENTER=0x02 +val CARET_XEVEN=0x08 +val CARET_XJUMPS=0x10 + +# The old name for SCN_UPDATEUI +val SCN_CHECKBRACE=2007 +evt void PosChanged=2012(int position) + +# SCLEX_HTML should be used in preference to these. +val SCLEX_ASP=29 +val SCLEX_PHP=30 diff --git a/sdk/wxscintilla/src/scintilla/include/ScintillaWidget.h b/sdk/wxscintilla/src/scintilla/include/ScintillaWidget.h new file mode 100644 index 0000000000..d990952419 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/ScintillaWidget.h @@ -0,0 +1,59 @@ +// Scintilla source code edit control +/** @file ScintillaWidget.h + ** Definition of Scintilla widget for GTK+. + ** Only needed by GTK+ code but is harmless on other platforms. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if PLAT_GTK + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaClass; + +struct _ScintillaObject { + GtkContainer cont; + void *pscin; +}; + +struct _ScintillaClass { + GtkContainerClass parent_class; + + void (* command) (ScintillaObject *ttt); + void (* notify) (ScintillaObject *ttt); +}; + +#if GLIB_MAJOR_VERSION < 2 +GtkType scintilla_get_type (void); +#else +GType scintilla_get_type (void); +#endif +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci, uptr_t id); +sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); +void scintilla_release_resources(void); + +#if GTK_MAJOR_VERSION < 2 +#define SCINTILLA_NOTIFY "notify" +#else +#define SCINTILLA_NOTIFY "sci-notify" +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/include/WindowAccessor.h b/sdk/wxscintilla/src/scintilla/include/WindowAccessor.h new file mode 100644 index 0000000000..6724e8410b --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/include/WindowAccessor.h @@ -0,0 +1,66 @@ +// Scintilla source code edit control +/** @file WindowAccessor.h + ** Implementation of BufferAccess and StylingAccess on a Scintilla + ** rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class WindowAccessor : public Accessor { + // Private so WindowAccessor objects can not be copied + WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {} + WindowAccessor &operator=(const WindowAccessor &) { return *this; } +protected: + WindowID id; + PropSet &props; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + + bool InternalIsLeadByte(char ch); + void Fill(int position); +public: + WindowAccessor(WindowID id_, PropSet &props_) : + Accessor(), id(id_), props(props_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { + } + ~WindowAccessor(); + bool Match(int pos, const char *s); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + char *GetProperties() { + return props.ToString(); + } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); + void IndicatorFill(int start, int end, int indicator, int value); +}; + +#ifdef SCI_NAMESPACE +} +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/AutoComplete.cxx b/sdk/wxscintilla/src/scintilla/src/AutoComplete.cxx new file mode 100644 index 0000000000..0cd5b36e80 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/AutoComplete.cxx @@ -0,0 +1,178 @@ +// Scintilla source code edit control +/** @file AutoComplete.cxx + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "AutoComplete.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +AutoComplete::AutoComplete() : + active(false), + separator(' '), + typesep('?'), + ignoreCase(false), + chooseSingle(false), + lb(0), + posStart(0), + startLen(0), + cancelAtStartPos(true), + autoHide(true), + dropRestOfWord(false) { + lb = ListBox::Allocate(); + stopChars[0] = '\0'; + fillUpChars[0] = '\0'; +} + +AutoComplete::~AutoComplete() { + if (lb) { + lb->Destroy(); + delete lb; + lb = 0; + } +} + +bool AutoComplete::Active() { + return active; +} + +void AutoComplete::Start(Window &parent, int ctrlID, + int position, Point location, int startLen_, + int lineHeight, bool unicodeMode) { + if (active) { + Cancel(); + } + lb->Create(parent, ctrlID, location, lineHeight, unicodeMode); + lb->Clear(); + active = true; + startLen = startLen_; + posStart = position; +} + +void AutoComplete::SetStopChars(const char *stopChars_) { + strncpy(stopChars, stopChars_, sizeof(stopChars)); + stopChars[sizeof(stopChars) - 1] = '\0'; +} + +bool AutoComplete::IsStopChar(char ch) { + return ch && strchr(stopChars, ch); +} + +void AutoComplete::SetFillUpChars(const char *fillUpChars_) { + strncpy(fillUpChars, fillUpChars_, sizeof(fillUpChars)); + fillUpChars[sizeof(fillUpChars) - 1] = '\0'; +} + +bool AutoComplete::IsFillUpChar(char ch) { + return ch && strchr(fillUpChars, ch); +} + +void AutoComplete::SetSeparator(char separator_) { + separator = separator_; +} + +char AutoComplete::GetSeparator() { + return separator; +} + +void AutoComplete::SetTypesep(char separator_) { + typesep = separator_; +} + +char AutoComplete::GetTypesep() { + return typesep; +} + +void AutoComplete::SetList(const char *list) { + lb->SetList(list, separator, typesep); +} + +void AutoComplete::Show(bool show) { + lb->Show(show); + if (show) + lb->Select(0); +} + +void AutoComplete::Cancel() { + if (lb->Created()) { + lb->Clear(); + lb->Destroy(); + active = false; + } +} + + +void AutoComplete::Move(int delta) { + int count = lb->Length(); + int current = lb->GetSelection(); + current += delta; + if (current >= count) + current = count - 1; + if (current < 0) + current = 0; + lb->Select(current); +} + +void AutoComplete::Select(const char *word) { + size_t lenWord = strlen(word); + int location = -1; + const int maxItemLen=1000; + char item[maxItemLen]; + int start = 0; // lower bound of the api array block to search + int end = lb->Length() - 1; // upper bound of the api array block to search + while ((start <= end) && (location == -1)) { // Binary searching loop + int pivot = (start + end) / 2; + lb->GetValue(pivot, item, maxItemLen); + int cond; + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (!cond) { + // Find first match + while (pivot > start) { + lb->GetValue(pivot-1, item, maxItemLen); + if (ignoreCase) + cond = CompareNCaseInsensitive(word, item, lenWord); + else + cond = strncmp(word, item, lenWord); + if (0 != cond) + break; + --pivot; + } + location = pivot; + if (ignoreCase) { + // Check for exact-case match + for (; pivot <= end; pivot++) { + lb->GetValue(pivot, item, maxItemLen); + if (!strncmp(word, item, lenWord)) { + location = pivot; + break; + } + if (CompareNCaseInsensitive(word, item, lenWord)) + break; + } + } + } else if (cond < 0) { + end = pivot - 1; + } else if (cond > 0) { + start = pivot + 1; + } + } + if (location == -1 && autoHide) + Cancel(); + else + lb->Select(location); +} + diff --git a/sdk/wxscintilla/src/scintilla/src/AutoComplete.h b/sdk/wxscintilla/src/scintilla/src/AutoComplete.h new file mode 100644 index 0000000000..0a38d80e2d --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/AutoComplete.h @@ -0,0 +1,78 @@ +// Scintilla source code edit control +/** @file AutoComplete.h + ** Defines the auto completion list box. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef AUTOCOMPLETE_H +#define AUTOCOMPLETE_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class AutoComplete { + bool active; + char stopChars[256]; + char fillUpChars[256]; + char separator; + char typesep; // Type seperator + +public: + bool ignoreCase; + bool chooseSingle; + ListBox *lb; + int posStart; + int startLen; + /// Should autocompletion be canceled if editor's currentPos <= startPos? + bool cancelAtStartPos; + bool autoHide; + bool dropRestOfWord; + + AutoComplete(); + ~AutoComplete(); + + /// Is the auto completion list displayed? + bool Active(); + + /// Display the auto completion list positioned to be near a character position + void Start(Window &parent, int ctrlID, int position, Point location, + int startLen_, int lineHeight, bool unicodeMode); + + /// The stop chars are characters which, when typed, cause the auto completion list to disappear + void SetStopChars(const char *stopChars_); + bool IsStopChar(char ch); + + /// The fillup chars are characters which, when typed, fill up the selected word + void SetFillUpChars(const char *fillUpChars_); + bool IsFillUpChar(char ch); + + /// The separator character is used when interpreting the list in SetList + void SetSeparator(char separator_); + char GetSeparator(); + + /// The typesep character is used for seperating the word from the type + void SetTypesep(char separator_); + char GetTypesep(); + + /// The list string contains a sequence of words separated by the separator character + void SetList(const char *list); + + void Show(bool show); + void Cancel(); + + /// Move the current list element by delta, scrolling appropriately + void Move(int delta); + + /// Select a list element that starts with word as the current element + void Select(const char *word); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/CallTip.cxx b/sdk/wxscintilla/src/scintilla/src/CallTip.cxx new file mode 100644 index 0000000000..bfbd8db5b1 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CallTip.cxx @@ -0,0 +1,329 @@ +// Scintilla source code edit control +/** @file CallTip.cxx + ** Code for displaying call tips. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "CallTip.h" +#include + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static const int insetX = 5; // text inset in x from calltip border +static const int widthArrow = 14; + +CallTip::CallTip() { + wCallTip = 0; + inCallTipMode = false; + posStartCallTip = 0; + val = 0; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + lineHeight = 1; + startHighlight = 0; + endHighlight = 0; + tabSize = 0; + useStyleCallTip = false; // for backwards compatibility + +#ifdef __APPLE__ + // proper apple colours for the default + colourBG.desired = ColourDesired(0xff, 0xff, 0xc6); + colourUnSel.desired = ColourDesired(0, 0, 0); +#else + colourBG.desired = ColourDesired(0xff, 0xff, 0xff); + colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80); +#endif + colourSel.desired = ColourDesired(0, 0, 0x80); + colourShade.desired = ColourDesired(0, 0, 0); + colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); +} + +CallTip::~CallTip() { + font.Release(); + wCallTip.Destroy(); + delete []val; + val = 0; +} + +void CallTip::RefreshColourPalette(Palette &pal, bool want) { + pal.WantFind(colourBG, want); + pal.WantFind(colourUnSel, want); + pal.WantFind(colourSel, want); + pal.WantFind(colourShade, want); + pal.WantFind(colourLight, want); +} + +// Although this test includes 0, we should never see a \0 character. +static bool IsArrowCharacter(char ch) { + return (ch == 0) || (ch == '\001') || (ch == '\002'); +} + +// We ignore tabs unless a tab width has been set. +bool CallTip::IsTabCharacter(char ch) { + return (tabSize > 0) && (ch == '\t'); +} + +int CallTip::NextTabPos(int x) { + if (tabSize > 0) { // paranoia... not called unless this is true + x -= insetX; // position relative to text + x = (x + tabSize) / tabSize; // tab "number" + return tabSize*x + insetX; // position of next tab + } else { + return x + 1; // arbitrary + } +} + +// Draw a section of the call tip that does not include \n in one colour. +// The text may include up to numEnds tabs or arrow characters. +void CallTip::DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw) { + s += posStart; + int len = posEnd - posStart; + + // Divide the text into sections that are all text, or that are + // single arrows or single tab characters (if tabSize > 0). + int maxEnd = 0; + const int numEnds = 10; + int ends[numEnds + 2]; + for (int i=0;i 0) + ends[maxEnd++] = i; + ends[maxEnd++] = i+1; + } + } + ends[maxEnd++] = len; + int startSeg = 0; + int xEnd; + for (int seg = 0; seg startSeg) { + if (IsArrowCharacter(s[startSeg])) { + bool upArrow = s[startSeg] == '\001'; + rcClient.left = x; + rcClient.right = rcClient.left + widthArrow; + if (draw) { + const int halfWidth = widthArrow / 2 - 3; + const int centreX = rcClient.left + widthArrow / 2 - 1; + const int centreY = (rcClient.top + rcClient.bottom) / 2; + surface->FillRectangle(rcClient, colourBG.allocated); + PRectangle rcClientInner(rcClient.left + 1, rcClient.top + 1, + rcClient.right - 2, rcClient.bottom - 1); + surface->FillRectangle(rcClientInner, colourUnSel.allocated); + + if (upArrow) { // Up arrow + Point pts[] = { + Point(centreX - halfWidth, centreY + halfWidth / 2), + Point(centreX + halfWidth, centreY + halfWidth / 2), + Point(centreX, centreY - halfWidth + halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } else { // Down arrow + Point pts[] = { + Point(centreX - halfWidth, centreY - halfWidth / 2), + Point(centreX + halfWidth, centreY - halfWidth / 2), + Point(centreX, centreY + halfWidth - halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } + } + xEnd = rcClient.right; + offsetMain = xEnd; + if (upArrow) { + rectUp = rcClient; + } else { + rectDown = rcClient; + } + } else if (IsTabCharacter(s[startSeg])) { + xEnd = NextTabPos(x); + } else { + xEnd = x + surface->WidthText(font, s + startSeg, endSeg - startSeg); + if (draw) { + rcClient.left = x; + rcClient.right = xEnd; + surface->DrawTextTransparent(rcClient, font, ytext, + s+startSeg, endSeg - startSeg, + highlight ? colourSel.allocated : colourUnSel.allocated); + } + } + x = xEnd; + startSeg = endSeg; + } + } +} + +int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + // To make a nice small call tip window, it is only sized to fit most normal characters without accents + int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font); + + // For each line... + // Draw the definition in three parts: before highlight, highlighted, after highlight + int ytext = rcClient.top + ascent + 1; + rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; + char *chunkVal = val; + bool moreChunks = true; + int maxWidth = 0; + + while (moreChunks) { + char *chunkEnd = strchr(chunkVal, '\n'); + if (chunkEnd == NULL) { + chunkEnd = chunkVal + strlen(chunkVal); + moreChunks = false; + } + int chunkOffset = chunkVal - val; + int chunkLength = chunkEnd - chunkVal; + int chunkEndOffset = chunkOffset + chunkLength; + int thisStartHighlight = Platform::Maximum(startHighlight, chunkOffset); + thisStartHighlight = Platform::Minimum(thisStartHighlight, chunkEndOffset); + thisStartHighlight -= chunkOffset; + int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); + thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); + thisEndHighlight -= chunkOffset; + rcClient.top = ytext - ascent - 1; + + int x = insetX; // start each line at this inset + + DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, + ytext, rcClient, false, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, + ytext, rcClient, true, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, + ytext, rcClient, false, draw); + + chunkVal = chunkEnd + 1; + ytext += lineHeight; + rcClient.bottom += lineHeight; + maxWidth = Platform::Maximum(maxWidth, x); + } + return maxWidth; +} + +void CallTip::PaintCT(Surface *surfaceWindow) { + if (!val) + return; + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + surfaceWindow->FillRectangle(rcClient, colourBG.allocated); + + offsetMain = insetX; // initial alignment assuming no arrows + PaintContents(surfaceWindow, true); + +#ifndef __APPLE__ + // OSX doesn't put borders on "help tags" + // Draw a raised border around the edges of the window + surfaceWindow->MoveTo(0, rcClientSize.bottom - 1); + surfaceWindow->PenColour(colourShade.allocated); + surfaceWindow->LineTo(rcClientSize.right - 1, rcClientSize.bottom - 1); + surfaceWindow->LineTo(rcClientSize.right - 1, 0); + surfaceWindow->PenColour(colourLight.allocated); + surfaceWindow->LineTo(0, 0); + surfaceWindow->LineTo(0, rcClientSize.bottom - 1); +#endif +} + +void CallTip::MouseClick(Point pt) { + clickPlace = 0; + if (rectUp.Contains(pt)) + clickPlace = 1; + if (rectDown.Contains(pt)) + clickPlace = 2; +} + +PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, + int codePage_, int characterSet, Window &wParent) { + clickPlace = 0; + if (val) + delete []val; + val = new char[strlen(defn) + 1]; + if (!val) + return PRectangle(); + strcpy(val, defn); + codePage = codePage_; + Surface *surfaceMeasure = Surface::Allocate(); + if (!surfaceMeasure) + return PRectangle(); + surfaceMeasure->Init(wParent.GetID()); + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); + surfaceMeasure->SetDBCSMode(codePage); + startHighlight = 0; + endHighlight = 0; + inCallTipMode = true; + posStartCallTip = pos; + int deviceHeight = surfaceMeasure->DeviceHeightFont(size); + font.Create(faceName, characterSet, deviceHeight, false, false); + // Look for multiple lines in the text + // Only support \n here - simply means container must avoid \r! + int numLines = 1; + const char *newline; + const char *look = val; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + offsetMain = insetX; // changed to right edge of any arrows + int width = PaintContents(surfaceMeasure, false) + insetX; + while ((newline = strchr(look, '\n')) != NULL) { + look = newline + 1; + numLines++; + } + lineHeight = surfaceMeasure->Height(font); + + // Extra line for border and an empty line at top and bottom. The returned + // rectangle is aligned to the right edge of the last arrow encountered in + // the tip text, else to the tip text left edge. + int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; + delete surfaceMeasure; + return PRectangle(pt.x - offsetMain, pt.y + 1, pt.x + width - offsetMain, pt.y + 1 + height); +} + +void CallTip::CallTipCancel() { + inCallTipMode = false; + if (wCallTip.Created()) { + wCallTip.Destroy(); + } +} + +void CallTip::SetHighlight(int start, int end) { + // Avoid flashing by checking something has really changed + if ((start != startHighlight) || (end != endHighlight)) { + startHighlight = start; + endHighlight = end; + if (wCallTip.Created()) { + wCallTip.InvalidateAll(); + } + } +} + +// Set the tab size (sizes > 0 enable the use of tabs). This also enables the +// use of the STYLE_CALLTIP. +void CallTip::SetTabSize(int tabSz) { + tabSize = tabSz; + useStyleCallTip = true; +} + +// It might be better to have two access functions for this and to use +// them for all settings of colours. +void CallTip::SetForeBack(const ColourPair &fore, const ColourPair &back) { + colourBG = back; + colourUnSel = fore; +} diff --git a/sdk/wxscintilla/src/scintilla/src/CallTip.h b/sdk/wxscintilla/src/scintilla/src/CallTip.h new file mode 100644 index 0000000000..52fddd133d --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CallTip.h @@ -0,0 +1,87 @@ +// Scintilla source code edit control +/** @file CallTip.h + ** Interface to the call tip control. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CALLTIP_H +#define CALLTIP_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class CallTip { + int startHighlight; // character offset to start and... + int endHighlight; // ...end of highlighted text + char *val; + Font font; + PRectangle rectUp; // rectangle of last up angle in the tip + PRectangle rectDown; // rectangle of last down arrow in the tip + int lineHeight; // vertical line spacing + int offsetMain; // The alignment point of the call tip + int tabSize; // Tab size in pixels, <=0 no TAB expand + bool useStyleCallTip; // if true, STYLE_CALLTIP should be used + + // Private so CallTip objects can not be copied + CallTip(const CallTip &) {} + CallTip &operator=(const CallTip &) { return *this; } + void DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw); + int PaintContents(Surface *surfaceWindow, bool draw); + bool IsTabCharacter(char c); + int NextTabPos(int x); + +public: + Window wCallTip; + Window wDraw; + bool inCallTipMode; + int posStartCallTip; + ColourPair colourBG; + ColourPair colourUnSel; + ColourPair colourSel; + ColourPair colourShade; + ColourPair colourLight; + int codePage; + int clickPlace; + + CallTip(); + ~CallTip(); + + /// Claim or accept palette entries for the colours required to paint a calltip. + void RefreshColourPalette(Palette &pal, bool want); + + void PaintCT(Surface *surfaceWindow); + + void MouseClick(Point pt); + + /// Setup the calltip and return a rectangle of the area required. + PRectangle CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, int codePage_, + int characterSet, Window &wParent); + + void CallTipCancel(); + + /// Set a range of characters to be displayed in a highlight style. + /// Commonly used to highlight the current parameter. + void SetHighlight(int start, int end); + + /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. + void SetTabSize(int tabSz); + + /// Used to determine which STYLE_xxxx to use for call tip information + bool UseStyleCallTip() const { return useStyleCallTip;} + + // Modify foreground and background colours + void SetForeBack(const ColourPair &fore, const ColourPair &back); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/CellBuffer.cxx b/sdk/wxscintilla/src/scintilla/src/CellBuffer.cxx new file mode 100644 index 0000000000..a94de6132c --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CellBuffer.cxx @@ -0,0 +1,918 @@ +// Scintilla source code edit control +/** @file CellBuffer.cxx + ** Manages a buffer of cells. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +MarkerHandleSet::MarkerHandleSet() { + root = 0; +} + +MarkerHandleSet::~MarkerHandleSet() { + MarkerHandleNumber *mhn = root; + while (mhn) { + MarkerHandleNumber *mhnToFree = mhn; + mhn = mhn->next; + delete mhnToFree; + } + root = 0; +} + +int MarkerHandleSet::Length() const { + int c = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + c++; + mhn = mhn->next; + } + return c; +} + +int MarkerHandleSet::NumberFromHandle(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return mhn->number; + } + mhn = mhn->next; + } + return - 1; +} + +int MarkerHandleSet::MarkValue() const { + unsigned int m = 0; + MarkerHandleNumber *mhn = root; + while (mhn) { + m |= (1 << mhn->number); + mhn = mhn->next; + } + return m; +} + +bool MarkerHandleSet::Contains(int handle) const { + MarkerHandleNumber *mhn = root; + while (mhn) { + if (mhn->handle == handle) { + return true; + } + mhn = mhn->next; + } + return false; +} + +bool MarkerHandleSet::InsertHandle(int handle, int markerNum) { + MarkerHandleNumber *mhn = new MarkerHandleNumber; + if (!mhn) + return false; + mhn->handle = handle; + mhn->number = markerNum; + mhn->next = root; + root = mhn; + return true; +} + +void MarkerHandleSet::RemoveHandle(int handle) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->handle == handle) { + *pmhn = mhn->next; + delete mhn; + return; + } + pmhn = &((*pmhn)->next); + } +} + +bool MarkerHandleSet::RemoveNumber(int markerNum) { + bool performedDeletion = false; + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + MarkerHandleNumber *mhn = *pmhn; + if (mhn->number == markerNum) { + *pmhn = mhn->next; + delete mhn; + performedDeletion = true; + } else { + pmhn = &((*pmhn)->next); + } + } + return performedDeletion; +} + +void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { + MarkerHandleNumber **pmhn = &root; + while (*pmhn) { + pmhn = &((*pmhn)->next); + } + *pmhn = other->root; + other->root = 0; +} + +LineVector::LineVector() : starts(256) { + handleCurrent = 1; + + Init(); +} + +LineVector::~LineVector() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::Init() { + starts.DeleteAll(); + for (int line = 0; line < markers.Length(); line++) { + delete markers[line]; + markers[line] = 0; + } + markers.DeleteAll(); + levels.DeleteAll(); +} + +void LineVector::ExpandLevels(int sizeNew) { + levels.InsertValue(levels.Length(), sizeNew - levels.Length(), SC_FOLDLEVELBASE); +} + +void LineVector::ClearLevels() { + levels.DeleteAll(); +} + +int LineVector::SetLevel(int line, int level) { + int prev = 0; + if ((line >= 0) && (line < Lines())) { + if (!levels.Length()) { + ExpandLevels(Lines() + 1); + } + prev = levels[line]; + if (prev != level) { + levels[line] = level; + } + } + return prev; +} + +int LineVector::GetLevel(int line) { + if (levels.Length() && (line >= 0) && (line < Lines())) { + return levels[line]; + } else { + return SC_FOLDLEVELBASE; + } +} + +void LineVector::InsertText(int line, int delta) { + starts.InsertText(line, delta); +} + +void LineVector::InsertLine(int line, int position) { + starts.InsertPartition(line, position); + if (markers.Length()) { + markers.Insert(line, 0); + } + if (levels.Length()) { + int level = SC_FOLDLEVELBASE; + if ((line > 0) && (line < Lines())) { + level = levels[line-1] & ~SC_FOLDLEVELWHITEFLAG; + } + levels.InsertValue(line, 1, level); + } +} + +void LineVector::SetLineStart(int line, int position) { + starts.SetPartitionStartPosition(line, position); +} + +void LineVector::RemoveLine(int line) { + starts.RemovePartition(line); + // Retain the markers from the deleted line by oring them into the previous line + if (markers.Length()) { + if (line > 0) { + MergeMarkers(line - 1); + } + markers.Delete(line); + } + if (levels.Length()) { + // Move up following lines but merge header flag from this line + // to line before to avoid a temporary disappearence causing expansion. + int firstHeader = levels[line] & SC_FOLDLEVELHEADERFLAG; + levels.Delete(line); + if (line > 0) + levels[line-1] |= firstHeader; + } +} + +int LineVector::LineFromPosition(int pos) { + return starts.PartitionFromPosition(pos); +} + +int LineVector::MarkValue(int line) { + if (markers.Length() && markers[line]) + return markers[line]->MarkValue(); + else + return 0; +} + +int LineVector::AddMark(int line, int markerNum) { + handleCurrent++; + if (!markers.Length()) { + // No existing markers so allocate one element per line + markers.InsertValue(0, Lines(), 0); + } + if (!markers[line]) { + // Need new structure to hold marker handle + markers[line] = new MarkerHandleSet(); + if (!markers[line]) + return - 1; + } + markers[line]->InsertHandle(handleCurrent, markerNum); + + return handleCurrent; +} + +void LineVector::MergeMarkers(int pos) { + if (markers[pos + 1] != NULL) { + if (markers[pos] == NULL) + markers[pos] = new MarkerHandleSet; + markers[pos]->CombineWith(markers[pos + 1]); + delete markers[pos + 1]; + markers[pos + 1] = NULL; + } +} + +void LineVector::DeleteMark(int line, int markerNum, bool all) { + if (markers.Length() && markers[line]) { + if (markerNum == -1) { + delete markers[line]; + markers[line] = NULL; + } else { + bool performedDeletion = markers[line]->RemoveNumber(markerNum); + while (all && performedDeletion) { + performedDeletion = markers[line]->RemoveNumber(markerNum); + } + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } + } +} + +void LineVector::DeleteMarkFromHandle(int markerHandle) { + int line = LineFromHandle(markerHandle); + if (line >= 0) { + markers[line]->RemoveHandle(markerHandle); + if (markers[line]->Length() == 0) { + delete markers[line]; + markers[line] = NULL; + } + } +} + +int LineVector::LineFromHandle(int markerHandle) { + if (markers.Length()) { + for (int line = 0; line < Lines(); line++) { + if (markers[line]) { + if (markers[line]->Contains(markerHandle)) { + return line; + } + } + } + } + return -1; +} + +Action::Action() { + at = startAction; + position = 0; + data = 0; + lenData = 0; +} + +Action::~Action() { + Destroy(); +} + +void Action::Create(actionType at_, int position_, char *data_, int lenData_, bool mayCoalesce_) { + delete []data; + position = position_; + at = at_; + data = data_; + lenData = lenData_; + mayCoalesce = mayCoalesce_; +} + +void Action::Destroy() { + delete []data; + data = 0; +} + +void Action::Grab(Action *source) { + delete []data; + + position = source->position; + at = source->at; + data = source->data; + lenData = source->lenData; + mayCoalesce = source->mayCoalesce; + + // Ownership of source data transferred to this + source->position = 0; + source->at = startAction; + source->data = 0; + source->lenData = 0; + source->mayCoalesce = true; +} + +// The undo history stores a sequence of user operations that represent the user's view of the +// commands executed on the text. +// Each user operation contains a sequence of text insertion and text deletion actions. +// All the user operations are stored in a list of individual actions with 'start' actions used +// as delimiters between user operations. +// Initially there is one start action in the history. +// As each action is performed, it is recorded in the history. The action may either become +// part of the current user operation or may start a new user operation. If it is to be part of the +// current operation, then it overwrites the current last action. If it is to be part of a new +// operation, it is appended after the current last action. +// After writing the new action, a new start action is appended at the end of the history. +// The decision of whether to start a new user operation is based upon two factors. If a +// compound operation has been explicitly started by calling BeginUndoAction and no matching +// EndUndoAction (these calls nest) has been called, then the action is coalesced into the current +// operation. If there is no outstanding BeginUndoAction call then a new operation is started +// unless it looks as if the new action is caused by the user typing or deleting a stream of text. +// Sequences that look like typing or deletion are coalesced into a single user operation. + +UndoHistory::UndoHistory() { + + lenActions = 100; + actions = new Action[lenActions]; + maxAction = 0; + currentAction = 0; + undoSequenceDepth = 0; + savePoint = 0; + + actions[currentAction].Create(startAction); +} + +UndoHistory::~UndoHistory() { + delete []actions; + actions = 0; +} + +void UndoHistory::EnsureUndoRoom() { + // Have to test that there is room for 2 more actions in the array + // as two actions may be created by the calling function + if (currentAction >= (lenActions - 2)) { + // Run out of undo nodes so extend the array + int lenActionsNew = lenActions * 2; + Action *actionsNew = new Action[lenActionsNew]; + if (!actionsNew) + return; + for (int act = 0; act <= currentAction; act++) + actionsNew[act].Grab(&actions[act]); + delete []actions; + lenActions = lenActionsNew; + actions = actionsNew; + } +} + +void UndoHistory::AppendAction(actionType at, int position, char *data, int lengthData, + bool &startSequence) { + EnsureUndoRoom(); + //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); + //Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, + // actions[currentAction - 1].position, actions[currentAction - 1].lenData); + if (currentAction < savePoint) { + savePoint = -1; + } + int oldCurrentAction = currentAction; + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { + // Top level actions may not always be coalesced + Action &actPrevious = actions[currentAction - 1]; + // See if current action can be coalesced into previous action + // Will work if both are inserts or deletes and position is same + if (at != actPrevious.at) { + currentAction++; + } else if (currentAction == savePoint) { + currentAction++; + } else if ((at == insertAction) && + (position != (actPrevious.position + actPrevious.lenData))) { + // Insertions must be immediately after to coalesce + currentAction++; + } else if (!actions[currentAction].mayCoalesce) { + // Not allowed to coalesce if this set + currentAction++; + } else if (at == removeAction) { + if ((lengthData == 1) || (lengthData == 2)){ + if ((position + lengthData) == actPrevious.position) { + ; // Backspace -> OK + } else if (position == actPrevious.position) { + ; // Delete -> OK + } else { + // Removals must be at same position to coalesce + currentAction++; + } + } else { + // Removals must be of one character to coalesce + currentAction++; + } + } else { + // Action coalesced. + } + + } else { + // Actions not at top level are always coalesced unless this is after return to top level + if (!actions[currentAction].mayCoalesce) + currentAction++; + } + } else { + currentAction++; + } + startSequence = oldCurrentAction != currentAction; + actions[currentAction].Create(at, position, data, lengthData); + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; +} + +void UndoHistory::BeginUndoAction() { + EnsureUndoRoom(); + if (undoSequenceDepth == 0) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } + undoSequenceDepth++; +} + +void UndoHistory::EndUndoAction() { + EnsureUndoRoom(); + undoSequenceDepth--; + if (0 == undoSequenceDepth) { + if (actions[currentAction].at != startAction) { + currentAction++; + actions[currentAction].Create(startAction); + maxAction = currentAction; + } + actions[currentAction].mayCoalesce = false; + } +} + +void UndoHistory::DropUndoSequence() { + undoSequenceDepth = 0; +} + +void UndoHistory::DeleteUndoHistory() { + for (int i = 1; i < maxAction; i++) + actions[i].Destroy(); + maxAction = 0; + currentAction = 0; + actions[currentAction].Create(startAction); + savePoint = 0; +} + +void UndoHistory::SetSavePoint() { + savePoint = currentAction; +} + +bool UndoHistory::IsSavePoint() const { + return savePoint == currentAction; +} + +bool UndoHistory::CanUndo() const { + return (currentAction > 0) && (maxAction > 0); +} + +int UndoHistory::StartUndo() { + // Drop any trailing startAction + if (actions[currentAction].at == startAction && currentAction > 0) + currentAction--; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act > 0) { + act--; + } + return currentAction - act; +} + +const Action &UndoHistory::GetUndoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedUndoStep() { + currentAction--; +} + +bool UndoHistory::CanRedo() const { + return maxAction > currentAction; +} + +int UndoHistory::StartRedo() { + // Drop any leading startAction + if (actions[currentAction].at == startAction && currentAction < maxAction) + currentAction++; + + // Count the steps in this action + int act = currentAction; + while (actions[act].at != startAction && act < maxAction) { + act++; + } + return act - currentAction; +} + +const Action &UndoHistory::GetRedoStep() const { + return actions[currentAction]; +} + +void UndoHistory::CompletedRedoStep() { + currentAction++; +} + +CellBuffer::CellBuffer() { + readOnly = false; + collectingUndo = true; +} + +CellBuffer::~CellBuffer() { +} + +char CellBuffer::CharAt(int position) { + return substance.ValueAt(position); +} + +void CellBuffer::GetCharRange(char *buffer, int position, int lengthRetrieve) { + if (lengthRetrieve < 0) + return; + if (position < 0) + return; + if ((position + lengthRetrieve) > substance.Length()) { + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", position, + lengthRetrieve, substance.Length()); + return; + } + + for (int i=0; i((curVal & ~mask) | styleValue)); + return true; + } else { + return false; + } +} + +bool CellBuffer::SetStyleFor(int position, int lengthStyle, char styleValue, char mask) { + bool changed = false; + PLATFORM_ASSERT(lengthStyle == 0 || + (lengthStyle > 0 && lengthStyle + position <= style.Length())); + while (lengthStyle--) { + char curVal = style.ValueAt(position); + if ((curVal & mask) != styleValue) { + style.SetValueAt(position, static_cast((curVal & ~mask) | styleValue)); + changed = true; + } + position++; + } + return changed; +} + +// The char* returned is to an allocation owned by the undo history +const char *CellBuffer::DeleteChars(int position, int deleteLength, bool &startSequence) { + // InsertString and DeleteChars are the bottleneck though which all changes occur + PLATFORM_ASSERT(deleteLength > 0); + char *data = 0; + if (!readOnly) { + if (collectingUndo) { + // Save into the undo/redo stack, but only the characters - not the formatting + data = new char[deleteLength]; + for (int i = 0; i < deleteLength; i++) { + data[i] = substance.ValueAt(position + i); + } + uh.AppendAction(removeAction, position, data, deleteLength, startSequence); + } + + BasicDeleteChars(position, deleteLength); + } + return data; +} + +int CellBuffer::Length() { + return substance.Length(); +} + +void CellBuffer::Allocate(int newSize) { + substance.ReAllocate(newSize); + style.ReAllocate(newSize); +} + +int CellBuffer::Lines() { + return lv.Lines(); +} + +int CellBuffer::LineStart(int line) { + if (line < 0) + return 0; + else if (line >= Lines()) + return Length(); + else + return lv.LineStart(line); +} + +bool CellBuffer::IsReadOnly() { + return readOnly; +} + +void CellBuffer::SetReadOnly(bool set) { + readOnly = set; +} + +void CellBuffer::SetSavePoint() { + uh.SetSavePoint(); +} + +bool CellBuffer::IsSavePoint() { + return uh.IsSavePoint(); +} + +int CellBuffer::AddMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + return lv.AddMark(line, markerNum); + } + return - 1; +} + +void CellBuffer::DeleteMark(int line, int markerNum) { + if ((line >= 0) && (line < Lines())) { + lv.DeleteMark(line, markerNum, false); + } +} + +void CellBuffer::DeleteMarkFromHandle(int markerHandle) { + lv.DeleteMarkFromHandle(markerHandle); +} + +int CellBuffer::GetMark(int line) { + if ((line >= 0) && (line < Lines())) + return lv.MarkValue(line); + return 0; +} + +void CellBuffer::DeleteAllMarks(int markerNum) { + for (int line = 0; line < Lines(); line++) { + lv.DeleteMark(line, markerNum, true); + } +} + +int CellBuffer::LineFromHandle(int markerHandle) { + return lv.LineFromHandle(markerHandle); +} + +// Without undo + +void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { + if (insertLength == 0) + return; + PLATFORM_ASSERT(insertLength > 0); + + substance.InsertFromArray(position, s, 0, insertLength); + style.InsertValue(position, insertLength, 0); + + int lineInsert = lv.LineFromPosition(position) + 1; + // Point all the lines after the insertion point further along in the buffer + lv.InsertText(lineInsert-1, insertLength); + char chPrev = substance.ValueAt(position - 1); + char chAfter = substance.ValueAt(position + insertLength); + if (chPrev == '\r' && chAfter == '\n') { + // Splitting up a crlf pair at position + lv.InsertLine(lineInsert, position); + lineInsert++; + } + char ch = ' '; + for (int i = 0; i < insertLength; i++) { + ch = s[i]; + if (ch == '\r') { + lv.InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } else if (ch == '\n') { + if (chPrev == '\r') { + // Patch up what was end of line + lv.SetLineStart(lineInsert - 1, (position + i) + 1); + } else { + lv.InsertLine(lineInsert, (position + i) + 1); + lineInsert++; + } + } + chPrev = ch; + } + // Joining two lines where last insertion is cr and following substance starts with lf + if (chAfter == '\n') { + if (ch == '\r') { + // End of line already in buffer so drop the newly created one + lv.RemoveLine(lineInsert - 1); + } + } +} + +void CellBuffer::BasicDeleteChars(int position, int deleteLength) { + if (deleteLength == 0) + return; + + if ((position == 0) && (deleteLength == substance.Length())) { + // If whole buffer is being deleted, faster to reinitialise lines data + // than to delete each line. + lv.Init(); + } else { + // Have to fix up line positions before doing deletion as looking at text in buffer + // to work out which lines have been removed + + int lineRemove = lv.LineFromPosition(position) + 1; + lv.InsertText(lineRemove-1, - (deleteLength)); + char chPrev = substance.ValueAt(position - 1); + char chBefore = chPrev; + char chNext = substance.ValueAt(position); + bool ignoreNL = false; + if (chPrev == '\r' && chNext == '\n') { + // Move back one + lv.SetLineStart(lineRemove, position); + lineRemove++; + ignoreNL = true; // First \n is not real deletion + } + + char ch = chNext; + for (int i = 0; i < deleteLength; i++) { + chNext = substance.ValueAt(position + i + 1); + if (ch == '\r') { + if (chNext != '\n') { + lv.RemoveLine(lineRemove); + } + } else if (ch == '\n') { + if (ignoreNL) { + ignoreNL = false; // Further \n are real deletions + } else { + lv.RemoveLine(lineRemove); + } + } + + ch = chNext; + } + // May have to fix up end if last deletion causes cr to be next to lf + // or removes one of a crlf pair + char chAfter = substance.ValueAt(position + deleteLength); + if (chBefore == '\r' && chAfter == '\n') { + // Using lineRemove-1 as cr ended line before start of deletion + lv.RemoveLine(lineRemove - 1); + lv.SetLineStart(lineRemove - 1, position + 1); + } + } + substance.DeleteRange(position, deleteLength); + style.DeleteRange(position, deleteLength); +} + +bool CellBuffer::SetUndoCollection(bool collectUndo) { + collectingUndo = collectUndo; + uh.DropUndoSequence(); + return collectingUndo; +} + +bool CellBuffer::IsCollectingUndo() { + return collectingUndo; +} + +void CellBuffer::BeginUndoAction() { + uh.BeginUndoAction(); +} + +void CellBuffer::EndUndoAction() { + uh.EndUndoAction(); +} + +void CellBuffer::DeleteUndoHistory() { + uh.DeleteUndoHistory(); +} + +bool CellBuffer::CanUndo() { + return uh.CanUndo(); +} + +int CellBuffer::StartUndo() { + return uh.StartUndo(); +} + +const Action &CellBuffer::GetUndoStep() const { + return uh.GetUndoStep(); +} + +void CellBuffer::PerformUndoStep() { + const Action &actionStep = uh.GetUndoStep(); + if (actionStep.at == insertAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } + uh.CompletedUndoStep(); +} + +bool CellBuffer::CanRedo() { + return uh.CanRedo(); +} + +int CellBuffer::StartRedo() { + return uh.StartRedo(); +} + +const Action &CellBuffer::GetRedoStep() const { + return uh.GetRedoStep(); +} + +void CellBuffer::PerformRedoStep() { + const Action &actionStep = uh.GetRedoStep(); + if (actionStep.at == insertAction) { + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); + } else if (actionStep.at == removeAction) { + BasicDeleteChars(actionStep.position, actionStep.lenData); + } + uh.CompletedRedoStep(); +} + +int CellBuffer::SetLineState(int line, int state) { + int stateOld = lineStates[line]; + lineStates[line] = state; + return stateOld; +} + +int CellBuffer::GetLineState(int line) { + return lineStates[line]; +} + +int CellBuffer::GetMaxLineState() { + return lineStates.Length(); +} + +int CellBuffer::SetLevel(int line, int level) { + return lv.SetLevel(line, level); +} + +int CellBuffer::GetLevel(int line) { + return lv.GetLevel(line); +} + +void CellBuffer::ClearLevels() { + lv.ClearLevels(); +} diff --git a/sdk/wxscintilla/src/scintilla/src/CellBuffer.h b/sdk/wxscintilla/src/scintilla/src/CellBuffer.h new file mode 100644 index 0000000000..331787bf32 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CellBuffer.h @@ -0,0 +1,239 @@ +// Scintilla source code edit control +/** @file CellBuffer.h + ** Manages the text of the document. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CELLBUFFER_H +#define CELLBUFFER_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + * This holds the marker identifier and the marker type to display. + * MarkerHandleNumbers are members of lists. + */ +struct MarkerHandleNumber { + int handle; + int number; + MarkerHandleNumber *next; +}; + +/** + * A marker handle set contains any number of MarkerHandleNumbers. + */ +class MarkerHandleSet { + MarkerHandleNumber *root; + +public: + MarkerHandleSet(); + ~MarkerHandleSet(); + int Length() const; + int NumberFromHandle(int handle) const; + int MarkValue() const; ///< Bit set of marker numbers. + bool Contains(int handle) const; + bool InsertHandle(int handle, int markerNum); + void RemoveHandle(int handle); + bool RemoveNumber(int markerNum); + void CombineWith(MarkerHandleSet *other); +}; + +/** + * The line vector contains information about each of the lines in a cell buffer. + */ +class LineVector { + + Partitioning starts; + SplitVector markers; + SplitVector levels; + /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. + int handleCurrent; + +public: + + LineVector(); + ~LineVector(); + void Init(); + + void ExpandLevels(int sizeNew=-1); + void ClearLevels(); + int SetLevel(int line, int level); + int GetLevel(int line); + + void InsertText(int line, int delta); + void InsertLine(int line, int position); + void SetLineStart(int line, int position); + void RemoveLine(int line); + int Lines() { + return starts.Partitions(); + } + int LineFromPosition(int pos); + int LineStart(int line) { + return starts.PositionFromPartition(line); + } + + int MarkValue(int line); + int AddMark(int line, int marker); + void MergeMarkers(int pos); + void DeleteMark(int line, int markerNum, bool all); + void DeleteMarkFromHandle(int markerHandle); + int LineFromHandle(int markerHandle); +}; + +enum actionType { insertAction, removeAction, startAction }; + +/** + * Actions are used to store all the information required to perform one undo/redo step. + */ +class Action { +public: + actionType at; + int position; + char *data; + int lenData; + bool mayCoalesce; + + Action(); + ~Action(); + void Create(actionType at_, int position_=0, char *data_=0, int lenData_=0, bool mayCoalesce_=true); + void Destroy(); + void Grab(Action *source); +}; + +/** + * + */ +class UndoHistory { + Action *actions; + int lenActions; + int maxAction; + int currentAction; + int undoSequenceDepth; + int savePoint; + + void EnsureUndoRoom(); + +public: + UndoHistory(); + ~UndoHistory(); + + void AppendAction(actionType at, int position, char *data, int length, bool &startSequence); + + void BeginUndoAction(); + void EndUndoAction(); + void DropUndoSequence(); + void DeleteUndoHistory(); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint() const; + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo() const; + int StartUndo(); + const Action &GetUndoStep() const; + void CompletedUndoStep(); + bool CanRedo() const; + int StartRedo(); + const Action &GetRedoStep() const; + void CompletedRedoStep(); +}; + +/** + * Holder for an expandable array of characters that supports undo and line markers. + * Based on article "Data Structures in a Bit-Mapped Text Editor" + * by Wilfred J. Hansen, Byte January 1987, page 183. + */ +class CellBuffer { +private: + SplitVector substance; + SplitVector style; + bool readOnly; + + bool collectingUndo; + UndoHistory uh; + + LineVector lv; + + SVector lineStates; + +public: + + CellBuffer(); + ~CellBuffer(); + + /// Retrieving positions outside the range of the buffer works and returns 0 + char CharAt(int position); + void GetCharRange(char *buffer, int position, int lengthRetrieve); + char StyleAt(int position); + + int Length(); + void Allocate(int newSize); + int Lines(); + int LineStart(int line); + int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } + const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); + + /// Setting styles for positions outside the range of the buffer is safe and has no effect. + /// @return true if the style of a character is changed. + bool SetStyleAt(int position, char styleValue, char mask='\377'); + bool SetStyleFor(int position, int length, char styleValue, char mask); + + const char *DeleteChars(int position, int deleteLength, bool &startSequence); + + bool IsReadOnly(); + void SetReadOnly(bool set); + + /// The save point is a marker in the undo stack where the container has stated that + /// the buffer was saved. Undo and redo can move over the save point. + void SetSavePoint(); + bool IsSavePoint(); + + /// Line marker functions + int AddMark(int line, int markerNum); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + int GetMark(int line); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle); + + /// Actions without undo + void BasicInsertString(int position, const char *s, int insertLength); + void BasicDeleteChars(int position, int deleteLength); + + bool SetUndoCollection(bool collectUndo); + bool IsCollectingUndo(); + void BeginUndoAction(); + void EndUndoAction(); + void DeleteUndoHistory(); + + /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is + /// called that many times. Similarly for redo. + bool CanUndo(); + int StartUndo(); + const Action &GetUndoStep() const; + void PerformUndoStep(); + bool CanRedo(); + int StartRedo(); + const Action &GetRedoStep() const; + void PerformRedoStep(); + + int SetLineState(int line, int state); + int GetLineState(int line); + int GetMaxLineState(); + + int SetLevel(int line, int level); + int GetLevel(int line); + void ClearLevels(); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/CharClassify.cxx b/sdk/wxscintilla/src/scintilla/src/CharClassify.cxx new file mode 100644 index 0000000000..76eb905c79 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CharClassify.cxx @@ -0,0 +1,43 @@ +// Scintilla source code edit control +/** @file CharClassify.cxx + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include + +#include "CharClassify.h" + +// Shut up annoying Visual C++ warnings: +#ifdef _MSC_VER +#pragma warning(disable: 4514) +#endif + +CharClassify::CharClassify() { + SetDefaultCharClasses(true); +} + +void CharClassify::SetDefaultCharClasses(bool includeWordClass) { + // Initialize all char classes to default values + for (int ch = 0; ch < 256; ch++) { + if (ch == '\r' || ch == '\n') + charClass[ch] = ccNewLine; + else if (ch < 0x20 || ch == ' ') + charClass[ch] = ccSpace; + else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) + charClass[ch] = ccWord; + else + charClass[ch] = ccPunctuation; + } +} + +void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { + // Apply the newCharClass to the specifed chars + if (chars) { + while (*chars) { + charClass[*chars] = static_cast(newCharClass); + chars++; + } + } +} diff --git a/sdk/wxscintilla/src/scintilla/src/CharClassify.h b/sdk/wxscintilla/src/scintilla/src/CharClassify.h new file mode 100644 index 0000000000..d26f4b34bb --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CharClassify.h @@ -0,0 +1,25 @@ +// Scintilla source code edit control +/** @file CharClassify.h + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CHARCLASSIFY_H +#define CHARCLASSIFY_H + +class CharClassify { +public: + CharClassify(); + + enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, cc newCharClass); + cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} + bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} + +private: + enum { maxChar=256 }; + unsigned char charClass[maxChar]; // not type cc to save space +}; +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/CharacterSet.h b/sdk/wxscintilla/src/scintilla/src/CharacterSet.h new file mode 100644 index 0000000000..764ee64264 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/CharacterSet.h @@ -0,0 +1,58 @@ +// Scintilla source code edit control +/** @file CharacterSet.h + ** Encapsulates a set of characters. Used to test if a character is within a set. + **/ +// Copyright 2007 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +class CharacterSet { + int size; + bool valueAfter; + bool *bset; +public: + enum setBase { + setNone=0, + setLower=1, + setUpper=2, + setDigits=4, + setAlpha=setLower|setUpper, + setAlphaNum=setAlpha|setDigits + }; + CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false) { + size = size_; + valueAfter = valueAfter_; + bset = new bool[size]; + for (int i=0; i < size; i++) { + bset[i] = false; + } + AddString(initialSet); + if (base & setLower) + AddString("abcdefghijklmnopqrstuvwxyz"); + if (base & setUpper) + AddString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); + if (base & setDigits) + AddString("0123456789"); + } + ~CharacterSet() { + delete []bset; + bset = 0; + size = 0; + } + void Add(int val) { + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + void AddString(const char *CharacterSet) { + for (const char *cp=CharacterSet; *cp; cp++) { + int val = static_cast(*cp); + PLATFORM_ASSERT(val >= 0); + PLATFORM_ASSERT(val < size); + bset[val] = true; + } + } + bool Contains(int val) const { + PLATFORM_ASSERT(val >= 0); + return (val < size) ? bset[val] : valueAfter; + } +}; diff --git a/sdk/wxscintilla/src/scintilla/src/ContractionState.cxx b/sdk/wxscintilla/src/scintilla/src/ContractionState.cxx new file mode 100644 index 0000000000..894bf3e890 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/ContractionState.cxx @@ -0,0 +1,293 @@ +// Scintilla source code edit control +/** @file ContractionState.cxx + ** Manages visibility of lines for folding. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "ContractionState.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +OneLine::OneLine() { + displayLine = 0; + //docLine = 0; + visible = true; + height = 1; + expanded = true; +} + +ContractionState::ContractionState() { + lines = 0; + size = 0; + linesInDoc = 1; + linesInDisplay = 1; + valid = false; + docLines = 0; + sizeDocLines = 0; +} + +ContractionState::~ContractionState() { + Clear(); +} + +void ContractionState::MakeValid() const { + if (!valid) { + // Could be cleverer by keeping the index of the last still valid entry + // rather than invalidating all. + linesInDisplay = 0; + for (int lineInDoc=0; lineInDoc= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].displayLine; + } + return -1; +} + +int ContractionState::DocFromDisplay(int lineDisplay) const { + if (lineDisplay <= 0) + return 0; + if (lineDisplay >= linesInDisplay) + return linesInDoc; + if (size == 0) + return lineDisplay; + MakeValid(); + if (docLines) { // Valid allocation + return docLines[lineDisplay]; + } else { + return 0; + } +} + +void ContractionState::Grow(int sizeNew) { + OneLine *linesNew = new OneLine[sizeNew]; + if (linesNew) { + int i = 0; + for (; i < size; i++) { + linesNew[i] = lines[i]; + } + for (; i < sizeNew; i++) { + linesNew[i].displayLine = i; + } + delete []lines; + lines = linesNew; + size = sizeNew; + valid = false; + } else { + Platform::DebugPrintf("No memory available\n"); + // TODO: Blow up + } +} + +void ContractionState::InsertLines(int lineDoc, int lineCount) { + if (size == 0) { + linesInDoc += lineCount; + linesInDisplay += lineCount; + return; + } + //Platform::DebugPrintf("InsertLine[%d] = %d\n", lineDoc); + if ((linesInDoc + lineCount + 2) >= size) { + Grow(linesInDoc + lineCount + growSize); + } + linesInDoc += lineCount; + for (int i = linesInDoc; i >= lineDoc + lineCount; i--) { + lines[i].visible = lines[i - lineCount].visible; + lines[i].height = lines[i - lineCount].height; + linesInDisplay += lines[i].height; + lines[i].expanded = lines[i - lineCount].expanded; + } + for (int d=0;d= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].visible; + } else { + return false; + } +} + +bool ContractionState::SetVisible(int lineDocStart, int lineDocEnd, bool visible) { + if (lineDocStart == 0) + lineDocStart++; + if (lineDocStart > lineDocEnd) + return false; + if (size == 0) { + Grow(linesInDoc + growSize); + } + // TODO: modify docLine members to mirror displayLine + int delta = 0; + // Change lineDocs + if ((lineDocStart <= lineDocEnd) && (lineDocStart >= 0) && (lineDocEnd < linesInDoc)) { + for (int line=lineDocStart; line <= lineDocEnd; line++) { + if (lines[line].visible != visible) { + delta += visible ? lines[line].height : -lines[line].height; + lines[line].visible = visible; + valid = false; + } + } + } + linesInDisplay += delta; + return delta != 0; +} + +bool ContractionState::GetExpanded(int lineDoc) const { + if (size == 0) + return true; + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].expanded; + } else { + return false; + } +} + +bool ContractionState::SetExpanded(int lineDoc, bool expanded) { + if (size == 0) { + if (expanded) { + // If in completely expanded state then setting + // one line to expanded has no effect. + return false; + } + Grow(linesInDoc + growSize); + } + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + if (lines[lineDoc].expanded != expanded) { + lines[lineDoc].expanded = expanded; + return true; + } + } + return false; +} + +int ContractionState::GetHeight(int lineDoc) const { + if (size == 0) + return 1; + if ((lineDoc >= 0) && (lineDoc < linesInDoc)) { + return lines[lineDoc].height; + } else { + return 1; + } +} + +// Set the number of display lines needed for this line. +// Return true if this is a change. +bool ContractionState::SetHeight(int lineDoc, int height) { + if (lineDoc > linesInDoc) + return false; + if (size == 0) { + if (height == 1) { + // If in completely expanded state then all lines + // assumed to have height of one so no effect here. + return false; + } + Grow(linesInDoc + growSize); + } + if (lines[lineDoc].height != height) { + lines[lineDoc].height = height; + valid = false; + return true; + } else { + return false; + } +} + +void ContractionState::ShowAll() { + delete []lines; + lines = 0; + size = 0; + + delete []docLines; + docLines = 0; + sizeDocLines = 0; + + linesInDisplay = linesInDoc; +} diff --git a/sdk/wxscintilla/src/scintilla/src/ContractionState.h b/sdk/wxscintilla/src/scintilla/src/ContractionState.h new file mode 100644 index 0000000000..01e17a1282 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/ContractionState.h @@ -0,0 +1,73 @@ +// Scintilla source code edit control +/** @file ContractionState.h + ** Manages visibility of lines for folding. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CONTRACTIONSTATE_H +#define CONTRACTIONSTATE_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class OneLine { +public: + int displayLine; ///< Position within set of visible lines + //int docLine; ///< Inverse of @a displayLine + int height; ///< Number of display lines needed to show all of the line + bool visible; + bool expanded; + + OneLine(); + virtual ~OneLine() {} +}; + +/** + */ +class ContractionState { + void Grow(int sizeNew); + enum { growSize = 4000 }; + int linesInDoc; + mutable int linesInDisplay; + mutable OneLine *lines; + int size; + mutable int *docLines; + mutable int sizeDocLines; + mutable bool valid; + void MakeValid() const; + +public: + ContractionState(); + virtual ~ContractionState(); + + void Clear(); + + int LinesInDoc() const; + int LinesDisplayed() const; + int DisplayFromDoc(int lineDoc) const; + int DocFromDisplay(int lineDisplay) const; + + void InsertLines(int lineDoc, int lineCount); + void DeleteLines(int lineDoc, int lineCount); + + bool GetVisible(int lineDoc) const; + bool SetVisible(int lineDocStart, int lineDocEnd, bool visible); + + bool GetExpanded(int lineDoc) const; + bool SetExpanded(int lineDoc, bool expanded); + + int GetHeight(int lineDoc) const; + bool SetHeight(int lineDoc, int height); + + void ShowAll(); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/Decoration.cxx b/sdk/wxscintilla/src/scintilla/src/Decoration.cxx new file mode 100644 index 0000000000..cb84e26d11 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Decoration.cxx @@ -0,0 +1,188 @@ +/** @file Decoration.cxx + ** Visual elements added over text. + **/ +// Copyright 1998-2007 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "Decoration.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +Decoration::Decoration(int indicator_) : next(0), indicator(indicator_) { +} + +Decoration::~Decoration() { +} + +bool Decoration::Empty() { + return rs.starts->Partitions() == 1; +} + +DecorationList::DecorationList() : currentIndicator(0), currentValue(1), current(0), + lengthDocument(0), root(0), clickNotified(false) { +} + +DecorationList::~DecorationList() { + Decoration *deco = root; + while (deco) { + Decoration *decoNext = deco->next; + delete deco; + deco = decoNext; + } + root = 0; + current = 0; +} + +Decoration *DecorationList::DecorationFromIndicator(int indicator) { + for (Decoration *deco=root; deco; deco = deco->next) { + if (deco->indicator == indicator) { + return deco; + } + } + return 0; +} + +Decoration *DecorationList::Create(int indicator, int length) { + currentIndicator = indicator; + Decoration *decoNew = new Decoration(indicator); + decoNew->rs.InsertSpace(0, length); + + Decoration *decoPrev = 0; + Decoration *deco = root; + + while (deco && (deco->indicator < indicator)) { + decoPrev = deco; + deco = deco->next; + } + if (decoPrev == 0) { + decoNew->next = root; + root = decoNew; + } else { + decoNew->next = deco; + decoPrev->next = decoNew; + } + return decoNew; +} + +void DecorationList::Delete(int indicator) { + Decoration *decoToDelete = 0; + if (root) { + if (root->indicator == indicator) { + decoToDelete = root; + root = root->next; + } else { + Decoration *deco=root; + while (deco->next && !decoToDelete) { + if (deco->next && deco->next->indicator == indicator) { + decoToDelete = deco->next; + deco->next = decoToDelete->next; + } else { + deco = deco->next; + } + } + } + } + if (decoToDelete) { + delete decoToDelete; + current = 0; + } +} + +void DecorationList::SetCurrentIndicator(int indicator) { + currentIndicator = indicator; + current = DecorationFromIndicator(indicator); + currentValue = 1; +} + +void DecorationList::SetCurrentValue(int value) { + currentValue = value ? value : 1; +} + +bool DecorationList::FillRange(int &position, int value, int &fillLength) { + if (!current) { + current = DecorationFromIndicator(currentIndicator); + if (!current) { + current = Create(currentIndicator, lengthDocument); + } + } + bool changed = current->rs.FillRange(position, value, fillLength); + if (current->Empty()) { + Delete(currentIndicator); + } + return changed; +} + +void DecorationList::InsertSpace(int position, int insertLength) { + lengthDocument += insertLength; + for (Decoration *deco=root; deco; deco = deco->next) { + deco->rs.InsertSpace(position, insertLength); + } +} + +void DecorationList::DeleteRange(int position, int deleteLength) { + lengthDocument -= deleteLength; + Decoration *deco; + for (deco=root; deco; deco = deco->next) { + deco->rs.DeleteRange(position, deleteLength); + } + DeleteAnyEmpty(); +} + +void DecorationList::DeleteAnyEmpty() { + Decoration *deco = root; + while (deco) { + if (deco->Empty()) { + Delete(deco->indicator); + deco = root; + } else { + deco = deco->next; + } + } +} + +int DecorationList::AllOnFor(int position) { + int mask = 0; + for (Decoration *deco=root; deco; deco = deco->next) { + if (deco->rs.ValueAt(position)) { + mask |= 1 << deco->indicator; + } + } + return mask; +} + +int DecorationList::ValueAt(int indicator, int position) { + Decoration *deco = DecorationFromIndicator(indicator); + if (deco) { + return deco->rs.ValueAt(position); + } + return 0; +} + +int DecorationList::Start(int indicator, int position) { + Decoration *deco = DecorationFromIndicator(indicator); + if (deco) { + return deco->rs.StartRun(position); + } + return 0; +} + +int DecorationList::End(int indicator, int position) { + Decoration *deco = DecorationFromIndicator(indicator); + if (deco) { + return deco->rs.EndRun(position); + } + return 0; +} diff --git a/sdk/wxscintilla/src/scintilla/src/Decoration.h b/sdk/wxscintilla/src/scintilla/src/Decoration.h new file mode 100644 index 0000000000..25c28e5c05 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Decoration.h @@ -0,0 +1,64 @@ +/** @file Decoration.h + ** Visual elements added over text. + **/ +// Copyright 1998-2007 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef DECORATION_H +#define DECORATION_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +class Decoration { +public: + Decoration *next; + RunStyles rs; + int indicator; + + Decoration(int indicator_); + ~Decoration(); + + bool Empty(); +}; + +class DecorationList { + int currentIndicator; + int currentValue; + Decoration *current; + int lengthDocument; + Decoration *DecorationFromIndicator(int indicator); + Decoration *Create(int indicator, int length); + void Delete(int indicator); + void DeleteAnyEmpty(); +public: + Decoration *root; + bool clickNotified; + + DecorationList(); + ~DecorationList(); + + void SetCurrentIndicator(int indicator); + int GetCurrentIndicator() { return currentIndicator; } + + void SetCurrentValue(int value); + int GetCurrentValue() { return currentValue; } + + // Returns true if some values may have changed + bool FillRange(int &position, int value, int &fillLength); + + void InsertSpace(int position, int insertLength); + void DeleteRange(int position, int deleteLength); + + int AllOnFor(int position); + int ValueAt(int indicator, int position); + int Start(int indicator, int position); + int End(int indicator, int position); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/Document.cxx b/sdk/wxscintilla/src/scintilla/src/Document.cxx new file mode 100644 index 0000000000..6f3b66487f --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Document.cxx @@ -0,0 +1,1580 @@ +// Scintilla source code edit control +/** @file Document.cxx + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "CellBuffer.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "Document.h" +#include "RESearch.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +// This is ASCII specific but is safe with chars >= 0x80 +static inline bool isspacechar(unsigned char ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +static inline bool IsPunctuation(char ch) { + return isascii(ch) && ispunct(ch); +} + +static inline bool IsADigit(char ch) { + return isascii(ch) && isdigit(ch); +} + +static inline bool IsLowerCase(char ch) { + return isascii(ch) && islower(ch); +} + +static inline bool IsUpperCase(char ch) { + return isascii(ch) && isupper(ch); +} + +Document::Document() { + refCount = 0; +#ifdef unix + eolMode = SC_EOL_LF; +#else + eolMode = SC_EOL_CRLF; +#endif + dbcsCodePage = 0; + stylingBits = 5; + stylingBitsMask = 0x1F; + stylingMask = 0; + endStyled = 0; + styleClock = 0; + enteredModification = 0; + enteredStyling = 0; + enteredReadOnlyCount = 0; + tabInChars = 8; + indentInChars = 0; + actualIndentInChars = 8; + useTabs = true; + tabIndents = true; + backspaceUnindents = false; + watchers = 0; + lenWatchers = 0; + + matchesValid = false; + pre = 0; + substituted = 0; +} + +Document::~Document() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyDeleted(this, watchers[i].userData); + } + delete []watchers; + watchers = 0; + lenWatchers = 0; + delete pre; + pre = 0; + delete []substituted; + substituted = 0; +} + +// Increase reference count and return its previous value. +int Document::AddRef() { + return refCount++; +} + +// Decrease reference count and return its previous value. +// Delete the document if reference count reaches zero. +int Document::Release() { + int curRefCount = --refCount; + if (curRefCount == 0) + delete this; + return curRefCount; +} + +void Document::SetSavePoint() { + cb.SetSavePoint(); + NotifySavePoint(true); +} + +int Document::AddMark(int line, int markerNum) { + int prev = cb.AddMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); + return prev; +} + +void Document::AddMarkSet(int line, int valueSet) { + unsigned int m = valueSet; + for (int i = 0; m; i++, m >>= 1) + if (m & 1) + cb.AddMark(line, i); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMark(int line, int markerNum) { + cb.DeleteMark(line, markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, 0, line); + mh.line = line; + NotifyModified(mh); +} + +void Document::DeleteMarkFromHandle(int markerHandle) { + cb.DeleteMarkFromHandle(markerHandle); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +void Document::DeleteAllMarks(int markerNum) { + cb.DeleteAllMarks(markerNum); + DocModification mh(SC_MOD_CHANGEMARKER, 0, 0, 0, 0); + mh.line = -1; + NotifyModified(mh); +} + +int Document::LineStart(int line) { + return cb.LineStart(line); +} + +int Document::LineEnd(int line) { + if (line == LinesTotal() - 1) { + return LineStart(line + 1); + } else { + int position = LineStart(line + 1) - 1; + // When line terminator is CR+LF, may need to go back one more + if ((position > LineStart(line)) && (cb.CharAt(position - 1) == '\r')) { + position--; + } + return position; + } +} + +int Document::LineFromPosition(int pos) { + return cb.LineFromPosition(pos); +} + +int Document::LineEndPosition(int position) { + return LineEnd(LineFromPosition(position)); +} + +int Document::VCHomePosition(int position) { + int line = LineFromPosition(position); + int startPosition = LineStart(line); + int endLine = LineStart(line + 1) - 1; + int startText = startPosition; + while (startText < endLine && (cb.CharAt(startText) == ' ' || cb.CharAt(startText) == '\t' ) ) + startText++; + if (position == startText) + return startPosition; + else + return startText; +} + +int Document::SetLevel(int line, int level) { + int prev = cb.SetLevel(line, level); + if (prev != level) { + DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, + LineStart(line), 0, 0, 0); + mh.line = line; + mh.foldLevelNow = level; + mh.foldLevelPrev = prev; + NotifyModified(mh); + } + return prev; +} + +static bool IsSubordinate(int levelStart, int levelTry) { + if (levelTry & SC_FOLDLEVELWHITEFLAG) + return true; + else + return (levelStart & SC_FOLDLEVELNUMBERMASK) < (levelTry & SC_FOLDLEVELNUMBERMASK); +} + +int Document::GetLastChild(int lineParent, int level) { + if (level == -1) + level = GetLevel(lineParent) & SC_FOLDLEVELNUMBERMASK; + int maxLine = LinesTotal(); + int lineMaxSubord = lineParent; + while (lineMaxSubord < maxLine - 1) { + EnsureStyledTo(LineStart(lineMaxSubord + 2)); + if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) + break; + lineMaxSubord++; + } + if (lineMaxSubord > lineParent) { + if (level > (GetLevel(lineMaxSubord + 1) & SC_FOLDLEVELNUMBERMASK)) { + // Have chewed up some whitespace that belongs to a parent so seek back + if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { + lineMaxSubord--; + } + } + } + return lineMaxSubord; +} + +int Document::GetFoldParent(int line) { + int level = GetLevel(line) & SC_FOLDLEVELNUMBERMASK; + int lineLook = line - 1; + while ((lineLook > 0) && ( + (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) >= level)) + ) { + lineLook--; + } + if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && + ((GetLevel(lineLook) & SC_FOLDLEVELNUMBERMASK) < level)) { + return lineLook; + } else { + return -1; + } +} + +int Document::ClampPositionIntoDocument(int pos) { + return Platform::Clamp(pos, 0, Length()); +} + +bool Document::IsCrLf(int pos) { + if (pos < 0) + return false; + if (pos >= (Length() - 1)) + return false; + return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); +} + +static const int maxBytesInDBCSCharacter=5; + +int Document::LenChar(int pos) { + if (pos < 0) { + return 1; + } else if (IsCrLf(pos)) { + return 2; + } else if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + if (ch < 0x80) + return 1; + int len = 2; + if (ch >= (0x80 + 0x40 + 0x20 + 0x10)) + len = 4; + else if (ch >= (0x80 + 0x40 + 0x20)) + len = 3; + int lengthDoc = Length(); + if ((pos + len) > lengthDoc) + return lengthDoc -pos; + else + return len; + } else if (dbcsCodePage) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for (i=0; i= Length()) + return Length(); + + // PLATFORM_ASSERT(pos > 0 && pos < Length()); + if (checkLineEnd && IsCrLf(pos - 1)) { + if (moveDir > 0) + return pos + 1; + else + return pos - 1; + } + + // Not between CR and LF + + if (dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { + unsigned char ch = static_cast(cb.CharAt(pos)); + while ((pos > 0) && (pos < Length()) && (ch >= 0x80) && (ch < (0x80 + 0x40))) { + // ch is a trail byte + if (moveDir > 0) + pos++; + else + pos--; + ch = static_cast(cb.CharAt(pos)); + } + } else { + // Anchor DBCS calculations at start of line because start of line can + // not be a DBCS trail byte. + int posCheck = LineStart(LineFromPosition(pos)); + while (posCheck < pos) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for(i=0;i pos) { + if (moveDir > 0) { + return posCheck + mbsize; + } else { + return posCheck; + } + } + posCheck += mbsize; + } + } + } + + return pos; +} + +void Document::ModifiedAt(int pos) { + if (endStyled > pos) + endStyled = pos; +} + +void Document::CheckReadOnly() { + if (cb.IsReadOnly() && enteredReadOnlyCount == 0) { + enteredReadOnlyCount++; + NotifyModifyAttempt(); + enteredReadOnlyCount--; + } +} + +// Document only modified by gateways DeleteChars, InsertString, Undo, Redo, and SetStyleAt. +// SetStyleAt does not change the persistent state of a document + +bool Document::DeleteChars(int pos, int len) { + if (len == 0) + return false; + if ((pos + len) > Length()) + return false; + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, + pos, len, + 0, 0)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.DeleteChars(pos, len, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + if ((pos < Length()) || (pos == 0)) + ModifiedAt(pos); + else + ModifiedAt(pos-1); + NotifyModified( + DocModification( + SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + pos, len, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +/** + * Insert a string with a length. + */ +bool Document::InsertString(int position, const char *s, int insertLength) { + if (insertLength <= 0) { + return false; + } + CheckReadOnly(); + if (enteredModification != 0) { + return false; + } else { + enteredModification++; + if (!cb.IsReadOnly()) { + NotifyModified( + DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, + position, insertLength, + 0, s)); + int prevLinesTotal = LinesTotal(); + bool startSavePoint = cb.IsSavePoint(); + bool startSequence = false; + const char *text = cb.InsertString(position, s, insertLength, startSequence); + if (startSavePoint && cb.IsCollectingUndo()) + NotifySavePoint(!startSavePoint); + ModifiedAt(position); + NotifyModified( + DocModification( + SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), + position, insertLength, + LinesTotal() - prevLinesTotal, text)); + } + enteredModification--; + } + return !cb.IsReadOnly(); +} + +int Document::Undo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartUndo(); + //Platform::DebugPrintf("Steps=%d\n", steps); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetUndoStep(); + if (action.at == removeAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); + } + cb.PerformUndoStep(); + int cellPosition = action.position; + ModifiedAt(cellPosition); + newPos = cellPosition; + + int modFlags = SC_PERFORMED_UNDO; + // With undo, an insertion action becomes a deletion notification + if (action.at == removeAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified(DocModification(modFlags, cellPosition, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +int Document::Redo() { + int newPos = -1; + CheckReadOnly(); + if (enteredModification == 0) { + enteredModification++; + if (!cb.IsReadOnly()) { + bool startSavePoint = cb.IsSavePoint(); + bool multiLine = false; + int steps = cb.StartRedo(); + for (int step = 0; step < steps; step++) { + const int prevLinesTotal = LinesTotal(); + const Action &action = cb.GetRedoStep(); + if (action.at == insertAction) { + NotifyModified(DocModification( + SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); + } else { + NotifyModified(DocModification( + SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); + } + cb.PerformRedoStep(); + ModifiedAt(action.position); + newPos = action.position; + + int modFlags = SC_PERFORMED_REDO; + if (action.at == insertAction) { + newPos += action.lenData; + modFlags |= SC_MOD_INSERTTEXT; + } else { + modFlags |= SC_MOD_DELETETEXT; + } + if (steps > 1) + modFlags |= SC_MULTISTEPUNDOREDO; + const int linesAdded = LinesTotal() - prevLinesTotal; + if (linesAdded != 0) + multiLine = true; + if (step == steps - 1) { + modFlags |= SC_LASTSTEPINUNDOREDO; + if (multiLine) + modFlags |= SC_MULTILINEUNDOREDO; + } + NotifyModified( + DocModification(modFlags, action.position, action.lenData, + linesAdded, action.data)); + } + + bool endSavePoint = cb.IsSavePoint(); + if (startSavePoint != endSavePoint) + NotifySavePoint(endSavePoint); + } + enteredModification--; + } + return newPos; +} + +/** + * Insert a single character. + */ +bool Document::InsertChar(int pos, char ch) { + char chs[1]; + chs[0] = ch; + return InsertString(pos, chs, 1); +} + +/** + * Insert a null terminated string. + */ +bool Document::InsertCString(int position, const char *s) { + return InsertString(position, s, strlen(s)); +} + +void Document::ChangeChar(int pos, char ch) { + DeleteChars(pos, 1); + InsertChar(pos, ch); +} + +void Document::DelChar(int pos) { + DeleteChars(pos, LenChar(pos)); +} + +void Document::DelCharBack(int pos) { + if (pos <= 0) { + return; + } else if (IsCrLf(pos - 2)) { + DeleteChars(pos - 2, 2); + } else if (dbcsCodePage) { + int startChar = MovePositionOutsideChar(pos - 1, -1, false); + DeleteChars(startChar, pos - startChar); + } else { + DeleteChars(pos - 1, 1); + } +} + +static bool isindentchar(char ch) { + return (ch == ' ') || (ch == '\t'); +} + +static int NextTab(int pos, int tabSize) { + return ((pos / tabSize) + 1) * tabSize; +} + +static void CreateIndentation(char *linebuf, int length, int indent, int tabSize, bool insertSpaces) { + length--; // ensure space for \0 + if (!insertSpaces) { + while ((indent >= tabSize) && (length > 0)) { + *linebuf++ = '\t'; + indent -= tabSize; + length--; + } + } + while ((indent > 0) && (length > 0)) { + *linebuf++ = ' '; + indent--; + length--; + } + *linebuf = '\0'; +} + +int Document::GetLineIndentation(int line) { + int indent = 0; + if ((line >= 0) && (line < LinesTotal())) { + int lineStart = LineStart(line); + int length = Length(); + for (int i = lineStart;i < length;i++) { + char ch = cb.CharAt(i); + if (ch == ' ') + indent++; + else if (ch == '\t') + indent = NextTab(indent, tabInChars); + else + return indent; + } + } + return indent; +} + +void Document::SetLineIndentation(int line, int indent) { + int indentOfLine = GetLineIndentation(line); + if (indent < 0) + indent = 0; + if (indent != indentOfLine) { + char linebuf[1000]; + CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs); + int thisLineStart = LineStart(line); + int indentPos = GetLineIndentPosition(line); + BeginUndoAction(); + DeleteChars(thisLineStart, indentPos - thisLineStart); + InsertCString(thisLineStart, linebuf); + EndUndoAction(); + } +} + +int Document::GetLineIndentPosition(int line) { + if (line < 0) + return 0; + int pos = LineStart(line); + int length = Length(); + while ((pos < length) && isindentchar(cb.CharAt(pos))) { + pos++; + } + return pos; +} + +int Document::GetColumn(int pos) { + int column = 0; + int line = LineFromPosition(pos); + if ((line >= 0) && (line < LinesTotal())) { + for (int i = LineStart(line);i < pos;) { + char ch = cb.CharAt(i); + if (ch == '\t') { + column = NextTab(column, tabInChars); + i++; + } else if (ch == '\r') { + return column; + } else if (ch == '\n') { + return column; + } else if (i >= Length()) { + return column; + } else { + column++; + i = MovePositionOutsideChar(i + 1, 1, false); + } + } + } + return column; +} + +int Document::FindColumn(int line, int column) { + int position = LineStart(line); + int columnCurrent = 0; + if ((line >= 0) && (line < LinesTotal())) { + while ((columnCurrent < column) && (position < Length())) { + char ch = cb.CharAt(position); + if (ch == '\t') { + columnCurrent = NextTab(columnCurrent, tabInChars); + position++; + } else if (ch == '\r') { + return position; + } else if (ch == '\n') { + return position; + } else { + columnCurrent++; + position = MovePositionOutsideChar(position + 1, 1, false); + } + } + } + return position; +} + +void Document::Indent(bool forwards, int lineBottom, int lineTop) { + // Dedent - suck white space off the front of the line to dedent by equivalent of a tab + for (int line = lineBottom; line >= lineTop; line--) { + int indentOfLine = GetLineIndentation(line); + if (forwards) { + if (LineStart(line) < LineEnd(line)) { + SetLineIndentation(line, indentOfLine + IndentSize()); + } + } else { + SetLineIndentation(line, indentOfLine - IndentSize()); + } + } +} + +// Convert line endings for a piece of text to a particular mode. +// Stop at len or when a NUL is found. +// Caller must delete the returned pointer. +char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { + char *dest = new char[2 * len + 1]; + const char *sptr = s; + char *dptr = dest; + for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { + if (*sptr == '\n' || *sptr == '\r') { + if (eolMode == SC_EOL_CR) { + *dptr++ = '\r'; + } else if (eolMode == SC_EOL_LF) { + *dptr++ = '\n'; + } else { // eolMode == SC_EOL_CRLF + *dptr++ = '\r'; + *dptr++ = '\n'; + } + if ((*sptr == '\r') && (i+1 < len) && (*(sptr+1) == '\n')) { + i++; + sptr++; + } + sptr++; + } else { + *dptr++ = *sptr++; + } + } + *dptr++ = '\0'; + *pLenOut = (dptr - dest) - 1; + return dest; +} + +void Document::ConvertLineEnds(int eolModeSet) { + BeginUndoAction(); + + for (int pos = 0; pos < Length(); pos++) { + if (cb.CharAt(pos) == '\r') { + if (cb.CharAt(pos + 1) == '\n') { + // CRLF + if (eolModeSet == SC_EOL_CR) { + DeleteChars(pos + 1, 1); // Delete the LF + } else if (eolModeSet == SC_EOL_LF) { + DeleteChars(pos, 1); // Delete the CR + } else { + pos++; + } + } else { + // CR + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos + 1, "\n", 1); // Insert LF + pos++; + } else if (eolModeSet == SC_EOL_LF) { + InsertString(pos, "\n", 1); // Insert LF + DeleteChars(pos + 1, 1); // Delete CR + } + } + } else if (cb.CharAt(pos) == '\n') { + // LF + if (eolModeSet == SC_EOL_CRLF) { + InsertString(pos, "\r", 1); // Insert CR + pos++; + } else if (eolModeSet == SC_EOL_CR) { + InsertString(pos, "\r", 1); // Insert CR + DeleteChars(pos + 1, 1); // Delete LF + } + } + } + + EndUndoAction(); +} + +bool Document::IsWhiteLine(int line) { + int currentChar = LineStart(line); + int endLine = LineEnd(line); + while (currentChar < endLine) { + if (cb.CharAt(currentChar) != ' ' && cb.CharAt(currentChar) != '\t') { + return false; + } + ++currentChar; + } + return true; +} + +int Document::ParaUp(int pos) { + int line = LineFromPosition(pos); + line--; + while (line >= 0 && IsWhiteLine(line)) { // skip empty lines + line--; + } + while (line >= 0 && !IsWhiteLine(line)) { // skip non-empty lines + line--; + } + line++; + return LineStart(line); +} + +int Document::ParaDown(int pos) { + int line = LineFromPosition(pos); + while (line < LinesTotal() && !IsWhiteLine(line)) { // skip non-empty lines + line++; + } + while (line < LinesTotal() && IsWhiteLine(line)) { // skip empty lines + line++; + } + if (line < LinesTotal()) + return LineStart(line); + else // end of a document + return LineEnd(line-1); +} + +CharClassify::cc Document::WordCharClass(unsigned char ch) { + if ((SC_CP_UTF8 == dbcsCodePage) && (ch >= 0x80)) + return CharClassify::ccWord; + return charClass.GetClass(ch); +} + +/** + * Used by commmands that want to select whole words. + * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. + */ +int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { + CharClassify::cc ccStart = CharClassify::ccWord; + if (delta < 0) { + if (!onlyWordCharacters) + ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) + pos--; + } else { + if (!onlyWordCharacters && pos < Length()) + ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + } + return MovePositionOutsideChar(pos, delta); +} + +/** + * Find the start of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordStart(int pos, int delta) { + if (delta < 0) { + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace)) + pos--; + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart)) { + pos--; + } + } + } else { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart)) + pos++; + while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace)) + pos++; + } + return pos; +} + +/** + * Find the end of the next word in either a forward (delta >= 0) or backwards direction + * (delta < 0). + * This is looking for a transition between character classes although there is also some + * additional movement to transit white space. + * Used by cursor movement by word commands. + */ +int Document::NextWordEnd(int pos, int delta) { + if (delta < 0) { + if (pos > 0) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos-1)); + if (ccStart != CharClassify::ccSpace) { + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == ccStart) { + pos--; + } + } + while (pos > 0 && WordCharClass(cb.CharAt(pos - 1)) == CharClassify::ccSpace) { + pos--; + } + } + } else { + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == CharClassify::ccSpace) { + pos++; + } + if (pos < Length()) { + CharClassify::cc ccStart = WordCharClass(cb.CharAt(pos)); + while (pos < Length() && WordCharClass(cb.CharAt(pos)) == ccStart) { + pos++; + } + } + } + return pos; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the previous character is of a different character class. + */ +bool Document::IsWordStartAt(int pos) { + if (pos > 0) { + CharClassify::cc ccPos = WordCharClass(CharAt(pos)); + return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) && + (ccPos != WordCharClass(CharAt(pos - 1))); + } + return true; +} + +/** + * Check that the character at the given position is a word or punctuation character and that + * the next character is of a different character class. + */ +bool Document::IsWordEndAt(int pos) { + if (pos < Length()) { + CharClassify::cc ccPrev = WordCharClass(CharAt(pos-1)); + return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) && + (ccPrev != WordCharClass(CharAt(pos))); + } + return true; +} + +/** + * Check that the given range is has transitions between character classes at both + * ends and where the characters on the inside are word or punctuation characters. + */ +bool Document::IsWordAt(int start, int end) { + return IsWordStartAt(start) && IsWordEndAt(end); +} + +// The comparison and case changing functions here assume ASCII +// or extended ASCII such as the normal Windows code page. + +static inline char MakeUpperCase(char ch) { + if (ch < 'a' || ch > 'z') + return ch; + else + return static_cast(ch - 'a' + 'A'); +} + +static inline char MakeLowerCase(char ch) { + if (ch < 'A' || ch > 'Z') + return ch; + else + return static_cast(ch - 'A' + 'a'); +} + +// Define a way for the Regular Expression code to access the document +class DocumentIndexer : public CharacterIndexer { + Document *pdoc; + int end; +public: + DocumentIndexer(Document *pdoc_, int end_) : + pdoc(pdoc_), end(end_) { + } + + virtual ~DocumentIndexer() { + } + + virtual char CharAt(int index) { + if (index < 0 || index >= end) + return 0; + else + return pdoc->CharAt(index); + } +}; + +/** + * Find text in document, supporting both forward and backward + * searches (just pass minPos > maxPos to do a backward search) + * Has not been tested with backwards DBCS searches yet. + */ +long Document::FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, + int *length) { + if (regExp) { + if (!pre) + pre = new RESearch(&charClass); + if (!pre) + return -1; + + int increment = (minPos <= maxPos) ? 1 : -1; + + int startPos = minPos; + int endPos = maxPos; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + startPos = MovePositionOutsideChar(startPos, 1, false); + endPos = MovePositionOutsideChar(endPos, 1, false); + + const char *errmsg = pre->Compile(s, *length, caseSensitive, posix); + if (errmsg) { + return -1; + } + // Find a variable in a property file: \$(\([A-Za-z0-9_.]+\)) + // Replace first '.' with '-' in each property file variable reference: + // Search: \$(\([A-Za-z0-9_-]+\)\.\([A-Za-z0-9_.]+\)) + // Replace: $(\1-\2) + int lineRangeStart = LineFromPosition(startPos); + int lineRangeEnd = LineFromPosition(endPos); + if ((increment == 1) && + (startPos >= LineEnd(lineRangeStart)) && + (lineRangeStart < lineRangeEnd)) { + // the start position is at end of line or between line end characters. + lineRangeStart++; + startPos = LineStart(lineRangeStart); + } + int pos = -1; + int lenRet = 0; + char searchEnd = s[*length - 1]; + int lineRangeBreak = lineRangeEnd + increment; + for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { + int startOfLine = LineStart(line); + int endOfLine = LineEnd(line); + if (increment == 1) { + if (line == lineRangeStart) { + if ((startPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if start position after start of line + startOfLine = startPos; + } + if (line == lineRangeEnd) { + if ((endPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if end position before end of line + endOfLine = endPos; + } + } else { + if (line == lineRangeEnd) { + if ((endPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if end position after start of line + startOfLine = endPos; + } + if (line == lineRangeStart) { + if ((startPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if start position before end of line + endOfLine = startPos; + } + } + + DocumentIndexer di(this, endOfLine); + int success = pre->Execute(di, startOfLine, endOfLine); + if (success) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + if (increment == -1) { + // Check for the last match on this line. + int repetitions = 1000; // Break out of infinite loop + while (success && (pre->eopat[0] <= endOfLine) && (repetitions--)) { + success = pre->Execute(di, pos+1, endOfLine); + if (success) { + if (pre->eopat[0] <= minPos) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + } else { + success = 0; + } + } + } + } + break; + } + } + *length = lenRet; + return pos; + + } else { + + bool forward = minPos <= maxPos; + int increment = forward ? 1 : -1; + + // Range endpoints should not be inside DBCS characters, but just in case, move them. + int startPos = MovePositionOutsideChar(minPos, increment, false); + int endPos = MovePositionOutsideChar(maxPos, increment, false); + + // Compute actual search ranges needed + int lengthFind = *length; + if (lengthFind == -1) + lengthFind = static_cast(strlen(s)); + int endSearch = endPos; + if (startPos <= endPos) { + endSearch = endPos - lengthFind + 1; + } + //Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind); + char firstChar = s[0]; + if (!caseSensitive) + firstChar = static_cast(MakeUpperCase(firstChar)); + int pos = forward ? startPos : (startPos - 1); + while (forward ? (pos < endSearch) : (pos >= endSearch)) { + char ch = CharAt(pos); + if (caseSensitive) { + if (ch == firstChar) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + if (ch != s[posMatch]) + found = false; + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; + } + } + } else { + if (MakeUpperCase(ch) == firstChar) { + bool found = true; + if (pos + lengthFind > Platform::Maximum(startPos, endPos)) found = false; + for (int posMatch = 1; posMatch < lengthFind && found; posMatch++) { + ch = CharAt(pos + posMatch); + if (MakeUpperCase(ch) != MakeUpperCase(s[posMatch])) + found = false; + } + if (found) { + if ((!word && !wordStart) || + word && IsWordAt(pos, pos + lengthFind) || + wordStart && IsWordStartAt(pos)) + return pos; + } + } + } + pos += increment; + if (dbcsCodePage && (pos >= 0)) { + // Ensure trying to match from start of character + pos = MovePositionOutsideChar(pos, increment, false); + } + } + } + //Platform::DebugPrintf("Not found\n"); + return -1; +} + +const char *Document::SubstituteByPosition(const char *text, int *length) { + if (!pre) + return 0; + delete []substituted; + substituted = 0; + DocumentIndexer di(this, Length()); + if (!pre->GrabMatches(di)) + return 0; + unsigned int lenResult = 0; + for (int i = 0; i < *length; i++) { + if (text[i] == '\\') { + if (text[i + 1] >= '1' && text[i + 1] <= '9') { + unsigned int patNum = text[i + 1] - '0'; + lenResult += pre->eopat[patNum] - pre->bopat[patNum]; + i++; + } else { + switch (text[i + 1]) { + case 'a': + case 'b': + case 'f': + case 'n': + case 'r': + case 't': + case 'v': + i++; + } + lenResult++; + } + } else { + lenResult++; + } + } + substituted = new char[lenResult + 1]; + if (!substituted) + return 0; + char *o = substituted; + for (int j = 0; j < *length; j++) { + if (text[j] == '\\') { + if (text[j + 1] >= '1' && text[j + 1] <= '9') { + unsigned int patNum = text[j + 1] - '0'; + unsigned int len = pre->eopat[patNum] - pre->bopat[patNum]; + if (pre->pat[patNum]) // Will be null if try for a match that did not occur + memcpy(o, pre->pat[patNum], len); + o += len; + j++; + } else { + j++; + switch (text[j]) { + case 'a': + *o++ = '\a'; + break; + case 'b': + *o++ = '\b'; + break; + case 'f': + *o++ = '\f'; + break; + case 'n': + *o++ = '\n'; + break; + case 'r': + *o++ = '\r'; + break; + case 't': + *o++ = '\t'; + break; + case 'v': + *o++ = '\v'; + break; + default: + *o++ = '\\'; + j--; + } + } + } else { + *o++ = text[j]; + } + } + *o = '\0'; + *length = lenResult; + return substituted; +} + +int Document::LinesTotal() { + return cb.Lines(); +} + +void Document::ChangeCase(Range r, bool makeUpperCase) { + for (int pos = r.start; pos < r.end;) { + int len = LenChar(pos); + if (len == 1) { + char ch = CharAt(pos); + if (makeUpperCase) { + if (IsLowerCase(ch)) { + ChangeChar(pos, static_cast(MakeUpperCase(ch))); + } + } else { + if (IsUpperCase(ch)) { + ChangeChar(pos, static_cast(MakeLowerCase(ch))); + } + } + } + pos += len; + } +} + +void Document::SetDefaultCharClasses(bool includeWordClass) { + charClass.SetDefaultCharClasses(includeWordClass); +} + +void Document::SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass) { + charClass.SetCharClasses(chars, newCharClass); +} + +void Document::SetStylingBits(int bits) { + stylingBits = bits; + stylingBitsMask = 0; + for (int bit = 0; bit < stylingBits; bit++) { + stylingBitsMask <<= 1; + stylingBitsMask |= 1; + } +} + +void Document::StartStyling(int position, char mask) { + stylingMask = mask; + endStyled = position; +} + +bool Document::SetStyleFor(int length, char style) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + style &= stylingMask; + int prevEndStyled = endStyled; + if (cb.SetStyleFor(endStyled, length, style, stylingMask)) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + prevEndStyled, length); + NotifyModified(mh); + } + endStyled += length; + enteredStyling--; + return true; + } +} + +bool Document::SetStyles(int length, char *styles) { + if (enteredStyling != 0) { + return false; + } else { + enteredStyling++; + bool didChange = false; + int startMod = 0; + int endMod = 0; + for (int iPos = 0; iPos < length; iPos++, endStyled++) { + PLATFORM_ASSERT(endStyled < Length()); + if (cb.SetStyleAt(endStyled, styles[iPos], stylingMask)) { + if (!didChange) { + startMod = endStyled; + } + didChange = true; + endMod = endStyled; + } + } + if (didChange) { + DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, + startMod, endMod - startMod + 1); + NotifyModified(mh); + } + enteredStyling--; + return true; + } +} + +void Document::EnsureStyledTo(int pos) { + if ((enteredStyling == 0) && (pos > GetEndStyled())) { + IncrementStyleClock(); + // Ask the watchers to style, and stop as soon as one responds. + for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) { + watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos); + } + } +} + +void Document::IncrementStyleClock() { + styleClock++; + if (styleClock > 0x100000) { + styleClock = 0; + } +} + +void Document::DecorationFillRange(int position, int value, int fillLength) { + if (decorations.FillRange(position, value, fillLength)) { + DocModification mh(SC_MOD_CHANGEINDICATOR | SC_PERFORMED_USER, + position, fillLength); + NotifyModified(mh); + } +} + +bool Document::AddWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) + return false; + } + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers + 1]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers; j++) + pwNew[j] = watchers[j]; + pwNew[lenWatchers].watcher = watcher; + pwNew[lenWatchers].userData = userData; + delete []watchers; + watchers = pwNew; + lenWatchers++; + return true; +} + +bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { + for (int i = 0; i < lenWatchers; i++) { + if ((watchers[i].watcher == watcher) && + (watchers[i].userData == userData)) { + if (lenWatchers == 1) { + delete []watchers; + watchers = 0; + lenWatchers = 0; + } else { + WatcherWithUserData *pwNew = new WatcherWithUserData[lenWatchers]; + if (!pwNew) + return false; + for (int j = 0; j < lenWatchers - 1; j++) { + pwNew[j] = (j < i) ? watchers[j] : watchers[j + 1]; + } + delete []watchers; + watchers = pwNew; + lenWatchers--; + } + return true; + } + } + return false; +} + +void Document::NotifyModifyAttempt() { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModifyAttempt(this, watchers[i].userData); + } +} + +void Document::NotifySavePoint(bool atSavePoint) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifySavePoint(this, watchers[i].userData, atSavePoint); + } +} + +void Document::NotifyModified(DocModification mh) { + for (int i = 0; i < lenWatchers; i++) { + watchers[i].watcher->NotifyModified(this, mh, watchers[i].userData); + } +} + +bool Document::IsWordPartSeparator(char ch) { + return (WordCharClass(ch) == CharClassify::ccWord) && IsPunctuation(ch); +} + +int Document::WordPartLeft(int pos) { + if (pos > 0) { + --pos; + char startChar = cb.CharAt(pos); + if (IsWordPartSeparator(startChar)) { + while (pos > 0 && IsWordPartSeparator(cb.CharAt(pos))) { + --pos; + } + } + if (pos > 0) { + startChar = cb.CharAt(pos); + --pos; + if (IsLowerCase(startChar)) { + while (pos > 0 && IsLowerCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + while (pos > 0 && IsUpperCase(cb.CharAt(pos))) + --pos; + if (!IsUpperCase(cb.CharAt(pos))) + ++pos; + } else if (IsADigit(startChar)) { + while (pos > 0 && IsADigit(cb.CharAt(pos))) + --pos; + if (!IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos > 0 && IsPunctuation(cb.CharAt(pos))) + --pos; + if (!IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos > 0 && isspacechar(cb.CharAt(pos))) + --pos; + if (!isspacechar(cb.CharAt(pos))) + ++pos; + } else if (!isascii(startChar)) { + while (pos > 0 && !isascii(cb.CharAt(pos))) + --pos; + if (isascii(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + } + } + return pos; +} + +int Document::WordPartRight(int pos) { + char startChar = cb.CharAt(pos); + int length = Length(); + if (IsWordPartSeparator(startChar)) { + while (pos < length && IsWordPartSeparator(cb.CharAt(pos))) + ++pos; + startChar = cb.CharAt(pos); + } + if (!isascii(startChar)) { + while (pos < length && !isascii(cb.CharAt(pos))) + ++pos; + } else if (IsLowerCase(startChar)) { + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else if (IsUpperCase(startChar)) { + if (IsLowerCase(cb.CharAt(pos + 1))) { + ++pos; + while (pos < length && IsLowerCase(cb.CharAt(pos))) + ++pos; + } else { + while (pos < length && IsUpperCase(cb.CharAt(pos))) + ++pos; + } + if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1))) + --pos; + } else if (IsADigit(startChar)) { + while (pos < length && IsADigit(cb.CharAt(pos))) + ++pos; + } else if (IsPunctuation(startChar)) { + while (pos < length && IsPunctuation(cb.CharAt(pos))) + ++pos; + } else if (isspacechar(startChar)) { + while (pos < length && isspacechar(cb.CharAt(pos))) + ++pos; + } else { + ++pos; + } + return pos; +} + +bool IsLineEndChar(char c) { + return (c == '\n' || c == '\r'); +} + +int Document::ExtendStyleRange(int pos, int delta, bool singleLine) { + int sStart = cb.StyleAt(pos); + if (delta < 0) { + while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos--; + pos++; + } else { + while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos))) ) + pos++; + } + return pos; +} + +static char BraceOpposite(char ch) { + switch (ch) { + case '(': + return ')'; + case ')': + return '('; + case '[': + return ']'; + case ']': + return '['; + case '{': + return '}'; + case '}': + return '{'; + case '<': + return '>'; + case '>': + return '<'; + default: + return '\0'; + } +} + +// TODO: should be able to extend styled region to find matching brace +int Document::BraceMatch(int position, int /*maxReStyle*/) { + char chBrace = CharAt(position); + char chSeek = BraceOpposite(chBrace); + if (chSeek == '\0') + return - 1; + char styBrace = static_cast(StyleAt(position) & stylingBitsMask); + int direction = -1; + if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') + direction = 1; + int depth = 1; + position = position + direction; + while ((position >= 0) && (position < Length())) { + position = MovePositionOutsideChar(position, direction); + char chAtPos = CharAt(position); + char styAtPos = static_cast(StyleAt(position) & stylingBitsMask); + if ((position > GetEndStyled()) || (styAtPos == styBrace)) { + if (chAtPos == chBrace) + depth++; + if (chAtPos == chSeek) + depth--; + if (depth == 0) + return position; + } + position = position + direction; + } + return - 1; +} diff --git a/sdk/wxscintilla/src/scintilla/src/Document.h b/sdk/wxscintilla/src/scintilla/src/Document.h new file mode 100644 index 0000000000..cd31054b1e --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Document.h @@ -0,0 +1,316 @@ +// Scintilla source code edit control +/** @file Document.h + ** Text document that handles notifications, DBCS, styling, words and end of line. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef DOCUMENT_H +#define DOCUMENT_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + * A Position is a position within a document between two characters or at the beginning or end. + * Sometimes used as a character index where it identifies the character after the position. + */ +typedef int Position; +const Position invalidPosition = -1; + +/** + * The range class represents a range of text in a document. + * The two values are not sorted as one end may be more significant than the other + * as is the case for the selection where the end position is the position of the caret. + * If either position is invalidPosition then the range is invalid and most operations will fail. + */ +class Range { +public: + Position start; + Position end; + + Range(Position pos=0) : + start(pos), end(pos) { + }; + Range(Position start_, Position end_) : + start(start_), end(end_) { + }; + + bool Valid() const { + return (start != invalidPosition) && (end != invalidPosition); + } + + // Is the position within the range? + bool Contains(Position pos) const { + if (start < end) { + return (pos >= start && pos <= end); + } else { + return (pos <= start && pos >= end); + } + } + + // Is the character after pos within the range? + bool ContainsCharacter(Position pos) const { + if (start < end) { + return (pos >= start && pos < end); + } else { + return (pos < start && pos >= end); + } + } + + bool Contains(Range other) const { + return Contains(other.start) && Contains(other.end); + } + + bool Overlaps(Range other) const { + return + Contains(other.start) || + Contains(other.end) || + other.Contains(start) || + other.Contains(end); + } +}; + +class DocWatcher; +class DocModification; +class RESearch; + +/** + */ +class Document { + +public: + /** Used to pair watcher pointer with user data. */ + class WatcherWithUserData { + public: + DocWatcher *watcher; + void *userData; + WatcherWithUserData() { + watcher = 0; + userData = 0; + } + }; + + enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; + +private: + int refCount; + CellBuffer cb; + CharClassify charClass; + char stylingMask; + int endStyled; + int styleClock; + int enteredModification; + int enteredStyling; + int enteredReadOnlyCount; + + WatcherWithUserData *watchers; + int lenWatchers; + + bool matchesValid; + RESearch *pre; + char *substituted; + +public: + int stylingBits; + int stylingBitsMask; + + int eolMode; + /// Can also be SC_CP_UTF8 to enable UTF-8 mode + int dbcsCodePage; + int tabInChars; + int indentInChars; + int actualIndentInChars; + bool useTabs; + bool tabIndents; + bool backspaceUnindents; + + DecorationList decorations; + + Document(); + virtual ~Document(); + + int AddRef(); + int Release(); + + int LineFromPosition(int pos); + int ClampPositionIntoDocument(int pos); + bool IsCrLf(int pos); + int LenChar(int pos); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); + + // Gateways to modifying document + void ModifiedAt(int pos); + bool DeleteChars(int pos, int len); + bool InsertString(int position, const char *s, int insertLength); + int Undo(); + int Redo(); + bool CanUndo() { return cb.CanUndo(); } + bool CanRedo() { return cb.CanRedo(); } + void DeleteUndoHistory() { cb.DeleteUndoHistory(); } + bool SetUndoCollection(bool collectUndo) { + return cb.SetUndoCollection(collectUndo); + } + bool IsCollectingUndo() { return cb.IsCollectingUndo(); } + void BeginUndoAction() { cb.BeginUndoAction(); } + void EndUndoAction() { cb.EndUndoAction(); } + void SetSavePoint(); + bool IsSavePoint() { return cb.IsSavePoint(); } + + int GetLineIndentation(int line); + void SetLineIndentation(int line, int indent); + int GetLineIndentPosition(int line); + int GetColumn(int position); + int FindColumn(int line, int column); + void Indent(bool forwards, int lineBottom, int lineTop); + static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); + void ConvertLineEnds(int eolModeSet); + void SetReadOnly(bool set) { cb.SetReadOnly(set); } + bool IsReadOnly() { return cb.IsReadOnly(); } + + bool InsertChar(int pos, char ch); + bool InsertCString(int position, const char *s); + void ChangeChar(int pos, char ch); + void DelChar(int pos); + void DelCharBack(int pos); + + char CharAt(int position) { return cb.CharAt(position); } + void GetCharRange(char *buffer, int position, int lengthRetrieve) { + cb.GetCharRange(buffer, position, lengthRetrieve); + } + char StyleAt(int position) { return cb.StyleAt(position); } + int GetMark(int line) { return cb.GetMark(line); } + int AddMark(int line, int markerNum); + void AddMarkSet(int line, int valueSet); + void DeleteMark(int line, int markerNum); + void DeleteMarkFromHandle(int markerHandle); + void DeleteAllMarks(int markerNum); + int LineFromHandle(int markerHandle) { return cb.LineFromHandle(markerHandle); } + int LineStart(int line); + int LineEnd(int line); + int LineEndPosition(int position); + int VCHomePosition(int position); + + int SetLevel(int line, int level); + int GetLevel(int line) { return cb.GetLevel(line); } + void ClearLevels() { cb.ClearLevels(); } + int GetLastChild(int lineParent, int level=-1); + int GetFoldParent(int line); + + void Indent(bool forwards); + int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); + int NextWordStart(int pos, int delta); + int NextWordEnd(int pos, int delta); + int Length() { return cb.Length(); } + void Allocate(int newSize) { cb.Allocate(newSize); } + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); + long FindText(int iMessage, unsigned long wParam, long lParam); + const char *SubstituteByPosition(const char *text, int *length); + int LinesTotal(); + + void ChangeCase(Range r, bool makeUpperCase); + + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); + void SetStylingBits(int bits); + void StartStyling(int position, char mask); + bool SetStyleFor(int length, char style); + bool SetStyles(int length, char *styles); + int GetEndStyled() { return endStyled; } + void EnsureStyledTo(int pos); + int GetStyleClock() { return styleClock; } + void IncrementStyleClock(); + void DecorationFillRange(int position, int value, int fillLength); + + int SetLineState(int line, int state) { return cb.SetLineState(line, state); } + int GetLineState(int line) { return cb.GetLineState(line); } + int GetMaxLineState() { return cb.GetMaxLineState(); } + + bool AddWatcher(DocWatcher *watcher, void *userData); + bool RemoveWatcher(DocWatcher *watcher, void *userData); + const WatcherWithUserData *GetWatchers() const { return watchers; } + int GetLenWatchers() const { return lenWatchers; } + + bool IsWordPartSeparator(char ch); + int WordPartLeft(int pos); + int WordPartRight(int pos); + int ExtendStyleRange(int pos, int delta, bool singleLine = false); + bool IsWhiteLine(int line); + int ParaUp(int pos); + int ParaDown(int pos); + int IndentSize() { return actualIndentInChars; } + int BraceMatch(int position, int maxReStyle); + +private: + void CheckReadOnly(); + + CharClassify::cc WordCharClass(unsigned char ch); + bool IsWordStartAt(int pos); + bool IsWordEndAt(int pos); + bool IsWordAt(int start, int end); + + void NotifyModifyAttempt(); + void NotifySavePoint(bool atSavePoint); + void NotifyModified(DocModification mh); +}; + +/** + * To optimise processing of document modifications by DocWatchers, a hint is passed indicating the + * scope of the change. + * If the DocWatcher is a document view then this can be used to optimise screen updating. + */ +class DocModification { +public: + int modificationType; + int position; + int length; + int linesAdded; /**< Negative if lines deleted. */ + const char *text; /**< Only valid for changes to text, not for changes to style. */ + int line; + int foldLevelNow; + int foldLevelPrev; + + DocModification(int modificationType_, int position_=0, int length_=0, + int linesAdded_=0, const char *text_=0, int line_=0) : + modificationType(modificationType_), + position(position_), + length(length_), + linesAdded(linesAdded_), + text(text_), + line(line_), + foldLevelNow(0), + foldLevelPrev(0) {} + + DocModification(int modificationType_, const Action &act, int linesAdded_=0) : + modificationType(modificationType_), + position(act.position), + length(act.lenData), + linesAdded(linesAdded_), + text(act.data), + line(0), + foldLevelNow(0), + foldLevelPrev(0) {} +}; + +/** + * A class that wants to receive notifications from a Document must be derived from DocWatcher + * and implement the notification methods. It can then be added to the watcher list with AddWatcher. + */ +class DocWatcher { +public: + virtual ~DocWatcher() {} + + virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; + virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; + virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; + virtual void NotifyDeleted(Document *doc, void *userData) = 0; + virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0; +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.cxx b/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.cxx new file mode 100644 index 0000000000..10c2d9ade1 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.cxx @@ -0,0 +1,200 @@ +// Scintilla source code edit control +/** @file DocumentAccessor.cxx + ** Rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "SVector.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "CellBuffer.h" +#include "Scintilla.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "Document.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +DocumentAccessor::~DocumentAccessor() { +} + +bool DocumentAccessor::InternalIsLeadByte(char ch) { + if (SC_CP_UTF8 == codePage) + // For lexing, all characters >= 0x80 are treated the + // same so none is considered a lead byte. + return false; + else + return Platform::IsDBCSLeadByte(codePage, ch); +} + +void DocumentAccessor::Fill(int position) { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + startPos = position - slopSize; + if (startPos + bufferSize > lenDoc) + startPos = lenDoc - bufferSize; + if (startPos < 0) + startPos = 0; + endPos = startPos + bufferSize; + if (endPos > lenDoc) + endPos = lenDoc; + + pdoc->GetCharRange(buf, startPos, endPos-startPos); + buf[endPos-startPos] = '\0'; +} + +bool DocumentAccessor::Match(int pos, const char *s) { + for (int i=0; *s; i++) { + if (*s != SafeGetCharAt(pos+i)) + return false; + s++; + } + return true; +} + +char DocumentAccessor::StyleAt(int position) { + // Mask off all bits which aren't in the 'mask'. + return static_cast(pdoc->StyleAt(position) & mask); +} + +int DocumentAccessor::GetLine(int position) { + return pdoc->LineFromPosition(position); +} + +int DocumentAccessor::LineStart(int line) { + return pdoc->LineStart(line); +} + +int DocumentAccessor::LevelAt(int line) { + return pdoc->GetLevel(line); +} + +int DocumentAccessor::Length() { + if (lenDoc == -1) + lenDoc = pdoc->Length(); + return lenDoc; +} + +int DocumentAccessor::GetLineState(int line) { + return pdoc->GetLineState(line); +} + +int DocumentAccessor::SetLineState(int line, int state) { + return pdoc->SetLineState(line, state); +} + +void DocumentAccessor::StartAt(unsigned int start, char chMask) { + // Store the mask specified for use with StyleAt. + mask = chMask; + pdoc->StartStyling(start, chMask); + startPosStyling = start; +} + +void DocumentAccessor::StartSegment(unsigned int pos) { + startSeg = pos; +} + +void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { + // Only perform styling if non empty range + if (pos != startSeg - 1) { + PLATFORM_ASSERT(pos >= startSeg); + if (pos < startSeg) { + return; + } + + if (validLen + (pos - startSeg + 1) >= bufferSize) + Flush(); + if (validLen + (pos - startSeg + 1) >= bufferSize) { + // Too big for buffer so send directly + pdoc->SetStyleFor(pos - startSeg + 1, static_cast(chAttr)); + } else { + if (chAttr != chWhile) + chFlags = 0; + chAttr |= chFlags; + for (unsigned int i = startSeg; i <= pos; i++) { + PLATFORM_ASSERT((startPosStyling + validLen) < Length()); + styleBuf[validLen++] = static_cast(chAttr); + } + } + } + startSeg = pos+1; +} + +void DocumentAccessor::SetLevel(int line, int level) { + pdoc->SetLevel(line, level); +} + +void DocumentAccessor::Flush() { + startPos = extremePosition; + lenDoc = -1; + if (validLen > 0) { + pdoc->SetStyles(validLen, styleBuf); + startPosStyling += validLen; + validLen = 0; + } +} + +int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { + int end = Length(); + int spaceFlags = 0; + + // Determines the indentation level of the current line and also checks for consistent + // indentation compared to the previous line. + // Indentation is judged consistent when the indentation whitespace of each line lines + // the same or the indentation of one line is a prefix of the other. + + int pos = LineStart(line); + char ch = (*this)[pos]; + int indent = 0; + bool inPrevPrefix = line > 0; + int posPrev = inPrevPrefix ? LineStart(line-1) : 0; + while ((ch == ' ' || ch == '\t') && (pos < end)) { + if (inPrevPrefix) { + char chPrev = (*this)[posPrev++]; + if (chPrev == ' ' || chPrev == '\t') { + if (chPrev != ch) + spaceFlags |= wsInconsistent; + } else { + inPrevPrefix = false; + } + } + if (ch == ' ') { + spaceFlags |= wsSpace; + indent++; + } else { // Tab + spaceFlags |= wsTab; + if (spaceFlags & wsSpace) + spaceFlags |= wsSpaceTab; + indent = (indent / 8 + 1) * 8; + } + ch = (*this)[++pos]; + } + + *flags = spaceFlags; + indent += SC_FOLDLEVELBASE; + // if completely empty line or the start of a comment... + if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || + (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + return indent | SC_FOLDLEVELWHITEFLAG; + else + return indent; +} + +void DocumentAccessor::IndicatorFill(int start, int end, int indicator, int value) { + pdoc->decorations.SetCurrentIndicator(indicator); + pdoc->DecorationFillRange(start, value, end - start); +} diff --git a/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.h b/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.h new file mode 100644 index 0000000000..6f1ce541f8 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.h @@ -0,0 +1,76 @@ +// Scintilla source code edit control +/** @file DocumentAccessor.h + ** Implementation of BufferAccess and StylingAccess on a Scintilla + ** rapid easy access to contents of a Scintilla. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +class Document; + +/** + */ +class DocumentAccessor : public Accessor { + // Private so DocumentAccessor objects can not be copied + DocumentAccessor(const DocumentAccessor &source) : Accessor(), props(source.props) {} + DocumentAccessor &operator=(const DocumentAccessor &) { return *this; } + +protected: + Document *pdoc; + PropSet &props; + WindowID id; + int lenDoc; + + char styleBuf[bufferSize]; + int validLen; + char chFlags; + char chWhile; + unsigned int startSeg; + int startPosStyling; + int mask; + + bool InternalIsLeadByte(char ch); + void Fill(int position); + +public: + DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : + Accessor(), pdoc(pdoc_), props(props_), id(id_), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0), + startSeg(0), startPosStyling(0), + mask(127) { // Initialize the mask to be big enough for any lexer. + } + ~DocumentAccessor(); + bool Match(int pos, const char *s); + char StyleAt(int position); + int GetLine(int position); + int LineStart(int line); + int LevelAt(int line); + int Length(); + void Flush(); + int GetLineState(int line); + int SetLineState(int line, int state); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); + } + char *GetProperties() { + return props.ToString(); + } + WindowID GetWindow() { return id; } + + void StartAt(unsigned int start, char chMask=31); + void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; + unsigned int GetStartSegment() { return startSeg; } + void StartSegment(unsigned int pos); + void ColourTo(unsigned int pos, int chAttr); + void SetLevel(int line, int level); + int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); + void IndicatorFill(int start, int end, int indicator, int value); +}; + +#ifdef SCI_NAMESPACE +} +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/Editor.cxx b/sdk/wxscintilla/src/scintilla/src/Editor.cxx new file mode 100644 index 0000000000..f9685401c2 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Editor.cxx @@ -0,0 +1,7412 @@ +// Scintilla source code edit control +/** @file Editor.cxx + ** Main code for the edit control. + **/ +// Copyright 1998-2004 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#ifndef PLAT_QT +#define INCLUDE_DEPRECATED_FEATURES +#endif +#include "Scintilla.h" + +#include "ContractionState.h" +#include "SVector.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "CellBuffer.h" +#include "KeyMap.h" +#include "RunStyles.h" +#include "Indicator.h" +#include "XPM.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "Document.h" +#include "PositionCache.h" +#include "Editor.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/* + return whether this modification represents an operation that + may reasonably be deferred (not done now OR [possibly] at all) +*/ +static bool CanDeferToLastStep(const DocModification& mh) { + if (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) + return true; // CAN skip + if (!(mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO))) + return false; // MUST do + if (mh.modificationType & SC_MULTISTEPUNDOREDO) + return true; // CAN skip + return false; // PRESUMABLY must do +} + +static bool CanEliminate(const DocModification& mh) { + return + (mh.modificationType & (SC_MOD_BEFOREINSERT|SC_MOD_BEFOREDELETE)) != 0; +} + +/* + return whether this modification represents the FINAL step + in a [possibly lengthy] multi-step Undo/Redo sequence +*/ +static bool IsLastStep(const DocModification& mh) { + return + (mh.modificationType & (SC_PERFORMED_UNDO|SC_PERFORMED_REDO)) != 0 + && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0 + && (mh.modificationType & SC_LASTSTEPINUNDOREDO) != 0 + && (mh.modificationType & SC_MULTILINEUNDOREDO) != 0; +} + +Caret::Caret() : +active(false), on(false), period(500) {} + +Timer::Timer() : +ticking(false), ticksToWait(0), tickerID(0) {} + +Idler::Idler() : +state(false), idlerID(0) {} + +static inline bool IsControlCharacter(int ch) { + // iscntrl returns true for lots of chars > 127 which are displayable + return ch >= 0 && ch < ' '; +} + +Editor::Editor() { + ctrlID = 0; + + stylesValid = false; + + printMagnification = 0; + printColourMode = SC_PRINT_NORMAL; + printWrapState = eWrapWord; + cursorMode = SC_CURSORNORMAL; + controlCharSymbol = 0; /* Draw the control characters */ + + hasFocus = false; + hideSelection = false; + inOverstrike = false; + errorStatus = 0; + mouseDownCaptures = true; + + bufferedDraw = true; + twoPhaseDraw = true; + + lastClickTime = 0; + dwellDelay = SC_TIME_FOREVER; + ticksToDwell = SC_TIME_FOREVER; + dwelling = false; + ptMouseLast.x = 0; + ptMouseLast.y = 0; + inDragDrop = ddNone; + dropWentOutside = false; + posDrag = invalidPosition; + posDrop = invalidPosition; + selectionType = selChar; + + lastXChosen = 0; + lineAnchor = 0; + originalAnchorPos = 0; + + selType = selStream; + moveExtendsSelection = false; + xStartSelect = 0; + xEndSelect = 0; + primarySelection = true; + + caretXPolicy = CARET_SLOP | CARET_EVEN; + caretXSlop = 50; + + caretYPolicy = CARET_EVEN; + caretYSlop = 0; + + searchAnchor = 0; + + xOffset = 0; + xCaretMargin = 50; + horizontalScrollBarVisible = true; + scrollWidth = 2000; + verticalScrollBarVisible = true; + endAtLastLine = true; + caretSticky = false; + + pixmapLine = Surface::Allocate(); + pixmapSelMargin = Surface::Allocate(); + pixmapSelPattern = Surface::Allocate(); + pixmapIndentGuide = Surface::Allocate(); + pixmapIndentGuideHighlight = Surface::Allocate(); + + currentPos = 0; + anchor = 0; + + targetStart = 0; + targetEnd = 0; + searchFlags = 0; + + topLine = 0; + posTopLine = 0; + + lengthForEncode = -1; + + needUpdateUI = true; + braces[0] = invalidPosition; + braces[1] = invalidPosition; + bracesMatchStyle = STYLE_BRACEBAD; + highlightGuideColumn = 0; + + theEdge = 0; + + paintState = notPainting; + + modEventMask = SC_MODEVENTMASKALL; + + pdoc = new Document(); + pdoc->AddRef(); + pdoc->AddWatcher(this, 0); + + recordingMacro = false; + foldFlags = 0; + + wrapState = eWrapNone; + wrapWidth = LineLayout::wrapWidthInfinite; + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + wrapVisualFlags = 0; + wrapVisualFlagsLocation = 0; + wrapVisualStartIndent = 0; + actualWrapVisualStartIndent = 0; + + convertPastes = true; + + hsStart = -1; + hsEnd = -1; + + llc.SetLevel(LineLayoutCache::llcCaret); + posCache.SetSize(0x400); +} + +Editor::~Editor() { + pdoc->RemoveWatcher(this, 0); + pdoc->Release(); + pdoc = 0; + DropGraphics(); + delete pixmapLine; + delete pixmapSelMargin; + delete pixmapSelPattern; + delete pixmapIndentGuide; + delete pixmapIndentGuideHighlight; +} + +void Editor::Finalise() { + SetIdle(false); + CancelModes(); +} + +void Editor::DropGraphics() { + pixmapLine->Release(); + pixmapSelMargin->Release(); + pixmapSelPattern->Release(); + pixmapIndentGuide->Release(); + pixmapIndentGuideHighlight->Release(); +} + +void Editor::InvalidateStyleData() { + stylesValid = false; + palette.Release(); + DropGraphics(); + llc.Invalidate(LineLayout::llInvalid); + posCache.Clear(); + if (selType == selRectangle) { + xStartSelect = XFromPosition(anchor); + xEndSelect = XFromPosition(currentPos); + } +} + +void Editor::InvalidateStyleRedraw() { + NeedWrapping(); + InvalidateStyleData(); + Redraw(); +} + +void Editor::RefreshColourPalette(Palette &pal, bool want) { + vs.RefreshColourPalette(pal, want); +} + +void Editor::RefreshStyleData() { + if (!stylesValid) { + stylesValid = true; + AutoSurface surface(this); + if (surface) { + vs.Refresh(*surface); + RefreshColourPalette(palette, true); + palette.Allocate(wMain); + RefreshColourPalette(palette, false); + } + SetScrollBars(); + } +} + +PRectangle Editor::GetClientRectangle() { + return wMain.GetClientPosition(); +} + +PRectangle Editor::GetTextRectangle() { + PRectangle rc = GetClientRectangle(); + rc.left += vs.fixedColumnWidth; + rc.right -= vs.rightMarginWidth; + return rc; +} + +int Editor::LinesOnScreen() { + PRectangle rcClient = GetClientRectangle(); + int htClient = rcClient.bottom - rcClient.top; + //Platform::DebugPrintf("lines on screen = %d\n", htClient / lineHeight + 1); + return htClient / vs.lineHeight; +} + +int Editor::LinesToScroll() { + int retVal = LinesOnScreen() - 1; + if (retVal < 1) + return 1; + else + return retVal; +} + +int Editor::MaxScrollPos() { + //Platform::DebugPrintf("Lines %d screen = %d maxScroll = %d\n", + //LinesTotal(), LinesOnScreen(), LinesTotal() - LinesOnScreen() + 1); + int retVal = cs.LinesDisplayed(); + if (endAtLastLine) { + retVal -= LinesOnScreen(); + } else { + retVal--; + } + if (retVal < 0) { + return 0; + } else { + return retVal; + } +} + +const char *ControlCharacterString(unsigned char ch) { + const char *reps[] = { + "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", + "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", + "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", + "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" + }; + if (ch < (sizeof(reps) / sizeof(reps[0]))) { + return reps[ch]; + } else { + return "BAD"; + } +} + +/** + * Convenience class to ensure LineLayout objects are always disposed. + */ +class AutoLineLayout { + LineLayoutCache &llc; + LineLayout *ll; + AutoLineLayout &operator=(const AutoLineLayout &) { return * this; } +public: + AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} + ~AutoLineLayout() { + llc.Dispose(ll); + ll = 0; + } + LineLayout *operator->() const { + return ll; + } + operator LineLayout *() const { + return ll; + } + void Set(LineLayout *ll_) { + llc.Dispose(ll); + ll = ll_; + } +}; + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + * Allows to iterate through the lines of a selection. + * Althought it can be called for a stream selection, in most cases + * it is inefficient and it should be used only for + * a rectangular or a line selection. + */ +class SelectionLineIterator { +private: + Editor *ed; + int line; ///< Current line within the iteration. + bool forward; ///< True if iterating by increasing line number, false otherwise. + int selStart, selEnd; ///< Positions of the start and end of the selection relative to the start of the document. + int minX, maxX; ///< Left and right of selection rectangle. + +public: + int lineStart, lineEnd; ///< Line numbers, first and last lines of the selection. + int startPos, endPos; ///< Positions of the beginning and end of the selection on the current line. + + void Reset() { + if (forward) { + line = lineStart; + } else { + line = lineEnd; + } + } + + SelectionLineIterator(Editor *ed_, bool forward_ = true) : line(0), startPos(0), endPos(0) { + ed = ed_; + forward = forward_; + selStart = ed->SelectionStart(); + selEnd = ed->SelectionEnd(); + lineStart = ed->pdoc->LineFromPosition(selStart); + lineEnd = ed->pdoc->LineFromPosition(selEnd); + // Left of rectangle + minX = Platform::Minimum(ed->xStartSelect, ed->xEndSelect); + // Right of rectangle + maxX = Platform::Maximum(ed->xStartSelect, ed->xEndSelect); + Reset(); + } + ~SelectionLineIterator() {} + + void SetAt(int line) { + if (line < lineStart || line > lineEnd) { + startPos = endPos = INVALID_POSITION; + } else { + if (ed->selType == ed->selRectangle) { + // Measure line and return character closest to minX + startPos = ed->PositionFromLineX(line, minX); + // Measure line and return character closest to maxX + endPos = ed->PositionFromLineX(line, maxX); + } else if (ed->selType == ed->selLines) { + startPos = ed->pdoc->LineStart(line); + endPos = ed->pdoc->LineStart(line + 1); + } else { // Stream selection, here only for completion + if (line == lineStart) { + startPos = selStart; + } else { + startPos = ed->pdoc->LineStart(line); + } + if (line == lineEnd) { + endPos = selEnd; + } else { + endPos = ed->pdoc->LineStart(line + 1); + } + } + } + } + bool Iterate() { + SetAt(line); + if (forward) { + line++; + } else { + line--; + } + return startPos != INVALID_POSITION; + } +}; + +#ifdef SCI_NAMESPACE +} +#endif + +Point Editor::LocationFromPosition(int pos) { // [CHANGED] + Point pt; + RefreshStyleData(); + if (pos == INVALID_POSITION) + return pt; + int line = pdoc->LineFromPosition(pos); + int lineVisible = cs.DisplayFromDoc(line); + //Platform::DebugPrintf("line=%d\n", line); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + if (surface && ll) { + // -1 because of adding in for visible lines in following loop. + pt.y = (lineVisible - topLine - 1) * vs.lineHeight; + pt.x = 0; + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, wrapWidth); + int posInLine = pos - posLineStart; + // In case of very long line put x at arbitrary large position + if (posInLine > ll->maxLineLength) { + pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)]; + } + + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { + pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)]; + if (actualWrapVisualStartIndent != 0) { + int lineStart = ll->LineStart(subLine); + if (lineStart != 0) // Wrapped + pt.x += actualWrapVisualStartIndent * vs.aveCharWidth; + } + } + if (posInLine >= ll->LineStart(subLine)) { + pt.y += vs.lineHeight; + } + } + pt.x += vs.fixedColumnWidth - xOffset; + } + return pt; +} + +int Editor::XFromPosition(int pos) { + Point pt = LocationFromPosition(pos); + return pt.x - vs.fixedColumnWidth + xOffset; +} + +int Editor::LineFromLocation(Point pt) { + return cs.DocFromDisplay(pt.y / vs.lineHeight + topLine); +} + +void Editor::SetTopLine(int topLineNew) { + topLine = topLineNew; + posTopLine = pdoc->LineStart(cs.DocFromDisplay(topLine)); +} + +int Editor::PositionFromLocation(Point pt) { + RefreshStyleData(); + pt.x = pt.x - vs.fixedColumnWidth + xOffset; + int visibleLine = pt.y / vs.lineHeight + topLine; + if (pt.y < 0) { // Division rounds towards 0 + visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; + } + if (visibleLine < 0) + visibleLine = 0; + int lineDoc = cs.DocFromDisplay(visibleLine); + if (lineDoc >= pdoc->LinesTotal()) + return pdoc->Length(); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int retVal = posLineStart; + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + if (subLine < ll->lines) { + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineLastVisible(subLine); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + int i = ll->FindBefore(pt.x + subLineStart, lineStart, lineEnd); + while (i < lineEnd) { + if ((pt.x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) { + return pdoc->MovePositionOutsideChar(i + posLineStart, 1); + } + i++; + } + return lineEnd + posLineStart; + } + retVal = ll->numCharsInLine + posLineStart; + } + return retVal; +} + +// Like PositionFromLocation but INVALID_POSITION returned when not near any text. +int Editor::PositionFromLocationClose(Point pt) { + RefreshStyleData(); + PRectangle rcClient = GetTextRectangle(); + if (!rcClient.Contains(pt)) + return INVALID_POSITION; + if (pt.x < vs.fixedColumnWidth) + return INVALID_POSITION; + if (pt.y < 0) + return INVALID_POSITION; + pt.x = pt.x - vs.fixedColumnWidth + xOffset; + int visibleLine = pt.y / vs.lineHeight + topLine; + if (pt.y < 0) { // Division rounds towards 0 + visibleLine = (pt.y - (vs.lineHeight - 1)) / vs.lineHeight + topLine; + } + int lineDoc = cs.DocFromDisplay(visibleLine); + if (lineDoc < 0) + return INVALID_POSITION; + if (lineDoc >= pdoc->LinesTotal()) + return INVALID_POSITION; + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + if (subLine < ll->lines) { + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineLastVisible(subLine); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + pt.x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + int i = ll->FindBefore(pt.x + subLineStart, lineStart, lineEnd); + while (i < lineEnd) { + if ((pt.x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) { + return pdoc->MovePositionOutsideChar(i + posLineStart, 1); + } + i++; + } + if (pt.x < (ll->positions[lineEnd] - subLineStart)) { + return pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1); + } + } + } + + return INVALID_POSITION; +} + +/** + * Find the document position corresponding to an x coordinate on a particular document line. + * Ensure is between whole characters when document is in multi-byte or UTF-8 mode. + */ +int Editor::PositionFromLineX(int lineDoc, int x) { + RefreshStyleData(); + if (lineDoc >= pdoc->LinesTotal()) + return pdoc->Length(); + //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + int retVal = 0; + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(lineDoc); + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + retVal = ll->numCharsInLine + posLineStart; + int subLine = 0; + int lineStart = ll->LineStart(subLine); + int lineEnd = ll->LineLastVisible(subLine); + int subLineStart = ll->positions[lineStart]; + + if (actualWrapVisualStartIndent != 0) { + if (lineStart != 0) // Wrapped + x -= actualWrapVisualStartIndent * vs.aveCharWidth; + } + int i = ll->FindBefore(x + subLineStart, lineStart, lineEnd); + while (i < lineEnd) { + if ((x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) { + retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1); + break; + } + i++; + } + } + return retVal; +} + +/** + * If painting then abandon the painting because a wider redraw is needed. + * @return true if calling code should stop drawing. + */ +bool Editor::AbandonPaint() { + if ((paintState == painting) && !paintingAllText) { + paintState = paintAbandoned; + } + return paintState == paintAbandoned; +} + +void Editor::RedrawRect(PRectangle rc) { + //Platform::DebugPrintf("Redraw %0d,%0d - %0d,%0d\n", rc.left, rc.top, rc.right, rc.bottom); + + // Clip the redraw rectangle into the client area + PRectangle rcClient = GetClientRectangle(); + if (rc.top < rcClient.top) + rc.top = rcClient.top; + if (rc.bottom > rcClient.bottom) + rc.bottom = rcClient.bottom; + if (rc.left < rcClient.left) + rc.left = rcClient.left; + if (rc.right > rcClient.right) + rc.right = rcClient.right; + + if ((rc.bottom > rc.top) && (rc.right > rc.left)) { + wMain.InvalidateRectangle(rc); + } +} + +void Editor::Redraw() { + //Platform::DebugPrintf("Redraw all\n"); + PRectangle rcClient = GetClientRectangle(); + wMain.InvalidateRectangle(rcClient); + //wMain.InvalidateAll(); +} + +void Editor::RedrawSelMargin(int line) { + if (!AbandonPaint()) { + if (vs.maskInLine) { + Redraw(); + } else { + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth; + if (line != -1) { + int position = pdoc->LineStart(line); + PRectangle rcLine = RectangleFromRange(position, position); + rcSelMargin.top = rcLine.top; + rcSelMargin.bottom = rcLine.bottom; + } + wMain.InvalidateRectangle(rcSelMargin); + } + } +} + +PRectangle Editor::RectangleFromRange(int start, int end) { + int minPos = start; + if (minPos > end) + minPos = end; + int maxPos = start; + if (maxPos < end) + maxPos = end; + int minLine = cs.DisplayFromDoc(pdoc->LineFromPosition(minPos)); + int lineDocMax = pdoc->LineFromPosition(maxPos); + int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1; + PRectangle rcClient = GetTextRectangle(); + PRectangle rc; + rc.left = vs.fixedColumnWidth; + rc.top = (minLine - topLine) * vs.lineHeight; + if (rc.top < 0) + rc.top = 0; + rc.right = rcClient.right; + rc.bottom = (maxLine - topLine + 1) * vs.lineHeight; + // Ensure PRectangle is within 16 bit space + rc.top = Platform::Clamp(rc.top, -32000, 32000); + rc.bottom = Platform::Clamp(rc.bottom, -32000, 32000); + + return rc; +} + +void Editor::InvalidateRange(int start, int end) { + RedrawRect(RectangleFromRange(start, end)); +} + +int Editor::CurrentPosition() { + return currentPos; +} + +bool Editor::SelectionEmpty() { + return anchor == currentPos; +} + +int Editor::SelectionStart() { + return Platform::Minimum(currentPos, anchor); +} + +int Editor::SelectionEnd() { + return Platform::Maximum(currentPos, anchor); +} + +void Editor::SetRectangularRange() { + if (selType == selRectangle) { + xStartSelect = XFromPosition(anchor); + xEndSelect = XFromPosition(currentPos); + } +} + +void Editor::InvalidateSelection(int currentPos_, int anchor_) { + int firstAffected = anchor; + if (firstAffected > currentPos) + firstAffected = currentPos; + if (firstAffected > anchor_) + firstAffected = anchor_; + if (firstAffected > currentPos_) + firstAffected = currentPos_; + int lastAffected = anchor; + if (lastAffected < currentPos) + lastAffected = currentPos; + if (lastAffected < anchor_) + lastAffected = anchor_; + if (lastAffected < (currentPos_ + 1)) // +1 ensures caret repainted + lastAffected = (currentPos_ + 1); + needUpdateUI = true; + InvalidateRange(firstAffected, lastAffected); +} + +void Editor::SetSelection(int currentPos_, int anchor_) { + currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); + anchor_ = pdoc->ClampPositionIntoDocument(anchor_); + if ((currentPos != currentPos_) || (anchor != anchor_)) { + InvalidateSelection(currentPos_, anchor_); + currentPos = currentPos_; + anchor = anchor_; + } + SetRectangularRange(); + ClaimSelection(); +} + +void Editor::SetSelection(int currentPos_) { + currentPos_ = pdoc->ClampPositionIntoDocument(currentPos_); + if (currentPos != currentPos_) { + InvalidateSelection(currentPos_, currentPos_); + currentPos = currentPos_; + } + SetRectangularRange(); + ClaimSelection(); +} + +void Editor::SetEmptySelection(int currentPos_) { + selType = selStream; + moveExtendsSelection = false; + SetSelection(currentPos_, currentPos_); +} + +bool Editor::RangeContainsProtected(int start, int end) const { + if (vs.ProtectionActive()) { + if (start > end) { + int t = start; + start = end; + end = t; + } + int mask = pdoc->stylingBitsMask; + for (int pos = start; pos < end; pos++) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) + return true; + } + } + return false; +} + +bool Editor::SelectionContainsProtected() { + // DONE, but untested...: make support rectangular selection + bool scp = false; + if (selType == selStream) { + scp = RangeContainsProtected(anchor, currentPos); + } else { + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + if (RangeContainsProtected(lineIterator.startPos, lineIterator.endPos)) { + scp = true; + break; + } + } + } + return scp; +} + +/** + * Asks document to find a good position and then moves out of any invisible positions. + */ +int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { + pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); + if (vs.ProtectionActive()) { + int mask = pdoc->stylingBitsMask; + if (moveDir > 0) { + if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) { + while ((pos < pdoc->Length()) && + (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())) + pos++; + } + } else if (moveDir < 0) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) { + while ((pos > 0) && + (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) + pos--; + } + } + } + return pos; +} + +int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) { + int delta = newPos - currentPos; + newPos = pdoc->ClampPositionIntoDocument(newPos); + newPos = MovePositionOutsideChar(newPos, delta); + if (sel != noSel) { + selType = sel; + } + if (sel != noSel || moveExtendsSelection) { + SetSelection(newPos); + } else { + SetEmptySelection(newPos); + } + ShowCaretAtCurrentPosition(); + if (ensureVisible) { + EnsureCaretVisible(); + } + NotifyMove(newPos); + return 0; +} + +int Editor::MovePositionSoVisible(int pos, int moveDir) { + pos = pdoc->ClampPositionIntoDocument(pos); + pos = MovePositionOutsideChar(pos, moveDir); + int lineDoc = pdoc->LineFromPosition(pos); + if (cs.GetVisible(lineDoc)) { + return pos; + } else { + int lineDisplay = cs.DisplayFromDoc(lineDoc); + if (moveDir > 0) { + // lineDisplay is already line before fold as lines in fold use display line of line after fold + lineDisplay = Platform::Clamp(lineDisplay, 0, cs.LinesDisplayed()); + return pdoc->LineStart(cs.DocFromDisplay(lineDisplay)); + } else { + lineDisplay = Platform::Clamp(lineDisplay - 1, 0, cs.LinesDisplayed()); + return pdoc->LineEnd(cs.DocFromDisplay(lineDisplay)); + } + } +} + +/** + * Choose the x position that the caret will try to stick to + * as it moves up and down. + */ +void Editor::SetLastXChosen() { + Point pt = LocationFromPosition(currentPos); + lastXChosen = pt.x; +} + +void Editor::ScrollTo(int line, bool moveThumb) { + int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); + if (topLineNew != topLine) { + // Try to optimise small scrolls + int linesToMove = topLine - topLineNew; + SetTopLine(topLineNew); + ShowCaretAtCurrentPosition(); + // Perform redraw rather than scroll if many lines would be redrawn anyway. +#ifndef UNDER_CE + if ((abs(linesToMove) <= 10) && (paintState == notPainting)) { + ScrollText(linesToMove); + } else { + Redraw(); + } +#else + Redraw(); +#endif + if (moveThumb) { + SetVerticalScrollPos(); + } + } +} + +void Editor::ScrollText(int /* linesToMove */) { + //Platform::DebugPrintf("Editor::ScrollText %d\n", linesToMove); + Redraw(); +} + +void Editor::HorizontalScrollTo(int xPos) { + //Platform::DebugPrintf("HorizontalScroll %d\n", xPos); + if (xPos < 0) + xPos = 0; + if ((wrapState == eWrapNone) && (xOffset != xPos)) { + xOffset = xPos; + SetHorizontalScrollPos(); + RedrawRect(GetClientRectangle()); + } +} + +void Editor::MoveCaretInsideView(bool ensureVisible) { + PRectangle rcClient = GetTextRectangle(); + Point pt = LocationFromPosition(currentPos); + if (pt.y < rcClient.top) { + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top)), + noSel, ensureVisible); + } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { + int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; + MovePositionTo(PositionFromLocation( + Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)), + noSel, ensureVisible); + } +} + +int Editor::DisplayFromPosition(int pos) { + int lineDoc = pdoc->LineFromPosition(pos); + int lineDisplay = cs.DisplayFromDoc(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); + if (surface && ll) { + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int posInLine = pos - posLineStart; + lineDisplay--; // To make up for first increment ahead. + for (int subLine = 0; subLine < ll->lines; subLine++) { + if (posInLine >= ll->LineStart(subLine)) { + lineDisplay++; + } + } + } + return lineDisplay; +} + +/** + * Ensure the caret is reasonably visible in context. + * +Caret policy in SciTE + +If slop is set, we can define a slop value. +This value defines an unwanted zone (UZ) where the caret is... unwanted. +This zone is defined as a number of pixels near the vertical margins, +and as a number of lines near the horizontal margins. +By keeping the caret away from the edges, it is seen within its context, +so it is likely that the identifier that the caret is on can be completely seen, +and that the current line is seen with some of the lines following it which are +often dependent on that line. + +If strict is set, the policy is enforced... strictly. +The caret is centred on the display if slop is not set, +and cannot go in the UZ if slop is set. + +If jumps is set, the display is moved more energetically +so the caret can move in the same direction longer before the policy is applied again. +'3UZ' notation is used to indicate three time the size of the UZ as a distance to the margin. + +If even is not set, instead of having symmetrical UZs, +the left and bottom UZs are extended up to right and top UZs respectively. +This way, we favour the displaying of useful information: the begining of lines, +where most code reside, and the lines after the caret, eg. the body of a function. + + | | | | | +slop | strict | jumps | even | Caret can go to the margin | When reaching limitÃ(caret going out of + | | | | | visibility or going into the UZ) display is... +-----+--------+-------+------+--------------------------------------------+-------------------------------------------------------------- + 0 | 0 | 0 | 0 | Yes | moved to put caret on top/on right + 0 | 0 | 0 | 1 | Yes | moved by one position + 0 | 0 | 1 | 0 | Yes | moved to put caret on top/on right + 0 | 0 | 1 | 1 | Yes | centred on the caret + 0 | 1 | - | 0 | Caret is always on top/on right of display | - + 0 | 1 | - | 1 | No, caret is always centred | - + 1 | 0 | 0 | 0 | Yes | moved to put caret out of the asymmetrical UZ + 1 | 0 | 0 | 1 | Yes | moved to put caret out of the UZ + 1 | 0 | 1 | 0 | Yes | moved to put caret at 3UZ of the top or right margin + 1 | 0 | 1 | 1 | Yes | moved to put caret at 3UZ of the margin + 1 | 1 | - | 0 | Caret is always at UZ of top/right margin | - + 1 | 1 | 0 | 1 | No, kept out of UZ | moved by one position + 1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin +*/ +void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { + //Platform::DebugPrintf("EnsureCaretVisible %d %s\n", xOffset, useMargin ? " margin" : " "); + PRectangle rcClient = GetTextRectangle(); + //int rcClientFullWidth = rcClient.Width(); + int posCaret = currentPos; + if (posDrag >= 0) { + posCaret = posDrag; + } + Point pt = LocationFromPosition(posCaret); + Point ptBottomCaret = pt; + ptBottomCaret.y += vs.lineHeight - 1; + int lineCaret = DisplayFromPosition(posCaret); + bool bSlop, bStrict, bJump, bEven; + + // Vertical positioning + if (vert && (pt.y < rcClient.top || ptBottomCaret.y > rcClient.bottom || (caretYPolicy & CARET_STRICT) != 0)) { + int linesOnScreen = LinesOnScreen(); + int halfScreen = Platform::Maximum(linesOnScreen - 1, 2) / 2; + int newTopLine = topLine; + bSlop = (caretYPolicy & CARET_SLOP) != 0; + bStrict = (caretYPolicy & CARET_STRICT) != 0; + bJump = (caretYPolicy & CARET_JUMPS) != 0; + bEven = (caretYPolicy & CARET_EVEN) != 0; + + // It should be possible to scroll the window to show the caret, + // but this fails to remove the caret on GTK+ + if (bSlop) { // A margin is defined + int yMoveT, yMoveB; + if (bStrict) { + int yMarginT, yMarginB; + if (!useMargin) { + // In drag mode, avoid moves + // otherwise, a double click will select several lines. + yMarginT = yMarginB = 0; + } else { + // yMarginT must equal to caretYSlop, with a minimum of 1 and + // a maximum of slightly less than half the heigth of the text area. + yMarginT = Platform::Clamp(caretYSlop, 1, halfScreen); + if (bEven) { + yMarginB = yMarginT; + } else { + yMarginB = linesOnScreen - yMarginT - 1; + } + } + yMoveT = yMarginT; + if (bEven) { + if (bJump) { + yMoveT = Platform::Clamp(caretYSlop * 3, 1, halfScreen); + } + yMoveB = yMoveT; + } else { + yMoveB = linesOnScreen - yMoveT - 1; + } + if (lineCaret < topLine + yMarginT) { + // Caret goes too high + newTopLine = lineCaret - yMoveT; + } else if (lineCaret > topLine + linesOnScreen - 1 - yMarginB) { + // Caret goes too low + newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; + } + } else { // Not strict + yMoveT = bJump ? caretYSlop * 3 : caretYSlop; + yMoveT = Platform::Clamp(yMoveT, 1, halfScreen); + if (bEven) { + yMoveB = yMoveT; + } else { + yMoveB = linesOnScreen - yMoveT - 1; + } + if (lineCaret < topLine) { + // Caret goes too high + newTopLine = lineCaret - yMoveT; + } else if (lineCaret > topLine + linesOnScreen - 1) { + // Caret goes too low + newTopLine = lineCaret - linesOnScreen + 1 + yMoveB; + } + } + } else { // No slop + if (!bStrict && !bJump) { + // Minimal move + if (lineCaret < topLine) { + // Caret goes too high + newTopLine = lineCaret; + } else if (lineCaret > topLine + linesOnScreen - 1) { + // Caret goes too low + if (bEven) { + newTopLine = lineCaret - linesOnScreen + 1; + } else { + newTopLine = lineCaret; + } + } + } else { // Strict or going out of display + if (bEven) { + // Always center caret + newTopLine = lineCaret - halfScreen; + } else { + // Always put caret on top of display + newTopLine = lineCaret; + } + } + } + newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos()); + if (newTopLine != topLine) { + Redraw(); + SetTopLine(newTopLine); + SetVerticalScrollPos(); + } + } + + // Horizontal positioning + if (horiz && (wrapState == eWrapNone)) { + int halfScreen = Platform::Maximum(rcClient.Width() - 4, 4) / 2; + int xOffsetNew = xOffset; + bSlop = (caretXPolicy & CARET_SLOP) != 0; + bStrict = (caretXPolicy & CARET_STRICT) != 0; + bJump = (caretXPolicy & CARET_JUMPS) != 0; + bEven = (caretXPolicy & CARET_EVEN) != 0; + + if (bSlop) { // A margin is defined + int xMoveL, xMoveR; + if (bStrict) { + int xMarginL, xMarginR; + if (!useMargin) { + // In drag mode, avoid moves unless very near of the margin + // otherwise, a simple click will select text. + xMarginL = xMarginR = 2; + } else { + // xMargin must equal to caretXSlop, with a minimum of 2 and + // a maximum of slightly less than half the width of the text area. + xMarginR = Platform::Clamp(caretXSlop, 2, halfScreen); + if (bEven) { + xMarginL = xMarginR; + } else { + xMarginL = rcClient.Width() - xMarginR - 4; + } + } + if (bJump && bEven) { + // Jump is used only in even mode + xMoveL = xMoveR = Platform::Clamp(caretXSlop * 3, 1, halfScreen); + } else { + xMoveL = xMoveR = 0; // Not used, avoid a warning + } + if (pt.x < rcClient.left + xMarginL) { + // Caret is on the left of the display + if (bJump && bEven) { + xOffsetNew -= xMoveL; + } else { + // Move just enough to allow to display the caret + xOffsetNew -= (rcClient.left + xMarginL) - pt.x; + } + } else if (pt.x >= rcClient.right - xMarginR) { + // Caret is on the right of the display + if (bJump && bEven) { + xOffsetNew += xMoveR; + } else { + // Move just enough to allow to display the caret + xOffsetNew += pt.x - (rcClient.right - xMarginR) + 1; + } + } + } else { // Not strict + xMoveR = bJump ? caretXSlop * 3 : caretXSlop; + xMoveR = Platform::Clamp(xMoveR, 1, halfScreen); + if (bEven) { + xMoveL = xMoveR; + } else { + xMoveL = rcClient.Width() - xMoveR - 4; + } + if (pt.x < rcClient.left) { + // Caret is on the left of the display + xOffsetNew -= xMoveL; + } else if (pt.x >= rcClient.right) { + // Caret is on the right of the display + xOffsetNew += xMoveR; + } + } + } else { // No slop + if (bStrict || + (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { + // Strict or going out of display + if (bEven) { + // Center caret + xOffsetNew += pt.x - rcClient.left - halfScreen; + } else { + // Put caret on right + xOffsetNew += pt.x - rcClient.right + 1; + } + } else { + // Move just enough to allow to display the caret + if (pt.x < rcClient.left) { + // Caret is on the left of the display + if (bEven) { + xOffsetNew -= rcClient.left - pt.x; + } else { + xOffsetNew += pt.x - rcClient.right + 1; + } + } else if (pt.x >= rcClient.right) { + // Caret is on the right of the display + xOffsetNew += pt.x - rcClient.right + 1; + } + } + } + // In case of a jump (find result) largely out of display, adjust the offset to display the caret + if (pt.x + xOffset < rcClient.left + xOffsetNew) { + xOffsetNew = pt.x + xOffset - rcClient.left; + } else if (pt.x + xOffset >= rcClient.right + xOffsetNew) { + xOffsetNew = pt.x + xOffset - rcClient.right + 1; + if (vs.caretStyle == CARETSTYLE_BLOCK) { + // Ensure we can see a good portion of the block caret + xOffsetNew += vs.aveCharWidth; + } + } + if (xOffsetNew < 0) { + xOffsetNew = 0; + } + if (xOffset != xOffsetNew) { + xOffset = xOffsetNew; + if (xOffsetNew > 0) { + PRectangle rcText = GetTextRectangle(); + if (horizontalScrollBarVisible == true && + rcText.Width() + xOffset > scrollWidth) { + scrollWidth = xOffset + rcText.Width(); + SetScrollBars(); + } + } + SetHorizontalScrollPos(); + Redraw(); + } + } + UpdateSystemCaret(); +} + +void Editor::ShowCaretAtCurrentPosition() { + if (hasFocus) { + caret.active = true; + caret.on = true; + SetTicking(true); + } else { + caret.active = false; + caret.on = false; + } + InvalidateCaret(); +} + +void Editor::DropCaret() { + caret.active = false; + InvalidateCaret(); +} + +void Editor::InvalidateCaret() { + if (posDrag >= 0) + InvalidateRange(posDrag, posDrag + 1); + else + InvalidateRange(currentPos, currentPos + 1); + UpdateSystemCaret(); +} + +void Editor::UpdateSystemCaret() { +} + +void Editor::NeedWrapping(int docLineStart, int docLineEnd) { + docLineStart = Platform::Clamp(docLineStart, 0, pdoc->LinesTotal()); + if (wrapStart > docLineStart) { + wrapStart = docLineStart; + llc.Invalidate(LineLayout::llPositions); + } + if (wrapEnd < docLineEnd) { + wrapEnd = docLineEnd; + } + wrapEnd = Platform::Clamp(wrapEnd, 0, pdoc->LinesTotal()); + // Wrap lines during idle. + if ((wrapState != eWrapNone) && (wrapEnd != wrapStart)) { + SetIdle(true); + } +} + +// Check if wrapping needed and perform any needed wrapping. +// fullwrap: if true, all lines which need wrapping will be done, +// in this single call. +// priorityWrapLineStart: If greater than zero, all lines starting from +// here to 1 page + 100 lines past will be wrapped (even if there are +// more lines under wrapping process in idle). +// If it is neither fullwrap, nor priorityWrap, then 1 page + 100 lines will be +// wrapped, if there are any wrapping going on in idle. (Generally this +// condition is called only from idler). +// Return true if wrapping occurred. +bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) { + // If there are any pending wraps, do them during idle if possible. + int linesInOneCall = LinesOnScreen() + 100; + if (wrapState != eWrapNone) { + if (wrapStart < wrapEnd) { + if (!SetIdle(true)) { + // Idle processing not supported so full wrap required. + fullWrap = true; + } + } + if (!fullWrap && priorityWrapLineStart >= 0 && + // .. and if the paint window is outside pending wraps + (((priorityWrapLineStart + linesInOneCall) < wrapStart) || + (priorityWrapLineStart > wrapEnd))) { + // No priority wrap pending + return false; + } + } + int goodTopLine = topLine; + bool wrapOccurred = false; + if (wrapStart <= pdoc->LinesTotal()) { + if (wrapState == eWrapNone) { + if (wrapWidth != LineLayout::wrapWidthInfinite) { + wrapWidth = LineLayout::wrapWidthInfinite; + for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) { + cs.SetHeight(lineDoc, 1); + } + wrapOccurred = true; + } + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + } else { + if (wrapEnd >= pdoc->LinesTotal()) + wrapEnd = pdoc->LinesTotal(); + //ElapsedTime et; + int lineDocTop = cs.DocFromDisplay(topLine); + int subLineTop = topLine - cs.DisplayFromDoc(lineDocTop); + PRectangle rcTextArea = GetClientRectangle(); + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + wrapWidth = rcTextArea.Width(); + // Ensure all of the document is styled. + pdoc->EnsureStyledTo(pdoc->Length()); + RefreshStyleData(); + AutoSurface surface(this); + if (surface) { + bool priorityWrap = false; + int lastLineToWrap = wrapEnd; + int lineToWrap = wrapStart; + if (!fullWrap) { + if (priorityWrapLineStart >= 0) { + // This is a priority wrap. + lineToWrap = priorityWrapLineStart; + lastLineToWrap = priorityWrapLineStart + linesInOneCall; + priorityWrap = true; + } else { + // This is idle wrap. + lastLineToWrap = wrapStart + linesInOneCall; + } + if (lastLineToWrap >= wrapEnd) + lastLineToWrap = wrapEnd; + } // else do a fullWrap. + + // Platform::DebugPrintf("Wraplines: full = %d, priorityStart = %d (wrapping: %d to %d)\n", fullWrap, priorityWrapLineStart, lineToWrap, lastLineToWrap); + // Platform::DebugPrintf("Pending wraps: %d to %d\n", wrapStart, wrapEnd); + while (lineToWrap < lastLineToWrap) { + AutoLineLayout ll(llc, RetrieveLineLayout(lineToWrap)); + int linesWrapped = 1; + if (ll) { + LayoutLine(lineToWrap, surface, vs, ll, wrapWidth); + linesWrapped = ll->lines; + } + if (cs.SetHeight(lineToWrap, linesWrapped)) { + wrapOccurred = true; + } + lineToWrap++; + } + if (!priorityWrap) + wrapStart = lineToWrap; + // If wrapping is done, bring it to resting position + if (wrapStart >= wrapEnd) { + wrapStart = wrapLineLarge; + wrapEnd = wrapLineLarge; + } + } + goodTopLine = cs.DisplayFromDoc(lineDocTop); + if (subLineTop < cs.GetHeight(lineDocTop)) + goodTopLine += subLineTop; + else + goodTopLine += cs.GetHeight(lineDocTop); + //double durWrap = et.Duration(true); + //Platform::DebugPrintf("Wrap:%9.6g \n", durWrap); + } + } + if (wrapOccurred) { + SetScrollBars(); + SetTopLine(Platform::Clamp(goodTopLine, 0, MaxScrollPos())); + SetVerticalScrollPos(); + } + return wrapOccurred; +} + +void Editor::LinesJoin() { + if (!RangeContainsProtected(targetStart, targetEnd)) { + pdoc->BeginUndoAction(); + bool prevNonWS = true; + for (int pos = targetStart; pos < targetEnd; pos++) { + if (IsEOLChar(pdoc->CharAt(pos))) { + targetEnd -= pdoc->LenChar(pos); + pdoc->DelChar(pos); + if (prevNonWS) { + // Ensure at least one space separating previous lines + pdoc->InsertChar(pos, ' '); + targetEnd++; + } + } else { + prevNonWS = pdoc->CharAt(pos) != ' '; + } + } + pdoc->EndUndoAction(); + } +} + +const char *StringFromEOLMode(int eolMode) { + if (eolMode == SC_EOL_CRLF) { + return "\r\n"; + } else if (eolMode == SC_EOL_CR) { + return "\r"; + } else { + return "\n"; + } +} + +void Editor::LinesSplit(int pixelWidth) { + if (!RangeContainsProtected(targetStart, targetEnd)) { + if (pixelWidth == 0) { + PRectangle rcText = GetTextRectangle(); + pixelWidth = rcText.Width(); + } + int lineStart = pdoc->LineFromPosition(targetStart); + int lineEnd = pdoc->LineFromPosition(targetEnd); + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->BeginUndoAction(); + for (int line = lineStart; line <= lineEnd; line++) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, pixelWidth); + for (int subLine = 1; subLine < ll->lines; subLine++) { + pdoc->InsertCString(posLineStart + (subLine - 1) * strlen(eol) + + ll->LineStart(subLine), eol); + targetEnd += static_cast(strlen(eol)); + } + } + lineEnd = pdoc->LineFromPosition(targetEnd); + } + pdoc->EndUndoAction(); + } +} + +int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { + if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) + return markerDefault; + return markerCheck; +} + +// Avoid 64 bit compiler warnings. +// Scintilla does not support text buffers larger than 2**31 +static int istrlen(const char *s) { + return static_cast(strlen(s)); +} + +void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { + if (vs.fixedColumnWidth == 0) + return; + + PRectangle rcMargin = GetClientRectangle(); + rcMargin.right = vs.fixedColumnWidth; + + if (!rc.Intersects(rcMargin)) + return; + + Surface *surface; + if (bufferedDraw) { + surface = pixmapSelMargin; + } else { + surface = surfWindow; + } + + PRectangle rcSelMargin = rcMargin; + rcSelMargin.right = rcMargin.left; + + for (int margin = 0; margin < vs.margins; margin++) { + if (vs.ms[margin].width > 0) { + + rcSelMargin.left = rcSelMargin.right; + rcSelMargin.right = rcSelMargin.left + vs.ms[margin].width; + + if (vs.ms[margin].style != SC_MARGIN_NUMBER) { + /* alternate scheme: + if (vs.ms[margin].mask & SC_MASK_FOLDERS) + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_DEFAULT].back.allocated); + else + // Required because of special way brush is created for selection margin + surface->FillRectangle(rcSelMargin, pixmapSelPattern); + */ + if (vs.ms[margin].mask & SC_MASK_FOLDERS) + // Required because of special way brush is created for selection margin + surface->FillRectangle(rcSelMargin, *pixmapSelPattern); + else { + ColourAllocated colour; + switch (vs.ms[margin].style) { + case SC_MARGIN_BACK: + colour = vs.styles[STYLE_DEFAULT].back.allocated; + break; + case SC_MARGIN_FORE: + colour = vs.styles[STYLE_DEFAULT].fore.allocated; + break; + default: + colour = vs.styles[STYLE_LINENUMBER].back.allocated; + break; + } + surface->FillRectangle(rcSelMargin, colour); + } + } else { + surface->FillRectangle(rcSelMargin, vs.styles[STYLE_LINENUMBER].back.allocated); + } + + int visibleLine = topLine; + int yposScreen = 0; + + // Work out whether the top line is whitespace located after a + // lessening of fold level which implies a 'fold tail' but which should not + // be displayed until the last of a sequence of whitespace. + bool needWhiteClosure = false; + int level = pdoc->GetLevel(cs.DocFromDisplay(topLine)); + if (level & SC_FOLDLEVELWHITEFLAG) { + int lineBack = cs.DocFromDisplay(topLine); + int levelPrev = level; + while ((lineBack > 0) && (levelPrev & SC_FOLDLEVELWHITEFLAG)) { + lineBack--; + levelPrev = pdoc->GetLevel(lineBack); + } + if (!(levelPrev & SC_FOLDLEVELHEADERFLAG)) { + if ((level & SC_FOLDLEVELNUMBERMASK) < (levelPrev & SC_FOLDLEVELNUMBERMASK)) + needWhiteClosure = true; + } + } + + // Old code does not know about new markers needed to distinguish all cases + int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, + SC_MARKNUM_FOLDEROPEN); + int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, + SC_MARKNUM_FOLDER); + + while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { + + PLATFORM_ASSERT(visibleLine < cs.LinesDisplayed()); + + int lineDoc = cs.DocFromDisplay(visibleLine); + PLATFORM_ASSERT(cs.GetVisible(lineDoc)); + bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc); + + // Decide which fold indicator should be displayed + level = pdoc->GetLevel(lineDoc); + int levelNext = pdoc->GetLevel(lineDoc + 1); + int marks = pdoc->GetMark(lineDoc); + if (!firstSubLine) + marks = 0; + int levelNum = level & SC_FOLDLEVELNUMBERMASK; + int levelNextNum = levelNext & SC_FOLDLEVELNUMBERMASK; + if (level & SC_FOLDLEVELHEADERFLAG) { + if (firstSubLine) { + if (cs.GetExpanded(lineDoc)) { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDEROPEN; + else + marks |= 1 << folderOpenMid; + } else { + if (levelNum == SC_FOLDLEVELBASE) + marks |= 1 << SC_MARKNUM_FOLDER; + else + marks |= 1 << folderEnd; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + needWhiteClosure = false; + } else if (level & SC_FOLDLEVELWHITEFLAG) { + if (needWhiteClosure) { + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } else if (levelNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + needWhiteClosure = false; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + needWhiteClosure = false; + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + } else if (levelNum > SC_FOLDLEVELBASE) { + if (levelNextNum < levelNum) { + needWhiteClosure = false; + if (levelNext & SC_FOLDLEVELWHITEFLAG) { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + needWhiteClosure = true; + } else if (levelNextNum > SC_FOLDLEVELBASE) { + marks |= 1 << SC_MARKNUM_FOLDERMIDTAIL; + } else { + marks |= 1 << SC_MARKNUM_FOLDERTAIL; + } + } else { + marks |= 1 << SC_MARKNUM_FOLDERSUB; + } + } + + marks &= vs.ms[margin].mask; + PRectangle rcMarker = rcSelMargin; + rcMarker.top = yposScreen; + rcMarker.bottom = yposScreen + vs.lineHeight; + if (vs.ms[margin].style == SC_MARGIN_NUMBER) { + char number[100]; + number[0] = '\0'; + if (firstSubLine) + sprintf(number, "%d", lineDoc + 1); + if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { + int lev = pdoc->GetLevel(lineDoc); + sprintf(number, "%c%c %03X %03X", + (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', + (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', + lev & SC_FOLDLEVELNUMBERMASK, + lev >> 16 + ); + } + PRectangle rcNumber = rcMarker; + // Right justify + int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number)); + int xpos = rcNumber.right - width - 3; + rcNumber.left = xpos; + surface->DrawTextNoClip(rcNumber, vs.styles[STYLE_LINENUMBER].font, + rcNumber.top + vs.maxAscent, number, istrlen(number), + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); + } + + if (marks) { + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if (marks & 1) { + vs.markers[markBit].Draw(surface, rcMarker, vs.styles[STYLE_LINENUMBER].font); + } + marks >>= 1; + } + } + + visibleLine++; + yposScreen += vs.lineHeight; + } + } + } + + PRectangle rcBlankMargin = rcMargin; + rcBlankMargin.left = rcSelMargin.right; + surface->FillRectangle(rcBlankMargin, vs.styles[STYLE_DEFAULT].back.allocated); + + if (bufferedDraw) { + surfWindow->Copy(rcMargin, Point(), *pixmapSelMargin); + } +} + +void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid) { + int ydiff = (rcTab.bottom - rcTab.top) / 2; + int xhead = rcTab.right - 1 - ydiff; + if (xhead <= rcTab.left) { + ydiff -= rcTab.left - xhead - 1; + xhead = rcTab.left - 1; + } + if ((rcTab.left + 2) < (rcTab.right - 1)) + surface->MoveTo(rcTab.left + 2, ymid); + else + surface->MoveTo(rcTab.right - 1, ymid); + surface->LineTo(rcTab.right - 1, ymid); + surface->LineTo(xhead, ymid - ydiff); + surface->MoveTo(rcTab.right - 1, ymid); + surface->LineTo(xhead, ymid + ydiff); +} + +LineLayout *Editor::RetrieveLineLayout(int lineNumber) { + int posLineStart = pdoc->LineStart(lineNumber); + int posLineEnd = pdoc->LineStart(lineNumber + 1); + PLATFORM_ASSERT(posLineEnd >= posLineStart); + int lineCaret = pdoc->LineFromPosition(currentPos); + return llc.Retrieve(lineNumber, lineCaret, + posLineEnd - posLineStart, pdoc->GetStyleClock(), + LinesOnScreen() + 1, pdoc->LinesTotal()); +} + +/** + * Fill in the LineLayout data for the given line. + * Copy the given @a line and its styles from the document into local arrays. + * Also determine the x position at which each character starts. + */ +void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width) { + if (!ll) + return; + + PLATFORM_ASSERT(line < pdoc->LinesTotal()); + PLATFORM_ASSERT(ll->chars != NULL); + int posLineStart = pdoc->LineStart(line); + int posLineEnd = pdoc->LineStart(line + 1); + // If the line is very long, limit the treatment to a length that should fit in the viewport + if (posLineEnd > (posLineStart + ll->maxLineLength)) { + posLineEnd = posLineStart + ll->maxLineLength; + } + if (ll->validity == LineLayout::llCheckTextAndStyle) { + int lineLength = posLineEnd - posLineStart; + if (!vstyle.viewEOL) { + int cid = posLineEnd - 1; + while ((cid > posLineStart) && IsEOLChar(pdoc->CharAt(cid))) { + cid--; + lineLength--; + } + } + if (lineLength == ll->numCharsInLine) { + // See if chars, styles, indicators, are all the same + bool allSame = true; + const int styleMask = pdoc->stylingBitsMask; + // Check base line layout + char styleByte = 0; + int numCharsInLine = 0; + while (numCharsInLine < lineLength) { + int charInDoc = numCharsInLine + posLineStart; + char chDoc = pdoc->CharAt(charInDoc); + styleByte = pdoc->StyleAt(charInDoc); + allSame = allSame && + (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); + allSame = allSame && + (ll->indicators[numCharsInLine] == static_cast(styleByte & ~styleMask)); + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) + allSame = allSame && + (ll->chars[numCharsInLine] == chDoc); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); + else // Style::caseUpper + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); + numCharsInLine++; + } + allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled + if (allSame) { + ll->validity = LineLayout::llPositions; + } else { + ll->validity = LineLayout::llInvalid; + } + } else { + ll->validity = LineLayout::llInvalid; + } + } + if (ll->validity == LineLayout::llInvalid) { + ll->widthLine = LineLayout::wrapWidthInfinite; + ll->lines = 1; + int numCharsInLine = 0; + if (vstyle.edgeState == EDGE_BACKGROUND) { + ll->edgeColumn = pdoc->FindColumn(line, theEdge); + if (ll->edgeColumn >= posLineStart) { + ll->edgeColumn -= posLineStart; + } + } else { + ll->edgeColumn = -1; + } + + char styleByte = 0; + int styleMask = pdoc->stylingBitsMask; + ll->styleBitsSet = 0; + // Fill base line layout + for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { + char chDoc = pdoc->CharAt(charInDoc); + styleByte = pdoc->StyleAt(charInDoc); + ll->styleBitsSet |= styleByte; + if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { + ll->chars[numCharsInLine] = chDoc; + ll->styles[numCharsInLine] = static_cast(styleByte & styleMask); + ll->indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) + ll->chars[numCharsInLine] = static_cast(toupper(chDoc)); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + ll->chars[numCharsInLine] = static_cast(tolower(chDoc)); + numCharsInLine++; + } + } + ll->xHighlightGuide = 0; + // Extra element at the end of the line to hold end x position and act as + ll->chars[numCharsInLine] = 0; // Also triggers processing in the loops as this is a control character + ll->styles[numCharsInLine] = styleByte; // For eolFilled + ll->indicators[numCharsInLine] = 0; + + // Layout the line, determining the position of each character, + // with an extra element at the end for the end of the line. + int startseg = 0; // Start of the current segment, in char. number + int startsegx = 0; // Start of the current segment, in pixels + ll->positions[0] = 0; + unsigned int tabWidth = vstyle.spaceWidth * pdoc->tabInChars; + bool lastSegItalics = false; + Font &ctrlCharsFont = vstyle.styles[STYLE_CONTROLCHAR].font; + + int ctrlCharWidth[32] = {0}; + bool isControlNext = IsControlCharacter(ll->chars[0]); + for (int charInLine = 0; charInLine < numCharsInLine; charInLine++) { + bool isControl = isControlNext; + isControlNext = IsControlCharacter(ll->chars[charInLine + 1]); + if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || + isControl || isControlNext) { + ll->positions[startseg] = 0; + if (vstyle.styles[ll->styles[charInLine]].visible) { + if (isControl) { + if (ll->chars[charInLine] == '\t') { + ll->positions[charInLine + 1] = ((((startsegx + 2) / + tabWidth) + 1) * tabWidth) - startsegx; + } else if (controlCharSymbol < 32) { + if (ctrlCharWidth[ll->chars[charInLine]] == 0) { + const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]); + // +3 For a blank on front and rounded edge each side: + ctrlCharWidth[ll->chars[charInLine]] = + surface->WidthText(ctrlCharsFont, ctrlChar, istrlen(ctrlChar)) + 3; + } + ll->positions[charInLine + 1] = ctrlCharWidth[ll->chars[charInLine]]; + } else { + char cc[2] = { static_cast(controlCharSymbol), '\0' }; + surface->MeasureWidths(ctrlCharsFont, cc, 1, + ll->positions + startseg + 1); + } + lastSegItalics = false; + } else { // Regular character + int lenSeg = charInLine - startseg + 1; + if ((lenSeg == 1) && (' ' == ll->chars[startseg])) { + lastSegItalics = false; + // Over half the segments are single characters and of these about half are space characters. + ll->positions[charInLine + 1] = vstyle.styles[ll->styles[charInLine]].spaceWidth; + } else { + lastSegItalics = vstyle.styles[ll->styles[charInLine]].italic; + posCache.MeasureWidths(surface, vstyle, ll->styles[charInLine], ll->chars + startseg, + lenSeg, ll->positions + startseg + 1); + } + } + } else { // invisible + for (int posToZero = startseg; posToZero <= (charInLine + 1); posToZero++) { + ll->positions[posToZero] = 0; + } + } + for (int posToIncrease = startseg; posToIncrease <= (charInLine + 1); posToIncrease++) { + ll->positions[posToIncrease] += startsegx; + } + startsegx = ll->positions[charInLine + 1]; + startseg = charInLine + 1; + } + } + // Small hack to make lines that end with italics not cut off the edge of the last character + if ((startseg > 0) && lastSegItalics) { + ll->positions[startseg] += 2; + } + ll->numCharsInLine = numCharsInLine; + ll->validity = LineLayout::llPositions; + } + // Hard to cope when too narrow, so just assume there is space + if (width < 20) { + width = 20; + } + if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { + ll->widthLine = width; + if (width == LineLayout::wrapWidthInfinite) { + ll->lines = 1; + } else if (width > ll->positions[ll->numCharsInLine]) { + // Simple common case where line does not need wrapping. + ll->lines = 1; + } else { + if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + width -= vstyle.aveCharWidth; // take into account the space for end wrap mark + } + ll->lines = 0; + // Calculate line start positions based upon width. + int lastGoodBreak = 0; + int lastLineStart = 0; + int startOffset = 0; + int p = 0; + while (p < ll->numCharsInLine) { + if ((ll->positions[p + 1] - startOffset) >= width) { + if (lastGoodBreak == lastLineStart) { + // Try moving to start of last character + if (p > 0) { + lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + } + if (lastGoodBreak == lastLineStart) { + // Ensure at least one character on line. + lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) + - posLineStart; + } + } + lastLineStart = lastGoodBreak; + ll->lines++; + ll->SetLineStart(ll->lines, lastGoodBreak); + startOffset = ll->positions[lastGoodBreak]; + // take into account the space for start wrap mark and indent + startOffset -= actualWrapVisualStartIndent * vstyle.aveCharWidth; + p = lastGoodBreak + 1; + continue; + } + if (p > 0) { + if (wrapState == eWrapChar) { + lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; + continue; + } else if (ll->styles[p] != ll->styles[p - 1]) { + lastGoodBreak = p; + } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { + lastGoodBreak = p; + } + } + p++; + } + ll->lines++; + } + ll->validity = LineLayout::llLines; + } +} + +ColourAllocated Editor::SelectionBackground(ViewStyle &vsDraw) { + return primarySelection ? vsDraw.selbackground.allocated : vsDraw.selbackground2.allocated; +} + +ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, + ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) { + if (inSelection) { + if (vsDraw.selbackset && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw); + } + } else { + if ((vsDraw.edgeState == EDGE_BACKGROUND) && + (i >= ll->edgeColumn) && + !IsEOLChar(ll->chars[i])) + return vsDraw.edgecolour.allocated; + if (inHotspot && vsDraw.hotspotBackgroundSet) + return vsDraw.hotspotBackground.allocated; + if (overrideBackground && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) + return background; + } + return vsDraw.styles[styleMain].back.allocated; +} + +void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { + Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, + highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); +} + +void Editor::DrawWrapMarker(Surface *surface, PRectangle rcPlace, + bool isEndMarker, ColourAllocated wrapColour) { + surface->PenColour(wrapColour); + + enum { xa = 1 }; // gap before start + int w = rcPlace.right - rcPlace.left - xa - 1; + + bool xStraight = isEndMarker; // x-mirrored symbol for start marker + bool yStraight = true; + //bool yStraight= isEndMarker; // comment in for start marker y-mirrowed + + int x0 = xStraight ? rcPlace.left : rcPlace.right - 1; + int y0 = yStraight ? rcPlace.top : rcPlace.bottom - 1; + + int dy = (rcPlace.bottom - rcPlace.top) / 5; + int y = (rcPlace.bottom - rcPlace.top) / 2 + dy; + + struct Relative { + Surface *surface; + int xBase; + int xDir; + int yBase; + int yDir; + void MoveTo(int xRelative, int yRelative) { + surface->MoveTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + void LineTo(int xRelative, int yRelative) { + surface->LineTo(xBase + xDir * xRelative, yBase + yDir * yRelative); + } + }; + Relative rel = {surface, x0, xStraight ? 1 : -1, y0, yStraight ? 1 : -1}; + + // arrow head + rel.MoveTo(xa, y); + rel.LineTo(xa + 2*w / 3, y - dy); + rel.MoveTo(xa, y); + rel.LineTo(xa + 2*w / 3, y + dy); + + // arrow body + rel.MoveTo(xa, y); + rel.LineTo(xa + w, y); + rel.LineTo(xa + w, y - 2 * dy); + rel.LineTo(xa - 1, // on windows lineto is exclusive endpoint, perhaps GTK not... + y - 2 * dy); +} + +static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourAllocated fill, int alpha) { + if (alpha != SC_ALPHA_NOALPHA) { + surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); + } +} + +void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background, + bool drawWrapMarkEnd, ColourAllocated wrapColour) { + + int styleMask = pdoc->stylingBitsMask; + PRectangle rcSegment = rcLine; + + // Fill in a PRectangle representing the end of line characters + int xEol = ll->positions[lineEnd] - subLineStart; + rcSegment.left = xEol + xStart; + rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; + int posLineEnd = pdoc->LineStart(line + 1); + bool eolInSelection = (subLine == (ll->lines - 1)) && + (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd); + + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw)); + } else { + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + rcSegment.left = xEol + vsDraw.aveCharWidth + xStart; + rcSegment.right = rcLine.right; + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } + + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw)); + } else { + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } + if (vsDraw.selEOLFilled && eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1) && (vsDraw.selAlpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + if (drawWrapMarkEnd) { + PRectangle rcPlace = rcSegment; + + if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { + rcPlace.left = xEol + xStart; + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + } else { + // draw left of the right text margin, to avoid clipping by the current clip rect + rcPlace.right = rcLine.right - vs.rightMarginWidth; + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + } + DrawWrapMarker(surface, rcPlace, true, wrapColour); + } +} + +void Editor::DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under) { + // Draw decorators + const int posLineStart = pdoc->LineStart(line); + const int lineStart = ll->LineStart(subLine); + const int subLineStart = ll->positions[lineStart]; + const int posLineEnd = posLineStart + lineEnd; + + if (!under) { + // Draw indicators + // foreach indicator... + for (int indicnum = 0, mask = 1 << pdoc->stylingBits; mask < 0x100; indicnum++) { + if (!(mask & ll->styleBitsSet)) { + mask <<= 1; + continue; + } + int startPos = -1; + // foreach style pos in line... + for (int indicPos = lineStart; indicPos <= lineEnd; indicPos++) { + // look for starts... + if (startPos < 0) { + // NOT in indicator run, looking for START + if (indicPos < lineEnd && (ll->indicators[indicPos] & mask)) + startPos = indicPos; + } + // ... or ends + if (startPos >= 0) { + // IN indicator run, looking for END + if (indicPos >= lineEnd || !(ll->indicators[indicPos] & mask)) { + // AT end of indicator run, DRAW it! + PRectangle rcIndic( + ll->positions[startPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent, + ll->positions[indicPos] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent + 3); + vsDraw.indicators[indicnum].Draw(surface, rcIndic, rcLine); + // RESET control var + startPos = -1; + } + } + } + mask <<= 1; + } + } + + for (Decoration *deco=pdoc->decorations.root; deco; deco = deco->next) { + if (under == vsDraw.indicators[deco->indicator].under) { + int startPos = posLineStart + subLineStart; + if (!deco->rs.ValueAt(startPos)) { + startPos = deco->rs.EndRun(startPos); + } + while ((startPos < posLineEnd) && (deco->rs.ValueAt(startPos))) { + int endPos = deco->rs.EndRun(startPos); + if (endPos > posLineEnd) + endPos = posLineEnd; + PRectangle rcIndic( + ll->positions[startPos - posLineStart] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent, + ll->positions[endPos - posLineStart] + xStart - subLineStart, + rcLine.top + vsDraw.maxAscent + 3); + vsDraw.indicators[deco->indicator].Draw(surface, rcIndic, rcLine); + startPos = deco->rs.EndRun(endPos); + } + } + } +} + +void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine) { + + PRectangle rcSegment = rcLine; + + // Using one font for all control characters so it can be controlled independently to ensure + // the box goes around the characters tightly. Seems to be no way to work out what height + // is taken by an individual character - internal leading gives varying results. + Font &ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; + + // See if something overrides the line background color: Either if caret is on the line + // and background color is set for that, or if a marker is defined that forces its background + // color onto the line, or if a marker is defined but has no selection margin in which to + // display itself (as long as it's not an SC_MARK_EMPTY marker). These are checked in order + // with the earlier taking precedence. When multiple markers cause background override, + // the color for the highest numbered one is used. + bool overrideBackground = false; + ColourAllocated background; + if (caret.active && vsDraw.showCaretLineBackground && (vsDraw.caretLineAlpha == SC_ALPHA_NOALPHA) && ll->containsCaret) { + overrideBackground = true; + background = vsDraw.caretLineBackground.allocated; + } + if (!overrideBackground) { + int marks = pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + background = vsDraw.markers[markBit].back.allocated; + overrideBackground = true; + } + marks >>= 1; + } + } + if (!overrideBackground) { + if (vsDraw.maskInLine) { + int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine; + if (marksMasked) { + for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { + if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { + overrideBackground = true; + background = vsDraw.markers[markBit].back.allocated; + } + marksMasked >>= 1; + } + } + } + } + + bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) && + (!overrideBackground) && (vsDraw.whitespaceBackgroundSet); + + bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. + int indentWidth = pdoc->IndentSize() * vsDraw.spaceWidth; + + int posLineStart = pdoc->LineStart(line); + + int startseg = ll->LineStart(subLine); + int subLineStart = ll->positions[startseg]; + int lineStart = 0; + int lineEnd = 0; + if (subLine < ll->lines) { + lineStart = ll->LineStart(subLine); + lineEnd = ll->LineStart(subLine + 1); + } + + ColourAllocated wrapColour = vsDraw.styles[STYLE_DEFAULT].fore.allocated; + if (vsDraw.whitespaceForegroundSet) + wrapColour = vsDraw.whitespaceForeground.allocated; + + bool drawWrapMarkEnd = false; + + if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) { + if (subLine + 1 < ll->lines) { + drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; + } + } + + if (actualWrapVisualStartIndent != 0) { + + bool continuedWrapLine = false; + if (subLine < ll->lines) { + continuedWrapLine = ll->LineStart(subLine) != 0; + } + + if (continuedWrapLine) { + // draw continuation rect + PRectangle rcPlace = rcSegment; + + rcPlace.left = ll->positions[startseg] + xStart - subLineStart; + rcPlace.right = rcPlace.left + actualWrapVisualStartIndent * vsDraw.aveCharWidth; + + // default bgnd here.. + surface->FillRectangle(rcSegment, overrideBackground ? background : + vsDraw.styles[STYLE_DEFAULT].back.allocated); + + // main line style would be below but this would be inconsistent with end markers + // also would possibly not be the style at wrap point + //int styleMain = ll->styles[lineStart]; + //surface->FillRectangle(rcPlace, vsDraw.styles[styleMain].back.allocated); + + if (wrapVisualFlags & SC_WRAPVISUALFLAG_START) { + + if (wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) + rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; + else + rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; + + DrawWrapMarker(surface, rcPlace, false, wrapColour); + } + + xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth; + } + } + + // Does not take margin into account but not significant + int xStartVisible = subLineStart - xStart; + + BreakFinder bfBack(ll, lineStart, lineEnd, posLineStart, xStartVisible); + int next = bfBack.First(); + + // Background drawing loop + while (twoPhaseDraw && (next < lineEnd)) { + + startseg = next; + next = bfBack.Next(); + int i = next - 1; + int iDoc = i + posLineStart; + + rcSegment.left = ll->positions[startseg] + xStart - subLineStart; + rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { + // Clip to line rectangle, since may have a huge position which will not work with some platforms + rcSegment.left = Platform::Maximum(rcSegment.left, rcLine.left); + rcSegment.right = Platform::Minimum(rcSegment.right, rcLine.right); + + int styleMain = ll->styles[i]; + bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); + if (ll->chars[i] == '\t') { + // Tab display + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceBackground.allocated; + surface->FillRectangle(rcSegment, textBack); + } else if (IsControlCharacter(ll->chars[i])) { + // Control character display + inIndentation = false; + surface->FillRectangle(rcSegment, textBack); + } else { + // Normal text display + surface->FillRectangle(rcSegment, textBack); + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { + for (int cpos = 0; cpos <= i - startseg; cpos++) { + if (ll->chars[cpos + startseg] == ' ') { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, + ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); + surface->FillRectangle(rcSpace, vsDraw.whitespaceBackground.allocated); + } + } else { + inIndentation = false; + } + } + } + } + } else if (rcSegment.left > rcLine.right) { + break; + } + } + + if (twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background, + drawWrapMarkEnd, wrapColour); + } + + DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, true); + + if (vsDraw.edgeState == EDGE_LINE) { + int edgeX = theEdge * vsDraw.spaceWidth; + rcSegment.left = edgeX + xStart; + rcSegment.right = rcSegment.left + 1; + surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated); + } + + inIndentation = subLine == 0; // Do not handle indentation except on first subline. + // Foreground drawing loop + BreakFinder bfFore(ll, lineStart, lineEnd, posLineStart, xStartVisible); + next = bfFore.First(); + + while (next < lineEnd) { + + startseg = next; + next = bfFore.Next(); + int i = next - 1; + + int iDoc = i + posLineStart; + + rcSegment.left = ll->positions[startseg] + xStart - subLineStart; + rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { + int styleMain = ll->styles[i]; + ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated; + Font &textFont = vsDraw.styles[styleMain].font; + //hotspot foreground + if (ll->hsStart != -1 && iDoc >= ll->hsStart && iDoc < hsEnd) { + if (vsDraw.hotspotForegroundSet) + textFore = vsDraw.hotspotForeground.allocated; + } + bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); + if (inSelection && (vsDraw.selforeset)) { + textFore = vsDraw.selforeground.allocated; + } + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); + if (ll->chars[i] == '\t') { + // Tab display + if (!twoPhaseDraw) { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceBackground.allocated; + surface->FillRectangle(rcSegment, textBack); + } + if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { + if (vsDraw.whitespaceForegroundSet) + textFore = vsDraw.whitespaceForeground.allocated; + surface->PenColour(textFore); + } + if (inIndentation && vsDraw.viewIndentationGuides) { + for (int xIG = ll->positions[i] / indentWidth * indentWidth; xIG < ll->positions[i + 1]; xIG += indentWidth) { + if (xIG >= ll->positions[i] && xIG > 0) { + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIG + xStart, rcSegment, + (ll->xHighlightGuide == xIG)); + } + } + } + if (vsDraw.viewWhitespace != wsInvisible) { + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); + } + } + } else if (IsControlCharacter(ll->chars[i])) { + // Control character display + inIndentation = false; + if (controlCharSymbol < 32) { + // Draw the character + const char *ctrlChar = ControlCharacterString(ll->chars[i]); + if (!twoPhaseDraw) { + surface->FillRectangle(rcSegment, textBack); + } + int normalCharHeight = surface->Ascent(ctrlCharsFont) - + surface->InternalLeading(ctrlCharsFont); + PRectangle rcCChar = rcSegment; + rcCChar.left = rcCChar.left + 1; + rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; + rcCChar.bottom = rcSegment.top + vsDraw.maxAscent + 1; + PRectangle rcCentral = rcCChar; + rcCentral.top++; + rcCentral.bottom--; + surface->FillRectangle(rcCentral, textFore); + PRectangle rcChar = rcCChar; + rcChar.left++; + rcChar.right--; + surface->DrawTextClipped(rcChar, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, ctrlChar, istrlen(ctrlChar), + textBack, textFore); + } else { + char cc[2] = { static_cast(controlCharSymbol), '\0' }; + surface->DrawTextNoClip(rcSegment, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, + cc, 1, textBack, textFore); + } + } else { + // Normal text display + if (vsDraw.styles[styleMain].visible) { + if (twoPhaseDraw) { + surface->DrawTextTransparent(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore); + } else { + surface->DrawTextNoClip(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore, textBack); + } + } + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { + for (int cpos = 0; cpos <= i - startseg; cpos++) { + if (ll->chars[cpos + startseg] == ' ') { + if (vsDraw.viewWhitespace != wsInvisible) { + if (vsDraw.whitespaceForegroundSet) + textFore = vsDraw.whitespaceForeground.allocated; + if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { + int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; + if (!twoPhaseDraw && drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + textBack = vsDraw.whitespaceBackground.allocated; + PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); + surface->FillRectangle(rcSpace, textBack); + } + PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + rcDot.right = rcDot.left + 1; + rcDot.bottom = rcDot.top + 1; + surface->FillRectangle(rcDot, textFore); + } + } + if (inIndentation && vsDraw.viewIndentationGuides) { + int startSpace = ll->positions[cpos + startseg]; + if (startSpace > 0 && (startSpace % indentWidth == 0)) { + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, startSpace + xStart, rcSegment, + (ll->xHighlightGuide == ll->positions[cpos + startseg])); + } + } + } else { + inIndentation = false; + } + } + } + } + if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + if (vsDraw.hotspotForegroundSet) + surface->FillRectangle(rcUL, vsDraw.hotspotForeground.allocated); + else + surface->FillRectangle(rcUL, textFore); + } else if (vsDraw.styles[styleMain].underline) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + surface->FillRectangle(rcUL, textFore); + } + } else if (rcSegment.left > rcLine.right) { + break; + } + } + + DrawIndicators(surface, vsDraw, line, xStart, rcLine, ll, subLine, lineEnd, false); + + // End of the drawing of the current line + if (!twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background, + drawWrapMarkEnd, wrapColour); + } + if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) && (ll->selStart >= 0) && (ll->selEnd >= 0)) { + int startPosSel = (ll->selStart < posLineStart) ? posLineStart : ll->selStart; + int endPosSel = (ll->selEnd < (lineEnd + posLineStart)) ? ll->selEnd : (lineEnd + posLineStart); + if (startPosSel < endPosSel) { + rcSegment.left = xStart + ll->positions[startPosSel - posLineStart] - subLineStart; + rcSegment.right = xStart + ll->positions[endPosSel - posLineStart] - subLineStart; + rcSegment.left = Platform::Maximum(rcSegment.left, rcLine.left); + rcSegment.right = Platform::Minimum(rcSegment.right, rcLine.right); + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw), vsDraw.selAlpha); + } + } + + // Draw any translucent whole line states + rcSegment.left = xStart; + rcSegment.right = rcLine.right - 1; + if (caret.active && vsDraw.showCaretLineBackground && ll->containsCaret) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.caretLineBackground.allocated, vsDraw.caretLineAlpha); + } + int marks = pdoc->GetMark(line); + for (int markBit = 0; (markBit < 32) && marks; markBit++) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND)) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); + } + marks >>= 1; + } + if (vsDraw.maskInLine) { + int marksMasked = pdoc->GetMark(line) & vsDraw.maskInLine; + if (marksMasked) { + for (int markBit = 0; (markBit < 32) && marksMasked; markBit++) { + if ((marksMasked & 1) && (vsDraw.markers[markBit].markType != SC_MARK_EMPTY)) { + SimpleAlphaRectangle(surface, rcSegment, vsDraw.markers[markBit].back.allocated, vsDraw.markers[markBit].alpha); + } + marksMasked >>= 1; + } + } + } +} + +void Editor::DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret) { + + int lineStart = ll->LineStart(subLine); + int posBefore = posCaret; + int posAfter = MovePositionOutsideChar(posCaret+1, 1); + int numCharsToDraw = posAfter - posCaret; + + // Work out where the starting and ending offsets are. We need to + // see if the previous character shares horizontal space, such as a + // glyph / combining character. If so we'll need to draw that too. + int offsetFirstChar = offset; + int offsetLastChar = offset + (posAfter - posCaret); + while ((offsetLastChar - numCharsToDraw) >= lineStart) { + if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - numCharsToDraw]) > 0) { + // The char does not share horizontal space + break; + } + // Char shares horizontal space, update the numChars to draw + // Update posBefore to point to the prev char + posBefore = MovePositionOutsideChar(posBefore-1, -1); + numCharsToDraw = posAfter - posBefore; + offsetFirstChar = offset - (posCaret - posBefore); + } + + // See if the next character shares horizontal space, if so we'll + // need to draw that too. + numCharsToDraw = offsetLastChar - offsetFirstChar; + while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) { + // Update posAfter to point to the 2nd next char, this is where + // the next character ends, and 2nd next begins. We'll need + // to compare these two + posBefore = posAfter; + posAfter = MovePositionOutsideChar(posAfter+1, 1); + offsetLastChar = offset + (posAfter - posCaret); + if ((ll->positions[offsetLastChar] - ll->positions[offsetLastChar - (posAfter - posBefore)]) > 0) { + // The char does not share horizontal space + break; + } + // Char shares horizontal space, update the numChars to draw + numCharsToDraw = offsetLastChar - offsetFirstChar; + } + + // We now know what to draw, update the caret drawing rectangle + rcCaret.left = ll->positions[offsetFirstChar] - ll->positions[ll->LineStart(subLine)] + xStart; + rcCaret.right = ll->positions[offsetFirstChar+numCharsToDraw] - ll->positions[ll->LineStart(subLine)] + xStart; + + // This character is where the caret block is, we override the colours + // (inversed) for drawing the caret here. + int styleMain = ll->styles[offsetFirstChar]; + surface->DrawTextClipped(rcCaret, vsDraw.styles[styleMain].font, + rcCaret.top + vsDraw.maxAscent, ll->chars + offsetFirstChar, + numCharsToDraw, vsDraw.styles[styleMain].back.allocated, + vsDraw.caretcolour.allocated); +} + +void Editor::RefreshPixMaps(Surface *surfaceWindow) { + if (!pixmapSelPattern->Initialised()) { + const int patternSize = 8; + pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); + // This complex procedure is to reproduce the checkerboard dithered pattern used by windows + // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half + // way between the chrome colour and the chrome highlight colour making a nice transition + // between the window chrome and the content area. And it works in low colour depths. + PRectangle rcPattern(0, 0, patternSize, patternSize); + + // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. + ColourAllocated colourFMFill = vs.selbar.allocated; + ColourAllocated colourFMStripes = vs.selbarlight.allocated; + + if (!(vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff))) { + // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. + // (Typically, the highlight colour is white.) + colourFMFill = vs.selbarlight.allocated; + } + + if (vs.foldmarginColourSet) { + // override default fold margin colour + colourFMFill = vs.foldmarginColour.allocated; + } + if (vs.foldmarginHighlightColourSet) { + // override default fold margin highlight colour + colourFMStripes = vs.foldmarginHighlightColour.allocated; + } + + pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); + pixmapSelPattern->PenColour(colourFMStripes); + for (int stripe = 0; stripe < patternSize; stripe++) { + // Alternating 1 pixel stripes is same as checkerboard. + pixmapSelPattern->MoveTo(0, stripe * 2); + pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize); + } + } + + if (!pixmapIndentGuide->Initialised()) { + // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line + pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); + pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); + PRectangle rcIG(0, 0, 1, vs.lineHeight); + pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); + pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); + pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated); + pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated); + for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { + pixmapIndentGuide->MoveTo(0, stripe); + pixmapIndentGuide->LineTo(2, stripe); + pixmapIndentGuideHighlight->MoveTo(0, stripe); + pixmapIndentGuideHighlight->LineTo(2, stripe); + } + } + + if (bufferedDraw) { + if (!pixmapLine->Initialised()) { + PRectangle rcClient = GetClientRectangle(); + pixmapLine->InitPixMap(rcClient.Width(), vs.lineHeight, + surfaceWindow, wMain.GetID()); + pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, + rcClient.Height(), surfaceWindow, wMain.GetID()); + } + } +} + +void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { + //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", + // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); + + RefreshStyleData(); + RefreshPixMaps(surfaceWindow); + + PRectangle rcClient = GetClientRectangle(); + //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", + // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); + + surfaceWindow->SetPalette(&palette, true); + pixmapLine->SetPalette(&palette, !hasFocus); + + int screenLinePaintFirst = rcArea.top / vs.lineHeight; + // The area to be painted plus one extra line is styled. + // The extra line is to determine when a style change, such as starting a comment flows on to other lines. + int lineStyleLast = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1; + //Platform::DebugPrintf("Paint lines = %d .. %d\n", topLine + screenLinePaintFirst, lineStyleLast); + int endPosPaint = pdoc->Length(); + if (lineStyleLast < cs.LinesDisplayed()) + endPosPaint = pdoc->LineStart(cs.DocFromDisplay(lineStyleLast + 1)); + + int xStart = vs.fixedColumnWidth - xOffset; + int ypos = 0; + if (!bufferedDraw) + ypos += screenLinePaintFirst * vs.lineHeight; + int yposScreen = screenLinePaintFirst * vs.lineHeight; + + // Ensure we are styled as far as we are painting. + pdoc->EnsureStyledTo(endPosPaint); + bool paintAbandonedByStyling = paintState == paintAbandoned; + if (needUpdateUI) { + NotifyUpdateUI(); + needUpdateUI = false; + RefreshStyleData(); + RefreshPixMaps(surfaceWindow); + } + + // Call priority lines wrap on a window of lines which are likely + // to rendered with the following paint (that is wrap the visible + // lines first). + int startLineToWrap = cs.DocFromDisplay(topLine) - 5; + if (startLineToWrap < 0) + startLineToWrap = -1; + if (WrapLines(false, startLineToWrap)) { + // The wrapping process has changed the height of some lines so + // abandon this paint for a complete repaint. + if (AbandonPaint()) { + return; + } + RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change + } + PLATFORM_ASSERT(pixmapSelPattern->Initialised()); + + PaintSelMargin(surfaceWindow, rcArea); + + PRectangle rcRightMargin = rcClient; + rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; + if (rcArea.Intersects(rcRightMargin)) { + surfaceWindow->FillRectangle(rcRightMargin, vs.styles[STYLE_DEFAULT].back.allocated); + } + + if (paintState == paintAbandoned) { + // Either styling or NotifyUpdateUI noticed that painting is needed + // outside the current painting rectangle + //Platform::DebugPrintf("Abandoning paint\n"); + if (wrapState != eWrapNone) { + if (paintAbandonedByStyling) { + // Styling has spilled over a line end, such as occurs by starting a multiline + // comment. The width of subsequent text may have changed, so rewrap. + NeedWrapping(cs.DocFromDisplay(topLine)); + } + } + return; + } + //Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset); + + // Do the painting + if (rcArea.right > vs.fixedColumnWidth) { + + Surface *surface = surfaceWindow; + if (bufferedDraw) { + surface = pixmapLine; + PLATFORM_ASSERT(pixmapLine->Initialised()); + } + surface->SetUnicodeMode(IsUnicodeMode()); + surface->SetDBCSMode(CodePage()); + + int visibleLine = topLine + screenLinePaintFirst; + + int posCaret = currentPos; + if (posDrag >= 0) + posCaret = posDrag; + int lineCaret = pdoc->LineFromPosition(posCaret); + + // Remove selection margin from drawing area so text will not be drawn + // on it in unbuffered mode. + PRectangle rcTextArea = rcClient; + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + surfaceWindow->SetClip(rcTextArea); + + // Loop on visible lines + //double durLayout = 0.0; + //double durPaint = 0.0; + //double durCopy = 0.0; + //ElapsedTime etWhole; + int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times + AutoLineLayout ll(llc, 0); + SelectionLineIterator lineIterator(this); + while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { + + int lineDoc = cs.DocFromDisplay(visibleLine); + // Only visible lines should be handled by the code within the loop + PLATFORM_ASSERT(cs.GetVisible(lineDoc)); + int lineStartSet = cs.DisplayFromDoc(lineDoc); + int subLine = visibleLine - lineStartSet; + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + //ElapsedTime et; + if (lineDoc != lineDocPrevious) { + ll.Set(0); + // For rectangular selection this accesses the layout cache so should be after layout returned. + lineIterator.SetAt(lineDoc); + ll.Set(RetrieveLineLayout(lineDoc)); + LayoutLine(lineDoc, surface, vs, ll, wrapWidth); + lineDocPrevious = lineDoc; + } + //durLayout += et.Duration(true); + + if (ll) { + if (selType == selStream) { + ll->selStart = SelectionStart(); + ll->selEnd = SelectionEnd(); + } else { + ll->selStart = lineIterator.startPos; + ll->selEnd = lineIterator.endPos; + } + ll->containsCaret = lineDoc == lineCaret; + if (hideSelection) { + ll->selStart = -1; + ll->selEnd = -1; + ll->containsCaret = false; + } + + GetHotSpotRange(ll->hsStart, ll->hsEnd); + + PRectangle rcLine = rcClient; + rcLine.top = ypos; + rcLine.bottom = ypos + vs.lineHeight; + + Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1)); + // Highlight the current braces if any + ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), + highlightGuideColumn * vs.spaceWidth); + + // Draw the line + DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); + //durPaint += et.Duration(true); + + // Restore the previous styles for the brace highlights in case layout is in cache. + ll->RestoreBracesHighlight(rangeLine, braces); + + bool expanded = cs.GetExpanded(lineDoc); + if ((foldFlags & SC_FOLDFLAG_BOX) == 0) { + // Paint the line above the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + // Paint the line below the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + } else { + int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK) & ~(0xFFF0000); + int indentationStep = pdoc->IndentSize(); + // Draw line above fold + if ((FoldLevelPrev < FoldLevelCurr) + || + (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG + && + (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + + // Line below the fold (or below a contracted fold) + if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + + PRectangle rcBoxLine = rcLine; + // Draw vertical line for every fold level + for (int i = 0; i <= FoldLevelCurr; i++) { + rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1; + rcBoxLine.right = rcBoxLine.left + 1; + surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + + // Draw the Caret + if (lineDoc == lineCaret) { + int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); + if ((offset >= ll->LineStart(subLine)) && + ((offset < ll->LineStart(subLine + 1)) || offset == ll->numCharsInLine)) { + int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart; + + if (actualWrapVisualStartIndent != 0) { + int lineStart = ll->LineStart(subLine); + if (lineStart != 0) // Wrapped + xposCaret += actualWrapVisualStartIndent * vs.aveCharWidth; + } + if ((xposCaret >= 0) && (vs.caretWidth > 0) && (vs.caretStyle != CARETSTYLE_INVISIBLE) && + ((posDrag >= 0) || (caret.active && caret.on))) { + bool caretAtEOF = false; + bool caretAtEOL = false; + bool drawBlockCaret = false; + int widthOverstrikeCaret; + int caretWidthOffset = 0; + PRectangle rcCaret = rcLine; + + if (posCaret == pdoc->Length()) { // At end of document + caretAtEOF = true; + widthOverstrikeCaret = vs.aveCharWidth; + } else if ((posCaret - rangeLine.start) >= ll->numCharsInLine) { // At end of line + caretAtEOL = true; + widthOverstrikeCaret = vs.aveCharWidth; + } else { + widthOverstrikeCaret = ll->positions[offset + 1] - ll->positions[offset]; + } + if (widthOverstrikeCaret < 3) // Make sure its visible + widthOverstrikeCaret = 3; + + if (offset > 0) + caretWidthOffset = 1; // Move back so overlaps both character cells. + if (posDrag >= 0) { + /* Dragging text, use a line caret */ + rcCaret.left = xposCaret - caretWidthOffset; + rcCaret.right = rcCaret.left + vs.caretWidth; + } else if (inOverstrike) { + /* Overstrike (insert mode), use a modified bar caret */ + rcCaret.top = rcCaret.bottom - 2; + rcCaret.left = xposCaret + 1; + rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; + } else if (vs.caretStyle == CARETSTYLE_BLOCK) { + /* Block caret */ + rcCaret.left = xposCaret; + if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { + drawBlockCaret = true; + rcCaret.right = xposCaret + widthOverstrikeCaret; + } else { + rcCaret.right = xposCaret + vs.aveCharWidth; + } + } else { + /* Line caret */ + rcCaret.left = xposCaret - caretWidthOffset; + rcCaret.right = rcCaret.left + vs.caretWidth; + } + if (drawBlockCaret) { + DrawBlockCaret(surface, vs, ll, subLine, xStart, offset, posCaret, rcCaret); + } else { + surface->FillRectangle(rcCaret, vs.caretcolour.allocated); + } + } + } + } + + if (bufferedDraw) { + Point from(vs.fixedColumnWidth, 0); + PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, + rcClient.right, yposScreen + vs.lineHeight); + surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); + } + //durCopy += et.Duration(true); + } + + if (!bufferedDraw) { + ypos += vs.lineHeight; + } + + yposScreen += vs.lineHeight; + visibleLine++; + //gdk_flush(); + } + ll.Set(0); + //if (durPaint < 0.00000001) + // durPaint = 0.00000001; + + // Right column limit indicator + PRectangle rcBeyondEOF = rcClient; + rcBeyondEOF.left = vs.fixedColumnWidth; + rcBeyondEOF.right = rcBeyondEOF.right; + rcBeyondEOF.top = (cs.LinesDisplayed() - topLine) * vs.lineHeight; + if (rcBeyondEOF.top < rcBeyondEOF.bottom) { + surfaceWindow->FillRectangle(rcBeyondEOF, vs.styles[STYLE_DEFAULT].back.allocated); + if (vs.edgeState == EDGE_LINE) { + int edgeX = theEdge * vs.spaceWidth; + rcBeyondEOF.left = edgeX + xStart; + rcBeyondEOF.right = rcBeyondEOF.left + 1; + surfaceWindow->FillRectangle(rcBeyondEOF, vs.edgecolour.allocated); + } + } + //Platform::DebugPrintf( + //"Layout:%9.6g Paint:%9.6g Ratio:%9.6g Copy:%9.6g Total:%9.6g\n", + //durLayout, durPaint, durLayout / durPaint, durCopy, etWhole.Duration()); + NotifyPainted(); + } +} + +// Space (3 space characters) between line numbers and text when printing. +#define lineNumberPrintSpace " " + +ColourDesired InvertedLight(ColourDesired orig) { + unsigned int r = orig.GetRed(); + unsigned int g = orig.GetGreen(); + unsigned int b = orig.GetBlue(); + unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye + unsigned int il = 0xff - l; + if (l == 0) + return ColourDesired(0xff, 0xff, 0xff); + r = r * il / l; + g = g * il / l; + b = b * il / l; + return ColourDesired(Platform::Minimum(r, 0xff), Platform::Minimum(g, 0xff), Platform::Minimum(b, 0xff)); +} + +// This is mostly copied from the Paint method but with some things omitted +// such as the margin markers, line numbers, selection and caret +// Should be merged back into a combined Draw method. +long Editor::FormatRange(bool draw, RangeToFormat *pfr) { + if (!pfr) + return 0; + + AutoSurface surface(pfr->hdc, this); + if (!surface) + return 0; + AutoSurface surfaceMeasure(pfr->hdcTarget, this); + if (!surfaceMeasure) { + return 0; + } + + // Can't use measurements cached for screen + posCache.Clear(); + + ViewStyle vsPrint(vs); + + // Modify the view style for printing as do not normally want any of the transient features to be printed + // Printing supports only the line number margin. + int lineNumberIndex = -1; + for (int margin = 0; margin < ViewStyle::margins; margin++) { + if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { + lineNumberIndex = margin; + } else { + vsPrint.ms[margin].width = 0; + } + } + vsPrint.showMarkedLines = false; + vsPrint.fixedColumnWidth = 0; + vsPrint.zoomLevel = printMagnification; + vsPrint.viewIndentationGuides = false; + // Don't show the selection when printing + vsPrint.selbackset = false; + vsPrint.selforeset = false; + vsPrint.selAlpha = SC_ALPHA_NOALPHA; + vsPrint.whitespaceBackgroundSet = false; + vsPrint.whitespaceForegroundSet = false; + vsPrint.showCaretLineBackground = false; + + // Set colours for printing according to users settings + for (int sty = 0;sty <= STYLE_MAX;sty++) { + if (printColourMode == SC_PRINT_INVERTLIGHT) { + vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); + vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); + } else if (printColourMode == SC_PRINT_BLACKONWHITE) { + vsPrint.styles[sty].fore.desired = ColourDesired(0, 0, 0); + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } else if (printColourMode == SC_PRINT_COLOURONWHITE) { + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } else if (printColourMode == SC_PRINT_COLOURONWHITEDEFAULTBG) { + if (sty <= STYLE_DEFAULT) { + vsPrint.styles[sty].back.desired = ColourDesired(0xff, 0xff, 0xff); + } + } + } + // White background for the line numbers + vsPrint.styles[STYLE_LINENUMBER].back.desired = ColourDesired(0xff, 0xff, 0xff); + + vsPrint.Refresh(*surfaceMeasure); + // Determining width must hapen after fonts have been realised in Refresh + int lineNumberWidth = 0; + if (lineNumberIndex >= 0) { + lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace)); + vsPrint.ms[lineNumberIndex].width = lineNumberWidth; + vsPrint.Refresh(*surfaceMeasure); // Recalculate fixedColumnWidth + } + // Ensure colours are set up + vsPrint.RefreshColourPalette(palette, true); + vsPrint.RefreshColourPalette(palette, false); + + int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin); + int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; + if (linePrintLast < linePrintStart) + linePrintLast = linePrintStart; + int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax); + if (linePrintLast > linePrintMax) + linePrintLast = linePrintMax; + //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", + // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, + // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); + int endPosPrint = pdoc->Length(); + if (linePrintLast < pdoc->LinesTotal()) + endPosPrint = pdoc->LineStart(linePrintLast + 1); + + // Ensure we are styled to where we are formatting. + pdoc->EnsureStyledTo(endPosPrint); + + int xStart = vsPrint.fixedColumnWidth + pfr->rc.left; + int ypos = pfr->rc.top; + + int lineDoc = linePrintStart; + + int nPrintPos = pfr->chrg.cpMin; + int visibleLine = 0; + int widthPrint = pfr->rc.Width() - vsPrint.fixedColumnWidth; + if (printWrapState == eWrapNone) + widthPrint = LineLayout::wrapWidthInfinite; + + while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { + + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + surfaceMeasure->FlushCachedState(); + + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + LineLayout ll(8000); + LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); + + ll.selStart = -1; + ll.selEnd = -1; + ll.containsCaret = false; + + PRectangle rcLine; + rcLine.left = pfr->rc.left; + rcLine.top = ypos; + rcLine.right = pfr->rc.right - 1; + rcLine.bottom = ypos + vsPrint.lineHeight; + + // When document line is wrapped over multiple display lines, find where + // to start printing from to ensure a particular position is on the first + // line of the page. + if (visibleLine == 0) { + int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc); + for (int iwl = 0; iwl < ll.lines - 1; iwl++) { + if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { + visibleLine = -iwl; + } + } + + if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { + visibleLine = -(ll.lines - 1); + } + } + + if (draw && lineNumberWidth && + (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && + (visibleLine >= 0)) { + char number[100]; + sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); + PRectangle rcNumber = rcLine; + rcNumber.right = rcNumber.left + lineNumberWidth; + // Right justify + rcNumber.left = rcNumber.right - surfaceMeasure->WidthText( + vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number)); + surface->FlushCachedState(); + surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, + ypos + vsPrint.maxAscent, number, istrlen(number), + vsPrint.styles[STYLE_LINENUMBER].fore.allocated, + vsPrint.styles[STYLE_LINENUMBER].back.allocated); + } + + // Draw the line + surface->FlushCachedState(); + + for (int iwl = 0; iwl < ll.lines; iwl++) { + if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { + if (visibleLine >= 0) { + if (draw) { + rcLine.top = ypos; + rcLine.bottom = ypos + vsPrint.lineHeight; + DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl); + } + ypos += vsPrint.lineHeight; + } + visibleLine++; + if (iwl == ll.lines - 1) + nPrintPos = pdoc->LineStart(lineDoc + 1); + else + nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); + } + } + + ++lineDoc; + } + + // Clear cache so measurements are not used for screen + posCache.Clear(); + + return nPrintPos; +} + +int Editor::TextWidth(int style, const char *text) { + RefreshStyleData(); + AutoSurface surface(this); + if (surface) { + return surface->WidthText(vs.styles[style].font, text, istrlen(text)); + } else { + return 1; + } +} + +// Empty method is overridden on GTK+ to show / hide scrollbars +void Editor::ReconfigureScrollBars() {} + +void Editor::SetScrollBars() { + RefreshStyleData(); + + int nMax = MaxScrollPos(); + int nPage = LinesOnScreen(); + bool modified = ModifyScrollBars(nMax + nPage - 1, nPage); + if (modified) { + DwellEnd(true); + } + + // TODO: ensure always showing as many lines as possible + // May not be, if, for example, window made larger + if (topLine > MaxScrollPos()) { + SetTopLine(Platform::Clamp(topLine, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + if (modified) { + if (!AbandonPaint()) + Redraw(); + } + //Platform::DebugPrintf("end max = %d page = %d\n", nMax, nPage); +} + +void Editor::ChangeSize() { + DropGraphics(); + SetScrollBars(); + if (wrapState != eWrapNone) { + PRectangle rcTextArea = GetClientRectangle(); + rcTextArea.left = vs.fixedColumnWidth; + rcTextArea.right -= vs.rightMarginWidth; + if (wrapWidth != rcTextArea.Width()) { + NeedWrapping(); + Redraw(); + } + } +} + +void Editor::AddChar(char ch) { + char s[2]; + s[0] = ch; + s[1] = '\0'; + AddCharUTF(s, 1); +} + +void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { + bool wasSelection = currentPos != anchor; + ClearSelection(); + bool charReplaceAction = false; + if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) { + if (currentPos < (pdoc->Length())) { + if (!IsEOLChar(pdoc->CharAt(currentPos))) { + charReplaceAction = true; + pdoc->BeginUndoAction(); + pdoc->DelChar(currentPos); + } + } + } + if (pdoc->InsertString(currentPos, s, len)) { + SetEmptySelection(currentPos + len); + } + if (charReplaceAction) { + pdoc->EndUndoAction(); + } + EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); + if (!caretSticky) { + SetLastXChosen(); + } + + if (treatAsDBCS) { + NotifyChar((static_cast(s[0]) << 8) | + static_cast(s[1])); + } else { + int byte = static_cast(s[0]); + if ((byte < 0xC0) || (1 == len)) { + // Handles UTF-8 characters between 0x01 and 0x7F and single byte + // characters when not in UTF-8 mode. + // Also treats \0 and naked trail bytes 0x80 to 0xBF as valid + // characters representing themselves. + } else { + // Unroll 1 to 3 byte UTF-8 sequences. See reference data at: + // http://www.cl.cam.ac.uk/~mgk25/unicode.html + // http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt + if (byte < 0xE0) { + int byte2 = static_cast(s[1]); + if ((byte2 & 0xC0) == 0x80) { + // Two-byte-character lead-byte followed by a trail-byte. + byte = (((byte & 0x1F) << 6) | (byte2 & 0x3F)); + } + // A two-byte-character lead-byte not followed by trail-byte + // represents itself. + } else if (byte < 0xF0) { + int byte2 = static_cast(s[1]); + int byte3 = static_cast(s[2]); + if (((byte2 & 0xC0) == 0x80) && ((byte3 & 0xC0) == 0x80)) { + // Three-byte-character lead byte followed by two trail bytes. + byte = (((byte & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | + (byte3 & 0x3F)); + } + // A three-byte-character lead-byte not followed by two trail-bytes + // represents itself. + } + } + NotifyChar(byte); + } +} + +void Editor::ClearSelection() { + if (!SelectionContainsProtected()) { + int startPos = SelectionStart(); + if (selType == selStream) { + unsigned int chars = SelectionEnd() - startPos; + if (0 != chars) { + pdoc->BeginUndoAction(); + pdoc->DeleteChars(startPos, chars); + pdoc->EndUndoAction(); + } + } else { + pdoc->BeginUndoAction(); + SelectionLineIterator lineIterator(this, false); + while (lineIterator.Iterate()) { + startPos = lineIterator.startPos; + unsigned int chars = lineIterator.endPos - startPos; + if (0 != chars) { + pdoc->DeleteChars(startPos, chars); + } + } + pdoc->EndUndoAction(); + selType = selStream; + } + SetEmptySelection(startPos); + } +} + +void Editor::ClearAll() { + pdoc->BeginUndoAction(); + if (0 != pdoc->Length()) { + pdoc->DeleteChars(0, pdoc->Length()); + } + if (!pdoc->IsReadOnly()) { + cs.Clear(); + } + pdoc->EndUndoAction(); + anchor = 0; + currentPos = 0; + SetTopLine(0); + SetVerticalScrollPos(); + InvalidateStyleRedraw(); +} + +void Editor::ClearDocumentStyle() { + pdoc->StartStyling(0, '\377'); + pdoc->SetStyleFor(pdoc->Length(), 0); + cs.ShowAll(); + pdoc->ClearLevels(); +} + +void Editor::Cut() { + if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) { + Copy(); + ClearSelection(); + } +} + +void Editor::PasteRectangular(int pos, const char *ptr, int len) { + if (pdoc->IsReadOnly() || SelectionContainsProtected()) { + return; + } + currentPos = pos; + int xInsert = XFromPosition(currentPos); + int line = pdoc->LineFromPosition(currentPos); + bool prevCr = false; + pdoc->BeginUndoAction(); + for (int i = 0; i < len; i++) { + if (IsEOLChar(ptr[i])) { + if ((ptr[i] == '\r') || (!prevCr)) + line++; + if (line >= pdoc->LinesTotal()) { + if (pdoc->eolMode != SC_EOL_LF) + pdoc->InsertChar(pdoc->Length(), '\r'); + if (pdoc->eolMode != SC_EOL_CR) + pdoc->InsertChar(pdoc->Length(), '\n'); + } + // Pad the end of lines with spaces if required + currentPos = PositionFromLineX(line, xInsert); + if ((XFromPosition(currentPos) < xInsert) && (i + 1 < len)) { + for (int i = 0; i < xInsert - XFromPosition(currentPos); i++) { + pdoc->InsertChar(currentPos, ' '); + currentPos++; + } + } + prevCr = ptr[i] == '\r'; + } else { + pdoc->InsertString(currentPos, ptr + i, 1); + currentPos++; + prevCr = false; + } + } + pdoc->EndUndoAction(); + SetEmptySelection(pos); +} + +bool Editor::CanPaste() { + return !pdoc->IsReadOnly() && !SelectionContainsProtected(); +} + +void Editor::Clear() { + if (currentPos == anchor) { + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + DelChar(); + } + } else { + ClearSelection(); + } + SetEmptySelection(currentPos); +} + +void Editor::SelectAll() { + SetSelection(0, pdoc->Length()); + Redraw(); +} + +void Editor::Undo() { + if (pdoc->CanUndo()) { + InvalidateCaret(); + int newPos = pdoc->Undo(); + if (newPos >= 0) + SetEmptySelection(newPos); + EnsureCaretVisible(); + } +} + +void Editor::Redo() { + if (pdoc->CanRedo()) { + int newPos = pdoc->Redo(); + if (newPos >= 0) + SetEmptySelection(newPos); + EnsureCaretVisible(); + } +} + +void Editor::DelChar() { + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + pdoc->DelChar(currentPos); + } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::DelCharBack(bool allowLineStartDeletion) { + if (currentPos == anchor) { + if (!RangeContainsProtected(currentPos - 1, currentPos)) { + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) { + if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && + pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) { + pdoc->BeginUndoAction(); + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + if (indentation % indentationStep == 0) { + pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + } else { + pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep)); + } + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + pdoc->EndUndoAction(); + } else { + pdoc->DelCharBack(currentPos); + } + } + } + } else { + ClearSelection(); + SetEmptySelection(currentPos); + } + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::NotifyFocus(bool) {} + +void Editor::NotifyStyleToNeeded(int endStyleNeeded) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_STYLENEEDED; + scn.position = endStyleNeeded; + NotifyParent(scn); +} + +void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { + NotifyStyleToNeeded(endStyleNeeded); +} + +void Editor::NotifyChar(int ch) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_CHARADDED; + scn.ch = ch; + NotifyParent(scn); + if (recordingMacro) { + char txt[2]; + txt[0] = static_cast(ch); + txt[1] = '\0'; + NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast(txt)); + } +} + +void Editor::NotifySavePoint(bool isSavePoint) { + SCNotification scn = {0}; + if (isSavePoint) { + scn.nmhdr.code = SCN_SAVEPOINTREACHED; + } else { + scn.nmhdr.code = SCN_SAVEPOINTLEFT; + } + NotifyParent(scn); +} + +void Editor::NotifyModifyAttempt() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MODIFYATTEMPTRO; + NotifyParent(scn); +} + +void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_DOUBLECLICK; + scn.line = LineFromLocation(pt); + scn.position = PositionFromLocationClose(pt); + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_HOTSPOTCLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyUpdateUI() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_UPDATEUI; + NotifyParent(scn); +} + +void Editor::NotifyPainted() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_PAINTED; + NotifyParent(scn); +} + +void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) { + int mask = pdoc->decorations.AllOnFor(position); + if ((click && mask) || pdoc->decorations.clickNotified) { + SCNotification scn = {0}; + pdoc->decorations.clickNotified = click; + scn.nmhdr.code = click ? SCN_INDICATORCLICK : SCN_INDICATORRELEASE; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); + scn.position = position; + NotifyParent(scn); + } +} + +bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { + int marginClicked = -1; + int x = 0; + for (int margin = 0; margin < ViewStyle::margins; margin++) { + if ((pt.x > x) && (pt.x < x + vs.ms[margin].width)) + marginClicked = margin; + x += vs.ms[margin].width; + } + if ((marginClicked >= 0) && vs.ms[marginClicked].sensitive) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MARGINCLICK; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + scn.position = pdoc->LineStart(LineFromLocation(pt)); + scn.margin = marginClicked; + NotifyParent(scn); + return true; + } else { + return false; + } +} + +void Editor::NotifyNeedShown(int pos, int len) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_NEEDSHOWN; + scn.position = pos; + scn.length = len; + NotifyParent(scn); +} + +void Editor::NotifyDwelling(Point pt, bool state) { + SCNotification scn = {0}; + scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; + scn.position = PositionFromLocationClose(pt); + scn.x = pt.x; + scn.y = pt.y; + NotifyParent(scn); +} + +void Editor::NotifyZoom() { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_ZOOM; + NotifyParent(scn); +} + +// Notifications from document +void Editor::NotifyModifyAttempt(Document*, void *) { + //Platform::DebugPrintf("** Modify Attempt\n"); + NotifyModifyAttempt(); +} + +void Editor::NotifyMove(int position) { + SCNotification scn = {0}; + scn.nmhdr.code = SCN_POSCHANGED; + scn.position = position; + NotifyParent(scn); +} + +void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { + //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); + NotifySavePoint(atSavePoint); +} + +void Editor::CheckModificationForWrap(DocModification mh) { + if (mh.modificationType & (SC_MOD_INSERTTEXT|SC_MOD_DELETETEXT)) { + llc.Invalidate(LineLayout::llCheckTextAndStyle); + if (wrapState != eWrapNone) { + int lineDoc = pdoc->LineFromPosition(mh.position); + int lines = Platform::Maximum(0, mh.linesAdded); + NeedWrapping(lineDoc, lineDoc + lines + 1); + } + } +} + +// Move a position so it is still after the same character as before the insertion. +static inline int MovePositionForInsertion(int position, int startInsertion, int length) { + if (position > startInsertion) { + return position + length; + } + return position; +} + +// Move a position so it is still after the same character as before the deletion if that +// character is still present else after the previous surviving character. +static inline int MovePositionForDeletion(int position, int startDeletion, int length) { + if (position > startDeletion) { + int endDeletion = startDeletion + length; + if (position > endDeletion) { + return position - length; + } else { + return startDeletion; + } + } else { + return position; + } +} + +void Editor::NotifyModified(Document*, DocModification mh, void *) { + needUpdateUI = true; + if (paintState == painting) { + CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); + } + if (mh.modificationType & (SC_MOD_CHANGESTYLE|SC_MOD_CHANGEINDICATOR)) { + if (mh.modificationType & SC_MOD_CHANGESTYLE) { + pdoc->IncrementStyleClock(); + } + if (paintState == notPainting) { + if (mh.position < pdoc->LineStart(topLine)) { + // Styling performed before this view + Redraw(); + } else { + InvalidateRange(mh.position, mh.position + mh.length); + } + } + if (mh.modificationType & SC_MOD_CHANGESTYLE) { + llc.Invalidate(LineLayout::llCheckTextAndStyle); + } + } else { + // Move selection and brace highlights + if (mh.modificationType & SC_MOD_INSERTTEXT) { + currentPos = MovePositionForInsertion(currentPos, mh.position, mh.length); + anchor = MovePositionForInsertion(anchor, mh.position, mh.length); + braces[0] = MovePositionForInsertion(braces[0], mh.position, mh.length); + braces[1] = MovePositionForInsertion(braces[1], mh.position, mh.length); + pdoc->decorations.InsertSpace(mh.position, mh.length); + } else if (mh.modificationType & SC_MOD_DELETETEXT) { + currentPos = MovePositionForDeletion(currentPos, mh.position, mh.length); + anchor = MovePositionForDeletion(anchor, mh.position, mh.length); + braces[0] = MovePositionForDeletion(braces[0], mh.position, mh.length); + braces[1] = MovePositionForDeletion(braces[1], mh.position, mh.length); + pdoc->decorations.DeleteRange(mh.position, mh.length); + } + if (cs.LinesDisplayed() < cs.LinesInDoc()) { + // Some lines are hidden so may need shown. + // TODO: check if the modified area is hidden. + if (mh.modificationType & SC_MOD_BEFOREINSERT) { + NotifyNeedShown(mh.position, 0); + } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { + NotifyNeedShown(mh.position, mh.length); + } + } + if (mh.linesAdded != 0) { + // Update contraction state for inserted and removed lines + // lineOfPos should be calculated in context of state before modification, shouldn't it + int lineOfPos = pdoc->LineFromPosition(mh.position); + if (mh.linesAdded > 0) { + cs.InsertLines(lineOfPos, mh.linesAdded); + } else { + cs.DeleteLines(lineOfPos, -mh.linesAdded); + } + } + CheckModificationForWrap(mh); + if (mh.linesAdded != 0) { + // Avoid scrolling of display if change before current display + if (mh.position < posTopLine && !CanDeferToLastStep(mh)) { + int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos()); + if (newTop != topLine) { + SetTopLine(newTop); + SetVerticalScrollPos(); + } + } + + //Platform::DebugPrintf("** %x Doc Changed\n", this); + // TODO: could invalidate from mh.startModification to end of screen + //InvalidateRange(mh.position, mh.position + mh.length); + if (paintState == notPainting && !CanDeferToLastStep(mh)) { + Redraw(); + } + } else { + //Platform::DebugPrintf("** %x Line Changed %d .. %d\n", this, + // mh.position, mh.position + mh.length); + if (paintState == notPainting && mh.length && !CanEliminate(mh)) { + InvalidateRange(mh.position, mh.position + mh.length); + } + } + } + + if (mh.linesAdded != 0 && !CanDeferToLastStep(mh)) { + SetScrollBars(); + } + + if (mh.modificationType & SC_MOD_CHANGEMARKER) { + if ((paintState == notPainting) || !PaintContainsMargin()) { + if (mh.modificationType & SC_MOD_CHANGEFOLD) { + // Fold changes can affect the drawing of following lines so redraw whole margin + RedrawSelMargin(); + } else { + RedrawSelMargin(mh.line); + } + } + } + + // NOW pay the piper WRT "deferred" visual updates + if (IsLastStep(mh)) { + SetScrollBars(); + Redraw(); + } + + // If client wants to see this modification + if (mh.modificationType & modEventMask) { + if ((mh.modificationType & (SC_MOD_CHANGESTYLE|SC_MOD_CHANGEINDICATOR)) == 0) { + // Real modification made to text of document. + NotifyChange(); // Send EN_CHANGE + } + + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MODIFIED; + scn.position = mh.position; + scn.modificationType = mh.modificationType; + scn.text = mh.text; + scn.length = mh.length; + scn.linesAdded = mh.linesAdded; + scn.line = mh.line; + scn.foldLevelNow = mh.foldLevelNow; + scn.foldLevelPrev = mh.foldLevelPrev; + NotifyParent(scn); + } +} + +void Editor::NotifyDeleted(Document *, void *) { + /* Do nothing */ +} + +void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + + // Enumerates all macroable messages + switch (iMessage) { + case SCI_CUT: + case SCI_COPY: + case SCI_PASTE: + case SCI_CLEAR: + case SCI_REPLACESEL: + case SCI_ADDTEXT: + case SCI_INSERTTEXT: + case SCI_APPENDTEXT: + case SCI_CLEARALL: + case SCI_SELECTALL: + case SCI_GOTOLINE: + case SCI_GOTOPOS: + case SCI_SEARCHANCHOR: + case SCI_SEARCHNEXT: + case SCI_SEARCHPREV: + case SCI_LINEDOWN: + case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: + case SCI_LINEUP: + case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: + case SCI_CHARLEFT: + case SCI_CHARLEFTEXTEND: + case SCI_CHARRIGHT: + case SCI_CHARRIGHTEXTEND: + case SCI_WORDLEFT: + case SCI_WORDLEFTEXTEND: + case SCI_WORDRIGHT: + case SCI_WORDRIGHTEXTEND: + case SCI_WORDPARTLEFT: + case SCI_WORDPARTLEFTEXTEND: + case SCI_WORDPARTRIGHT: + case SCI_WORDPARTRIGHTEXTEND: + case SCI_WORDLEFTEND: + case SCI_WORDLEFTENDEXTEND: + case SCI_WORDRIGHTEND: + case SCI_WORDRIGHTENDEXTEND: + case SCI_HOME: + case SCI_HOMEEXTEND: + case SCI_LINEEND: + case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: + case SCI_DOCUMENTSTART: + case SCI_DOCUMENTSTARTEXTEND: + case SCI_DOCUMENTEND: + case SCI_DOCUMENTENDEXTEND: + case SCI_STUTTEREDPAGEUP: + case SCI_STUTTEREDPAGEUPEXTEND: + case SCI_STUTTEREDPAGEDOWN: + case SCI_STUTTEREDPAGEDOWNEXTEND: + case SCI_PAGEUP: + case SCI_PAGEUPEXTEND: + case SCI_PAGEDOWN: + case SCI_PAGEDOWNEXTEND: + case SCI_EDITTOGGLEOVERTYPE: + case SCI_CANCEL: + case SCI_DELETEBACK: + case SCI_TAB: + case SCI_BACKTAB: + case SCI_FORMFEED: + case SCI_VCHOME: + case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: + case SCI_DELWORDLEFT: + case SCI_DELWORDRIGHT: + case SCI_DELLINELEFT: + case SCI_DELLINERIGHT: + case SCI_LINECOPY: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: + case SCI_DELETEBACKNOTLINE: + case SCI_HOMEDISPLAY: + case SCI_HOMEDISPLAYEXTEND: + case SCI_LINEENDDISPLAY: + case SCI_LINEENDDISPLAYEXTEND: + case SCI_SETSELECTIONMODE: + case SCI_LINEDOWNRECTEXTEND: + case SCI_LINEUPRECTEXTEND: + case SCI_CHARLEFTRECTEXTEND: + case SCI_CHARRIGHTRECTEXTEND: + case SCI_HOMERECTEXTEND: + case SCI_VCHOMERECTEXTEND: + case SCI_LINEENDRECTEXTEND: + case SCI_PAGEUPRECTEXTEND: + case SCI_PAGEDOWNRECTEXTEND: + case SCI_SELECTIONDUPLICATE: + break; + + // Filter out all others like display changes. Also, newlines are redundant + // with char insert messages. + case SCI_NEWLINE: + default: + // printf("Filtered out %ld of macro recording\n", iMessage); + return ; + } + + // Send notification + SCNotification scn = {0}; + scn.nmhdr.code = SCN_MACRORECORD; + scn.message = iMessage; + scn.wParam = wParam; + scn.lParam = lParam; + NotifyParent(scn); +} + +/** + * Force scroll and keep position relative to top of window. + * + * If stuttered = true and not already at first/last row, move to first/last row of window. + * If stuttered = true and already at first/last row, scroll as normal. + */ +void Editor::PageMove(int direction, selTypes sel, bool stuttered) { + int topLineNew, newPos; + + // I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem? + int currentLine = pdoc->LineFromPosition(currentPos); + int topStutterLine = topLine + caretYSlop; + int bottomStutterLine = + pdoc->LineFromPosition(PositionFromLocation( + Point(lastXChosen, direction * vs.lineHeight * LinesToScroll()))) + - caretYSlop - 1; + + if (stuttered && (direction < 0 && currentLine > topStutterLine)) { + topLineNew = topLine; + newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * caretYSlop)); + + } else if (stuttered && (direction > 0 && currentLine < bottomStutterLine)) { + topLineNew = topLine; + newPos = PositionFromLocation(Point(lastXChosen, vs.lineHeight * (LinesToScroll() - caretYSlop))); + + } else { + Point pt = LocationFromPosition(currentPos); + + topLineNew = Platform::Clamp( + topLine + direction * LinesToScroll(), 0, MaxScrollPos()); + newPos = PositionFromLocation( + Point(lastXChosen, pt.y + direction * (vs.lineHeight * LinesToScroll()))); + } + + if (topLineNew != topLine) { + SetTopLine(topLineNew); + MovePositionTo(newPos, sel); + Redraw(); + SetVerticalScrollPos(); + } else { + MovePositionTo(newPos, sel); + } +} + +void Editor::ChangeCaseOfSelection(bool makeUpperCase) { + pdoc->BeginUndoAction(); + int startCurrent = currentPos; + int startAnchor = anchor; + if (selType == selStream) { + pdoc->ChangeCase(Range(SelectionStart(), SelectionEnd()), + makeUpperCase); + SetSelection(startCurrent, startAnchor); + } else { + SelectionLineIterator lineIterator(this, false); + while (lineIterator.Iterate()) { + pdoc->ChangeCase( + Range(lineIterator.startPos, lineIterator.endPos), + makeUpperCase); + } + // Would be nicer to keep the rectangular selection but this is complex + SetEmptySelection(startCurrent); + } + pdoc->EndUndoAction(); +} + +void Editor::LineTranspose() { + int line = pdoc->LineFromPosition(currentPos); + if (line > 0) { + pdoc->BeginUndoAction(); + int startPrev = pdoc->LineStart(line - 1); + int endPrev = pdoc->LineEnd(line - 1); + int start = pdoc->LineStart(line); + int end = pdoc->LineEnd(line); + char *line1 = CopyRange(startPrev, endPrev); + int len1 = endPrev - startPrev; + char *line2 = CopyRange(start, end); + int len2 = end - start; + pdoc->DeleteChars(start, len2); + pdoc->DeleteChars(startPrev, len1); + pdoc->InsertString(startPrev, line2, len2); + pdoc->InsertString(start - len1 + len2, line1, len1); + MovePositionTo(start - len1 + len2); + delete []line1; + delete []line2; + pdoc->EndUndoAction(); + } +} + +void Editor::Duplicate(bool forLine) { + int start = SelectionStart(); + int end = SelectionEnd(); + if (start == end) { + forLine = true; + } + if (forLine) { + int line = pdoc->LineFromPosition(currentPos); + start = pdoc->LineStart(line); + end = pdoc->LineEnd(line); + } + char *text = CopyRange(start, end); + if (forLine) { + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->InsertCString(end, eol); + pdoc->InsertString(end + istrlen(eol), text, end - start); + } else { + pdoc->InsertString(end, text, end - start); + } + delete []text; +} + +void Editor::CancelModes() { + moveExtendsSelection = false; +} + +void Editor::NewLine() { + ClearSelection(); + const char *eol = "\n"; + if (pdoc->eolMode == SC_EOL_CRLF) { + eol = "\r\n"; + } else if (pdoc->eolMode == SC_EOL_CR) { + eol = "\r"; + } // else SC_EOL_LF -> "\n" already set + if (pdoc->InsertCString(currentPos, eol)) { + SetEmptySelection(currentPos + istrlen(eol)); + while (*eol) { + NotifyChar(*eol); + eol++; + } + } + SetLastXChosen(); + EnsureCaretVisible(); + // Avoid blinking during rapid typing: + ShowCaretAtCurrentPosition(); +} + +void Editor::CursorUpOrDown(int direction, selTypes sel) { + Point pt = LocationFromPosition(currentPos); + int posNew = PositionFromLocation( + Point(lastXChosen, pt.y + direction * vs.lineHeight)); + if (direction < 0) { + // Line wrapping may lead to a location on the same line, so + // seek back if that is the case. + // There is an equivalent case when moving down which skips + // over a line but as that does not trap the user it is fine. + Point ptNew = LocationFromPosition(posNew); + while ((posNew > 0) && (pt.y == ptNew.y)) { + posNew--; + ptNew = LocationFromPosition(posNew); + } + } + MovePositionTo(posNew, sel); +} + +void Editor::ParaUpOrDown(int direction, selTypes sel) { + int lineDoc, savedPos = currentPos; + do { + MovePositionTo(direction > 0 ? pdoc->ParaDown(currentPos) : pdoc->ParaUp(currentPos), sel); + lineDoc = pdoc->LineFromPosition(currentPos); + if (direction > 0) { + if (currentPos >= pdoc->Length() && !cs.GetVisible(lineDoc)) { + if (sel == noSel) { + MovePositionTo(pdoc->LineEndPosition(savedPos)); + } + break; + } + } + } while (!cs.GetVisible(lineDoc)); +} + +int Editor::StartEndDisplayLine(int pos, bool start) { + RefreshStyleData(); + int line = pdoc->LineFromPosition(pos); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + int posRet = INVALID_POSITION; + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, wrapWidth); + int posInLine = pos - posLineStart; + if (posInLine <= ll->maxLineLength) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { + if (start) { + posRet = ll->LineStart(subLine) + posLineStart; + } else { + if (subLine == ll->lines - 1) + posRet = ll->LineStart(subLine + 1) + posLineStart; + else + posRet = ll->LineStart(subLine + 1) + posLineStart - 1; + } + } + } + } + } + if (posRet == INVALID_POSITION) { + return pos; + } else { + return posRet; + } +} + +int Editor::KeyCommand(unsigned int iMessage) { + switch (iMessage) { + case SCI_LINEDOWN: + CursorUpOrDown(1); + break; + case SCI_LINEDOWNEXTEND: + CursorUpOrDown(1, selStream); + break; + case SCI_LINEDOWNRECTEXTEND: + CursorUpOrDown(1, selRectangle); + break; + case SCI_PARADOWN: + ParaUpOrDown(1); + break; + case SCI_PARADOWNEXTEND: + ParaUpOrDown(1, selStream); + break; + case SCI_LINESCROLLDOWN: + ScrollTo(topLine + 1); + MoveCaretInsideView(false); + break; + case SCI_LINEUP: + CursorUpOrDown(-1); + break; + case SCI_LINEUPEXTEND: + CursorUpOrDown(-1, selStream); + break; + case SCI_LINEUPRECTEXTEND: + CursorUpOrDown(-1, selRectangle); + break; + case SCI_PARAUP: + ParaUpOrDown(-1); + break; + case SCI_PARAUPEXTEND: + ParaUpOrDown(-1, selStream); + break; + case SCI_LINESCROLLUP: + ScrollTo(topLine - 1); + MoveCaretInsideView(false); + break; + case SCI_CHARLEFT: + if (SelectionEmpty() || moveExtendsSelection) { + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1)); + } else { + MovePositionTo(SelectionStart()); + } + SetLastXChosen(); + break; + case SCI_CHARLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selStream); + SetLastXChosen(); + break; + case SCI_CHARLEFTRECTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos - 1, -1), selRectangle); + SetLastXChosen(); + break; + case SCI_CHARRIGHT: + if (SelectionEmpty() || moveExtendsSelection) { + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1)); + } else { + MovePositionTo(SelectionEnd()); + } + SetLastXChosen(); + break; + case SCI_CHARRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selStream); + SetLastXChosen(); + break; + case SCI_CHARRIGHTRECTEXTEND: + MovePositionTo(MovePositionSoVisible(currentPos + 1, 1), selRectangle); + SetLastXChosen(); + break; + case SCI_WORDLEFT: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1)); + SetLastXChosen(); + break; + case SCI_WORDLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, -1), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDRIGHT: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1)); + SetLastXChosen(); + break; + case SCI_WORDRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordStart(currentPos, 1), 1), selStream); + SetLastXChosen(); + break; + + case SCI_WORDLEFTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1)); + SetLastXChosen(); + break; + case SCI_WORDLEFTENDEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, -1), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDRIGHTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1)); + SetLastXChosen(); + break; + case SCI_WORDRIGHTENDEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->NextWordEnd(currentPos, 1), 1), selStream); + SetLastXChosen(); + break; + + case SCI_HOME: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos))); + SetLastXChosen(); + break; + case SCI_HOMEEXTEND: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selStream); + SetLastXChosen(); + break; + case SCI_HOMERECTEXTEND: + MovePositionTo(pdoc->LineStart(pdoc->LineFromPosition(currentPos)), selRectangle); + SetLastXChosen(); + break; + case SCI_LINEEND: + MovePositionTo(pdoc->LineEndPosition(currentPos)); + SetLastXChosen(); + break; + case SCI_LINEENDEXTEND: + MovePositionTo(pdoc->LineEndPosition(currentPos), selStream); + SetLastXChosen(); + break; + case SCI_LINEENDRECTEXTEND: + MovePositionTo(pdoc->LineEndPosition(currentPos), selRectangle); + SetLastXChosen(); + break; + case SCI_HOMEWRAP: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_HOMEWRAPEXTEND: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos, selStream); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAP: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + int realEndPos = pdoc->LineEndPosition(currentPos); + if (endPos > realEndPos // if moved past visible EOLs + || currentPos >= endPos) // if at end of display line already + endPos = realEndPos; + MovePositionTo(endPos); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAPEXTEND: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + int realEndPos = pdoc->LineEndPosition(currentPos); + if (endPos > realEndPos // if moved past visible EOLs + || currentPos >= endPos) // if at end of display line already + endPos = realEndPos; + MovePositionTo(endPos, selStream); + SetLastXChosen(); + } + break; + case SCI_DOCUMENTSTART: + MovePositionTo(0); + SetLastXChosen(); + break; + case SCI_DOCUMENTSTARTEXTEND: + MovePositionTo(0, selStream); + SetLastXChosen(); + break; + case SCI_DOCUMENTEND: + MovePositionTo(pdoc->Length()); + SetLastXChosen(); + break; + case SCI_DOCUMENTENDEXTEND: + MovePositionTo(pdoc->Length(), selStream); + SetLastXChosen(); + break; + case SCI_STUTTEREDPAGEUP: + PageMove(-1, noSel, true); + break; + case SCI_STUTTEREDPAGEUPEXTEND: + PageMove(-1, selStream, true); + break; + case SCI_STUTTEREDPAGEDOWN: + PageMove(1, noSel, true); + break; + case SCI_STUTTEREDPAGEDOWNEXTEND: + PageMove(1, selStream, true); + break; + case SCI_PAGEUP: + PageMove(-1); + break; + case SCI_PAGEUPEXTEND: + PageMove(-1, selStream); + break; + case SCI_PAGEUPRECTEXTEND: + PageMove(-1, selRectangle); + break; + case SCI_PAGEDOWN: + PageMove(1); + break; + case SCI_PAGEDOWNEXTEND: + PageMove(1, selStream); + break; + case SCI_PAGEDOWNRECTEXTEND: + PageMove(1, selRectangle); + break; + case SCI_EDITTOGGLEOVERTYPE: + inOverstrike = !inOverstrike; + DropCaret(); + ShowCaretAtCurrentPosition(); + NotifyUpdateUI(); + break; + case SCI_CANCEL: // Cancel any modes - handled in subclass + // Also unselect text + CancelModes(); + break; + case SCI_DELETEBACK: + DelCharBack(true); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_DELETEBACKNOTLINE: + DelCharBack(false); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_TAB: + Indent(true); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_BACKTAB: + Indent(false); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + case SCI_NEWLINE: + NewLine(); + break; + case SCI_FORMFEED: + AddChar('\f'); + break; + case SCI_VCHOME: + MovePositionTo(pdoc->VCHomePosition(currentPos)); + SetLastXChosen(); + break; + case SCI_VCHOMEEXTEND: + MovePositionTo(pdoc->VCHomePosition(currentPos), selStream); + SetLastXChosen(); + break; + case SCI_VCHOMERECTEXTEND: + MovePositionTo(pdoc->VCHomePosition(currentPos), selRectangle); + SetLastXChosen(); + break; + case SCI_VCHOMEWRAP: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_VCHOMEWRAPEXTEND: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos, selStream); + SetLastXChosen(); + } + break; + case SCI_ZOOMIN: + if (vs.zoomLevel < 20) { + vs.zoomLevel++; + InvalidateStyleRedraw(); + NotifyZoom(); + } + break; + case SCI_ZOOMOUT: + if (vs.zoomLevel > -10) { + vs.zoomLevel--; + InvalidateStyleRedraw(); + NotifyZoom(); + } + break; + case SCI_DELWORDLEFT: { + int startWord = pdoc->NextWordStart(currentPos, -1); + pdoc->DeleteChars(startWord, currentPos - startWord); + SetLastXChosen(); + } + break; + case SCI_DELWORDRIGHT: { + int endWord = pdoc->NextWordStart(currentPos, 1); + pdoc->DeleteChars(currentPos, endWord - currentPos); + } + break; + case SCI_DELLINELEFT: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + pdoc->DeleteChars(start, currentPos - start); + SetLastXChosen(); + } + break; + case SCI_DELLINERIGHT: { + int line = pdoc->LineFromPosition(currentPos); + int end = pdoc->LineEnd(line); + pdoc->DeleteChars(currentPos, end - currentPos); + } + break; + case SCI_LINECOPY: { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + CopyRangeToClipboard(pdoc->LineStart(lineStart), + pdoc->LineStart(lineEnd + 1)); + } + break; + case SCI_LINECUT: { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + int start = pdoc->LineStart(lineStart); + int end = pdoc->LineStart(lineEnd + 1); + SetSelection(start, end); + Cut(); + SetLastXChosen(); + } + break; + case SCI_LINEDELETE: { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + int end = pdoc->LineStart(line + 1); + pdoc->DeleteChars(start, end - start); + } + break; + case SCI_LINETRANSPOSE: + LineTranspose(); + break; + case SCI_LINEDUPLICATE: + Duplicate(true); + break; + case SCI_SELECTIONDUPLICATE: + Duplicate(false); + break; + case SCI_LOWERCASE: + ChangeCaseOfSelection(false); + break; + case SCI_UPPERCASE: + ChangeCaseOfSelection(true); + break; + case SCI_WORDPARTLEFT: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1)); + SetLastXChosen(); + break; + case SCI_WORDPARTLEFTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartLeft(currentPos), -1), selStream); + SetLastXChosen(); + break; + case SCI_WORDPARTRIGHT: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1)); + SetLastXChosen(); + break; + case SCI_WORDPARTRIGHTEXTEND: + MovePositionTo(MovePositionSoVisible(pdoc->WordPartRight(currentPos), 1), selStream); + SetLastXChosen(); + break; + case SCI_HOMEDISPLAY: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, true), -1)); + SetLastXChosen(); + break; + case SCI_HOMEDISPLAYEXTEND: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, true), -1), selStream); + SetLastXChosen(); + break; + case SCI_LINEENDDISPLAY: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, false), 1)); + SetLastXChosen(); + break; + case SCI_LINEENDDISPLAYEXTEND: + MovePositionTo(MovePositionSoVisible( + StartEndDisplayLine(currentPos, false), 1), selStream); + SetLastXChosen(); + break; + } + return 0; +} + +int Editor::KeyDefault(int, int) { + return 0; +} + +int Editor::KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed) { + DwellEnd(false); + int modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + int msg = kmap.Find(key, modifiers); + if (msg) { + if (consumed) + *consumed = true; + return WndProc(msg, 0, 0); + } else { + if (consumed) + *consumed = false; + return KeyDefault(key, modifiers); + } +} + +void Editor::SetWhitespaceVisible(int view) { + vs.viewWhitespace = static_cast(view); +} + +int Editor::GetWhitespaceVisible() { + return vs.viewWhitespace; +} + +void Editor::Indent(bool forwards) { + //Platform::DebugPrintf("INdent %d\n", forwards); + int lineOfAnchor = pdoc->LineFromPosition(anchor); + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + if (lineOfAnchor == lineCurrentPos) { + if (forwards) { + pdoc->BeginUndoAction(); + ClearSelection(); + if (pdoc->GetColumn(currentPos) <= pdoc->GetColumn(pdoc->GetLineIndentPosition(lineCurrentPos)) && + pdoc->tabIndents) { + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + pdoc->SetLineIndentation(lineCurrentPos, indentation + indentationStep - indentation % indentationStep); + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + } else { + if (pdoc->useTabs) { + pdoc->InsertChar(currentPos, '\t'); + SetEmptySelection(currentPos + 1); + } else { + int numSpaces = (pdoc->tabInChars) - + (pdoc->GetColumn(currentPos) % (pdoc->tabInChars)); + if (numSpaces < 1) + numSpaces = pdoc->tabInChars; + for (int i = 0; i < numSpaces; i++) { + pdoc->InsertChar(currentPos + i, ' '); + } + SetEmptySelection(currentPos + numSpaces); + } + } + pdoc->EndUndoAction(); + } else { + if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && + pdoc->tabIndents) { + pdoc->BeginUndoAction(); + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = pdoc->IndentSize(); + pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + pdoc->EndUndoAction(); + } else { + int newColumn = ((pdoc->GetColumn(currentPos) - 1) / pdoc->tabInChars) * + pdoc->tabInChars; + if (newColumn < 0) + newColumn = 0; + int newPos = currentPos; + while (pdoc->GetColumn(newPos) > newColumn) + newPos--; + SetEmptySelection(newPos); + } + } + } else { + int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); + int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); + // Multiple lines selected so indent / dedent + int lineTopSel = Platform::Minimum(lineOfAnchor, lineCurrentPos); + int lineBottomSel = Platform::Maximum(lineOfAnchor, lineCurrentPos); + if (pdoc->LineStart(lineBottomSel) == anchor || pdoc->LineStart(lineBottomSel) == currentPos) + lineBottomSel--; // If not selecting any characters on a line, do not indent + pdoc->BeginUndoAction(); + pdoc->Indent(forwards, lineBottomSel, lineTopSel); + pdoc->EndUndoAction(); + if (lineOfAnchor < lineCurrentPos) { + if (currentPosPosOnLine == 0) + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); + else + SetSelection(pdoc->LineStart(lineCurrentPos + 1), pdoc->LineStart(lineOfAnchor)); + } else { + if (anchorPosOnLine == 0) + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor)); + else + SetSelection(pdoc->LineStart(lineCurrentPos), pdoc->LineStart(lineOfAnchor + 1)); + } + } +} + +/** + * Search of a text in the document, in the given range. + * @return The position of the found text, -1 if not found. + */ +long Editor::FindText( + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. + sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range. + + TextToFind *ft = reinterpret_cast(lParam); + int lengthFound = istrlen(ft->lpstrText); + int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + if (pos != -1) { + ft->chrgText.cpMin = pos; + ft->chrgText.cpMax = pos + lengthFound; + } + return pos; +} + +/** + * Relocatable search support : Searches relative to current selection + * point and sets the selection to the found text range with + * each search. + */ +/** + * Anchor following searches at current selection start: This allows + * multiple incremental interactive searches to be macro recorded + * while still setting the selection to found text so the find/select + * operation is self-contained. + */ +void Editor::SearchAnchor() { + searchAnchor = SelectionStart(); +} + +/** + * Find text from current search anchor: Must call @c SearchAnchor first. + * Used for next text and previous text requests. + * @return The position of the found text, -1 if not found. + */ +long Editor::SearchText( + unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. + sptr_t lParam) { ///< The text to search for. + + const char *txt = reinterpret_cast(lParam); + int pos; + int lengthFound = istrlen(txt); + if (iMessage == SCI_SEARCHNEXT) { + pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + } else { + pos = pdoc->FindText(searchAnchor, 0, txt, + (wParam & SCFIND_MATCHCASE) != 0, + (wParam & SCFIND_WHOLEWORD) != 0, + (wParam & SCFIND_WORDSTART) != 0, + (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, + &lengthFound); + } + + if (pos != -1) { + SetSelection(pos, pos + lengthFound); + } + + return pos; +} + +/** + * Search for text in the target range of the document. + * @return The position of the found text, -1 if not found. + */ +long Editor::SearchInTarget(const char *text, int length) { + int lengthFound = length; + int pos = pdoc->FindText(targetStart, targetEnd, text, + (searchFlags & SCFIND_MATCHCASE) != 0, + (searchFlags & SCFIND_WHOLEWORD) != 0, + (searchFlags & SCFIND_WORDSTART) != 0, + (searchFlags & SCFIND_REGEXP) != 0, + (searchFlags & SCFIND_POSIX) != 0, + &lengthFound); + if (pos != -1) { + targetStart = pos; + targetEnd = pos + lengthFound; + } + return pos; +} + +void Editor::GoToLine(int lineNo) { + if (lineNo > pdoc->LinesTotal()) + lineNo = pdoc->LinesTotal(); + if (lineNo < 0) + lineNo = 0; + SetEmptySelection(pdoc->LineStart(lineNo)); + ShowCaretAtCurrentPosition(); + EnsureCaretVisible(); +} + +static bool Close(Point pt1, Point pt2) { // [CHANGED] + if (abs(pt1.x - pt2.x) > 3) + return false; + if (abs(pt1.y - pt2.y) > 3) + return false; + return true; +} + +char *Editor::CopyRange(int start, int end) { + char *text = 0; + if (start < end) { + int len = end - start; + text = new char[len + 1]; + if (text) { + for (int i = 0; i < len; i++) { + text[i] = pdoc->CharAt(start + i); + } + text[len] = '\0'; + } + } + return text; +} + +void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) { + ss->Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); +} + +void Editor::CopySelectionRange(SelectionText *ss) { + if (selType == selStream) { + CopySelectionFromRange(ss, SelectionStart(), SelectionEnd()); + } else { + char *text = 0; + int size = 0; + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + size += lineIterator.endPos - lineIterator.startPos; + if (selType != selLines) { + size++; + if (pdoc->eolMode == SC_EOL_CRLF) { + size++; + } + } + } + if (size > 0) { + text = new char[size + 1]; + if (text) { + int j = 0; + lineIterator.Reset(); + while (lineIterator.Iterate()) { + for (int i = lineIterator.startPos; + i < lineIterator.endPos; + i++) { + text[j++] = pdoc->CharAt(i); + } + if (selType != selLines) { + if (pdoc->eolMode != SC_EOL_LF) { + text[j++] = '\r'; + } + if (pdoc->eolMode != SC_EOL_CR) { + text[j++] = '\n'; + } + } + } + text[size] = '\0'; + } + } + ss->Set(text, size + 1, pdoc->dbcsCodePage, + vs.styles[STYLE_DEFAULT].characterSet, selType == selRectangle); + } +} + +void Editor::CopyRangeToClipboard(int start, int end) { + start = pdoc->ClampPositionIntoDocument(start); + end = pdoc->ClampPositionIntoDocument(end); + SelectionText selectedText; + selectedText.Set(CopyRange(start, end), end - start + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); + CopyToClipboard(selectedText); +} + +void Editor::CopyText(int length, const char *text) { + SelectionText selectedText; + selectedText.Copy(text, length + 1, + pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false); + CopyToClipboard(selectedText); +} + +void Editor::SetDragPosition(int newPos) { + if (newPos >= 0) { + newPos = MovePositionOutsideChar(newPos, 1); + posDrop = newPos; + } + if (posDrag != newPos) { + caret.on = true; + SetTicking(true); + InvalidateCaret(); + posDrag = newPos; + InvalidateCaret(); + } +} + +void Editor::DisplayCursor(Window::Cursor c) { + if (cursorMode == SC_CURSORNORMAL) + wMain.SetCursor(c); + else + wMain.SetCursor(static_cast(cursorMode)); +} + +bool Editor::DragThreshold(Point ptStart, Point ptNow) { + int xMove = ptStart.x - ptNow.x; + int yMove = ptStart.y - ptNow.y; + int distanceSquared = xMove * xMove + yMove * yMove; + return distanceSquared > 16; +} + +void Editor::StartDrag() { + // Always handled by subclasses + //SetMouseCapture(true); + //DisplayCursor(Window::cursorArrow); +} + +void Editor::DropAt(int position, const char *value, bool moving, bool rectangular) { + //Platform::DebugPrintf("DropAt %d %d\n", inDragDrop, position); + if (inDragDrop == ddDragging) + dropWentOutside = false; + + int positionWasInSelection = PositionInSelection(position); + + bool positionOnEdgeOfSelection = + (position == SelectionStart()) || (position == SelectionEnd()); + + if ((inDragDrop != ddDragging) || !(0 == positionWasInSelection) || + (positionOnEdgeOfSelection && !moving)) { + + int selStart = SelectionStart(); + int selEnd = SelectionEnd(); + + pdoc->BeginUndoAction(); + + int positionAfterDeletion = position; + if ((inDragDrop == ddDragging) && moving) { + // Remove dragged out text + if (rectangular || selType == selLines) { + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + if (position >= lineIterator.startPos) { + if (position > lineIterator.endPos) { + positionAfterDeletion -= lineIterator.endPos - lineIterator.startPos; + } else { + positionAfterDeletion -= position - lineIterator.startPos; + } + } + } + } else { + if (position > selStart) { + positionAfterDeletion -= selEnd - selStart; + } + } + ClearSelection(); + } + position = positionAfterDeletion; + + if (rectangular) { + PasteRectangular(position, value, istrlen(value)); + pdoc->EndUndoAction(); + // Should try to select new rectangle but it may not be a rectangle now so just select the drop position + SetEmptySelection(position); + } else { + position = MovePositionOutsideChar(position, currentPos - position); + if (pdoc->InsertCString(position, value)) { + SetSelection(position + istrlen(value), position); + } + pdoc->EndUndoAction(); + } + } else if (inDragDrop == ddDragging) { + SetEmptySelection(position); + } +} + +/** + * @return -1 if given position is before the selection, + * 1 if position is after the selection, + * 0 if position is inside the selection, + */ +int Editor::PositionInSelection(int pos) { + pos = MovePositionOutsideChar(pos, currentPos - pos); + if (pos < SelectionStart()) { + return -1; + } + if (pos > SelectionEnd()) { + return 1; + } + if (selType == selStream) { + return 0; + } else { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(pdoc->LineFromPosition(pos)); + if (pos < lineIterator.startPos) { + return -1; + } else if (pos > lineIterator.endPos) { + return 1; + } else { + return 0; + } + } +} + +bool Editor::PointInSelection(Point pt) { + int pos = PositionFromLocation(pt); + if (0 == PositionInSelection(pos)) { + // Probably inside, but we must make a finer test + int selStart, selEnd; + if (selType == selStream) { + selStart = SelectionStart(); + selEnd = SelectionEnd(); + } else { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(pdoc->LineFromPosition(pos)); + selStart = lineIterator.startPos; + selEnd = lineIterator.endPos; + } + if (pos == selStart) { + // see if just before selection + Point locStart = LocationFromPosition(pos); + if (pt.x < locStart.x) { + return false; + } + } + if (pos == selEnd) { + // see if just after selection + Point locEnd = LocationFromPosition(pos); + if (pt.x > locEnd.x) { + return false; + } + } + return true; + } + return false; +} + +bool Editor::PointInSelMargin(Point pt) { + // Really means: "Point in a margin" + if (vs.fixedColumnWidth > 0) { // There is a margin + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth - vs.leftMarginWidth; + return rcSelMargin.Contains(pt); + } else { + return false; + } +} + +void Editor::LineSelection(int lineCurrent_, int lineAnchor_) { + if (lineAnchor_ < lineCurrent_) { + SetSelection(pdoc->LineStart(lineCurrent_ + 1), + pdoc->LineStart(lineAnchor_)); + } else if (lineAnchor_ > lineCurrent_) { + SetSelection(pdoc->LineStart(lineCurrent_), + pdoc->LineStart(lineAnchor_ + 1)); + } else { // Same line, select it + SetSelection(pdoc->LineStart(lineAnchor_ + 1), + pdoc->LineStart(lineAnchor_)); + } +} + +void Editor::DwellEnd(bool mouseMoved) { + if (mouseMoved) + ticksToDwell = dwellDelay; + else + ticksToDwell = SC_TIME_FOREVER; + if (dwelling && (dwellDelay < SC_TIME_FOREVER)) { + dwelling = false; + NotifyDwelling(ptMouseLast, dwelling); + } +} + +void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { + //Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop); + ptMouseLast = pt; + int newPos = PositionFromLocation(pt); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); + inDragDrop = ddNone; + moveExtendsSelection = false; + + bool processed = NotifyMarginClick(pt, shift, ctrl, alt); + if (processed) + return; + + NotifyIndicatorClick(true, newPos, shift, ctrl, alt); + + bool inSelMargin = PointInSelMargin(pt); + if (shift & !inSelMargin) { + SetSelection(newPos); + } + if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { + //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); + SetMouseCapture(true); + SetEmptySelection(newPos); + bool doubleClick = false; + // Stop mouse button bounce changing selection type + if (!Platform::MouseButtonBounce() || curTime != lastClickTime) { + if (selectionType == selChar) { + selectionType = selWord; + doubleClick = true; + } else if (selectionType == selWord) { + selectionType = selLine; + } else { + selectionType = selChar; + originalAnchorPos = currentPos; + } + } + + if (selectionType == selWord) { + if (currentPos >= originalAnchorPos) { // Moved forward + SetSelection(pdoc->ExtendWordSelect(currentPos, 1), + pdoc->ExtendWordSelect(originalAnchorPos, -1)); + } else { // Moved backward + SetSelection(pdoc->ExtendWordSelect(currentPos, -1), + pdoc->ExtendWordSelect(originalAnchorPos, 1)); + } + } else if (selectionType == selLine) { + lineAnchor = LineFromLocation(pt); + SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor)); + //Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos); + } else { + SetEmptySelection(currentPos); + } + //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos); + if (doubleClick) { + NotifyDoubleClick(pt, shift, ctrl, alt); + if (PositionIsHotspot(newPos)) + NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt); + } + } else { // Single click + if (inSelMargin) { + selType = selStream; + if (ctrl) { + SelectAll(); + lastClickTime = curTime; + return; + } + if (!shift) { + lineAnchor = LineFromLocation(pt); + // Single click in margin: select whole line + LineSelection(lineAnchor, lineAnchor); + SetSelection(pdoc->LineStart(lineAnchor + 1), + pdoc->LineStart(lineAnchor)); + } else { + // Single shift+click in margin: select from line anchor to clicked line + if (anchor > currentPos) + lineAnchor = pdoc->LineFromPosition(anchor - 1); + else + lineAnchor = pdoc->LineFromPosition(anchor); + int lineStart = LineFromLocation(pt); + LineSelection(lineStart, lineAnchor); + //lineAnchor = lineStart; // Keep the same anchor for ButtonMove + } + + SetDragPosition(invalidPosition); + SetMouseCapture(true); + selectionType = selLine; + } else { + if (PointIsHotspot(pt)) { + NotifyHotSpotClicked(newPos, shift, ctrl, alt); + } + if (!shift) { + if (PointInSelection(pt) && !SelectionEmpty()) + inDragDrop = ddInitial; + else + inDragDrop = ddNone; + } +#ifdef __APPLE__ + // we need to additionaly check if the mouse moved before we + // decide that we can in fact start a drag session. Currently + // only OSX will return anything but true. + if (inDragDrop == ddInitial && !Platform::WaitMouseMoved(pt)) { + inDragDrop = ddNone; + } +#endif + SetMouseCapture(true); + if (inDragDrop != ddInitial) { + SetDragPosition(invalidPosition); + if (!shift) { + SetEmptySelection(newPos); + } + selType = alt ? selRectangle : selStream; + selectionType = selChar; + originalAnchorPos = currentPos; + SetRectangularRange(); + } + } + } + lastClickTime = curTime; + lastXChosen = pt.x; + ShowCaretAtCurrentPosition(); +} + +bool Editor::PositionIsHotspot(int position) { + return vs.styles[pdoc->StyleAt(position) & pdoc->stylingBitsMask].hotspot; +} + +bool Editor::PointIsHotspot(Point pt) { + int pos = PositionFromLocationClose(pt); + if (pos == INVALID_POSITION) + return false; + return PositionIsHotspot(pos); +} + +void Editor::SetHotSpotRange(Point *pt) { + if (pt) { + int pos = PositionFromLocation(*pt); + + // If we don't limit this to word characters then the + // range can encompass more than the run range and then + // the underline will not be drawn properly. + int hsStart_ = pdoc->ExtendStyleRange(pos, -1, vs.hotspotSingleLine); + int hsEnd_ = pdoc->ExtendStyleRange(pos, 1, vs.hotspotSingleLine); + + // Only invalidate the range if the hotspot range has changed... + if (hsStart_ != hsStart || hsEnd_ != hsEnd) { + if (hsStart != -1) { + InvalidateRange(hsStart, hsEnd); + } + hsStart = hsStart_; + hsEnd = hsEnd_; + InvalidateRange(hsStart, hsEnd); + } + } else { + if (hsStart != -1) { + int hsStart_ = hsStart; + int hsEnd_ = hsEnd; + hsStart = -1; + hsEnd = -1; + InvalidateRange(hsStart_, hsEnd_); + } else { + hsStart = -1; + hsEnd = -1; + } + } +} + +void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) { + hsStart_ = hsStart; + hsEnd_ = hsEnd; +} + +void Editor::ButtonMove(Point pt) { + if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { + DwellEnd(true); + } + + int movePos = PositionFromLocation(pt); + movePos = MovePositionOutsideChar(movePos, currentPos - movePos); + + if (inDragDrop == ddInitial) { + if (DragThreshold(ptMouseLast, pt)) { + SetMouseCapture(false); + SetDragPosition(movePos); + CopySelectionRange(&drag); + StartDrag(); + } + return; + } + + ptMouseLast = pt; + //Platform::DebugPrintf("Move %d %d\n", pt.x, pt.y); + if (HaveMouseCapture()) { + + // Slow down autoscrolling/selection + autoScrollTimer.ticksToWait -= timer.tickSize; + if (autoScrollTimer.ticksToWait > 0) + return; + autoScrollTimer.ticksToWait = autoScrollDelay; + + // Adjust selection + if (posDrag >= 0) { + SetDragPosition(movePos); + } else { + if (selectionType == selChar) { + SetSelection(movePos); + } else if (selectionType == selWord) { + // Continue selecting by word + if (movePos == originalAnchorPos) { // Didn't move + // No need to do anything. Previously this case was lumped + // in with "Moved forward", but that can be harmful in this + // case: a handler for the NotifyDoubleClick re-adjusts + // the selection for a fancier definition of "word" (for + // example, in Perl it is useful to include the leading + // '$', '%' or '@' on variables for word selection). In this + // the ButtonMove() called via Tick() for auto-scrolling + // could result in the fancier word selection adjustment + // being unmade. + } else if (movePos > originalAnchorPos) { // Moved forward + SetSelection(pdoc->ExtendWordSelect(movePos, 1), + pdoc->ExtendWordSelect(originalAnchorPos, -1)); + } else { // Moved backward + SetSelection(pdoc->ExtendWordSelect(movePos, -1), + pdoc->ExtendWordSelect(originalAnchorPos, 1)); + } + } else { + // Continue selecting by line + int lineMove = LineFromLocation(pt); + LineSelection(lineMove, lineAnchor); + } + } + // While dragging to make rectangular selection, we don't want the current + // position to jump to the end of smaller or empty lines. + //xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; + xEndSelect = XFromPosition(movePos); + + // Autoscroll + PRectangle rcClient = GetClientRectangle(); + if (pt.y > rcClient.bottom) { + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); + if (lineMove < 0) { + lineMove = cs.DisplayFromDoc(pdoc->LinesTotal() - 1); + } + ScrollTo(lineMove - LinesOnScreen() + 5); + Redraw(); + } else if (pt.y < rcClient.top) { + int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); + ScrollTo(lineMove - 5); + Redraw(); + } + EnsureCaretVisible(false, false, true); + + if (hsStart != -1 && !PositionIsHotspot(movePos)) + SetHotSpotRange(NULL); + + } else { + if (vs.fixedColumnWidth > 0) { // There is a margin + if (PointInSelMargin(pt)) { + DisplayCursor(Window::cursorReverseArrow); + return; // No need to test for selection + } + } + // Display regular (drag) cursor over selection + if (PointInSelection(pt) && !SelectionEmpty()) { + DisplayCursor(Window::cursorArrow); + } else if (PointIsHotspot(pt)) { + DisplayCursor(Window::cursorHand); + SetHotSpotRange(&pt); + } else { + DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); + } + } +} + +void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { + //Platform::DebugPrintf("ButtonUp %d %d\n", HaveMouseCapture(), inDragDrop); + int newPos = PositionFromLocation(pt); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); + if (inDragDrop == ddInitial) { + inDragDrop = ddNone; + SetEmptySelection(newPos); + } + if (HaveMouseCapture()) { + if (PointInSelMargin(pt)) { + DisplayCursor(Window::cursorReverseArrow); + } else { + DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); + } + ptMouseLast = pt; + SetMouseCapture(false); + int newPos = PositionFromLocation(pt); + newPos = MovePositionOutsideChar(newPos, currentPos - newPos); + NotifyIndicatorClick(false, newPos, false, false, false); + if (inDragDrop == ddDragging) { + int selStart = SelectionStart(); + int selEnd = SelectionEnd(); + if (selStart < selEnd) { + if (drag.len) { + if (ctrl) { + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else if (newPos < selStart) { + pdoc->DeleteChars(selStart, drag.len); + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else if (newPos > selEnd) { + pdoc->DeleteChars(selStart, drag.len); + newPos -= drag.len; + if (pdoc->InsertString(newPos, drag.s, drag.len)) { + SetSelection(newPos, newPos + drag.len); + } + } else { + SetEmptySelection(newPos); + } + drag.Free(); + } + selectionType = selChar; + } + } else { + if (selectionType == selChar) { + SetSelection(newPos); + } + } + SetRectangularRange(); + lastClickTime = curTime; + lastClick = pt; + lastXChosen = pt.x; + if (selType == selStream) { + SetLastXChosen(); + } + inDragDrop = ddNone; + EnsureCaretVisible(false); + } +} + +// Called frequently to perform background UI including +// caret blinking and automatic scrolling. +void Editor::Tick() { + if (HaveMouseCapture()) { + // Auto scroll + ButtonMove(ptMouseLast); + } + if (caret.period > 0) { + timer.ticksToWait -= timer.tickSize; + if (timer.ticksToWait <= 0) { + caret.on = !caret.on; + timer.ticksToWait = caret.period; + if (caret.active) { + InvalidateCaret(); + } + } + } + if ((dwellDelay < SC_TIME_FOREVER) && + (ticksToDwell > 0) && + (!HaveMouseCapture())) { + ticksToDwell -= timer.tickSize; + if (ticksToDwell <= 0) { + dwelling = true; + NotifyDwelling(ptMouseLast, dwelling); + } + } +} + +bool Editor::Idle() { + + bool idleDone; + + bool wrappingDone = wrapState == eWrapNone; + + if (!wrappingDone) { + // Wrap lines during idle. + WrapLines(false, -1); + // No more wrapping + if (wrapStart == wrapEnd) + wrappingDone = true; + } + + // Add more idle things to do here, but make sure idleDone is + // set correctly before the function returns. returning + // false will stop calling this idle funtion until SetIdle() is + // called again. + + idleDone = wrappingDone; // && thatDone && theOtherThingDone... + + return !idleDone; +} + +void Editor::SetFocusState(bool focusState) { + hasFocus = focusState; + NotifyFocus(hasFocus); + if (hasFocus) { + ShowCaretAtCurrentPosition(); + } else { + CancelModes(); + DropCaret(); + } +} + +bool Editor::PaintContains(PRectangle rc) { + return rcPaint.Contains(rc); +} + +bool Editor::PaintContainsMargin() { + PRectangle rcSelMargin = GetClientRectangle(); + rcSelMargin.right = vs.fixedColumnWidth; + return PaintContains(rcSelMargin); +} + +void Editor::CheckForChangeOutsidePaint(Range r) { + if (paintState == painting && !paintingAllText) { + //Platform::DebugPrintf("Checking range in paint %d-%d\n", r.start, r.end); + if (!r.Valid()) + return; + + PRectangle rcRange = RectangleFromRange(r.start, r.end); + PRectangle rcText = GetTextRectangle(); + if (rcRange.top < rcText.top) { + rcRange.top = rcText.top; + } + if (rcRange.bottom > rcText.bottom) { + rcRange.bottom = rcText.bottom; + } + + if (!PaintContains(rcRange)) { + AbandonPaint(); + } + } +} + +void Editor::SetBraceHighlight(Position pos0, Position pos1, int matchStyle) { + if ((pos0 != braces[0]) || (pos1 != braces[1]) || (matchStyle != bracesMatchStyle)) { + if ((braces[0] != pos0) || (matchStyle != bracesMatchStyle)) { + CheckForChangeOutsidePaint(Range(braces[0])); + CheckForChangeOutsidePaint(Range(pos0)); + braces[0] = pos0; + } + if ((braces[1] != pos1) || (matchStyle != bracesMatchStyle)) { + CheckForChangeOutsidePaint(Range(braces[1])); + CheckForChangeOutsidePaint(Range(pos1)); + braces[1] = pos1; + } + bracesMatchStyle = matchStyle; + if (paintState == notPainting) { + Redraw(); + } + } +} + +void Editor::SetDocPointer(Document *document) { + //Platform::DebugPrintf("** %x setdoc to %x\n", pdoc, document); + pdoc->RemoveWatcher(this, 0); + pdoc->Release(); + if (document == NULL) { + pdoc = new Document(); + } else { + pdoc = document; + } + pdoc->AddRef(); + + // Ensure all positions within document + selType = selStream; + currentPos = 0; + anchor = 0; + targetStart = 0; + targetEnd = 0; + + braces[0] = invalidPosition; + braces[1] = invalidPosition; + + // Reset the contraction state to fully shown. + cs.Clear(); + cs.InsertLines(0, pdoc->LinesTotal() - 1); + llc.Deallocate(); + NeedWrapping(); + + pdoc->AddWatcher(this, 0); + SetScrollBars(); + Redraw(); +} + +/** + * Recursively expand a fold, making lines visible except where they have an unexpanded parent. + */ +void Editor::Expand(int &line, bool doExpand) { + int lineMaxSubord = pdoc->GetLastChild(line); + line++; + while (line <= lineMaxSubord) { + if (doExpand) + cs.SetVisible(line, line, true); + int level = pdoc->GetLevel(line); + if (level & SC_FOLDLEVELHEADERFLAG) { + if (doExpand && cs.GetExpanded(line)) { + Expand(line, true); + } else { + Expand(line, false); + } + } else { + line++; + } + } +} + +void Editor::ToggleContraction(int line) { + if (line >= 0) { + if ((pdoc->GetLevel(line) & SC_FOLDLEVELHEADERFLAG) == 0) { + line = pdoc->GetFoldParent(line); + if (line < 0) + return; + } + + if (cs.GetExpanded(line)) { + int lineMaxSubord = pdoc->GetLastChild(line); + cs.SetExpanded(line, 0); + if (lineMaxSubord > line) { + cs.SetVisible(line + 1, lineMaxSubord, false); + + int lineCurrent = pdoc->LineFromPosition(currentPos); + if (lineCurrent > line && lineCurrent <= lineMaxSubord) { + // This does not re-expand the fold + EnsureCaretVisible(); + } + + SetScrollBars(); + Redraw(); + } + + } else { + if (!(cs.GetVisible(line))) { + EnsureLineVisible(line, false); + GoToLine(line); + } + cs.SetExpanded(line, 1); + Expand(line, true); + SetScrollBars(); + Redraw(); + } + } +} + +/** + * Recurse up from this line to find any folds that prevent this line from being visible + * and unfold them all. + */ +void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { + + // In case in need of wrapping to ensure DisplayFromDoc works. + WrapLines(true, -1); + + if (!cs.GetVisible(lineDoc)) { + int lineParent = pdoc->GetFoldParent(lineDoc); + if (lineParent >= 0) { + if (lineDoc != lineParent) + EnsureLineVisible(lineParent, enforcePolicy); + if (!cs.GetExpanded(lineParent)) { + cs.SetExpanded(lineParent, 1); + Expand(lineParent, true); + } + } + SetScrollBars(); + Redraw(); + } + if (enforcePolicy) { + int lineDisplay = cs.DisplayFromDoc(lineDoc); + if (visiblePolicy & VISIBLE_SLOP) { + if ((topLine > lineDisplay) || ((visiblePolicy & VISIBLE_STRICT) && (topLine + visibleSlop > lineDisplay))) { + SetTopLine(Platform::Clamp(lineDisplay - visibleSlop, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } else if ((lineDisplay > topLine + LinesOnScreen() - 1) || + ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { + SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + } else { + if ((topLine > lineDisplay) || (lineDisplay > topLine + LinesOnScreen() - 1) || (visiblePolicy & VISIBLE_STRICT)) { + SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() / 2 + 1, 0, MaxScrollPos())); + SetVerticalScrollPos(); + Redraw(); + } + } + } +} + +int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) { + pdoc->BeginUndoAction(); + if (length == -1) + length = istrlen(text); + if (replacePatterns) { + text = pdoc->SubstituteByPosition(text, &length); + if (!text) + return 0; + } + if (targetStart != targetEnd) + pdoc->DeleteChars(targetStart, targetEnd - targetStart); + targetEnd = targetStart; + pdoc->InsertString(targetStart, text, length); + targetEnd = targetStart + length; + pdoc->EndUndoAction(); + return length; +} + +bool Editor::IsUnicodeMode() const { + return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage); +} + +int Editor::CodePage() const { + if (pdoc) + return pdoc->dbcsCodePage; + else + return 0; +} + +int Editor::WrapCount(int line) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + + if (surface && ll) { + LayoutLine(line, surface, vs, ll, wrapWidth); + return ll->lines; + } else { + return 1; + } +} + +void Editor::AddStyledText(char *buffer, int appendLength) { + // The buffer consists of alternating character bytes and style bytes + size_t textLength = appendLength / 2; + char *text = new char[textLength]; + if (text) { + size_t i; + for (i=0;iInsertString(CurrentPosition(), text, textLength); + for (i=0;iStartStyling(CurrentPosition(), static_cast(0xff)); + pdoc->SetStyles(textLength, text); + delete []text; + } + SetEmptySelection(currentPos + textLength); +} + +static bool ValidMargin(unsigned long wParam) { + return wParam < ViewStyle::margins; +} + +static char *CharPtrFromSPtr(sptr_t lParam) { + return reinterpret_cast(lParam); +} + +sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { + //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); + + // Optional macro recording hook + if (recordingMacro) + NotifyMacroRecord(iMessage, wParam, lParam); + + switch (iMessage) { + + case SCI_GETTEXT: { + if (lParam == 0) + return pdoc->Length() + 1; + if (wParam == 0) + return 0; + char *ptr = CharPtrFromSPtr(lParam); + unsigned int iChar = 0; + for (; iChar < wParam - 1; iChar++) + ptr[iChar] = pdoc->CharAt(iChar); + ptr[iChar] = '\0'; + return iChar; + } + + case SCI_SETTEXT: { + if (lParam == 0) + return 0; + pdoc->BeginUndoAction(); + pdoc->DeleteChars(0, pdoc->Length()); + SetEmptySelection(0); + pdoc->InsertCString(0, CharPtrFromSPtr(lParam)); + pdoc->EndUndoAction(); + return 1; + } + + case SCI_GETTEXTLENGTH: + return pdoc->Length(); + + case SCI_CUT: + Cut(); + SetLastXChosen(); + break; + + case SCI_COPY: + Copy(); + break; + + case SCI_COPYRANGE: + CopyRangeToClipboard(wParam, lParam); + break; + + case SCI_COPYTEXT: + CopyText(wParam, CharPtrFromSPtr(lParam)); + break; + + case SCI_PASTE: + Paste(); + if (!caretSticky) { + SetLastXChosen(); + } + EnsureCaretVisible(); + break; + + case SCI_CLEAR: + Clear(); + SetLastXChosen(); + EnsureCaretVisible(); + break; + + case SCI_UNDO: + Undo(); + SetLastXChosen(); + break; + + case SCI_CANUNDO: + return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0; + + case SCI_EMPTYUNDOBUFFER: + pdoc->DeleteUndoHistory(); + return 0; + + case SCI_GETFIRSTVISIBLELINE: + return topLine; + + case SCI_GETLINE: { // Risk of overwriting the end of the buffer + int lineStart = pdoc->LineStart(wParam); + int lineEnd = pdoc->LineStart(wParam + 1); + if (lParam == 0) { + return lineEnd - lineStart; + } + char *ptr = CharPtrFromSPtr(lParam); + int iPlace = 0; + for (int iChar = lineStart; iChar < lineEnd; iChar++) { + ptr[iPlace++] = pdoc->CharAt(iChar); + } + return iPlace; + } + + case SCI_GETLINECOUNT: + if (pdoc->LinesTotal() == 0) + return 1; + else + return pdoc->LinesTotal(); + + case SCI_GETMODIFY: + return !pdoc->IsSavePoint(); + + case SCI_SETSEL: { + int nStart = static_cast(wParam); + int nEnd = static_cast(lParam); + if (nEnd < 0) + nEnd = pdoc->Length(); + if (nStart < 0) + nStart = nEnd; // Remove selection + selType = selStream; + SetSelection(nEnd, nStart); + EnsureCaretVisible(); + } + break; + + case SCI_GETSELTEXT: { + if (lParam == 0) { + if (selType == selStream) { + return 1 + SelectionEnd() - SelectionStart(); + } else { + // TODO: why is selLines handled the slow way? + int size = 0; + int extraCharsPerLine = 0; + if (selType != selLines) + extraCharsPerLine = (pdoc->eolMode == SC_EOL_CRLF) ? 2 : 1; + SelectionLineIterator lineIterator(this); + while (lineIterator.Iterate()) { + size += lineIterator.endPos + extraCharsPerLine - lineIterator.startPos; + } + + return 1 + size; + } + } + SelectionText selectedText; + CopySelectionRange(&selectedText); + char *ptr = CharPtrFromSPtr(lParam); + int iChar = 0; + if (selectedText.len) { + for (; iChar < selectedText.len; iChar++) + ptr[iChar] = selectedText.s[iChar]; + } else { + ptr[0] = '\0'; + } + return iChar; + } + + case SCI_LINEFROMPOSITION: + if (static_cast(wParam) < 0) + return 0; + return pdoc->LineFromPosition(wParam); + + case SCI_POSITIONFROMLINE: + if (static_cast(wParam) < 0) + wParam = pdoc->LineFromPosition(SelectionStart()); + if (wParam == 0) + return 0; // Even if there is no text, there is a first line that starts at 0 + if (static_cast(wParam) > pdoc->LinesTotal()) + return -1; + //if (wParam > pdoc->LineFromPosition(pdoc->Length())) // Useful test, anyway... + // return -1; + return pdoc->LineStart(wParam); + + // Replacement of the old Scintilla interpretation of EM_LINELENGTH + case SCI_LINELENGTH: + if ((static_cast(wParam) < 0) || + (static_cast(wParam) > pdoc->LineFromPosition(pdoc->Length()))) + return 0; + return pdoc->LineStart(wParam + 1) - pdoc->LineStart(wParam); + + case SCI_REPLACESEL: { + if (lParam == 0) + return 0; + pdoc->BeginUndoAction(); + ClearSelection(); + char *replacement = CharPtrFromSPtr(lParam); + pdoc->InsertCString(currentPos, replacement); + pdoc->EndUndoAction(); + SetEmptySelection(currentPos + istrlen(replacement)); + EnsureCaretVisible(); + } + break; + + case SCI_SETTARGETSTART: + targetStart = wParam; + break; + + case SCI_GETTARGETSTART: + return targetStart; + + case SCI_SETTARGETEND: + targetEnd = wParam; + break; + + case SCI_GETTARGETEND: + return targetEnd; + + case SCI_TARGETFROMSELECTION: + if (currentPos < anchor) { + targetStart = currentPos; + targetEnd = anchor; + } else { + targetStart = anchor; + targetEnd = currentPos; + } + break; + + case SCI_REPLACETARGET: + PLATFORM_ASSERT(lParam); + return ReplaceTarget(false, CharPtrFromSPtr(lParam), wParam); + + case SCI_REPLACETARGETRE: + PLATFORM_ASSERT(lParam); + return ReplaceTarget(true, CharPtrFromSPtr(lParam), wParam); + + case SCI_SEARCHINTARGET: + PLATFORM_ASSERT(lParam); + return SearchInTarget(CharPtrFromSPtr(lParam), wParam); + + case SCI_SETSEARCHFLAGS: + searchFlags = wParam; + break; + + case SCI_GETSEARCHFLAGS: + return searchFlags; + + case SCI_POSITIONBEFORE: + return pdoc->MovePositionOutsideChar(wParam-1, -1, true); + + case SCI_POSITIONAFTER: + return pdoc->MovePositionOutsideChar(wParam+1, 1, true); + + case SCI_LINESCROLL: + ScrollTo(topLine + lParam); + HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); + return 1; + + case SCI_SETXOFFSET: + xOffset = wParam; + SetHorizontalScrollPos(); + Redraw(); + break; + + case SCI_GETXOFFSET: + return xOffset; + + case SCI_CHOOSECARETX: + SetLastXChosen(); + break; + + case SCI_SCROLLCARET: + EnsureCaretVisible(); + break; + + case SCI_SETREADONLY: + pdoc->SetReadOnly(wParam != 0); + return 1; + + case SCI_GETREADONLY: + return pdoc->IsReadOnly(); + + case SCI_CANPASTE: + return CanPaste(); + + case SCI_POINTXFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.x; + } + + case SCI_POINTYFROMPOSITION: + if (lParam < 0) { + return 0; + } else { + Point pt = LocationFromPosition(lParam); + return pt.y; + } + + case SCI_FINDTEXT: + return FindText(wParam, lParam); + + case SCI_GETTEXTRANGE: { + if (lParam == 0) + return 0; + TextRange *tr = reinterpret_cast(lParam); + int cpMax = tr->chrg.cpMax; + if (cpMax == -1) + cpMax = pdoc->Length(); + PLATFORM_ASSERT(cpMax <= pdoc->Length()); + int len = cpMax - tr->chrg.cpMin; // No -1 as cpMin and cpMax are referring to inter character positions + pdoc->GetCharRange(tr->lpstrText, tr->chrg.cpMin, len); + // Spec says copied text is terminated with a NUL + tr->lpstrText[len] = '\0'; + return len; // Not including NUL + } + + case SCI_HIDESELECTION: + hideSelection = wParam != 0; + Redraw(); + break; + + case SCI_FORMATRANGE: + return FormatRange(wParam != 0, reinterpret_cast(lParam)); + + case SCI_GETMARGINLEFT: + return vs.leftMarginWidth; + + case SCI_GETMARGINRIGHT: + return vs.rightMarginWidth; + + case SCI_SETMARGINLEFT: + vs.leftMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + case SCI_SETMARGINRIGHT: + vs.rightMarginWidth = lParam; + InvalidateStyleRedraw(); + break; + + // Control specific mesages + + case SCI_ADDTEXT: { + if (lParam == 0) + return 0; + pdoc->InsertString(CurrentPosition(), CharPtrFromSPtr(lParam), wParam); + SetEmptySelection(currentPos + wParam); + return 0; + } + + case SCI_ADDSTYLEDTEXT: + if (lParam) + AddStyledText(CharPtrFromSPtr(lParam), wParam); + return 0; + + case SCI_INSERTTEXT: { + if (lParam == 0) + return 0; + int insertPos = wParam; + if (static_cast(wParam) == -1) + insertPos = CurrentPosition(); + int newCurrent = CurrentPosition(); + char *sz = CharPtrFromSPtr(lParam); + pdoc->InsertCString(insertPos, sz); + if (newCurrent > insertPos) + newCurrent += istrlen(sz); + SetEmptySelection(newCurrent); + return 0; + } + + case SCI_APPENDTEXT: + pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam); + return 0; + + case SCI_CLEARALL: + ClearAll(); + return 0; + + case SCI_CLEARDOCUMENTSTYLE: + ClearDocumentStyle(); + return 0; + + case SCI_SETUNDOCOLLECTION: + pdoc->SetUndoCollection(wParam != 0); + return 0; + + case SCI_GETUNDOCOLLECTION: + return pdoc->IsCollectingUndo(); + + case SCI_BEGINUNDOACTION: + pdoc->BeginUndoAction(); + return 0; + + case SCI_ENDUNDOACTION: + pdoc->EndUndoAction(); + return 0; + + case SCI_GETCARETPERIOD: + return caret.period; + + case SCI_SETCARETPERIOD: + caret.period = wParam; + break; + + case SCI_SETWORDCHARS: { + pdoc->SetDefaultCharClasses(false); + if (lParam == 0) + return 0; + pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccWord); + } + break; + + case SCI_SETWHITESPACECHARS: { + if (lParam == 0) + return 0; + pdoc->SetCharClasses(reinterpret_cast(lParam), CharClassify::ccSpace); + } + break; + + case SCI_SETCHARSDEFAULT: + pdoc->SetDefaultCharClasses(true); + break; + + case SCI_GETLENGTH: + return pdoc->Length(); + + case SCI_ALLOCATE: + pdoc->Allocate(wParam); + break; + + case SCI_GETCHARAT: + return pdoc->CharAt(wParam); + + case SCI_SETCURRENTPOS: + SetSelection(wParam, anchor); + break; + + case SCI_GETCURRENTPOS: + return currentPos; + + case SCI_SETANCHOR: + SetSelection(currentPos, wParam); + break; + + case SCI_GETANCHOR: + return anchor; + + case SCI_SETSELECTIONSTART: + SetSelection(Platform::Maximum(currentPos, wParam), wParam); + break; + + case SCI_GETSELECTIONSTART: + return Platform::Minimum(anchor, currentPos); + + case SCI_SETSELECTIONEND: + SetSelection(wParam, Platform::Minimum(anchor, wParam)); + break; + + case SCI_GETSELECTIONEND: + return Platform::Maximum(anchor, currentPos); + + case SCI_SETPRINTMAGNIFICATION: + printMagnification = wParam; + break; + + case SCI_GETPRINTMAGNIFICATION: + return printMagnification; + + case SCI_SETPRINTCOLOURMODE: + printColourMode = wParam; + break; + + case SCI_GETPRINTCOLOURMODE: + return printColourMode; + + case SCI_SETPRINTWRAPMODE: + printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; + break; + + case SCI_GETPRINTWRAPMODE: + return printWrapState; + + case SCI_GETSTYLEAT: + if (static_cast(wParam) >= pdoc->Length()) + return 0; + else + return pdoc->StyleAt(wParam); + + case SCI_REDO: + Redo(); + break; + + case SCI_SELECTALL: + SelectAll(); + break; + + case SCI_SETSAVEPOINT: + pdoc->SetSavePoint(); + break; + + case SCI_GETSTYLEDTEXT: { + if (lParam == 0) + return 0; + TextRange *tr = reinterpret_cast(lParam); + int iPlace = 0; + for (int iChar = tr->chrg.cpMin; iChar < tr->chrg.cpMax; iChar++) { + tr->lpstrText[iPlace++] = pdoc->CharAt(iChar); + tr->lpstrText[iPlace++] = pdoc->StyleAt(iChar); + } + tr->lpstrText[iPlace] = '\0'; + tr->lpstrText[iPlace + 1] = '\0'; + return iPlace; + } + + case SCI_CANREDO: + return (pdoc->CanRedo() && !pdoc->IsReadOnly()) ? 1 : 0; + + case SCI_MARKERLINEFROMHANDLE: + return pdoc->LineFromHandle(wParam); + + case SCI_MARKERDELETEHANDLE: + pdoc->DeleteMarkFromHandle(wParam); + break; + + case SCI_GETVIEWWS: + return vs.viewWhitespace; + + case SCI_SETVIEWWS: + vs.viewWhitespace = static_cast(wParam); + Redraw(); + break; + + case SCI_POSITIONFROMPOINT: + return PositionFromLocation(Point(wParam, lParam)); + + case SCI_POSITIONFROMPOINTCLOSE: + return PositionFromLocationClose(Point(wParam, lParam)); + + case SCI_GOTOLINE: + GoToLine(wParam); + break; + + case SCI_GOTOPOS: + SetEmptySelection(wParam); + EnsureCaretVisible(); + Redraw(); + break; + + case SCI_GETCURLINE: { + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + int lineStart = pdoc->LineStart(lineCurrentPos); + unsigned int lineEnd = pdoc->LineStart(lineCurrentPos + 1); + if (lParam == 0) { + return 1 + lineEnd - lineStart; + } + PLATFORM_ASSERT(wParam > 0); + char *ptr = CharPtrFromSPtr(lParam); + unsigned int iPlace = 0; + for (unsigned int iChar = lineStart; iChar < lineEnd && iPlace < wParam - 1; iChar++) { + ptr[iPlace++] = pdoc->CharAt(iChar); + } + ptr[iPlace] = '\0'; + return currentPos - lineStart; + } + + case SCI_GETENDSTYLED: + return pdoc->GetEndStyled(); + + case SCI_GETEOLMODE: + return pdoc->eolMode; + + case SCI_SETEOLMODE: + pdoc->eolMode = wParam; + break; + + case SCI_STARTSTYLING: + pdoc->StartStyling(wParam, static_cast(lParam)); + break; + + case SCI_SETSTYLING: + pdoc->SetStyleFor(wParam, static_cast(lParam)); + break; + + case SCI_SETSTYLINGEX: // Specify a complete styling buffer + if (lParam == 0) + return 0; + pdoc->SetStyles(wParam, CharPtrFromSPtr(lParam)); + break; + + case SCI_SETBUFFEREDDRAW: + bufferedDraw = wParam != 0; + break; + + case SCI_GETBUFFEREDDRAW: + return bufferedDraw; + + case SCI_GETTWOPHASEDRAW: + return twoPhaseDraw; + + case SCI_SETTWOPHASEDRAW: + twoPhaseDraw = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETTABWIDTH: + if (wParam > 0) { + pdoc->tabInChars = wParam; + if (pdoc->indentInChars == 0) + pdoc->actualIndentInChars = pdoc->tabInChars; + } + InvalidateStyleRedraw(); + break; + + case SCI_GETTABWIDTH: + return pdoc->tabInChars; + + case SCI_SETINDENT: + pdoc->indentInChars = wParam; + if (pdoc->indentInChars != 0) + pdoc->actualIndentInChars = pdoc->indentInChars; + else + pdoc->actualIndentInChars = pdoc->tabInChars; + InvalidateStyleRedraw(); + break; + + case SCI_GETINDENT: + return pdoc->indentInChars; + + case SCI_SETUSETABS: + pdoc->useTabs = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSETABS: + return pdoc->useTabs; + + case SCI_SETLINEINDENTATION: + pdoc->SetLineIndentation(wParam, lParam); + break; + + case SCI_GETLINEINDENTATION: + return pdoc->GetLineIndentation(wParam); + + case SCI_GETLINEINDENTPOSITION: + return pdoc->GetLineIndentPosition(wParam); + + case SCI_SETTABINDENTS: + pdoc->tabIndents = wParam != 0; + break; + + case SCI_GETTABINDENTS: + return pdoc->tabIndents; + + case SCI_SETBACKSPACEUNINDENTS: + pdoc->backspaceUnindents = wParam != 0; + break; + + case SCI_GETBACKSPACEUNINDENTS: + return pdoc->backspaceUnindents; + + case SCI_SETMOUSEDWELLTIME: + dwellDelay = wParam; + ticksToDwell = dwellDelay; + break; + + case SCI_GETMOUSEDWELLTIME: + return dwellDelay; + + case SCI_WORDSTARTPOSITION: + return pdoc->ExtendWordSelect(wParam, -1, lParam != 0); + + case SCI_WORDENDPOSITION: + return pdoc->ExtendWordSelect(wParam, 1, lParam != 0); + + case SCI_SETWRAPMODE: + switch (wParam) { + case SC_WRAP_WORD: + wrapState = eWrapWord; + break; + case SC_WRAP_CHAR: + wrapState = eWrapChar; + break; + default: + wrapState = eWrapNone; + break; + } + xOffset = 0; + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPMODE: + return wrapState; + + case SCI_SETWRAPVISUALFLAGS: + wrapVisualFlags = wParam; + actualWrapVisualStartIndent = wrapVisualStartIndent; + if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) + actualWrapVisualStartIndent = 1; // must indent to show start visual + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPVISUALFLAGS: + return wrapVisualFlags; + + case SCI_SETWRAPVISUALFLAGSLOCATION: + wrapVisualFlagsLocation = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETWRAPVISUALFLAGSLOCATION: + return wrapVisualFlagsLocation; + + case SCI_SETWRAPSTARTINDENT: + wrapVisualStartIndent = wParam; + actualWrapVisualStartIndent = wrapVisualStartIndent; + if ((wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (actualWrapVisualStartIndent == 0)) + actualWrapVisualStartIndent = 1; // must indent to show start visual + InvalidateStyleRedraw(); + ReconfigureScrollBars(); + break; + + case SCI_GETWRAPSTARTINDENT: + return wrapVisualStartIndent; + + case SCI_SETLAYOUTCACHE: + llc.SetLevel(wParam); + break; + + case SCI_GETLAYOUTCACHE: + return llc.GetLevel(); + + case SCI_SETPOSITIONCACHE: + posCache.SetSize(wParam); + break; + + case SCI_GETPOSITIONCACHE: + return posCache.GetSize(); + + case SCI_SETSCROLLWIDTH: + PLATFORM_ASSERT(wParam > 0); + if ((wParam > 0) && (wParam != static_cast(scrollWidth))) { + scrollWidth = wParam; + SetScrollBars(); + } + break; + + case SCI_GETSCROLLWIDTH: + return scrollWidth; + + case SCI_LINESJOIN: + LinesJoin(); + break; + + case SCI_LINESSPLIT: + LinesSplit(wParam); + break; + + case SCI_TEXTWIDTH: + PLATFORM_ASSERT(wParam <= STYLE_MAX); + PLATFORM_ASSERT(lParam); + return TextWidth(wParam, CharPtrFromSPtr(lParam)); + + case SCI_TEXTHEIGHT: + return vs.lineHeight; + + case SCI_SETENDATLASTLINE: + PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); + if (endAtLastLine != (wParam != 0)) { + endAtLastLine = wParam != 0; + SetScrollBars(); + } + break; + + case SCI_GETENDATLASTLINE: + return endAtLastLine; + + case SCI_SETCARETSTICKY: + PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); + if (caretSticky != (wParam != 0)) { + caretSticky = wParam != 0; + } + break; + + case SCI_GETCARETSTICKY: + return caretSticky; + + case SCI_TOGGLECARETSTICKY: + caretSticky = !caretSticky; + break; + + case SCI_GETCOLUMN: + return pdoc->GetColumn(wParam); + + case SCI_FINDCOLUMN: + return pdoc->FindColumn(wParam, lParam); + + case SCI_SETHSCROLLBAR : + if (horizontalScrollBarVisible != (wParam != 0)) { + horizontalScrollBarVisible = wParam != 0; + SetScrollBars(); + ReconfigureScrollBars(); + } + break; + + case SCI_GETHSCROLLBAR: + return horizontalScrollBarVisible; + + case SCI_SETVSCROLLBAR: + if (verticalScrollBarVisible != (wParam != 0)) { + verticalScrollBarVisible = wParam != 0; + SetScrollBars(); + ReconfigureScrollBars(); + } + break; + + case SCI_GETVSCROLLBAR: + return verticalScrollBarVisible; + + case SCI_SETINDENTATIONGUIDES: + vs.viewIndentationGuides = wParam != 0; + Redraw(); + break; + + case SCI_GETINDENTATIONGUIDES: + return vs.viewIndentationGuides; + + case SCI_SETHIGHLIGHTGUIDE: + if ((highlightGuideColumn != static_cast(wParam)) || (wParam > 0)) { + highlightGuideColumn = wParam; + Redraw(); + } + break; + + case SCI_GETHIGHLIGHTGUIDE: + return highlightGuideColumn; + + case SCI_GETLINEENDPOSITION: + return pdoc->LineEnd(wParam); + + case SCI_SETCODEPAGE: + if (ValidCodePage(wParam)) { + pdoc->dbcsCodePage = wParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETCODEPAGE: + return pdoc->dbcsCodePage; + + case SCI_SETUSEPALETTE: + palette.allowRealization = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETUSEPALETTE: + return palette.allowRealization; + + // Marker definition and setting + case SCI_MARKERDEFINE: + if (wParam <= MARKER_MAX) + vs.markers[wParam].markType = lParam; + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETFORE: + if (wParam <= MARKER_MAX) + vs.markers[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETBACK: + if (wParam <= MARKER_MAX) + vs.markers[wParam].back.desired = ColourDesired(lParam); + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_MARKERSETALPHA: + if (wParam <= MARKER_MAX) + vs.markers[wParam].alpha = lParam; + InvalidateStyleRedraw(); + break; + case SCI_MARKERADD: { + int markerID = pdoc->AddMark(wParam, lParam); + return markerID; + } + case SCI_MARKERADDSET: + if (lParam != 0) + pdoc->AddMarkSet(wParam, lParam); + break; + + case SCI_MARKERDELETE: + pdoc->DeleteMark(wParam, lParam); + break; + + case SCI_MARKERDELETEALL: + pdoc->DeleteAllMarks(static_cast(wParam)); + break; + + case SCI_MARKERGET: + return pdoc->GetMark(wParam); + + case SCI_MARKERNEXT: { + int lt = pdoc->LinesTotal(); + for (int iLine = wParam; iLine < lt; iLine++) { + if ((pdoc->GetMark(iLine) & lParam) != 0) + return iLine; + } + } + return -1; + + case SCI_MARKERPREVIOUS: { + for (int iLine = wParam; iLine >= 0; iLine--) { + if ((pdoc->GetMark(iLine) & lParam) != 0) + return iLine; + } + } + return -1; + + case SCI_MARKERDEFINEPIXMAP: + if (wParam <= MARKER_MAX) { + vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam)); + }; + InvalidateStyleData(); + RedrawSelMargin(); + break; + + case SCI_SETMARGINTYPEN: + if (ValidMargin(wParam)) { + vs.ms[wParam].style = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINTYPEN: + if (ValidMargin(wParam)) + return vs.ms[wParam].style; + else + return 0; + + case SCI_SETMARGINWIDTHN: + if (ValidMargin(wParam)) { + // Short-circuit if the width is unchanged, to avoid unnecessary redraw. + if (vs.ms[wParam].width != lParam) { + vs.ms[wParam].width = lParam; + InvalidateStyleRedraw(); + } + } + break; + + case SCI_GETMARGINWIDTHN: + if (ValidMargin(wParam)) + return vs.ms[wParam].width; + else + return 0; + + case SCI_SETMARGINMASKN: + if (ValidMargin(wParam)) { + vs.ms[wParam].mask = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINMASKN: + if (ValidMargin(wParam)) + return vs.ms[wParam].mask; + else + return 0; + + case SCI_SETMARGINSENSITIVEN: + if (ValidMargin(wParam)) { + vs.ms[wParam].sensitive = lParam != 0; + InvalidateStyleRedraw(); + } + break; + + case SCI_GETMARGINSENSITIVEN: + if (ValidMargin(wParam)) + return vs.ms[wParam].sensitive ? 1 : 0; + else + return 0; + + case SCI_STYLECLEARALL: + vs.ClearStyles(); + InvalidateStyleRedraw(); + break; + + case SCI_STYLESETFORE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETBACK: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].back.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETBOLD: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].bold = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETITALIC: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].italic = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETEOLFILLED: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].eolFilled = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETSIZE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].size = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETFONT: + if (lParam == 0) + return 0; + if (wParam <= STYLE_MAX) { + vs.SetStyleFontName(wParam, CharPtrFromSPtr(lParam)); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETUNDERLINE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].underline = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCASE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].caseForce = static_cast(lParam); + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHARACTERSET: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].characterSet = lParam; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETVISIBLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].visible = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETCHANGEABLE: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].changeable = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLESETHOTSPOT: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].hotspot = lParam != 0; + InvalidateStyleRedraw(); + } + break; + case SCI_STYLEGETFORE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].fore.desired.AsLong(); + else + return 0; + case SCI_STYLEGETBACK: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].back.desired.AsLong(); + else + return 0; + case SCI_STYLEGETBOLD: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].bold ? 1 : 0; + else + return 0; + case SCI_STYLEGETITALIC: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].italic ? 1 : 0; + else + return 0; + case SCI_STYLEGETEOLFILLED: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].eolFilled ? 1 : 0; + else + return 0; + case SCI_STYLEGETSIZE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].size; + else + return 0; + case SCI_STYLEGETFONT: + if (lParam == 0) + return strlen(vs.styles[wParam].fontName); + + if (wParam <= STYLE_MAX) + strcpy(CharPtrFromSPtr(lParam), vs.styles[wParam].fontName); + break; + case SCI_STYLEGETUNDERLINE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].underline ? 1 : 0; + else + return 0; + case SCI_STYLEGETCASE: + if (wParam <= STYLE_MAX) + return static_cast(vs.styles[wParam].caseForce); + else + return 0; + case SCI_STYLEGETCHARACTERSET: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].characterSet; + else + return 0; + case SCI_STYLEGETVISIBLE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].visible ? 1 : 0; + else + return 0; + case SCI_STYLEGETCHANGEABLE: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].changeable ? 1 : 0; + else + return 0; + case SCI_STYLEGETHOTSPOT: + if (wParam <= STYLE_MAX) + return vs.styles[wParam].hotspot ? 1 : 0; + else + return 0; + case SCI_STYLERESETDEFAULT: + vs.ResetDefaultStyle(); + InvalidateStyleRedraw(); + break; + case SCI_SETSTYLEBITS: + pdoc->SetStylingBits(wParam); + break; + + case SCI_GETSTYLEBITS: + return pdoc->stylingBits; + + case SCI_SETLINESTATE: + return pdoc->SetLineState(wParam, lParam); + + case SCI_GETLINESTATE: + return pdoc->GetLineState(wParam); + + case SCI_GETMAXLINESTATE: + return pdoc->GetMaxLineState(); + + case SCI_GETCARETLINEVISIBLE: + return vs.showCaretLineBackground; + case SCI_SETCARETLINEVISIBLE: + vs.showCaretLineBackground = wParam != 0; + InvalidateStyleRedraw(); + break; + case SCI_GETCARETLINEBACK: + return vs.caretLineBackground.desired.AsLong(); + case SCI_SETCARETLINEBACK: + vs.caretLineBackground.desired = wParam; + InvalidateStyleRedraw(); + break; + case SCI_GETCARETLINEBACKALPHA: + return vs.caretLineAlpha; + case SCI_SETCARETLINEBACKALPHA: + vs.caretLineAlpha = wParam; + InvalidateStyleRedraw(); + break; + + // Folding messages + + case SCI_VISIBLEFROMDOCLINE: + return cs.DisplayFromDoc(wParam); + + case SCI_DOCLINEFROMVISIBLE: + return cs.DocFromDisplay(wParam); + + case SCI_WRAPCOUNT: + return WrapCount(wParam); + + case SCI_SETFOLDLEVEL: { + int prev = pdoc->SetLevel(wParam, lParam); + if (prev != lParam) + RedrawSelMargin(); + return prev; + } + + case SCI_GETFOLDLEVEL: + return pdoc->GetLevel(wParam); + + case SCI_GETLASTCHILD: + return pdoc->GetLastChild(wParam, lParam); + + case SCI_GETFOLDPARENT: + return pdoc->GetFoldParent(wParam); + + case SCI_SHOWLINES: + cs.SetVisible(wParam, lParam, true); + SetScrollBars(); + Redraw(); + break; + + case SCI_HIDELINES: + cs.SetVisible(wParam, lParam, false); + SetScrollBars(); + Redraw(); + break; + + case SCI_GETLINEVISIBLE: + return cs.GetVisible(wParam); + + case SCI_SETFOLDEXPANDED: + if (cs.SetExpanded(wParam, lParam != 0)) { + RedrawSelMargin(); + } + break; + + case SCI_GETFOLDEXPANDED: + return cs.GetExpanded(wParam); + + case SCI_SETFOLDFLAGS: + foldFlags = wParam; + Redraw(); + break; + + case SCI_TOGGLEFOLD: + ToggleContraction(wParam); + break; + + case SCI_ENSUREVISIBLE: + EnsureLineVisible(wParam, false); + break; + + case SCI_ENSUREVISIBLEENFORCEPOLICY: + EnsureLineVisible(wParam, true); + break; + + case SCI_SEARCHANCHOR: + SearchAnchor(); + break; + + case SCI_SEARCHNEXT: + case SCI_SEARCHPREV: + return SearchText(iMessage, wParam, lParam); + +#ifdef INCLUDE_DEPRECATED_FEATURES + case SCI_SETCARETPOLICY: // Deprecated + caretXPolicy = caretYPolicy = wParam; + caretXSlop = caretYSlop = lParam; + break; +#endif + + case SCI_SETXCARETPOLICY: + caretXPolicy = wParam; + caretXSlop = lParam; + break; + + case SCI_SETYCARETPOLICY: + caretYPolicy = wParam; + caretYSlop = lParam; + break; + + case SCI_SETVISIBLEPOLICY: + visiblePolicy = wParam; + visibleSlop = lParam; + break; + + case SCI_LINESONSCREEN: + return LinesOnScreen(); + + case SCI_SETSELFORE: + vs.selforeset = wParam != 0; + vs.selforeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETSELBACK: + vs.selbackset = wParam != 0; + vs.selbackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETSELALPHA: + vs.selAlpha = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETSELALPHA: + return vs.selAlpha; + + case SCI_GETSELEOLFILLED: + return vs.selEOLFilled; + + case SCI_SETSELEOLFILLED: + vs.selEOLFilled = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETWHITESPACEFORE: + vs.whitespaceForegroundSet = wParam != 0; + vs.whitespaceForeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETWHITESPACEBACK: + vs.whitespaceBackgroundSet = wParam != 0; + vs.whitespaceBackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETCARETFORE: + vs.caretcolour.desired = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETCARETFORE: + return vs.caretcolour.desired.AsLong(); + + case SCI_SETCARETSTYLE: + if (wParam >= CARETSTYLE_INVISIBLE && wParam <= CARETSTYLE_BLOCK) + vs.caretStyle = wParam; + else + /* Default to the line caret */ + vs.caretStyle = CARETSTYLE_LINE; + InvalidateStyleRedraw(); + break; + + case SCI_GETCARETSTYLE: + return vs.caretStyle; + + case SCI_SETCARETWIDTH: + if (wParam <= 0) + vs.caretWidth = 0; + else if (wParam >= 3) + vs.caretWidth = 3; + else + vs.caretWidth = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETCARETWIDTH: + return vs.caretWidth; + + case SCI_ASSIGNCMDKEY: + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), lParam); + break; + + case SCI_CLEARCMDKEY: + kmap.AssignCmdKey(Platform::LowShortFromLong(wParam), + Platform::HighShortFromLong(wParam), SCI_NULL); + break; + + case SCI_CLEARALLCMDKEYS: + kmap.Clear(); + break; + + case SCI_INDICSETSTYLE: + if (wParam <= INDIC_MAX) { + vs.indicators[wParam].style = lParam; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETSTYLE: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].style : 0; + + case SCI_INDICSETFORE: + if (wParam <= INDIC_MAX) { + vs.indicators[wParam].fore.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETFORE: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fore.desired.AsLong() : 0; + + case SCI_INDICSETUNDER: + if (wParam <= INDIC_MAX) { + vs.indicators[wParam].under = lParam != 0; + InvalidateStyleRedraw(); + } + break; + + case SCI_INDICGETUNDER: + return (wParam <= INDIC_MAX) ? vs.indicators[wParam].under : 0; + + case SCI_SETINDICATORCURRENT: + pdoc->decorations.SetCurrentIndicator(wParam); + break; + case SCI_GETINDICATORCURRENT: + return pdoc->decorations.GetCurrentIndicator(); + case SCI_SETINDICATORVALUE: + pdoc->decorations.SetCurrentValue(wParam); + break; + case SCI_GETINDICATORVALUE: + return pdoc->decorations.GetCurrentValue(); + + case SCI_INDICATORFILLRANGE: + pdoc->DecorationFillRange(wParam, pdoc->decorations.GetCurrentValue(), lParam); + break; + + case SCI_INDICATORCLEARRANGE: + pdoc->DecorationFillRange(wParam, 0, lParam); + break; + + case SCI_INDICATORALLONFOR: + return pdoc->decorations.AllOnFor(wParam); + + case SCI_INDICATORVALUEAT: + return pdoc->decorations.ValueAt(wParam, lParam); + + case SCI_INDICATORSTART: + return pdoc->decorations.Start(wParam, lParam); + + case SCI_INDICATOREND: + return pdoc->decorations.End(wParam, lParam); + + case SCI_LINEDOWN: + case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: + case SCI_LINEUP: + case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: + case SCI_CHARLEFT: + case SCI_CHARLEFTEXTEND: + case SCI_CHARRIGHT: + case SCI_CHARRIGHTEXTEND: + case SCI_WORDLEFT: + case SCI_WORDLEFTEXTEND: + case SCI_WORDRIGHT: + case SCI_WORDRIGHTEXTEND: + case SCI_WORDLEFTEND: + case SCI_WORDLEFTENDEXTEND: + case SCI_WORDRIGHTEND: + case SCI_WORDRIGHTENDEXTEND: + case SCI_HOME: + case SCI_HOMEEXTEND: + case SCI_LINEEND: + case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: + case SCI_DOCUMENTSTART: + case SCI_DOCUMENTSTARTEXTEND: + case SCI_DOCUMENTEND: + case SCI_DOCUMENTENDEXTEND: + + case SCI_STUTTEREDPAGEUP: + case SCI_STUTTEREDPAGEUPEXTEND: + case SCI_STUTTEREDPAGEDOWN: + case SCI_STUTTEREDPAGEDOWNEXTEND: + + case SCI_PAGEUP: + case SCI_PAGEUPEXTEND: + case SCI_PAGEDOWN: + case SCI_PAGEDOWNEXTEND: + case SCI_EDITTOGGLEOVERTYPE: + case SCI_CANCEL: + case SCI_DELETEBACK: + case SCI_TAB: + case SCI_BACKTAB: + case SCI_NEWLINE: + case SCI_FORMFEED: + case SCI_VCHOME: + case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: + case SCI_ZOOMIN: + case SCI_ZOOMOUT: + case SCI_DELWORDLEFT: + case SCI_DELWORDRIGHT: + case SCI_DELLINELEFT: + case SCI_DELLINERIGHT: + case SCI_LINECOPY: + case SCI_LINECUT: + case SCI_LINEDELETE: + case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: + case SCI_LOWERCASE: + case SCI_UPPERCASE: + case SCI_LINESCROLLDOWN: + case SCI_LINESCROLLUP: + case SCI_WORDPARTLEFT: + case SCI_WORDPARTLEFTEXTEND: + case SCI_WORDPARTRIGHT: + case SCI_WORDPARTRIGHTEXTEND: + case SCI_DELETEBACKNOTLINE: + case SCI_HOMEDISPLAY: + case SCI_HOMEDISPLAYEXTEND: + case SCI_LINEENDDISPLAY: + case SCI_LINEENDDISPLAYEXTEND: + case SCI_LINEDOWNRECTEXTEND: + case SCI_LINEUPRECTEXTEND: + case SCI_CHARLEFTRECTEXTEND: + case SCI_CHARRIGHTRECTEXTEND: + case SCI_HOMERECTEXTEND: + case SCI_VCHOMERECTEXTEND: + case SCI_LINEENDRECTEXTEND: + case SCI_PAGEUPRECTEXTEND: + case SCI_PAGEDOWNRECTEXTEND: + case SCI_SELECTIONDUPLICATE: + return KeyCommand(iMessage); + + case SCI_BRACEHIGHLIGHT: + SetBraceHighlight(static_cast(wParam), lParam, STYLE_BRACELIGHT); + break; + + case SCI_BRACEBADLIGHT: + SetBraceHighlight(static_cast(wParam), -1, STYLE_BRACEBAD); + break; + + case SCI_BRACEMATCH: + // wParam is position of char to find brace for, + // lParam is maximum amount of text to restyle to find it + return pdoc->BraceMatch(wParam, lParam); + + case SCI_GETVIEWEOL: + return vs.viewEOL; + + case SCI_SETVIEWEOL: + vs.viewEOL = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_SETZOOM: + vs.zoomLevel = wParam; + InvalidateStyleRedraw(); + NotifyZoom(); + break; + + case SCI_GETZOOM: + return vs.zoomLevel; + + case SCI_GETEDGECOLUMN: + return theEdge; + + case SCI_SETEDGECOLUMN: + theEdge = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEDGEMODE: + return vs.edgeState; + + case SCI_SETEDGEMODE: + vs.edgeState = wParam; + InvalidateStyleRedraw(); + break; + + case SCI_GETEDGECOLOUR: + return vs.edgecolour.desired.AsLong(); + + case SCI_SETEDGECOLOUR: + vs.edgecolour.desired = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETDOCPOINTER: + return reinterpret_cast(pdoc); + + case SCI_SETDOCPOINTER: + CancelModes(); + SetDocPointer(reinterpret_cast(lParam)); + return 0; + + case SCI_CREATEDOCUMENT: { + Document *doc = new Document(); + if (doc) { + doc->AddRef(); + } + return reinterpret_cast(doc); + } + + case SCI_ADDREFDOCUMENT: + (reinterpret_cast(lParam))->AddRef(); + break; + + case SCI_RELEASEDOCUMENT: + (reinterpret_cast(lParam))->Release(); + break; + + case SCI_SETMODEVENTMASK: + modEventMask = wParam; + return 0; + + case SCI_GETMODEVENTMASK: + return modEventMask; + + case SCI_CONVERTEOLS: + pdoc->ConvertLineEnds(wParam); + SetSelection(currentPos, anchor); // Ensure selection inside document + return 0; + + case SCI_SETLENGTHFORENCODE: + lengthForEncode = wParam; + return 0; + + case SCI_SELECTIONISRECTANGLE: + return selType == selRectangle ? 1 : 0; + + case SCI_SETSELECTIONMODE: { + switch (wParam) { + case SC_SEL_STREAM: + moveExtendsSelection = !moveExtendsSelection || (selType != selStream); + selType = selStream; + break; + case SC_SEL_RECTANGLE: + moveExtendsSelection = !moveExtendsSelection || (selType != selRectangle); + selType = selRectangle; + break; + case SC_SEL_LINES: + moveExtendsSelection = !moveExtendsSelection || (selType != selLines); + selType = selLines; + break; + default: + moveExtendsSelection = !moveExtendsSelection || (selType != selStream); + selType = selStream; + } + InvalidateSelection(currentPos, anchor); + } + case SCI_GETSELECTIONMODE: + switch (selType) { + case selStream: + return SC_SEL_STREAM; + case selRectangle: + return SC_SEL_RECTANGLE; + case selLines: + return SC_SEL_LINES; + default: // ?! + return SC_SEL_STREAM; + } + case SCI_GETLINESELSTARTPOSITION: { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(wParam); + return lineIterator.startPos; + } + case SCI_GETLINESELENDPOSITION: { + SelectionLineIterator lineIterator(this); + lineIterator.SetAt(wParam); + return lineIterator.endPos; + } + + case SCI_SETOVERTYPE: + inOverstrike = wParam != 0; + break; + + case SCI_GETOVERTYPE: + return inOverstrike ? 1 : 0; + + case SCI_SETFOCUS: + SetFocusState(wParam != 0); + break; + + case SCI_GETFOCUS: + return hasFocus; + + case SCI_SETSTATUS: + errorStatus = wParam; + break; + + case SCI_GETSTATUS: + return errorStatus; + + case SCI_SETMOUSEDOWNCAPTURES: + mouseDownCaptures = wParam != 0; + break; + + case SCI_GETMOUSEDOWNCAPTURES: + return mouseDownCaptures; + + case SCI_SETCURSOR: + cursorMode = wParam; + DisplayCursor(Window::cursorText); + break; + + case SCI_GETCURSOR: + return cursorMode; + + case SCI_SETCONTROLCHARSYMBOL: + controlCharSymbol = wParam; + break; + + case SCI_GETCONTROLCHARSYMBOL: + return controlCharSymbol; + + case SCI_STARTRECORD: + recordingMacro = true; + return 0; + + case SCI_STOPRECORD: + recordingMacro = false; + return 0; + + case SCI_MOVECARETINSIDEVIEW: + MoveCaretInsideView(); + break; + + case SCI_SETFOLDMARGINCOLOUR: + vs.foldmarginColourSet = wParam != 0; + vs.foldmarginColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETFOLDMARGINHICOLOUR: + vs.foldmarginHighlightColourSet = wParam != 0; + vs.foldmarginHighlightColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETHOTSPOTACTIVEFORE: + vs.hotspotForegroundSet = wParam != 0; + vs.hotspotForeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEFORE: + return vs.hotspotForeground.desired.AsLong(); + + case SCI_SETHOTSPOTACTIVEBACK: + vs.hotspotBackgroundSet = wParam != 0; + vs.hotspotBackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEBACK: + return vs.hotspotBackground.desired.AsLong(); + + case SCI_SETHOTSPOTACTIVEUNDERLINE: + vs.hotspotUnderline = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTACTIVEUNDERLINE: + return vs.hotspotUnderline ? 1 : 0; + + case SCI_SETHOTSPOTSINGLELINE: + vs.hotspotSingleLine = wParam != 0; + InvalidateStyleRedraw(); + break; + + case SCI_GETHOTSPOTSINGLELINE: + return vs.hotspotSingleLine ? 1 : 0; + + case SCI_SETPASTECONVERTENDINGS: + convertPastes = wParam != 0; + break; + + case SCI_GETPASTECONVERTENDINGS: + return convertPastes ? 1 : 0; + + default: + return DefWndProc(iMessage, wParam, lParam); + } + //Platform::DebugPrintf("end wnd proc\n"); + return 0l; +} diff --git a/sdk/wxscintilla/src/scintilla/src/Editor.h b/sdk/wxscintilla/src/scintilla/src/Editor.h new file mode 100644 index 0000000000..bff5a05f5e --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Editor.h @@ -0,0 +1,511 @@ +// Scintilla source code edit control +/** @file Editor.h + ** Defines the main editor class. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EDITOR_H +#define EDITOR_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class Caret { +public: + bool active; + bool on; + int period; + + Caret(); +}; + +/** + */ +class Timer { +public: + bool ticking; + int ticksToWait; + enum {tickSize = 100}; + TickerID tickerID; + + Timer(); +}; + +/** + */ +class Idler { +public: + bool state; + IdlerID idlerID; + + Idler(); +}; + +/** + * Hold a piece of text selected for copying or dragging. + * The text is expected to hold a terminating '\0' and this is counted in len. + */ +class SelectionText { +public: + char *s; + int len; + bool rectangular; + int codePage; + int characterSet; + SelectionText() : s(0), len(0), rectangular(false), codePage(0), characterSet(0) {} + ~SelectionText() { + Free(); + } + void Free() { + Set(0, 0, 0, 0, false); + } + void Set(char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { + delete []s; + s = s_; + if (s) + len = len_; + else + len = 0; + codePage = codePage_; + characterSet = characterSet_; + rectangular = rectangular_; + } + void Copy(const char *s_, int len_, int codePage_, int characterSet_, bool rectangular_) { + delete []s; + s = new char[len_]; + if (s) { + len = len_; + for (int i = 0; i < len_; i++) { + s[i] = s_[i]; + } + } else { + len = 0; + } + codePage = codePage_; + characterSet = characterSet_; + rectangular = rectangular_; + } + void Copy(const SelectionText &other) { + Copy(other.s, other.len, other.codePage, other.characterSet, other.rectangular); + } +}; + +/** + */ +class Editor : public DocWatcher { + // Private so Editor objects can not be copied + Editor(const Editor &) : DocWatcher() {} + Editor &operator=(const Editor &) { return *this; } + +protected: // ScintillaBase subclass needs access to much of Editor + + /** On GTK+, Scintilla is a container widget holding two scroll bars + * whereas on Windows there is just one window with both scroll bars turned on. */ + Window wMain; ///< The Scintilla parent window + + /** Style resources may be expensive to allocate so are cached between uses. + * When a style attribute is changed, this cache is flushed. */ + bool stylesValid; + ViewStyle vs; + Palette palette; + + int printMagnification; + int printColourMode; + int printWrapState; + int cursorMode; + int controlCharSymbol; + + bool hasFocus; + bool hideSelection; + bool inOverstrike; + int errorStatus; + bool mouseDownCaptures; + + /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to + * the screen. This avoids flashing but is about 30% slower. */ + bool bufferedDraw; + /** In twoPhaseDraw mode, drawing is performed in two phases, first the background + * and then the foreground. This avoids chopping off characters that overlap the next run. */ + bool twoPhaseDraw; + + int xOffset; ///< Horizontal scrolled amount in pixels + int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret + bool horizontalScrollBarVisible; + int scrollWidth; + bool verticalScrollBarVisible; + bool endAtLastLine; + bool caretSticky; + + Surface *pixmapLine; + Surface *pixmapSelMargin; + Surface *pixmapSelPattern; + Surface *pixmapIndentGuide; + Surface *pixmapIndentGuideHighlight; + + LineLayoutCache llc; + PositionCache posCache; + + KeyMap kmap; + + Caret caret; + Timer timer; + Timer autoScrollTimer; + enum { autoScrollDelay = 200 }; + + Idler idler; + + Point lastClick; + unsigned int lastClickTime; + int dwellDelay; + int ticksToDwell; + bool dwelling; + enum { selChar, selWord, selLine } selectionType; + Point ptMouseLast; + enum { ddNone, ddInitial, ddDragging } inDragDrop; + bool dropWentOutside; + int posDrag; + int posDrop; + int lastXChosen; + int lineAnchor; + int originalAnchorPos; + int currentPos; + int anchor; + int targetStart; + int targetEnd; + int searchFlags; + int topLine; + int posTopLine; + int lengthForEncode; + + bool needUpdateUI; + Position braces[2]; + int bracesMatchStyle; + int highlightGuideColumn; + + int theEdge; + + enum { notPainting, painting, paintAbandoned } paintState; + PRectangle rcPaint; + bool paintingAllText; + + int modEventMask; + + SelectionText drag; + enum selTypes { noSel, selStream, selRectangle, selLines }; + selTypes selType; + bool moveExtendsSelection; + int xStartSelect; ///< x position of start of rectangular selection + int xEndSelect; ///< x position of end of rectangular selection + bool primarySelection; + + int caretXPolicy; + int caretXSlop; ///< Ensure this many pixels visible on both sides of caret + + int caretYPolicy; + int caretYSlop; ///< Ensure this many lines visible on both sides of caret + + int visiblePolicy; + int visibleSlop; + + int searchAnchor; + + bool recordingMacro; + + int foldFlags; + ContractionState cs; + + // Hotspot support + int hsStart; + int hsEnd; + + // Wrapping support + enum { eWrapNone, eWrapWord, eWrapChar } wrapState; + enum { wrapLineLarge = 0x7ffffff }; + int wrapWidth; + int wrapStart; + int wrapEnd; + int wrapVisualFlags; + int wrapVisualFlagsLocation; + int wrapVisualStartIndent; + int actualWrapVisualStartIndent; + + bool convertPastes; + + Document *pdoc; + + Editor(); + virtual ~Editor(); + virtual void Initialise() = 0; + virtual void Finalise(); + + void InvalidateStyleData(); + void InvalidateStyleRedraw(); + virtual void RefreshColourPalette(Palette &pal, bool want); + void RefreshStyleData(); + void DropGraphics(); + + virtual PRectangle GetClientRectangle(); + PRectangle GetTextRectangle(); + + int LinesOnScreen(); + int LinesToScroll(); + int MaxScrollPos(); + Point LocationFromPosition(int pos); + int XFromPosition(int pos); + int PositionFromLocation(Point pt); + int PositionFromLocationClose(Point pt); + int PositionFromLineX(int line, int x); + int LineFromLocation(Point pt); + void SetTopLine(int topLineNew); + + bool AbandonPaint(); + void RedrawRect(PRectangle rc); + void Redraw(); + void RedrawSelMargin(int line=-1); + PRectangle RectangleFromRange(int start, int end); + void InvalidateRange(int start, int end); + + int CurrentPosition(); + bool SelectionEmpty(); + int SelectionStart(); + int SelectionEnd(); + void SetRectangularRange(); + void InvalidateSelection(int currentPos_, int anchor_); + void SetSelection(int currentPos_, int anchor_); + void SetSelection(int currentPos_); + void SetEmptySelection(int currentPos_); + bool RangeContainsProtected(int start, int end) const; + bool SelectionContainsProtected(); + int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); + int MovePositionTo(int newPos, selTypes sel=noSel, bool ensureVisible=true); + int MovePositionSoVisible(int pos, int moveDir); + void SetLastXChosen(); + + void ScrollTo(int line, bool moveThumb=true); + virtual void ScrollText(int linesToMove); + void HorizontalScrollTo(int xPos); + void MoveCaretInsideView(bool ensureVisible=true); + int DisplayFromPosition(int pos); + void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); + void ShowCaretAtCurrentPosition(); + void DropCaret(); + void InvalidateCaret(); + virtual void UpdateSystemCaret(); + + void NeedWrapping(int docLineStart = 0, int docLineEnd = wrapLineLarge); + bool WrapLines(bool fullWrap, int priorityWrapLineStart); + void LinesJoin(); + void LinesSplit(int pixelWidth); + + int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault); + void PaintSelMargin(Surface *surface, PRectangle &rc); + LineLayout *RetrieveLineLayout(int lineNumber); + void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, + int width=LineLayout::wrapWidthInfinite); + ColourAllocated SelectionBackground(ViewStyle &vsDraw); + ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll); + void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); + void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour); + void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background, + bool drawWrapMark, ColourAllocated wrapColour); + void DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under); + void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, + PRectangle rcLine, LineLayout *ll, int subLine=0); + void DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret); + void RefreshPixMaps(Surface *surfaceWindow); + void Paint(Surface *surfaceWindow, PRectangle rcArea); + long FormatRange(bool draw, RangeToFormat *pfr); + int TextWidth(int style, const char *text); + + virtual void SetVerticalScrollPos() = 0; + virtual void SetHorizontalScrollPos() = 0; + virtual bool ModifyScrollBars(int nMax, int nPage) = 0; + virtual void ReconfigureScrollBars(); + void SetScrollBars(); + void ChangeSize(); + + void AddChar(char ch); + virtual void AddCharUTF(char *s, unsigned int len, bool treatAsDBCS=false); + void ClearSelection(); + void ClearAll(); + void ClearDocumentStyle(); + void Cut(); + void PasteRectangular(int pos, const char *ptr, int len); + virtual void Copy() = 0; + virtual bool CanPaste(); + virtual void Paste() = 0; + void Clear(); + void SelectAll(); + void Undo(); + void Redo(); + void DelChar(); + void DelCharBack(bool allowLineStartDeletion); + virtual void ClaimSelection() = 0; + + virtual void NotifyChange() = 0; + virtual void NotifyFocus(bool focus); + virtual int GetCtrlID() { return ctrlID; } + virtual void NotifyParent(SCNotification scn) = 0; + virtual void NotifyStyleToNeeded(int endStyleNeeded); + void NotifyChar(int ch); + void NotifyMove(int position); + void NotifySavePoint(bool isSavePoint); + void NotifyModifyAttempt(); + virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt); + void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt); + void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); + void NotifyUpdateUI(); + void NotifyPainted(); + void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt); + bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); + void NotifyNeedShown(int pos, int len); + void NotifyDwelling(Point pt, bool state); + void NotifyZoom(); + + void NotifyModifyAttempt(Document *document, void *userData); + void NotifySavePoint(Document *document, void *userData, bool atSavePoint); + void CheckModificationForWrap(DocModification mh); + void NotifyModified(Document *document, DocModification mh, void *userData); + void NotifyDeleted(Document *document, void *userData); + void NotifyStyleNeeded(Document *doc, void *userData, int endPos); + void NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + + void PageMove(int direction, selTypes sel=noSel, bool stuttered = false); + void ChangeCaseOfSelection(bool makeUpperCase); + void LineTranspose(); + void Duplicate(bool forLine); + virtual void CancelModes(); + void NewLine(); + void CursorUpOrDown(int direction, selTypes sel=noSel); + void ParaUpOrDown(int direction, selTypes sel=noSel); + int StartEndDisplayLine(int pos, bool start); + virtual int KeyCommand(unsigned int iMessage); + virtual int KeyDefault(int /* key */, int /*modifiers*/); + int KeyDown(int key, bool shift, bool ctrl, bool alt, bool *consumed=0); + + int GetWhitespaceVisible(); + void SetWhitespaceVisible(int view); + + void Indent(bool forwards); + + long FindText(uptr_t wParam, sptr_t lParam); + void SearchAnchor(); + long SearchText(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + long SearchInTarget(const char *text, int length); + void GoToLine(int lineNo); + + virtual void CopyToClipboard(const SelectionText &selectedText) = 0; + char *CopyRange(int start, int end); + void CopySelectionFromRange(SelectionText *ss, int start, int end); + void CopySelectionRange(SelectionText *ss); + void CopyRangeToClipboard(int start, int end); + void CopyText(int length, const char *text); + void SetDragPosition(int newPos); + virtual void DisplayCursor(Window::Cursor c); + virtual bool DragThreshold(Point ptStart, Point ptNow); + virtual void StartDrag(); + void DropAt(int position, const char *value, bool moving, bool rectangular); + /** PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after. + * Before means either before any line of selection or before selection on its line, with a similar meaning to after. */ + int PositionInSelection(int pos); + bool PointInSelection(Point pt); + bool PointInSelMargin(Point pt); + void LineSelection(int lineCurrent_, int lineAnchor_); + void DwellEnd(bool mouseMoved); + virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); + void ButtonMove(Point pt); + void ButtonUp(Point pt, unsigned int curTime, bool ctrl); + + void Tick(); + bool Idle(); + virtual void SetTicking(bool on) = 0; + virtual bool SetIdle(bool) { return false; } + virtual void SetMouseCapture(bool on) = 0; + virtual bool HaveMouseCapture() = 0; + void SetFocusState(bool focusState); + + virtual bool PaintContains(PRectangle rc); + bool PaintContainsMargin(); + void CheckForChangeOutsidePaint(Range r); + void SetBraceHighlight(Position pos0, Position pos1, int matchStyle); + + void SetDocPointer(Document *document); + + void Expand(int &line, bool doExpand); + void ToggleContraction(int line); + void EnsureLineVisible(int lineDoc, bool enforcePolicy); + int ReplaceTarget(bool replacePatterns, const char *text, int length=-1); + + bool PositionIsHotspot(int position); + bool PointIsHotspot(Point pt); + void SetHotSpotRange(Point *pt); + void GetHotSpotRange(int& hsStart, int& hsEnd); + + int CodePage() const; + virtual bool ValidCodePage(int /* codePage */) const { return true; } + int WrapCount(int line); + void AddStyledText(char *buffer, int appendLength); + + virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; + +public: + // Public so the COM thunks can access it. + bool IsUnicodeMode() const; + // Public so scintilla_send_message can use it. + virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); + // Public so scintilla_set_id can use it. + int ctrlID; + friend class AutoSurface; + friend class SelectionLineIterator; +}; + +/** + * A smart pointer class to ensure Surfaces are set up and deleted correctly. + */ +class AutoSurface { +private: + Surface *surf; +public: + AutoSurface(Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + AutoSurface(SurfaceID sid, Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(sid, ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + ~AutoSurface() { + delete surf; + } + Surface *operator->() const { + return surf; + } + operator Surface *() const { + return surf; + } +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/ExternalLexer.cxx b/sdk/wxscintilla/src/scintilla/src/ExternalLexer.cxx new file mode 100644 index 0000000000..c0fad149c3 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/ExternalLexer.cxx @@ -0,0 +1,263 @@ +// Scintilla source code edit control +/** @file ExternalLexer.cxx + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" + +#include "SciLexer.h" +#include "PropSet.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "KeyWords.h" +#include "ExternalLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +LexerManager *LexerManager::theInstance = NULL; + +//------------------------------------------ +// +// ExternalLexerModule +// +//------------------------------------------ + +char **WordListsToStrings(WordList *val[]) { + int dim = 0; + while (val[dim]) + dim++; + char **wls = new char * [dim + 1]; + for (int i = 0;i < dim;i++) { + SString words; + words = ""; + for (int n = 0; n < val[i]->len; n++) { + words += val[i]->words[n]; + if (n != val[i]->len - 1) + words += " "; + } + wls[i] = new char[words.length() + 1]; + strcpy(wls[i], words.c_str()); + } + wls[dim] = 0; + return wls; +} + +void DeleteWLStrings(char *strs[]) { + int dim = 0; + while (strs[dim]) { + delete strs[dim]; + dim++; + } + delete [] strs; +} + +void ExternalLexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneLexer) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneLexer(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneFolder) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneFolder(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index) { + fneLexer = fLexer; + fneFolder = fFolder; + externalLanguage = index; +} + +//------------------------------------------ +// +// LexerLibrary +// +//------------------------------------------ + +LexerLibrary::LexerLibrary(const char* ModuleName) { + // Initialise some members... + first = NULL; + last = NULL; + + // Load the DLL + lib = DynamicLibrary::Load(ModuleName); + if (lib->IsValid()) { + m_sModuleName = ModuleName; + //Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects + GetLexerCountFn GetLexerCount = (GetLexerCountFn)(sptr_t)lib->FindFunction("GetLexerCount"); + + if (GetLexerCount) { + ExternalLexerModule *lex; + LexerMinder *lm; + + // Find functions in the DLL + GetLexerNameFn GetLexerName = (GetLexerNameFn)(sptr_t)lib->FindFunction("GetLexerName"); + ExtLexerFunction Lexer = (ExtLexerFunction)(sptr_t)lib->FindFunction("Lex"); + ExtFoldFunction Folder = (ExtFoldFunction)(sptr_t)lib->FindFunction("Fold"); + + // Assign a buffer for the lexer name. + char lexname[100]; + strcpy(lexname, ""); + + int nl = GetLexerCount(); + + for (int i = 0; i < nl; i++) { + GetLexerName(i, lexname, 100); + lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); + + // Create a LexerMinder so we don't leak the ExternalLexerModule... + lm = new LexerMinder; + lm->self = lex; + lm->next = NULL; + if (first != NULL) { + last->next = lm; + last = lm; + } else { + first = lm; + last = lm; + } + + // The external lexer needs to know how to call into its DLL to + // do its lexing and folding, we tell it here. Folder may be null. + lex->SetExternal(Lexer, Folder, i); + } + } + } + next = NULL; +} + +LexerLibrary::~LexerLibrary() { + Release(); + delete lib; +} + +void LexerLibrary::Release() { + //TODO maintain a list of lexers created, and delete them! + LexerMinder *lm; + LexerMinder *next; + lm = first; + while (NULL != lm) { + next = lm->next; + delete lm->self; + delete lm; + lm = next; + } + + first = NULL; + last = NULL; +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +/// Return the single LexerManager instance... +LexerManager *LexerManager::GetInstance() { + if(!theInstance) + theInstance = new LexerManager; + return theInstance; +} + +/// Delete any LexerManager instance... +void LexerManager::DeleteInstance() +{ + if(theInstance) { + delete theInstance; + theInstance = NULL; + } +} + +/// protected constructor - this is a singleton... +LexerManager::LexerManager() { + first = NULL; + last = NULL; +} + +LexerManager::~LexerManager() { + Clear(); +} + +void LexerManager::Load(const char* path) +{ + LoadLexerLibrary(path); +} + +void LexerManager::LoadLexerLibrary(const char* module) +{ + LexerLibrary *lib = new LexerLibrary(module); + if (NULL != first) { + last->next = lib; + last = lib; + } else { + first = lib; + last = lib; + } +} + +void LexerManager::Clear() +{ + if (NULL != first) { + LexerLibrary *cur = first; + LexerLibrary *next; + while (cur) { + next = cur->next; + delete cur; + cur = next; + } + first = NULL; + last = NULL; + } +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +LMMinder::~LMMinder() +{ + LexerManager::DeleteInstance(); +} + +LMMinder minder; diff --git a/sdk/wxscintilla/src/scintilla/src/ExternalLexer.h b/sdk/wxscintilla/src/scintilla/src/ExternalLexer.h new file mode 100644 index 0000000000..b72f7a20c1 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/ExternalLexer.h @@ -0,0 +1,103 @@ +// Scintilla source code edit control +/** @file ExternalLexer.h + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EXTERNALLEXER_H +#define EXTERNALLEXER_H + +#if PLAT_WIN +#define EXT_LEXER_DECL __stdcall +#else +#define EXT_LEXER_DECL +#endif + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +// External Lexer function definitions... +typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); +typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); +typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); + +//class DynamicLibrary; + +/// Sub-class of LexerModule to use an external lexer. +class ExternalLexerModule : protected LexerModule { +protected: + ExtLexerFunction fneLexer; + ExtFoldFunction fneFolder; + int externalLanguage; + char name[100]; +public: + ExternalLexerModule(int language_, LexerFunction fnLexer_, + const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){ + strncpy(name, languageName_, sizeof(name)); + languageName = name; + }; + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); +}; + +/// LexerMinder points to an ExternalLexerModule - so we don't leak them. +class LexerMinder { +public: + ExternalLexerModule *self; + LexerMinder *next; +}; + +/// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. +class LexerLibrary { + DynamicLibrary *lib; + LexerMinder *first; + LexerMinder *last; + +public: + LexerLibrary(const char* ModuleName); + ~LexerLibrary(); + void Release(); + + LexerLibrary *next; + SString m_sModuleName; +}; + +/// LexerManager manages external lexers, contains LexerLibrarys. +class LexerManager { +public: + ~LexerManager(); + + static LexerManager *GetInstance(); + static void DeleteInstance(); + + void Load(const char* path); + void Clear(); + +private: + LexerManager(); + static LexerManager *theInstance; + + void LoadLexerLibrary(const char* module); + LexerLibrary *first; + LexerLibrary *last; +}; + +class LMMinder { +public: + ~LMMinder(); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/Indicator.cxx b/sdk/wxscintilla/src/scintilla/src/Indicator.cxx new file mode 100644 index 0000000000..653dc40c2b --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Indicator.cxx @@ -0,0 +1,81 @@ +// Scintilla source code edit control +/** @file Indicator.cxx + ** Defines the style of indicators which are text decorations such as underlining. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "Scintilla.h" +#include "Indicator.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) { + surface->PenColour(fore.allocated); + int ymid = (rc.bottom + rc.top) / 2; + if (style == INDIC_SQUIGGLE) { + surface->MoveTo(rc.left, rc.top); + int x = rc.left + 2; + int y = 2; + while (x < rc.right) { + surface->LineTo(x, rc.top + y); + x += 2; + y = 2 - y; + } + surface->LineTo(rc.right, rc.top + y); // Finish the line + } else if (style == INDIC_TT) { + surface->MoveTo(rc.left, ymid); + int x = rc.left + 5; + while (x < rc.right) { + surface->LineTo(x, ymid); + surface->MoveTo(x-3, ymid); + surface->LineTo(x-3, ymid+2); + x++; + surface->MoveTo(x, ymid); + x += 5; + } + surface->LineTo(rc.right, ymid); // Finish the line + if (x - 3 <= rc.right) { + surface->MoveTo(x-3, ymid); + surface->LineTo(x-3, ymid+2); + } + } else if (style == INDIC_DIAGONAL) { + int x = rc.left; + while (x < rc.right) { + surface->MoveTo(x, rc.top+2); + int endX = x+3; + int endY = rc.top - 1; + if (endX > rc.right) { + endY += endX - rc.right; + endX = rc.right; + } + surface->LineTo(endX, endY); + x += 4; + } + } else if (style == INDIC_STRIKE) { + surface->MoveTo(rc.left, rc.top - 4); + surface->LineTo(rc.right, rc.top - 4); + } else if (style == INDIC_HIDDEN) { + // Draw nothing + } else if (style == INDIC_BOX) { + surface->MoveTo(rc.left, ymid+1); + surface->LineTo(rc.right, ymid+1); + surface->LineTo(rc.right, rcLine.top+1); + surface->LineTo(rc.left, rcLine.top+1); + surface->LineTo(rc.left, ymid+1); + } else if (style == INDIC_ROUNDBOX) { + PRectangle rcBox = rcLine; + rcBox.top = rcLine.top + 1; + rcBox.left = rc.left; + rcBox.right = rc.right; + surface->AlphaRectangle(rcBox, 1, fore.allocated, 30, fore.allocated, 50, 0); + } else { // Either INDIC_PLAIN or unknown + surface->MoveTo(rc.left, ymid); + surface->LineTo(rc.right, ymid); + } +} + diff --git a/sdk/wxscintilla/src/scintilla/src/Indicator.h b/sdk/wxscintilla/src/scintilla/src/Indicator.h new file mode 100644 index 0000000000..015a1a23dc --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/Indicator.h @@ -0,0 +1,31 @@ +// Scintilla source code edit control +/** @file Indicator.h + ** Defines the style of indicators which are text decorations such as underlining. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef INDICATOR_H +#define INDICATOR_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** + */ +class Indicator { +public: + int style; + bool under; + ColourPair fore; + Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)) { + } + void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine); +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/KeyMap.cxx b/sdk/wxscintilla/src/scintilla/src/KeyMap.cxx new file mode 100644 index 0000000000..c82a18ea79 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/KeyMap.cxx @@ -0,0 +1,152 @@ +// Scintilla source code edit control +/** @file KeyMap.cxx + ** Defines a mapping between keystrokes and commands. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include "Platform.h" + +#include "Scintilla.h" + +#include "KeyMap.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +KeyMap::KeyMap() : kmap(0), len(0), alloc(0) { // [CHANGED] + for (int i = 0; MapDefault[i].key; i++) { + AssignCmdKey(MapDefault[i].key, + MapDefault[i].modifiers, + MapDefault[i].msg); + } +} + +KeyMap::~KeyMap() { // [CHANGED] + Clear(); +} + +void KeyMap::Clear() { // [CHANGED] + delete []kmap; + kmap = 0; + len = 0; + alloc = 0; +} + +void KeyMap::AssignCmdKey(int key, int modifiers, unsigned int msg) { // [CHANGED] + if ((len+1) >= alloc) { + KeyToCommand *ktcNew = new KeyToCommand[alloc + 5]; + if (!ktcNew) + return; + for (int k = 0; k < len; k++) + ktcNew[k] = kmap[k]; + alloc += 5; + delete []kmap; + kmap = ktcNew; + } + for (int keyIndex = 0; keyIndex < len; keyIndex++) { + if ((key == kmap[keyIndex].key) && (modifiers == kmap[keyIndex].modifiers)) { + kmap[keyIndex].msg = msg; + return; + } + } + kmap[len].key = key; + kmap[len].modifiers = modifiers; + kmap[len].msg = msg; + len++; +} + +unsigned int KeyMap::Find(int key, int modifiers) { // [CHANGED] + for (int i = 0; i < len; i++) { + if ((key == kmap[i].key) && (modifiers == kmap[i].modifiers)) { + return kmap[i].msg; + } + } + return 0; +} + +const KeyToCommand KeyMap::MapDefault[] = { // [CHANGED] + {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, + {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, + {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, + {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND}, + {SCK_UP, SCI_NORM, SCI_LINEUP}, + {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, + {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, + {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND}, + {'[', SCI_CTRL, SCI_PARAUP}, + {'[', SCI_CSHIFT, SCI_PARAUPEXTEND}, + {']', SCI_CTRL, SCI_PARADOWN}, + {']', SCI_CSHIFT, SCI_PARADOWNEXTEND}, + {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, + {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, + {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, + {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND}, + {SCK_LEFT, SCI_ASHIFT, SCI_CHARLEFTRECTEXTEND}, + {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT}, + {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND}, + {SCK_RIGHT, SCI_CTRL, SCI_WORDRIGHT}, + {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND}, + {SCK_RIGHT, SCI_ASHIFT, SCI_CHARRIGHTRECTEXTEND}, + {'/', SCI_CTRL, SCI_WORDPARTLEFT}, + {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND}, + {'\\', SCI_CTRL, SCI_WORDPARTRIGHT}, + {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND}, + {SCK_HOME, SCI_NORM, SCI_VCHOME}, + {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND}, + {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART}, + {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND}, + {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY}, +// {SCK_HOME, SCI_ASHIFT, SCI_HOMEDISPLAYEXTEND}, + {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND}, + {SCK_END, SCI_NORM, SCI_LINEEND}, + {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND}, + {SCK_END, SCI_CTRL, SCI_DOCUMENTEND}, + {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND}, + {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY}, +// {SCK_END, SCI_ASHIFT, SCI_LINEENDDISPLAYEXTEND}, + {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND}, + {SCK_PRIOR, SCI_NORM, SCI_PAGEUP}, + {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND}, + {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND}, + {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN}, + {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND}, + {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND}, + {SCK_DELETE, SCI_NORM, SCI_CLEAR}, + {SCK_DELETE, SCI_SHIFT, SCI_CUT}, + {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT}, + {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT}, + {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE}, + {SCK_INSERT, SCI_SHIFT, SCI_PASTE}, + {SCK_INSERT, SCI_CTRL, SCI_COPY}, + {SCK_ESCAPE, SCI_NORM, SCI_CANCEL}, + {SCK_BACK, SCI_NORM, SCI_DELETEBACK}, + {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, + {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, + {SCK_BACK, SCI_ALT, SCI_UNDO}, + {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, + {'Z', SCI_CTRL, SCI_UNDO}, + {'Y', SCI_CTRL, SCI_REDO}, + {'X', SCI_CTRL, SCI_CUT}, + {'C', SCI_CTRL, SCI_COPY}, + {'V', SCI_CTRL, SCI_PASTE}, + {'A', SCI_CTRL, SCI_SELECTALL}, + {SCK_TAB, SCI_NORM, SCI_TAB}, + {SCK_TAB, SCI_SHIFT, SCI_BACKTAB}, + {SCK_RETURN, SCI_NORM, SCI_NEWLINE}, + {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE}, + {SCK_ADD, SCI_CTRL, SCI_ZOOMIN}, + {SCK_SUBTRACT, SCI_CTRL, SCI_ZOOMOUT}, + {SCK_DIVIDE, SCI_CTRL, SCI_SETZOOM}, + //'L', SCI_CTRL, SCI_FORMFEED, + {'L', SCI_CTRL, SCI_LINECUT}, + {'L', SCI_CSHIFT, SCI_LINEDELETE}, + {'T', SCI_CSHIFT, SCI_LINECOPY}, + {'T', SCI_CTRL, SCI_LINETRANSPOSE}, + {'D', SCI_CTRL, SCI_SELECTIONDUPLICATE}, + {'U', SCI_CTRL, SCI_LOWERCASE}, + {'U', SCI_CSHIFT, SCI_UPPERCASE}, + {0,0,0}, +}; + diff --git a/sdk/wxscintilla/src/scintilla/src/KeyMap.h b/sdk/wxscintilla/src/scintilla/src/KeyMap.h new file mode 100644 index 0000000000..c1b1a10eae --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/KeyMap.h @@ -0,0 +1,51 @@ +// Scintilla source code edit control +/** @file KeyMap.h + ** Defines a mapping between keystrokes and commands. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef KEYTOCOMMAND_H +#define KEYTOCOMMAND_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +#define SCI_NORM 0 +#define SCI_SHIFT SCMOD_SHIFT +#define SCI_CTRL SCMOD_CTRL +#define SCI_ALT SCMOD_ALT +#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT) +#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT) + +/** + */ +class KeyToCommand { +public: + int key; + int modifiers; + unsigned int msg; +}; + +/** + */ +class KeyMap { + KeyToCommand *kmap; + int len; + int alloc; + static const KeyToCommand MapDefault[]; + +public: + KeyMap(); + ~KeyMap(); + void Clear(); + void AssignCmdKey(int key, int modifiers, unsigned int msg); + unsigned int Find(int key, int modifiers); // 0 returned on failure +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif diff --git a/sdk/wxscintilla/src/scintilla/src/KeyWords.cxx b/sdk/wxscintilla/src/scintilla/src/KeyWords.cxx new file mode 100644 index 0000000000..d303a53156 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/KeyWords.cxx @@ -0,0 +1,230 @@ +// Scintilla source code edit control +/** @file KeyWords.cxx + ** Colourise for particular languages. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +const LexerModule *LexerModule::base = 0; +int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; + +LexerModule::LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_, + LexerFunction fnFolder_, + const char * const wordListDescriptions_[], + int styleBits_) : + language(language_), + fnLexer(fnLexer_), + fnFolder(fnFolder_), + wordListDescriptions(wordListDescriptions_), + styleBits(styleBits_), + languageName(languageName_) { + next = base; + base = this; + if (language == SCLEX_AUTOMATIC) { + language = nextLanguage; + nextLanguage++; + } +} + +int LexerModule::GetNumWordLists() const { + if (wordListDescriptions == NULL) { + return -1; + } else { + int numWordLists = 0; + + while (wordListDescriptions[numWordLists]) { + ++numWordLists; + } + + return numWordLists; + } +} + +const char *LexerModule::GetWordListDescription(int index) const { + static const char *emptyStr = ""; + + PLATFORM_ASSERT(index < GetNumWordLists()); + if (index >= GetNumWordLists()) { + return emptyStr; + } else { + return wordListDescriptions[index]; + } +} + +int LexerModule::GetStyleBitsNeeded() const { + return styleBits; +} + +const LexerModule *LexerModule::Find(int language) { + const LexerModule *lm = base; + while (lm) { + if (lm->language == language) { + return lm; + } + lm = lm->next; + } + return 0; +} + +const LexerModule *LexerModule::Find(const char *languageName) { + if (languageName) { + const LexerModule *lm = base; + while (lm) { + if (lm->languageName && 0 == strcmp(lm->languageName, languageName)) { + return lm; + } + lm = lm->next; + } + } + return 0; +} + +void LexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (fnLexer) + fnLexer(startPos, lengthDoc, initStyle, keywordlists, styler); +} + +void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (fnFolder) { + int lineCurrent = styler.GetLine(startPos); + // Move back one line in case deletion wrecked current line fold state + if (lineCurrent > 0) { + lineCurrent--; + int newStartPos = styler.LineStart(lineCurrent); + lengthDoc += startPos - newStartPos; + startPos = newStartPos; + initStyle = 0; + if (startPos > 0) { + initStyle = styler.StyleAt(startPos - 1); + } + } + fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); + } +} + +// Alternative historical name for Scintilla_LinkLexers +int wxForceScintillaLexers(void) { + return Scintilla_LinkLexers(); +} + +// To add or remove a lexer, add or remove its file and run LexGen.py. + +// Force a reference to all of the Scintilla lexers so that the linker will +// not remove the code of the lexers. +int Scintilla_LinkLexers() { + static int forcer = 0; + +// Shorten the code that declares a lexer and ensures it is linked in by calling a method. +#define LINK_LEXER(lexer) extern LexerModule lexer; forcer += lexer.GetLanguage(); + +//++Autogenerated -- run src/LexGen.py to regenerate +//**\(\tLINK_LEXER(\*);\n\) + LINK_LEXER(lmAda); + LINK_LEXER(lmAns1); + LINK_LEXER(lmAPDL); + LINK_LEXER(lmAsm); + LINK_LEXER(lmASP); + LINK_LEXER(lmAU3); + LINK_LEXER(lmAVE); + LINK_LEXER(lmBaan); + LINK_LEXER(lmBash); + LINK_LEXER(lmBatch); + LINK_LEXER(lmBlitzBasic); + LINK_LEXER(lmBullant); + LINK_LEXER(lmCaml); + LINK_LEXER(lmClw); + LINK_LEXER(lmClwNoCase); + LINK_LEXER(lmCmake); + LINK_LEXER(lmConf); + LINK_LEXER(lmCPP); + LINK_LEXER(lmCPPNoCase); + LINK_LEXER(lmCsound); + LINK_LEXER(lmCss); + LINK_LEXER(lmD); + LINK_LEXER(lmDiff); + LINK_LEXER(lmEiffel); + LINK_LEXER(lmEiffelkw); + LINK_LEXER(lmErlang); + LINK_LEXER(lmErrorList); + LINK_LEXER(lmESCRIPT); + LINK_LEXER(lmF77); + LINK_LEXER(lmFlagShip); + LINK_LEXER(lmForth); + LINK_LEXER(lmFortran); + LINK_LEXER(lmFreeBasic); + LINK_LEXER(lmGAP); + LINK_LEXER(lmGui4Cli); + LINK_LEXER(lmHaskell); + LINK_LEXER(lmHTML); + LINK_LEXER(lmInno); + LINK_LEXER(lmKix); + LINK_LEXER(lmLatex); + LINK_LEXER(lmLISP); + LINK_LEXER(lmLot); + LINK_LEXER(lmLout); + LINK_LEXER(lmLua); + LINK_LEXER(lmMake); + LINK_LEXER(lmMatlab); + LINK_LEXER(lmMETAPOST); + LINK_LEXER(lmMMIXAL); + LINK_LEXER(lmMSSQL); + LINK_LEXER(lmNncrontab); + LINK_LEXER(lmNsis); + LINK_LEXER(lmNull); + LINK_LEXER(lmOctave); + LINK_LEXER(lmOpal); + LINK_LEXER(lmPascal); + LINK_LEXER(lmPB); + LINK_LEXER(lmPerl); + LINK_LEXER(lmPHP); + LINK_LEXER(lmPHPSCRIPT); + LINK_LEXER(lmPLM); + LINK_LEXER(lmPOV); + LINK_LEXER(lmProgress); + LINK_LEXER(lmProps); + LINK_LEXER(lmPS); + LINK_LEXER(lmPureBasic); + LINK_LEXER(lmPython); + LINK_LEXER(lmREBOL); + LINK_LEXER(lmRuby); + LINK_LEXER(lmScriptol); + LINK_LEXER(lmSmalltalk); + LINK_LEXER(lmSpecman); + LINK_LEXER(lmSpice); + LINK_LEXER(lmSQL); + LINK_LEXER(lmTADS3); + LINK_LEXER(lmTCL); + LINK_LEXER(lmTeX); + LINK_LEXER(lmVB); + LINK_LEXER(lmVBScript); + LINK_LEXER(lmVerilog); + LINK_LEXER(lmVHDL); + LINK_LEXER(lmXML); + LINK_LEXER(lmYAML); + +//--Autogenerated -- end of automatically generated section + + return 1; +} diff --git a/sdk/wxscintilla/src/scintilla/src/LexAPDL.cxx b/sdk/wxscintilla/src/scintilla/src/LexAPDL.cxx new file mode 100644 index 0000000000..7961434436 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAPDL.cxx @@ -0,0 +1,139 @@ +// Scintilla source code edit control +/** @file LexAPDL.cxx + ** Lexer for APDL. Based on the lexer for Assembler by The Black Horus. + ** By Hadar Raz. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80 && (isalnum(ch) || ch == '_')); +} + +static inline bool IsAnOperator(char ch) { + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '$' || ch == ':' || ch == '%') + return true; + return false; +} + +static void ColouriseAPDLDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + int stringStart = ' '; + + WordList &processors = *keywordlists[0]; + WordList &commands = *keywordlists[1]; + WordList &slashcommands = *keywordlists[2]; + WordList &starcommands = *keywordlists[3]; + WordList &arguments = *keywordlists[4]; + WordList &functions = *keywordlists[5]; + + // Do not leak onto next line + initStyle = SCE_APDL_DEFAULT; + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + // Determine if the current state should terminate. + if (sc.state == SCE_APDL_NUMBER) { + if (!(IsADigit(sc.ch) || sc.ch == '.' || (sc.ch == 'e' || sc.ch == 'E') || + ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_COMMENTBLOCK) { + if (sc.atLineEnd) { + if (sc.ch == '\r') { + sc.Forward(); + } + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_STRING) { + if (sc.atLineEnd) { + sc.SetState(SCE_APDL_DEFAULT); + } else if ((sc.ch == '\'' && stringStart == '\'') || (sc.ch == '\"' && stringStart == '\"')) { + sc.ForwardSetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (processors.InList(s)) { + sc.ChangeState(SCE_APDL_PROCESSOR); + } else if (slashcommands.InList(s)) { + sc.ChangeState(SCE_APDL_SLASHCOMMAND); + } else if (starcommands.InList(s)) { + sc.ChangeState(SCE_APDL_STARCOMMAND); + } else if (commands.InList(s)) { + sc.ChangeState(SCE_APDL_COMMAND); + } else if (arguments.InList(s)) { + sc.ChangeState(SCE_APDL_ARGUMENT); + } else if (functions.InList(s)) { + sc.ChangeState(SCE_APDL_FUNCTION); + } + sc.SetState(SCE_APDL_DEFAULT); + } + } else if (sc.state == SCE_APDL_OPERATOR) { + if (!IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_APDL_DEFAULT) { + if (sc.ch == '!' && sc.chNext == '!') { + sc.SetState(SCE_APDL_COMMENTBLOCK); + } else if (sc.ch == '!') { + sc.SetState(SCE_APDL_COMMENT); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_APDL_NUMBER); + } else if (sc.ch == '\'' || sc.ch == '\"') { + sc.SetState(SCE_APDL_STRING); + stringStart = sc.ch; + } else if (IsAWordChar(sc.ch) || ((sc.ch == '*' || sc.ch == '/') && !isgraph(sc.chPrev))) { + sc.SetState(SCE_APDL_WORD); + } else if (IsAnOperator(static_cast(sc.ch))) { + sc.SetState(SCE_APDL_OPERATOR); + } + } + } + sc.Complete(); +} + +static const char * const apdlWordListDesc[] = { + "processors", + "commands", + "slashommands", + "starcommands", + "arguments", + "functions", + 0 +}; + +LexerModule lmAPDL(SCLEX_APDL, ColouriseAPDLDoc, "apdl", 0, apdlWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexAU3.cxx b/sdk/wxscintilla/src/scintilla/src/LexAU3.cxx new file mode 100644 index 0000000000..6c82cfb111 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAU3.cxx @@ -0,0 +1,898 @@ +// Scintilla source code edit control +// @file LexAU3.cxx +// Lexer for AutoIt3 http://www.hiddensoft.com/autoit3 +// by Jos van der Zande, jvdzande@yahoo.com +// +// Changes: +// March 28, 2004 - Added the standard Folding code +// April 21, 2004 - Added Preprosessor Table + Syntax Highlighting +// Fixed Number highlighting +// Changed default isoperator to IsAOperator to have a better match to AutoIt3 +// Fixed "#comments_start" -> "#comments-start" +// Fixed "#comments_end" -> "#comments-end" +// Fixed Sendkeys in Strings when not terminated with } +// Added support for Sendkey strings that have second parameter e.g. {UP 5} or {a down} +// April 26, 2004 - Fixed # pre-processor statement inside of comment block would invalidly change the color. +// Added logic for #include to treat the <> as string +// Added underscore to IsAOperator. +// May 17, 2004 - Changed the folding logic from indent to keyword folding. +// Added Folding logic for blocks of single-commentlines or commentblock. +// triggered by: fold.comment=1 +// Added Folding logic for preprocessor blocks triggered by fold.preprocessor=1 +// Added Special for #region - #endregion syntax highlight and folding. +// May 30, 2004 - Fixed issue with continuation lines on If statements. +// June 5, 2004 - Added comma to Operators for better readability. +// Added fold.compact support set with fold.compact=1 +// Changed folding inside of #cs-#ce. Default is no keyword folding inside comment blocks when fold.comment=1 +// it will now only happen when fold.comment=2. +// Sep 5, 2004 - Added logic to handle colourizing words on the last line. +// Typed Characters now show as "default" till they match any table. +// Oct 10, 2004 - Added logic to show Comments in "Special" directives. +// Nov 1, 2004 - Added better testing for Numbers supporting x and e notation. +// Nov 28, 2004 - Added logic to handle continuation lines for syntax highlighting. +// Jan 10, 2005 - Added Abbreviations Keyword used for expansion +// Mar 24, 2005 - Updated Abbreviations Keywords to fix when followed by Operator. +// Apr 18, 2005 - Updated #CE/#Comment-End logic to take a linecomment ";" into account +// - Added folding support for With...EndWith +// - Added support for a DOT in variable names +// - Fixed Underscore in CommentBlock +// May 23, 2005 - Fixed the SentKey lexing in case of a missing } +// Aug 11, 2005 - Fixed possible bug with s_save length > 100. +// Aug 23, 2005 - Added Switch/endswitch support to the folding logic. +// Sep 27, 2005 - Fixed the SentKey lexing logic in case of multiple sentkeys. +// Mar 12, 2006 - Fixed issue with <> coloring as String in stead of Operator in rare occasions. +// Apr 8, 2006 - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF) +// Mar 9, 2007 - Fixed bug with + following a String getting the wrong Color. +// +// Copyright for Scintilla: 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. +// Scintilla source code edit control + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsTypeCharacter(const int ch) +{ + return ch == '$'; +} +static inline bool IsAWordChar(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) +{ + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '@' || ch == '#' || ch == '$' || ch == '.'); +} + +static inline bool IsAOperator(char ch) { + if (isascii(ch) && isalnum(ch)) + return false; + if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || + ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' || + ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == ',' ) + return true; + return false; +} + +/////////////////////////////////////////////////////////////////////////////// +// GetSendKey() filters the portion before and after a/multiple space(s) +// and return the first portion to be looked-up in the table +// also check if the second portion is valid... (up,down.on.off,toggle or a number) +/////////////////////////////////////////////////////////////////////////////// + +static int GetSendKey(const char *szLine, char *szKey) +{ + int nFlag = 0; + int nStartFound = 0; + int nKeyPos = 0; + int nSpecPos= 0; + int nSpecNum= 1; + int nPos = 0; + char cTemp; + char szSpecial[100]; + + // split the portion of the sendkey in the part before and after the spaces + while ( ( (cTemp = szLine[nPos]) != '\0')) + { + // skip leading Ctrl/Shift/Alt state + if (cTemp == '{') { + nStartFound = 1; + } + // + if (nStartFound == 1) { + if ((cTemp == ' ') && (nFlag == 0) ) // get the stuff till first space + { + nFlag = 1; + // Add } to the end of the first bit for table lookup later. + szKey[nKeyPos++] = '}'; + } + else if (cTemp == ' ') + { + // skip other spaces + } + else if (nFlag == 0) + { + // save first portion into var till space or } is hit + szKey[nKeyPos++] = cTemp; + } + else if ((nFlag == 1) && (cTemp != '}')) + { + // Save second portion into var... + szSpecial[nSpecPos++] = cTemp; + // check if Second portion is all numbers for repeat fuction + if (isdigit(cTemp) == false) {nSpecNum = 0;} + } + } + nPos++; // skip to next char + + } // End While + + + // Check if the second portion is either a number or one of these keywords + szKey[nKeyPos] = '\0'; + szSpecial[nSpecPos] = '\0'; + if (strcmp(szSpecial,"down")== 0 || strcmp(szSpecial,"up")== 0 || + strcmp(szSpecial,"on")== 0 || strcmp(szSpecial,"off")== 0 || + strcmp(szSpecial,"toggle")== 0 || nSpecNum == 1 ) + { + nFlag = 0; + } + else + { + nFlag = 1; + } + return nFlag; // 1 is bad, 0 is good + +} // GetSendKey() + +// +// Routine to check the last "none comment" character on a line to see if its a continuation +// +static bool IsContinuationLine(unsigned int szLine, Accessor &styler) +{ + int nsPos = styler.LineStart(szLine); + int nePos = styler.LineStart(szLine+1) - 2; + //int stylech = styler.StyleAt(nsPos); + while (nsPos < nePos) + { + //stylech = styler.StyleAt(nePos); + int stylech = styler.StyleAt(nsPos); + if (!(stylech == SCE_AU3_COMMENT)) { + char ch = styler.SafeGetCharAt(nePos); + if (!isspacechar(ch)) { + if (ch == '_') + return true; + else + return false; + } + } + nePos--; // skip to next char + } // End While + return false; +} // IsContinuationLine() + +// +// syntax highlighting logic +static void ColouriseAU3Doc(unsigned int startPos, + int length, int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + WordList &keywords7 = *keywordlists[6]; + WordList &keywords8 = *keywordlists[7]; + // find the first previous line without continuation character at the end + int lineCurrent = styler.GetLine(startPos); + int s_startPos = startPos; + // When not inside a Block comment: find First line without _ + if (!(initStyle==SCE_AU3_COMMENTBLOCK)) { + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); // get start position + initStyle = 0; // reset the start style to 0 + } + } + // Set the new length to include it from the start and set the start position + length = length + s_startPos - startPos; // correct the total length to process + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + char si; // string indicator "=1 '=2 + char ni; // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 Enot=3 + char ci; // comment indicator 0=not linecomment(;) + char s_save[100]; + si=0; + ni=0; + ci=0; + //$$$ + for (; sc.More(); sc.Forward()) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + // ********************************************** + // save the total current word for eof processing + if (IsAWordChar(sc.ch) || sc.ch == '}') + { + strcpy(s_save,s); + int tp = strlen(s_save); + if (tp < 99) { + s_save[tp] = static_cast(tolower(sc.ch)); + s_save[tp+1] = '\0'; + } + } + // ********************************************** + // + switch (sc.state) + { + case SCE_AU3_COMMENTBLOCK: + { + //Reset at line end + if (sc.atLineEnd) { + ci=0; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + //skip rest of line when a ; is encountered + if (sc.chPrev == ';') { + ci=2; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + // skip rest of the line + if (ci==2) + break; + // check when first character is detected on the line + if (ci==0) { + if (IsAWordStart(static_cast(sc.ch)) || IsAOperator(static_cast(sc.ch))) { + ci=1; + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + break; + } + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && strcmp(s, "#comments") == 0))) { + if ((strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0)) + sc.SetState(SCE_AU3_COMMENT); // set to comment line for the rest of the line + else + ci=2; // line doesn't begin with #CE so skip the rest of the line + } + break; + } + case SCE_AU3_COMMENT: + { + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_OPERATOR: + { + // check if its a COMobject + if (sc.chPrev == '.' && IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_COMOBJ); + } + else { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_SPECIAL: + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_KEYWORD: + { + if (!(IsAWordChar(sc.ch) || (sc.ch == '-' && (strcmp(s, "#comments") == 0 || strcmp(s, "#include") == 0)))) + { + if (!IsTypeCharacter(sc.ch)) + { + if (strcmp(s, "#cs")== 0 || strcmp(s, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + else if (keywords.InList(s)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_DEFAULT); + if (strcmp(s, "#include")== 0) + { + si = 3; // use to determine string start for #inlude <> + } + } + else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if ((keywords7.InList(s)) && (!IsAOperator(static_cast(sc.ch)))) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (keywords8.InList(s)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (strcmp(s, "_") == 0) { + sc.ChangeState(SCE_AU3_OPERATOR); + sc.SetState(SCE_AU3_DEFAULT); + } + else if (!IsAWordChar(sc.ch)) { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + } + if (sc.atLineEnd) { + sc.SetState(SCE_AU3_DEFAULT);} + break; + } + case SCE_AU3_NUMBER: + { + // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 E-not=3 + // + // test for Hex notation + if (strcmp(s, "0") == 0 && (sc.ch == 'x' || sc.ch == 'X') && ni == 0) + { + ni = 2; + break; + } + // test for E notation + if (IsADigit(sc.chPrev) && (sc.ch == 'e' || sc.ch == 'E') && ni <= 1) + { + ni = 3; + break; + } + // Allow Hex characters inside hex numeric strings + if ((ni == 2) && + (sc.ch == 'a' || sc.ch == 'b' || sc.ch == 'c' || sc.ch == 'd' || sc.ch == 'e' || sc.ch == 'f' || + sc.ch == 'A' || sc.ch == 'B' || sc.ch == 'C' || sc.ch == 'D' || sc.ch == 'E' || sc.ch == 'F' )) + { + break; + } + // test for 1 dec point only + if (sc.ch == '.') + { + if (ni==0) + { + ni=1; + } + else + { + ni=9; + } + break; + } + // end of numeric string ? + if (!(IsADigit(sc.ch))) + { + if (ni==9) + { + sc.ChangeState(SCE_AU3_DEFAULT); + } + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_VARIABLE: + { + // Check if its a COMObject + if (sc.ch == '.' && !IsADigit(sc.chNext)) { + sc.SetState(SCE_AU3_OPERATOR); + } + else if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_COMOBJ: + { + if (!(IsAWordChar(sc.ch))) { + sc.SetState(SCE_AU3_DEFAULT); + } + break; + } + case SCE_AU3_STRING: + { + // check for " to end a double qouted string or + // check for ' to end a single qouted string + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'') || (si == 3 && sc.ch == '>')) + { + sc.ForwardSetState(SCE_AU3_DEFAULT); + si=0; + break; + } + if (sc.atLineEnd) + { + si=0; + // at line end and not found a continuation char then reset to default + int lineCurrent = styler.GetLine(sc.currentPos); + if (!IsContinuationLine(lineCurrent,styler)) + { + sc.SetState(SCE_AU3_DEFAULT); + break; + } + } + // find Sendkeys in a STRING + if (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ) { + sc.SetState(SCE_AU3_SENT);} + break; + } + + case SCE_AU3_SENT: + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + else + { + // check if the start is a valid SendKey start + int nPos = 0; + int nState = 1; + char cTemp; + while (!(nState == 2) && ((cTemp = s[nPos]) != '\0')) + { + if (cTemp == '{' && nState == 1) + { + nState = 2; + } + if (nState == 1 && !(cTemp == '+' || cTemp == '!' || cTemp == '^' || cTemp == '#' )) + { + nState = 0; + } + nPos++; + } + //Verify characters infront of { ... if not assume regular string + if (nState == 1 && (!(sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' ))) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + // If invalid character found then assume its a regular string + if (nState == 0) { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_STRING); + } + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + si = 0; // reset string indicator + } + //* check in next characters following a sentkey are again a sent key + // Need this test incase of 2 sentkeys like {F1}{ENTER} but not detect {{} + if (sc.state == SCE_AU3_STRING && (sc.ch == '{' || sc.ch == '+' || sc.ch == '!' || sc.ch == '^' || sc.ch == '#' )) { + sc.SetState(SCE_AU3_SENT);} + // check to see if the string ended... + // Sendkey string isn't complete but the string ended.... + if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'')) + { + sc.ChangeState(SCE_AU3_STRING); + sc.ForwardSetState(SCE_AU3_DEFAULT); + } + break; + } + } //switch (sc.state) + + // Determine if a new state should be entered: + + if (sc.state == SCE_AU3_DEFAULT) + { + if (sc.ch == ';') {sc.SetState(SCE_AU3_COMMENT);} + else if (sc.ch == '#') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '$') {sc.SetState(SCE_AU3_VARIABLE);} + else if (sc.ch == '.' && !IsADigit(sc.chNext)) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.ch == '@') {sc.SetState(SCE_AU3_KEYWORD);} + //else if (sc.ch == '_') {sc.SetState(SCE_AU3_KEYWORD);} + else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);} // string after #include + else if (sc.ch == '\"') { + sc.SetState(SCE_AU3_STRING); + si = 1; } + else if (sc.ch == '\'') { + sc.SetState(SCE_AU3_STRING); + si = 2; } + else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) + { + sc.SetState(SCE_AU3_NUMBER); + ni = 0; + } + else if (IsAWordStart(sc.ch)) {sc.SetState(SCE_AU3_KEYWORD);} + else if (IsAOperator(static_cast(sc.ch))) {sc.SetState(SCE_AU3_OPERATOR);} + else if (sc.atLineEnd) {sc.SetState(SCE_AU3_DEFAULT);} + } + } //for (; sc.More(); sc.Forward()) + + //************************************* + // Colourize the last word correctly + //************************************* + if (sc.state == SCE_AU3_KEYWORD) + { + if (strcmp(s_save, "#cs")== 0 || strcmp(s_save, "#comments-start")== 0 ) + { + sc.ChangeState(SCE_AU3_COMMENTBLOCK); + sc.SetState(SCE_AU3_COMMENTBLOCK); + } + else if (keywords.InList(s_save)) { + sc.ChangeState(SCE_AU3_KEYWORD); + sc.SetState(SCE_AU3_KEYWORD); + } + else if (keywords2.InList(s_save)) { + sc.ChangeState(SCE_AU3_FUNCTION); + sc.SetState(SCE_AU3_FUNCTION); + } + else if (keywords3.InList(s_save)) { + sc.ChangeState(SCE_AU3_MACRO); + sc.SetState(SCE_AU3_MACRO); + } + else if (keywords5.InList(s_save)) { + sc.ChangeState(SCE_AU3_PREPROCESSOR); + sc.SetState(SCE_AU3_PREPROCESSOR); + } + else if (keywords6.InList(s_save)) { + sc.ChangeState(SCE_AU3_SPECIAL); + sc.SetState(SCE_AU3_SPECIAL); + } + else if (keywords7.InList(s_save) && sc.atLineEnd) { + sc.ChangeState(SCE_AU3_EXPAND); + sc.SetState(SCE_AU3_EXPAND); + } + else if (keywords8.InList(s_save)) { + sc.ChangeState(SCE_AU3_UDF); + sc.SetState(SCE_AU3_UDF); + } + else { + sc.ChangeState(SCE_AU3_DEFAULT); + sc.SetState(SCE_AU3_DEFAULT); + } + } + if (sc.state == SCE_AU3_SENT) + { + // Send key string ended + if (sc.chPrev == '}' && sc.ch != '}') + { + // set color to SENDKEY when valid sendkey .. else set back to regular string + char sk[100]; + // split {111 222} and return {111} and check if 222 is valid. + // if return code = 1 then invalid 222 so must be string + if (GetSendKey(s_save,sk)) + { + sc.ChangeState(SCE_AU3_STRING); + } + // if single char between {?} then its ok as sendkey for a single character + else if (strlen(sk) == 3) + { + sc.ChangeState(SCE_AU3_SENT); + } + // if sendkey {111} is in table then ok as sendkey + else if (keywords4.InList(sk)) + { + sc.ChangeState(SCE_AU3_SENT); + } + else + { + sc.ChangeState(SCE_AU3_STRING); + } + sc.SetState(SCE_AU3_STRING); + } + // check if next portion is again a sendkey + if (sc.atLineEnd) + { + sc.ChangeState(SCE_AU3_STRING); + sc.SetState(SCE_AU3_DEFAULT); + } + } + //************************************* + sc.Complete(); +} + +// +static bool IsStreamCommentStyle(int style) { + return style == SCE_AU3_COMMENT || style == SCE_AU3_COMMENTBLOCK; +} + +// +// Routine to find first none space on the current line and return its Style +// needed for comment lines not starting on pos 1 +static int GetStyleFirstWord(unsigned int szLine, Accessor &styler) +{ + int nsPos = styler.LineStart(szLine); + int nePos = styler.LineStart(szLine+1) - 1; + while (isspacechar(styler.SafeGetCharAt(nsPos)) && nsPos < nePos) + { + nsPos++; // skip to next char + + } // End While + return styler.StyleAt(nsPos); + +} // GetStyleFirstWord() + + +// +static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) +{ + int endPos = startPos + length; + // get settings from the config files for folding comments and preprocessor lines + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldInComment = styler.GetPropertyInt("fold.comment") == 2; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldpreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + // vars for style of previous/current/next lines + int style = GetStyleFirstWord(lineCurrent,styler); + int stylePrev = 0; + // find the first previous line without continuation character at the end + while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) || + (lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + if (lineCurrent > 0) { + stylePrev = GetStyleFirstWord(lineCurrent-1,styler); + } + // vars for getting first word to check for keywords + bool FirstWordStart = false; + bool FirstWordEnd = false; + char szKeyword[10]=""; + int szKeywordlen = 0; + char szThen[5]=""; + int szThenlen = 0; + bool ThenFoundLast = false; + // var for indentlevel + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + // + int visibleChars = 0; + char chNext = styler.SafeGetCharAt(startPos); + char chPrev = ' '; + // + for (int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + if (IsAWordChar(ch)) { + visibleChars++; + } + // get the syle for the current character neede to check in comment + int stylech = styler.StyleAt(i); + // get first word for the line for indent check max 9 characters + if (FirstWordStart && (!(FirstWordEnd))) { + if (!IsAWordChar(ch)) { + FirstWordEnd = true; + szKeyword[szKeywordlen] = '\0'; + } + else { + if (szKeywordlen < 10) { + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + } + // start the capture of the first word + if (!(FirstWordStart)) { + if (IsAWordChar(ch) || IsAWordStart(ch) || ch == ';') { + FirstWordStart = true; + szKeyword[szKeywordlen++] = static_cast(tolower(ch)); + } + } + // only process this logic when not in comment section + if (!(stylech == SCE_AU3_COMMENT)) { + if (ThenFoundLast) { + if (IsAWordChar(ch)) { + ThenFoundLast = false; + } + } + // find out if the word "then" is the last on a "if" line + if (FirstWordEnd && strcmp(szKeyword,"if") == 0) { + if (szThenlen == 4) { + szThen[0] = szThen[1]; + szThen[1] = szThen[2]; + szThen[2] = szThen[3]; + szThen[3] = static_cast(tolower(ch)); + if (strcmp(szThen,"then") == 0 ) { + ThenFoundLast = true; + } + } + else { + szThen[szThenlen++] = static_cast(tolower(ch)); + if (szThenlen == 5) { + szThen[4] = '\0'; + } + } + } + } + // End of Line found so process the information + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { + // ************************** + // Folding logic for Keywords + // ************************** + // if a keyword is found on the current line and the line doesn't end with _ (continuation) + // and we are not inside a commentblock. + if (szKeywordlen > 0 && (!(chPrev == '_')) && + ((!(IsStreamCommentStyle(style)) || foldInComment)) ) { + szKeyword[szKeywordlen] = '\0'; + // only fold "if" last keyword is "then" (else its a one line if) + if (strcmp(szKeyword,"if") == 0 && ThenFoundLast) { + levelNext++; + } + // create new fold for these words + if (strcmp(szKeyword,"do") == 0 || strcmp(szKeyword,"for") == 0 || + strcmp(szKeyword,"func") == 0 || strcmp(szKeyword,"while") == 0|| + strcmp(szKeyword,"with") == 0 || strcmp(szKeyword,"#region") == 0 ) { + levelNext++; + } + // create double Fold for select&switch because Case will subtract one of the current level + if (strcmp(szKeyword,"select") == 0 || strcmp(szKeyword,"switch") == 0) { + levelNext++; + levelNext++; + } + // end the fold for these words before the current line + if (strcmp(szKeyword,"endfunc") == 0 || strcmp(szKeyword,"endif") == 0 || + strcmp(szKeyword,"next") == 0 || strcmp(szKeyword,"until") == 0 || + strcmp(szKeyword,"endwith") == 0 ||strcmp(szKeyword,"wend") == 0){ + levelNext--; + levelCurrent--; + } + // end the fold for these words before the current line and Start new fold + if (strcmp(szKeyword,"case") == 0 || strcmp(szKeyword,"else") == 0 || + strcmp(szKeyword,"elseif") == 0 ) { + levelCurrent--; + } + // end the double fold for this word before the current line + if (strcmp(szKeyword,"endselect") == 0 || strcmp(szKeyword,"endswitch") == 0 ) { + levelNext--; + levelNext--; + levelCurrent--; + levelCurrent--; + } + // end the fold for these words on the current line + if (strcmp(szKeyword,"#endregion") == 0 ) { + levelNext--; + } + } + // Preprocessor and Comment folding + int styleNext = GetStyleFirstWord(lineCurrent + 1,styler); + // ************************************* + // Folding logic for preprocessor blocks + // ************************************* + // process preprosessor line + if (foldpreprocessor && style == SCE_AU3_PREPROCESSOR) { + if (!(stylePrev == SCE_AU3_PREPROCESSOR) && (styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (stylePrev == SCE_AU3_PREPROCESSOR && !(styleNext == SCE_AU3_PREPROCESSOR)) { + levelNext--; + } + } + // ********************************* + // Folding logic for Comment blocks + // ********************************* + if (foldComment && IsStreamCommentStyle(style)) { + // Start of a comment block + if (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) { + levelNext++; + } + // fold till the last line for normal comment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENT) + && stylePrev == SCE_AU3_COMMENT + && style == SCE_AU3_COMMENT) { + levelNext--; + } + // fold till the one but last line for Blockcomment lines + else if (IsStreamCommentStyle(stylePrev) + && !(styleNext == SCE_AU3_COMMENTBLOCK) + && style == SCE_AU3_COMMENTBLOCK) { + levelNext--; + levelCurrent--; + } + } + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + // reset values for the next line + lineCurrent++; + stylePrev = style; + style = styleNext; + levelCurrent = levelNext; + visibleChars = 0; + // if the last character is an Underscore then don't reset since the line continues on the next line. + if (!(chPrev == '_')) { + szKeywordlen = 0; + szThenlen = 0; + FirstWordStart = false; + FirstWordEnd = false; + ThenFoundLast = false; + } + } + // save the last processed character + if (!isspacechar(ch)) { + chPrev = ch; + visibleChars++; + } + } +} + + +// + +static const char * const AU3WordLists[] = { + "#autoit keywords", + "#autoit functions", + "#autoit macros", + "#autoit Sent keys", + "#autoit Pre-processors", + "#autoit Special", + "#autoit Expand", + "#autoit UDF", + 0 +}; +LexerModule lmAU3(SCLEX_AU3, ColouriseAU3Doc, "au3", FoldAU3Doc , AU3WordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexAVE.cxx b/sdk/wxscintilla/src/scintilla/src/LexAVE.cxx new file mode 100644 index 0000000000..49ccbac80b --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAVE.cxx @@ -0,0 +1,228 @@ +// SciTE - Scintilla based Text Editor +/** @file LexAVE.cxx + ** Lexer for Avenue. + ** + ** Written by Alexey Yutkin . + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} +static inline bool IsEnumChar(const int ch) { + return (ch < 0x80) && (isalnum(ch)|| ch == '_'); +} +static inline bool IsANumberChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' ); +} + +inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +inline bool isAveOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' ) + return true; + return false; +} + +static void ColouriseAveDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + + // Do not leak onto next line + if (initStyle == SCE_AVE_STRINGEOL) { + initStyle = SCE_AVE_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + int currentLine = styler.GetLine(sc.currentPos); + styler.SetLineState(currentLine, 0); + } + if (sc.atLineStart && (sc.state == SCE_AVE_STRING)) { + // Prevent SCE_AVE_STRINGEOL from leaking back to previous line + sc.SetState(SCE_AVE_STRING); + } + + + // Determine if the current state should terminate. + if (sc.state == SCE_AVE_OPERATOR) { + sc.SetState(SCE_AVE_DEFAULT); + } else if (sc.state == SCE_AVE_NUMBER) { + if (!IsANumberChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_ENUM) { + if (!IsEnumChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + //sc.GetCurrent(s, sizeof(s)); + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVE_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AVE_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AVE_WORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_AVE_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AVE_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AVE_WORD6); + } + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_AVE_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_AVE_STRINGEOL); + sc.ForwardSetState(SCE_AVE_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_AVE_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_AVE_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_AVE_IDENTIFIER); + } else if (sc.Match('\"')) { + sc.SetState(SCE_AVE_STRING); + } else if (sc.Match('\'')) { + sc.SetState(SCE_AVE_COMMENT); + sc.Forward(); + } else if (isAveOperator(static_cast(sc.ch))) { + sc.SetState(SCE_AVE_OPERATOR); + } else if (sc.Match('#')) { + sc.SetState(SCE_AVE_ENUM); + sc.Forward(); + } + } + } + sc.Complete(); +} + +static void FoldAveDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = static_cast(tolower(styler[startPos])); + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10]; + + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = static_cast(tolower(chNext)); + chNext = static_cast(tolower(styler.SafeGetCharAt(i + 1))); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (style == SCE_AVE_WORD) { + if (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') { + for (unsigned int j = 0; j < 6; j++) { + if (!iswordchar(styler[i + j])) { + break; + } + s[j] = static_cast(tolower(styler[i + j])); + s[j + 1] = '\0'; + } + + if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) { + levelCurrent++; + } + if ((strcmp(s, "end") == 0) || (strcmp(s, "elseif") == 0)) { + // Normally "elseif" and "then" will be on the same line and will cancel + // each other out. // As implemented, this does not support fold.at.else. + levelCurrent--; + } + } + } else if (style == SCE_AVE_OPERATOR) { + if (ch == '{' || ch == '(') { + levelCurrent++; + } else if (ch == '}' || ch == ')') { + levelCurrent--; + } + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) { + lev |= SC_FOLDLEVELWHITEFLAG; + } + if ((levelCurrent > levelPrev) && (visibleChars > 0)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) { + visibleChars++; + } + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave", FoldAveDoc); + diff --git a/sdk/wxscintilla/src/scintilla/src/LexAda.cxx b/sdk/wxscintilla/src/scintilla/src/LexAda.cxx new file mode 100644 index 0000000000..9d1b45702e --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAda.cxx @@ -0,0 +1,524 @@ +// Scintilla source code edit control +/** @file LexAda.cxx + ** Lexer for Ada 95 + **/ +// Copyright 2002 by Sergey Koshcheyev +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "Accessor.h" +#include "StyleContext.h" +#include "PropSet.h" +#include "KeyWords.h" +#include "SciLexer.h" +#include "SString.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/* + * Interface + */ + +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static const char * const adaWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmAda(SCLEX_ADA, ColouriseDocument, "ada", NULL, adaWordListDesc); + +/* + * Implementation + */ + +// Functions that have apostropheStartsAttribute as a parameter set it according to whether +// an apostrophe encountered after processing the current token will start an attribute or +// a character literal. +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL); +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); + +static inline bool IsDelimiterCharacter(int ch); +static inline bool IsNumberStartCharacter(int ch); +static inline bool IsNumberCharacter(int ch); +static inline bool IsSeparatorOrDelimiterCharacter(int ch); +static bool IsValidIdentifier(const SString& identifier); +static bool IsValidNumber(const SString& number); +static inline bool IsWordStartCharacter(int ch); +static inline bool IsWordCharacter(int ch); + +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_CHARACTER); + + // Skip the apostrophe and one more character (so that '' is shown as non-terminated and ''' + // is handled correctly) + sc.Forward(); + sc.Forward(); + + ColouriseContext(sc, '\'', SCE_ADA_CHARACTEREOL); +} + +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) { + while (!sc.atLineEnd && !sc.Match(chEnd)) { + sc.Forward(); + } + + if (!sc.atLineEnd) { + sc.ForwardSetState(SCE_ADA_DEFAULT); + } else { + sc.ChangeState(stateEOL); + } +} + +static void ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + + sc.SetState(SCE_ADA_COMMENTLINE); + + while (!sc.atLineEnd) { + sc.Forward(); + } +} + +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = sc.Match (')'); + sc.SetState(SCE_ADA_DELIMITER); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = false; + + sc.SetState(SCE_ADA_LABEL); + + // Skip "<<" + sc.Forward(); + sc.Forward(); + + SString identifier; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + identifier += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + // Skip ">>" + if (sc.Match('>', '>')) { + sc.Forward(); + sc.Forward(); + } else { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + // If the name is an invalid identifier or a keyword, then make it invalid label + if (!IsValidIdentifier(identifier) || keywords.InList(identifier.c_str())) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); + +} + +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + SString number; + sc.SetState(SCE_ADA_NUMBER); + + // Get all characters up to a delimiter or a separator, including points, but excluding + // double points (ranges). + while (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) { + number += static_cast(sc.ch); + sc.Forward(); + } + + // Special case: exponent with sign + if ((sc.chPrev == 'e' || sc.chPrev == 'E') && + (sc.ch == '+' || sc.ch == '-')) { + number += static_cast(sc.ch); + sc.Forward (); + + while (!IsSeparatorOrDelimiterCharacter(sc.ch)) { + number += static_cast(sc.ch); + sc.Forward(); + } + } + + if (!IsValidNumber(number)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_STRING); + sc.Forward(); + + ColouriseContext(sc, '"', SCE_ADA_STRINGEOL); +} + +static void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + sc.SetState(SCE_ADA_DEFAULT); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + sc.SetState(SCE_ADA_IDENTIFIER); + + SString word; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + word += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + if (!IsValidIdentifier(word)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + + } else if (keywords.InList(word.c_str())) { + sc.ChangeState(SCE_ADA_WORD); + + if (word != "all") { + apostropheStartsAttribute = false; + } + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +// +// ColouriseDocument +// + +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lineCurrent = styler.GetLine(startPos); + bool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0; + + while (sc.More()) { + if (sc.atLineEnd) { + // Go to the next line + sc.Forward(); + lineCurrent++; + + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, apostropheStartsAttribute); + + // Don't continue any styles on the next line + sc.SetState(SCE_ADA_DEFAULT); + } + + // Comments + if (sc.Match('-', '-')) { + ColouriseComment(sc, apostropheStartsAttribute); + + // Strings + } else if (sc.Match('"')) { + ColouriseString(sc, apostropheStartsAttribute); + + // Characters + } else if (sc.Match('\'') && !apostropheStartsAttribute) { + ColouriseCharacter(sc, apostropheStartsAttribute); + + // Labels + } else if (sc.Match('<', '<')) { + ColouriseLabel(sc, keywords, apostropheStartsAttribute); + + // Whitespace + } else if (IsASpace(sc.ch)) { + ColouriseWhiteSpace(sc, apostropheStartsAttribute); + + // Delimiters + } else if (IsDelimiterCharacter(sc.ch)) { + ColouriseDelimiter(sc, apostropheStartsAttribute); + + // Numbers + } else if (IsADigit(sc.ch) || sc.ch == '#') { + ColouriseNumber(sc, apostropheStartsAttribute); + + // Keywords or identifiers + } else { + ColouriseWord(sc, keywords, apostropheStartsAttribute); + } + } + + sc.Complete(); +} + +static inline bool IsDelimiterCharacter(int ch) { + switch (ch) { + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': + case '/': + case ':': + case ';': + case '<': + case '=': + case '>': + case '|': + return true; + default: + return false; + } +} + +static inline bool IsNumberCharacter(int ch) { + return IsNumberStartCharacter(ch) || + ch == '_' || + ch == '.' || + ch == '#' || + (ch >= 'a' && ch <= 'f') || + (ch >= 'A' && ch <= 'F'); +} + +static inline bool IsNumberStartCharacter(int ch) { + return IsADigit(ch); +} + +static inline bool IsSeparatorOrDelimiterCharacter(int ch) { + return IsASpace(ch) || IsDelimiterCharacter(ch); +} + +static bool IsValidIdentifier(const SString& identifier) { + // First character can't be '_', so initialize the flag to true + bool lastWasUnderscore = true; + + size_t length = identifier.length(); + + // Zero-length identifiers are not valid (these can occur inside labels) + if (length == 0) { + return false; + } + + // Check for valid character at the start + if (!IsWordStartCharacter(identifier[0])) { + return false; + } + + // Check for only valid characters and no double underscores + for (size_t i = 0; i < length; i++) { + if (!IsWordCharacter(identifier[i]) || + (identifier[i] == '_' && lastWasUnderscore)) { + return false; + } + lastWasUnderscore = identifier[i] == '_'; + } + + // Check for underscore at the end + if (lastWasUnderscore == true) { + return false; + } + + // All checks passed + return true; +} + +static bool IsValidNumber(const SString& number) { + int hashPos = number.search("#"); + bool seenDot = false; + + size_t i = 0; + size_t length = number.length(); + + if (length == 0) + return false; // Just in case + + // Decimal number + if (hashPos == -1) { + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (number[i] == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + break; + } + } + + if (!canBeSpecial) + return false; + } else { + // Based number + bool canBeSpecial = false; + int base = 0; + + // Parse base + for (; i < length; i++) { + int ch = number[i]; + if (ch == '_') { + if (!canBeSpecial) + return false; + canBeSpecial = false; + } else if (IsADigit(ch)) { + base = base * 10 + (ch - '0'); + if (base > 16) + return false; + canBeSpecial = true; + } else if (ch == '#' && canBeSpecial) { + break; + } else { + return false; + } + } + + if (base < 2) + return false; + if (i == length) + return false; + + i++; // Skip over '#' + + // Parse number + canBeSpecial = false; + + for (; i < length; i++) { + int ch = tolower(number[i]); + + if (ch == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + + } else if (ch == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + + } else if (IsADigit(ch)) { + if (ch - '0' >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch >= 'a' && ch <= 'f') { + if (ch - 'a' + 10 >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch == '#' && canBeSpecial) { + break; + + } else { + return false; + } + } + + if (i == length) { + return false; + } + + i++; + } + + // Exponent (optional) + if (i < length) { + if (number[i] != 'e' && number[i] != 'E') + return false; + + i++; // Move past 'E' + + if (i == length) { + return false; + } + + if (number[i] == '+') + i++; + else if (number[i] == '-') { + if (seenDot) { + i++; + } else { + return false; // Integer literals should not have negative exponents + } + } + + if (i == length) { + return false; + } + + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (IsADigit(number[i])) { + canBeSpecial = true; + } else { + return false; + } + } + + if (!canBeSpecial) + return false; + } + + // if i == length, number was parsed successfully. + return i == length; +} + +static inline bool IsWordCharacter(int ch) { + return IsWordStartCharacter(ch) || IsADigit(ch); +} + +static inline bool IsWordStartCharacter(int ch) { + return (isascii(ch) && isalpha(ch)) || ch == '_'; +} diff --git a/sdk/wxscintilla/src/scintilla/src/LexAsm.cxx b/sdk/wxscintilla/src/scintilla/src/LexAsm.cxx new file mode 100644 index 0000000000..deb2839332 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAsm.cxx @@ -0,0 +1,180 @@ +// Scintilla source code edit control +/** @file LexAsm.cxx + ** Lexer for Assembler, just for the MASM syntax + ** Written by The Black Horus + ** Enhancements and NASM stuff by Kein-Hong Man, 2003-10 + ** SCE_ASM_COMMENTBLOCK and SCE_ASM_CHARACTER are for future GNU as colouring + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsAsmOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseAsmDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &cpuInstruction = *keywordlists[0]; + WordList &mathInstruction = *keywordlists[1]; + WordList ®isters = *keywordlists[2]; + WordList &directive = *keywordlists[3]; + WordList &directiveOperand = *keywordlists[4]; + WordList &extInstruction = *keywordlists[5]; + + // Do not leak onto next line + if (initStyle == SCE_ASM_STRINGEOL) + initStyle = SCE_ASM_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + + // Prevent SCE_ASM_STRINGEOL from leaking back to previous line + if (sc.atLineStart && (sc.state == SCE_ASM_STRING)) { + sc.SetState(SCE_ASM_STRING); + } else if (sc.atLineStart && (sc.state == SCE_ASM_CHARACTER)) { + sc.SetState(SCE_ASM_CHARACTER); + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ASM_OPERATOR) { + if (!IsAsmOperator(static_cast(sc.ch))) { + sc.SetState(SCE_ASM_DEFAULT); + } + }else if (sc.state == SCE_ASM_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (cpuInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_CPUINSTRUCTION); + } else if (mathInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_MATHINSTRUCTION); + } else if (registers.InList(s)) { + sc.ChangeState(SCE_ASM_REGISTER); + } else if (directive.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVE); + } else if (directiveOperand.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND); + } else if (extInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_EXTINSTRUCTION); + } + sc.SetState(SCE_ASM_DEFAULT); + } + } + else if (sc.state == SCE_ASM_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_CHARACTER) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_ASM_STRINGEOL); + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ASM_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_ASM_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_ASM_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_ASM_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ASM_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_ASM_CHARACTER); + } else if (IsAsmOperator(static_cast(sc.ch))) { + sc.SetState(SCE_ASM_OPERATOR); + } + } + + } + sc.Complete(); +} + +static const char * const asmWordListDesc[] = { + "CPU instructions", + "FPU instructions", + "Registers", + "Directives", + "Directive operands", + "Extended instructions", + 0 +}; + +LexerModule lmAsm(SCLEX_ASM, ColouriseAsmDoc, "asm", 0, asmWordListDesc); + diff --git a/sdk/wxscintilla/src/scintilla/src/LexAsn1.cxx b/sdk/wxscintilla/src/scintilla/src/LexAsn1.cxx new file mode 100644 index 0000000000..28bf6d919e --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexAsn1.cxx @@ -0,0 +1,185 @@ +// Scintilla source code edit control +/** @file LexAsn1.cxx + ** Lexer for ASN.1 + **/ +// Copyright 2004 by Herr Pfarrer rpfarrer yahoo de +// Last Updated: 20/07/2004 +// The License.txt file describes the conditions under which this software may be distributed. +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +// Some char test functions +static bool isAsn1Number(int ch) +{ + return (ch >= '0' && ch <= '9'); +} + +static bool isAsn1Letter(int ch) +{ + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isAsn1Char(int ch) +{ + return (ch == '-' ) || isAsn1Number(ch) || isAsn1Letter (ch); +} + +// +// Function determining the color of a given code portion +// Based on a "state" +// +static void ColouriseAsn1Doc(unsigned int startPos, int length, int initStyle, WordList *keywordLists[], Accessor &styler) +{ + // The keywords + WordList &Keywords = *keywordLists[0]; + WordList &Attributes = *keywordLists[1]; + WordList &Descriptors = *keywordLists[2]; + WordList &Types = *keywordLists[3]; + + // Parse the whole buffer character by character using StyleContext + StyleContext sc(startPos, length, initStyle, styler); + for (; sc.More(); sc.Forward()) + { + // The state engine + switch (sc.state) + { + case SCE_ASN1_DEFAULT: // Plain characters +asn1_default: + if (sc.ch == '-' && sc.chNext == '-') + // A comment begins here + sc.SetState(SCE_ASN1_COMMENT); + else if (sc.ch == '"') + // A string begins here + sc.SetState(SCE_ASN1_STRING); + else if (isAsn1Number (sc.ch)) + // A number starts here (identifier should start with a letter in ASN.1) + sc.SetState(SCE_ASN1_SCALAR); + else if (isAsn1Char (sc.ch)) + // An identifier starts here (identifier always start with a letter) + sc.SetState(SCE_ASN1_IDENTIFIER); + else if (sc.ch == ':') + // A ::= operator starts here + sc.SetState(SCE_ASN1_OPERATOR); + break; + case SCE_ASN1_COMMENT: // A comment + if (sc.ch == '\r' || sc.ch == '\n') + // A comment ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_IDENTIFIER: // An identifier (keyword, attribute, descriptor or type) + if (!isAsn1Char (sc.ch)) + { + // The end of identifier is here: we can look for it in lists by now and change its state + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (Keywords.InList(s)) + // It's a keyword, change its state + sc.ChangeState(SCE_ASN1_KEYWORD); + else if (Attributes.InList(s)) + // It's an attribute, change its state + sc.ChangeState(SCE_ASN1_ATTRIBUTE); + else if (Descriptors.InList(s)) + // It's a descriptor, change its state + sc.ChangeState(SCE_ASN1_DESCRIPTOR); + else if (Types.InList(s)) + // It's a type, change its state + sc.ChangeState(SCE_ASN1_TYPE); + + // Set to default now + sc.SetState(SCE_ASN1_DEFAULT); + } + break; + case SCE_ASN1_STRING: // A string delimited by "" + if (sc.ch == '"') + { + // A string ends here + sc.ForwardSetState(SCE_ASN1_DEFAULT); + + // To correctly manage a char sticking to the string quote + goto asn1_default; + } + break; + case SCE_ASN1_SCALAR: // A plain number + if (!isAsn1Number (sc.ch)) + // A number ends here + sc.SetState(SCE_ASN1_DEFAULT); + break; + case SCE_ASN1_OPERATOR: // The affectation operator ::= and wath follows (eg: ::= { org 6 } OID or ::= 12 trap) + if (sc.ch == '{') + { + // An OID definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch) && (!isAsn1Char (sc.chPrev) || isAsn1Number (sc.chPrev))) + // The OID number is highlighted + sc.SetState(SCE_ASN1_OID); + else if (isAsn1Char (sc.ch)) + // The OID parent identifier is plain + sc.SetState(SCE_ASN1_IDENTIFIER); + else + sc.SetState(SCE_ASN1_DEFAULT); + + if (sc.ch == '}') + // Here ends the OID and the operator sub loop: go back to main loop + break; + } + } + else if (isAsn1Number (sc.ch)) + { + // A trap number definition starts here: enter the sub loop + for (; sc.More(); sc.Forward()) + { + if (isAsn1Number (sc.ch)) + // The trap number is highlighted + sc.SetState(SCE_ASN1_OID); + else + { + // The number ends here: go back to main loop + sc.SetState(SCE_ASN1_DEFAULT); + break; + } + } + } + else if (sc.ch != ':' && sc.ch != '=' && sc.ch != ' ') + // The operator doesn't imply an OID definition nor a trap, back to main loop + goto asn1_default; // To be sure to handle actually the state change + break; + } + } + sc.Complete(); +} + +static void FoldAsn1Doc(unsigned int, int, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if( styler.GetPropertyInt("fold") == 0 ) + return; + + // No folding implemented: doesn't make sense for ASN.1 +} + +static const char * const asn1WordLists[] = { + "Keywords", + "Attributes", + "Descriptors", + "Types", + 0, }; + + +LexerModule lmAns1(SCLEX_ASN1, ColouriseAsn1Doc, "asn1", FoldAsn1Doc, asn1WordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexBaan.cxx b/sdk/wxscintilla/src/scintilla/src/LexBaan.cxx new file mode 100644 index 0000000000..97dd1f4b83 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexBaan.cxx @@ -0,0 +1,193 @@ +// Scintilla source code edit control +/** @file LexBaan.cxx + ** Lexer for Baan. + ** Based heavily on LexCPP.cxx + **/ +// Copyright 2001- by Vamsi Potluru & Praveen Ambekar +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$' || ch == ':'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static void ColouriseBaanDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0; + + if (initStyle == SCE_BAAN_STRINGEOL) // Does not leak onto next line + initStyle = SCE_BAAN_DEFAULT; + + int visibleChars = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_BAAN_OPERATOR) { + sc.SetState(SCE_BAAN_DEFAULT); + } else if (sc.state == SCE_BAAN_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_BAAN_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_BAAN_WORD2); + } + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_PREPROCESSOR) { + if (stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else { + if (sc.atLineEnd && (sc.chNext != '^')) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } + } else if (sc.state == SCE_BAAN_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_COMMENTDOC) { + if (sc.MatchIgnoreCase("enddllusage")) { + for (unsigned int i = 0; i < 10; i++){ + sc.Forward(); + } + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } + } else if (sc.state == SCE_BAAN_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_BAAN_DEFAULT); + } else if ((sc.atLineEnd) && (sc.chNext != '^')) { + sc.ChangeState(SCE_BAAN_STRINGEOL); + sc.ForwardSetState(SCE_C_DEFAULT); + visibleChars = 0; + } + } + + if (sc.state == SCE_BAAN_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_BAAN_NUMBER); + } else if (sc.MatchIgnoreCase("dllusage")){ + sc.SetState(SCE_BAAN_COMMENTDOC); + do { + sc.Forward(); + } while ((!sc.atLineEnd) && sc.More()); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_BAAN_IDENTIFIER); + } else if (sc.Match('|')){ + sc.SetState(SCE_BAAN_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_BAAN_STRING); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_BAAN_PREPROCESSOR); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while (IsASpace(sc.ch) && sc.More()); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_BAAN_OPERATOR); + } + } + if (sc.atLineEnd) { + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldBaanDoc(unsigned int startPos, int length, int initStyle, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && + (style == SCE_BAAN_COMMENT || style == SCE_BAAN_COMMENTDOC)) { + if (style != stylePrev) { + levelCurrent++; + } else if ((style != styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + if (style == SCE_BAAN_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +LexerModule lmBaan(SCLEX_BAAN, ColouriseBaanDoc, "baan", FoldBaanDoc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexBash.cxx b/sdk/wxscintilla/src/scintilla/src/LexBash.cxx new file mode 100644 index 0000000000..6eb8b18b88 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexBash.cxx @@ -0,0 +1,668 @@ +// Scintilla source code edit control +/** @file LexBash.cxx + ** Lexer for Bash. + **/ +// Copyright 2004-2005 by Neil Hodgson +// Adapted from LexPerl by Kein-Hong Man 2004 +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define BASH_BASE_ERROR 65 +#define BASH_BASE_DECIMAL 66 +#define BASH_BASE_HEX 67 +#define BASH_BASE_OCTAL 68 +#define BASH_BASE_OCTAL_ERROR 69 + +#define HERE_DELIM_MAX 256 + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline int translateBashDigit(char ch) { + if (ch >= '0' && ch <= '9') { + return ch - '0'; + } else if (ch >= 'a' && ch <= 'z') { + return ch - 'a' + 10; + } else if (ch >= 'A' && ch <= 'Z') { + return ch - 'A' + 36; + } else if (ch == '@') { + return 62; + } else if (ch == '_') { + return 63; + } + return BASH_BASE_ERROR; +} + +static inline bool isEOLChar(char ch) { + return (ch == '\r') || (ch == '\n'); +} + +static bool isSingleCharOp(char ch) { + char strCharSet[2]; + strCharSet[0] = ch; + strCharSet[1] = '\0'; + return (NULL != strstr("rwxoRWXOezsfdlpSbctugkTBMACahGLNn", strCharSet)); +} + +static inline bool isBashOperator(char ch) { + if (ch == '^' || ch == '&' || ch == '\\' || ch == '%' || + ch == '(' || ch == ')' || ch == '-' || ch == '+' || + ch == '=' || ch == '|' || ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ':' || ch == ';' || + ch == '>' || ch == ',' || ch == '/' || ch == '<' || + ch == '?' || ch == '!' || ch == '.' || ch == '~' || + ch == '@') + return true; + return false; +} + +static int classifyWordBash(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_SH_IDENTIFIER; + if (keywords.InList(s)) + chAttr = SCE_SH_WORD; + styler.ColourTo(end, chAttr); + return chAttr; +} + +static inline int getBashNumberBase(unsigned int start, unsigned int end, Accessor &styler) { + int base = 0; + for (unsigned int i = 0; i < end - start + 1 && i < 10; i++) { + base = base * 10 + (styler[start + i] - '0'); + } + if (base > 64 || (end - start) > 1) { + return BASH_BASE_ERROR; + } + return base; +} + +static inline bool isEndVar(char ch) { + return !isalnum(ch) && ch != '$' && ch != '_'; +} + +static inline bool isNonQuote(char ch) { + return isalnum(ch) || ch == '_'; +} + +static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) { + if ((pos + static_cast(strlen(val))) >= lengthDoc) { + return false; + } + while (*val) { + if (*val != styler[pos++]) { + return false; + } + val++; + } + return true; +} + +static char opposite(char ch) { + if (ch == '(') + return ')'; + if (ch == '[') + return ']'; + if (ch == '{') + return '}'; + if (ch == '<') + return '>'; + return ch; +} + +static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + // Lexer for bash often has to backtrack to start of current style to determine + // which characters are being used as quotes, how deeply nested is the + // start position and what the termination string is for here documents + + WordList &keywords = *keywordlists[0]; + + class HereDocCls { + public: + int State; // 0: '<<' encountered + // 1: collect the delimiter + // 2: here doc text (lines after the delimiter) + char Quote; // the char after '<<' + bool Quoted; // true if Quote in ('\'','"','`') + bool Indent; // indented delimiter (for <<-) + int DelimiterLength; // strlen(Delimiter) + char *Delimiter; // the Delimiter, 256: sizeof PL_tokenbuf + HereDocCls() { + State = 0; + Quote = 0; + Quoted = false; + Indent = 0; + DelimiterLength = 0; + Delimiter = new char[HERE_DELIM_MAX]; + Delimiter[0] = '\0'; + } + ~HereDocCls() { + delete []Delimiter; + } + }; + HereDocCls HereDoc; + + class QuoteCls { + public: + int Rep; + int Count; + char Up; + char Down; + QuoteCls() { + this->New(1); + } + void New(int r) { + Rep = r; + Count = 0; + Up = '\0'; + Down = '\0'; + } + void Open(char u) { + Count++; + Up = u; + Down = opposite(Up); + } + }; + QuoteCls Quote; + + int state = initStyle; + int numBase = 0; + unsigned int lengthDoc = startPos + length; + + // If in a long distance lexical state, seek to the beginning to find quote characters + // Bash strings can be multi-line with embedded newlines, so backtrack. + // Bash numbers have additional state during lexing, so backtrack too. + if (state == SCE_SH_HERE_Q) { + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_SH_HERE_DELIM)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + state = styler.StyleAt(startPos - 1); + } + if (state == SCE_SH_STRING + || state == SCE_SH_BACKTICKS + || state == SCE_SH_CHARACTER + || state == SCE_SH_NUMBER + || state == SCE_SH_IDENTIFIER + || state == SCE_SH_COMMENTLINE + ) { + while ((startPos > 1) && (styler.StyleAt(startPos - 1) == state)) { + startPos--; + } + state = SCE_SH_DEFAULT; + } + + styler.StartAt(startPos); + char chPrev = styler.SafeGetCharAt(startPos - 1); + if (startPos == 0) + chPrev = '\n'; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + // if the current character is not consumed due to the completion of an + // earlier style, lexing can be restarted via a simple goto + restartLexer: + chNext = styler.SafeGetCharAt(i + 1); + char chNext2 = styler.SafeGetCharAt(i + 2); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if ((chPrev == '\r' && ch == '\n')) { // skip on DOS/Windows + styler.ColourTo(i, state); + chPrev = ch; + continue; + } + + if (HereDoc.State == 1 && isEOLChar(ch)) { + // Begin of here-doc (the line after the here-doc delimiter): + // Lexically, the here-doc starts from the next line after the >>, but the + // first line of here-doc seem to follow the style of the last EOL sequence + HereDoc.State = 2; + if (HereDoc.Quoted) { + if (state == SCE_SH_HERE_DELIM) { + // Missing quote at end of string! We are stricter than bash. + // Colour here-doc anyway while marking this bit as an error. + state = SCE_SH_ERROR; + } + styler.ColourTo(i - 1, state); + // HereDoc.Quote always == '\'' + state = SCE_SH_HERE_Q; + } else { + styler.ColourTo(i - 1, state); + // always switch + state = SCE_SH_HERE_Q; + } + } + + if (state == SCE_SH_DEFAULT) { + if (ch == '\\') { // escaped character + if (i < lengthDoc - 1) + i++; + ch = chNext; + chNext = chNext2; + styler.ColourTo(i, SCE_SH_IDENTIFIER); + } else if (isdigit(ch)) { + state = SCE_SH_NUMBER; + numBase = BASH_BASE_DECIMAL; + if (ch == '0') { // hex,octal + if (chNext == 'x' || chNext == 'X') { + numBase = BASH_BASE_HEX; + i++; + ch = chNext; + chNext = chNext2; + } else if (isdigit(chNext)) { + numBase = BASH_BASE_OCTAL; + } + } + } else if (iswordstart(ch)) { + state = SCE_SH_WORD; + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + // We need that if length of word == 1! + // This test is copied from the SCE_SH_WORD handler. + classifyWordBash(styler.GetStartSegment(), i, keywords, styler); + state = SCE_SH_DEFAULT; + } + } else if (ch == '#') { + state = SCE_SH_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_SH_STRING; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '\'') { + state = SCE_SH_CHARACTER; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '`') { + state = SCE_SH_BACKTICKS; + Quote.New(1); + Quote.Open(ch); + } else if (ch == '$') { + if (chNext == '{') { + state = SCE_SH_PARAM; + goto startQuote; + } else if (chNext == '\'') { + state = SCE_SH_CHARACTER; + goto startQuote; + } else if (chNext == '"') { + state = SCE_SH_STRING; + goto startQuote; + } else if (chNext == '(' && chNext2 == '(') { + styler.ColourTo(i, SCE_SH_OPERATOR); + state = SCE_SH_DEFAULT; + goto skipChar; + } else if (chNext == '(' || chNext == '`') { + state = SCE_SH_BACKTICKS; + startQuote: + Quote.New(1); + Quote.Open(chNext); + goto skipChar; + } else { + state = SCE_SH_SCALAR; + skipChar: + i++; + ch = chNext; + chNext = chNext2; + } + } else if (ch == '*') { + if (chNext == '*') { // exponentiation + i++; + ch = chNext; + chNext = chNext2; + } + styler.ColourTo(i, SCE_SH_OPERATOR); + } else if (ch == '<' && chNext == '<') { + state = SCE_SH_HERE_DELIM; + HereDoc.State = 0; + HereDoc.Indent = false; + } else if (ch == '-' // file test operators + && isSingleCharOp(chNext) + && !isalnum((chNext2 = styler.SafeGetCharAt(i+2))) + && isspace(chPrev)) { + styler.ColourTo(i + 1, SCE_SH_WORD); + state = SCE_SH_DEFAULT; + i++; + ch = chNext; + chNext = chNext2; + } else if (isBashOperator(ch)) { + styler.ColourTo(i, SCE_SH_OPERATOR); + } else { + // keep colouring defaults to make restart easier + styler.ColourTo(i, SCE_SH_DEFAULT); + } + } else if (state == SCE_SH_NUMBER) { + int digit = translateBashDigit(ch); + if (numBase == BASH_BASE_DECIMAL) { + if (ch == '#') { + numBase = getBashNumberBase(styler.GetStartSegment(), i - 1, styler); + if (numBase == BASH_BASE_ERROR) // take the rest as comment + goto numAtEnd; + } else if (!isdigit(ch)) + goto numAtEnd; + } else if (numBase == BASH_BASE_HEX) { + if ((digit < 16) || (digit >= 36 && digit <= 41)) { + // hex digit 0-9a-fA-F + } else + goto numAtEnd; + } else if (numBase == BASH_BASE_OCTAL || + numBase == BASH_BASE_OCTAL_ERROR) { + if (digit > 7) { + if (digit <= 9) { + numBase = BASH_BASE_OCTAL_ERROR; + } else + goto numAtEnd; + } + } else if (numBase == BASH_BASE_ERROR) { + if (digit > 9) + goto numAtEnd; + } else { // DD#DDDD number style handling + if (digit != BASH_BASE_ERROR) { + if (numBase <= 36) { + // case-insensitive if base<=36 + if (digit >= 36) digit -= 26; + } + if (digit >= numBase) { + if (digit <= 9) { + numBase = BASH_BASE_ERROR; + } else + goto numAtEnd; + } + } else { + numAtEnd: + if (numBase == BASH_BASE_ERROR || + numBase == BASH_BASE_OCTAL_ERROR) + state = SCE_SH_ERROR; + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + } else if (state == SCE_SH_WORD) { + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + // "." never used in Bash variable names + // but used in file names + classifyWordBash(styler.GetStartSegment(), i, keywords, styler); + state = SCE_SH_DEFAULT; + ch = ' '; + } + } else if (state == SCE_SH_IDENTIFIER) { + if (!iswordchar(chNext) && chNext != '+' && chNext != '-') { + styler.ColourTo(i, SCE_SH_IDENTIFIER); + state = SCE_SH_DEFAULT; + ch = ' '; + } + } else { + if (state == SCE_SH_COMMENTLINE) { + if (ch == '\\' && isEOLChar(chNext)) { + // comment continuation + if (chNext == '\r' && chNext2 == '\n') { + i += 2; + ch = styler.SafeGetCharAt(i); + chNext = styler.SafeGetCharAt(i + 1); + } else { + i++; + ch = chNext; + chNext = chNext2; + } + } else if (isEOLChar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } else if (isEOLChar(chNext)) { + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } + } else if (state == SCE_SH_HERE_DELIM) { + // + // From Bash info: + // --------------- + // Specifier format is: <<[-]WORD + // Optional '-' is for removal of leading tabs from here-doc. + // Whitespace acceptable after <<[-] operator + // + if (HereDoc.State == 0) { // '<<' encountered + HereDoc.State = 1; + HereDoc.Quote = chNext; + HereDoc.Quoted = false; + HereDoc.DelimiterLength = 0; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + if (chNext == '\'' || chNext == '\"') { // a quoted here-doc delimiter (' or ") + i++; + ch = chNext; + chNext = chNext2; + HereDoc.Quoted = true; + } else if (!HereDoc.Indent && chNext == '-') { // <<- indent case + HereDoc.Indent = true; + HereDoc.State = 0; + } else if (isalpha(chNext) || chNext == '_' || chNext == '\\' + || chNext == '-' || chNext == '+' || chNext == '!') { + // an unquoted here-doc delimiter, no special handling + // TODO check what exactly bash considers part of the delim + } else if (chNext == '<') { // HERE string <<< + i++; + ch = chNext; + chNext = chNext2; + styler.ColourTo(i, SCE_SH_HERE_DELIM); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + } else if (isspacechar(chNext)) { + // eat whitespace + HereDoc.State = 0; + } else if (isdigit(chNext) || chNext == '=' || chNext == '$') { + // left shift << or <<= operator cases + styler.ColourTo(i, SCE_SH_OPERATOR); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + } else { + // symbols terminates; deprecated zero-length delimiter + } + } else if (HereDoc.State == 1) { // collect the delimiter + if (HereDoc.Quoted) { // a quoted here-doc delimiter + if (ch == HereDoc.Quote) { // closing quote => end of delimiter + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } else { + if (ch == '\\' && chNext == HereDoc.Quote) { // escaped quote + i++; + ch = chNext; + chNext = chNext2; + } + HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + } + } else { // an unquoted here-doc delimiter + if (isalnum(ch) || ch == '_' || ch == '-' || ch == '+' || ch == '!') { + HereDoc.Delimiter[HereDoc.DelimiterLength++] = ch; + HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0'; + } else if (ch == '\\') { + // skip escape prefix + } else { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + if (HereDoc.DelimiterLength >= HERE_DELIM_MAX - 1) { + styler.ColourTo(i - 1, state); + state = SCE_SH_ERROR; + goto restartLexer; + } + } + } else if (HereDoc.State == 2) { + // state == SCE_SH_HERE_Q + if (isMatch(styler, lengthDoc, i, HereDoc.Delimiter)) { + if (!HereDoc.Indent && isEOLChar(chPrev)) { + endHereDoc: + // standard HERE delimiter + i += HereDoc.DelimiterLength; + chPrev = styler.SafeGetCharAt(i - 1); + ch = styler.SafeGetCharAt(i); + if (isEOLChar(ch)) { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + HereDoc.State = 0; + goto restartLexer; + } + chNext = styler.SafeGetCharAt(i + 1); + } else if (HereDoc.Indent) { + // indented HERE delimiter + unsigned int bk = (i > 0)? i - 1: 0; + while (i > 0) { + ch = styler.SafeGetCharAt(bk--); + if (isEOLChar(ch)) { + goto endHereDoc; + } else if (!isspacechar(ch)) { + break; // got leading non-whitespace + } + } + } + } + } else if (state == SCE_SH_SCALAR) { // variable names + if (isEndVar(ch)) { + if ((state == SCE_SH_SCALAR) + && i == (styler.GetStartSegment() + 1)) { + // Special variable: $(, $_ etc. + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + } else { + styler.ColourTo(i - 1, state); + state = SCE_SH_DEFAULT; + goto restartLexer; + } + } + } else if (state == SCE_SH_STRING + || state == SCE_SH_CHARACTER + || state == SCE_SH_BACKTICKS + || state == SCE_SH_PARAM + ) { + if (!Quote.Down && !isspacechar(ch)) { + Quote.Open(ch); + } else if (ch == '\\' && Quote.Up != '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } else if (ch == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + Quote.Rep--; + if (Quote.Rep <= 0) { + styler.ColourTo(i, state); + state = SCE_SH_DEFAULT; + ch = ' '; + } + if (Quote.Up == Quote.Down) { + Quote.Count++; + } + } + } else if (ch == Quote.Up) { + Quote.Count++; + } + } + } + if (state == SCE_SH_ERROR) { + break; + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); +} + +static bool IsCommentLine(int line, Accessor &styler) { + int pos = styler.LineStart(line); + int eol_pos = styler.LineStart(line + 1) - 1; + for (int i = pos; i < eol_pos; i++) { + char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} + +static void FoldBashDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + // Comment folding + if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) + { + if (!IsCommentLine(lineCurrent - 1, styler) + && IsCommentLine(lineCurrent + 1, styler)) + levelCurrent++; + else if (IsCommentLine(lineCurrent - 1, styler) + && !IsCommentLine(lineCurrent+1, styler)) + levelCurrent--; + } + if (style == SCE_SH_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const bashWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBash(SCLEX_BASH, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexBasic.cxx b/sdk/wxscintilla/src/scintilla/src/LexBasic.cxx new file mode 100644 index 0000000000..9a52186b94 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexBasic.cxx @@ -0,0 +1,373 @@ +// Scintilla source code edit control +/** @file LexBasic.cxx + ** Lexer for BlitzBasic and PureBasic. + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// This tries to be a unified Lexer/Folder for all the BlitzBasic/BlitzMax/PurBasic basics +// and derivatives. Once they diverge enough, might want to split it into multiple +// lexers for more code clearity. +// +// Mail me (elias users sf net) for any bugs. + +// Folding only works for simple things like functions or types. + +// You may want to have a look at my ctags lexer as well, if you additionally to coloring +// and folding need to extract things like label tags in your editor. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/* Bits: + * 1 - whitespace + * 2 - operator + * 4 - identifier + * 8 - decimal digit + * 16 - hex digit + * 32 - bin digit + */ +static int character_classification[128] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, + 60, 60, 28, 28, 28, 28, 28, 28, 28, 28, 2, 2, 2, 2, 2, 2, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 4, + 2, 20, 20, 20, 20, 20, 20, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 0 +}; + +static bool IsSpace(int c) { + return c < 128 && (character_classification[c] & 1); +} + +static bool IsOperator(int c) { + return c < 128 && (character_classification[c] & 2); +} + +static bool IsIdentifier(int c) { + return c < 128 && (character_classification[c] & 4); +} + +static bool IsDigit(int c) { + return c < 128 && (character_classification[c] & 8); +} + +static bool IsHexDigit(int c) { + return c < 128 && (character_classification[c] & 16); +} + +static bool IsBinDigit(int c) { + return c < 128 && (character_classification[c] & 32); +} + +static int LowerCase(int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + c - 'A'; + return c; +} + +static void ColouriseBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, char comment_char) { + bool wasfirst = true, isfirst = true; // true if first token in a line + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + + // Can't use sc.More() here else we miss the last character + for (; ; sc.Forward()) { + if (sc.state == SCE_B_IDENTIFIER) { + if (!IsIdentifier(sc.ch)) { + // Labels + if (wasfirst && sc.Match(':')) { + sc.ChangeState(SCE_B_LABEL); + sc.ForwardSetState(SCE_B_DEFAULT); + } else { + char s[100]; + int kstates[4] = { + SCE_B_KEYWORD, + SCE_B_KEYWORD2, + SCE_B_KEYWORD3, + SCE_B_KEYWORD4, + }; + sc.GetCurrentLowered(s, sizeof(s)); + for (int i = 0; i < 4; i++) { + if (keywordlists[i]->InList(s)) { + sc.ChangeState(kstates[i]); + } + } + // Types, must set them as operator else they will be + // matched as number/constant + if (sc.Match('.') || sc.Match('$') || sc.Match('%') || + sc.Match('#')) { + sc.SetState(SCE_B_OPERATOR); + } else { + sc.SetState(SCE_B_DEFAULT); + } + } + } + } else if (sc.state == SCE_B_OPERATOR) { + if (!IsOperator(sc.ch) || sc.Match('#')) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_LABEL) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_CONSTANT) { + if (!IsIdentifier(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_NUMBER) { + if (!IsDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_HEXNUMBER) { + if (!IsHexDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_BINNUMBER) { + if (!IsBinDigit(sc.ch)) + sc.SetState(SCE_B_DEFAULT); + } else if (sc.state == SCE_B_STRING) { + if (sc.ch == '"') { + sc.ForwardSetState(SCE_B_DEFAULT); + } + if (sc.atLineEnd) { + sc.ChangeState(SCE_B_ERROR); + sc.SetState(SCE_B_DEFAULT); + } + } else if (sc.state == SCE_B_COMMENT || sc.state == SCE_B_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(SCE_B_DEFAULT); + } + } + + if (sc.atLineStart) + isfirst = true; + + if (sc.state == SCE_B_DEFAULT || sc.state == SCE_B_ERROR) { + if (isfirst && sc.Match('.')) { + sc.SetState(SCE_B_LABEL); + } else if (isfirst && sc.Match('#')) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (sc.Match(comment_char)) { + // Hack to make deprecated QBASIC '$Include show + // up in freebasic with SCE_B_PREPROCESSOR. + if (comment_char == '\'' && sc.Match(comment_char, '$')) + sc.SetState(SCE_B_PREPROCESSOR); + else + sc.SetState(SCE_B_COMMENT); + } else if (sc.Match('"')) { + sc.SetState(SCE_B_STRING); + } else if (IsDigit(sc.ch)) { + sc.SetState(SCE_B_NUMBER); + } else if (sc.Match('$')) { + sc.SetState(SCE_B_HEXNUMBER); + } else if (sc.Match('%')) { + sc.SetState(SCE_B_BINNUMBER); + } else if (sc.Match('#')) { + sc.SetState(SCE_B_CONSTANT); + } else if (IsOperator(sc.ch)) { + sc.SetState(SCE_B_OPERATOR); + } else if (IsIdentifier(sc.ch)) { + wasfirst = isfirst; + sc.SetState(SCE_B_IDENTIFIER); + } else if (!IsSpace(sc.ch)) { + sc.SetState(SCE_B_ERROR); + } + } + + if (!IsSpace(sc.ch)) + isfirst = false; + + if (!sc.More()) + break; + } + sc.Complete(); +} + +static int CheckBlitzFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "type")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end type")) { + return -1; + } + return 0; +} + +static int CheckPureFoldPoint(char const *token, int &level) { + if (!strcmp(token, "procedure") || + !strcmp(token, "enumeration") || + !strcmp(token, "interface") || + !strcmp(token, "structure")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "endprocedure") || + !strcmp(token, "endenumeration") || + !strcmp(token, "endinterface") || + !strcmp(token, "endstructure")) { + return -1; + } + return 0; +} + +static int CheckFreeFoldPoint(char const *token, int &level) { + if (!strcmp(token, "function") || + !strcmp(token, "sub") || + !strcmp(token, "type")) { + level |= SC_FOLDLEVELHEADERFLAG; + return 1; + } + if (!strcmp(token, "end function") || + !strcmp(token, "end sub") || + !strcmp(token, "end type")) { + return -1; + } + return 0; +} + +static void FoldBasicDoc(unsigned int startPos, int length, + Accessor &styler, int (*CheckFoldPoint)(char const *, int &)) { + int line = styler.GetLine(startPos); + int level = styler.LevelAt(line); + int go = 0, done = 0; + int endPos = startPos + length; + char word[256]; + int wordlen = 0; + int i; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + // Scan for tokens at the start of the line (they may include + // whitespace, for tokens like "End Function" + for (i = startPos; i < endPos; i++) { + int c = styler.SafeGetCharAt(i); + if (!done && !go) { + if (wordlen) { // are we scanning a token already? + word[wordlen] = static_cast(LowerCase(c)); + if (!IsIdentifier(c)) { // done with token + word[wordlen] = '\0'; + go = CheckFoldPoint(word, level); + if (!go) { + // Treat any whitespace as single blank, for + // things like "End Function". + if (IsSpace(c) && IsIdentifier(word[wordlen - 1])) { + word[wordlen] = ' '; + if (wordlen < 255) + wordlen++; + } + else // done with this line + done = 1; + } + } else if (wordlen < 255) { + wordlen++; + } + } else { // start scanning at first non-whitespace character + if (!IsSpace(c)) { + if (IsIdentifier(c)) { + word[0] = static_cast(LowerCase(c)); + wordlen = 1; + } else // done with this line + done = 1; + } + } + } + if (c == '\n') { // line end + if (!done && wordlen == 0 && foldCompact) // line was only space + level |= SC_FOLDLEVELWHITEFLAG; + if (level != styler.LevelAt(line)) + styler.SetLevel(line, level); + level += go; + line++; + // reset state + wordlen = 0; + level &= ~SC_FOLDLEVELHEADERFLAG; + level &= ~SC_FOLDLEVELWHITEFLAG; + go = 0; + done = 0; + } + } +} + +static void ColouriseBlitzBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';'); +} + +static void ColourisePureBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, ';'); +} + +static void ColouriseFreeBasicDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + ColouriseBasicDoc(startPos, length, initStyle, keywordlists, styler, '\''); +} + +static void FoldBlitzBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckBlitzFoldPoint); +} + +static void FoldPureBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckPureFoldPoint); +} + +static void FoldFreeBasicDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + FoldBasicDoc(startPos, length, styler, CheckFreeFoldPoint); +} + +static const char * const blitzbasicWordListDesc[] = { + "BlitzBasic Keywords", + "user1", + "user2", + "user3", + 0 +}; + +static const char * const purebasicWordListDesc[] = { + "PureBasic Keywords", + "PureBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +static const char * const freebasicWordListDesc[] = { + "FreeBasic Keywords", + "FreeBasic PreProcessor Keywords", + "user defined 1", + "user defined 2", + 0 +}; + +LexerModule lmBlitzBasic(SCLEX_BLITZBASIC, ColouriseBlitzBasicDoc, "blitzbasic", + FoldBlitzBasicDoc, blitzbasicWordListDesc); + +LexerModule lmPureBasic(SCLEX_PUREBASIC, ColourisePureBasicDoc, "purebasic", + FoldPureBasicDoc, purebasicWordListDesc); + +LexerModule lmFreeBasic(SCLEX_FREEBASIC, ColouriseFreeBasicDoc, "freebasic", + FoldFreeBasicDoc, freebasicWordListDesc); + diff --git a/sdk/wxscintilla/src/scintilla/src/LexBullant.cxx b/sdk/wxscintilla/src/scintilla/src/LexBullant.cxx new file mode 100644 index 0000000000..b476ee5beb --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexBullant.cxx @@ -0,0 +1,228 @@ +// SciTE - Scintilla based Text Editor +// LexBullant.cxx - lexer for Bullant + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static int classifyWordBullant(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[100]; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { + s[i] = static_cast(tolower(styler[start + i])); + s[i + 1] = '\0'; + } + int lev= 0; + char chAttr = SCE_C_IDENTIFIER; + if (isdigit(s[0]) || (s[0] == '.')){ + chAttr = SCE_C_NUMBER; + } + else { + if (keywords.InList(s)) { + chAttr = SCE_C_WORD; + if (strcmp(s, "end") == 0) + lev = -1; + else if (strcmp(s, "method") == 0 || + strcmp(s, "case") == 0 || + strcmp(s, "class") == 0 || + strcmp(s, "debug") == 0 || + strcmp(s, "test") == 0 || + strcmp(s, "if") == 0 || + strcmp(s, "lock") == 0 || + strcmp(s, "transaction") == 0 || + strcmp(s, "trap") == 0 || + strcmp(s, "until") == 0 || + strcmp(s, "while") == 0) + lev = 1; + } + } + styler.ColourTo(end, chAttr); + return lev; +} + +static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + bool fold = styler.GetPropertyInt("fold") != 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + + int state = initStyle; + if (state == SCE_C_STRINGEOL) // Does not leak onto next line + state = SCE_C_DEFAULT; + char chPrev = ' '; + char chNext = styler[startPos]; + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + styler.StartSegment(startPos); + int endFoundThisLine = 0; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // End of line + endFoundThisLine = 0; + if (state == SCE_C_STRINGEOL) { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + levelPrev = levelCurrent; + } + visibleChars = 0; + +/* int indentBlock = GetLineIndentation(lineCurrent); + if (blockChange==1){ + lineCurrent++; + int pos=SetLineIndentation(lineCurrent, indentBlock + indentSize); + } else if (blockChange==-1) { + indentBlock -= indentSize; + if (indentBlock < 0) + indentBlock = 0; + SetLineIndentation(lineCurrent, indentBlock); + lineCurrent++; + } + blockChange=0; +*/ } + if (!isspace(ch)) + visibleChars++; + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + i += 1; + continue; + } + + if (state == SCE_C_DEFAULT) { + if (iswordstart(ch)) { + styler.ColourTo(i-1, state); + state = SCE_C_IDENTIFIER; + } else if (ch == '@' && chNext == 'o') { + if ((styler.SafeGetCharAt(i+2) =='f') && (styler.SafeGetCharAt(i+3) == 'f')) { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENT; + } + } else if (ch == '#') { + styler.ColourTo(i-1, state); + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + styler.ColourTo(i-1, state); + state = SCE_C_STRING; + } else if (ch == '\'') { + styler.ColourTo(i-1, state); + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i-1, state); + styler.ColourTo(i, SCE_C_OPERATOR); + } + } else if (state == SCE_C_IDENTIFIER) { + if (!iswordchar(ch)) { + int levelChange = classifyWordBullant(styler.GetStartSegment(), i - 1, keywords, styler); + state = SCE_C_DEFAULT; + chNext = styler.SafeGetCharAt(i + 1); + if (ch == '#') { + state = SCE_C_COMMENTLINE; + } else if (ch == '\"') { + state = SCE_C_STRING; + } else if (ch == '\'') { + state = SCE_C_CHARACTER; + } else if (isoperator(ch)) { + styler.ColourTo(i, SCE_C_OPERATOR); + } + if (endFoundThisLine == 0) + levelCurrent+=levelChange; + if (levelChange == -1) + endFoundThisLine=1; + } + } else if (state == SCE_C_COMMENT) { + if (ch == '@' && chNext == 'o') { + if (styler.SafeGetCharAt(i+2) == 'n') { + styler.ColourTo(i+2, state); + state = SCE_C_DEFAULT; + i+=2; + } + } + } else if (state == SCE_C_COMMENTLINE) { + if (ch == '\r' || ch == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, state); + state = SCE_C_DEFAULT; + } + } else if (state == SCE_C_STRING) { + if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\"') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } else if (chNext == '\r' || chNext == '\n') { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } + } else if (state == SCE_C_CHARACTER) { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) { + endFoundThisLine = 0; + styler.ColourTo(i-1, SCE_C_STRINGEOL); + state = SCE_C_STRINGEOL; + } else if (ch == '\\') { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } else if (ch == '\'') { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + } + } + chPrev = ch; + } + styler.ColourTo(lengthDoc - 1, state); + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + if (fold) { + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + //styler.SetLevel(lineCurrent, levelCurrent | flagsNext); + styler.SetLevel(lineCurrent, levelPrev | flagsNext); + + } +} + +static const char * const bullantWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, "bullant", 0, bullantWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCLW.cxx b/sdk/wxscintilla/src/scintilla/src/LexCLW.cxx new file mode 100644 index 0000000000..3416bf205a --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCLW.cxx @@ -0,0 +1,679 @@ +// Scintilla source code edit control +/** @file LexClw.cxx + ** Lexer for Clarion. + ** 2004/12/17 Updated Lexer + **/ +// Copyright 2003-2004 by Ron Schofield +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +// Is an end of line character +inline bool IsEOL(const int ch) { + + return(ch == '\n'); +} + +// Convert character to uppercase +static char CharacterUpper(char chChar) { + + if (chChar < 'a' || chChar > 'z') { + return(chChar); + } + else { + return(static_cast(chChar - 'a' + 'A')); + } +} + +// Convert string to uppercase +static void StringUpper(char *szString) { + + while (*szString) { + *szString = CharacterUpper(*szString); + szString++; + } +} + +// Is a label start character +inline bool IsALabelStart(const int iChar) { + + return(isalpha(iChar) || iChar == '_'); +} + +// Is a label character +inline bool IsALabelCharacter(const int iChar) { + + return(isalnum(iChar) || iChar == '_' || iChar == ':'); +} + +// Is the character is a ! and the the next character is not a ! +inline bool IsACommentStart(const int iChar) { + + return(iChar == '!'); +} + +// Is the character a Clarion hex character (ABCDEF) +inline bool IsAHexCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + if (strchr("ABCDEFabcdef", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + if (strchr("ABCDEF", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Is the character a Clarion base character (B=Binary, O=Octal, H=Hex) +inline bool IsANumericBaseCharacter(const int iChar, bool bCaseSensitive) { + + // Case insensitive. + if (!bCaseSensitive) { + // If character is a numeric base character + if (strchr("BOHboh", iChar) != NULL) { + return(true); + } + } + // Case sensitive + else { + // If character is a numeric base character + if (strchr("BOH", iChar) != NULL) { + return(true); + } + } + return(false); +} + +// Set the correct numeric constant state +inline bool SetNumericConstantState(StyleContext &scDoc) { + + int iPoints = 0; // Point counter + char cNumericString[512]; // Numeric string buffer + + // Buffer the current numberic string + scDoc.GetCurrent(cNumericString, sizeof(cNumericString)); + // Loop through the string until end of string (NULL termination) + for (int iIndex = 0; cNumericString[iIndex] != '\0'; iIndex++) { + // Depending on the character + switch (cNumericString[iIndex]) { + // Is a . (point) + case '.' : + // Increment point counter + iPoints++; + break; + default : + break; + } + } + // If points found (can be more than one for improper formatted number + if (iPoints > 0) { + return(true); + } + // Else no points found + else { + return(false); + } +} + +// Get the next word in uppercase from the current position (keyword lookahead) +inline bool GetNextWordUpper(Accessor &styler, unsigned int uiStartPos, int iLength, char *cWord) { + + unsigned int iIndex = 0; // Buffer Index + + // Loop through the remaining string from the current position + for (int iOffset = uiStartPos; iOffset < iLength; iOffset++) { + // Get the character from the buffer using the offset + char cCharacter = styler[iOffset]; + if (IsEOL(cCharacter)) { + break; + } + // If the character is alphabet character + if (isalpha(cCharacter)) { + // Add UPPERCASE character to the word buffer + cWord[iIndex++] = CharacterUpper(cCharacter); + } + } + // Add null termination + cWord[iIndex] = '\0'; + // If no word was found + if (iIndex == 0) { + // Return failure + return(false); + } + // Else word was found + else { + // Return success + return(true); + } +} + +// Clarion Language Colouring Procedure +static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler, bool bCaseSensitive) { + + int iParenthesesLevel = 0; // Parenthese Level + int iColumn1Label = false; // Label starts in Column 1 + + WordList &wlClarionKeywords = *wlKeywords[0]; // Clarion Keywords + WordList &wlCompilerDirectives = *wlKeywords[1]; // Compiler Directives + WordList &wlRuntimeExpressions = *wlKeywords[2]; // Runtime Expressions + WordList &wlBuiltInProcsFuncs = *wlKeywords[3]; // Builtin Procedures and Functions + WordList &wlStructsDataTypes = *wlKeywords[4]; // Structures and Data Types + WordList &wlAttributes = *wlKeywords[5]; // Procedure Attributes + WordList &wlStandardEquates = *wlKeywords[6]; // Standard Equates + WordList &wlLabelReservedWords = *wlKeywords[7]; // Clarion Reserved Keywords (Labels) + WordList &wlProcLabelReservedWords = *wlKeywords[8]; // Clarion Reserved Keywords (Procedure Labels) + + const char wlProcReservedKeywordList[] = + "PROCEDURE FUNCTION"; + WordList wlProcReservedKeywords; + wlProcReservedKeywords.Set(wlProcReservedKeywordList); + + const char wlCompilerKeywordList[] = + "COMPILE OMIT"; + WordList wlCompilerKeywords; + wlCompilerKeywords.Set(wlCompilerKeywordList); + + const char wlLegacyStatementsList[] = + "BOF EOF FUNCTION POINTER SHARE"; + WordList wlLegacyStatements; + wlLegacyStatements.Set(wlLegacyStatementsList); + + StyleContext scDoc(uiStartPos, iLength, iInitStyle, accStyler); + + // lex source code + for (; scDoc.More(); scDoc.Forward()) + { + // + // Determine if the current state should terminate. + // + + // Label State Handling + if (scDoc.state == SCE_CLW_LABEL) { + // If the character is not a valid label + if (!IsALabelCharacter(scDoc.ch)) { + // If the character is a . (dot syntax) + if (scDoc.ch == '.') { + // Turn off column 1 label flag as label now cannot be reserved work + iColumn1Label = false; + // Uncolour the . (dot) to default state, move forward one character, + // and change back to the label state. + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_LABEL); + } + // Else check label + else { + char cLabel[512]; // Label buffer + // Buffer the current label string + scDoc.GetCurrent(cLabel,sizeof(cLabel)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cLabel); + } + // Else if UPPERCASE label string is in the Clarion compiler keyword list + if (wlCompilerKeywords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if UPPERCASE label string is in the Clarion reserved keyword list + else if (wlLabelReservedWords.InList(cLabel) && iColumn1Label){ + // change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + // Else if UPPERCASE label string is + else if (wlProcLabelReservedWords.InList(cLabel) && iColumn1Label) { + char cWord[512]; // Word buffer + // Get the next word from the current position + if (GetNextWordUpper(accStyler,scDoc.currentPos,uiStartPos+iLength,cWord)) { + // If the next word is a procedure reserved word + if (wlProcReservedKeywords.InList(cWord)) { + // Change the label to error state + scDoc.ChangeState(SCE_CLW_ERROR); + } + } + } + // Else if label string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cLabel)) { + // change the state to compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Terminate the label state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + } + // Keyword State Handling + else if (scDoc.state == SCE_CLW_KEYWORD) { + // If character is : (colon) + if (scDoc.ch == ':') { + char cEquate[512]; // Equate buffer + // Move forward to include : (colon) in buffer + scDoc.Forward(); + // Buffer the equate string + scDoc.GetCurrent(cEquate,sizeof(cEquate)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cEquate); + } + // If statement string is in the equate list + if (wlStandardEquates.InList(cEquate)) { + // Change to equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + } + // If the character is not a valid label character + else if (!IsALabelCharacter(scDoc.ch)) { + char cStatement[512]; // Statement buffer + // Buffer the statement string + scDoc.GetCurrent(cStatement,sizeof(cStatement)); + // If case insensitive, convert string to UPPERCASE to match passed keywords. + if (!bCaseSensitive) { + StringUpper(cStatement); + } + // If statement string is in the Clarion keyword list + if (wlClarionKeywords.InList(cStatement)) { + // Change the statement string to the Clarion keyword state + scDoc.ChangeState(SCE_CLW_KEYWORD); + } + // Else if statement string is in the compiler directive keyword list + else if (wlCompilerDirectives.InList(cStatement)) { + // Change the statement string to the compiler directive state + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + } + // Else if statement string is in the runtime expressions keyword list + else if (wlRuntimeExpressions.InList(cStatement)) { + // Change the statement string to the runtime expressions state + scDoc.ChangeState(SCE_CLW_RUNTIME_EXPRESSIONS); + } + // Else if statement string is in the builtin procedures and functions keyword list + else if (wlBuiltInProcsFuncs.InList(cStatement)) { + // Change the statement string to the builtin procedures and functions state + scDoc.ChangeState(SCE_CLW_BUILTIN_PROCEDURES_FUNCTION); + } + // Else if statement string is in the tructures and data types keyword list + else if (wlStructsDataTypes.InList(cStatement)) { + // Change the statement string to the structures and data types state + scDoc.ChangeState(SCE_CLW_STRUCTURE_DATA_TYPE); + } + // Else if statement string is in the procedure attribute keyword list + else if (wlAttributes.InList(cStatement)) { + // Change the statement string to the procedure attribute state + scDoc.ChangeState(SCE_CLW_ATTRIBUTE); + } + // Else if statement string is in the standard equate keyword list + else if (wlStandardEquates.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_STANDARD_EQUATE); + } + // Else if statement string is in the deprecated or legacy keyword list + else if (wlLegacyStatements.InList(cStatement)) { + // Change the statement string to the standard equate state + scDoc.ChangeState(SCE_CLW_DEPRECATED); + } + // Else the statement string doesn't match any work list + else { + // Change the statement string to the default state + scDoc.ChangeState(SCE_CLW_DEFAULT); + } + // Terminate the keyword state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // String State Handling + else if (scDoc.state == SCE_CLW_STRING) { + // If the character is an ' (single quote) + if (scDoc.ch == '\'') { + // Set the state to default and move forward colouring + // the ' (single quote) as default state + // terminating the string state + scDoc.SetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + // If the next character is an ' (single quote) + if (scDoc.chNext == '\'') { + // Move forward one character and set to default state + // colouring the next ' (single quote) as default state + // terminating the string state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + scDoc.Forward(); + } + } + // Picture String State Handling + else if (scDoc.state == SCE_CLW_PICTURE_STRING) { + // If the character is an ( (open parenthese) + if (scDoc.ch == '(') { + // Increment the parenthese level + iParenthesesLevel++; + } + // Else if the character is a ) (close parenthese) + else if (scDoc.ch == ')') { + // If the parenthese level is set to zero + // parentheses matched + if (!iParenthesesLevel) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Else parenthese level is greater than zero + // still looking for matching parentheses + else { + // Decrement the parenthese level + iParenthesesLevel--; + } + } + } + // Standard Equate State Handling + else if (scDoc.state == SCE_CLW_STANDARD_EQUATE) { + if (!isalnum(scDoc.ch)) { + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + // Integer Constant State Handling + else if (scDoc.state == SCE_CLW_INTEGER_CONSTANT) { + // If the character is not a digit (0-9) + // or character is not a hexidecimal character (A-F) + // or character is not a . (point) + // or character is not a numberic base character (B,O,H) + if (!(isdigit(scDoc.ch) + || IsAHexCharacter(scDoc.ch, bCaseSensitive) + || scDoc.ch == '.' + || IsANumericBaseCharacter(scDoc.ch, bCaseSensitive))) { + // If the number was a real + if (SetNumericConstantState(scDoc)) { + // Colour the matched string to the real constant state + scDoc.ChangeState(SCE_CLW_REAL_CONSTANT); + } + // Else the number was an integer + else { + // Colour the matched string to an integer constant state + scDoc.ChangeState(SCE_CLW_INTEGER_CONSTANT); + } + // Terminate the integer constant state and set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + } + + // + // Determine if a new state should be entered. + // + + // Beginning of Line Handling + if (scDoc.atLineStart) { + // Reset the column 1 label flag + iColumn1Label = false; + // If column 1 character is a label start character + if (IsALabelStart(scDoc.ch)) { + // Label character is found in column 1 + // so set column 1 label flag and clear last column 1 label + iColumn1Label = true; + // Set the state to label + scDoc.SetState(SCE_CLW_LABEL); + } + // else if character is a space or tab + else if (IsASpace(scDoc.ch)){ + // Set to default state + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else if comment start (!) or is an * (asterisk) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '*' ) { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else the character is a ? (question mark) + else if (scDoc.ch == '?') { + // Change to the compiler directive state, move forward, + // colouring the ? (question mark), change back to default state. + scDoc.ChangeState(SCE_CLW_COMPILER_DIRECTIVE); + scDoc.Forward(); + scDoc.SetState(SCE_CLW_DEFAULT); + } + // else an invalid character in column 1 + else { + // Set to error state + scDoc.SetState(SCE_CLW_ERROR); + } + } + // End of Line Handling + else if (scDoc.atLineEnd) { + // Reset to the default state at the end of each line. + scDoc.SetState(SCE_CLW_DEFAULT); + } + // Default Handling + else { + // If in default state + if (scDoc.state == SCE_CLW_DEFAULT) { + // If is a letter could be a possible statement + if (isalpha(scDoc.ch)) { + // Set the state to Clarion Keyword and verify later + scDoc.SetState(SCE_CLW_KEYWORD); + } + // else is a number + else if (isdigit(scDoc.ch)) { + // Set the state to Integer Constant and verify later + scDoc.SetState(SCE_CLW_INTEGER_CONSTANT); + } + // else if the start of a comment or a | (line continuation) + else if (IsACommentStart(scDoc.ch) || scDoc.ch == '|') { + // then set the state to comment. + scDoc.SetState(SCE_CLW_COMMENT); + } + // else if the character is a ' (single quote) + else if (scDoc.ch == '\'') { + // If the character is also a ' (single quote) + // Embedded Apostrophe + if (scDoc.chNext == '\'') { + // Move forward colouring it as default state + scDoc.ForwardSetState(SCE_CLW_DEFAULT); + } + else { + // move to the next character and then set the state to comment. + scDoc.ForwardSetState(SCE_CLW_STRING); + } + } + // else the character is an @ (ampersand) + else if (scDoc.ch == '@') { + // Case insensitive. + if (!bCaseSensitive) { + // If character is a valid picture token character + if (strchr("DEKNPSTdeknpst", scDoc.chNext) != NULL) { + // Set to the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + // Case sensitive + else { + // If character is a valid picture token character + if (strchr("DEKNPST", scDoc.chNext) != NULL) { + // Set the picture string state + scDoc.SetState(SCE_CLW_PICTURE_STRING); + } + } + } + } + } + } + // lexing complete + scDoc.Complete(); +} + +// Clarion Language Case Sensitive Colouring Procedure +static void ColouriseClarionDocSensitive(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, true); +} + +// Clarion Language Case Insensitive Colouring Procedure +static void ColouriseClarionDocInsensitive(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *wlKeywords[], Accessor &accStyler) { + + ColouriseClarionDoc(uiStartPos, iLength, iInitStyle, wlKeywords, accStyler, false); +} + +// Fill Buffer + +static void FillBuffer(unsigned int uiStart, unsigned int uiEnd, Accessor &accStyler, char *szBuffer, unsigned int uiLength) { + + unsigned int uiPos = 0; + + while ((uiPos < uiEnd - uiStart + 1) && (uiPos < uiLength-1)) { + szBuffer[uiPos] = static_cast(toupper(accStyler[uiStart + uiPos])); + uiPos++; + } + szBuffer[uiPos] = '\0'; +} + +// Classify Clarion Fold Point + +static int ClassifyClarionFoldPoint(int iLevel, const char* szString) { + + if (!(isdigit(szString[0]) || (szString[0] == '.'))) { + if (strcmp(szString, "PROCEDURE") == 0) { + // iLevel = SC_FOLDLEVELBASE + 1; + } + else if (strcmp(szString, "MAP") == 0 || + strcmp(szString,"ACCEPT") == 0 || + strcmp(szString,"BEGIN") == 0 || + strcmp(szString,"CASE") == 0 || + strcmp(szString,"EXECUTE") == 0 || + strcmp(szString,"IF") == 0 || + strcmp(szString,"ITEMIZE") == 0 || + strcmp(szString,"INTERFACE") == 0 || + strcmp(szString,"JOIN") == 0 || + strcmp(szString,"LOOP") == 0 || + strcmp(szString,"MODULE") == 0 || + strcmp(szString,"RECORD") == 0) { + iLevel++; + } + else if (strcmp(szString, "APPLICATION") == 0 || + strcmp(szString, "CLASS") == 0 || + strcmp(szString, "DETAIL") == 0 || + strcmp(szString, "FILE") == 0 || + strcmp(szString, "FOOTER") == 0 || + strcmp(szString, "FORM") == 0 || + strcmp(szString, "GROUP") == 0 || + strcmp(szString, "HEADER") == 0 || + strcmp(szString, "INTERFACE") == 0 || + strcmp(szString, "MENU") == 0 || + strcmp(szString, "MENUBAR") == 0 || + strcmp(szString, "OLE") == 0 || + strcmp(szString, "OPTION") == 0 || + strcmp(szString, "QUEUE") == 0 || + strcmp(szString, "REPORT") == 0 || + strcmp(szString, "SHEET") == 0 || + strcmp(szString, "TAB") == 0 || + strcmp(szString, "TOOLBAR") == 0 || + strcmp(szString, "VIEW") == 0 || + strcmp(szString, "WINDOW") == 0) { + iLevel++; + } + else if (strcmp(szString, "END") == 0 || + strcmp(szString, "UNTIL") == 0 || + strcmp(szString, "WHILE") == 0) { + iLevel--; + } + } + return(iLevel); +} + +// Clarion Language Folding Procedure +static void FoldClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle, WordList *[], Accessor &accStyler) { + + unsigned int uiEndPos = uiStartPos + iLength; + int iLineCurrent = accStyler.GetLine(uiStartPos); + int iLevelPrev = accStyler.LevelAt(iLineCurrent) & SC_FOLDLEVELNUMBERMASK; + int iLevelCurrent = iLevelPrev; + char chNext = accStyler[uiStartPos]; + int iStyle = iInitStyle; + int iStyleNext = accStyler.StyleAt(uiStartPos); + int iVisibleChars = 0; + int iLastStart = 0; + + for (unsigned int uiPos = uiStartPos; uiPos < uiEndPos; uiPos++) { + + char chChar = chNext; + chNext = accStyler.SafeGetCharAt(uiPos + 1); + int iStylePrev = iStyle; + iStyle = iStyleNext; + iStyleNext = accStyler.StyleAt(uiPos + 1); + bool bEOL = (chChar == '\r' && chNext != '\n') || (chChar == '\n'); + + if (iStylePrev == SCE_CLW_DEFAULT) { + if (iStyle == SCE_CLW_KEYWORD || iStyle == SCE_CLW_STRUCTURE_DATA_TYPE) { + // Store last word start point. + iLastStart = uiPos; + } + } + + if (iStylePrev == SCE_CLW_KEYWORD || iStylePrev == SCE_CLW_STRUCTURE_DATA_TYPE) { + if(iswordchar(chChar) && !iswordchar(chNext)) { + char chBuffer[100]; + FillBuffer(iLastStart, uiPos, accStyler, chBuffer, sizeof(chBuffer)); + iLevelCurrent = ClassifyClarionFoldPoint(iLevelCurrent,chBuffer); + // if ((iLevelCurrent == SC_FOLDLEVELBASE + 1) && iLineCurrent > 1) { + // accStyler.SetLevel(iLineCurrent-1,SC_FOLDLEVELBASE); + // iLevelPrev = SC_FOLDLEVELBASE; + // } + } + } + + if (bEOL) { + int iLevel = iLevelPrev; + if ((iLevelCurrent > iLevelPrev) && (iVisibleChars > 0)) + iLevel |= SC_FOLDLEVELHEADERFLAG; + if (iLevel != accStyler.LevelAt(iLineCurrent)) { + accStyler.SetLevel(iLineCurrent,iLevel); + } + iLineCurrent++; + iLevelPrev = iLevelCurrent; + iVisibleChars = 0; + } + + if (!isspacechar(chChar)) + iVisibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags + // as they will be filled in later. + int iFlagsNext = accStyler.LevelAt(iLineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + accStyler.SetLevel(iLineCurrent, iLevelPrev | iFlagsNext); +} + +// Word List Descriptions +static const char * const rgWordListDescriptions[] = { + "Clarion Keywords", + "Compiler Directives", + "Built-in Procedures and Functions", + "Runtime Expressions", + "Structure and Data Types", + "Attributes", + "Standard Equates", + "Reserved Words (Labels)", + "Reserved Words (Procedure Labels)", + 0, +}; + +// Case Sensitive Clarion Language Lexer +LexerModule lmClw(SCLEX_CLW, ColouriseClarionDocSensitive, "clarion", FoldClarionDoc, rgWordListDescriptions); + +// Case Insensitive Clarion Language Lexer +LexerModule lmClwNoCase(SCLEX_CLWNOCASE, ColouriseClarionDocInsensitive, "clarionnocase", FoldClarionDoc, rgWordListDescriptions); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCPP.cxx b/sdk/wxscintilla/src/scintilla/src/LexCPP.cxx new file mode 100644 index 0000000000..9ade129737 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCPP.cxx @@ -0,0 +1,450 @@ +// Scintilla source code edit control +/** @file LexCPP.cxx + ** Lexer for C++, C, Java, and JavaScript. + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" +#include "CharacterSet.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static bool IsSpaceEquiv(int state) { + return (state <= SCE_C_COMMENTDOC) || + // including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE + (state == SCE_C_COMMENTLINEDOC) || (state == SCE_C_COMMENTDOCKEYWORD) || + (state == SCE_C_COMMENTDOCKEYWORDERROR); +} + +static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler, bool caseSensitive) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0; + + CharacterSet setOKBeforeRE(CharacterSet::setNone, "(=,"); + + CharacterSet setDoxygen(CharacterSet::setLower, "$@\\&<>#{}[]"); + + CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "._", 0x80, true); + if (styler.GetPropertyInt("lexer.cpp.allow.dollars", 1) != 0) { + setWordStart.Add('$'); + setWord.Add('$'); + } + + int chPrevNonWhite = ' '; + int visibleChars = 0; + bool lastWordWasUUID = false; + int styleBeforeDCKeyword = SCE_C_DEFAULT; + bool continuationLine = false; + + if (initStyle == SCE_C_PREPROCESSOR) { + // Set continuationLine if last character of previous line is '\' + int lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) { + int chBack = styler.SafeGetCharAt(startPos-1, 0); + int chBack2 = styler.SafeGetCharAt(startPos-2, 0); + int lineEndChar = '!'; + if (chBack2 == '\r' && chBack == '\n') { + lineEndChar = styler.SafeGetCharAt(startPos-3, 0); + } else if (chBack == '\n' || chBack == '\r') { + lineEndChar = chBack2; + } + continuationLine = lineEndChar == '\\'; + } + } + + // look back to set chPrevNonWhite properly for better regex colouring + if (startPos > 0) { + int back = startPos; + while (--back && IsSpaceEquiv(styler.StyleAt(back))) + ; + if (styler.StyleAt(back) == SCE_C_OPERATOR) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + if (sc.state == SCE_C_STRING) { + // Prevent SCE_C_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state upto this position. + sc.SetState(SCE_C_STRING); + } + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + lastWordWasUUID = false; + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continuationLine = true; + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_C_OPERATOR: + sc.SetState(SCE_C_DEFAULT); + break; + case SCE_C_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_IDENTIFIER: + if (!setWord.Contains(sc.ch) || (sc.ch == '.')) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + lastWordWasUUID = strcmp(s, "uuid") == 0; + sc.ChangeState(SCE_C_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_C_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_C_GLOBALCLASS); + } + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_PREPROCESSOR: + if (sc.atLineStart && !continuationLine) { + sc.SetState(SCE_C_DEFAULT); + } else if (stylingWithinPreprocessor) { + if (IsASpace(sc.ch)) { + sc.SetState(SCE_C_DEFAULT); + } + } else { + if (sc.Match('/', '*') || sc.Match('/', '/')) { + sc.SetState(SCE_C_DEFAULT); + } + } + break; + case SCE_C_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } + } + break; + case SCE_C_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_C_COMMENTLINEDOC; + sc.SetState(SCE_C_COMMENTDOCKEYWORD); + } + } + break; + case SCE_C_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_C_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_C_DEFAULT); + } else if (!setDoxygen.Contains(sc.ch)) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) { + sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_C_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_C_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_C_DEFAULT); + } + break; + case SCE_C_REGEX: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '/') { + sc.Forward(); + while ((sc.ch < 0x80) && islower(sc.ch)) + sc.Forward(); // gobble regex flags + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '\\') { + // Gobble up the quoted character + if (sc.chNext == '\\' || sc.chNext == '/') { + sc.Forward(); + } + } + break; + case SCE_C_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_C_DEFAULT); + } + break; + case SCE_C_VERBATIM: + if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_C_DEFAULT); + } + } + break; + case SCE_C_UUID: + if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ')') { + sc.SetState(SCE_C_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_C_DEFAULT) { + if (sc.Match('@', '\"')) { + sc.SetState(SCE_C_VERBATIM); + sc.Forward(); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_NUMBER); + } + } else if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) { + if (lastWordWasUUID) { + sc.SetState(SCE_C_UUID); + lastWordWasUUID = false; + } else { + sc.SetState(SCE_C_IDENTIFIER); + } + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTDOC); + } else { + sc.SetState(SCE_C_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_C_COMMENTLINEDOC); + else + sc.SetState(SCE_C_COMMENTLINE); + } else if (sc.ch == '/' && setOKBeforeRE.Contains(chPrevNonWhite)) { + sc.SetState(SCE_C_REGEX); // JavaScript's RegEx + } else if (sc.ch == '\"') { + sc.SetState(SCE_C_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_C_CHARACTER); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_C_PREPROCESSOR); + // Skip whitespace between # and preprocessor word + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_C_OPERATOR); + } + } + + if (!IsASpace(sc.ch) && !IsSpaceEquiv(sc.state)) { + chPrevNonWhite = sc.ch; + visibleChars++; + } + continuationLine = false; + } + sc.Complete(); +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_C_COMMENT || + style == SCE_C_COMMENTDOC || + style == SCE_C_COMMENTDOCKEYWORD || + style == SCE_C_COMMENTDOCKEYWORDERROR; +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +static void FoldCppDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev) && (stylePrev != SCE_C_COMMENTLINEDOC)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && (styleNext != SCE_C_COMMENTLINEDOC) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (foldComment && (style == SCE_C_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelNext++; + } else if (chNext2 == '}') { + levelNext--; + } + } + } + if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { + if (ch == '#') { + unsigned int j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelNext++; + } else if (styler.Match(j, "end")) { + levelNext--; + } + } + } + if (style == SCE_C_OPERATOR) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL) { + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static const char * const cppWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Unused", + "Global classes and typedefs", + 0, + }; + +static void ColouriseCppDocSensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, true); +} + +static void ColouriseCppDocInsensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, false); +} + +LexerModule lmCPP(SCLEX_CPP, ColouriseCppDocSensitive, "cpp", FoldCppDoc, cppWordLists); +LexerModule lmCPPNoCase(SCLEX_CPPNOCASE, ColouriseCppDocInsensitive, "cppnocase", FoldCppDoc, cppWordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCSS.cxx b/sdk/wxscintilla/src/scintilla/src/LexCSS.cxx new file mode 100644 index 0000000000..b60408bd19 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCSS.cxx @@ -0,0 +1,307 @@ +// Scintilla source code edit control +/** @file LexCSS.cxx + ** Lexer for Cascading Style Sheets + ** Written by Jakub Vrána + ** Improved by Philippe Lhoste (CSS2) + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + + +static inline bool IsAWordChar(const unsigned int ch) { + return (isalnum(ch) || ch == '-' || ch == '_' || ch >= 161); // _ is not in fact correct CSS word-character +} + +inline bool IsCssOperator(const char ch) { + if (!isalnum(ch) && + (ch == '{' || ch == '}' || ch == ':' || ch == ',' || ch == ';' || + ch == '.' || ch == '#' || ch == '!' || ch == '@' || + /* CSS2 */ + ch == '*' || ch == '>' || ch == '+' || ch == '=' || ch == '~' || ch == '|' || + ch == '[' || ch == ']' || ch == '(' || ch == ')')) { + return true; + } + return false; +} + +static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { + WordList &keywords = *keywordlists[0]; + WordList &pseudoClasses = *keywordlists[1]; + WordList &keywords2 = *keywordlists[2]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lastState = -1; // before operator + int lastStateC = -1; // before comment + int op = ' '; // last operator + + for (; sc.More(); sc.Forward()) { + if (sc.state == SCE_CSS_COMMENT && sc.Match('*', '/')) { + if (lastStateC == -1) { + // backtrack to get last state: + // comments are like whitespace, so we must return to the previous state + unsigned int i = startPos; + for (; i > 0; i--) { + if ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) { + if (lastStateC == SCE_CSS_OPERATOR) { + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + if (i == 0) + lastState = SCE_CSS_DEFAULT; + } + break; + } + } + if (i == 0) + lastStateC = SCE_CSS_DEFAULT; + } + sc.Forward(); + sc.ForwardSetState(lastStateC); + } + + if (sc.state == SCE_CSS_COMMENT) + continue; + + if (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) { + if (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\"' : '\'')) + continue; + unsigned int i = sc.currentPos; + while (i && styler[i-1] == '\\') + i--; + if ((sc.currentPos - i) % 2 == 1) + continue; + sc.ForwardSetState(SCE_CSS_VALUE); + } + + if (sc.state == SCE_CSS_OPERATOR) { + if (op == ' ') { + unsigned int i = startPos; + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + } + switch (op) { + case '@': + if (lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_DIRECTIVE); + break; + case '*': + if (lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + break; + case '>': + case '+': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_CLASS + || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_DEFAULT); + break; + case '[': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ATTRIBUTE); + break; + case ']': + if (lastState == SCE_CSS_ATTRIBUTE) + sc.SetState(SCE_CSS_TAG); + break; + case '{': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '}': + if (lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT || + lastState == SCE_CSS_IDENTIFIER || lastState == SCE_CSS_IDENTIFIER2) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ':': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_PSEUDOCLASS); + else if (lastState == SCE_CSS_IDENTIFIER || lastState == SCE_CSS_IDENTIFIER2 || lastState == SCE_CSS_UNKNOWN_IDENTIFIER) + sc.SetState(SCE_CSS_VALUE); + break; + case '.': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_CLASS); + break; + case '#': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || + lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + sc.SetState(SCE_CSS_ID); + break; + case ',': + if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ';': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '!': + if (lastState == SCE_CSS_VALUE) + sc.SetState(SCE_CSS_IMPORTANT); + break; + } + } + + if (IsAWordChar(sc.ch)) { + if (sc.state == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + continue; + } + + if (IsAWordChar(sc.chPrev) && ( + sc.state == SCE_CSS_IDENTIFIER || sc.state == SCE_CSS_IDENTIFIER2 + || sc.state == SCE_CSS_UNKNOWN_IDENTIFIER + || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS + || sc.state == SCE_CSS_IMPORTANT + )) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + char *s2 = s; + while (*s2 && !IsAWordChar(*s2)) + s2++; + switch (sc.state) { + case SCE_CSS_IDENTIFIER: + if (!keywords.InList(s2)) { + if (keywords2.InList(s2)) { + sc.ChangeState(SCE_CSS_IDENTIFIER2); + } else { + sc.ChangeState(SCE_CSS_UNKNOWN_IDENTIFIER); + } + } + break; + case SCE_CSS_UNKNOWN_IDENTIFIER: + if (keywords.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER); + else if (keywords2.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER2); + break; + case SCE_CSS_PSEUDOCLASS: + if (!pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_UNKNOWN_PSEUDOCLASS); + break; + case SCE_CSS_UNKNOWN_PSEUDOCLASS: + if (pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_PSEUDOCLASS); + break; + case SCE_CSS_IMPORTANT: + if (strcmp(s2, "important") != 0) + sc.ChangeState(SCE_CSS_VALUE); + break; + } + } + + if (sc.ch != '.' && sc.ch != ':' && sc.ch != '#' && (sc.state == SCE_CSS_CLASS || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS || sc.state == SCE_CSS_ID)) + sc.SetState(SCE_CSS_TAG); + + if (sc.Match('/', '*')) { + lastStateC = sc.state; + sc.SetState(SCE_CSS_COMMENT); + sc.Forward(); + } else if (sc.state == SCE_CSS_VALUE && (sc.ch == '\"' || sc.ch == '\'')) { + sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING)); + } else if (IsCssOperator(static_cast(sc.ch)) + && (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']') + && (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!') + && (sc.state != SCE_CSS_DIRECTIVE || sc.ch == ';' || sc.ch == '{') + ) { + if (sc.state != SCE_CSS_OPERATOR) + lastState = sc.state; + sc.SetState(SCE_CSS_OPERATOR); + op = sc.ch; + } + } + + sc.Complete(); +} + +static void FoldCSSDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + bool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styler.StyleAt(i); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment) { + if (!inComment && (style == SCE_CSS_COMMENT)) + levelCurrent++; + else if (inComment && (style != SCE_CSS_COMMENT)) + levelCurrent--; + inComment = (style == SCE_CSS_COMMENT); + } + if (style == SCE_CSS_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const cssWordListDesc[] = { + "CSS1 Keywords", + "Pseudo classes", + "CSS2 Keywords", + 0 +}; + +LexerModule lmCss(SCLEX_CSS, ColouriseCssDoc, "css", FoldCSSDoc, cssWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCaml.cxx b/sdk/wxscintilla/src/scintilla/src/LexCaml.cxx new file mode 100644 index 0000000000..845ac657e1 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCaml.cxx @@ -0,0 +1,403 @@ +// Scintilla source code edit control +/** @file LexCaml.cxx + ** Lexer for Objective Caml. + **/ +// Copyright 2005 by Robert Roessler +// The License.txt file describes the conditions under which this software may be distributed. +/* Release History + 20050204 Initial release. + 20050205 Quick compiler standards/"cleanliness" adjustment. + 20050206 Added cast for IsLeadByte(). + 20050209 Changes to "external" build support. + 20050306 Fix for 1st-char-in-doc "corner" case. + 20050502 Fix for [harmless] one-past-the-end coloring. + 20050515 Refined numeric token recognition logic. + 20051125 Added 2nd "optional" keywords class. + 20051129 Support "magic" (read-only) comments for RCaml. + 20051204 Swtich to using StyleContext infrastructure. +*/ + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +// Since the Microsoft __iscsym[f] funcs are not ANSI... +inline int iscaml(int c) {return isalnum(c) || c == '_';} +inline int iscamlf(int c) {return isalpha(c) || c == '_';} +inline int iscamld(int c) {return isdigit(c) || c == '_';} + +static const int baseT[24] = { + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* A - L */ + 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */ +}; + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +#ifdef BUILD_AS_EXTERNAL_LEXER +/* + (actually seems to work!) +*/ +#include "WindowAccessor.h" +#include "ExternalLexer.h" + +#if PLAT_WIN +#include +#endif + +static void ColouriseCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void FoldCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void InternalLexOrFold(int lexOrFold, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props); + +static const char* LexerName = "caml"; + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) { + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer,format,pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) { +} +#endif + +bool Platform::IsDBCSLeadByte(int codePage, char ch) { + return ::IsDBCSLeadByteEx(codePage, ch) != 0; +} + +long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, lParam); +} + +long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, + reinterpret_cast(lParam)); +} + +void EXT_LEXER_DECL Fold(unsigned int lexer, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Fold + InternalLexOrFold(1, startPos, length, initStyle, words, window, props); + +} + +int EXT_LEXER_DECL GetLexerCount() +{ + return 1; // just us [Objective] Caml lexers here! +} + +void EXT_LEXER_DECL GetLexerName(unsigned int Index, char *name, int buflength) +{ + // below useless evaluation(s) to supress "not used" warnings + Index; + // return as much of our lexer name as will fit (what's up with Index?) + if (buflength > 0) { + buflength--; + int n = strlen(LexerName); + if (n > buflength) + n = buflength; + memcpy(name, LexerName, n), name[n] = '\0'; + } +} + +void EXT_LEXER_DECL Lex(unsigned int lexer, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Lex + InternalLexOrFold(0, startPos, length, initStyle, words, window, props); +} + +static void InternalLexOrFold(int foldOrLex, unsigned int startPos, int length, + int initStyle, char *words[], WindowID window, char *props) +{ + // create and initialize a WindowAccessor (including contained PropSet) + PropSet ps; + ps.SetMultiple(props); + WindowAccessor wa(window, ps); + // create and initialize WordList(s) + int nWL = 0; + for (; words[nWL]; nWL++) ; // count # of WordList PTRs needed + WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs + int i = 0; + for (; i < nWL; i++) { + wl[i] = new WordList(); // (works or THROWS bad_alloc EXCEPTION) + wl[i]->Set(words[i]); + } + wl[i] = 0; + // call our "internal" folder/lexer (... then do Flush!) + if (foldOrLex) + FoldCamlDoc(startPos, length, initStyle, wl, wa); + else + ColouriseCamlDoc(startPos, length, initStyle, wl, wa); + wa.Flush(); + // clean up before leaving + for (i = nWL - 1; i >= 0; i--) + delete wl[i]; + delete [] wl; +} + +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ + +void ColouriseCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + // initialize styler + StyleContext sc(startPos, length, initStyle, styler); + // set up [initial] state info (terminating states that shouldn't "bleed") + int nesting = 0; + if (sc.state < SCE_CAML_STRING) + sc.state = SCE_CAML_DEFAULT; + if (sc.state >= SCE_CAML_COMMENT) + nesting = (sc.state & 0x0f) - SCE_CAML_COMMENT; + + int chBase = 0, chToken = 0, chLit = 0; + WordList& keywords = *keywordlists[0]; + WordList& keywords2 = *keywordlists[1]; + WordList& keywords3 = *keywordlists[2]; + const int useMagic = styler.GetPropertyInt("lexer.caml.magic", 0); + + // foreach char in range... + while (sc.More()) { + // set up [per-char] state info + int state2 = -1; // (ASSUME no state change) + int chColor = sc.currentPos - 1;// (ASSUME standard coloring range) + bool advance = true; // (ASSUME scanner "eats" 1 char) + + // step state machine + switch (sc.state & 0x0f) { + case SCE_CAML_DEFAULT: + chToken = sc.currentPos; // save [possible] token start (JIC) + // it's wide open; what do we have? + if (iscamlf(sc.ch)) + state2 = SCE_CAML_IDENTIFIER; + else if (sc.Match('`') && iscamlf(sc.chNext)) + state2 = SCE_CAML_TAGNAME; + else if (sc.Match('#') && isdigit(sc.chNext)) + state2 = SCE_CAML_LINENUM; + else if (isdigit(sc.ch)) { + state2 = SCE_CAML_NUMBER, chBase = 10; + if (sc.Match('0') && strchr("bBoOxX", sc.chNext)) + chBase = baseT[tolower(sc.chNext) - 'a'], sc.Forward(); + } else if (sc.Match('\'')) /* (char literal?) */ + state2 = SCE_CAML_CHAR, chLit = 0; + else if (sc.Match('\"')) + state2 = SCE_CAML_STRING; + else if (sc.Match('(', '*')) + state2 = SCE_CAML_COMMENT, + sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment) + sc.Forward(); + else if (strchr("!?~" /* Caml "prefix-symbol" */ + "=<>@^|&+-*/$%" /* Caml "infix-symbol" */ + "()[]{};,:.#", sc.ch)) /* Caml "bracket" or ;,:.# */ + state2 = SCE_CAML_OPERATOR; + break; + + case SCE_CAML_IDENTIFIER: + // [try to] interpret as [additional] identifier char + if (!(iscaml(sc.ch) || sc.Match('\''))) { + const int n = sc.currentPos - chToken; + if (n < 24) { + // length is believable as keyword, [re-]construct token + char t[24]; + for (int i = -n; i < 0; i++) + t[n + i] = static_cast(sc.GetRelative(i)); + t[n] = '\0'; + // special-case "_" token as KEYWORD + if ((n == 1 && sc.chPrev == '_') || keywords.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD); + else if (keywords2.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD2); + else if (keywords3.InList(t)) + sc.ChangeState(SCE_CAML_KEYWORD3); + } + state2 = SCE_CAML_DEFAULT, advance = false; + } + break; + + case SCE_CAML_TAGNAME: + // [try to] interpret as [additional] tagname char + if (!(iscaml(sc.ch) || sc.Match('\''))) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + /*case SCE_CAML_KEYWORD: + case SCE_CAML_KEYWORD2: + case SCE_CAML_KEYWORD3: + // [try to] interpret as [additional] keyword char + if (!iscaml(ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break;*/ + + case SCE_CAML_LINENUM: + // [try to] interpret as [additional] linenum directive char + if (!isdigit(sc.ch)) + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_OPERATOR: { + // [try to] interpret as [additional] operator char + const char* o = 0; + if (iscaml(sc.ch) || isspace(sc.ch) /* ident or whitespace */ + || (o = strchr(")]};,\'\"`#", sc.ch),o)/* "termination" chars */ + || !strchr("!$%&*+-./:<=>?@^|~", sc.ch)/* "operator" chars */) { + // check for INCLUSIVE termination + if (o && strchr(")]};,", sc.ch)) { + if ((sc.Match(')') && sc.chPrev == '(') + || (sc.Match(']') && sc.chPrev == '[')) + // special-case "()" and "[]" tokens as KEYWORDS + sc.ChangeState(SCE_CAML_KEYWORD); + chColor++; + } else + advance = false; + state2 = SCE_CAML_DEFAULT; + } + break; + } + + case SCE_CAML_NUMBER: + // [try to] interpret as [additional] numeric literal char + // N.B. - improperly accepts "extra" digits in base 2 or 8 literals + if (iscamld(sc.ch) || IsADigit(sc.ch, chBase)) + break; + // how about an integer suffix? + if ((sc.Match('l') || sc.Match('L') || sc.Match('n')) + && (iscamld(sc.chPrev) || IsADigit(sc.chPrev, chBase))) + break; + // or a floating-point literal? + if (chBase == 10) { + // with a decimal point? + if (sc.Match('.') && iscamld(sc.chPrev)) + break; + // with an exponent? (I) + if ((sc.Match('e') || sc.Match('E')) + && (iscamld(sc.chPrev) || sc.chPrev == '.')) + break; + // with an exponent? (II) + if ((sc.Match('+') || sc.Match('-')) + && (sc.chPrev == 'e' || sc.chPrev == 'E')) + break; + } + // it looks like we have run out of number + state2 = SCE_CAML_DEFAULT, advance = false; + break; + + case SCE_CAML_CHAR: + // [try to] interpret as [additional] char literal char + if (sc.Match('\\')) { + chLit = 1; // (definitely IS a char literal) + if (sc.chPrev == '\\') + sc.ch = ' '; // (so termination test isn't fooled) + // should we be terminating - one way or another? + } else if ((sc.Match('\'') && sc.chPrev != '\\') || sc.atLineEnd) { + state2 = SCE_CAML_DEFAULT; + if (sc.Match('\'')) + chColor++; + else + sc.ChangeState(SCE_CAML_IDENTIFIER); + // ... maybe a char literal, maybe not + } else if (chLit < 1 && sc.currentPos - chToken >= 2) + sc.ChangeState(SCE_CAML_IDENTIFIER), advance = false; + break; + + case SCE_CAML_STRING: + // [try to] interpret as [additional] string literal char + if (sc.Match('\\') && sc.chPrev == '\\') + sc.ch = ' '; // (so '\\' doesn't cause us trouble) + else if (sc.Match('\"') && sc.chPrev != '\\') + state2 = SCE_CAML_DEFAULT, chColor++; + break; + + case SCE_CAML_COMMENT: + case SCE_CAML_COMMENT1: + case SCE_CAML_COMMENT2: + case SCE_CAML_COMMENT3: + // we're IN a comment - does this start a NESTED comment? + if (sc.Match('(', '*')) + state2 = sc.state + 1, chToken = sc.currentPos, + sc.ch = ' ', // (make SURE "(*)" isn't seen as a closed comment) + sc.Forward(), nesting++; + // [try to] interpret as [additional] comment char + else if (sc.Match(')') && sc.chPrev == '*') { + if (nesting) + state2 = (sc.state & 0x0f) - 1, chToken = 0, nesting--; + else + state2 = SCE_CAML_DEFAULT; + chColor++; + // enable "magic" (read-only) comment AS REQUIRED + } else if (useMagic && sc.currentPos - chToken == 4 + && sc.Match('c') && sc.chPrev == 'r' && sc.GetRelative(-2) == '@') + sc.state |= 0x10; // (switch to read-only comment style) + break; + } + + // handle state change and char coloring as required + if (state2 >= 0) + styler.ColourTo(chColor, sc.state), sc.ChangeState(state2); + // move to next char UNLESS re-scanning current char + if (advance) + sc.Forward(); + } + + // do any required terminal char coloring (JIC) + sc.Complete(); +} + +#ifdef BUILD_AS_EXTERNAL_LEXER +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ +void FoldCamlDoc( + unsigned int startPos, int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) +{ + // below useless evaluation(s) to supress "not used" warnings + startPos || length || initStyle || keywordlists[0] || styler.Length(); +} + +static const char * const camlWordListDesc[] = { + "Keywords", // primary Objective Caml keywords + "Keywords2", // "optional" keywords (typically from Pervasives) + "Keywords3", // "optional" keywords (typically typenames) + 0 +}; + +#ifndef BUILD_AS_EXTERNAL_LEXER +LexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, "caml", FoldCamlDoc, camlWordListDesc); +#endif /* BUILD_AS_EXTERNAL_LEXER */ diff --git a/sdk/wxscintilla/src/scintilla/src/LexCmake.cxx b/sdk/wxscintilla/src/scintilla/src/LexCmake.cxx new file mode 100644 index 0000000000..c29d739097 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCmake.cxx @@ -0,0 +1,456 @@ +// Scintilla source code edit control +/** @file LexCmake.cxx + ** Lexer for Cmake + **/ +// Copyright 2007 by Cristian Adam +// based on the NSIS lexer +// The License.txt file describes the conditions under which this software may be distributed. +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static bool isCmakeNumber(char ch) +{ + return(ch >= '0' && ch <= '9'); +} + +static bool isCmakeChar(char ch) +{ + return(ch == '.' ) || (ch == '_' ) || isCmakeNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool isCmakeLetter(char ch) +{ + return(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'); +} + +static bool CmakeNextLineHasElse(unsigned int start, unsigned int end, Accessor &styler) +{ + int nNextLine = -1; + for ( unsigned int i = start; i < end; i++ ) { + char cNext = styler.SafeGetCharAt( i ); + if ( cNext == '\n' ) { + nNextLine = i+1; + break; + } + } + + if ( nNextLine == -1 ) // We never foudn the next line... + return false; + + for ( unsigned int firstChar = nNextLine; firstChar < end; firstChar++ ) { + char cNext = styler.SafeGetCharAt( firstChar ); + if ( cNext == ' ' ) + continue; + if ( cNext == '\t' ) + continue; + if ( styler.Match(firstChar, "ELSE") || styler.Match(firstChar, "else")) + return true; + break; + } + + return false; +} + +static int calculateFoldCmake(unsigned int start, unsigned int end, int foldlevel, Accessor &styler, bool bElse) +{ + // If the word is too long, it is not what we are looking for + if ( end - start > 20 ) + return foldlevel; + + int newFoldlevel = foldlevel; + + char s[20]; // The key word we are looking for has atmost 13 characters + for (unsigned int i = 0; i < end - start + 1 && i < 19; i++) { + s[i] = static_cast( styler[ start + i ] ); + s[i + 1] = '\0'; + } + + if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0 + || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0 + || CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0 + || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0) + newFoldlevel--; + else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 ) + newFoldlevel++; + else if ( bElse && CompareCaseInsensitive(s, "ELSE") == 0 ) + newFoldlevel++; + + return newFoldlevel; +} + +static int classifyWordCmake(unsigned int start, unsigned int end, WordList *keywordLists[], Accessor &styler ) +{ + char word[100] = {0}; + char lowercaseWord[100] = {0}; + + WordList &Commands = *keywordLists[0]; + WordList &Parameters = *keywordLists[1]; + WordList &UserDefined = *keywordLists[2]; + + for (unsigned int i = 0; i < end - start + 1 && i < 99; i++) { + word[i] = static_cast( styler[ start + i ] ); + lowercaseWord[i] = static_cast(tolower(word[i])); + } + + // Check for special words... + if ( CompareCaseInsensitive(word, "MACRO") == 0 || CompareCaseInsensitive(word, "ENDMACRO") == 0 ) + return SCE_CMAKE_MACRODEF; + + if ( CompareCaseInsensitive(word, "IF") == 0 || CompareCaseInsensitive(word, "ENDIF") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "ELSEIF") == 0 || CompareCaseInsensitive(word, "ELSE") == 0 ) + return SCE_CMAKE_IFDEFINEDEF; + + if ( CompareCaseInsensitive(word, "WHILE") == 0 || CompareCaseInsensitive(word, "ENDWHILE") == 0) + return SCE_CMAKE_WHILEDEF; + + if ( CompareCaseInsensitive(word, "FOREACH") == 0 || CompareCaseInsensitive(word, "ENDFOREACH") == 0) + return SCE_CMAKE_FOREACHDEF; + + if ( Commands.InList(lowercaseWord) ) + return SCE_CMAKE_COMMANDS; + + if ( Parameters.InList(word) ) + return SCE_CMAKE_PARAMETERS; + + + if ( UserDefined.InList(word) ) + return SCE_CMAKE_USERDEFINED; + + if ( strlen(word) > 3 ) { + if ( word[1] == '{' && word[strlen(word)-1] == '}' ) + return SCE_CMAKE_VARIABLE; + } + + // To check for numbers + if ( isCmakeNumber( word[0] ) ) { + bool bHasSimpleCmakeNumber = true; + for (unsigned int j = 1; j < end - start + 1 && j < 99; j++) { + if ( !isCmakeNumber( word[j] ) ) { + bHasSimpleCmakeNumber = false; + break; + } + } + + if ( bHasSimpleCmakeNumber ) + return SCE_CMAKE_NUMBER; + } + + return SCE_CMAKE_DEFAULT; +} + +static void ColouriseCmakeDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CMAKE_DEFAULT; + if ( startPos > 0 ) + state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox + + styler.StartAt( startPos ); + styler.GetLine( startPos ); + + unsigned int nLengthDoc = startPos + length; + styler.StartSegment( startPos ); + + char cCurrChar; + bool bVarInString = false; + bool bClassicVarInString = false; + + unsigned int i; + for ( i = startPos; i < nLengthDoc; i++ ) { + cCurrChar = styler.SafeGetCharAt( i ); + char cNextChar = styler.SafeGetCharAt(i+1); + + switch (state) { + case SCE_CMAKE_DEFAULT: + if ( cCurrChar == '#' ) { // we have a comment line + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_COMMENT; + break; + } + if ( cCurrChar == '"' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '\'' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + if ( cCurrChar == '`' ) { + styler.ColourTo(i-1, state ); + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + break; + } + + // CMake Variable + if ( cCurrChar == '$' || isCmakeChar(cCurrChar)) { + styler.ColourTo(i-1,state); + state = SCE_CMAKE_VARIABLE; + + // If it is a number, we must check and set style here first... + if ( isCmakeNumber(cCurrChar) && (cNextChar == '\t' || cNextChar == ' ' || cNextChar == '\r' || cNextChar == '\n' ) ) + styler.ColourTo( i, SCE_CMAKE_NUMBER); + + break; + } + + break; + case SCE_CMAKE_COMMENT: + if ( cNextChar == '\n' || cNextChar == '\r' ) { + // Special case: + if ( cCurrChar == '\\' ) { + styler.ColourTo(i-2,state); + styler.ColourTo(i,SCE_CMAKE_DEFAULT); + } + else { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + case SCE_CMAKE_STRINGDQ: + case SCE_CMAKE_STRINGLQ: + case SCE_CMAKE_STRINGRQ: + + if ( styler.SafeGetCharAt(i-1) == '\\' && styler.SafeGetCharAt(i-2) == '$' ) + break; // Ignore the next character, even if it is a quote of some sort + + if ( cCurrChar == '"' && state == SCE_CMAKE_STRINGDQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '`' && state == SCE_CMAKE_STRINGLQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cCurrChar == '\'' && state == SCE_CMAKE_STRINGRQ ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + break; + } + + if ( cNextChar == '\r' || cNextChar == '\n' ) { + int nCurLine = styler.GetLine(i+1); + int nBack = i; + // We need to check if the previous line has a \ in it... + bool bNextLine = false; + + while ( nBack > 0 ) { + if ( styler.GetLine(nBack) != nCurLine ) + break; + + char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here + + if ( cTemp == '\\' ) { + bNextLine = true; + break; + } + if ( cTemp != '\r' && cTemp != '\n' && cTemp != '\t' && cTemp != ' ' ) + break; + + nBack--; + } + + if ( bNextLine ) { + styler.ColourTo(i+1,state); + } + if ( bNextLine == false ) { + styler.ColourTo(i,state); + state = SCE_CMAKE_DEFAULT; + } + } + break; + + case SCE_CMAKE_VARIABLE: + + // CMake Variable: + if ( cCurrChar == '$' ) + state = SCE_CMAKE_DEFAULT; + else if ( cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) ) + state = SCE_CMAKE_DEFAULT; + else if ( (isCmakeChar(cCurrChar) && !isCmakeChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) { + state = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler ); + styler.ColourTo( i, state); + state = SCE_CMAKE_DEFAULT; + } + else if ( !isCmakeChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) { + if ( classifyWordCmake( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_CMAKE_NUMBER ) + styler.ColourTo( i-1, SCE_CMAKE_NUMBER ); + + state = SCE_CMAKE_DEFAULT; + + if ( cCurrChar == '"' ) { + state = SCE_CMAKE_STRINGDQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '`' ) { + state = SCE_CMAKE_STRINGLQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '\'' ) { + state = SCE_CMAKE_STRINGRQ; + bVarInString = false; + bClassicVarInString = false; + } + else if ( cCurrChar == '#' ) { + state = SCE_CMAKE_COMMENT; + } + } + break; + } + + if ( state == SCE_CMAKE_COMMENT) { + styler.ColourTo(i,state); + } + else if ( state == SCE_CMAKE_STRINGDQ || state == SCE_CMAKE_STRINGLQ || state == SCE_CMAKE_STRINGRQ ) { + bool bIngoreNextDollarSign = false; + + if ( bVarInString && cCurrChar == '$' ) { + bVarInString = false; + bIngoreNextDollarSign = true; + } + else if ( bVarInString && cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '"' || cNextChar == '`' || cNextChar == '\'' ) ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bVarInString = false; + bIngoreNextDollarSign = false; + } + + else if ( bVarInString && !isCmakeChar(cNextChar) ) { + int nWordState = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler); + if ( nWordState == SCE_CMAKE_VARIABLE ) + styler.ColourTo( i, SCE_CMAKE_STRINGVAR); + bVarInString = false; + } + // Covers "${TEST}..." + else if ( bClassicVarInString && cNextChar == '}' ) { + styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR); + bClassicVarInString = false; + } + + // Start of var in string + if ( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' ) { + styler.ColourTo( i-1, state); + bClassicVarInString = true; + bVarInString = false; + } + else if ( !bIngoreNextDollarSign && cCurrChar == '$' ) { + styler.ColourTo( i-1, state); + bVarInString = true; + bClassicVarInString = false; + } + } + } + + // Colourise remaining document + styler.ColourTo(nLengthDoc-1,state); +} + +static void FoldCmakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if ( styler.GetPropertyInt("fold") == 0 ) + return; + + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) == 1; + + int lineCurrent = styler.GetLine(startPos); + unsigned int safeStartPos = styler.LineStart( lineCurrent ); + + bool bArg1 = true; + int nWordStart = -1; + + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + + for (unsigned int i = safeStartPos; i < startPos + length; i++) { + char chCurr = styler.SafeGetCharAt(i); + + if ( bArg1 ) { + if ( nWordStart == -1 && (isCmakeLetter(chCurr)) ) { + nWordStart = i; + } + else if ( isCmakeLetter(chCurr) == false && nWordStart > -1 ) { + int newLevel = calculateFoldCmake( nWordStart, i-1, levelNext, styler, foldAtElse); + + if ( newLevel == levelNext ) { + if ( foldAtElse ) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + } + else + levelNext = newLevel; + bArg1 = false; + } + } + + if ( chCurr == '\n' ) { + if ( bArg1 && foldAtElse) { + if ( CmakeNextLineHasElse(i, startPos + length, styler) ) + levelNext--; + } + + // If we are on a new line... + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext ) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); + + lineCurrent++; + levelCurrent = levelNext; + bArg1 = true; // New line, lets look at first argument again + nWordStart = -1; + } + } + + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + styler.SetLevel(lineCurrent, lev); +} + +static const char * const cmakeWordLists[] = { + "Commands", + "Parameters", + "UserDefined", + 0, + 0,}; + +LexerModule lmCmake(SCLEX_CMAKE, ColouriseCmakeDoc, "cmake", FoldCmakeDoc, cmakeWordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexConf.cxx b/sdk/wxscintilla/src/scintilla/src/LexConf.cxx new file mode 100644 index 0000000000..d39317409d --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexConf.cxx @@ -0,0 +1,188 @@ +// Scintilla source code edit control +/** @file LexConf.cxx + ** Lexer for Apache Configuration Files. + ** + ** First working version contributed by Ahmad Zawawi on October 28, 2000. + ** i created this lexer because i needed something pretty when dealing + ** when Apache Configuration files... + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_CONF_DEFAULT; + char chNext = styler[startPos]; + int lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length]; + int bufferCount = 0; + + // this assumes that we have 2 keyword list in conf.properties + WordList &directives = *keywordLists[0]; + WordList ¶ms = *keywordLists[1]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_CONF_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_CONF_DEFAULT); + break; + } else if( ch == '#' ) { + // signals the start of a comment... + state = SCE_CONF_COMMENT; + styler.ColourTo(i,SCE_CONF_COMMENT); + } else if( ch == '.' /*|| ch == '/'*/) { + // signals the start of a file... + state = SCE_CONF_EXTENSION; + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else if( ch == '"') { + state = SCE_CONF_STRING; + styler.ColourTo(i,SCE_CONF_STRING); + } else if( ispunct(ch) ) { + // signals an operator... + // no state jump necessary for this + // simple case... + styler.ColourTo(i,SCE_CONF_OPERATOR); + } else if( isalpha(ch) ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = static_cast(tolower(ch)); + state = SCE_CONF_IDENTIFIER; + } else if( isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + //styler.ColourTo(i,SCE_CONF_NUMBER); + state = SCE_CONF_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_CONF_DEFAULT); + } + break; + + case SCE_CONF_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_CONF_DEFAULT; + } else { + styler.ColourTo(i,SCE_CONF_COMMENT); + } + break; + + case SCE_CONF_EXTENSION: + // if we find a non-alphanumeric char, + // we simply go to default state + // else we're still dealing with an extension... + if( isalnum(ch) || (ch == '_') || + (ch == '-') || (ch == '$') || + (ch == '/') || (ch == '.') || (ch == '*') ) + { + styler.ColourTo(i,SCE_CONF_EXTENSION); + } else { + state = SCE_CONF_DEFAULT; + chNext = styler[i--]; + } + break; + + case SCE_CONF_STRING: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || (ch == '\n') || (ch == '\r') ) { + state = SCE_CONF_DEFAULT; + } + styler.ColourTo(i,SCE_CONF_STRING); + break; + + case SCE_CONF_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { + buffer[bufferCount++] = static_cast(tolower(ch)); + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, and highlight it if it is a keyword... + if(directives.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_DIRECTIVE ); + } else if(params.InList(buffer)) { + styler.ColourTo(i-1,SCE_CONF_PARAMETER ); + } else if(strchr(buffer,'/') || strchr(buffer,'.')) { + styler.ColourTo(i-1,SCE_CONF_EXTENSION); + } else { + styler.ColourTo(i-1,SCE_CONF_DEFAULT); + } + + // push back the faulty character + chNext = styler[i--]; + + } + break; + + case SCE_CONF_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( isdigit(ch) || ch == '.') { + buffer[bufferCount++] = ch; + } else { + state = SCE_CONF_DEFAULT; + buffer[bufferCount] = '\0'; + + // Colourize here... + if( strchr(buffer,'.') ) { + // it is an IP address... + styler.ColourTo(i-1,SCE_CONF_IP); + } else { + // normal number + styler.ColourTo(i-1,SCE_CONF_NUMBER); + } + + // push back a character + chNext = styler[i--]; + } + break; + + } + } + delete []buffer; +} + +static const char * const confWordListDesc[] = { + "Directives", + "Parameters", + 0 +}; + +LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf", 0, confWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCrontab.cxx b/sdk/wxscintilla/src/scintilla/src/LexCrontab.cxx new file mode 100644 index 0000000000..6f9ba149a1 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCrontab.cxx @@ -0,0 +1,222 @@ +// Scintilla source code edit control +/** @file LexCrontab.cxx + ** Lexer to use with extended crontab files used by a powerful + ** Windows scheduler/event monitor/automation manager nnCron. + ** (http://nemtsev.eserv.ru/) + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordList +*keywordLists[], Accessor &styler) +{ + int state = SCE_NNCRONTAB_DEFAULT; + char chNext = styler[startPos]; + int lengthDoc = startPos + length; + // create a buffer large enough to take the largest chunk... + char *buffer = new char[length]; + int bufferCount = 0; + // used when highliting environment variables inside quoted string: + bool insideString = false; + + // this assumes that we have 3 keyword list in conf.properties + WordList §ion = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &modifier = *keywordLists[2]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if (styler.IsLeadByte(ch)) { + chNext = styler.SafeGetCharAt(i + 2); + i++; + continue; + } + switch(state) { + case SCE_NNCRONTAB_DEFAULT: + if( ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ') { + // whitespace is simply ignored here... + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + break; + } else if( ch == '#' && styler.SafeGetCharAt(i+1) == '(') { + // signals the start of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' || + styler.SafeGetCharAt(i+1) == '\t')) { + // signals the start of an extended comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == '#' ) { + // signals the start of a plain comment... + state = SCE_NNCRONTAB_COMMENT; + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } else if( ch == ')' && styler.SafeGetCharAt(i+1) == '#') { + // signals the end of a task... + state = SCE_NNCRONTAB_TASK; + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } else if( ch == '"') { + state = SCE_NNCRONTAB_STRING; + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + } else if( ch == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '<' && styler.SafeGetCharAt(i+1) == '%') { + // signals environment variables + state = SCE_NNCRONTAB_ENVIRONMENT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + } else if( ch == '*' ) { + // signals an asterisk + // no state jump necessary for this simple case... + styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK); + } else if( isalpha(ch) || ch == '<' ) { + // signals the start of an identifier + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_IDENTIFIER; + } else if( isdigit(ch) ) { + // signals the start of a number + bufferCount = 0; + buffer[bufferCount++] = ch; + state = SCE_NNCRONTAB_NUMBER; + } else { + // style it the default style.. + styler.ColourTo(i,SCE_NNCRONTAB_DEFAULT); + } + break; + + case SCE_NNCRONTAB_COMMENT: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_COMMENT); + } + break; + + case SCE_NNCRONTAB_TASK: + // if we find a newline here, + // we simply go to default state + // else continue to work on it... + if( ch == '\n' || ch == '\r' ) { + state = SCE_NNCRONTAB_DEFAULT; + } else { + styler.ColourTo(i,SCE_NNCRONTAB_TASK); + } + break; + + case SCE_NNCRONTAB_STRING: + if( ch == '%' ) { + state = SCE_NNCRONTAB_ENVIRONMENT; + insideString = true; + styler.ColourTo(i-1,SCE_NNCRONTAB_STRING); + break; + } + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( (ch == '"' && styler.SafeGetCharAt(i-1)!='\\') || + (ch == '\n') || (ch == '\r') ) { + state = SCE_NNCRONTAB_DEFAULT; + } + styler.ColourTo(i,SCE_NNCRONTAB_STRING); + break; + + case SCE_NNCRONTAB_ENVIRONMENT: + // if we find the end of a string char, we simply go to default state + // else we're still dealing with an string... + if( ch == '%' && insideString ) { + state = SCE_NNCRONTAB_STRING; + insideString = false; + break; + } + if( (ch == '%' && styler.SafeGetCharAt(i-1)!='\\') + || (ch == '\n') || (ch == '\r') || (ch == '>') ) { + state = SCE_NNCRONTAB_DEFAULT; + styler.ColourTo(i,SCE_NNCRONTAB_ENVIRONMENT); + break; + } + styler.ColourTo(i+1,SCE_NNCRONTAB_ENVIRONMENT); + break; + + case SCE_NNCRONTAB_IDENTIFIER: + // stay in CONF_IDENTIFIER state until we find a non-alphanumeric + if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || + (ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') || + (ch == '@') ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + + // check if the buffer contains a keyword, + // and highlight it if it is a keyword... + if(section.InList(buffer)) { + styler.ColourTo(i,SCE_NNCRONTAB_SECTION ); + } else if(keyword.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_KEYWORD ); + } // else if(strchr(buffer,'/') || strchr(buffer,'.')) { + // styler.ColourTo(i-1,SCE_NNCRONTAB_EXTENSION); + // } + else if(modifier.InList(buffer)) { + styler.ColourTo(i-1,SCE_NNCRONTAB_MODIFIER ); + } else { + styler.ColourTo(i-1,SCE_NNCRONTAB_DEFAULT); + } + // push back the faulty character + chNext = styler[i--]; + } + break; + + case SCE_NNCRONTAB_NUMBER: + // stay in CONF_NUMBER state until we find a non-numeric + if( isdigit(ch) /* || ch == '.' */ ) { + buffer[bufferCount++] = ch; + } else { + state = SCE_NNCRONTAB_DEFAULT; + buffer[bufferCount] = '\0'; + // Colourize here... (normal number) + styler.ColourTo(i-1,SCE_NNCRONTAB_NUMBER); + // push back a character + chNext = styler[i--]; + } + break; + } + } + delete []buffer; +} + +static const char * const cronWordListDesc[] = { + "Section keywords and Forth words", + "nnCrontab keywords", + "Modifiers", + 0 +}; + +LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab", 0, cronWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexCsound.cxx b/sdk/wxscintilla/src/scintilla/src/LexCsound.cxx new file mode 100644 index 0000000000..fd9d2b401a --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexCsound.cxx @@ -0,0 +1,210 @@ +// Scintilla source code edit control +/** @file LexCsound.cxx + ** Lexer for Csound (Orchestra & Score) + ** Written by Georg Ritter - + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || + ch == '_' || ch == '?'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.' || + ch == '%' || ch == '@' || ch == '$' || ch == '?'); +} + +static inline bool IsCsoundOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '^' || + ch == '[' || ch == ']' || ch == '<' || ch == '&' || + ch == '>' || ch == ',' || ch == '|' || ch == '~' || + ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseCsoundDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &opcode = *keywordlists[0]; + WordList &headerStmt = *keywordlists[1]; + WordList &otherKeyword = *keywordlists[2]; + + // Do not leak onto next line + if (initStyle == SCE_CSOUND_STRINGEOL) + initStyle = SCE_CSOUND_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_CSOUND_OPERATOR) { + if (!IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + }else if (sc.state == SCE_CSOUND_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } else if (sc.state == SCE_CSOUND_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (opcode.InList(s)) { + sc.ChangeState(SCE_CSOUND_OPCODE); + } else if (headerStmt.InList(s)) { + sc.ChangeState(SCE_CSOUND_HEADERSTMT); + } else if (otherKeyword.InList(s)) { + sc.ChangeState(SCE_CSOUND_USERKEYWORD); + } else if (s[0] == 'p') { + sc.ChangeState(SCE_CSOUND_PARAM); + } else if (s[0] == 'a') { + sc.ChangeState(SCE_CSOUND_ARATE_VAR); + } else if (s[0] == 'k') { + sc.ChangeState(SCE_CSOUND_KRATE_VAR); + } else if (s[0] == 'i') { // covers both i-rate variables and i-statements + sc.ChangeState(SCE_CSOUND_IRATE_VAR); + } else if (s[0] == 'g') { + sc.ChangeState(SCE_CSOUND_GLOBAL_VAR); + } + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if (sc.state == SCE_CSOUND_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + else if ((sc.state == SCE_CSOUND_ARATE_VAR) || + (sc.state == SCE_CSOUND_KRATE_VAR) || + (sc.state == SCE_CSOUND_IRATE_VAR)) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_CSOUND_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_CSOUND_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_CSOUND_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_CSOUND_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_CSOUND_IDENTIFIER); + } else if (IsCsoundOperator(static_cast(sc.ch))) { + sc.SetState(SCE_CSOUND_OPERATOR); + } else if (sc.ch == 'p') { + sc.SetState(SCE_CSOUND_PARAM); + } else if (sc.ch == 'a') { + sc.SetState(SCE_CSOUND_ARATE_VAR); + } else if (sc.ch == 'k') { + sc.SetState(SCE_CSOUND_KRATE_VAR); + } else if (sc.ch == 'i') { // covers both i-rate variables and i-statements + sc.SetState(SCE_CSOUND_IRATE_VAR); + } else if (sc.ch == 'g') { + sc.SetState(SCE_CSOUND_GLOBAL_VAR); + } + } + } + sc.Complete(); +} + +static void FoldCsoundInstruments(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_CSOUND_OPCODE) && (style == SCE_CSOUND_OPCODE)) { + char s[20]; + unsigned int j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if (strcmp(s, "instr") == 0) + levelCurrent++; + if (strcmp(s, "endin") == 0) + levelCurrent--; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + +static const char * const csoundWordListDesc[] = { + "Opcodes", + "Header Statements", + "User keywords", + 0 +}; + +LexerModule lmCsound(SCLEX_CSOUND, ColouriseCsoundDoc, "csound", FoldCsoundInstruments, csoundWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexD.cxx b/sdk/wxscintilla/src/scintilla/src/LexD.cxx new file mode 100644 index 0000000000..0d6db93ca7 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexD.cxx @@ -0,0 +1,358 @@ +/** @file LexD.cxx + ** Lexer for D. + ** + ** Copyright (c) 2006 by Waldemar Augustyn + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/*/ Nested comments require keeping the value of the nesting level for every + position in the document. But since scintilla always styles line by line, + we only need to store one value per line. The non-negative number indicates + nesting level at the end of the line. +/*/ + +// We use custom qualifiers since it is not clear what D allows. + +static bool IsWordStart(int ch) { + return isascii(ch) && (isalpha(ch) || ch == '_'); +} + +static bool IsWord(int ch) { + return isascii(ch) && (isalnum(ch) || ch == '_'); +} + +static bool IsDoxygen(int ch) { + if (isascii(ch) && islower(ch)) + return true; + if (ch == '$' || ch == '@' || ch == '\\' || + ch == '&' || ch == '#' || ch == '<' || ch == '>' || + ch == '{' || ch == '}' || ch == '[' || ch == ']') + return true; + return false; +} + + +static void ColouriseDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, bool caseSensitive) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + int styleBeforeDCKeyword = SCE_D_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + int curLine = styler.GetLine(startPos); + int curNcLevel = curLine > 0? styler.GetLineState(curLine-1): 0; + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart) { + if (sc.state == SCE_D_STRING) { + // Prevent SCE_D_STRINGEOL from leaking back to previous line which + // ends with a line continuation by locking in the state upto this position. + sc.SetState(SCE_D_STRING); + } + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + } + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + switch (sc.state) { + case SCE_D_OPERATOR: + sc.SetState(SCE_D_DEFAULT); + break; + case SCE_D_NUMBER: + // We accept almost anything because of hex. and number suffixes + if (!IsWord(sc.ch) && sc.ch != '.') { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_IDENTIFIER: + if (!IsWord(sc.ch)) { + char s[1000]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + sc.ChangeState(SCE_D_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_D_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_D_TYPEDEF); + } + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENT: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTDOC: + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTLINE: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + case SCE_D_COMMENTLINEDOC: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support + // Verify that we have the conditions to mark a comment-doc-keyword + if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { + styleBeforeDCKeyword = SCE_D_COMMENTLINEDOC; + sc.SetState(SCE_D_COMMENTDOCKEYWORD); + } + } + break; + case SCE_D_COMMENTDOCKEYWORD: + if ((styleBeforeDCKeyword == SCE_D_COMMENTDOC) && sc.Match('*', '/')) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + sc.Forward(); + sc.ForwardSetState(SCE_D_DEFAULT); + } else if (!IsDoxygen(sc.ch)) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) { + sc.ChangeState(SCE_D_COMMENTDOCKEYWORDERROR); + } + sc.SetState(styleBeforeDCKeyword); + } + break; + case SCE_D_COMMENTNESTED: + if (sc.Match('+', '/')) { + if (curNcLevel > 0) + curNcLevel -= 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + if (curNcLevel == 0) { + sc.ForwardSetState(SCE_D_DEFAULT); + } + } + else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.Forward(); + } + break; + case SCE_D_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_D_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_CHARACTER: + if (sc.atLineEnd) { + sc.ChangeState(SCE_D_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_D_DEFAULT); + } + break; + case SCE_D_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_D_DEFAULT); + } + break; + } + + // Determine if a new state should be entered. + if (sc.state == SCE_D_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_D_NUMBER); + } else if (IsWordStart(sc.ch)) { + sc.SetState(SCE_D_IDENTIFIER); + } else if (sc.Match('/','+')) { + curNcLevel += 1; + curLine = styler.GetLine(sc.currentPos); + styler.SetLineState(curLine, curNcLevel); + sc.SetState(SCE_D_COMMENTNESTED); + sc.Forward(); + } else if (sc.Match('/', '*')) { + if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTDOC); + } else { + sc.SetState(SCE_D_COMMENT); + } + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) + // Support of Qt/Doxygen doc. style + sc.SetState(SCE_D_COMMENTLINEDOC); + else + sc.SetState(SCE_D_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_D_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_D_CHARACTER); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_D_OPERATOR); + } + } + } + sc.Complete(); +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_D_COMMENT || + style == SCE_D_COMMENTDOC || + style == SCE_D_COMMENTDOCKEYWORD || + style == SCE_D_COMMENTDOCKEYWORDERROR; +} + +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +static void FoldDoc(unsigned int startPos, int length, int initStyle, Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("lexer.d.fold.at.else", + styler.GetPropertyInt("fold.at.else", 0)) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelNext++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelNext--; + } + } + if (style == SCE_D_OPERATOR) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} else {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL) { + if (foldComment) { // Handle nested comments + int nc; + nc = styler.GetLineState(lineCurrent); + nc -= lineCurrent>0? styler.GetLineState(lineCurrent-1): 0; + levelNext += nc; + } + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!IsASpace(ch)) + visibleChars++; + } +} + +static void FoldDDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldDoc(startPos, length, initStyle, styler); +} + +static const char * const dWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Type definitions and aliases", + 0, + }; + +static void ColouriseDDoc(unsigned int startPos, int length, + int initStyle, WordList *keywordlists[], Accessor &styler) { + ColouriseDoc(startPos, length, initStyle, keywordlists, styler, true); +} + +LexerModule lmD(SCLEX_D, ColouriseDDoc, "d", FoldDDoc, dWordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexEScript.cxx b/sdk/wxscintilla/src/scintilla/src/LexEScript.cxx new file mode 100644 index 0000000000..3e53627e4d --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexEScript.cxx @@ -0,0 +1,273 @@ +// Scintilla source code edit control +/** @file LexESCRIPT.cxx + ** Lexer for ESCRIPT + **/ +// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com) + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + + + +static void ColouriseESCRIPTDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + // Do not leak onto next line + /*if (initStyle == SCE_ESCRIPT_STRINGEOL) + initStyle = SCE_ESCRIPT_DEFAULT;*/ + + StyleContext sc(startPos, length, initStyle, styler); + + bool caseSensitive = styler.GetPropertyInt("escript.case.sensitive", 0) != 0; + + for (; sc.More(); sc.Forward()) { + + /*if (sc.atLineStart && (sc.state == SCE_ESCRIPT_STRING)) { + // Prevent SCE_ESCRIPT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_ESCRIPT_STRING); + }*/ + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ESCRIPT_OPERATOR || sc.state == SCE_ESCRIPT_BRACE) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } else if (sc.state == SCE_ESCRIPT_NUMBER) { + if (!IsADigit(sc.ch) || sc.ch != '.') { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + +// sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD3); + // sc.state = SCE_ESCRIPT_IDENTIFIER; + } + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENT) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTDOC) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ESCRIPT_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_ESCRIPT_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '#')) { + sc.SetState(SCE_ESCRIPT_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_ESCRIPT_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_ESCRIPT_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ESCRIPT_STRING); + //} else if (isoperator(static_cast(sc.ch))) { + } else if (sc.ch == '+' || sc.ch == '-' || sc.ch == '*' || sc.ch == '/' || sc.ch == '=' || sc.ch == '<' || sc.ch == '>' || sc.ch == '&' || sc.ch == '|' || sc.ch == '!' || sc.ch == '?' || sc.ch == ':') { + sc.SetState(SCE_ESCRIPT_OPERATOR); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_ESCRIPT_BRACE); + } + } + + } + sc.Complete(); +} + + +static int classifyFoldPointESCRIPT(const char* s, const char* prevWord) { + int lev = 0; + if (strcmp(prevWord, "end") == 0) return lev; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + + if (strcmp(s, "for") == 0 || strcmp(s, "foreach") == 0 + || strcmp(s, "program") == 0 || strcmp(s, "function") == 0 + || strcmp(s, "while") == 0 || strcmp(s, "case") == 0 + || strcmp(s, "if") == 0 ) { + lev = 1; + } else if ( strcmp(s, "endfor") == 0 || strcmp(s, "endforeach") == 0 + || strcmp(s, "endprogram") == 0 || strcmp(s, "endfunction") == 0 + || strcmp(s, "endwhile") == 0 || strcmp(s, "endcase") == 0 + || strcmp(s, "endif") == 0 ) { + lev = -1; + } + + return lev; +} + + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ESCRIPT_COMMENT || + style == SCE_ESCRIPT_COMMENTDOC || + style == SCE_ESCRIPT_COMMENTLINE; +} + +static void FoldESCRIPTDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { + //~ bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldComment = true; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + int lastStart = 0; + char prevWord[32] = ""; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelCurrent++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (foldComment && (style == SCE_ESCRIPT_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + + if (stylePrev == SCE_ESCRIPT_DEFAULT && style == SCE_ESCRIPT_WORD3) + { + // Store last word start point. + lastStart = i; + } + + if (style == SCE_ESCRIPT_WORD3) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[32]; + unsigned int j; + for(j = 0; ( j < 31 ) && ( j < i-lastStart+1 ); j++) { + s[j] = static_cast(tolower(styler[lastStart + j])); + } + s[j] = '\0'; + levelCurrent += classifyFoldPointESCRIPT(s, prevWord); + strcpy(prevWord, s); + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + + if (!isspacechar(ch)) + visibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + + + +static const char * const ESCRIPTWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; + +LexerModule lmESCRIPT(SCLEX_ESCRIPT, ColouriseESCRIPTDoc, "escript", FoldESCRIPTDoc, ESCRIPTWordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexEiffel.cxx b/sdk/wxscintilla/src/scintilla/src/LexEiffel.cxx new file mode 100644 index 0000000000..4f8e7e2468 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexEiffel.cxx @@ -0,0 +1,238 @@ +// Scintilla source code edit control +/** @file LexEiffel.cxx + ** Lexer for Eiffel. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool isEiffelOperator(unsigned int ch) { + // '.' left out as it is used to make up numbers + return ch == '*' || ch == '/' || ch == '\\' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || ch == '~' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' || ch == '^' || ch == '%' || ch == ':' || + ch == '!' || ch == '@' || ch == '?'; +} + +static inline bool IsAWordChar(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsAWordStart(unsigned int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static void ColouriseEiffelDoc(unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_EIFFEL_STRINGEOL) { + if (sc.ch != '\r' && sc.ch != '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_OPERATOR) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } else if (sc.state == SCE_EIFFEL_WORD) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (!keywords.InList(s)) { + sc.ChangeState(SCE_EIFFEL_IDENTIFIER); + } + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_COMMENTLINE) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_STRING) { + if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\"') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } else if (sc.state == SCE_EIFFEL_CHARACTER) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_EIFFEL_STRINGEOL); + } else if (sc.ch == '%') { + sc.Forward(); + } else if (sc.ch == '\'') { + sc.Forward(); + sc.SetState(SCE_EIFFEL_DEFAULT); + } + } + + if (sc.state == SCE_EIFFEL_DEFAULT) { + if (sc.ch == '-' && sc.chNext == '-') { + sc.SetState(SCE_EIFFEL_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_EIFFEL_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_EIFFEL_CHARACTER); + } else if (IsADigit(sc.ch) || (sc.ch == '.')) { + sc.SetState(SCE_EIFFEL_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_EIFFEL_WORD); + } else if (isEiffelOperator(sc.ch)) { + sc.SetState(SCE_EIFFEL_OPERATOR); + } + } + } + sc.Complete(); +} + +static bool IsEiffelComment(Accessor &styler, int pos, int len) { + return len>1 && styler[pos]=='-' && styler[pos+1]=='-'; +} + +static void FoldEiffelDocIndent(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsEiffelComment); + char chNext = styler[startPos]; + for (int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsEiffelComment); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsEiffelComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + +static void FoldEiffelDocKeyWords(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int stylePrev = 0; + int styleNext = styler.StyleAt(startPos); + // lastDeferred should be determined by looking back to last keyword in case + // the "deferred" is on a line before "class" + bool lastDeferred = false; + for (unsigned int i = startPos; i < lengthDoc; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if ((stylePrev != SCE_EIFFEL_WORD) && (style == SCE_EIFFEL_WORD)) { + char s[20]; + unsigned int j = 0; + while ((j < (sizeof(s) - 1)) && (iswordchar(styler[i + j]))) { + s[j] = styler[i + j]; + j++; + } + s[j] = '\0'; + + if ( + (strcmp(s, "check") == 0) || + (strcmp(s, "debug") == 0) || + (strcmp(s, "deferred") == 0) || + (strcmp(s, "do") == 0) || + (strcmp(s, "from") == 0) || + (strcmp(s, "if") == 0) || + (strcmp(s, "inspect") == 0) || + (strcmp(s, "once") == 0) + ) + levelCurrent++; + if (!lastDeferred && (strcmp(s, "class") == 0)) + levelCurrent++; + if (strcmp(s, "end") == 0) + levelCurrent--; + lastDeferred = strcmp(s, "deferred") == 0; + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + stylePrev = style; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const eiffelWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, "eiffel", FoldEiffelDocIndent, eiffelWordListDesc); +LexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, "eiffelkw", FoldEiffelDocKeyWords, eiffelWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexErlang.cxx b/sdk/wxscintilla/src/scintilla/src/LexErlang.cxx new file mode 100644 index 0000000000..d9d58f9624 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexErlang.cxx @@ -0,0 +1,526 @@ +// Scintilla source code edit control +/** @file LexErlang.cxx + ** Lexer for Erlang. + ** Written by Peter-Henry Mander, based on Matlab lexer by José Fonseca + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/* + TODO: + o _Param should be a new lexical type +*/ + +static int is_radix(int radix, int ch) { + int digit; + if ( 16 < radix || 2 > radix ) { + return 0; + } + if ( isdigit(ch) ) { + digit = ch - '0'; + } else if ( isxdigit(ch) ) { + digit = toupper(ch) - 'A' + 10; + } else { + return 0; + } + if ( digit < radix ) { + return 1; + } else { + return 0; + } +} + +typedef enum { + STATE_NULL, + ATOM_UNQUOTED, + ATOM_QUOTED, + ATOM_FUN_NAME, + NODE_NAME_UNQUOTED, + NODE_NAME_QUOTED, + MACRO_START, + MACRO_UNQUOTED, + MACRO_QUOTED, + RECORD_START, + RECORD_UNQUOTED, + RECORD_QUOTED, + NUMERAL_START, + NUMERAL_SIGNED, + NUMERAL_RADIX_LITERAL, + NUMERAL_SPECULATIVE_MANTISSA, + NUMERAL_FLOAT_MANTISSA, + NUMERAL_FLOAT_EXPONENT, + NUMERAL_FLOAT_SIGNED_EXPONENT, + PARSE_ERROR +} atom_parse_state_t; + +static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + + styler.StartAt(startPos); + + StyleContext sc(startPos, length, initStyle, styler); + atom_parse_state_t parse_state = STATE_NULL; + int radix_digits = 0; + int exponent_digits = 0; + for (; sc.More(); sc.Forward()) { + if ( STATE_NULL != parse_state ) { + switch (parse_state) { + case STATE_NULL: + sc.SetState(SCE_ERLANG_DEFAULT); + break; + case ATOM_UNQUOTED: + if ( '@' == sc.ch ){ + parse_state = NODE_NAME_UNQUOTED; + } else if ( !isalnum(sc.ch) && sc.ch != '_' ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_ERLANG_KEYWORD); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + if ( '/' == sc.ch ) { + parse_state = ATOM_FUN_NAME; + } else { + sc.ChangeState(SCE_ERLANG_ATOM); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + } + } + break; + case ATOM_QUOTED: + if ( '@' == sc.ch ){ + parse_state = NODE_NAME_QUOTED; + } else if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_ATOM); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case ATOM_FUN_NAME: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_FUNCTION_NAME); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NODE_NAME_QUOTED: + if ( '@' == sc.ch ) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_NODE_NAME); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NODE_NAME_UNQUOTED: + if ( '@' == sc.ch ) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( !isalnum(sc.ch) && sc.ch != '_' ) { + sc.ChangeState(SCE_ERLANG_NODE_NAME); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_START: + if ( '\'' == sc.ch ) { + parse_state = RECORD_QUOTED; + } else if (isalpha(sc.ch) && islower(sc.ch)) { + parse_state = RECORD_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_QUOTED: + if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_RECORD); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case RECORD_UNQUOTED: + if ( !isalpha(sc.ch) && '_' != sc.ch ) { + sc.ChangeState(SCE_ERLANG_RECORD); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_START: + if ( '\'' == sc.ch ) { + parse_state = MACRO_QUOTED; + } else if (isalpha(sc.ch)) { + parse_state = MACRO_UNQUOTED; + } else { // error + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_UNQUOTED: + if ( !isalpha(sc.ch) && '_' != sc.ch ) { + sc.ChangeState(SCE_ERLANG_MACRO); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case MACRO_QUOTED: + if ( '\'' == sc.ch && '\\' != sc.chPrev ) { + sc.ChangeState(SCE_ERLANG_MACRO); + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_START: + if ( isdigit(sc.ch) ) { + radix_digits *= 10; + radix_digits += sc.ch - '0'; // Assuming ASCII here! + } else if ( '#' == sc.ch ) { + if ( 2 > radix_digits || 16 < radix_digits) { + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + parse_state = NUMERAL_RADIX_LITERAL; + } + } else if ( '.' == sc.ch && isdigit(sc.chNext)) { + radix_digits = 0; + parse_state = NUMERAL_FLOAT_MANTISSA; + } else if ( 'e' == sc.ch || 'E' == sc.ch ) { + exponent_digits = 0; + parse_state = NUMERAL_FLOAT_EXPONENT; + } else { + radix_digits = 0; + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_RADIX_LITERAL: + if ( !is_radix(radix_digits,sc.ch) ) { + radix_digits = 0; + if ( !isalnum(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_FLOAT_MANTISSA: + if ( 'e' == sc.ch || 'E' == sc.ch ) { + exponent_digits = 0; + parse_state = NUMERAL_FLOAT_EXPONENT; + } else if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } + break; + case NUMERAL_FLOAT_EXPONENT: + if ( '-' == sc.ch || '+' == sc.ch ) { + parse_state = NUMERAL_FLOAT_SIGNED_EXPONENT; + } else if ( !isdigit(sc.ch) ) { + if ( 0 < exponent_digits ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + ++exponent_digits; + } + break; + case NUMERAL_FLOAT_SIGNED_EXPONENT: + if ( !isdigit(sc.ch) ) { + if ( 0 < exponent_digits ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + } + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + ++exponent_digits; + } + break; + case NUMERAL_SIGNED: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_NUMBER); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else if ( '.' == sc.ch ) { + parse_state = NUMERAL_FLOAT_MANTISSA; + } + break; + case NUMERAL_SPECULATIVE_MANTISSA: + if ( !isdigit(sc.ch) ) { + sc.ChangeState(SCE_ERLANG_OPERATOR); + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + } else { + parse_state = NUMERAL_FLOAT_MANTISSA; + } + break; + case PARSE_ERROR: + sc.SetState(SCE_ERLANG_DEFAULT); + parse_state = STATE_NULL; + break; + } + } else if (sc.state == SCE_ERLANG_OPERATOR) { + if (sc.chPrev == '.') { + if (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\' || sc.ch == '^') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_VARIABLE) { + if (!isalnum(sc.ch) && sc.ch != '_') { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_STRING) { + if (sc.ch == '\"' && sc.chPrev != '\\') { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ERLANG_DEFAULT); + } + } else if (sc.state == SCE_ERLANG_CHARACTER ) { + if ( sc.chPrev == '\\' ) { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } else if ( sc.ch != '\\' ) { + sc.ForwardSetState(SCE_ERLANG_DEFAULT); + } + } + + if (sc.state == SCE_ERLANG_DEFAULT) { + if (sc.ch == '%') { + sc.SetState(SCE_ERLANG_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ERLANG_STRING); + } else if (sc.ch == '#') { + parse_state = RECORD_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (sc.ch == '?') { + parse_state = MACRO_START; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (sc.ch == '$') { + sc.SetState(SCE_ERLANG_CHARACTER); + } else if (sc.ch == '\'') { + parse_state = ATOM_QUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if ( isdigit(sc.ch) ) { + parse_state = NUMERAL_START; + radix_digits = sc.ch - '0'; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if ( '.' == sc.ch ) { + parse_state = NUMERAL_SPECULATIVE_MANTISSA; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isalpha(sc.ch) && isupper(sc.ch)) { + sc.SetState(SCE_ERLANG_VARIABLE); + } else if (isalpha(sc.ch)) { + parse_state = ATOM_UNQUOTED; + sc.SetState(SCE_ERLANG_UNKNOWN); + } else if (isoperator(static_cast(sc.ch)) || sc.ch == '\\') { + sc.SetState(SCE_ERLANG_OPERATOR); + } + } + } + sc.Complete(); +} + +static int ClassifyFoldPointErlang( + Accessor &styler, + int styleNext, + int keyword_start +) { + int lev = 0; + if ( styler.Match(keyword_start,"case") + || ( + styler.Match(keyword_start,"fun") + && SCE_ERLANG_FUNCTION_NAME != styleNext) + || styler.Match(keyword_start,"if") + || styler.Match(keyword_start,"query") + || styler.Match(keyword_start,"receive") + ) { + ++lev; + } else if ( styler.Match(keyword_start,"end") ) { + --lev; + } + return lev; +} + + +static void FoldErlangDoc( + unsigned int startPos, int length, int initStyle, + WordList** /*keywordlists*/, Accessor &styler +) { + unsigned int endPos = startPos + length; + //~ int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler.SafeGetCharAt(startPos); + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + int keyword_start = 0; + + bool fold_keywords = true; + bool fold_comments = true; + bool fold_braces = true; + bool fold_function_clauses = false; + bool fold_clauses = false; + + //int clause_level = 0; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if ( (stylePrev != SCE_ERLANG_KEYWORD) && (style == SCE_ERLANG_KEYWORD) ) { + keyword_start = i; + } + if ( fold_keywords ) { + if ( (stylePrev == SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_ATOM) + ) { + levelCurrent += ClassifyFoldPointErlang(styler,styleNext,keyword_start); + } + } + + if ( fold_comments ) { + if (style == SCE_ERLANG_COMMENT) { + if ((ch == '%') && (chNext == '{')) { + levelCurrent++; + } else if ((ch == '%') && (chNext == '}')) { + levelCurrent--; + } + } + } + + if ( fold_function_clauses ) { + if ( (SC_FOLDLEVELBASE == levelCurrent) /*&& (style == SCE_ERLANG_OPERATOR)*/ ) { + if ( (ch == '-') && (chNext == '>')) { + //~ fprintf(stderr,"levelCurrent=%d\n", levelCurrent); + //++clause_level; + //~ if ( 0 < clause_level ) + ++levelCurrent; + } + } + //~ if ( (stylePrev != SCE_ERLANG_RECORD) + //~ && (style != SCE_ERLANG_NUMBER) + //~ && (style != SCE_ERLANG_STRING) + //~ && (style != SCE_ERLANG_COMMENT) + //~ ) { + if ( (SC_FOLDLEVELBASE+1 == levelCurrent) && (ch == '.') ) { + //--clause_level; + //~ if ( 0 == clause_level ) + --levelCurrent; + } + //~ } + } + + if ( fold_clauses ) { + if ( (0 < levelCurrent) && (style == SCE_ERLANG_OPERATOR) ) { + if ((ch == '-') && (chNext == '>')) { + levelCurrent++; + } + if ( (ch == ';') ) { + levelCurrent--; + } + } + if ( (stylePrev != SCE_ERLANG_RECORD) + && (style != SCE_ERLANG_NUMBER) + && (style != SCE_ERLANG_STRING) + && (style != SCE_ERLANG_COMMENT) + ) { + if ( (ch == '.') ) { + levelCurrent--; + } + } + if ( (stylePrev == SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_KEYWORD) + && (style != SCE_ERLANG_ATOM) + && ( + styler.Match(keyword_start,"end") // 'end' counted twice if fold_keywords too + || styler.Match(keyword_start,"after") ) + ) { + levelCurrent--; + } + } + + if ( fold_braces ) { + if (style == SCE_ERLANG_OPERATOR) { + if ( (ch == '{') || (ch == '(') || (ch == '[') ) { + levelCurrent++; + } else if ( (ch == '}') || (ch == ')') || (ch == ']') ) { + levelCurrent--; + } + } + } + + if (atEOL) { + int lev = levelPrev; + //~ if (visibleChars == 0 && foldCompact) + //~ lev |= SC_FOLDLEVELWHITEFLAG; + //~ if ((levelCurrent > levelPrev) && (visibleChars > 0)) + if ((levelCurrent > levelPrev)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + //~ visibleChars = 0; + } + //~ if (!isspacechar(ch)) + //~ visibleChars++; + + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const erlangWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmErlang( + SCLEX_ERLANG, + ColouriseErlangDoc, + "erlang", + FoldErlangDoc, + erlangWordListDesc); + diff --git a/sdk/wxscintilla/src/scintilla/src/LexFlagship.cxx b/sdk/wxscintilla/src/scintilla/src/LexFlagship.cxx new file mode 100644 index 0000000000..ddb647cf7b --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexFlagship.cxx @@ -0,0 +1,230 @@ +// Scintilla source code edit control +/** @file LexFlagShip.cxx + ** Lexer for FlagShip + ** (Syntactically compatible to other XBase dialects, like dBase, Clipper, Fox etc.) + **/ +// Copyright 2005 by Randy Butler +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static bool IsFlagShipComment(Accessor &styler, int pos, int len) { + return len>0 && styler[pos]=='\''; +} + +static inline bool IsTypeCharacter(int ch) { + return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$'; +} + +// Extended to accept accented characters +static inline bool IsAWordChar(int ch) { + return ch >= 0x80 || + (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(int ch) { + return ch >= 0x80 || + (isalnum(ch) || ch == '_'); +} + +static inline bool IsADateCharacter(const int ch) { + return (ch < 0x80) && + (isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t'); +} + + +static void ColouriseFlagShipDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + //bool FSScriptSyntax = true; + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + styler.StartAt(startPos); + + int visibleChars = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.state == SCE_FS_OPERATOR) { + sc.SetState(SCE_FS_DEFAULT); + } else if (sc.state == SCE_FS_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_FS_KEYWORD4); + }// Else, it is really an identifier... + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_STRING) { + // VB doubles quotes to preserve them, so just end this string + // state now as a following quote will start again + if (sc.ch == '\"') { + if (tolower(sc.chNext) == 'c') { + sc.Forward(); + } + sc.ForwardSetState(SCE_FS_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_FS_STRINGEOL); + sc.ForwardSetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_COMMENT) { + if (sc.Match('*', '/')) { // new code + sc.Forward(); + sc.ForwardSetState(SCE_FS_DEFAULT); + //if (sc.atLineEnd) { // old code + // sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_COMMENTLINE) { //new code + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_FS_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_FS_PREPROCESSOR) { + if (sc.atLineEnd) { + sc.SetState(SCE_FS_DEFAULT); + } + } else if (sc.state == SCE_FS_DATE) { + if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) { + sc.ForwardSetState(SCE_FS_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_FS_DEFAULT) { + if (sc.Match('/', '*')) { // New code + sc.SetState(SCE_FS_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + //if (sc.ch == '\'') { // Old code + // sc.SetState(SCE_FS_COMMENT); // old code + } else if (sc.Match('/', '/')) { // New code + sc.SetState(SCE_FS_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_FS_STRING); + } else if (sc.ch == '#' && visibleChars == 0) { + // Preprocessor commands are alone on their line + sc.SetState(SCE_FS_PREPROCESSOR); + } else if (sc.ch == '#') { + int n = 1; + int chSeek = ' '; + while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) { + chSeek = sc.GetRelative(n); + n++; + } + if (IsADigit(chSeek)) { + sc.SetState(SCE_FS_DATE); + } else { + sc.SetState(SCE_FS_OPERATOR); + } + } else if (sc.ch == '&' && tolower(sc.chNext) == 'h') { + sc.SetState(SCE_FS_NUMBER); + } else if (sc.ch == '&' && tolower(sc.chNext) == 'o') { + sc.SetState(SCE_FS_NUMBER); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_FS_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '[')) { + sc.SetState(SCE_FS_IDENTIFIER); + } else if (isoperator(static_cast(sc.ch)) || (sc.ch == '\\')) { + sc.SetState(SCE_FS_OPERATOR); + } + } + + if (sc.atLineEnd) { + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldFlagShipDoc(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) { + + int endPos = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + } + } + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsFlagShipComment); + char chNext = styler[startPos]; + for (int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsFlagShipComment); + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsFlagShipComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + + +static const char * const FSWordListDesc[] = { + "Keywords", + "functions", + "user2", + "user3", + 0 +}; + +LexerModule lmFlagShip(SCLEX_FLAGSHIP, ColouriseFlagShipDoc, "flagship", FoldFlagShipDoc, FSWordListDesc); + + + diff --git a/sdk/wxscintilla/src/scintilla/src/LexForth.cxx b/sdk/wxscintilla/src/scintilla/src/LexForth.cxx new file mode 100644 index 0000000000..aa72287f2f --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexForth.cxx @@ -0,0 +1,352 @@ +// Scintilla source code edit control +/** @file LexCrontab.cxx + ** Lexer to use with extended crontab files used by a powerful + ** Windows scheduler/event monitor/automation manager nnCron. + ** (http://nemtsev.eserv.ru/) + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +bool is_whitespace(int ch){ + return ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '; +} + +bool is_blank(int ch){ + return ch == '\t' || ch == ' '; +} +//#define FORTH_DEBUG +#ifdef FORTH_DEBUG +static FILE *f_debug; +#define log(x) fputs(f_debug,x); +#else +#define log(x) +#endif + +#define STATE_LOCALE +#define BL ' ' + +static Accessor *st; +static int cur_pos,pos1,pos2,pos0,lengthDoc; +char *buffer; + +char getChar(bool is_bl){ + char ch=st->SafeGetCharAt(cur_pos); + if(is_bl) if(is_whitespace(ch)) ch=BL; + return ch; +} + +char getCharBL(){ + char ch=st->SafeGetCharAt(cur_pos); + return ch; +} +bool is_eol(char ch){ + return ch=='\n' || ch=='\r'; +} + +int parse(char ch, bool skip_eol){ +// pos1 - start pos of word +// pos2 - pos after of word +// pos0 - start pos + char c=0; + int len; + bool is_bl=ch==BL; + pos0=pos1=pos2=cur_pos; + for(;cur_pos9 && base>10) digit-=7; + if(digit<0) return false; + if(digit>=base) return false; + } + return true; +} + +bool is_number(char *s){ + if(strncmp(s,"0x",2)==0) return _is_number(s+2,16); + return _is_number(s,10); +} + +static void ColouriseForthDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + st=&styler; + cur_pos=startPos; + lengthDoc = startPos + length; + buffer = new char[length]; + +#ifdef FORTH_DEBUG + f_debug=fopen("c:\\sci.log","at"); +#endif + + WordList &control = *keywordLists[0]; + WordList &keyword = *keywordLists[1]; + WordList &defword = *keywordLists[2]; + WordList &preword1 = *keywordLists[3]; + WordList &preword2 = *keywordLists[4]; + WordList &strings = *keywordLists[5]; + + // go through all provided text segment + // using the hand-written state machine shown below + styler.StartAt(startPos); + styler.StartSegment(startPos); + while(parse(BL,true)!=0){ + if(pos0!=pos1){ + styler.ColourTo(pos0,SCE_FORTH_DEFAULT); + styler.ColourTo(pos1-1,SCE_FORTH_DEFAULT); + } + if(strcmp("\\",buffer)==0){ + styler.ColourTo(pos1,SCE_FORTH_COMMENT); + parse(1,false); + styler.ColourTo(pos2,SCE_FORTH_COMMENT); + }else if(strcmp("(",buffer)==0){ + styler.ColourTo(pos1,SCE_FORTH_COMMENT); + parse(')',true); + if(cur_pos +// The License.txt file describes the conditions under which this software may be distributed. +/***************************************/ +#include +#include +#include +#include +#include +/***************************************/ +#include "Platform.h" +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +/***********************************************/ +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%'); +} +/**********************************************/ +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch)); +} +/***************************************/ +inline bool IsABlank(unsigned int ch) { + return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; +} +/***************************************/ +inline bool IsALineEnd(char ch) { + return ((ch == '\n') || (ch == '\r')) ; +} +/***************************************/ +unsigned int GetContinuedPos(unsigned int pos, Accessor &styler) { + while (!IsALineEnd(styler.SafeGetCharAt(pos++))) continue; + if (styler.SafeGetCharAt(pos) == '\n') pos++; + while (IsABlank(styler.SafeGetCharAt(pos++))) continue; + char chCur = styler.SafeGetCharAt(pos); + if (chCur == '&') { + while (IsABlank(styler.SafeGetCharAt(++pos))) continue; + return pos; + } else { + return pos; + } +} +/***************************************/ +static void ColouriseFortranDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler, bool isFixFormat) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + /***************************************/ + int posLineStart = 0, numNonBlank = 0, prevState = 0; + int endPos = startPos + length; + /***************************************/ + // backtrack to the nearest keyword + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_F_WORD)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + initStyle = styler.StyleAt(startPos - 1); + StyleContext sc(startPos, endPos-startPos, initStyle, styler); + /***************************************/ + for (; sc.More(); sc.Forward()) { + // remember the start position of the line + if (sc.atLineStart) { + posLineStart = sc.currentPos; + numNonBlank = 0; + sc.SetState(SCE_F_DEFAULT); + } + if (!IsASpaceOrTab(sc.ch)) numNonBlank ++; + /***********************************************/ + // Handle the fix format generically + int toLineStart = sc.currentPos - posLineStart; + if (isFixFormat && (toLineStart < 6 || toLineStart > 72)) { + if (toLineStart == 0 && (tolower(sc.ch) == 'c' || sc.ch == '*') || sc.ch == '!') { + sc.SetState(SCE_F_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart > 72) { + sc.SetState(SCE_F_COMMENT); + while (!sc.atLineEnd && sc.More()) sc.Forward(); // Until line end + } else if (toLineStart < 5) { + if (IsADigit(sc.ch)) + sc.SetState(SCE_F_LABEL); + else + sc.SetState(SCE_F_DEFAULT); + } else if (toLineStart == 5) { + if (!IsASpace(sc.ch) && sc.ch != '0') { + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(prevState); + } else + sc.SetState(SCE_F_DEFAULT); + } + continue; + } + /***************************************/ + // Handle line continuation generically. + if (!isFixFormat && sc.ch == '&') { + char chTemp = ' '; + int j = 1; + while (IsABlank(chTemp) && j<132) { + chTemp = static_cast(sc.GetRelative(j)); + j++; + } + if (chTemp == '!') { + sc.SetState(SCE_F_CONTINUATION); + if (sc.chNext == '!') sc.ForwardSetState(SCE_F_COMMENT); + } else if (chTemp == '\r' || chTemp == '\n') { + int currentState = sc.state; + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(SCE_F_DEFAULT); + while (IsASpace(sc.ch) && sc.More()) sc.Forward(); + if (sc.ch == '&') { + sc.SetState(SCE_F_CONTINUATION); + sc.Forward(); + } + sc.SetState(currentState); + } + } + /***************************************/ + // Determine if the current state should terminate. + if (sc.state == SCE_F_OPERATOR) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_NUMBER) { + if (!(IsAWordChar(sc.ch) || sc.ch=='\'' || sc.ch=='\"' || sc.ch=='.')) { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '%')) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_F_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_F_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_F_WORD3); + } + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_COMMENT || sc.state == SCE_F_PREPROCESSOR) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING1) { + prevState = sc.state; + if (sc.ch == '\'') { + if (sc.chNext == '\'') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING2) { + prevState = sc.state; + if (sc.atLineEnd) { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } + } else if (sc.state == SCE_F_OPERATOR2) { + if (sc.ch == '.') { + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_CONTINUATION) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_LABEL) { + if (!IsADigit(sc.ch)) { + sc.SetState(SCE_F_DEFAULT); + } else { + if (isFixFormat && sc.currentPos-posLineStart > 4) + sc.SetState(SCE_F_DEFAULT); + else if (numNonBlank > 5) + sc.SetState(SCE_F_DEFAULT); + } + } + /***************************************/ + // Determine if a new state should be entered. + if (sc.state == SCE_F_DEFAULT) { + if (sc.ch == '!') { + if (sc.chNext == '$') { + sc.SetState(SCE_F_PREPROCESSOR); + } else { + sc.SetState(SCE_F_COMMENT); + } + } else if ((!isFixFormat) && IsADigit(sc.ch) && numNonBlank == 1) { + sc.SetState(SCE_F_LABEL); + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_F_NUMBER); + } else if ((tolower(sc.ch) == 'b' || tolower(sc.ch) == 'o' || + tolower(sc.ch) == 'z') && (sc.chNext == '\"' || sc.chNext == '\'')) { + sc.SetState(SCE_F_NUMBER); + sc.Forward(); + } else if (sc.ch == '.' && isalpha(sc.chNext)) { + sc.SetState(SCE_F_OPERATOR2); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_F_IDENTIFIER); + } else if (sc.ch == '\"') { + sc.SetState(SCE_F_STRING2); + } else if (sc.ch == '\'') { + sc.SetState(SCE_F_STRING1); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_F_OPERATOR); + } + } + } + sc.Complete(); +} +/***************************************/ +// To determine the folding level depending on keywords +static int classifyFoldPointFortran(const char* s, const char* prevWord, const char chNextNonBlank) { + int lev = 0; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + if (strcmp(s, "associate") == 0 || strcmp(s, "block") == 0 + || strcmp(s, "blockdata") == 0 || strcmp(s, "select") == 0 + || strcmp(s, "do") == 0 || strcmp(s, "enum") ==0 + || strcmp(s, "function") == 0 || strcmp(s, "interface") == 0 + || strcmp(s, "module") == 0 || strcmp(s, "program") == 0 + || strcmp(s, "subroutine") == 0 || strcmp(s, "then") == 0 + || (strcmp(s, "type") == 0 && chNextNonBlank != '(') ){ + if (strcmp(prevWord, "end") == 0) + lev = 0; + else + lev = 1; + } else if (strcmp(s, "end") == 0 && chNextNonBlank != '=' + || strcmp(s, "endassociate") == 0 || strcmp(s, "endblock") == 0 + || strcmp(s, "endblockdata") == 0 || strcmp(s, "endselect") == 0 + || strcmp(s, "enddo") == 0 || strcmp(s, "endenum") ==0 + || strcmp(s, "endif") == 0 || strcmp(s, "endforall") == 0 + || strcmp(s, "endfunction") == 0 || strcmp(s, "endinterface") == 0 + || strcmp(s, "endmodule") == 0 || strcmp(s, "endprogram") == 0 + || strcmp(s, "endsubroutine") == 0 || strcmp(s, "endtype") == 0 + || strcmp(s, "endwhere") == 0 + || strcmp(s, "procedure") == 0 ) { // Take care of the module procedure statement + lev = -1; + } else if (strcmp(prevWord, "end") == 0 && strcmp(s, "if") == 0){ // end if + lev = 0; + } + return lev; +} +// Folding the code +static void FoldFortranDoc(unsigned int startPos, int length, int initStyle, + Accessor &styler, bool isFixFormat) { + // + // bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + // + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + char chNextNonBlank; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + /***************************************/ + int lastStart = 0; + char prevWord[32] = ""; + char Label[6] = ""; + // Variables for do label folding. + static int doLabels[100]; + static int posLabel=-1; + /***************************************/ + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + chNextNonBlank = chNext; + unsigned int j=i+1; + while(IsABlank(chNextNonBlank) && j(tolower(styler[lastStart+k])); + } + s[k] = '\0'; + // Handle the forall and where statement and structure. + if (strcmp(s, "forall") == 0 || strcmp(s, "where") == 0) { + if (strcmp(prevWord, "end") != 0) { + j = i + 1; + char chBrace = '(', chSeek = ')', ch1 = styler.SafeGetCharAt(j); + // Find the position of the first ( + while (ch1 != chBrace && j -1) { + levelCurrent--; + posLabel--; + } + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + /***************************************/ + if (!isspacechar(ch)) visibleChars++; + } + /***************************************/ + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} +/***************************************/ +static const char * const FortranWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; +/***************************************/ +static void ColouriseFortranDocFreeFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, false); +} +/***************************************/ +static void ColouriseFortranDocFixFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, true); +} +/***************************************/ +static void FoldFortranDocFreeFormat(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, false); +} +/***************************************/ +static void FoldFortranDocFixFormat(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) { + FoldFortranDoc(startPos, length, initStyle,styler, true); +} +/***************************************/ +LexerModule lmFortran(SCLEX_FORTRAN, ColouriseFortranDocFreeFormat, "fortran", FoldFortranDocFreeFormat, FortranWordLists); +LexerModule lmF77(SCLEX_F77, ColouriseFortranDocFixFormat, "f77", FoldFortranDocFixFormat, FortranWordLists); diff --git a/sdk/wxscintilla/src/scintilla/src/LexGAP.cxx b/sdk/wxscintilla/src/scintilla/src/LexGAP.cxx new file mode 100644 index 0000000000..bec53b7d01 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexGAP.cxx @@ -0,0 +1,263 @@ +// Scintilla source code edit control +/** @file LexGAP.cxx + ** Lexer for the GAP language. (The GAP System for Computational Discrete Algebra) + ** http://www.gap-system.org + **/ +// Copyright 2007 by Istvan Szollosi ( szteven gmail com ) +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +static inline bool IsGAPOperator(char ch) { + if (isalnum(ch)) return false; + if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || + ch == '^' || ch == ',' || ch == '!' || ch == '.' || + ch == '=' || ch == '<' || ch == '>' || ch == '(' || + ch == ')' || ch == ';' || ch == '[' || ch == ']' || + ch == '{' || ch == '}' || ch == ':' ) + return true; + return false; +} + +static void GetRange(unsigned int start, unsigned int end, Accessor &styler, char *s, unsigned int len) { + unsigned int i = 0; + while ((i < end - start + 1) && (i < len-1)) { + s[i] = static_cast(styler[start + i]); + i++; + } + s[i] = '\0'; +} + +static void ColouriseGAPDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { + + WordList &keywords1 = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + + // Do not leak onto next line + if (initStyle == SCE_GAP_STRINGEOL) initStyle = SCE_GAP_DEFAULT; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // Prevent SCE_GAP_STRINGEOL from leaking back to previous line + if ( sc.atLineStart ) { + if (sc.state == SCE_GAP_STRING) sc.SetState(SCE_GAP_STRING); + if (sc.state == SCE_GAP_CHAR) sc.SetState(SCE_GAP_CHAR); + } + + // Handle line continuation generically + if (sc.ch == '\\' ) { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate + switch (sc.state) { + case SCE_GAP_OPERATOR : + sc.SetState(SCE_GAP_DEFAULT); + break; + + case SCE_GAP_NUMBER : + if (!IsADigit(sc.ch)) { + if (sc.ch == '\\') { + if (!sc.atLineEnd) { + if (!IsADigit(sc.chNext)) { + sc.Forward(); + sc.ChangeState(SCE_GAP_IDENTIFIER); + } + } + } else if (isalpha(sc.ch) || sc.ch == '_') { + sc.ChangeState(SCE_GAP_IDENTIFIER); + } + else sc.SetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_IDENTIFIER : + if (!(iswordstart(static_cast(sc.ch)) || sc.ch == '$')) { + if (sc.ch == '\\') sc.Forward(); + else { + char s[1000]; + sc.GetCurrent(s, sizeof(s)); + if (keywords1.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_GAP_KEYWORD4); + } + sc.SetState(SCE_GAP_DEFAULT); + } + } + break; + + case SCE_GAP_COMMENT : + if (sc.atLineEnd) { + sc.SetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_STRING: + if (sc.atLineEnd) { + sc.ChangeState(SCE_GAP_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_CHAR: + if (sc.atLineEnd) { + sc.ChangeState(SCE_GAP_STRINGEOL); + } else if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\'') { + sc.ForwardSetState(SCE_GAP_DEFAULT); + } + break; + + case SCE_GAP_STRINGEOL: + if (sc.atLineStart) { + sc.SetState(SCE_GAP_DEFAULT); + } + break; + } + + // Determine if a new state should be entered + if (sc.state == SCE_GAP_DEFAULT) { + if (IsGAPOperator(static_cast(sc.ch))) { + sc.SetState(SCE_GAP_OPERATOR); + } + else if (IsADigit(sc.ch)) { + sc.SetState(SCE_GAP_NUMBER); + } else if (isalpha(sc.ch) || sc.ch == '_' || sc.ch == '\\' || sc.ch == '$' || sc.ch == '~') { + sc.SetState(SCE_GAP_IDENTIFIER); + if (sc.ch == '\\') sc.Forward(); + } else if (sc.ch == '#') { + sc.SetState(SCE_GAP_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_GAP_STRING); + } else if (sc.ch == '\'') { + sc.SetState(SCE_GAP_CHAR); + } + } + + } + sc.Complete(); +} + +static int ClassifyFoldPointGAP(const char* s) { + int level = 0; + if (strcmp(s, "function") == 0 || + strcmp(s, "do") == 0 || + strcmp(s, "if") == 0 || + strcmp(s, "repeat") == 0 ) { + level = 1; + } else if (strcmp(s, "end") == 0 || + strcmp(s, "od") == 0 || + strcmp(s, "fi") == 0 || + strcmp(s, "until") == 0 ) { + level = -1; + } + return level; +} + +static void FoldGAPDoc( unsigned int startPos, int length, int initStyle, WordList** , Accessor &styler) { + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + int lastStart = 0; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (stylePrev != SCE_GAP_KEYWORD && style == SCE_GAP_KEYWORD) { + // Store last word start point. + lastStart = i; + } + + if (stylePrev == SCE_GAP_KEYWORD) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[100]; + GetRange(lastStart, i, styler, s, sizeof(s)); + levelCurrent += ClassifyFoldPointGAP(s); + } + } + + if (atEOL) { + int lev = levelPrev; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + + if (!isspacechar(ch)) + visibleChars++; + } + + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const GAPWordListDesc[] = { + "Keywords 1", + "Keywords 2", + "Keywords 3 (unused)", + "Keywords 4 (unused)", + 0 +}; + +LexerModule lmGAP( + SCLEX_GAP, + ColouriseGAPDoc, + "gap", + FoldGAPDoc, + GAPWordListDesc); diff --git a/sdk/wxscintilla/src/scintilla/src/LexGen.py b/sdk/wxscintilla/src/scintilla/src/LexGen.py new file mode 100644 index 0000000000..f204fcba05 --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexGen.py @@ -0,0 +1,244 @@ +# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org +# Released to the public domain. + +# Regenerate the Scintilla and SciTE source files that list +# all the lexers and all the properties files. +# Should be run whenever a new lexer is added or removed. +# Requires Python 2.4 or later +# Most files are regenerated in place with templates stored in comments. +# The VS .NET project file is generated into a different file as the +# VS .NET environment will not retain comments when modifying the file. +# The files are copied to a string apart from sections between a +# ++Autogenerated comment and a --Autogenerated comment which is +# generated by the CopyWithInsertion function. After the whole +# string is instantiated, it is compared with the target file and +# if different the file is rewritten. +# Does not regenerate the Visual C++ 6 project files but does the VS .NET +# project file. + +import string +import sys +import os +import glob + +# EOL constants +CR = "\r" +LF = "\n" +CRLF = "\r\n" +if sys.platform == "win32": + NATIVE = CRLF +else: + # Yes, LF is the native EOL even on Mac OS X. CR is just for + # Mac OS <=9 (a.k.a. "Mac Classic") + NATIVE = LF + +# Automatically generated sections contain start and end comments, +# a definition line and the results. +# The results are replaced by regenerating based on the definition line. +# The definition line is a comment prefix followed by "**". +# If there is a digit after the ** then this indicates which list to use +# and the digit and next character are not part of the definition +# Backslash is used as an escape within the definition line. +# The part between \( and \) is repeated for each item in the list. +# \* is replaced by each list item. \t, and \n are tab and newline. +def CopyWithInsertion(input, commentPrefix, retainDefs, eolType, *lists): + copying = 1 + listid = 0 + output = [] + for line in input.splitlines(0): + isStartGenerated = line.startswith(commentPrefix + "++Autogenerated") + if copying and not isStartGenerated: + output.append(line) + if isStartGenerated: + if retainDefs: + output.append(line) + copying = 0 + definition = "" + elif not copying and line.startswith(commentPrefix + "**"): + if retainDefs: + output.append(line) + definition = line[len(commentPrefix + "**"):] + listid = 0 + if definition[0] in string.digits: + listid = int(definition[:1]) + definition = definition[2:] + # Hide double slashes as a control character + definition = definition.replace("\\\\", "\001") + # Do some normal C style transforms + definition = definition.replace("\\n", "\n") + definition = definition.replace("\\t", "\t") + # Get the doubled backslashes back as single backslashes + definition = definition.replace("\001", "\\") + startRepeat = definition.find("\\(") + endRepeat = definition.find("\\)") + intro = definition[:startRepeat] + out = "" + if intro.endswith("\n"): + pos = 0 + else: + pos = len(intro) + out += intro + middle = definition[startRepeat+2:endRepeat] + for i in lists[listid]: + item = middle.replace("\\*", i) + if pos and (pos + len(item) >= 80): + out += "\\\n" + pos = 0 + out += item + pos += len(item) + if item.endswith("\n"): + pos = 0 + outro = definition[endRepeat+2:] + out += outro + out = out.replace("\n", eolType) # correct EOLs in generated content + output.append(out) + elif line.startswith(commentPrefix + "--Autogenerated"): + copying = 1 + if retainDefs: + output.append(line) + output = [line.rstrip(" \t") for line in output] # trim trailing whitespace + return eolType.join(output) + eolType + +def UpdateFile(filename, updated): + """ If the file is different to updated then copy updated + into the file else leave alone so CVS and make don't treat + it as modified. """ + try: + infile = open(filename, "rb") + except IOError: # File is not there yet + out = open(filename, "wb") + out.write(updated) + out.close() + print "New", filename + return + original = infile.read() + infile.close() + if updated != original: + os.unlink(filename) + out = open(filename, "wb") + out.write(updated) + out.close() + print "Changed", filename + #~ else: + #~ print "Unchanged", filename + +def Generate(inpath, outpath, commentPrefix, eolType, *lists): + """Generate 'outpath' from 'inpath'. + + "eolType" indicates the type of EOLs to use in the generated + file. It should be one of following constants: LF, CRLF, + CR, or NATIVE. + """ + #print "generate '%s' -> '%s' (comment prefix: %r, eols: %r)"\ + # % (inpath, outpath, commentPrefix, eolType) + try: + infile = open(inpath, "r") + except IOError: + print "Can not open", inpath + return + original = infile.read() + infile.close() + updated = CopyWithInsertion(original, commentPrefix, + inpath == outpath, eolType, *lists) + UpdateFile(outpath, updated) + +def Regenerate(filename, commentPrefix, eolType, *lists): + """Regenerate the given file. + + "eolType" indicates the type of EOLs to use in the generated + file. It should be one of following constants: LF, CRLF, + CR, or NATIVE. + """ + Generate(filename, filename, commentPrefix, eolType, *lists) + +def FindModules(lexFile): + modules = [] + f = open(lexFile) + for l in f.readlines(): + if l.startswith("LexerModule"): + l = l.replace("(", " ") + modules.append(l.split()[1]) + return modules + +knownIrregularProperties = [ + "fold", + "styling.within.preprocessor", + "tab.timmy.whinge.level", + "asp.default.language", + "html.tags.case.sensitive", + "ps.level", + "ps.tokenize", + "sql.backslash.escapes", + "nsis.uservars", + "nsis.ignorecase" +] + +def FindProperties(lexFile): + properties = set() + f = open(lexFile) + for l in f.readlines(): + if "GetProperty" in l: + l = l.strip() + if not l.startswith("//"): # Drop comments + propertyName = l.split("\"")[1] + if propertyName.lower() == propertyName: + # Only allow lower case property names + if propertyName in knownIrregularProperties or \ + propertyName.startswith("fold.") or \ + propertyName.startswith("lexer."): + properties.add(propertyName) + return properties + +def ciCompare(a,b): + return cmp(a.lower(), b.lower()) + +def RegenerateAll(): + root="../../" + + # Find all the lexer source code files + lexFilePaths = glob.glob(root + "scintilla/src/Lex*.cxx") + lexFiles = [os.path.basename(f)[:-4] for f in lexFilePaths] + print lexFiles + lexerModules = [] + lexerProperties = set() + for lexFile in lexFilePaths: + lexerModules.extend(FindModules(lexFile)) + lexerProperties.update(FindProperties(lexFile)) + lexerModules.sort(ciCompare) + lexerProperties.remove("fold.comment.python") + lexerProperties = list(lexerProperties) + lexerProperties.sort(ciCompare) + + # Find all the SciTE properties files + otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"] + if os.path.exists(root + "scite"): + propFilePaths = glob.glob(root + "scite/src/*.properties") + propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps] + propFiles.sort(ciCompare) + print propFiles + + # Find all the menu command IDs in the SciTE header + SciTEHeader = file(root + "scite/src/SciTE.h") + lines = SciTEHeader.read().split("\n") + SciTEHeader.close() + ids = [id for id in [l.split()[1] for l in lines if l.startswith("#define")] if id.startswith("IDM_")] + #print ids + + Regenerate(root + "scintilla/src/KeyWords.cxx", "//", NATIVE, lexerModules) + Regenerate(root + "scintilla/win32/makefile", "#", NATIVE, lexFiles) + Regenerate(root + "scintilla/win32/scintilla.mak", "#", NATIVE, lexFiles) + Regenerate(root + "scintilla/win32/scintilla_vc6.mak", "#", NATIVE, lexFiles) + # Use Unix EOLs for gtk Makefiles so they work for Linux users when + # extracted from the Scintilla source ZIP (typically created on + # Windows). + Regenerate(root + "scintilla/gtk/makefile", "#", LF, lexFiles) + Regenerate(root + "scintilla/gtk/scintilla.mak", "#", NATIVE, lexFiles) + Regenerate(root + "scintilla/macosx/makefile", "#", LF, lexFiles) + if os.path.exists(root + "scite"): + Regenerate(root + "scite/win32/makefile", "#", NATIVE, lexFiles, propFiles) + Regenerate(root + "scite/win32/scite.mak", "#", NATIVE, lexFiles, propFiles) + Regenerate(root + "scite/src/SciTEProps.cxx", "//", NATIVE, lexerProperties, ids) + Generate(root + "scite/boundscheck/vcproj.gen", + root + "scite/boundscheck/SciTE.vcproj", "#", NATIVE, lexFiles) + +RegenerateAll() diff --git a/sdk/wxscintilla/src/scintilla/src/LexGui4Cli.cxx b/sdk/wxscintilla/src/scintilla/src/LexGui4Cli.cxx new file mode 100644 index 0000000000..a587aac88e --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexGui4Cli.cxx @@ -0,0 +1,313 @@ +// Scintilla source code edit control +// Copyright 1998-2002 by Neil Hodgson +/* +This is the Lexer for Gui4Cli, included in SciLexer.dll +- by d. Keletsekis, 2/10/2003 + +To add to SciLexer.dll: +1. Add the values below to INCLUDE\Scintilla.iface +2. Run the include/HFacer.py script +3. Run the src/lexGen.py script + +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +*/ + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +#define debug Platform::DebugPrintf + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); +} + +inline bool isGCOperator(int ch) +{ if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || ch == '%' || + ch == '[' || ch == ']' || ch == '<' || ch == '>' || + ch == ',' || ch == ';' || ch == ':') + return true; + return false; +} + +#define isSpace(x) ((x)==' ' || (x)=='\t') +#define isNL(x) ((x)=='\n' || (x)=='\r') +#define isSpaceOrNL(x) (isSpace(x) || isNL(x)) +#define BUFFSIZE 500 +#define isFoldPoint(x) ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024) + +static void colorFirstWord(WordList *keywordlists[], Accessor &styler, + StyleContext *sc, char *buff, int length, int) +{ + int c = 0; + while (sc->More() && isSpaceOrNL(sc->ch)) + { sc->Forward(); + } + styler.ColourTo(sc->currentPos - 1, sc->state); + + if (!IsAWordChar(sc->ch)) // comment, marker, etc.. + return; + + while (sc->More() && !isSpaceOrNL(sc->ch) && (c < length-1) && !isGCOperator(sc->ch)) + { buff[c] = static_cast(sc->ch); + ++c; sc->Forward(); + } + buff[c] = '\0'; + char *p = buff; + while (*p) // capitalize.. + { if (islower(*p)) *p = static_cast(toupper(*p)); + ++p; + } + + WordList &kGlobal = *keywordlists[0]; // keyword lists set by the user + WordList &kEvent = *keywordlists[1]; + WordList &kAttribute = *keywordlists[2]; + WordList &kControl = *keywordlists[3]; + WordList &kCommand = *keywordlists[4]; + + int state = 0; + // int level = styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK; + // debug ("line = %d, level = %d", line, level); + + if (kGlobal.InList(buff)) state = SCE_GC_GLOBAL; + else if (kAttribute.InList(buff)) state = SCE_GC_ATTRIBUTE; + else if (kControl.InList(buff)) state = SCE_GC_CONTROL; + else if (kCommand.InList(buff)) state = SCE_GC_COMMAND; + else if (kEvent.InList(buff)) state = SCE_GC_EVENT; + + if (state) + { sc->ChangeState(state); + styler.ColourTo(sc->currentPos - 1, sc->state); + sc->ChangeState(SCE_GC_DEFAULT); + } + else + { sc->ChangeState(SCE_GC_DEFAULT); + styler.ColourTo(sc->currentPos - 1, sc->state); + } +} + +// Main colorizing function called by Scintilla +static void +ColouriseGui4CliDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) +{ + styler.StartAt(startPos); + + int quotestart = 0, oldstate, currentline = styler.GetLine(startPos); + styler.StartSegment(startPos); + bool noforward; + char buff[BUFFSIZE+1]; // buffer for command name + + StyleContext sc(startPos, length, initStyle, styler); + buff[0] = '\0'; // cbuff = 0; + + if (sc.state != SCE_GC_COMMENTBLOCK) // colorize 1st word.. + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + + while (sc.More()) + { noforward = 0; + + switch (sc.ch) + { + case '/': + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_STRING) + break; + if (sc.chNext == '/') // line comment + { sc.SetState (SCE_GC_COMMENTLINE); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else if (sc.chNext == '*') // block comment + { sc.SetState(SCE_GC_COMMENTBLOCK); + sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '*': // end of comment block, or operator.. + if (sc.state == SCE_GC_STRING) + break; + if (sc.state == SCE_GC_COMMENTBLOCK && sc.chNext == '/') + { sc.Forward(); + styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else + styler.ColourTo(sc.currentPos, sc.state); + break; + + case '\'': case '\"': // strings.. + if (sc.state == SCE_GC_COMMENTBLOCK || sc.state == SCE_GC_COMMENTLINE) + break; + if (sc.state == SCE_GC_STRING) + { if (sc.ch == quotestart) // match same quote char.. + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState(SCE_GC_DEFAULT); + quotestart = 0; + } } + else + { styler.ColourTo(sc.currentPos - 1, sc.state); + sc.ChangeState(SCE_GC_STRING); + quotestart = sc.ch; + } + break; + + case ';': // end of commandline character + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + sc.Forward(); + colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + + case '+': case '-': case '=': case '!': // operators.. + case '<': case '>': case '&': case '|': case '$': + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE && + sc.state != SCE_GC_STRING) + { + styler.ColourTo(sc.currentPos - 1, sc.state); + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(SCE_GC_DEFAULT); + } + break; + + case '\\': // escape - same as operator, but also mark in strings.. + if (sc.state != SCE_GC_COMMENTBLOCK && sc.state != SCE_GC_COMMENTLINE) + { + oldstate = sc.state; + styler.ColourTo(sc.currentPos - 1, sc.state); + sc.Forward(); // mark also the next char.. + styler.ColourTo(sc.currentPos, SCE_GC_OPERATOR); + sc.ChangeState(oldstate); + } + break; + + case '\n': case '\r': + ++currentline; + if (sc.state == SCE_GC_COMMENTLINE) + { styler.ColourTo(sc.currentPos, sc.state); + sc.ChangeState (SCE_GC_DEFAULT); + } + else if (sc.state != SCE_GC_COMMENTBLOCK) + { colorFirstWord(keywordlists, styler, &sc, buff, BUFFSIZE, currentline); + noforward = 1; // don't move forward - already positioned at next char.. + } + break; + +// case ' ': case '\t': +// default : + } + + if (!noforward) sc.Forward(); + + } + sc.Complete(); +} + +// Main folding function called by Scintilla - (based on props (.ini) files function) +static void FoldGui4Cli(unsigned int startPos, int length, int, + WordList *[], Accessor &styler) +{ + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + bool headerPoint = false; + + for (unsigned int i = startPos; i < endPos; i++) + { + char ch = chNext; + chNext = styler[i+1]; + + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (style == SCE_GC_EVENT || style == SCE_GC_GLOBAL) + { headerPoint = true; // fold at events and globals + } + + if (atEOL) + { int lev = SC_FOLDLEVELBASE+1; + + if (headerPoint) + lev = SC_FOLDLEVELBASE; + + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + + if (headerPoint) + lev |= SC_FOLDLEVELHEADERFLAG; + + if (lev != styler.LevelAt(lineCurrent)) // set level, if not already correct + { styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; // re-initialize our flags + visibleChars = 0; + headerPoint = false; + } + + if (!(isspacechar(ch))) // || (style == SCE_GC_COMMENTLINE) || (style != SCE_GC_COMMENTBLOCK))) + visibleChars++; + } + + int lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1; + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, lev | flagsNext); +} + +// I have no idea what these are for.. probably accessible by some message. +static const char * const gui4cliWordListDesc[] = { + "Globals", "Events", "Attributes", "Control", "Commands", + 0 +}; + +// Declare language & pass our function pointers to Scintilla +LexerModule lmGui4Cli(SCLEX_GUI4CLI, ColouriseGui4CliDoc, "gui4cli", FoldGui4Cli, gui4cliWordListDesc); + +#undef debug + diff --git a/sdk/wxscintilla/src/scintilla/src/LexHTML.cxx b/sdk/wxscintilla/src/scintilla/src/LexHTML.cxx new file mode 100644 index 0000000000..5a6dd974bd --- /dev/null +++ b/sdk/wxscintilla/src/scintilla/src/LexHTML.cxx @@ -0,0 +1,2068 @@ +// Scintilla source code edit control +/** @file LexHTML.cxx + ** Lexer for HTML. + **/ +// Copyright 1998-2005 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" +#include "CharacterSet.h" + +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + +#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) +#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) +#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) + +enum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock }; +enum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline int MakeLowerCase(int ch) { + if (ch < 'A' || ch > 'Z') + return ch; + else + return ch - 'A' + 'a'; +} + +static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int end, char *s, size_t len) { + size_t i = 0; + for (; (i < end - start + 1) && (i < len-1); i++) { + s[i] = static_cast(MakeLowerCase(styler[start + i])); + } + s[i] = '\0'; +} + +static script_type segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, script_type prevValue) { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + //Platform::DebugPrintf("Scripting indicator [%s]\n", s); + if (strstr(s, "src")) // External script + return eScriptNone; + if (strstr(s, "vbs")) + return eScriptVBS; + if (strstr(s, "pyth")) + return eScriptPython; + if (strstr(s, "javas")) + return eScriptJS; + if (strstr(s, "jscr")) + return eScriptJS; + if (strstr(s, "php")) + return eScriptPHP; + if (strstr(s, "xml")) + return eScriptXML; + + return prevValue; +} + +static int PrintScriptingIndicatorOffset(Accessor &styler, unsigned int start, unsigned int end) { + int iResult = 0; + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (0 == strncmp(s, "php", 3)) { + iResult = 3; + } + + return iResult; +} + +static script_type ScriptOfState(int state) { + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + return eScriptPython; + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + return eScriptVBS; + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + return eScriptJS; + } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { + return eScriptPHP; + } else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) { + return eScriptSGML; + } else if (state == SCE_H_SGML_BLOCK_DEFAULT) { + return eScriptSGMLblock; + } else { + return eScriptNone; + } +} + +static int statePrintForState(int state, script_mode inScriptType) { + int StateToPrint = state; + + if (state >= SCE_HJ_START) { + if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); + } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); + } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { + StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); + } + } + + return StateToPrint; +} + +static int stateForPrintState(int StateToPrint) { + int state; + + if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { + state = StateToPrint - SCE_HA_PYTHON; + } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { + state = StateToPrint - SCE_HA_VBS; + } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) { + state = StateToPrint - SCE_HA_JS; + } else { + state = StateToPrint; + } + + return state; +} + +static inline bool IsNumber(unsigned int start, Accessor &styler) { + return IsADigit(styler[start]) || (styler[start] == '.') || + (styler[start] == '-') || (styler[start] == '#'); +} + +static inline bool isStringState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJA_DOUBLESTRING: + case SCE_HJA_SINGLESTRING: + case SCE_HB_STRING: + case SCE_HBA_STRING: + case SCE_HP_STRING: + case SCE_HP_CHARACTER: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + case SCE_HPA_STRING: + case SCE_HPA_CHARACTER: + case SCE_HPA_TRIPLE: + case SCE_HPA_TRIPLEDOUBLE: + case SCE_HPHP_HSTRING: + case SCE_HPHP_SIMPLESTRING: + case SCE_HPHP_HSTRING_VARIABLE: + case SCE_HPHP_COMPLEX_VARIABLE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +static inline bool stateAllowsTermination(int state) { + bool allowTermination = !isStringState(state); + if (allowTermination) { + switch (state) { + case SCE_HB_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HP_COMMENTLINE: + case SCE_HPA_COMMENTLINE: + allowTermination = false; + } + } + return allowTermination; +} + +// not really well done, since it's only comments that should lex the %> and <% +static inline bool isCommentASPState(int state) { + bool bResult; + + switch (state) { + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTLINE: + case SCE_HJ_COMMENTDOC: + case SCE_HB_COMMENTLINE: + case SCE_HP_COMMENTLINE: + case SCE_HPHP_COMMENT: + case SCE_HPHP_COMMENTLINE: + bResult = true; + break; + default : + bResult = false; + break; + } + return bResult; +} + +static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + bool wordIsNumber = IsNumber(start, styler); + char chAttr = SCE_H_ATTRIBUTEUNKNOWN; + if (wordIsNumber) { + chAttr = SCE_H_NUMBER; + } else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) + chAttr = SCE_H_ATTRIBUTE; + } + if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) + // No keywords -> all are known + chAttr = SCE_H_ATTRIBUTE; + styler.ColourTo(end, chAttr); +} + +static int classifyTagHTML(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, bool &tagDontFold, + bool caseSensitive, bool isXml) { + char s[30 + 2]; + // Copy after the '<' + unsigned int i = 0; + for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) { + char ch = styler[cPos]; + if ((ch != '<') && (ch != '/')) { + s[i++] = caseSensitive ? ch : static_cast(MakeLowerCase(ch)); + } + } + + //The following is only a quick hack, to see if this whole thing would work + //we first need the tagname with a trailing space... + s[i] = ' '; + s[i+1] = '\0'; + + // if the current language is XML, I can fold any tag + // if the current language is HTML, I don't want to fold certain tags (input, meta, etc.) + //...to find it in the list of no-container-tags + tagDontFold = (!isXml) && (NULL != strstr("meta link img area br hr input ",s)); + + //now we can remove the trailing space + s[i] = '\0'; + + bool isScript = false; + char chAttr = SCE_H_TAGUNKNOWN; + if (s[0] == '!') { + chAttr = SCE_H_SGML_DEFAULT; + } else if (s[0] == '/') { // Closing tag + if (keywords.InList(s + 1)) + chAttr = SCE_H_TAG; + } else { + if (keywords.InList(s)) { + chAttr = SCE_H_TAG; + isScript = 0 == strcmp(s, "script"); + } + } + if ((chAttr == SCE_H_TAGUNKNOWN) && !keywords) { + // No keywords -> all are known + chAttr = SCE_H_TAG; + isScript = 0 == strcmp(s, "script"); + } + styler.ColourTo(end, chAttr); + return isScript ? SCE_H_SCRIPT : chAttr; +} + +static void classifyWordHTJS(unsigned int start, unsigned int end, + WordList &keywords, Accessor &styler, script_mode inScriptType) { + char chAttr = SCE_HJ_WORD; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HJ_NUMBER; + else { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + if (keywords.InList(s)) + chAttr = SCE_HJ_KEYWORD; + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); +} + +static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, script_mode inScriptType) { + char chAttr = SCE_HB_IDENTIFIER; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); + if (wordIsNumber) + chAttr = SCE_HB_NUMBER; + else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) { + chAttr = SCE_HB_WORD; + if (strcmp(s, "rem") == 0) + chAttr = SCE_HB_COMMENTLINE; + } + } + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + if (chAttr == SCE_HB_COMMENTLINE) + return SCE_HB_COMMENTLINE; + else + return SCE_HB_DEFAULT; +} + +static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, script_mode inScriptType) { + bool wordIsNumber = IsADigit(styler[start]); + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + char chAttr = SCE_HP_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) + chAttr = SCE_HP_CLASSNAME; + else if (0 == strcmp(prevWord, "def")) + chAttr = SCE_HP_DEFNAME; + else if (wordIsNumber) + chAttr = SCE_HP_NUMBER; + else if (keywords.InList(s)) + chAttr = SCE_HP_WORD; + styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); + strcpy(prevWord, s); +} + +// Update the word colour to default or keyword +// Called when in a PHP word +static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char chAttr = SCE_HPHP_DEFAULT; + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1])); + if (wordIsNumber) + chAttr = SCE_HPHP_NUMBER; + else { + char s[100]; + GetTextSegment(styler, start, end, s, sizeof(s)); + if (keywords.InList(s)) + chAttr = SCE_HPHP_WORD; + } + styler.ColourTo(end, chAttr); +} + +static bool isWordHSGML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + return keywords.InList(s); +} + +static bool isWordCdata(unsigned int start, unsigned int end, Accessor &styler) { + char s[30 + 1]; + unsigned int i = 0; + for (; i < end - start + 1 && i < 30; i++) { + s[i] = styler[start + i]; + } + s[i] = '\0'; + return (0 == strcmp(s, "[CDATA[")); +} + +// Return the first state to reach when entering a scripting language +static int StateForScript(script_type scriptLanguage) { + int Result; + switch (scriptLanguage) { + case eScriptVBS: + Result = SCE_HB_START; + break; + case eScriptPython: + Result = SCE_HP_START; + break; + case eScriptPHP: + Result = SCE_HPHP_DEFAULT; + break; + case eScriptXML: + Result = SCE_H_TAGUNKNOWN; + break; + case eScriptSGML: + Result = SCE_H_SGML_DEFAULT; + break; + default : + Result = SCE_HJ_START; + break; + } + return Result; +} + +static inline bool ishtmlwordchar(char ch) { + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'); +} + +static inline bool issgmlwordchar(char ch) { + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); +} + +static inline bool IsPhpWordStart(const unsigned char ch) { + return (isascii(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); +} + +static inline bool IsPhpWordChar(char ch) { + return IsADigit(ch) || IsPhpWordStart(ch); +} + +static bool InTagState(int state) { + return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || + state == SCE_H_SCRIPT || + state == SCE_H_ATTRIBUTE || state == SCE_H_ATTRIBUTEUNKNOWN || + state == SCE_H_NUMBER || state == SCE_H_OTHER || + state == SCE_H_DOUBLESTRING || state == SCE_H_SINGLESTRING; +} + +static bool IsCommentState(const int state) { + return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT; +} + +static bool IsScriptCommentState(const int state) { + return state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTLINE || state == SCE_HJA_COMMENT || + state == SCE_HJA_COMMENTLINE || state == SCE_HB_COMMENTLINE || state == SCE_HBA_COMMENTLINE; +} + +static bool isLineEnd(char ch) { + return ch == '\r' || ch == '\n'; +} + +static bool isOKBeforeRE(char ch) { + return (ch == '(') || (ch == '=') || (ch == ','); +} + +static bool isPHPStringState(int state) { + return + (state == SCE_HPHP_HSTRING) || + (state == SCE_HPHP_SIMPLESTRING) || + (state == SCE_HPHP_HSTRING_VARIABLE) || + (state == SCE_HPHP_COMPLEX_VARIABLE); +} + +static int FindPhpStringDelimiter(char *phpStringDelimiter, const int phpStringDelimiterSize, int i, const int lengthDoc, Accessor &styler) { + int j; + while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) + i++; + phpStringDelimiter[0] = '\n'; + for (j = i; j < lengthDoc && styler[j] != '\n' && styler[j] != '\r'; j++) { + if (j - i < phpStringDelimiterSize - 2) + phpStringDelimiter[j-i+1] = styler[j]; + else + i++; + } + phpStringDelimiter[j-i+1] = '\0'; + return j; +} + +static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler, bool isXml) { + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; // SGML (DTD) keywords + + // Lexer for HTML requires more lexical states (7 bits worth) than most lexers + styler.StartAt(startPos, STYLE_MAX); + char prevWord[200]; + prevWord[0] = '\0'; + char phpStringDelimiter[200]; // PHP is not limited in length, we are + phpStringDelimiter[0] = '\0'; + int StateToPrint = initStyle; + int state = stateForPrintState(StateToPrint); + + // If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen + if (InTagState(state)) { + while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) { + startPos--; + length++; + } + state = SCE_H_DEFAULT; + } + // String can be heredoc, must find a delimiter first + while (startPos > 0 && isPHPStringState(state) && state != SCE_HPHP_SIMPLESTRING) { + startPos--; + length++; + state = styler.StyleAt(startPos); + } + styler.StartAt(startPos, STYLE_MAX); + + int lineCurrent = styler.GetLine(startPos); + int lineState; + if (lineCurrent > 0) { + lineState = styler.GetLineState(lineCurrent); + } else { + // Default client and ASP scripting language is JavaScript + lineState = eScriptJS << 8; + lineState |= styler.GetPropertyInt("asp.default.language", eScriptJS) << 4; + } + script_mode inScriptType = script_mode((lineState >> 0) & 0x03); // 2 bits of scripting mode + bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag + bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag + bool tagDontFold = false; //some HTML tags should not be folded + script_type aspScript = script_type((lineState >> 4) & 0x0F); // 4 bits of script name + script_type clientScript = script_type((lineState >> 8) & 0x0F); // 4 bits of script name + int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state + + script_type scriptLanguage = ScriptOfState(state); + + const bool foldHTML = styler.GetPropertyInt("fold.html", 0) != 0; + const bool fold = foldHTML && styler.GetPropertyInt("fold", 0); + const bool foldHTMLPreprocessor = foldHTML && styler.GetPropertyInt("fold.html.preprocessor", 1); + const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + const bool caseSensitive = styler.GetPropertyInt("html.tags.case.sensitive", 0) != 0; + + const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", 0x80, true); + const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", 0x80, true); + const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", 0x80, true); + + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int visibleChars = 0; + + char chPrev = ' '; + char ch = ' '; + char chPrevNonWhite = ' '; + // look back to set chPrevNonWhite properly for better regex colouring + if (scriptLanguage == eScriptJS && startPos > 0) { + int back = startPos; + int style = 0; + while (--back) { + style = styler.StyleAt(back); + if (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC) + // includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE + break; + } + if (style == SCE_HJ_SYMBOLS) { + chPrevNonWhite = styler.SafeGetCharAt(back); + } + } + + styler.StartSegment(startPos); + const int lengthDoc = startPos + length; + for (int i = startPos; i < lengthDoc; i++) { + const char chPrev2 = chPrev; + chPrev = ch; + if (!isspacechar(ch) && state != SCE_HJ_COMMENT && + state != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC) + chPrevNonWhite = ch; + ch = styler[i]; + char chNext = styler.SafeGetCharAt(i + 1); + const char chNext2 = styler.SafeGetCharAt(i + 2); + + // Handle DBCS codepages + if (styler.IsLeadByte(ch)) { + chPrev = ' '; + i += 1; + continue; + } + + if ((!isspacechar(ch) || !foldCompact) && fold) + visibleChars++; + + // decide what is the current state to print (depending of the script tag) + StateToPrint = statePrintForState(state, inScriptType); + + // handle script folding + if (fold) { + switch (scriptLanguage) { + case eScriptJS: + case eScriptPHP: + //not currently supported case eScriptVBS: + + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { + //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); + //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { + if ((ch == '{') || (ch == '}')) { + levelCurrent += (ch == '{') ? 1 : -1; + } + } + break; + case eScriptPython: + if (state != SCE_HP_COMMENTLINE) { + if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { + levelCurrent++; + } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { + // check if the number of tabs is lower than the level + int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; + for (int j = 0; Findlevel > 0; j++) { + char chTmp = styler.SafeGetCharAt(i + j + 1); + if (chTmp == '\t') { + Findlevel -= 8; + } else if (chTmp == ' ') { + Findlevel--; + } else { + break; + } + } + + if (Findlevel > 0) { + levelCurrent -= Findlevel / 8; + if (Findlevel % 8) + levelCurrent--; + } + } + } + break; + default: + break; + } + } + + if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) + // Avoid triggering two times on Dos/Win + // New line -> record any line state onto /next/ line + if (fold) { + int lev = levelPrev; + if (visibleChars == 0) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + + styler.SetLevel(lineCurrent, lev); + visibleChars = 0; + levelPrev = levelCurrent; + } + lineCurrent++; + styler.SetLineState(lineCurrent, + ((inScriptType & 0x03) << 0) | + ((tagOpened & 0x01) << 2) | + ((tagClosing & 0x01) << 3) | + ((aspScript & 0x0F) << 4) | + ((clientScript & 0x0F) << 8) | + ((beforePreProc & 0xFF) << 12)); + } + + // generic end of script processing + else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { + // Check if it's the end of the script tag (or any other HTML tag) + switch (state) { + // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) + case SCE_H_DOUBLESTRING: + case SCE_H_SINGLESTRING: + case SCE_HJ_COMMENT: + case SCE_HJ_COMMENTDOC: + //case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide + // the end of script marker from some JS interpreters. + case SCE_HJ_DOUBLESTRING: + case SCE_HJ_SINGLESTRING: + case SCE_HJ_REGEX: + case SCE_HB_STRING: + case SCE_HP_STRING: + case SCE_HP_TRIPLE: + case SCE_HP_TRIPLEDOUBLE: + break; + default : + // check if the closing tag is a script tag + if (state == SCE_HJ_COMMENTLINE || isXml) { + char tag[7]; // room for the

    Is-&O?B`8 zdW1P=&PYkt8s*VMr(kr0zriqZ;blxzcG99E-UC;sSRnm1Lsr+wW>63&!y6lZHFnH~#J@MPPSJpRk;9zWwcVH|T-WPR_u8gAjnR=?)ru?P-4gNa& zHun4NhtPUf z1C$_3@=NkDe^{Iu9*SDGh;p+V{lIJ+U=Wg<^|V;FDl_2Q;$BlO>N(|ZMu-@~O0KKB zYq!Jk;a~pDL~JJSk}}U!EMmJQyq7aSEcBLr0V2o_kidq=M}L`Pl*C*LRrR)FD9)() zqCsa?MG4Gp%ky;^*codGNn3kejQ1)3qHwe-2^_?V&zqLT}ygQBm-Ibti%0N ztHU+ZPY+B!Vz5JfiZ!MM2~E=T?>e12y<9mbe4x;}B|~ON-t#tgeTHf@Fv1KLJbg); zow7Rgy4ac-RT~B%+(uKApf9|j!9=+fTLtSMyj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PI4fw=_)e?wWOx32(>62JjXluVOv;{4ez8*#Ug-zCr|GJ5R7n1_L?YfkG6XE;5|mAWQQ7?@_j?_OMwnisykIX6?BT3OaK!0_n`44sd+Uept>2?3_k*@AFfTmObWQd^UIsYcr z_&%KbzmPz)9dHu_4?>{P?&b1LB+&YH*Cr1<4*gn9?z%`pD>s3z&PqV z^@WALVQ+9XU4K1~d5v`W+~gJM-_E12la^4SZ#td6HumKy@}Fa0hUQ;Sfv-AebdCS-bL;;HY%>^} literal 0 HcmV?d00001 diff --git a/sdk/wxconfig/INSTALL.txt b/sdk/wxconfig/INSTALL.txt new file mode 100644 index 0000000000..9980cd08be --- /dev/null +++ b/sdk/wxconfig/INSTALL.txt @@ -0,0 +1,31 @@ +//-------------------------------------------------------------------------------------------- +// INSTALLATION wx-config +//-------------------------------------------------------------------------------------------- + +For installing wx-config-win simply copy the file wx-config.exe to somewhere in your PATH. +Examples: C:\Windows\System32\wx-config.exe + C:\MinGW\bin\wx-config.exe + +Set the environmental variable WXWIN to where you have installed wxWidgets. +Example: WXWIN=C:\wxWidgets + +For more info see README.txt + +//-------------------------------------------------------------------------------------------- +// COMPILATION of wx-config +//-------------------------------------------------------------------------------------------- + +If you have Code::Blocks, a project is provided. +Just do a right-click on the .cbp and click "Build". + +If you don't have Code::Blocks: +Open a console (cmd.exe) and type the following (make sure the compiler is in PATH): + +For mingw: + mingw32-g++ wx-config-win.cpp -s -o wx-config.exe + +For dmc: + dmc wx-config-win.cpp -owx-config.exe + +For vc: + cl wx-config-win.cpp diff --git a/sdk/wxconfig/README.txt b/sdk/wxconfig/README.txt new file mode 100644 index 0000000000..5cfb9f9314 --- /dev/null +++ b/sdk/wxconfig/README.txt @@ -0,0 +1,77 @@ +//-------------------------------------------------------------------------------------------- +// Name: wx-config-win +// Purpose: A wx-config implementation for MinGW/DMars/VC +// Author: Takeshi Miya +// Created: 2006-03-23 +// Copyright: (c) Takeshi Miya +// Licence: wxWidgets licence +// $URL: http://wx-config-win.googlecode.com/svn/trunk/README.txt $ +//-------------------------------------------------------------------------------------------- + +wx-config-win is a tiny implementation of wx-config for Windows compilers. + +wx-config is a helper tool used when compiling applications that makes use of the wxWidgets library. +It helps you insert the correct compiler options on the command line so an application can use +g++ -o test.exe test.cpp `wx-config --libs --cflags` for instance, rather than hard-coding +values on where to find wxWidgets and it's configurations (monolithic, debug, unicode, wxuniversal, etc). + +Note that backticks is a property of the shell or the build system used. +Fortunately the Code::Blocks IDE supports backticks natively on windows. +For other Windows IDEs and build systems there are workarounds, commonly using "response files". + + +Usage: wx-config [options] +Options: + --prefix[=DIR] Path of the wxWidgets installation (ie. C:\wxWidgets2.6.3) + --wxcfg[=DIR] Relative path of the build.cfg file (ie. gcc_dll\mswud) + --cflags Outputs all pre-processor and compiler flags. + --cxxflags Same as --cflags but for C++. + --rcflags Outputs all resource compiler flags. [UNTESTED] + --libs Outputs all linker flags. + + --debug[=yes|no] Uses a debug configuration if found. + --unicode[=yes|no] Uses an unicode configuration if found. + --static[=yes|no] Uses a static configuration if found. + --universal[=yes|no] Uses an universal configuration if found. + --compiler[=gcc,dmc,vc] Selects the compiler. + --release Outputs the wxWidgets release number. + --cc Outputs the name of the C compiler. + --cxx Outputs the name of the C++ compiler. + --ld Outputs the linker command. + -v Outputs the revision of wx-config. + + Note that using --prefix is not needed if you have defined the + environmental variable WXWIN. + + Also note that using --wxcfg is not needed if you have defined the + environmental variable WXCFG. + +//-------------------------------------------------------------------------------------------- + +The currently supported compilers are: +* GNU MinGW [gcc] +* MS Visual C++ [vc] +* Digital Mars [dmc] + +Advantages of using wx-config-win: +* Same commands for build in linux, mac, and windows. +* Doesn't need cygwin (there is a wx-config for cygwin already). +* The projects of the IDE will be exactly the same in all systems for most cases. +* Separates the user library configurations entirely from the project. +* The makefiles exported by the IDE (if any) will be a lot smaller and easier to handle. +* Can be used from the console (redirecting the output) or from an IDE that supports backticks (like Code::Blocks). +* Source code is 1 single cpp so you can include and compile it as a dependency easily in your project if you want. +* No dependencies, only ISO/C++ standard code. +* Feel free to hack it :) + +Disvantages of using wx-config-win: +* Only works on something (IDE, build system, console, etc) that supports backticks or redirecting the output + (though there are workarounds for IDEs that doesn't, like Visual Studio IDE). +* The whole "*-config" scripts are dying on linux (ie. sdl-config, wx-config, gtk-config, ...). + There is a strong standard on *nix now called pkg-config, developed by FreeDesktop, and is being used + in a lot of packages, like gtk, glib, sqlite, etc (and there is a pkg-config.exe for windows too). + So this solution is a temporal relief (I hope) so that when in future versions of the library uses the pkg-config + standard, there wouldn't be any need for this. + Here's the FR: http://sourceforge.net/tracker/index.php?func=detail&aid=1434365&group_id=9863&atid=359863 + +//-------------------------------------------------------------------------------------------- diff --git a/sdk/wxconfig/wx-config-win.cbp b/sdk/wxconfig/wx-config-win.cbp new file mode 100644 index 0000000000..5dd86f5451 --- /dev/null +++ b/sdk/wxconfig/wx-config-win.cbp @@ -0,0 +1,63 @@ + + + + + + \ No newline at end of file diff --git a/sdk/wxconfig/wx-config-win.cpp b/sdk/wxconfig/wx-config-win.cpp new file mode 100644 index 0000000000..52b1b19a0b --- /dev/null +++ b/sdk/wxconfig/wx-config-win.cpp @@ -0,0 +1,2608 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Name: wx-config-win.cpp +// Purpose: A wx-config implementation for Windows +// Author: Takeshi Miya +// Created: 2006-03-23 +// Copyright: (c) Takeshi Miya +// Licence: wxWidgets licence +// $Rev: 26 $ +// $URL: http://wx-config-win.googlecode.com/svn/trunk/wx-config-win.cpp $ +// $Date: 2006-12-21 04:08:16 +0200 (Thu, 21 Dec 2006) $ +// $Id: wx-config-win.cpp 26 2006-12-21 02:08:16Z takeshimiya $ +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +#include +#include +#include +#include + +#include + +// ------------------------------------------------------------------------------------------------- + +std::string getSvnRevision() +{ + std::string str = "$Rev: 26 $"; + if (str.length() > 8) + return str.substr(6, str.length()-8); + else + return "X"; +} + +std::string getSvnDate() +{ + std::string str = "$Date: 2006-12-21 04:08:16 +0200 (Thu, 21 Dec 2006) $"; + if (str.length() > 16) + return str.substr(7, 10); + else + return "2006-XX-XX"; +} + +static const std::string g_tokError = "wx-config Error: "; +static const std::string g_tokWarning = "wx-config Warning: "; + +// ------------------------------------------------------------------------------------------------- + +/// Program options +class Options +{ +public: + std::string& operator[](const std::string& key) + { + return m_vars[key]; + } + + bool keyExists(const std::string& key) const + { + return m_vars.count(key) != 0; + } + + const std::string& keyValue(const std::string& key) const + { + return m_vars.find(key)->second; + } + + std::map& getVars() + { + return m_vars; + } +protected: + std::map m_vars; +}; + +// ------------------------------------------------------------------------------------------------- + +/// File build.cfg/config.* options +class BuildFileOptions : public Options +{ +public: + BuildFileOptions(const std::string& filepath) + { + parse(filepath); + } + + bool parse(const std::string& filepath) + { + std::string line; + std::ifstream file(filepath.c_str()); + if (file.is_open()) + { + while (!file.eof() ) + { + std::getline(file, line); + + // it's a comment line + if (line.find_first_of('#') != std::string::npos) + continue; + + // strip spaces + line.erase( std::remove(line.begin(), line.end(), ' '), line.end() ); + + split(line); + } + file.close(); + + if (!m_vars.empty()) + return true; + } + else + std::cout << g_tokError << "Unable to open file '" << filepath.c_str() << "'." << std::endl; + + return false; + } + +protected: + void split(const std::string& line) + { + size_t sep = line.find('='); + if (sep != std::string::npos) + { + std::string key = line.substr(0, sep); + std::string val = line.substr(sep+1, line.size()-sep-1); + m_vars[key] = val; + } + } +}; + +// ------------------------------------------------------------------------------------------------- + +/// File setup.h options +class SetupHOptions +{ +public: + bool& operator[](const std::string& key) + { + return m_vars[key]; + } + + bool keyExists(const std::string& key) const + { + return m_vars.count(key) != 0; + } + + bool keyValue(const std::string& key) const + { + return m_vars.find(key)->second; + } + + typedef std::map StringBoolMap; + + StringBoolMap& getVars() + { + return m_vars; + } +protected: + StringBoolMap m_vars; + + +public: + SetupHOptions(const std::string& filepath) + { + parse(filepath); + } + + bool parse(const std::string& filepath) + { + std::string line; + std::ifstream file(filepath.c_str()); + if (file.is_open()) + { + while (!file.eof()) + { + std::getline(file, line); + + // does the splitting/parsing + split(line); + } + file.close(); + + if (!m_vars.empty()) + return true; + } + else + std::cout << g_tokError << "Unable to open file '" << filepath.c_str() << "'." << std::endl; + + return false; + } + + void printDebug() + { + std::cout << "DEBUG: setup.h contents BEGIN -------------------------------------------------" << std::endl; + for (StringBoolMap::iterator it = m_vars.begin(); it != m_vars.end(); ++it) + std::cout << it->first << "=" << it->second << std::endl; + std::cout << "DEBUG: setup.h contents END ---------------------------------------------------" << std::endl; + } + +protected: + void split(std::string& line) + { + // it's a comment line + if (line.find_first_of('/') != std::string::npos) + return; // skips the line + + // strip spaces and tabs + line.erase( std::remove(line.begin(), line.end(), ' '), line.end() ); + line.erase( std::remove(line.begin(), line.end(), '\t'), line.end() ); + + std::string tokDefine("#define"); + size_t posDefine = line.find_first_of(tokDefine); + + // it's a #define line + if (posDefine != std::string::npos) + { + std::string key; + bool val; + + // resolves val, checking if last char is 0 or 1 + char lastChar = line.at(line.length()-1); // TODO: I don't like this line :P + if (lastChar == '0') + val = false; + else if (lastChar == '1') + val = true; + else + return; // skips the line + + // resolves key + size_t startPos = posDefine + tokDefine.length(); + key = line.substr(startPos, line.length() - startPos - 1); + + // finally saves the parsed data! + m_vars[key] = val; + } + } +}; + + +// ------------------------------------------------------------------------------------------------- + +/// Command line options +class CmdLineOptions : public Options +{ +public: + CmdLineOptions(int argc, char* argv[]) + { + parse(argc, argv); + } + + bool validArgs() + { + bool valid = keyExists("--compiler") || + keyExists("--easymode") || + keyExists("--variable") || + keyExists("--define-variable") || + keyExists("--prefix") || + keyExists("--wxcfg") || + keyExists("--libs") || + keyExists("--cflags") || + keyExists("--cxxflags") || + keyExists("--cppflags") || + keyExists("--rcflags") || + keyExists("--list") || + keyExists("--debug") || + keyExists("--unicode") || + keyExists("--static") || + keyExists("--universal") || + keyExists("--release") || + keyExists("--version") || + keyExists("--basename") || + keyExists("--cc") || + keyExists("--cxx") || + keyExists("--ld") || + keyExists("-v"); + + // TODO: not all flags are being validated + if(!valid) + { + if (m_vars.size() > 1 && !keyExists("--help")) + std::cout << g_tokError << "Unrecognised option: '" << m_vars.begin()->first << "'\n" << std::endl; + + std::cerr << "Usage: wx-config [options]\n"; + std::cerr << "Options:\n"; + std::cerr << " --prefix[=DIR] Path of the wxWidgets installation (ie. C:\\wxWidgets2.6.3)\n"; + std::cerr << " --wxcfg[=DIR] Relative path of the build.cfg file (ie. gcc_dll\\mswud)\n"; +// std::cerr << " --list Lists all the library configurations. [NOT IMPLEMENTED]\n"; + std::cerr << " --cflags Outputs all pre-processor and compiler flags.\n"; + std::cerr << " --cxxflags Same as --cflags but for C++.\n"; + std::cerr << " --rcflags Outputs all resource compiler flags. [UNTESTED]\n"; + std::cerr << " --libs Outputs all linker flags.\n"; + std::cerr << std::endl; + std::cerr << " --debug[=yes|no] Uses a debug configuration if found.\n"; + std::cerr << " --unicode[=yes|no] Uses an unicode configuration if found.\n"; + std::cerr << " --static[=yes|no] Uses a static configuration if found.\n"; + std::cerr << " --universal[=yes|no] Uses an universal configuration if found.\n"; +// std::cerr << " --easymode[=yes|no] Outputs warnings, and optimize flags.\n"; + std::cerr << " --compiler[=gcc,dmc,vc] Selects the compiler.\n"; +// std::cerr << " --variable=NAME Returns the value of a defined variable.\n"; +// std::cerr << " --define-variable=NAME=VAL Sets a global value for a variable.\n"; + std::cerr << " --release Outputs the wxWidgets release number.\n"; + std::cerr << " --version Outputs the wxWidgets version.\n"; + std::cerr << " --basename Outputs the base name of the wxWidgets libraries.\n"; + std::cerr << " --cc Outputs the name of the C compiler.\n"; + std::cerr << " --cxx Outputs the name of the C++ compiler.\n"; + std::cerr << " --ld Outputs the linker command.\n"; + std::cerr << " -v Outputs the revision of wx-config.\n"; + + + std::cerr << std::endl; + std::cerr << " Note that using --prefix is not needed if you have defined the \n"; + std::cerr << " environmental variable WXWIN.\n"; + std::cerr << std::endl; + std::cerr << " Also note that using --wxcfg is not needed if you have defined the \n"; + std::cerr << " environmental variable WXCFG.\n"; + std::cerr << std::endl; + } + + return valid; + } + + bool parse(int argc, char* argv[]) + { + for(int i=0; i getLibs() const + { + return m_libs; + } + +protected: + + void split(const std::string& line) + { + size_t sep = line.find("="); + if (sep != std::string::npos) + { + std::string key = line.substr(0, sep); + std::string val = line.substr(sep+1, line.size()-sep-1); + m_vars[key] = val; + } + else + m_vars[line] = ""; + } + + bool libExists(const std::string& lib) + { + return std::find(m_libs.begin(), m_libs.end(), lib) != m_libs.end(); + } + + void addLib(const std::string& lib) + { + // adds the lib if its not present already + if (!libExists(lib)) + m_libs.push_back(lib); + } + + void parseLibs(const std::string libs) + { + std::string param = libs; + + // if the last parameter doesn't haves a -- switch + if (param.find("--") == std::string::npos) + { + // saves in the vector, comma separated text like "text1,text2,text3,text4" + while(true) + { + size_t comma = param.find(","); + if (comma != std::string::npos) + { + m_libs.push_back(param.substr(0, comma)); + param = param.substr(comma+1, param.size()-comma-1); + } + else + { + m_libs.push_back(param); + break; + } + } + } + + // assuming magic keyword 'std' as a lib parameter for non-monolithic + // magic keyword std: links with xrc,qa,html,adv,core,base_xml,base_net,base + if (m_libs.empty() || libExists("std")) + { + addLib("xrc"); + addLib("qa"); + addLib("html"); + addLib("adv"); + addLib("core"); + addLib("xml"); + addLib("net"); + addLib("base"); + } + } + + std::vector m_libs; +}; + +// ------------------------------------------------------------------------------------------------- + +/// Struct to keep programs +struct CompilerPrograms +{ + std::string cc; // C compiler + std::string cxx; // C++ compiler + std::string ld; // dynamic libs linker + std::string lib; // static libs linker + std::string windres; // resource compiler +}; + +/// Struct to keep switches +struct CompilerSwitches +{ + std::string includeDirs; // -I + std::string resIncludeDirs; // --include-dir + std::string libDirs; // -L + std::string linkLibs; // -l + std::string libPrefix; // lib + std::string libExtension; // a + std::string defines; // -D + std::string resDefines; // --define + std::string genericSwitch; // - + std::string objectExtension; // o + bool forceLinkerUseQuotes; // use quotes for filenames in linker command line (needed or not)? + bool forceCompilerUseQuotes; // use quotes for filenames in compiler command line (needed or not)? + bool linkerNeedsLibPrefix; // when adding a link library, linker needs prefix? + bool linkerNeedsLibExtension; // when adding a link library, linker needs extension? + bool supportsPCH; // supports precompiled headers? + std::string PCHExtension; // precompiled headers extension +}; + +static bool g_sEasyMode = false; + +void checkEasyMode(CmdLineOptions& cl) +{ + if (cl.keyExists("--easymode")) + { + if (cl["--easymode"] == "no") + g_sEasyMode = false; + else if (cl["--easymode"] == "yes" || cl["--easymode"].empty()) + g_sEasyMode = true; + } +} + +/// Compiler abstract base class +class Compiler +{ +public: + Compiler(const std::string& name) : m_name(name) {} + // ~Compiler(); + + std::string easyMode(const std::string& str) + { + if (g_sEasyMode) + return str; + else + return std::string(); + } + + std::string addFlag(const std::string& flag) + { + if (flag.empty()) + return ""; + return flag + " "; + } + + std::string addLib(const std::string& lib) + { + std::string result; + result = m_switches.linkLibs; + + if (m_switches.linkerNeedsLibPrefix) + result += m_switches.libPrefix; + + result += lib; + + if (m_switches.linkerNeedsLibExtension) + result += "." + m_switches.libExtension; + + result += " "; + + if (lib.empty()) + return ""; + return result; + } + + std::string addDefine(const std::string& define) + { + if (define.empty()) + return ""; + return m_switches.defines + define + " "; + } + + std::string addResDefine(const std::string& resDefine) + { + if (resDefine.empty()) + return ""; + return m_switches.resDefines + " " + resDefine + " "; + } + + std::string addIncludeDir(const std::string& includeDir) + { + if (includeDir.empty()) + return ""; + return m_switches.includeDirs + includeDir + " "; + } + + std::string addLinkerDir(const std::string& libDir) + { + if (libDir.empty()) + return ""; + return m_switches.libDirs + libDir + " "; + } + + std::string addResIncludeDir(const std::string& resIncludeDir) + { + if (resIncludeDir.empty()) + return ""; + return m_switches.resIncludeDirs + " " + resIncludeDir + " "; + } +/* + std::string addResLinkerDir(const std::string& resLibDir) + { + if (resLibDir.empty()) + return ""; + return m_switches.libDirs + libDir + " "; + }*/ + + std::string getName() const + { + return m_name; + } + + void process_3(Options& po, const CmdLineOptions& cl, BuildFileOptions& cfg) + { + SetupHOptions sho(po["wxcfgsetuphfile"]); + + // FIXME: proper place of this would be in a first hook, say process_1(); + if (cl.keyExists("--define-variable")) + { + std::string strDef = cl.keyValue("--define-variable"); + size_t sep = strDef.find("="); + if (sep != std::string::npos) + { + std::string key = strDef.substr(0, sep); + std::string val = strDef.substr(sep+1, strDef.size()-sep-1); + + po[key] = val; + cfg[key] = val; + + if (val == "1" || val == "true") + sho[key] = true; + else if (val == "0" || val == "false") + sho[key] = false; + } + else + { + std::cout << g_tokError << "Failed to define a variable as '" << cl.keyValue("--define-variable") << "'." << std::endl; + std::cout << "The syntax is --define-variable=VARIABLENAME=VARIABLEVALUE" << std::endl; + exit(1); + } + } + + + /// Overriding flags sho->cfg!! + /// This makes sho variables haves more privilege than cfg ones + //------------------------------------------------------------- + if (sho.keyExists("wxUSE_UNICODE_MSLU")) + sho["wxUSE_UNICODE_MSLU"] ? cfg["MSLU"] = "1" : cfg["MSLU"] = "0"; + + // TODO: probably better!!!: + if (cfg.keyExists("MSLU")) + sho["wxUSE_UNICODE_MSLU"] ? cfg["MSLU"] = "1" : cfg["MSLU"] = "0"; + + //------------------------------------------------------------- + + /// Overriding compiler programs + if (cfg.keyExists("CC")) + m_programs.cc = cfg["CC"]; + + if (cfg.keyExists("CXX")) + m_programs.cxx = cfg["CXX"]; + + if (cfg.keyExists("LD")) + m_programs.ld = cfg["LD"]; + + if (cfg.keyExists("LIB")) + m_programs.lib = cfg["LIB"]; + + if (cfg.keyExists("WINDRES")) + m_programs.windres = cfg["WINDRES"]; + + //------------------------------------------------------------- + + + // BASENAME variables + po["LIB_BASENAME_MSW"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"]; + po["LIB_BASENAME_MSW"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + + po["LIB_BASENAME_BASE"] = "wxbase" + po["WX_RELEASE_NODOT"] + po["WXUNICODEFLAG"]; + po["LIB_BASENAME_BASE"] += po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + + + for (size_t i=0; i + + + ole2w32 + odbc32 + + + + + kernel32 + user32 + gdi32 + comdlg32 + winspool + winmm + shell32 + comctl32 + ole32 + oleaut32 + uuid + rpcrt4 + advapi32 + wsock32 + odbc32 + + + + + oleacc +*/ + } + + std::string getAllLibs(Options& po) + { + std::string libs; + libs += po["__WXLIB_ARGS_p"] + po["__WXLIB_OPENGL_p"] + po["__WXLIB_MEDIA_p"]; + libs += po["__WXLIB_DBGRID_p"] + po["__WXLIB_ODBC_p"] + po["__WXLIB_XRC_p"]; + libs += po["__WXLIB_QA_p"] + po["__WXLIB_AUI_p"] + po["__WXLIB_HTML_p"] + po["__WXLIB_ADV_p"]; + libs += po["__WXLIB_CORE_p"] + po["__WXLIB_XML_p"] + po["__WXLIB_NET_p"]; + libs += po["__WXLIB_BASE_p"] + po["__WXLIB_MONO_p"]; + libs += po["__LIB_TIFF_p"] + po["__LIB_JPEG_p"] + po["__LIB_PNG_p"]; + libs += po["__LIB_ZLIB_p"] + po["__LIB_REGEX_p"] + po["__LIB_EXPAT_p"]; + libs += po["EXTRALIBS_FOR_BASE"] + po["__UNICOWS_LIB_p"] + po["__GDIPLUS_LIB_p"]; + libs += po["__LIB_KERNEL32_p"] + po["__LIB_USER32_p"] + po["__LIB_GDI32_p"]; + libs += po["__LIB_COMDLG32_p"] + po["__LIB_REGEX_p"] + po["__LIB_WINSPOOL_p"]; + libs += po["__LIB_WINMM_p"] + po["__LIB_SHELL32_p"] + po["__LIB_COMCTL32_p"]; + libs += po["__LIB_OLE32_p"] + po["__LIB_OLEAUT32_p"] + po["__LIB_UUID_p"]; + libs += po["__LIB_RPCRT4_p"] + po["__LIB_ADVAPI32_p"] + po["__LIB_WSOCK32_p"]; + libs += po["__LIB_ODBC32_p"]; + + return libs; + } + + void getVariablesValues(Options& po, const CmdLineOptions& cl, BuildFileOptions& cfg) + { + if (cl.keyExists("--variable")) + { + std::string var = cl.keyValue("--variable"); + + if (po.keyExists(var)) + po["variable"] += "PO: " + var + "=" + po[var] + "\n"; + else + po["variable"] += "PO: " + var + " does not exist.\n"; + + if (cfg.keyExists(var)) + po["variable"] += "CFG: " + var + "=" + cfg[var] + "\n"; + else + po["variable"] += "CFG: " + var + " does not exist.\n"; + } + } + +protected: + // set the following members in your class + std::string m_name; + CompilerPrograms m_programs; + CompilerSwitches m_switches; +}; + +// ------------------------------------------------------------------------------------------------- + +/// MinGW compiler +class CompilerMinGW : public Compiler +{ +public: + CompilerMinGW() : Compiler("gcc") + { + m_programs.cc = "mingw32-gcc"; + m_programs.cxx = "mingw32-g++"; + m_programs.ld = "mingw32-g++ -shared -fPIC -o "; + m_programs.lib = "ar.exe"; + m_programs.windres = "windres"; + + m_switches.includeDirs = "-I"; + m_switches.resIncludeDirs = "--include-dir"; + m_switches.libDirs = "-L"; + m_switches.linkLibs = "-l"; + m_switches.libPrefix = "lib"; + m_switches.libExtension = "a"; + m_switches.defines = "-D"; + m_switches.resDefines = "--define"; + m_switches.genericSwitch = "-"; + m_switches.forceCompilerUseQuotes = false; + m_switches.forceLinkerUseQuotes = false; + m_switches.linkerNeedsLibPrefix = false; + m_switches.linkerNeedsLibExtension = false; + m_switches.supportsPCH = true; + m_switches.PCHExtension = "h.gch"; + } + + void process(Options& po, const CmdLineOptions& cl) + { + /// Searchs for '\build\msw\config.*' first + std::string cfg_first = po["prefix"] + "\\build\\msw\\config." + getName(); + + /// config.* options + BuildFileOptions cfg(cfg_first); + + /// build.cfg options + cfg.parse(po["wxcfgfile"]); + + + // ### Variables: ### + po["WX_RELEASE_NODOT"] = cfg["WXVER_MAJOR"] + cfg["WXVER_MINOR"]; + if (po["WX_RELEASE_NODOT"].empty()) + po["WX_RELEASE_NODOT"] = "26"; + + // ### Conditionally set variables: ### + if (cfg["GCC_VERSION"] == "2.95") + po["GCCFLAGS"] = addFlag("-fvtable-thunks"); + + if (cfg["USE_GUI"] == "0") + po["PORTNAME"] = "base"; + + if (cfg["USE_GUI"] == "1") + po["PORTNAME"] = "msw"; + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["DEBUG_FLAG"] == "1") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["UNICODE"] == "1") + po["WXUNICODEFLAG"] = "u"; + + if (cfg["WXUNIV"] == "1") + po["WXUNIVNAME"] = "univ"; + + if (cfg["SHARED"] == "1") + po["WXDLLFLAG"] = "dll"; + + if (cfg["SHARED"] == "0") + po["LIBTYPE_SUFFIX"] = "lib"; + + if (cfg["SHARED"] == "1") + po["LIBTYPE_SUFFIX"] = "dll"; + + if (cfg["MONOLITHIC"] == "0") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["MONOLITHIC"] == "1") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["BUILD"] == "debug") + po["__OPTIMIZEFLAG_2"] = addFlag("-O0"); + + if (cfg["BUILD"] == "release") + po["__OPTIMIZEFLAG_2"] = addFlag("-O2"); + + if (cfg["USE_RTTI"] == "1") + po["__RTTIFLAG_5"] = addFlag(""); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONSFLAG_6"] = addFlag("-fno-exceptions"); + + if (cfg["USE_EXCEPTIONS"] == "1") + po["__EXCEPTIONSFLAG_6"] = addFlag(""); + + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p"] = addDefine("__WXUNIVERSAL__"); + + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p_1"] = addResDefine("__WXUNIVERSAL__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p"] = addDefine("wxNO_EXCEPTIONS"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p_1"] = addResDefine("wxNO_EXCEPTIONS"); + + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p"] = addDefine("wxNO_RTTI"); + + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p_1"] = addResDefine("wxNO_RTTI"); + + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p"] = addDefine("wxNO_THREADS"); + + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p_1"] = addResDefine("wxNO_THREADS"); + + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p"] = addDefine("_UNICODE"); + + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p_1"] = addResDefine("_UNICODE"); + + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p"] = addDefine("wxUSE_UNICODE_MSLU=1"); + + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p_1"] = addResDefine("wxUSE_UNICODE_MSLU=1"); + + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p"] = addDefine("wxUSE_GRAPHICS_CONTEXT=1"); + + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p_1"] = addResDefine("wxUSE_GRAPHICS_CONTEXT=1"); + + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p"] = addDefine("WXUSINGDLL"); + + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p_1"] = addResDefine("WXUSINGDLL"); + + process_3(po, cl, cfg); +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO"] = addFlag("-g"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO"] = addFlag("-g"); + + if (cfg["USE_THREADS"] == "0") + po["__THREADSFLAG"] = addFlag(""); + + if (cfg["USE_THREADS"] == "1") + po["__THREADSFLAG"] = addFlag("-mthreads"); + +//---------------------------------------------------- + + // ### Variables, Part 2: ### + po["LIBDIRNAME"] = po["prefix"] + "\\lib\\" + getName() + "_" + po["LIBTYPE_SUFFIX"] + cfg["CFG"]; + + po["SETUPHDIR"] = po["LIBDIRNAME"] + "\\" + po["PORTNAME"] + po["WXUNIVNAME"]; + po["SETUPHDIR"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]; + + po["cflags"] = easyMode(po["__DEBUGINFO"]) + easyMode(po["__OPTIMIZEFLAG_2"]) + po["__THREADSFLAG"]; + po["cflags"] += po["GCCFLAGS"] + addDefine("HAVE_W32API_H") + addDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p"]; + po["cflags"] += po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"] + po["__RTTI_DEFINE_p"]; + po["cflags"] += po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"] + po["__MSLU_DEFINE_p"]; + po["cflags"] += po["__GFXCTX_DEFINE_p"]; + po["cflags"] += addIncludeDir(po["SETUPHDIR"]) + addIncludeDir(po["prefix"] + "\\include");/*-W */ + po["cflags"] += easyMode(addFlag("-Wall")) + easyMode(addIncludeDir(".")) + po["__DLLFLAG_p"]; + po["cflags"] += easyMode(addIncludeDir(".\\..\\..\\samples")) + /*addDefine("NOPCH") +*/ po["__RTTIFLAG_5"] + po["__EXCEPTIONSFLAG_6"]; + po["cflags"] += addFlag("-Wno-ctor-dtor-privacy") + addFlag("-pipe") + addFlag("-fmessage-length=0"); + po["cflags"] += cfg["CPPFLAGS"] + " " + cfg["CXXFLAGS"] + " "; + + po["libs"] = cfg["LDFLAGS"] + " "; + po["libs"] += easyMode(po["__DEBUGINFO"]) + po["__THREADSFLAG"]; + po["libs"] += addLinkerDir(po["LIBDIRNAME"]); + po["libs"] += easyMode(addFlag("-Wl,--subsystem,windows")) + easyMode(addFlag("-mwindows")); + po["libs"] += getAllLibs(po); + + /* + po["libs"] += po["__WXLIB_ARGS_p"] + po["__WXLIB_OPENGL_p"] + po["__WXLIB_MEDIA_p"]; + po["libs"] += po["__WXLIB_DBGRID_p"] + po["__WXLIB_ODBC_p"] + po["__WXLIB_XRC_p"]; + po["libs"] += po["__WXLIB_QA_p"] + po["__WXLIB_AUI_p"] + po["__WXLIB_HTML_p"] + po["__WXLIB_ADV_p"]; + po["libs"] += po["__WXLIB_CORE_p"] + po["__WXLIB_XML_p"] + po["__WXLIB_NET_p"]; + po["libs"] += po["__WXLIB_BASE_p"] + po["__WXLIB_MONO_p"]; + po["libs"] += po["__LIB_TIFF_p"] + po["__LIB_JPEG_p"] + po["__LIB_PNG_p"]; + po["libs"] += addLib("wxzlib" + po["WXDEBUGFLAG"]) + addLib("wxregex" + po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]); + po["libs"] += addLib("wxexpat" + po["WXDEBUGFLAG"]) + po["EXTRALIBS_FOR_BASE"] + po["__UNICOWS_LIB_p"]; + po["libs"] += addLib("kernel32") + addLib("user32") + addLib("gdi32") + addLib("comdlg32") + addLib("winspool"); + po["libs"] += addLib("winmm") + addLib("shell32") + addLib("comctl32") + addLib("ole32") + addLib("oleaut32"); + po["libs"] += addLib("uuid") + addLib("rpcrt4") + addLib("advapi32") + addLib("wsock32") + addLib("odbc32"); +*/ + po["rcflags"] = addFlag("--use-temp-file") + addResDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p_1"]; + po["rcflags"] += po["__DEBUG_DEFINE_p_1"] + po["__EXCEPTIONS_DEFINE_p_1"]; + po["rcflags"] += po["__RTTI_DEFINE_p_1"] + po["__THREAD_DEFINE_p_1"] + po["__UNICODE_DEFINE_p_1"]; + po["rcflags"] += po["__MSLU_DEFINE_p_1"] + po["__GFXCTX_DEFINE_p_1"] + addResIncludeDir(po["SETUPHDIR"]); + po["rcflags"] += addResIncludeDir(po["prefix"] + "\\include") + easyMode(addResIncludeDir(".")); + po["rcflags"] += po["__DLLFLAG_p_1"]; + po["rcflags"] += easyMode(addResIncludeDir(po["prefix"] + "\\samples")); + + po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"]; + po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"]; + po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"]; + po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + po["cc"] = m_programs.cc; + po["cxx"] = m_programs.cxx; + po["ld"] = m_programs.ld; + + getVariablesValues(po, cl, cfg); + } +}; + +// ------------------------------------------------------------------------------------------------- + +/// DMars compiler +class CompilerDMC : public Compiler +{ +public: + CompilerDMC() : Compiler("dmc") + { + m_programs.cc = "dmc"; + m_programs.cxx = "dmc"; + m_programs.ld = "link"; + m_programs.lib = "lib"; + m_programs.windres = "rcc"; + + m_switches.includeDirs = "-I"; + m_switches.resIncludeDirs = "--include-dir"; //////////// + m_switches.libDirs = ""; + m_switches.linkLibs = ""; + m_switches.libPrefix = ""; + m_switches.libExtension = "lib"; + m_switches.defines = "-D"; + m_switches.resDefines = "-D";//////////////////////////////////(doesnt uses space) + m_switches.genericSwitch = "-"; + m_switches.forceCompilerUseQuotes = false; + m_switches.forceLinkerUseQuotes = true; + m_switches.linkerNeedsLibPrefix = false; + m_switches.linkerNeedsLibExtension = true; + } + + + void process(Options& po, const CmdLineOptions& cl) + { + /// Searchs for '\build\msw\config.*' first + std::string cfg_first = po["prefix"] + "\\build\\msw\\config." + getName(); + + /// config.* options + BuildFileOptions cfg(cfg_first); + + /// build.cfg options + cfg.parse(po["wxcfgfile"]); + + + // ### Variables: ### + po["WX_RELEASE_NODOT"] = cfg["WXVER_MAJOR"] + cfg["WXVER_MINOR"]; + if (po["WX_RELEASE_NODOT"].empty()) + po["WX_RELEASE_NODOT"] = "26"; + + // ### Conditionally set variables: ### + if (cfg["USE_GUI"] == "0") + po["PORTNAME"] = "base"; + + if (cfg["USE_GUI"] == "1") + po["PORTNAME"] = "msw"; + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["DEBUG_FLAG"] == "1") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["UNICODE"] == "1") + po["WXUNICODEFLAG"] = "u"; + + if (cfg["WXUNIV"] == "1") + po["WXUNIVNAME"] = "univ"; + + if (cfg["SHARED"] == "1") + po["WXDLLFLAG"] = "dll"; + + if (cfg["SHARED"] == "0") + po["LIBTYPE_SUFFIX"] = "lib"; + + if (cfg["SHARED"] == "1") + po["LIBTYPE_SUFFIX"] = "dll"; + + if (cfg["MONOLITHIC"] == "0") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["MONOLITHIC"] == "1") + po["EXTRALIBS_FOR_BASE"] = ""; + +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag("-g"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_0"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_0"] = addFlag("-g"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag("/DEBUG /CODEVIEW"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_1"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_1"] = addFlag("/DEBUG /CODEVIEW"); +/* + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p"] = addDefine("_DEBUG"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p"] = addDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["____DEBUGRUNTIME_2_p"] = addDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["____DEBUGRUNTIME_2_p"] = addDefine("_DEBUG"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine("_DEBUG"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine("_DEBUG"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["__DEBUGRUNTIME_3"] = "d"; + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["__DEBUGRUNTIME_3"] = ""; + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__DEBUGRUNTIME_3"] = ""; + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["__DEBUGRUNTIME_3"] = "d"; +*/ +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug") + po["__OPTIMIZEFLAG_4"] = addFlag("-o+none");//2 + + if (cfg["BUILD"] == "release") + po["__OPTIMIZEFLAG_4"] = addFlag("-o");//2 +/* + if (cfg["USE_THREADS"] == "0") + po["__THREADSFLAG_7"] = "L"; + + if (cfg["USE_THREADS"] == "1") + po["__THREADSFLAG_7"] = "T"; +*/ + if (cfg["RUNTIME_LIBS"] == "dynamic") + po["__RUNTIME_LIBS_8"] = "-ND";//5 // TODO: addFlag? + + if (cfg["RUNTIME_LIBS"] == "static") + po["__RUNTIME_LIBS_8"] = "";//5 + +//---------------------------------------------------- + + if (cfg["USE_RTTI"] == "0") + po["__RTTIFLAG_9"] = addFlag("");//6 + + if (cfg["USE_RTTI"] == "1") + po["__RTTIFLAG_9"] = addFlag("-Ar");//6 + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONSFLAG_10"] = addFlag("");//7 + + if (cfg["USE_EXCEPTIONS"] == "1") + po["__EXCEPTIONSFLAG_10"] = addFlag("-Ae");//7 + +//---------------------------------------------------- +/* + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__NO_VC_CRTDBG_p"] = addDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_FLAG"] == "1") + po["__NO_VC_CRTDBG_p"] = addDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__NO_VC_CRTDBG_p_1"] = addResDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_FLAG"] == "1") + po["__NO_VC_CRTDBG_p_1"] = addResDefine("__NO_VC_CRTDBG__"); +*/ + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p"] = addDefine("__WXUNIVERSAL__"); +/* + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p_1"] = addResDefine("__WXUNIVERSAL__"); +*/ + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); +/* + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); +*/ + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p"] = addDefine("wxNO_EXCEPTIONS"); +/* + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p_1"] = addResDefine("wxNO_EXCEPTIONS"); +*/ + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p"] = addDefine("wxNO_RTTI"); +/* + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p_1"] = addResDefine("wxNO_RTTI"); +*/ + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p"] = addDefine("wxNO_THREADS"); +/* + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p_1"] = addResDefine("wxNO_THREADS"); +*/ + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p"] = addDefine("_UNICODE"); +/* + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p_1"] = addResDefine("_UNICODE"); +*/ + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p"] = addDefine("wxUSE_UNICODE_MSLU=1"); +/* + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p_1"] = addResDefine("wxUSE_UNICODE_MSLU=1"); +*/ + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p"] = addDefine("wxUSE_GRAPHICS_CONTEXT=1"); +/* + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p_1"] = addResDefine("wxUSE_GRAPHICS_CONTEXT=1"); +*/ + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p"] = addDefine("WXUSINGDLL"); +/* + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p_1"] = addResDefine("WXUSINGDLL"); +*/ + process_3(po, cl, cfg); + + + // ### Variables, Part 2: ### + po["LIBDIRNAME"] = po["prefix"] + "\\lib\\" + getName() + "_" + po["LIBTYPE_SUFFIX"] + cfg["CFG"]; + + po["SETUPHDIR"] = po["LIBDIRNAME"] + "\\" + po["PORTNAME"] + po["WXUNIVNAME"]; + po["SETUPHDIR"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]; + + po["cflags"] = easyMode(po["__DEBUGINFO_0"]) + easyMode(po["__OPTIMIZEFLAG_4"]); + po["cflags"] += po["__RUNTIME_LIBS_8"] + " " + addDefine("_WIN32_WINNT=0x0400"); + po["cflags"] += addDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p"]; + po["cflags"] += po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"] + po["__RTTI_DEFINE_p"]; + po["cflags"] += po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"] + po["__MSLU_DEFINE_p"]; + po["cflags"] += po["__GFXCTX_DEFINE_p"]; + po["cflags"] += addIncludeDir(po["SETUPHDIR"]) + addIncludeDir(po["prefix"] + "\\include") + easyMode(addFlag("-w-")) + easyMode(addIncludeDir(".")) + po["__DLLFLAG_p"] + easyMode(addFlag("-WA")); + po["cflags"] += easyMode(addIncludeDir(po["prefix"] + "\\samples")) + easyMode(addDefine("NOPCH")) + po["__RTTIFLAG_9"] + po["__EXCEPTIONSFLAG_10"]; + po["cflags"] += cfg["CPPFLAGS"] + " " + cfg["CXXFLAGS"] + " "; + + + + po["libs"] = easyMode(addFlag("/NOLOGO")) + easyMode(addFlag("/SILENT")); + po["libs"] += easyMode(addFlag("/NOI")) + easyMode(addFlag("/DELEXECUTABLE")); + po["libs"] += easyMode(addFlag("/EXETYPE:NT")); + po["libs"] += cfg["LDFLAGS"] + " "; + po["libs"] += easyMode(po["__DEBUGINFO_1"]); + po["libs"] += addLinkerDir(po["LIBDIRNAME"] + "\\"); + po["libs"] += easyMode(addFlag("/su:windows:4.0")); + po["libs"] += getAllLibs(po); + + po["rcflags"] = addResDefine("_WIN32_WINNT=0x0400") + addResDefine("__WXMSW__"); + po["rcflags"] += po["__WXUNIV_DEFINE_p"] + po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"]; + po["rcflags"] += po["__RTTI_DEFINE_p"] + po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"]; + po["rcflags"] += po["__MSLU_DEFINE_p"] + po["__GFXCTX_DEFINE_p"] + addResIncludeDir(po["SETUPHDIR"]); + po["rcflags"] += addResIncludeDir(po["prefix"] + "\\include") + easyMode(addResIncludeDir(".")); + po["rcflags"] += po["__DLLFLAG_p"]; + po["rcflags"] += easyMode(addResIncludeDir(po["prefix"] + "\\samples")); + po["rcflags"] += easyMode(addFlag("-32")) + easyMode(addFlag("-v-")); + + + po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"]; + po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"]; + po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"]; + po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + po["cc"] = m_programs.cc; + po["cxx"] = m_programs.cxx; + po["ld"] = m_programs.ld; + + getVariablesValues(po, cl, cfg); + } + +}; + +// ------------------------------------------------------------------------------------------------- + +/// Visual Studio compiler +class CompilerVC : public Compiler +{ +public: + CompilerVC() : Compiler("vc") + { + m_programs.cc = "cl"; + m_programs.cxx = "cl"; + m_programs.ld = "link"; + m_programs.lib = "link"; + m_programs.windres = "rc"; + + m_switches.includeDirs = "/I"; + m_switches.resIncludeDirs = "--include-dir"; //////////// + m_switches.libDirs = "/LIBPATH:"; + m_switches.linkLibs = ""; + m_switches.libPrefix = ""; + m_switches.libExtension = "lib"; + m_switches.defines = "/D"; + m_switches.resDefines = "/d"; + m_switches.genericSwitch = "/"; + m_switches.forceCompilerUseQuotes = false; + m_switches.forceLinkerUseQuotes = false; + m_switches.linkerNeedsLibPrefix = false; + m_switches.linkerNeedsLibExtension = true; + } + + void process(Options& po, const CmdLineOptions& cl) + { + /// Searchs for '\build\msw\config.*' first + std::string cfg_first = po["prefix"] + "\\build\\msw\\config." + getName(); + + /// config.* options + BuildFileOptions cfg(cfg_first); + + /// build.cfg options + cfg.parse(po["wxcfgfile"]); + + + // ### Variables: ### + po["WX_RELEASE_NODOT"] = cfg["WXVER_MAJOR"] + cfg["WXVER_MINOR"]; + if (po["WX_RELEASE_NODOT"].empty()) + po["WX_RELEASE_NODOT"] = "26"; + + // ### Conditionally set variables: ### + if (cfg["USE_GUI"] == "0") + po["PORTNAME"] = "base"; + + if (cfg["USE_GUI"] == "1") + po["PORTNAME"] = "msw"; + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["DEBUG_FLAG"] == "1") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["UNICODE"] == "1") + po["WXUNICODEFLAG"] = "u"; + + if (cfg["WXUNIV"] == "1") + po["WXUNIVNAME"] = "univ"; + + if (cfg["SHARED"] == "1") + po["WXDLLFLAG"] = "dll"; + + if (cfg["SHARED"] == "0") + po["LIBTYPE_SUFFIX"] = "lib"; + + if (cfg["SHARED"] == "1") + po["LIBTYPE_SUFFIX"] = "dll"; + + if (cfg["MONOLITHIC"] == "0") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["MONOLITHIC"] == "1") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["TARGET_CPU"] == "amd64") + po["DIR_SUFFIX_CPU"] = "_amd64"; + + if (cfg["TARGET_CPU"] == "ia64") + po["DIR_SUFFIX_CPU"] = "_ia64"; + + // TODO: TARGET_CPU uses $(CPU), so it will be ignored unless explicitely specified + if (cfg["TARGET_CPU"] == "$(CPU)") + po["LINK_TARGET_CPU"] = ""; + + if (cfg["TARGET_CPU"] == "amd64") + po["LINK_TARGET_CPU"] = addFlag("/MACHINE:AMD64"); + + if (cfg["TARGET_CPU"] == "ia64") + po["LINK_TARGET_CPU"] = addFlag("/MACHINE:IA64"); + +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag("/Zi"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_0"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_0"] = addFlag("/Zi"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag("/DEBUG"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_1"] = addFlag(""); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_1"] = addFlag("/DEBUG"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p"] = addDefine("_DEBUG"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p"] = addDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["____DEBUGRUNTIME_2_p"] = addDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["____DEBUGRUNTIME_2_p"] = addDefine("_DEBUG"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine("_DEBUG"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine(""); + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["____DEBUGRUNTIME_2_p_1"] = addResDefine("_DEBUG"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["__DEBUGRUNTIME_3"] = "d"; + + if (cfg["BUILD"] == "release" && cfg["DEBUG_RUNTIME_LIBS"] == "default") + po["__DEBUGRUNTIME_3"] = ""; + + if (cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__DEBUGRUNTIME_3"] = ""; + + if (cfg["DEBUG_RUNTIME_LIBS"] == "1") + po["__DEBUGRUNTIME_3"] = "d"; + +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug") + po["__OPTIMIZEFLAG_4"] = addFlag("/Od"); + + if (cfg["BUILD"] == "release") + po["__OPTIMIZEFLAG_4"] = addFlag("/O2"); + + if (cfg["USE_THREADS"] == "0") + po["__THREADSFLAG_7"] = "L"; + + if (cfg["USE_THREADS"] == "1") + po["__THREADSFLAG_7"] = "T"; + + if (cfg["RUNTIME_LIBS"] == "dynamic") + po["__RUNTIME_LIBS_8"] = "D"; + + if (cfg["RUNTIME_LIBS"] == "static") + po["__RUNTIME_LIBS_8"] = po["__THREADSFLAG_7"]; + +//---------------------------------------------------- + + if (cfg["USE_RTTI"] == "0") + po["__RTTIFLAG_9"] = addFlag(""); + + if (cfg["USE_RTTI"] == "1") + po["__RTTIFLAG_9"] = addFlag("/GR"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONSFLAG_10"] = addFlag(""); + + if (cfg["USE_EXCEPTIONS"] == "1") + po["__EXCEPTIONSFLAG_10"] = addFlag("/EHsc"); + +//---------------------------------------------------- + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__NO_VC_CRTDBG_p"] = addDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_FLAG"] == "1") + po["__NO_VC_CRTDBG_p"] = addDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_RUNTIME_LIBS"] == "0") + po["__NO_VC_CRTDBG_p_1"] = addResDefine("__NO_VC_CRTDBG__"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_FLAG"] == "1") + po["__NO_VC_CRTDBG_p_1"] = addResDefine("__NO_VC_CRTDBG__"); + + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p"] = addDefine("__WXUNIVERSAL__"); + + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p_1"] = addResDefine("__WXUNIVERSAL__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p_1"] = addResDefine("__WXDEBUG__"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p"] = addDefine("wxNO_EXCEPTIONS"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p_1"] = addResDefine("wxNO_EXCEPTIONS"); + + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p"] = addDefine("wxNO_RTTI"); + + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p_1"] = addResDefine("wxNO_RTTI"); + + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p"] = addDefine("wxNO_THREADS"); + + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p_1"] = addResDefine("wxNO_THREADS"); + + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p"] = addDefine("_UNICODE"); + + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p_1"] = addResDefine("_UNICODE"); + + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p"] = addDefine("wxUSE_UNICODE_MSLU=1"); + + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p_1"] = addResDefine("wxUSE_UNICODE_MSLU=1"); + + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p"] = addDefine("wxUSE_GRAPHICS_CONTEXT=1"); + + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p_1"] = addResDefine("wxUSE_GRAPHICS_CONTEXT=1"); + + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p"] = addDefine("WXUSINGDLL"); + + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p_1"] = addResDefine("WXUSINGDLL"); + + process_3(po, cl, cfg); + + + // ### Variables, Part 2: ### + po["LIBDIRNAME"] = po["prefix"] + "\\lib\\" + getName() + po["DIR_SUFFIX_CPU"] + "_" + po["LIBTYPE_SUFFIX"] + cfg["CFG"]; + + po["SETUPHDIR"] = po["LIBDIRNAME"] + "\\" + po["PORTNAME"] + po["WXUNIVNAME"]; + po["SETUPHDIR"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]; + + po["cflags"] = "/M" + po["__RUNTIME_LIBS_8"] + po["__DEBUGRUNTIME_3"] + " " + addDefine("WIN32"); + po["cflags"] += easyMode(po["__DEBUGINFO_0"]) + easyMode(po["____DEBUGRUNTIME_2_p"]); + po["cflags"] += easyMode(po["__OPTIMIZEFLAG_4"]) + po["__NO_VC_CRTDBG_p"] + addDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p"]; + po["cflags"] += po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"] + po["__RTTI_DEFINE_p"]; + po["cflags"] += po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"] + po["__MSLU_DEFINE_p"] + po["__GFXCTX_DEFINE_p"]; + po["cflags"] += addIncludeDir(po["SETUPHDIR"]) + addIncludeDir(po["prefix"] + "\\include") + easyMode(addFlag("/W4")) + easyMode(addIncludeDir(".")) + po["__DLLFLAG_p"] + addDefine("_WINDOWS"); + po["cflags"] += easyMode(addIncludeDir(po["prefix"] + "\\samples")) + easyMode(addDefine("NOPCH")) + po["__RTTIFLAG_9"] + po["__EXCEPTIONSFLAG_10"]; + po["cflags"] += cfg["CPPFLAGS"] + " " + cfg["CXXFLAGS"] + " "; + + po["libs"] = easyMode(addFlag("/NOLOGO")); + po["libs"] += cfg["LDFLAGS"] + " "; + po["libs"] += easyMode(po["__DEBUGINFO_1"]) + " " + po["LINK_TARGET_CPU"] + " "; + po["libs"] += addLinkerDir(po["LIBDIRNAME"]); + po["libs"] += easyMode(addFlag("/SUBSYSTEM:WINDOWS")); + po["libs"] += getAllLibs(po); + + po["rcflags"] = addResDefine("WIN32") + po["____DEBUGRUNTIME_2_p_1"] + po["__NO_VC_CRTDBG_p_1"] + addResDefine("__WXMSW__"); + po["rcflags"] += po["__WXUNIV_DEFINE_p_1"] + po["__DEBUG_DEFINE_p_1"] + po["__EXCEPTIONS_DEFINE_p_1"]; + po["rcflags"] += po["__RTTI_DEFINE_p_1"] + po["__THREAD_DEFINE_p_1"] + po["__UNICODE_DEFINE_p_1"]; + po["rcflags"] += po["__MSLU_DEFINE_p_1"] + po["__GFXCTX_DEFINE_p_1"] + addResIncludeDir(po["SETUPHDIR"]); + po["rcflags"] += addResIncludeDir(po["prefix"] + "\\include") + easyMode(addResIncludeDir(".")); + po["rcflags"] += po["__DLLFLAG_p_1"] + addResDefine("_WINDOWS"); + po["rcflags"] += easyMode(addResIncludeDir(po["prefix"] + "\\samples")); + + + po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"]; + po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"]; + po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"]; + po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + po["cc"] = m_programs.cc; + po["cxx"] = m_programs.cxx; + po["ld"] = m_programs.ld; + + getVariablesValues(po, cl, cfg); + } +}; + +// ------------------------------------------------------------------------------------------------- + +/// OpenWatcom compiler +class CompilerWAT : public Compiler +{ +public: + CompilerWAT() : Compiler("wat") + { + m_programs.cc = "wcl386";//TODO: wcc386 + m_programs.cxx = "wcl386";//TODO: wpp386 + m_programs.ld = "wcl386"; + m_programs.lib = "wlib"; + m_programs.windres = "wrc"; + + m_switches.includeDirs = "-i="; + m_switches.resIncludeDirs = "-i="; + m_switches.libDirs = "libp "; + m_switches.linkLibs = ""; + m_switches.libPrefix = "libr "; + m_switches.libExtension = "lib"; + m_switches.defines = "-d"; + m_switches.resDefines = "-d"; + m_switches.genericSwitch = "-"; + m_switches.forceCompilerUseQuotes = false; + m_switches.forceLinkerUseQuotes = false; + m_switches.linkerNeedsLibPrefix = true;//TODO:! + m_switches.linkerNeedsLibExtension = true; + } + + void process(Options& po, const CmdLineOptions& cl) + { + /// Searchs for '\build\msw\config.*' first + std::string cfg_first = po["prefix"] + "\\build\\msw\\config." + getName(); + + /// config.* options + BuildFileOptions cfg(cfg_first); + + /// build.cfg options + cfg.parse(po["wxcfgfile"]); + + + // ### Variables: ### + po["WX_RELEASE_NODOT"] = cfg["WXVER_MAJOR"] + cfg["WXVER_MINOR"]; + if (po["WX_RELEASE_NODOT"].empty()) + po["WX_RELEASE_NODOT"] = "26"; + + // ### Conditionally set variables: ### + if (cfg["USE_GUI"] == "0") + po["PORTNAME"] = "base"; + + if (cfg["USE_GUI"] == "1") + po["PORTNAME"] = "msw"; + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["DEBUG_FLAG"] == "1") + po["WXDEBUGFLAG"] = "d"; + + if (cfg["UNICODE"] == "1") + po["WXUNICODEFLAG"] = "u"; + + if (cfg["WXUNIV"] == "1") + po["WXUNIVNAME"] = "univ"; + + if (cfg["SHARED"] == "1") + po["WXDLLFLAG"] = "dll"; + + if (cfg["SHARED"] == "0") + po["LIBTYPE_SUFFIX"] = "lib"; + + if (cfg["SHARED"] == "1") + po["LIBTYPE_SUFFIX"] = "dll"; + + if (cfg["MONOLITHIC"] == "0") + po["EXTRALIBS_FOR_BASE"] = ""; + + if (cfg["MONOLITHIC"] == "1") + po["EXTRALIBS_FOR_BASE"] = ""; +//---------till here, the same + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag("-d2"); + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_0"] = addFlag("-d0"); + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_0"] = addFlag("-d0"); + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_0"] = addFlag("-d2"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag("debug all"); //TODO: ??? + + if (cfg["BUILD"] == "release" && cfg["DEBUG_INFO"] == "default") + po["__DEBUGINFO_1"] = addFlag(""); //TODO: ??? + + if (cfg["DEBUG_INFO"] == "0") + po["__DEBUGINFO_1"] = addFlag(""); //TODO: ??? + + if (cfg["DEBUG_INFO"] == "1") + po["__DEBUGINFO_1"] = addFlag("debug all"); //TODO: ??? +//---------from here, the same + if (cfg["BUILD"] == "debug") + po["__OPTIMIZEFLAG_2"] = addFlag("-od"); + + if (cfg["BUILD"] == "release") + po["__OPTIMIZEFLAG_2"] = addFlag("-ot -ox"); +//------from here, almost the same + if (cfg["USE_THREADS"] == "0") + po["__THREADSFLAG_5"] = addFlag(""); + + if (cfg["USE_THREADS"] == "1") + po["__THREADSFLAG_5"] = addFlag("-bm"); +//---------from here, simmilar to VC + if (cfg["RUNTIME_LIBS"] == "dynamic") + po["__RUNTIME_LIBS_6"] = addFlag("-br"); + + if (cfg["RUNTIME_LIBS"] == "static") + po["__RUNTIME_LIBS_6"] = addFlag(""); +//---------simmilar: + if (cfg["USE_RTTI"] == "0") + po["__RTTIFLAG_7"] = addFlag(""); + + if (cfg["USE_RTTI"] == "1") + po["__RTTIFLAG_7"] = addFlag("-xr"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONSFLAG_8"] = addFlag(""); + + if (cfg["USE_EXCEPTIONS"] == "1") + po["__EXCEPTIONSFLAG_8"] = addFlag("-xs"); + + process_3(po, cl, cfg); + +//---------the same, but without resDefines: + if (cfg["WXUNIV"] == "1") + po["__WXUNIV_DEFINE_p"] = addDefine("__WXUNIVERSAL__"); + + if (cfg["BUILD"] == "debug" && cfg["DEBUG_FLAG"] == "default") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["DEBUG_FLAG"] == "1") + po["__DEBUG_DEFINE_p"] = addDefine("__WXDEBUG__"); + + if (cfg["USE_EXCEPTIONS"] == "0") + po["__EXCEPTIONS_DEFINE_p"] = addDefine("wxNO_EXCEPTIONS"); + + if (cfg["USE_RTTI"] == "0") + po["__RTTI_DEFINE_p"] = addDefine("wxNO_RTTI"); + + if (cfg["USE_THREADS"] == "0") + po["__THREAD_DEFINE_p"] = addDefine("wxNO_THREADS"); + + if (cfg["UNICODE"] == "1") + po["__UNICODE_DEFINE_p"] = addDefine("_UNICODE"); + + if (cfg["MSLU"] == "1") + po["__MSLU_DEFINE_p"] = addDefine("wxUSE_UNICODE_MSLU=1"); + + if (cfg["USE_GDIPLUS"] == "1") + po["__GFXCTX_DEFINE_p"] = addDefine("wxUSE_GRAPHICS_CONTEXT=1"); + + if (cfg["SHARED"] == "1") + po["__DLLFLAG_p"] = addDefine("WXUSINGDLL"); + + + // ### Variables, Part 2: ### + po["LIBDIRNAME"] = po["prefix"] + "\\lib\\" + getName() + "_" + po["LIBTYPE_SUFFIX"] + cfg["CFG"]; + + po["SETUPHDIR"] = po["LIBDIRNAME"] + "\\" + po["PORTNAME"] + po["WXUNIVNAME"]; + po["SETUPHDIR"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"]; + + po["cflags"] = easyMode(po["__DEBUGINFO_0"]) + easyMode(po["__OPTIMIZEFLAG_2"]) + po["__THREADSFLAG_5"]; + po["cflags"] += po["__RUNTIME_LIBS_6"] + addDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p"]; + po["cflags"] += po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"] + po["__RTTI_DEFINE_p"]; + po["cflags"] += po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"] + po["__MSLU_DEFINE_p"] + po["__GFXCTX_DEFINE_p"]; + po["cflags"] += addIncludeDir(po["SETUPHDIR"]) + addIncludeDir(po["prefix"] + "\\include"); + po["cflags"] += addFlag("-wx") + addFlag("-wcd=549") + addFlag("-wcd=656") + addFlag("-wcd=657") + addFlag("-wcd=667"); + po["cflags"] += easyMode(addIncludeDir(".")) + po["__DLLFLAG_p"]; + po["cflags"] += easyMode(addIncludeDir(po["prefix"] + "\\samples")) + addDefine("NOPCH") + po["__RTTIFLAG_7"] + po["__EXCEPTIONSFLAG_8"]; + po["cflags"] += cfg["CPPFLAGS"] + " " + cfg["CXXFLAGS"] + " "; + + po["lbc"] = "option quiet\n"; + po["lbc"] += "name $^@\n"; + po["lbc"] += "option caseexact\n"; + po["libs"] = cfg["LDFLAGS"] + " "; + po["libs"] += easyMode(po["__DEBUGINFO_1"]); + po["libs"] += addLinkerDir(po["LIBDIRNAME"]); + po["lbc"] += " libpath " + po["LIBDIRNAME"] + " system nt_win ref '_WinMain@16'"; + po["libs"] += getAllLibs(po); + + po["rcflags"] = addFlag("-q") + addFlag("-ad") + addFlag("-bt=nt") + addFlag("-r"); + po["rcflags"] += addResDefine("__WXMSW__") + po["__WXUNIV_DEFINE_p"]; + po["rcflags"] += po["__DEBUG_DEFINE_p"] + po["__EXCEPTIONS_DEFINE_p"]; + po["rcflags"] += po["__RTTI_DEFINE_p"] + po["__THREAD_DEFINE_p"] + po["__UNICODE_DEFINE_p"]; + po["rcflags"] += po["__MSLU_DEFINE_p"] + po["__GFXCTX_DEFINE_p"] + addResIncludeDir(po["SETUPHDIR"]); + po["rcflags"] += addResIncludeDir(po["prefix"] + "\\include") + easyMode(addResIncludeDir(".")); + po["rcflags"] += po["__DLLFLAG_p_1"]; + po["rcflags"] += easyMode(addResIncludeDir(po["prefix"] + "\\samples")); + + po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"]; + po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"]; + po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"]; + po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"]; + po["cc"] = m_programs.cc; + po["cxx"] = m_programs.cxx; + po["ld"] = m_programs.ld; + + getVariablesValues(po, cl, cfg); + } +}; + +// ------------------------------------------------------------------------------------------------- + +/// Borland compiler +class CompilerBCC : public Compiler +{ +public: + CompilerBCC() : Compiler("bcc") + { + m_programs.cc = "bcc32"; + m_programs.cxx = "bcc32"; + m_programs.ld = "ilink32"; + m_programs.lib = "tlib"; + m_programs.windres = "brcc32"; + + m_switches.includeDirs = "-I"; + m_switches.resIncludeDirs = "--include-dir"; //////////// + m_switches.libDirs = "-L"; + m_switches.linkLibs = ""; + m_switches.libPrefix = ""; + m_switches.libExtension = "lib"; + m_switches.defines = "-D"; + m_switches.resDefines = "/d"; //////// + m_switches.genericSwitch = "-"; + m_switches.forceCompilerUseQuotes = false; + m_switches.forceLinkerUseQuotes = true; + m_switches.linkerNeedsLibPrefix = false; + m_switches.linkerNeedsLibExtension = true; + } + + void process(Options& po, const CmdLineOptions& cl) {} +}; + +// ------------------------------------------------------------------------------------------------- + +void normalizePath(std::string& path) +{ + // converts all slashes to backslashes + std::replace(path.begin(), path.end(), '/', '\\'); + + // removes the first slash (if any) from the given path + std::string::iterator firstChar = path.begin(); + if (*firstChar == '\\') + path.erase(firstChar); + + // removes the last slash (if any) from the given path + std::string::iterator lastChar = path.end() - 1; + if (*lastChar == '\\') + path.erase(lastChar); +} + +// ------------------------------------------------------------------------------------------------- + +/// Return true if string changed +bool replaceCompilerIfFound(std::string& wxcfg, const std::string& compiler) +{ + size_t loc; + loc = wxcfg.find(compiler); + if (loc != std::string::npos) + return false; + + std::vector compilers; + compilers.push_back("gcc_"); + compilers.push_back("dmc_"); + compilers.push_back("vc_"); + compilers.push_back("wat_"); + compilers.push_back("bcc_"); + + for(std::vector::const_iterator it = compilers.begin(); it != compilers.end(); ++it) + { + loc = wxcfg.find(*it); + if (loc != std::string::npos) + { + wxcfg.replace(loc, (*it).length(), compiler + "_"); + return true; + } + } + return false; +} + +// ------------------------------------------------------------------------------------------------- + +/// Return true if string changed +bool replaceUniv(std::string& wxcfg, bool enable) +{ + const std::string univStr("univ"); + size_t univPos = wxcfg.rfind(univStr); + + if (enable) + { + /// Pattern: Replace /(msw|base)/ to /(msw|base)univ/ + if (univPos == std::string::npos) + { + const std::string mswStr("msw"); + size_t mswPos = wxcfg.rfind(mswStr); + if (mswPos != std::string::npos) + wxcfg.insert(mswPos + mswStr.length(), univStr); + else + { + const std::string baseStr("base"); + size_t basePos = wxcfg.rfind(baseStr); + if (basePos != std::string::npos) + wxcfg.insert(basePos + baseStr.length(), univStr); + } + return true; + } + } + else + { + /// Pattern: Remove /univ/ in /(msw|base)univ/ + if (univPos != std::string::npos) + { + wxcfg.erase(univPos, univStr.length()); + return true; + } + } + return false; +} + +// ------------------------------------------------------------------------------------------------- + +/// Return true if string changed +bool replaceUnicode(std::string& wxcfg, bool enable) +{ + std::string::iterator lastChar = wxcfg.end() - 1; + + if (enable) + { + /// Pattern: Add /.*u/ if it's not already or /.*ud/ if --debug is specified + // TODO: string::find could be better + if (*lastChar != 'u' && *lastChar != 'd') + { + wxcfg += "u"; + return true; + } + else if (*(lastChar - 1) != 'u' && *lastChar == 'd') + { + *lastChar = 'u'; + wxcfg += "d"; + return true; + } + } + else + { + /// Pattern: Remove /.*u/ if it's present or /.*ud/ if --debug is specified + if (*lastChar == 'u') + { + wxcfg.erase(lastChar); + return true; + } + else if (*(lastChar - 1) == 'u' && *lastChar == 'd') + { + wxcfg.erase(lastChar - 1); + return true; + } + } + return false; +} + +// ------------------------------------------------------------------------------------------------- + +/// Return true if string changed +bool replaceDebug(std::string& wxcfg, bool enable) +{ + std::string::iterator lastChar = wxcfg.end() - 1; + + if (enable) + { + /// Pattern: Add /.*d/ if it's not already + if (*lastChar != 'd') + { + wxcfg += "d"; + return true; + } + } + else + { + /// Pattern: Remove /.*d/ if it's present + if (*lastChar == 'd') + { + wxcfg.erase(lastChar); + return true; + } + } + return false; +} + +// ------------------------------------------------------------------------------------------------- + +/// Return true if string changed +bool replaceStatic(std::string& wxcfg, bool enable) +{ + if (enable) + { + /// Pattern: Replace /.*_dll/ to /.*_lib/ + size_t loc = wxcfg.find("_dll"); + if (loc != std::string::npos) + { + wxcfg.replace(loc, std::string("_lib").length(), "_lib"); + return true; + } + } + else + { + /// Pattern: Replace /.*_lib/ to /.*_dll/ + size_t loc = wxcfg.find("_lib"); + if (loc != std::string::npos) + { + wxcfg.replace(loc, std::string("_dll").length(), "_dll"); + return true; + } + } + return false; +} + +// ------------------------------------------------------------------------------------------------- + +void autodetectConfiguration(Options& po, const CmdLineOptions& cl) +{ + // TODO: still directory listing is needed, to account for $(CFG), $(DIR_SUFFIX_CPU), ... + + std::vector cfgs; + std::vector newCfgs; + std::string cfg; + std::vector::iterator curCfg; + + // Iterate through the options the user didn't supply + cfgs.push_back(po["wxcfg"]); + if (!cl.keyExists("--universal")) + { + cfg = po["wxcfg"]; + if (replaceUniv(cfg, true)) + cfgs.push_back(cfg); + cfg = po["wxcfg"]; + if (replaceUniv(cfg, false)) + cfgs.push_back(cfg); + } + if (!cl.keyExists("--unicode")) + { + newCfgs.clear(); + for (curCfg = cfgs.begin(); curCfg != cfgs.end(); ++curCfg) + { + cfg = *curCfg; + if (replaceUnicode(cfg, true)) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceUnicode(cfg, false)) + newCfgs.push_back(cfg); + } + for (curCfg = newCfgs.begin(); curCfg != newCfgs.end(); ++curCfg) + cfgs.push_back(*curCfg); + } + if (!cl.keyExists("--debug")) + { + newCfgs.clear(); + for (curCfg = cfgs.begin(); curCfg != cfgs.end(); ++curCfg) + { + cfg = *curCfg; + if (replaceDebug(cfg, true)) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceDebug(cfg, false)) + newCfgs.push_back(cfg); + } + for (curCfg = newCfgs.begin(); curCfg != newCfgs.end(); ++curCfg) + cfgs.push_back(*curCfg); + } + if (!cl.keyExists("--static")) + { + newCfgs.clear(); + for (curCfg = cfgs.begin(); curCfg != cfgs.end(); ++curCfg) + { + cfg = *curCfg; + if (replaceStatic(cfg, true)) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceStatic(cfg, false)) + newCfgs.push_back(cfg); + } + for (curCfg = newCfgs.begin(); curCfg != newCfgs.end(); ++curCfg) + cfgs.push_back(*curCfg); + } + if (!cl.keyExists("--compiler")) + { + newCfgs.clear(); + for (curCfg = cfgs.begin(); curCfg != cfgs.end(); ++curCfg) + { + cfg = *curCfg; + if (replaceCompilerIfFound(cfg, "gcc")) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceCompilerIfFound(cfg, "dmc")) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceCompilerIfFound(cfg, "vc")) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceCompilerIfFound(cfg, "wat")) + newCfgs.push_back(cfg); + cfg = *curCfg; + if (replaceCompilerIfFound(cfg, "bcc")) + newCfgs.push_back(cfg); + } + for (curCfg = newCfgs.begin(); curCfg != newCfgs.end(); ++curCfg) + cfgs.push_back(*curCfg); + } + + + // reads the first setup.h it founds + bool found = false; + for(std::vector::const_iterator it = cfgs.begin(); it != cfgs.end(); ++it) + { + std::string file = po["prefix"] + "\\lib\\" + *it + "\\wx\\setup.h"; + std::ifstream setupH(file.c_str()); + if (setupH.is_open()) + { + if (!found) + { + po["wxcfg"] = *it; + found = true; + } + else + { + std::cerr << g_tokWarning << "Multiple compiled configurations of wxWidgets have been detected." << std::endl; + std::cerr << "Using first detected version by default." << std::endl; + std::cerr << std::endl; + std::cerr << "Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\\mswud)" << std::endl; + std::cerr << "or set the environment variable WXCFG (as in WXCFG=gcc_dll\\mswud)" << std::endl; + std::cerr << "to specify which configuration exactly you want to use." << std::endl; + return; + } + } + } + + if (!po.keyExists("wxcfg")) + { + // TODO: this never reaches thanks to the new autodetection algorithm + + std::cout << g_tokError << "No setup.h file has been auto-detected." << std::endl; + std::cerr << std::endl; + std::cerr << "Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\\mswud)" << std::endl; + std::cerr << "or set the environment variable WXCFG (as in WXCFG=gcc_dll\\mswud)" << std::endl; + std::cerr << "to specify which configuration exactly you want to use." << std::endl; + + exit(1); + } +} + +// ------------------------------------------------------------------------------------------------- + +void checkAdditionalFlags(Options& po, const CmdLineOptions& cl) +{ + /// Modifies wxcfg as 'vc[cpu]_[dll|lib][CFG]\[msw|base][univ][u][d]' accordingly + /// or 'gcc_[dll|lib][CFG]\[msw|base][univ][u][d]' + + if (cl.keyExists("--universal")) + { + if (cl.keyValue("--universal") == "no") + replaceUniv(po["wxcfg"], false); + else if (cl.keyValue("--universal") == "yes" || cl.keyValue("--universal").empty()) + replaceUniv(po["wxcfg"], true); + } + + if (cl.keyExists("--unicode")) + { + if (cl.keyValue("--unicode") == "no") + replaceUnicode(po["wxcfg"], false); + else if (cl.keyValue("--unicode") == "yes" || cl.keyValue("--unicode").empty()) + replaceUnicode(po["wxcfg"], true); + } + + if (cl.keyExists("--debug")) + { + if (cl.keyValue("--debug") == "no") + replaceDebug(po["wxcfg"], false); + else if (cl.keyValue("--debug") == "yes" || cl.keyValue("--debug").empty()) + replaceDebug(po["wxcfg"], true); + } + + if (cl.keyExists("--static")) + { + if (cl.keyValue("--static") == "no") + replaceStatic(po["wxcfg"], false); + else if (cl.keyValue("--static") == "yes" || cl.keyValue("--static").empty()) + replaceStatic(po["wxcfg"], true); + } + + if (cl.keyExists("--compiler")) + { + if (cl.keyValue("--compiler") == "gcc") + replaceCompilerIfFound(po["wxcfg"], "gcc"); + else if (cl.keyValue("--compiler") == "dmc") + replaceCompilerIfFound(po["wxcfg"], "dmc"); + else if (cl.keyValue("--compiler") == "vc") + replaceCompilerIfFound(po["wxcfg"], "vc"); + else if (cl.keyValue("--compiler") == "wat") + replaceCompilerIfFound(po["wxcfg"], "wat"); + else if (cl.keyValue("--compiler") == "bcc") + replaceCompilerIfFound(po["wxcfg"], "bcc"); + } +} + +// ------------------------------------------------------------------------------------------------- + + +void detectCompiler(Options& po, const CmdLineOptions& cl) +{ + // input example of po["wxcfg"]: + // gcc_dll\\mswud + // vc_lib\\msw + + if (po["wxcfg"].find("gcc_") != std::string::npos) + { + CompilerMinGW compiler; + compiler.process(po, cl); + return; + } + else if (po["wxcfg"].find("dmc_") != std::string::npos) + { + CompilerDMC compiler; + compiler.process(po, cl); + return; + } + else if (po["wxcfg"].find("vc_") != std::string::npos) + { + CompilerVC compiler; + compiler.process(po, cl); + return; + } + else if (po["wxcfg"].find("wat_") != std::string::npos) + { + CompilerWAT compiler; + compiler.process(po, cl); + return; + } + else if (po["wxcfg"].find("bcc_") != std::string::npos) + { + CompilerBCC compiler; + compiler.process(po, cl); + return; + } + else + { + // TODO: this never reaches thanks to the new autodetection algorithm + + std::cout << g_tokError << "No supported compiler has been detected in the configuration '" << po["wxcfg"] << "'." << std::endl; + std::cerr << std::endl; + std::cerr << "The specified wxcfg must start with a 'gcc_', 'dmc_' or 'vc_'" << std::endl; + std::cerr << "to be successfully detected." << std::endl; + + exit(1); + } +} + +// ------------------------------------------------------------------------------------------------- + +void validatePrefix(const std::string& prefix) +{ + // tests if prefix is a valid dir. checking if there is an \include\wx\wx.h + const std::string testfile = prefix + "\\include\\wx\\wx.h"; + std::ifstream prefixIsValid(testfile.c_str()); + if (!prefixIsValid.is_open()) + { + std::cout << g_tokError << "wxWidgets hasn't been found installed at '" << prefix << "'." << std::endl; + std::cerr << std::endl; + std::cerr << "Please use the --prefix flag (as in wx-config --prefix=C:\\wxWidgets)" << std::endl; + std::cerr << "or set the environment variable WXWIN (as in WXWIN=C:\\wxWidgets)" << std::endl; + std::cerr << "to specify where is your installation of wxWidgets." << std::endl; + + exit(1); + } +} + +// ------------------------------------------------------------------------------------------------- + +bool validateConfiguration(const std::string& wxcfgfile, const std::string& wxcfgsetuphfile, bool exitIfError = true) +{ + std::ifstream build_cfg(wxcfgfile.c_str()); + std::ifstream setup_h(wxcfgsetuphfile.c_str()); + + bool isBuildCfgOpen = build_cfg.is_open(); + bool isSetupHOpen = setup_h.is_open(); + + if (!isBuildCfgOpen && exitIfError) + { + if (!isSetupHOpen && exitIfError) + { + std::cout << g_tokError << "No valid setup.h of wxWidgets has been found at location: " << wxcfgsetuphfile << std::endl; + std::cerr << std::endl; + std::cerr << "Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\\mswud)" << std::endl; + std::cerr << "or set the environment variable WXCFG (as in WXCFG=gcc_dll\\mswud)" << std::endl; + std::cerr << "to specify which configuration exactly you want to use." << std::endl; + + exit(1); + } + + std::cout << g_tokError << "No valid configuration of wxWidgets has been found at location: " << wxcfgfile << std::endl; + std::cerr << std::endl; + std::cerr << "Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\\mswud)" << std::endl; + std::cerr << "or set the environment variable WXCFG (as in WXCFG=gcc_dll\\mswud)" << std::endl; + std::cerr << "to specify which configuration exactly you want to use." << std::endl; + + exit(1); + } + return isBuildCfgOpen && isSetupHOpen; +} + +// ------------------------------------------------------------------------------------------------- + +void outputFlags(Options& po, const CmdLineOptions& cl) +{ + /// Outputs flags to console + if (cl.keyExists("--variable")) + { + std::cout << po["variable"]; + exit(0); + } + if (cl.keyExists("--cc")) + std::cout << po["cc"]; + if (cl.keyExists("--cxx")) + std::cout << po["cxx"]; + if (cl.keyExists("--ld")) + std::cout << po["ld"]; + if (cl.keyExists("--cflags") || cl.keyExists("--cxxflags") || cl.keyExists("--cppflags")) + std::cout << po["cflags"] << std::endl; + if (cl.keyExists("--libs")) + std::cout << po["libs"] << std::endl; + if (cl.keyExists("--rcflags")) + std::cout << po["rcflags"] << std::endl; + if (cl.keyExists("--release")) + std::cout << po["release"]; + if (cl.keyExists("--version")) + std::cout << po["version"]; + if (cl.keyExists("--basename")) + std::cout << po["basename"]; + +#if 0 // not implemented + if (cl.keyExists("--version=")) // incomplete + std::cout << po["version="]; + if (cl.keyExists("--ld")) // incomplete + std::cout << po["ld"]; + if (cl.keyExists("--rezflags")) + std::cout << po["rezflags"]; + if (cl.keyExists("--linkdeps")) + std::cout << po["linkdeps"]; + if (cl.keyExists("--version-full")) + std::cout << po["version-full"]; + if (cl.keyExists("--exec-prefix=")) + std::cout << po["exec-prefix="]; + if (cl.keyExists("--toolkit")) + std::cout << po["toolkit"]; + if (cl.keyExists("--list")) + std::cout << po["list"]; +#endif +} + +// ------------------------------------------------------------------------------------------------- + + + +int main(int argc, char* argv[]) +{ + /// Command line options + CmdLineOptions cl(argc, argv); + + /// Program options + Options po; + + if (!cl.validArgs()) + return 1; + + if (cl.keyExists("-v")) + { + std::cout << "wx-config revision " << getSvnRevision() << " " << getSvnDate() << std::endl; + return 0; + } + + checkEasyMode(cl); + + if (cl.keyExists("--prefix")) + po["prefix"] = cl["--prefix"]; + else if (getenv("WXWIN")) + po["prefix"] = getenv("WXWIN"); + else + { +#ifdef _WIN32 + /// Assume that, like a *nix, we're installed in C:\some\path\bin, + /// and that the root dir of wxWidgets is therefore C:\some\path. + DWORD length = MAX_PATH; + LPSTR libPath = NULL; + LPSTR filePart; + + /// Why, oh why, doesn't M$ give us a way to find the actual return length, + /// like they do with everything else?!? + do + { + libPath = new CHAR[length]; + GetModuleFileName(NULL, libPath, length); + GetFullPathName(libPath, length, libPath, &filePart); + *filePart = '\0'; + // Add 3 for ".." and NULL + if (strlen(libPath) + 3 > length) + { + length *= 2; + delete[] libPath; + libPath = NULL; + } + } while (libPath == NULL); + strcpy(filePart, ".."); + + // Fix the .. + GetFullPathName(libPath, length, libPath, NULL); + po["prefix"] = libPath; + delete[] libPath; +#else + po["prefix"] = "C:\\wxWidgets"; +#endif + } + + normalizePath(po["prefix"]); + + validatePrefix(po["prefix"]); + + if (cl.keyExists("--wxcfg")) + po["wxcfg"] = cl["--wxcfg"]; + else if (getenv("WXCFG") && !cl.keyExists("--prefix")) + po["wxcfg"] = getenv("WXCFG"); + else + { + // Try if something valid can be found trough deriving checkAdditionalFlags() first + po["wxcfg"] = "gcc_dll\\msw"; + po["wxcfgfile"] = po["prefix"] + "\\lib\\" + po["wxcfg"] + "\\build.cfg"; + po["wxcfgsetuphfile"] = po["prefix"] + "\\lib\\" + po["wxcfg"] + "\\wx\\setup.h"; + checkAdditionalFlags(po, cl); + + if (!validateConfiguration(po["wxcfgfile"], po["wxcfgsetuphfile"], false)) + autodetectConfiguration(po, cl); // important function + } + + normalizePath(po["wxcfg"]); + checkAdditionalFlags(po, cl); + po["wxcfgfile"] = po["prefix"] + "\\lib\\" + po["wxcfg"] + "\\build.cfg"; + po["wxcfgsetuphfile"] = po["prefix"] + "\\lib\\" + po["wxcfg"] + "\\wx\\setup.h"; + validateConfiguration(po["wxcfgfile"], po["wxcfgsetuphfile"]); + + detectCompiler(po, cl); + outputFlags(po, cl); + + return 0; +} + diff --git a/sdk/wxconfig/wx-config.exe b/sdk/wxconfig/wx-config.exe new file mode 100644 index 0000000000000000000000000000000000000000..003723da1bb3de53cdf296687ac9a7aa10577dbf GIT binary patch literal 319488 zcmeEvahz9E`u}HYFfud{`vbuFV5#a&v~Brd7kGy_uPBV zJ@-!KSu;~zQ>j!w{{Q~_RB9o9`EQ8I|6Mp#Z@1Tz+ocw4{Zh|`c@;1992s2rtI`RV zUv|Oe=U!4e_S{P^y{xwMyz@&hzv9x;3ok7#8*y6cC6|pm|DbKR?bh2v?=kIXGtd0s zu;-HhM}K=-mD{!4ySsV%GyJjPE1 z^{A}h+z*+l-i`UGK05l}MQP9cRLTDk>GO;H)bP&ru(LR?Gh@@^gKE#8R14Ocd{|Dq z=&QFckt|K6#vF9{xN~dIO{Gr02V7vL=KJ472){${-$5ppTCpD(tsaZNo&F6;r5Zbt zKOO!QfuADqQv`mBz)unQDFQ!5;HL=u6oH>2@KXeSiopK|5va+ox#;^~`+J6_#@$JC z(&IAw@ORpp-gg$am8CM}YnPR`k`oN+S(b__+uRFBcS$WP@8G19 zD@nM5^hH}{%L~%vWQTM~Wh+~!y^xowY+YL3A)TdwfWYc~f(n3UD+^pLIW?`*Ud+qX z@Z$$o7v-$3^Hx7|)Q?!bip=tYO|8Dai&<^<-tq%`r>>a}|CWWd-*XiP(O%@O z{Ta{@ZStb>wlrfk>ey7OuKY`IA^bgqJP|_OAFKQ_e4+dFQ_(R&i?kQGJxrT@6*QAq zv!I#~|2_s??MAGC>rDl9<*((i7Pte1RsLGoSX;Psi!tw(rBbWDq5cYC&T=mtDT}&* zmyKvI`&I|Ray2naP28*|*1WAIxo^$ zyJ5%BKSC5P3n!owN~zV|?3m77ACX&E`3M}5VX+MRpiAuz)9&Wse|)PI)+#vPXBF&e z?RmA`P3F6(a+d200fh3A@P*o~%>BGhJ(CI!}-Dn|Vwl10_-*NS^lRNkTfoDFtV+2I;bL(|U`O#6ED6-C*aj_Rn~ zslFIJ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